Commit 2fe4ab47 authored by xiaochao's avatar xiaochao

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

parent afe6a3f9
......@@ -79,7 +79,10 @@
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id) transaction_num,
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,
acr_invoice_hd_wfl ah,
acr_invoice_ln_wfl al,
......
......@@ -92,9 +92,9 @@
trunc(to_date(${@last_month_date}, 'yyyy-mm-dd'))
AND ((trunc(t.lease_start_date) <=
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
t.contract_status = 'TERMINATE'))
t.contract_status in ('TERMINATE','ET','REPUR')))
AND ccc.due_amount >
nvl((SELECT SUM(cwo.write_off_due_amount)
FROM csh_transaction t, csh_write_off cwo
......
......@@ -271,10 +271,10 @@
<bm:query-fields>
<bm:query-field name="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="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="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;)"/>
......
......@@ -18,7 +18,7 @@
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
csh_transaction_pkg.update_muti_confirmed_flag(
csh_transaction_pkg.update_muti_confirmed_flag(
p_transaction_id =>${@transaction_id},
p_wanted_confirmed_flag =>${@wanted_confirmed_flag},
p_wanted_written_off_flag=>${@wanted_written_off_flag},
......
......@@ -68,8 +68,8 @@
else
' '
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
(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
......@@ -97,7 +97,6 @@
p_header_id => ${/model/header/record/@header_id},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
......@@ -170,7 +169,8 @@
p_paid_byother_flag =>${@paid_byother_flag},
p_ref_v05 =>${@ref_v05},
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;
]]></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,7 +97,9 @@
}
if (name == 'attachment') {
if (record.get('paid_byother_flag') == 'T') {
return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>';
if (record.get('guarantor_name_duty') != '是'){
return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>';
}
}
}
......@@ -214,6 +216,7 @@
renderer="acr610_detail_formatMoney" align="right" 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="guarantor_name_duty" prompt="担保人履行担保义务" hidden="true"/>
<a:column name="attachment" prompt="担保代付协议" align="center" width="100"
renderer="acr610_detail_renderer"/>
</a:columns>
......
......@@ -97,7 +97,9 @@
}
if (name == 'attachment') {
if (record.get('paid_byother_flag') == 'T') {
return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>';
if (record.get('guarantor_name_duty') != '是'){
return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>';
}
}
}
......@@ -143,6 +145,7 @@
</a:fields>
</a:dataSet>
<a:dataSet id="acr610_ipaid_byother_flag_ds" lookupCode="PAID_BYOTHER_FLAG"/>
<a:dataSet id="acr610_invoice_detail_query_ds">
<a:fields>
<a:field name="contract_number"/>
......@@ -224,6 +227,7 @@
renderer="acr610_detail_formatMoney" align="right" 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="guarantor_name_duty" prompt="担保人履行担保义务" hidden="true"/>
<a:column name="attachment" prompt="担保代付协议" align="center" width="100"
renderer="acr610_detail_renderer"/>
</a:columns>
......
......@@ -339,14 +339,15 @@
model="basic.hls_lease_organization_for_lov"/>
<a:dataSet id="CON620_contract_query_ds" autoCreate="true">
<a:fields>
<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"
lovWidth="520" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_name" to="bp_id_tenant_n"/>
<a:map from="bp_id" to="bp_id_tenant"/>
</a:mapping>
</a:field>
<!-- <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"-->
<!-- lovWidth="520" title="HLS.BP_TITLE">-->
<!-- <a:mapping>-->
<!-- <a:map from="bp_name" to="bp_id_tenant_n"/>-->
<!-- <a:map from="bp_id" to="bp_id_tenant"/>-->
<!-- </a:mapping>-->
<!-- </a:field>-->
<a:field name="bp_id_tenant_desc"/>
<a:field name="bp_id_tenant"/>
<a:field name="bp_id_agent_desc"/>
<a:field name="division"/>
......@@ -393,7 +394,7 @@
<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_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:comboBox name="business_type_n" bindTarget="CON620_contract_query_ds" prompt="业务类型"/>
<a:comboBox name="division_n" bindTarget="CON620_contract_query_ds" prompt="租赁物"/>
......
......@@ -117,14 +117,17 @@
$('csh509_csh_trx_bank_business_confirm').enable();
return;
}
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('transaction_type');
if (paid_byother_flag != null && guarantor_name_duty != null){
if (paid_byother_flag == 'Y' && guarantor_name_duty != '是'){
transaction_type = 'ADVANCE_RECEIPT';
}
}
// var paid_byother_flag = datas[i].get('paid_byother_flag');
var transaction_type = datas[i].get('guarantor_name_duty');
// var transaction_type = '';
// if (paid_byother_flag == 'T'){
// if (guarantor_name_duty == '是'){
// transaction_type = 'PAYMENT';
// }else{
// transaction_type = 'ADVANCE_RECEIPT';
// }
// }
//
// if(confirmed_flag=='ACCAUDITING'){
......
......@@ -22,6 +22,12 @@
<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"/>
<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[
//附件上传
......@@ -209,6 +215,81 @@
record.getField('paid_byother_flag_n').setReadOnly(false);
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 @@
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>
<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="payment_method_ds">
<a:datas dataSource="/model/payment_method_path"/>
......@@ -444,12 +595,28 @@
<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="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:events>
<a:event name="update" handler="onUpdate_csh511_receipt"/>
<a:event name="submitsuccess" handler="onSubmitSuccess"/>
<!--<a:event name="add" handler="onAdd_csh511_receipt"/>
<a:event name="load" handler="onAdd_csh511_receipt"/>-->
<a:event name="load" handler="update_load_receipt"/>
</a:events>
</a:dataSet>
</a:dataSets>
......@@ -510,11 +677,19 @@
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds" prompt="款项用途" />
</a:box>
<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 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:fieldSet>
<!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
......
......@@ -22,6 +22,12 @@
<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"/>
<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[
//附件上传
......@@ -210,15 +216,83 @@
// }
function onAdd_csh511_receipt(ds, record) {
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 readonly_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());
}
});
// 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) {
......@@ -429,11 +503,13 @@
<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="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:events>
<!--<a:event name="update" handler="onUpdate_csh511_receipt"/>
<a:event name="add" handler="onAdd_csh511_receipt"/>
<a:event name="load" handler="onAdd_csh511_receipt"/>-->
<a:event name="add" handler="onAdd_csh511_receipt"/>-->
<a:event name="load" handler="readonly_load_receipt"/>
</a:events>
</a:dataSet>
</a:dataSets>
......@@ -494,11 +570,19 @@
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds" prompt="款项用途" readOnly="true"/>
</a:box>
<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 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:fieldSet>
<!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
......
......@@ -69,6 +69,8 @@
record.set('write_off_flag', 'DISABLED');
record.set('guarantor_name_duty',record.get('guarantor_name_duty'));
if (record.get('collection_classes') == 'DEPOSIT') {
record.set('transaction_type', 'DEPOSIT');
} else {
......@@ -116,17 +118,21 @@
}
}
//当也没变动时候,触发事件
function update_import_data(ds, record, name, value, oldvalue) {
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 extra_nam = record.get('extra_nam');
var bp_code = record.get('bp_code');
if (paid_byother_flag_desc == '是' && 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);
}
}else if (name =='bp_name'){
var bp_id = record.get('bp_id');
Leaf.request({
......@@ -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) {
if (record.get('error_message')) {
return 'background-color:#fc9492;';
......@@ -210,6 +232,7 @@
}
]]></script>
<a:dataSets>
<a:dataSet id="yes_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES">
</a:dataSet>
<a:dataSet id="paid_byother_flag_ds">
......@@ -226,6 +249,9 @@
<a:field name="attribute_4" readOnly="true"/>
<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"/>
<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="collection_classes_desc" required="true" options="collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
......@@ -255,6 +281,7 @@
<a:field name="transaction_date" datatype="date"/>
</a:fields>
<a:events>
<a:event name="load" handler="onload_import_data"/>
<a:event name="update" handler="update_import_data"/>
<a:event name="indexchange" handler="indexchange_data"/>
</a:events>
......@@ -295,7 +322,7 @@
<a:column name="extra_nam" prompt="代理店简称" width="80" editor="grid_lov"/>
<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:editors>
......
......@@ -30,6 +30,8 @@
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[
var transaction_id = '';
......@@ -265,8 +267,10 @@
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},
......@@ -274,15 +278,30 @@
success: function (res) {
var extra_name = res.result.extra_name;
record.set('extra_nam',extra_name);
if (bp_id == 1564){
record.getField('guarantor_name_duty').setReadOnly(false);
record.set('guarantor_name_duty','是');
record.getField('guarantor_name_duty').setRequired(true);
}else if(bp_id != 1564){
record.getField('guarantor_name_duty').setReadOnly(true);
record.set('guarantor_name_duty','否');
record.getField('guarantor_name_duty').setRequired(false);
}
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());
......@@ -476,6 +495,7 @@
</a:field>
<!--代理店简称-->
<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>
......@@ -638,24 +658,23 @@
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds"
prompt="款项用途"/>
</a:box>
<a:box column="2">
<a:hBox style="width:400px">
<a:textField width="350" name="description" bindTarget="csh_transaction_receipt_head_ds"/>
</a:hBox>
<!--代理店简称-->
<a:lov name="extra_nam" bindTarget="csh_transaction_receipt_head_ds"
prompt="代理店简称"/>
</a:box>
<a:box column="2">
<a:hBox style="width:800px">
<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 style="width:800px">
<!--#添加备注字段-->
<a:hBox style="width:400px">
<a:textField width="350" name="ref_v05" prompt="CSH511.CSH_TRANSACTION.STATEMENT"
bindTarget="csh_transaction_receipt_head_ds"/>
</a:hBox>
<a:textField width="300" name="ref_v05" prompt="CSH511.CSH_TRANSACTION.STATEMENT"
bindTarget="csh_transaction_receipt_head_ds"/>
<!--担保人履行担保义务-->
<a:comboBox name="guarantor_name_duty" bindTarget="csh_transaction_receipt_head_ds"
prompt="担保人履行担保义务"/>
</a:box>
prompt="担保人履行担保义务" width="180" />
</a:hBox>
</a:fieldSet>
<!--删除下面的字段 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"/>
......
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