Commit 2fe4ab47 authored by xiaochao's avatar xiaochao

【销项发票申请明细优化】

parent afe6a3f9
...@@ -79,7 +79,10 @@ ...@@ -79,7 +79,10 @@
From csh_transaction ctr From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id) transaction_num, Where ctr.transaction_id = cwo.csh_transaction_id) transaction_num,
ah.invoice_hd_id, ah.invoice_hd_id,
(cwo.write_off_id + al.invoice_ln_wfl_id) file_id (cwo.write_off_id + al.invoice_ln_wfl_id) file_id,
(Select ctr.guarantor_name_duty
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id) guarantor_name_duty
From acr_invoice_apply aa, From acr_invoice_apply aa,
acr_invoice_hd_wfl ah, acr_invoice_hd_wfl ah,
acr_invoice_ln_wfl al, acr_invoice_ln_wfl al,
......
...@@ -92,9 +92,9 @@ ...@@ -92,9 +92,9 @@
trunc(to_date(${@last_month_date}, 'yyyy-mm-dd')) trunc(to_date(${@last_month_date}, 'yyyy-mm-dd'))
AND ((trunc(t.lease_start_date) <= AND ((trunc(t.lease_start_date) <=
trunc(to_date(${@last_month_date}, 'yyyy-mm-dd')) AND trunc(to_date(${@last_month_date}, 'yyyy-mm-dd')) AND
t.contract_status = 'INCEPT') OR t.contract_status in ('INCEPT','PENDING','ETING','REPURING')) OR
(to_char(t.et_date, 'yyyy-mm') >= ${@period_name} AND (to_char(t.et_date, 'yyyy-mm') >= ${@period_name} AND
t.contract_status = 'TERMINATE')) t.contract_status in ('TERMINATE','ET','REPUR')))
AND ccc.due_amount > AND ccc.due_amount >
nvl((SELECT SUM(cwo.write_off_due_amount) nvl((SELECT SUM(cwo.write_off_due_amount)
FROM csh_transaction t, csh_write_off cwo FROM csh_transaction t, csh_write_off cwo
......
...@@ -271,10 +271,10 @@ ...@@ -271,10 +271,10 @@
<bm:query-fields> <bm:query-fields>
<bm:query-field name="contract_number" <bm:query-field name="contract_number"
queryExpression="contract_number like ${@contract_number}"/> queryExpression="contract_number like ${@contract_number}"/>
<bm:query-field name="bp_id_tenant" queryExpression="t1.bp_id_tenant = ${@bp_id_tenant}"/> <!--<bm:query-field name="bp_id_tenant" queryExpression="t1.bp_id_tenant = ${@bp_id_tenant}"/>-->
<bm:query-field name="bp_id_tenant_desc" queryExpression="t1.bp_id_tenant_desc like ${@bp_id_tenant_desc}"/>
<!-- <bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name} "/>--> <!-- <bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name} "/>-->
<bm:query-field name="project_number" queryExpression="t1.project_number like ${@project_number}"/> <bm:query-field name="project_number" queryExpression="t1.project_number like ${@project_number}"/>
<!--<bm:query-field name="bp_id_tenant_desc" queryExpression="t1.bp_id_tenant_desc like ${@bp_id_tenant_desc}"/>-->
<bm:query-field name="bp_id_agent_desc" queryExpression="t1.bp_id_agent_desc like ${@bp_id_agent_desc}"/> <bm:query-field name="bp_id_agent_desc" queryExpression="t1.bp_id_agent_desc like ${@bp_id_agent_desc}"/>
<!-- <bm:query-field name="lease_start_date_from" queryExpression="t1.inception_of_lease &gt;=to_date(${@lease_start_date_from},&apos;yyyy-mm-dd&apos;)"/> <!-- <bm:query-field name="lease_start_date_from" queryExpression="t1.inception_of_lease &gt;=to_date(${@lease_start_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="lease_start_date_to" queryExpression="t1.inception_of_lease &lt;=to_date(${@lease_start_date_to},&apos;yyyy-mm-dd&apos;)"/> <bm:query-field name="lease_start_date_to" queryExpression="t1.inception_of_lease &lt;=to_date(${@lease_start_date_to},&apos;yyyy-mm-dd&apos;)"/>
......
...@@ -68,8 +68,8 @@ ...@@ -68,8 +68,8 @@
else else
' ' ' '
end end
) ) extra_nam,
extra_nam, (Select u.bp_code From hls_bp_master u Where u.unit_id = (select v.unit_id from hls_bp_master v where v.enabled_flag = 'Y' and v.bp_id = t.bp_id) and u.bp_type = 'AGENT') bp_code,
(case when t.paid_byother_flag = 'T' and (case when t.paid_byother_flag = 'T' and
(select v.unit_id from hls_bp_master v where v.enabled_flag = 'Y' and v.bp_category = 'AGENT' and v.bp_id = t.bp_id) = 1565 (select v.unit_id from hls_bp_master v where v.enabled_flag = 'Y' and v.bp_category = 'AGENT' and v.bp_id = t.bp_id) = 1565
then then
...@@ -97,7 +97,6 @@ ...@@ -97,7 +97,6 @@
p_header_id => ${/model/header/record/@header_id}, p_header_id => ${/model/header/record/@header_id},
p_user_id => ${/session/@user_id} p_user_id => ${/session/@user_id}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
...@@ -170,7 +169,8 @@ ...@@ -170,7 +169,8 @@
p_paid_byother_flag =>${@paid_byother_flag}, p_paid_byother_flag =>${@paid_byother_flag},
p_ref_v05 =>${@ref_v05}, p_ref_v05 =>${@ref_v05},
p_status =>${@status}, p_status =>${@status},
p_bank_account_num =>${@bank_account_num} p_bank_account_num =>${@bank_account_num},
p_guarantor_name_duty =>${@guarantor_name_duty}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: ZLF
$Date: 2014-11-21 上午11:18:06
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[begin
${@unit_code}:= csh_transaction_pkg.query_extra_nam_code
(
p_bp_id =>${@bp_id}
);
end;]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="unit_code" output="true" outputPath="@unit_code"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -97,9 +97,11 @@ ...@@ -97,9 +97,11 @@
} }
if (name == 'attachment') { if (name == 'attachment') {
if (record.get('paid_byother_flag') == 'T') { if (record.get('paid_byother_flag') == 'T') {
if (record.get('guarantor_name_duty') != '是'){
return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>'; return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>';
} }
} }
}
} }
...@@ -214,6 +216,7 @@ ...@@ -214,6 +216,7 @@
renderer="acr610_detail_formatMoney" align="right" width="100"/> renderer="acr610_detail_formatMoney" align="right" width="100"/>
<a:column name="transaction_num" prompt="收款业务编号" align="center" width="100"/> <a:column name="transaction_num" prompt="收款业务编号" align="center" width="100"/>
<a:column name="journal_num" prompt="增值税凭证号" align="center" width="100"/> <a:column name="journal_num" prompt="增值税凭证号" align="center" width="100"/>
<a:column name="guarantor_name_duty" prompt="担保人履行担保义务" hidden="true"/>
<a:column name="attachment" prompt="担保代付协议" align="center" width="100" <a:column name="attachment" prompt="担保代付协议" align="center" width="100"
renderer="acr610_detail_renderer"/> renderer="acr610_detail_renderer"/>
</a:columns> </a:columns>
......
...@@ -97,9 +97,11 @@ ...@@ -97,9 +97,11 @@
} }
if (name == 'attachment') { if (name == 'attachment') {
if (record.get('paid_byother_flag') == 'T') { if (record.get('paid_byother_flag') == 'T') {
if (record.get('guarantor_name_duty') != '是'){
return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>'; return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>';
} }
} }
}
} }
...@@ -143,6 +145,7 @@ ...@@ -143,6 +145,7 @@
</a:fields> </a:fields>
</a:dataSet> </a:dataSet>
<a:dataSet id="acr610_ipaid_byother_flag_ds" lookupCode="PAID_BYOTHER_FLAG"/> <a:dataSet id="acr610_ipaid_byother_flag_ds" lookupCode="PAID_BYOTHER_FLAG"/>
<a:dataSet id="acr610_invoice_detail_query_ds"> <a:dataSet id="acr610_invoice_detail_query_ds">
<a:fields> <a:fields>
<a:field name="contract_number"/> <a:field name="contract_number"/>
...@@ -224,6 +227,7 @@ ...@@ -224,6 +227,7 @@
renderer="acr610_detail_formatMoney" align="right" width="100"/> renderer="acr610_detail_formatMoney" align="right" width="100"/>
<a:column name="transaction_num" prompt="收款业务编号" align="center" width="100"/> <a:column name="transaction_num" prompt="收款业务编号" align="center" width="100"/>
<a:column name="journal_num" prompt="增值税凭证号" align="center" width="100"/> <a:column name="journal_num" prompt="增值税凭证号" align="center" width="100"/>
<a:column name="guarantor_name_duty" prompt="担保人履行担保义务" hidden="true"/>
<a:column name="attachment" prompt="担保代付协议" align="center" width="100" <a:column name="attachment" prompt="担保代付协议" align="center" width="100"
renderer="acr610_detail_renderer"/> renderer="acr610_detail_renderer"/>
</a:columns> </a:columns>
......
...@@ -339,14 +339,15 @@ ...@@ -339,14 +339,15 @@
model="basic.hls_lease_organization_for_lov"/> model="basic.hls_lease_organization_for_lov"/>
<a:dataSet id="CON620_contract_query_ds" autoCreate="true"> <a:dataSet id="CON620_contract_query_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="bp_id_tenant_n" autoComplete="true" lovGridHeight="350" lovHeight="500" <!-- <a:field name="bp_id_tenant_n" autoComplete="true" lovGridHeight="350" lovHeight="500"-->
lovLabelWidth="100" lovService="cont.CON541.hls_bp_master_v_for_lov?bp_category=TENANT" <!-- lovLabelWidth="100" lovService="cont.CON541.hls_bp_master_v_for_lov?bp_category=TENANT"-->
lovWidth="520" title="HLS.BP_TITLE"> <!-- lovWidth="520" title="HLS.BP_TITLE">-->
<a:mapping> <!-- <a:mapping>-->
<a:map from="bp_name" to="bp_id_tenant_n"/> <!-- <a:map from="bp_name" to="bp_id_tenant_n"/>-->
<a:map from="bp_id" to="bp_id_tenant"/> <!-- <a:map from="bp_id" to="bp_id_tenant"/>-->
</a:mapping> <!-- </a:mapping>-->
</a:field> <!-- </a:field>-->
<a:field name="bp_id_tenant_desc"/>
<a:field name="bp_id_tenant"/> <a:field name="bp_id_tenant"/>
<a:field name="bp_id_agent_desc"/> <a:field name="bp_id_agent_desc"/>
<a:field name="division"/> <a:field name="division"/>
...@@ -393,7 +394,7 @@ ...@@ -393,7 +394,7 @@
<a:box labelWidth="140" column="4" style="width:100%"> <a:box labelWidth="140" column="4" style="width:100%">
<a:textField name="contract_number" bindTarget="CON620_contract_query_ds" prompt="HLS.CONTRACT_NUMBER"/> <a:textField name="contract_number" bindTarget="CON620_contract_query_ds" prompt="HLS.CONTRACT_NUMBER"/>
<!--<a:textField name="contract_name" bindTarget="CON620_contract_query_ds" prompt="合同名称"/>--> <!--<a:textField name="contract_name" bindTarget="CON620_contract_query_ds" prompt="合同名称"/>-->
<a:lov name="bp_id_tenant_n" bindTarget="CON620_contract_query_ds" prompt="HLS.TENANT_CODE"/> <a:textField name="bp_id_tenant_desc" bindTarget="CON620_contract_query_ds" prompt="HLS.TENANT_CODE"/>
<a:textField name="bp_id_agent_desc" bindTarget="CON620_contract_query_ds" prompt="代理店"/> <a:textField name="bp_id_agent_desc" bindTarget="CON620_contract_query_ds" prompt="代理店"/>
<a:comboBox name="business_type_n" bindTarget="CON620_contract_query_ds" prompt="业务类型"/> <a:comboBox name="business_type_n" bindTarget="CON620_contract_query_ds" prompt="业务类型"/>
<a:comboBox name="division_n" bindTarget="CON620_contract_query_ds" prompt="租赁物"/> <a:comboBox name="division_n" bindTarget="CON620_contract_query_ds" prompt="租赁物"/>
......
...@@ -117,14 +117,17 @@ ...@@ -117,14 +117,17 @@
$('csh509_csh_trx_bank_business_confirm').enable(); $('csh509_csh_trx_bank_business_confirm').enable();
return; return;
} }
var paid_byother_flag = datas[i].get('paid_byother_flag'); // var paid_byother_flag = datas[i].get('paid_byother_flag');
var guarantor_name_duty = datas[i].get('guarantor_name_duty'); var transaction_type = datas[i].get('guarantor_name_duty');
var transaction_type = datas[i].get('transaction_type');
if (paid_byother_flag != null && guarantor_name_duty != null){ // var transaction_type = '';
if (paid_byother_flag == 'Y' && guarantor_name_duty != '是'){ // if (paid_byother_flag == 'T'){
transaction_type = 'ADVANCE_RECEIPT'; // if (guarantor_name_duty == '是'){
} // transaction_type = 'PAYMENT';
} // }else{
// transaction_type = 'ADVANCE_RECEIPT';
// }
// }
// //
// if(confirmed_flag=='ACCAUDITING'){ // if(confirmed_flag=='ACCAUDITING'){
......
...@@ -22,6 +22,12 @@ ...@@ -22,6 +22,12 @@
<a:link id="csh510_update_bp_info_link" model="csh.CSH510.csh_transaction_update_bp_info" modelaction="update"/> <a:link id="csh510_update_bp_info_link" model="csh.CSH510.csh_transaction_update_bp_info" modelaction="update"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/> <script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/> <a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="extra_nam_csh_transaction_receipt_data_link_id"
model="csh.CSH511.check_extra_nam_count" modelaction="update"/>
<a:link id="get_extra_nam_csh_transaction_receipt_data_link_id"
model="csh.CSH511.query_extra_nam_data" modelaction="update"/>
<a:link id="get_extra_code_csh_transaction_receipt_data_link_id"
model="csh.CSH511.query_extra_nam_code" modelaction="update"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
//附件上传 //附件上传
...@@ -209,6 +215,81 @@ ...@@ -209,6 +215,81 @@
record.getField('paid_byother_flag_n').setReadOnly(false); record.getField('paid_byother_flag_n').setReadOnly(false);
record.set('transaction_type', 'RECEIPT'); record.set('transaction_type', 'RECEIPT');
} }
}else if(name == 'extra_nam'){
//深圳美鹏
// var extra_nam = record.get('extra_nam');
var bp_code = record.get('bp_code');
if (bp_code == 'C00010168'){
record.getField('guarantor_name_duty').setReadOnly(false);
record.set('guarantor_name_duty','是');
record.getField('guarantor_name_duty').setRequired(true);
}else if (bp_code != 'C00010168'){
record.getField('guarantor_name_duty').setReadOnly(true);
record.set('guarantor_name_duty','否');
record.getField('guarantor_name_duty').setRequired(false);
}
}else if (name =='bp_name'){
var bp_id = record.get('bp_id');
Leaf.request({
url: $('extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : bp_id},
scope: this,
success: function (res) {
//先查询数量
var count = res.result.extra_name_count;
//根据数量,一个直接查询显示,多个显示空
if (count == 1){
//查询代理点得简称
Leaf.request({
url: $('get_extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : bp_id},
scope: this,
success: function (res) {
var extra_name = res.result.extra_name;
record.set('extra_nam',extra_name);
var extra_id = bp_id;
Leaf.request({
url: $('get_extra_code_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : extra_id},
scope: this,
success: function (res) {
var unit_code = res.result.unit_code;
if (unit_code == 241){
record.getField('guarantor_name_duty').setReadOnly(false);
record.set('guarantor_name_duty','是');
record.getField('guarantor_name_duty').setRequired(true);
}else if(unit_code != 241){
record.getField('guarantor_name_duty').setReadOnly(true);
record.set('guarantor_name_duty','否');
record.getField('guarantor_name_duty').setRequired(false);
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
} }
} }
...@@ -332,9 +413,79 @@ ...@@ -332,9 +413,79 @@
return; return;
} }
} }
//页面加载的时候触发
function update_load_receipt(ds) {
var records = ds.getAll();
for (var i = 0;i < records.length;i++) {
var record = records[i];
var bp_id = record.get('bp_id');
}
Leaf.request({
url: $('extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : bp_id},
scope: this,
success: function (res) {
//先查询数量
var count = res.result.extra_name_count;
//根据数量,一个直接查询显示,多个显示空
if (count == 1){
//查询代理点得简称
Leaf.request({
url: $('get_extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : bp_id},
scope: this,
success: function (res) {
var extra_name = res.result.extra_name;
record.set('extra_nam',extra_name);
var extra_id = bp_id;
Leaf.request({
url: $('get_extra_code_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : extra_id},
scope: this,
success: function (res) {
var unit_code = res.result.unit_code;
if (unit_code == 241){
record.getField('guarantor_name_duty').setReadOnly(false);
record.set('guarantor_name_duty','是');
record.getField('guarantor_name_duty').setRequired(true);
}else if(unit_code != 241){
record.getField('guarantor_name_duty').setReadOnly(true);
record.set('guarantor_name_duty','否');
record.getField('guarantor_name_duty').setRequired(false);
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
}
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="yes_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="PAID_BYOTHER_FLAG_DS" lookupCode="PAID_BYOTHER_FLAG"/> <a:dataSet id="PAID_BYOTHER_FLAG_DS" lookupCode="PAID_BYOTHER_FLAG"/>
<!-- <a:dataSet id="payment_method_ds"> <!-- <a:dataSet id="payment_method_ds">
<a:datas dataSource="/model/payment_method_path"/> <a:datas dataSource="/model/payment_method_path"/>
...@@ -444,12 +595,28 @@ ...@@ -444,12 +595,28 @@
<a:field name="bank_slip_num" required="true"/> <a:field name="bank_slip_num" required="true"/>
<a:field name="collection_classes_desc" prompt="款项用途" required="true" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/> <a:field name="collection_classes_desc" prompt="款项用途" required="true" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="paid_byother_flag_n" required="true" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value"/> <a:field name="paid_byother_flag_n" required="true" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value"/>
<!--代理店简称-->
<a:field name="bp_code"/>
<a:field name="extra_id"/>
<a:field name="extra_nam" required="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="90"
lovService="csh.CSH510.csh_extra_nam_add_lov" lovWidth="550" title="代理店简称">
<a:mapping>
<a:map from="bp_code" to="bp_code"/>
<a:map from="extra_nam" to="extra_nam"/>
</a:mapping>
</a:field>
<!--担保人履行担保义务-->
<a:field name="guarantor_name_duty" displayField="code_value_name" options="yes_no_ds" prompt="担保人履行担保义务" returnField="exist_flag" valueField="code_value"/>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="onUpdate_csh511_receipt"/> <a:event name="update" handler="onUpdate_csh511_receipt"/>
<a:event name="submitsuccess" handler="onSubmitSuccess"/> <a:event name="submitsuccess" handler="onSubmitSuccess"/>
<!--<a:event name="add" handler="onAdd_csh511_receipt"/> <!--<a:event name="add" handler="onAdd_csh511_receipt"/>
<a:event name="load" handler="onAdd_csh511_receipt"/>--> <a:event name="load" handler="onAdd_csh511_receipt"/>-->
<a:event name="load" handler="update_load_receipt"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
</a:dataSets> </a:dataSets>
...@@ -510,11 +677,19 @@ ...@@ -510,11 +677,19 @@
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds" prompt="款项用途" /> <a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds" prompt="款项用途" />
</a:box> </a:box>
<a:hBox style="width:800px"> <a:hBox style="width:800px">
<a:textField width="395" name="description" bindTarget="csh_transaction_receipt_head_ds" /> <a:textField width="300" name="description" bindTarget="csh_transaction_receipt_head_ds" />
<!--代理店简称-->
<a:lov name="extra_nam" bindTarget="csh_transaction_receipt_head_ds"
prompt="代理店简称" width="180" readOnly="true"/>
</a:hBox> </a:hBox>
<!--#添加备注字段--> <!--#添加备注字段-->
<a:hBox style="width:800px"> <a:hBox style="width:800px">
<a:textField width="395" name="ref_v05" prompt="备注" bindTarget="csh_transaction_receipt_head_ds" /> <a:textField width="300" name="ref_v05" prompt="备注" bindTarget="csh_transaction_receipt_head_ds" />
<!--担保人履行担保义务-->
<a:comboBox name="guarantor_name_duty" bindTarget="csh_transaction_receipt_head_ds"
prompt="担保人履行担保义务" width="180" />
</a:hBox> </a:hBox>
</a:fieldSet> </a:fieldSet>
<!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display--> <!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
......
...@@ -22,6 +22,12 @@ ...@@ -22,6 +22,12 @@
<a:link id="csh510_update_bp_info_link" model="csh.CSH510.csh_transaction_update_bp_info" modelaction="update"/> <a:link id="csh510_update_bp_info_link" model="csh.CSH510.csh_transaction_update_bp_info" modelaction="update"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/> <script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/> <a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="extra_nam_csh_transaction_receipt_data_link_id"
model="csh.CSH511.check_extra_nam_count" modelaction="update"/>
<a:link id="get_extra_nam_csh_transaction_receipt_data_link_id"
model="csh.CSH511.query_extra_nam_data" modelaction="update"/>
<a:link id="get_extra_code_csh_transaction_receipt_data_link_id"
model="csh.CSH511.query_extra_nam_code" modelaction="update"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
//附件上传 //附件上传
...@@ -210,15 +216,83 @@ ...@@ -210,15 +216,83 @@
// } // }
function onAdd_csh511_receipt(ds, record) { function readonly_load_receipt(ds) {
record.set('precision', 2); var records = ds.getAll();
record.set('zero_amounts_allowed', 'N'); for (var i = 0;i < records.length;i++) {
record.set('bank_account_id', 1531); var record = records[i];
// record.set('bank_account_num','448165800609'); var bp_id = record.get('bp_id');
// record.set('bank_account_name','德融国际融资租赁有限公司'); }
// record.set('bank_account_code','0040101'); Leaf.request({
record.set('currency_code', 'CNY'); url: $('extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
record.set('currency_name', '人民币'); para: {bp_id : bp_id},
scope: this,
success: function (res) {
//先查询数量
var count = res.result.extra_name_count;
//根据数量,一个直接查询显示,多个显示空
if (count == 1){
//查询代理点得简称
Leaf.request({
url: $('get_extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : bp_id},
scope: this,
success: function (res) {
var extra_name = res.result.extra_name;
record.set('extra_nam',extra_name);
var extra_id = bp_id;
Leaf.request({
url: $('get_extra_code_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : extra_id},
scope: this,
success: function (res) {
var unit_code = res.result.unit_code;
if (unit_code == 241){
record.getField('guarantor_name_duty').setReadOnly(false);
record.set('guarantor_name_duty','是');
record.getField('guarantor_name_duty').setRequired(true);
}else if(unit_code != 241){
record.getField('guarantor_name_duty').setReadOnly(true);
record.set('guarantor_name_duty','否');
record.getField('guarantor_name_duty').setRequired(false);
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
// record.set('precision', 2);
// record.set('zero_amounts_allowed', 'N');
// record.set('bank_account_id', 1531);
// // record.set('bank_account_num','448165800609');
// // record.set('bank_account_name','德融国际融资租赁有限公司');
// // record.set('bank_account_code','0040101');
// record.set('currency_code', 'CNY');
// record.set('currency_name', '人民币');
} }
function setfunctionamount(record) { function setfunctionamount(record) {
...@@ -429,11 +503,13 @@ ...@@ -429,11 +503,13 @@
<a:field name="bp_bank_account_name" required="true"/> <a:field name="bp_bank_account_name" required="true"/>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/> <a:field name="collection_classes_desc" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="paid_byother_flag_n" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value"/> <a:field name="paid_byother_flag_n" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value"/>
<a:field name="extra_nam"/>
<a:field name="guarantor_name_duty"/>
</a:fields> </a:fields>
<a:events> <a:events>
<!--<a:event name="update" handler="onUpdate_csh511_receipt"/> <!--<a:event name="update" handler="onUpdate_csh511_receipt"/>
<a:event name="add" handler="onAdd_csh511_receipt"/> <a:event name="add" handler="onAdd_csh511_receipt"/>-->
<a:event name="load" handler="onAdd_csh511_receipt"/>--> <a:event name="load" handler="readonly_load_receipt"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
</a:dataSets> </a:dataSets>
...@@ -494,11 +570,19 @@ ...@@ -494,11 +570,19 @@
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds" prompt="款项用途" readOnly="true"/> <a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds" prompt="款项用途" readOnly="true"/>
</a:box> </a:box>
<a:hBox style="width:800px"> <a:hBox style="width:800px">
<a:textField width="350" name="description" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/> <a:textField width="300" name="description" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<!--代理店简称-->
<a:lov name="extra_nam" bindTarget="csh_transaction_receipt_head_ds"
prompt="代理店简称" readOnly="true" width="180" />
</a:hBox> </a:hBox>
<!--#添加备注字段--> <!--#添加备注字段-->
<a:hBox style="width:800px"> <a:hBox style="width:800px">
<a:textField width="350" name="ref_v05" prompt="备注" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/> <a:textField width="300" name="ref_v05" prompt="备注" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<!--担保人履行担保义务-->
<a:comboBox name="guarantor_name_duty" bindTarget="csh_transaction_receipt_head_ds"
prompt="担保人履行担保义务" readOnly="true" width="180" />
</a:hBox> </a:hBox>
</a:fieldSet> </a:fieldSet>
<!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display--> <!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
......
...@@ -69,6 +69,8 @@ ...@@ -69,6 +69,8 @@
record.set('write_off_flag', 'DISABLED'); record.set('write_off_flag', 'DISABLED');
record.set('guarantor_name_duty',record.get('guarantor_name_duty'));
if (record.get('collection_classes') == 'DEPOSIT') { if (record.get('collection_classes') == 'DEPOSIT') {
record.set('transaction_type', 'DEPOSIT'); record.set('transaction_type', 'DEPOSIT');
} else { } else {
...@@ -116,17 +118,21 @@ ...@@ -116,17 +118,21 @@
} }
} }
//当也没变动时候,触发事件
function update_import_data(ds, record, name, value, oldvalue) { function update_import_data(ds, record, name, value, oldvalue) {
if (name =='paid_byother_flag_desc'){ if (name =='paid_byother_flag_desc'){
var paid_byother_flag = record.get('paid_byother_flag');
var paid_byother_flag_desc = record.get('paid_byother_flag_desc'); var paid_byother_flag_desc = record.get('paid_byother_flag_desc');
//深圳美鹏 //深圳美鹏
// var extra_nam = record.get('extra_nam');
var bp_code = record.get('bp_code'); var bp_code = record.get('bp_code');
if (paid_byother_flag_desc == '是' && bp_code == 'C00010168'){ if (paid_byother_flag_desc == '是' && bp_code == 'C00010168'){
record.set('guarantor_name_duty','是'); record.set('guarantor_name_duty','是');
record.getField('guarantor_name_duty').setReadOnly(false);
}else{ }else{
record.set('guarantor_name_duty','否'); record.set('guarantor_name_duty','否');
record.getField('guarantor_name_duty').setReadOnly(true);
} }
}else if (name =='bp_name'){ }else if (name =='bp_name'){
var bp_id = record.get('bp_id'); var bp_id = record.get('bp_id');
Leaf.request({ Leaf.request({
...@@ -164,7 +170,23 @@ ...@@ -164,7 +170,23 @@
}); });
} }
} }
//页面加载时触发事件
function onload_import_data(ds) {
var records = ds.getAll();
for (var i = 0;i < records.length;i++) {
var record = records[i];
var bp_code = record.get('bp_code');
var paid_byother_flag = record.get('paid_byother_flag');
record.getField('extra_nam').setRequired(true);
if (paid_byother_flag == 'T' && bp_code == 'C00010168'){
record.set('guarantor_name_duty','是');
record.getField('guarantor_name_duty').setReadOnly(false);
}else{
record.set('guarantor_name_duty','否');
record.getField('guarantor_name_duty').setReadOnly(true);
}
}
}
function change_background_color(record) { function change_background_color(record) {
if (record.get('error_message')) { if (record.get('error_message')) {
return 'background-color:#fc9492;'; return 'background-color:#fc9492;';
...@@ -210,6 +232,7 @@ ...@@ -210,6 +232,7 @@
} }
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="yes_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"> <a:dataSet id="collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES">
</a:dataSet> </a:dataSet>
<a:dataSet id="paid_byother_flag_ds"> <a:dataSet id="paid_byother_flag_ds">
...@@ -226,6 +249,9 @@ ...@@ -226,6 +249,9 @@
<a:field name="attribute_4" readOnly="true"/> <a:field name="attribute_4" readOnly="true"/>
<a:field name="paid_byother_flag_desc" required="true" options="paid_byother_flag_ds" <a:field name="paid_byother_flag_desc" required="true" options="paid_byother_flag_ds"
returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value"/> returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value"/>
<a:field name="guarantor_name_duty" displayField="code_value_name" options="yes_no_ds" prompt="担保人履行担保义务" returnField="exist_flag" valueField="code_value"/>
<a:field name="paid_byother_flag" required="true"/> <a:field name="paid_byother_flag" required="true"/>
<a:field name="collection_classes_desc" required="true" options="collection_classes_ds" <a:field name="collection_classes_desc" required="true" options="collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/> displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
...@@ -255,6 +281,7 @@ ...@@ -255,6 +281,7 @@
<a:field name="transaction_date" datatype="date"/> <a:field name="transaction_date" datatype="date"/>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="load" handler="onload_import_data"/>
<a:event name="update" handler="update_import_data"/> <a:event name="update" handler="update_import_data"/>
<a:event name="indexchange" handler="indexchange_data"/> <a:event name="indexchange" handler="indexchange_data"/>
</a:events> </a:events>
...@@ -295,7 +322,7 @@ ...@@ -295,7 +322,7 @@
<a:column name="extra_nam" prompt="代理店简称" width="80" editor="grid_lov"/> <a:column name="extra_nam" prompt="代理店简称" width="80" editor="grid_lov"/>
<a:column name="bp_code" prompt="代理店简称code" hidden="true"/> <a:column name="bp_code" prompt="代理店简称code" hidden="true"/>
<a:column name="guarantor_name_duty" prompt="担保人履行担保义务" width="80"/> <a:column name="guarantor_name_duty" prompt="担保人履行担保义务" width="80" editor="grid_cb"/>
</a:columns> </a:columns>
<a:editors> <a:editors>
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
model="csh.CSH511.check_extra_nam_count" modelaction="update"/> model="csh.CSH511.check_extra_nam_count" modelaction="update"/>
<a:link id="get_extra_nam_csh_transaction_receipt_data_link_id" <a:link id="get_extra_nam_csh_transaction_receipt_data_link_id"
model="csh.CSH511.query_extra_nam_data" modelaction="update"/> model="csh.CSH511.query_extra_nam_data" modelaction="update"/>
<a:link id="get_extra_code_csh_transaction_receipt_data_link_id"
model="csh.CSH511.query_extra_nam_code" modelaction="update"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
var transaction_id = ''; var transaction_id = '';
...@@ -265,8 +267,10 @@ ...@@ -265,8 +267,10 @@
success: function (res) { success: function (res) {
//先查询数量 //先查询数量
var count = res.result.extra_name_count; var count = res.result.extra_name_count;
if (count == 1){
//根据数量,一个直接查询显示,多个显示空 //根据数量,一个直接查询显示,多个显示空
if (count == 1){
//查询代理点得简称
Leaf.request({ Leaf.request({
url: $('get_extra_nam_csh_transaction_receipt_data_link_id').getUrl(), url: $('get_extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : bp_id}, para: {bp_id : bp_id},
...@@ -274,11 +278,18 @@ ...@@ -274,11 +278,18 @@
success: function (res) { success: function (res) {
var extra_name = res.result.extra_name; var extra_name = res.result.extra_name;
record.set('extra_nam',extra_name); record.set('extra_nam',extra_name);
if (bp_id == 1564){ var extra_id = bp_id;
Leaf.request({
url: $('get_extra_code_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : extra_id},
scope: this,
success: function (res) {
var unit_code = res.result.unit_code;
if (unit_code == 241){
record.getField('guarantor_name_duty').setReadOnly(false); record.getField('guarantor_name_duty').setReadOnly(false);
record.set('guarantor_name_duty','是'); record.set('guarantor_name_duty','是');
record.getField('guarantor_name_duty').setRequired(true); record.getField('guarantor_name_duty').setRequired(true);
}else if(bp_id != 1564){ }else if(unit_code != 241){
record.getField('guarantor_name_duty').setReadOnly(true); record.getField('guarantor_name_duty').setReadOnly(true);
record.set('guarantor_name_duty','否'); record.set('guarantor_name_duty','否');
record.getField('guarantor_name_duty').setRequired(false); record.getField('guarantor_name_duty').setRequired(false);
...@@ -291,6 +302,14 @@ ...@@ -291,6 +302,14 @@
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
} }
}); });
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
} }
}, },
failure: function () { failure: function () {
...@@ -476,6 +495,7 @@ ...@@ -476,6 +495,7 @@
</a:field> </a:field>
<!--代理店简称--> <!--代理店简称-->
<a:field name="bp_code"/> <a:field name="bp_code"/>
<a:field name="extra_id"/>
<a:field name="extra_nam" required="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="90" <a:field name="extra_nam" required="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="90"
lovService="csh.CSH510.csh_extra_nam_add_lov" lovWidth="550" title="代理店简称"> lovService="csh.CSH510.csh_extra_nam_add_lov" lovWidth="550" title="代理店简称">
<a:mapping> <a:mapping>
...@@ -638,24 +658,23 @@ ...@@ -638,24 +658,23 @@
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds" <a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds"
prompt="款项用途"/> prompt="款项用途"/>
</a:box> </a:box>
<a:box column="2">
<a:hBox style="width:400px"> <a:hBox style="width:800px">
<a:textField width="350" name="description" bindTarget="csh_transaction_receipt_head_ds"/> <a:textField width="300" name="description" bindTarget="csh_transaction_receipt_head_ds"/>
</a:hBox>
<!--代理店简称--> <!--代理店简称-->
<a:lov name="extra_nam" bindTarget="csh_transaction_receipt_head_ds" <a:lov name="extra_nam" bindTarget="csh_transaction_receipt_head_ds"
prompt="代理店简称"/> prompt="代理店简称" width="180" readOnly="true" />
</a:box>
<a:box column="2"> </a:hBox>
<a:hBox style="width:800px">
<!--#添加备注字段--> <!--#添加备注字段-->
<a:hBox style="width:400px"> <a:textField width="300" name="ref_v05" prompt="CSH511.CSH_TRANSACTION.STATEMENT"
<a:textField width="350" name="ref_v05" prompt="CSH511.CSH_TRANSACTION.STATEMENT"
bindTarget="csh_transaction_receipt_head_ds"/> bindTarget="csh_transaction_receipt_head_ds"/>
</a:hBox>
<!--担保人履行担保义务--> <!--担保人履行担保义务-->
<a:comboBox name="guarantor_name_duty" bindTarget="csh_transaction_receipt_head_ds" <a:comboBox name="guarantor_name_duty" bindTarget="csh_transaction_receipt_head_ds"
prompt="担保人履行担保义务"/> prompt="担保人履行担保义务" width="180" />
</a:box> </a:hBox>
</a:fieldSet> </a:fieldSet>
<!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display--> <!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
<!-- <a:comboBox name="currency_name" bindTarget="csh_transaction_receipt_head_ds"/> <!-- <a:comboBox name="currency_name" bindTarget="csh_transaction_receipt_head_ds"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment