Commit f500a28b authored by xiaochao's avatar xiaochao

[收款维护导入优化]

parent 2fe4ab47
...@@ -100,7 +100,8 @@ ...@@ -100,7 +100,8 @@
<bm:field name="paid_byother_flag"/> <bm:field name="paid_byother_flag"/>
<bm:field name="acc_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.acc_confirmed_by)" forInsert="false" forUpdate="false"/> <bm:field name="acc_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.acc_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/> <bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/>
<bm:field name="guarantor_name_duty" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GUARANTOR_NAME_DUTY" prompt="担保人履行担保义务" /> <bm:field name="guarantor_name_duty_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t1.guarantor_name_duty)" forInsert="false" forUpdate="false" prompt="担保人履行担保义务" />
<bm:field name="guarantor_name_duty" />
<bm:field name="extra_nam" expression="(Select u.unit_name From exp_org_unit_v u Where u.unit_id = (select v.unit_id from hls_bp_master v where v.enabled_flag = 'Y' and v.bp_id = t1.bp_id))" forInsert="false" forUpdate="false"/> <bm:field name="extra_nam" expression="(Select u.unit_name From exp_org_unit_v u Where u.unit_id = (select v.unit_id from hls_bp_master v where v.enabled_flag = 'Y' and v.bp_id = t1.bp_id))" forInsert="false" forUpdate="false"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
......
...@@ -70,13 +70,8 @@ ...@@ -70,13 +70,8 @@
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, (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 t.guarantor_name_duty,
(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 decode(t.guarantor_name_duty,'Y','是','N','否') guarantor_name_duty_desc
then
'是'
else
'否'
end) as guarantor_name_duty
FROM fnd_interface_headers hd, FROM fnd_interface_headers hd,
fnd_interface_lines li, fnd_interface_lines li,
csh_transaction_import_temp t csh_transaction_import_temp t
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
update csh_transaction_import_temp ct update csh_transaction_import_temp ct
set ct.bp_id=${@bp_id}, set ct.bp_id=${@bp_id},
ct.paid_byother_flag=${@paid_byother_flag}, ct.paid_byother_flag=${@paid_byother_flag},
ct.collection_classes=${@collection_classes} ct.collection_classes=${@collection_classes},
ct.guarantor_name_duty=${@guarantor_name_duty}
where ct.temp_id=${@temp_id}; where ct.temp_id=${@temp_id};
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
......
...@@ -99,6 +99,9 @@ ...@@ -99,6 +99,9 @@
<bm:field name="bp_virtual_bank_account"/> <bm:field name="bp_virtual_bank_account"/>
<bm:field name="paid_byother_flag_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'PAID_BYOTHER_FLAG' and v.code_value =t1.paid_byother_flag)" forInsert="false" forUpdate="false" prompt="代付字段"/> <bm:field name="paid_byother_flag_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'PAID_BYOTHER_FLAG' and v.code_value =t1.paid_byother_flag)" forInsert="false" forUpdate="false" prompt="代付字段"/>
<bm:field name="paid_byother_flag" /> <bm:field name="paid_byother_flag" />
<bm:field name="guarantor_name_duty_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t1.guarantor_name_duty)" forInsert="false" forUpdate="false" prompt="担保人履行担保义务" />
<bm:field name="guarantor_name_duty" />
</bm:fields> </bm:fields>
<bm:features> <bm:features>
......
...@@ -221,15 +221,17 @@ ...@@ -221,15 +221,17 @@
var bp_code = record.get('bp_code'); var bp_code = record.get('bp_code');
if (bp_code == 'C00010168'){ if (bp_code == 'C00010168'){
record.getField('guarantor_name_duty').setReadOnly(false); record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty','是'); record.set('guarantor_name_duty_desc','是');
record.getField('guarantor_name_duty').setRequired(true); record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if (bp_code != 'C00010168'){ }else if (bp_code != 'C00010168'){
record.getField('guarantor_name_duty').setReadOnly(true); record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty','否'); record.set('guarantor_name_duty_desc','否');
record.getField('guarantor_name_duty').setRequired(false); record.set('guarantor_name_duty','N');
record.getField('guarantor_name_duty_desc').setRequired(false);
} }
}else if (name =='bp_name'){ }else if (name =='bp_code'){
var bp_id = record.get('bp_id'); var bp_id = record.get('bp_id');
Leaf.request({ Leaf.request({
url: $('extra_nam_csh_transaction_receipt_data_link_id').getUrl(), url: $('extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
...@@ -257,13 +259,15 @@ ...@@ -257,13 +259,15 @@
success: function (res) { success: function (res) {
var unit_code = res.result.unit_code; var unit_code = res.result.unit_code;
if (unit_code == 241){ if (unit_code == 241){
record.getField('guarantor_name_duty').setReadOnly(false); record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty','是'); record.set('guarantor_name_duty_desc','是');
record.getField('guarantor_name_duty').setRequired(true); record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(unit_code != 241){ }else if(unit_code != 241){
record.getField('guarantor_name_duty').setReadOnly(true); record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty','否'); record.set('guarantor_name_duty_desc','否');
record.getField('guarantor_name_duty').setRequired(false); record.set('guarantor_name_duty','N');
record.getField('guarantor_name_duty_desc').setRequired(false);
} }
}, },
failure: function () { failure: function () {
...@@ -446,13 +450,15 @@ ...@@ -446,13 +450,15 @@
success: function (res) { success: function (res) {
var unit_code = res.result.unit_code; var unit_code = res.result.unit_code;
if (unit_code == 241){ if (unit_code == 241){
record.getField('guarantor_name_duty').setReadOnly(false); record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty','是'); // record.set('guarantor_name_duty_desc','是');
record.getField('guarantor_name_duty').setRequired(true); // record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(unit_code != 241){ }else if(unit_code != 241){
record.getField('guarantor_name_duty').setReadOnly(true); record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty','否'); // record.set('guarantor_name_duty_desc','否');
record.getField('guarantor_name_duty').setRequired(false); // record.set('guarantor_name_duty','N');
record.getField('guarantor_name_duty_desc').setRequired(false);
} }
}, },
failure: function () { failure: function () {
...@@ -518,6 +524,7 @@ ...@@ -518,6 +524,7 @@
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovLabelWidth="90" lovService="basic.hls_bp_master_v_for_lov" lovWidth="550" title="HLS.BP_TITLE"> <a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovLabelWidth="90" lovService="basic.hls_bp_master_v_for_lov" lovWidth="550" title="HLS.BP_TITLE">
<a:mapping> <a:mapping>
<a:map from="bp_id" to="bp_id"/> <a:map from="bp_id" to="bp_id"/>
<a:map from="bp_code" to="bp_code"/>
<a:map from="bp_name" to="bp_name"/> <a:map from="bp_name" to="bp_name"/>
<a:map from="bp_name" to="csh_bp_name"/> <a:map from="bp_name" to="csh_bp_name"/>
<a:map from="bp_category" to="bp_category"/> <a:map from="bp_category" to="bp_category"/>
...@@ -608,8 +615,8 @@ ...@@ -608,8 +615,8 @@
</a:field> </a:field>
<!--担保人履行担保义务--> <!--担保人履行担保义务-->
<a:field name="guarantor_name_duty" displayField="code_value_name" options="yes_no_ds" prompt="担保人履行担保义务" returnField="exist_flag" valueField="code_value"/> <a:field name="guarantor_name_duty_desc" displayField="code_value_name" options="yes_no_ds" prompt="担保人履行担保义务" returnField="guarantor_name_duty" valueField="code_value"/>
<a:field name="guarantor_name_duty" required="true"/>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="onUpdate_csh511_receipt"/> <a:event name="update" handler="onUpdate_csh511_receipt"/>
...@@ -688,8 +695,9 @@ ...@@ -688,8 +695,9 @@
<a:textField width="300" 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" <a:comboBox name="guarantor_name_duty_desc" bindTarget="csh_transaction_receipt_head_ds"
prompt="担保人履行担保义务" width="180" /> prompt="担保人履行担保义务" width="180" />
<a:column name="guarantor_name_duty" hidden="true"/>
</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-->
......
...@@ -760,7 +760,7 @@ ...@@ -760,7 +760,7 @@
<a:column name="collection_classes_desc" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS" align="center"/> <a:column name="collection_classes_desc" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS" align="center"/>
<a:column name="bp_name" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER" align="center"/> <a:column name="bp_name" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER" align="center"/>
<a:column name="extra_nam" prompt="代理店简称" align="center"/> <a:column name="extra_nam" prompt="代理店简称" align="center"/>
<a:column name="guarantor_name_duty" prompt="担保人履行担保义务" align="center"/> <a:column name="guarantor_name_duty_desc" prompt="担保人履行担保义务" align="center"/>
<a:column name="bank_slip_num" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" align="center"/> <a:column name="bank_slip_num" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" align="center"/>
<a:column name="description" prompt="CSH510.CSH_TRANSACTION.DESCRIPTION" align="center"/> <a:column name="description" prompt="CSH510.CSH_TRANSACTION.DESCRIPTION" align="center"/>
<a:column name="confirmed_flag_desc" prompt="单据审批状态" align="center"/> <a:column name="confirmed_flag_desc" prompt="单据审批状态" align="center"/>
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,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[
//导出 //导出
// window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { // window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
...@@ -71,6 +73,7 @@ ...@@ -71,6 +73,7 @@
record.set('guarantor_name_duty',record.get('guarantor_name_duty')); 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 {
...@@ -120,21 +123,24 @@ ...@@ -120,21 +123,24 @@
//当也没变动时候,触发事件 //当也没变动时候,触发事件
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'){
var paid_byother_flag = record.get('paid_byother_flag'); var paid_byother_flag = record.get('paid_byother_flag');
var paid_byother_flag_desc = record.get('paid_byother_flag_desc');
//深圳美鹏 //深圳美鹏
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 == 'T' && bp_code == 'C00010168'){
record.set('guarantor_name_duty','是'); record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty').setReadOnly(false); record.set('guarantor_name_duty_desc','是');
record.getField('guarantor_name_duty_desc').setReadOnly(false);
}else{ }else{
record.set('guarantor_name_duty','否'); record.set('guarantor_name_duty_desc','否');
record.getField('guarantor_name_duty').setReadOnly(true); record.set('guarantor_name_duty','N');
record.getField('guarantor_name_duty_desc').setReadOnly(true);
} }
}else if (name =='bp_name'){ }else if (name == 'bp_name_code'){
var bp_id = record.get('bp_id'); var bp_id = record.get('bp_id');
var paid_byother_flag = record.get('paid_byother_flag');
Leaf.request({ Leaf.request({
url: $('extra_nam_csh_transaction_receipt_data_link_id').getUrl(), url: $('extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : bp_id}, para: {bp_id : bp_id},
...@@ -151,6 +157,38 @@ ...@@ -151,6 +157,38 @@
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);
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;
// alert(paid_byother_flag);
if (unit_code == 241 && paid_byother_flag == null){
record.set('bp_code','C00010168');
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc','否');
record.set('guarantor_name_duty','N');
}else if (unit_code == 241 && paid_byother_flag == 'T'){
record.set('bp_code','C00010168');
record.set('guarantor_name_duty','Y');
record.set('guarantor_name_duty_desc','是');
record.getField('guarantor_name_duty_desc').setReadOnly(false);
}else {
record.set('bp_code','C00010000');
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc','否');
record.set('guarantor_name_duty','N');
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
}, },
failure: function () { failure: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
...@@ -168,6 +206,32 @@ ...@@ -168,6 +206,32 @@
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
} }
}); });
}else if (name == 'extra_nam'){
var bp_id = record.get('bp_id');
var paid_byother_flag = record.get('paid_byother_flag');
Leaf.request({
url: $('get_extra_code_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : bp_id},
scope: this,
success: function (res) {
var unit_code = res.result.unit_code;
if (unit_code == 241 && paid_byother_flag == 'T'){
record.set('guarantor_name_duty','Y');
record.set('guarantor_name_duty_desc','是');
record.getField('guarantor_name_duty_desc').setReadOnly(false);
}else{
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc','否');
record.set('guarantor_name_duty','N');
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
} }
} }
//页面加载时触发事件 //页面加载时触发事件
...@@ -179,11 +243,13 @@ ...@@ -179,11 +243,13 @@
var paid_byother_flag = record.get('paid_byother_flag'); var paid_byother_flag = record.get('paid_byother_flag');
record.getField('extra_nam').setRequired(true); record.getField('extra_nam').setRequired(true);
if (paid_byother_flag == 'T' && bp_code == 'C00010168'){ if (paid_byother_flag == 'T' && bp_code == 'C00010168'){
record.set('guarantor_name_duty','是'); record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty').setReadOnly(false); record.set('guarantor_name_duty_desc','是');
record.getField('guarantor_name_duty_desc').setReadOnly(false);
}else{ }else{
record.set('guarantor_name_duty','否'); record.set('guarantor_name_duty','N');
record.getField('guarantor_name_duty').setReadOnly(true); record.set('guarantor_name_duty_desc','否');
record.getField('guarantor_name_duty_desc').setReadOnly(true);
} }
} }
} }
...@@ -211,6 +277,7 @@ ...@@ -211,6 +277,7 @@
'bp_id': records[i].get('bp_id'), 'bp_id': records[i].get('bp_id'),
'paid_byother_flag': records[i].get('paid_byother_flag'), 'paid_byother_flag': records[i].get('paid_byother_flag'),
'collection_classes': records[i].get('collection_classes'), 'collection_classes': records[i].get('collection_classes'),
'guarantor_name_duty': records[i].get('guarantor_name_duty'),
'temp_id': records[i].get('temp_id'), 'temp_id': records[i].get('temp_id'),
'_status': 'update' '_status': 'update'
}); });
...@@ -250,8 +317,8 @@ ...@@ -250,8 +317,8 @@
<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="guarantor_name_duty_desc" displayField="code_value_name" options="yes_no_ds" prompt="担保人履行担保义务" returnField="guarantor_name_duty" valueField="code_value"/>
<a:field name="guarantor_name_duty" required="true"/>
<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"/>
...@@ -260,6 +327,7 @@ ...@@ -260,6 +327,7 @@
lovService="basic.hls_bp_master_v_for_lov" lovWidth="550" title="HLS.BP_TITLE"> lovService="basic.hls_bp_master_v_for_lov" lovWidth="550" title="HLS.BP_TITLE">
<a:mapping> <a:mapping>
<a:map from="bp_id" to="bp_id"/> <a:map from="bp_id" to="bp_id"/>
<a:map from="bp_code" to="bp_name_code"/>
<a:map from="bp_name" to="bp_name"/> <a:map from="bp_name" to="bp_name"/>
<a:map from="bp_name" to="csh_bp_name"/> <a:map from="bp_name" to="csh_bp_name"/>
<a:map from="bp_category" to="bp_category"/> <a:map from="bp_category" to="bp_category"/>
...@@ -322,7 +390,7 @@ ...@@ -322,7 +390,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" editor="grid_cb"/> <a:column name="guarantor_name_duty_desc" prompt="担保人履行担保义务" width="80" editor="grid_cb"/>
</a:columns> </a:columns>
<a:editors> <a:editors>
......
...@@ -250,15 +250,17 @@ ...@@ -250,15 +250,17 @@
// var extra_nam = record.get('extra_nam'); // var extra_nam = record.get('extra_nam');
var bp_code = record.get('bp_code'); var bp_code = record.get('bp_code');
if (bp_code == 'C00010168'){ if (bp_code == 'C00010168'){
record.getField('guarantor_name_duty').setReadOnly(false); record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty','是'); record.set('guarantor_name_duty_desc','是');
record.getField('guarantor_name_duty').setRequired(true); record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if (bp_code != 'C00010168'){ }else if (bp_code != 'C00010168'){
record.getField('guarantor_name_duty').setReadOnly(true); record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty','否'); record.set('guarantor_name_duty_desc','否');
record.getField('guarantor_name_duty').setRequired(false); record.set('guarantor_name_duty','N');
record.getField('guarantor_name_duty_desc').setRequired(false);
} }
}else if (name =='bp_name'){ }
var bp_id = record.get('bp_id'); var bp_id = record.get('bp_id');
Leaf.request({ Leaf.request({
url: $('extra_nam_csh_transaction_receipt_data_link_id').getUrl(), url: $('extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
...@@ -286,13 +288,15 @@ ...@@ -286,13 +288,15 @@
success: function (res) { success: function (res) {
var unit_code = res.result.unit_code; var unit_code = res.result.unit_code;
if (unit_code == 241){ if (unit_code == 241){
record.getField('guarantor_name_duty').setReadOnly(false); record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty','是'); record.set('guarantor_name_duty_desc','是');
record.getField('guarantor_name_duty').setRequired(true); record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(unit_code != 241){ }else if(unit_code != 241){
record.getField('guarantor_name_duty').setReadOnly(true); record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty','否'); record.set('guarantor_name_duty_desc','否');
record.getField('guarantor_name_duty').setRequired(false); record.set('guarantor_name_duty','N');
record.getField('guarantor_name_duty_desc').setRequired(false);
} }
}, },
failure: function () { failure: function () {
...@@ -319,9 +323,7 @@ ...@@ -319,9 +323,7 @@
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
} }
}); });
}
} }
// function onAdd_csh511_receipt(ds, record) { // function onAdd_csh511_receipt(ds, record) {
// record.set('precision',2); // record.set('precision',2);
// record.set('zero_amounts_allowed','N'); // record.set('zero_amounts_allowed','N');
...@@ -332,8 +334,6 @@ ...@@ -332,8 +334,6 @@
// record.set('currency_code','CNY'); // record.set('currency_code','CNY');
// record.set('currency_name','人民币'); // record.set('currency_name','人民币');
// } // }
function onAdd_csh511_receipt(ds, record) { function onAdd_csh511_receipt(ds, record) {
record.set('precision', 2); record.set('precision', 2);
record.set('zero_amounts_allowed', 'N'); record.set('zero_amounts_allowed', 'N');
...@@ -344,8 +344,9 @@ ...@@ -344,8 +344,9 @@
record.set('currency_code', 'CNY'); record.set('currency_code', 'CNY');
record.set('currency_name', '人民币'); record.set('currency_name', '人民币');
record.getField('guarantor_name_duty').setReadOnly(true); record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty','否'); record.set('guarantor_name_duty_desc','否');
record.set('guarantor_name_duty','N');
} }
...@@ -493,6 +494,8 @@ ...@@ -493,6 +494,8 @@
<a:map from="bp_category_name" to="bp_category_display"/> <a:map from="bp_category_name" to="bp_category_display"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="bp_id"/>
<!--代理店简称--> <!--代理店简称-->
<a:field name="bp_code"/> <a:field name="bp_code"/>
<a:field name="extra_id"/> <a:field name="extra_id"/>
...@@ -505,8 +508,8 @@ ...@@ -505,8 +508,8 @@
</a:field> </a:field>
<!--担保人履行担保义务--> <!--担保人履行担保义务-->
<a:field name="guarantor_name_duty" displayField="code_value_name" options="yes_no_ds" prompt="担保人履行担保义务" returnField="exist_flag" valueField="code_value"/> <a:field name="guarantor_name_duty_desc" displayField="code_value_name" options="yes_no_ds" prompt="担保人履行担保义务" returnField="guarantor_name_duty" valueField="code_value"/>
<a:field name="guarantor_name_duty" required="true"/>
<!-- <a:field name="bank_slip_num" lovGridHeight="350" lovHeight="600" lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="1200" title="合同编号"> <!-- <a:field name="bank_slip_num" lovGridHeight="350" lovHeight="600" lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="1200" title="合同编号">
<a:mapping> <a:mapping>
...@@ -672,7 +675,7 @@ ...@@ -672,7 +675,7 @@
<a:textField width="300" name="ref_v05" prompt="CSH511.CSH_TRANSACTION.STATEMENT" <a:textField width="300" name="ref_v05" prompt="CSH511.CSH_TRANSACTION.STATEMENT"
bindTarget="csh_transaction_receipt_head_ds"/> bindTarget="csh_transaction_receipt_head_ds"/>
<!--担保人履行担保义务--> <!--担保人履行担保义务-->
<a:comboBox name="guarantor_name_duty" bindTarget="csh_transaction_receipt_head_ds" <a:comboBox name="guarantor_name_duty_desc" bindTarget="csh_transaction_receipt_head_ds"
prompt="担保人履行担保义务" width="180" /> prompt="担保人履行担保义务" width="180" />
</a:hBox> </a:hBox>
</a:fieldSet> </a:fieldSet>
......
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