Commit 168e4f68 authored by xiaochao's avatar xiaochao

Merge branch 'feature/付款申请审批记录打印' into develop

parents 87a2c6a2 eeb9fe55
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
} }
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') != ''){ if (record.get('guarantor_name_duty') != 'Y'){
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>';
} }
} }
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
} }
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') != ''){ if (record.get('guarantor_name_duty') != 'Y'){
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>';
} }
} }
......
...@@ -215,23 +215,25 @@ ...@@ -215,23 +215,25 @@
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'){ }
//深圳美鹏 // else if(name == 'extra_nam'){
// var extra_nam = record.get('extra_nam'); // //深圳美鹏
var bp_code = record.get('bp_code'); // // var extra_nam = record.get('extra_nam');
// var bp_code = record.get('bp_code');
if (bp_code == 'C00010168'){ //
record.getField('guarantor_name_duty_desc').setReadOnly(false); // if (bp_code == 'C00010168'){
record.set('guarantor_name_duty_desc','是'); // record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty','Y'); // record.set('guarantor_name_duty_desc','6666');
record.getField('guarantor_name_duty_desc').setRequired(true); // record.set('guarantor_name_duty','Y');
}else if (bp_code != 'C00010168'){ // record.getField('guarantor_name_duty_desc').setRequired(true);
record.getField('guarantor_name_duty_desc').setReadOnly(true); // }else if (bp_code != 'C00010168'){
record.set('guarantor_name_duty_desc','否'); // record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty','N'); // record.set('guarantor_name_duty_desc','4444');
record.getField('guarantor_name_duty_desc').setRequired(false); // record.set('guarantor_name_duty','N');
} // record.getField('guarantor_name_duty_desc').setRequired(false);
}else if (name =='bp_code'){ // }
// }
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(),
...@@ -258,12 +260,19 @@ ...@@ -258,12 +260,19 @@
scope: this, scope: this,
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 || unit_code == 610){
record.getField('guarantor_name_duty_desc').setReadOnly(false); if(record.get('paid_byother_flag') == 'T'){
record.set('guarantor_name_duty_desc','是'); record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty','Y'); record.set('guarantor_name_duty_desc', '是');
record.getField('guarantor_name_duty_desc').setRequired(true); record.set('guarantor_name_duty', 'Y');
}else if(unit_code != 241){ record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(record.get('paid_byother_flag') == 'F'){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
}else if(unit_code != 241 || unit_code != 610){
record.getField('guarantor_name_duty_desc').setReadOnly(true); record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc','否'); record.set('guarantor_name_duty_desc','否');
record.set('guarantor_name_duty','N'); record.set('guarantor_name_duty','N');
...@@ -294,6 +303,48 @@ ...@@ -294,6 +303,48 @@
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
} }
}); });
}else if(name == 'paid_byother_flag'){
if(record.get('paid_byother_flag') =='T'){
var extra_id = record.get('bp_id');
if (extra_id != null){
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 || unit_code == 610) {
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc', '是');
record.set('guarantor_name_duty', 'Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
} else if (unit_code != 241 || unit_code != 610) {
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
}else {
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc', '是');
record.set('guarantor_name_duty', 'Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}
}else if(record.get('paid_byother_flag') =='F'){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
} }
} }
...@@ -449,12 +500,12 @@ ...@@ -449,12 +500,12 @@
scope: this, scope: this,
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 || unit_code == 610){
record.getField('guarantor_name_duty_desc').setReadOnly(false); record.getField('guarantor_name_duty_desc').setReadOnly(false);
// record.set('guarantor_name_duty_desc','是'); // record.set('guarantor_name_duty_desc','是');
// record.set('guarantor_name_duty','Y'); // record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty_desc').setRequired(true); record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(unit_code != 241){ }else if(unit_code != 241 || unit_code != 610){
record.getField('guarantor_name_duty_desc').setReadOnly(true); record.getField('guarantor_name_duty_desc').setReadOnly(true);
// record.set('guarantor_name_duty_desc','否'); // record.set('guarantor_name_duty_desc','否');
// record.set('guarantor_name_duty','N'); // record.set('guarantor_name_duty','N');
...@@ -615,8 +666,10 @@ ...@@ -615,8 +666,10 @@
</a:field> </a:field>
<!--担保人履行担保义务--> <!--担保人履行担保义务-->
<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_desc" displayField="code_value_name"
<a:field name="guarantor_name_duty" required="true"/> 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"/>
...@@ -697,7 +750,7 @@ ...@@ -697,7 +750,7 @@
<!--担保人履行担保义务--> <!--担保人履行担保义务-->
<a:comboBox name="guarantor_name_duty_desc" 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: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-->
......
...@@ -229,7 +229,6 @@ ...@@ -229,7 +229,6 @@
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){
//查询代理点得简称 //查询代理点得简称
...@@ -247,14 +246,14 @@ ...@@ -247,14 +246,14 @@
scope: this, scope: this,
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 || unit_code == 610){
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','是');
record.getField('guarantor_name_duty').setRequired(true); // record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(unit_code != 241){ }else if(unit_code != 241 || unit_code != 610){
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','否');
record.getField('guarantor_name_duty').setRequired(false); // record.getField('guarantor_name_duty_desc').setRequired(false);
} }
}, },
failure: function () { failure: function () {
...@@ -504,7 +503,7 @@ ...@@ -504,7 +503,7 @@
<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="extra_nam"/>
<a:field name="guarantor_name_duty"/> <a:field name="guarantor_name_duty_desc"/>
</a:fields> </a:fields>
<a:events> <a:events>
<!--<a:event name="update" handler="onUpdate_csh511_receipt"/> <!--<a:event name="update" handler="onUpdate_csh511_receipt"/>
...@@ -581,7 +580,7 @@ ...@@ -581,7 +580,7 @@
<a:textField width="300" 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" <a:comboBox name="guarantor_name_duty_desc" bindTarget="csh_transaction_receipt_head_ds"
prompt="担保人履行担保义务" readOnly="true" width="180" /> prompt="担保人履行担保义务" readOnly="true" width="180" />
</a:hBox> </a:hBox>
</a:fieldSet> </a:fieldSet>
......
...@@ -245,57 +245,67 @@ ...@@ -245,57 +245,67 @@
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_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc','是');
record.set('guarantor_name_duty','Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if (bp_code != 'C00010168'){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc','否');
record.set('guarantor_name_duty','N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
} }
// else if(name == 'extra_nam'){
// //深圳美鹏
// // var extra_nam = record.get('extra_nam');
// var bp_code = record.get('bp_code');
// //bp_code == 'C00010168'
// if (bp_code == 'D00010001' || bp_code == 'D00000009'){
// record.getField('guarantor_name_duty_desc').setReadOnly(false);
// record.set('guarantor_name_duty_desc','是');
// record.set('guarantor_name_duty','Y');
// record.getField('guarantor_name_duty_desc').setRequired(true);
// }else if (bp_code != 'D00010001' || bp_code == 'D00000009'){
// record.getField('guarantor_name_duty_desc').setReadOnly(true);
// record.set('guarantor_name_duty_desc','否');
// record.set('guarantor_name_duty','N');
// record.getField('guarantor_name_duty_desc').setRequired(false);
// }
// }
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(),
para: {bp_id : bp_id}, para: {bp_id: bp_id},
scope: this, scope: this,
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},
scope: this, scope: this,
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; var extra_id = bp_id;
Leaf.request({ Leaf.request({
url: $('get_extra_code_csh_transaction_receipt_data_link_id').getUrl(), url: $('get_extra_code_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id : extra_id}, para: {bp_id: extra_id},
scope: this, scope: this,
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 || unit_code == 610) {
record.getField('guarantor_name_duty_desc').setReadOnly(false); if(record.get('paid_byother_flag') == 'T'){
record.set('guarantor_name_duty_desc','是'); record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty','Y'); record.set('guarantor_name_duty_desc', '是');
record.getField('guarantor_name_duty_desc').setRequired(true); record.set('guarantor_name_duty', 'Y');
}else if(unit_code != 241){ record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(record.get('paid_byother_flag') == 'F'){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
} else if (unit_code != 241 || unit_code != 610) {
record.getField('guarantor_name_duty_desc').setReadOnly(true); record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc','否'); record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty','N'); record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false); record.getField('guarantor_name_duty_desc').setRequired(false);
} }
}, },
...@@ -323,6 +333,48 @@ ...@@ -323,6 +333,48 @@
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
} }
}); });
}else if(name == 'paid_byother_flag'){
if(record.get('paid_byother_flag') =='T'){
var extra_id = record.get('bp_id');
if (extra_id != null){
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 || unit_code == 610) {
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc', '是');
record.set('guarantor_name_duty', 'Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
} else if (unit_code != 241 || unit_code != 610) {
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
}else {
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc', '是');
record.set('guarantor_name_duty', 'Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}
}else if(record.get('paid_byother_flag') =='F'){
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
}
} }
// function onAdd_csh511_receipt(ds, record) { // function onAdd_csh511_receipt(ds, record) {
// record.set('precision',2); // record.set('precision',2);
...@@ -489,6 +541,7 @@ ...@@ -489,6 +541,7 @@
<a:mapping> <a:mapping>
<a:map from="bp_id" to="bp_id"/> <a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/> <a:map from="bp_name" to="bp_name"/>
<a:map from="bp_code" to="bp_code"/>
<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"/>
<a:map from="bp_category_name" to="bp_category_display"/> <a:map from="bp_category_name" to="bp_category_display"/>
......
...@@ -80,30 +80,14 @@ ...@@ -80,30 +80,14 @@
var record1 = new Leaf.Record({ var record1 = new Leaf.Record({
'address_type': 'HOUSEHOLD_ADDRESS', 'address_type': 'HOUSEHOLD_ADDRESS',
'address_type_n': '户籍地址', 'address_type_n': '户籍地址',
'country_id': 37, 'country_id': 32,
'country_id_n': '中华人民共和国', 'country_id_n': '中华人民共和国'
'province_id': 0,
'province_id_n': '',
'city_id': 0,
'city_id_n': '',
'district_id': 0,
'district_id_n': '',
'address': ' ',
'phone': ' '
}); });
var record2 = new Leaf.Record({ var record2 = new Leaf.Record({
'address_type': 'POSTAL_ADDRESS', 'address_type': 'POSTAL_ADDRESS',
'address_type_n': '通讯地址', 'address_type_n': '通讯地址',
'country_id': 37, 'country_id': 32,
'country_id_n': '中华人民共和国', 'country_id_n': '中华人民共和国'
'province_id': 0,
'province_id_n': '',
'city_id': 0,
'city_id_n': '',
'district_id': 0,
'district_id_n': '',
'address': ' ',
'phone': ' '
}); });
address_ds_id_ds.add(record1); address_ds_id_ds.add(record1);
address_ds_id_ds.add(record2); address_ds_id_ds.add(record2);
...@@ -122,16 +106,8 @@ ...@@ -122,16 +106,8 @@
var record2 = new Leaf.Record({ var record2 = new Leaf.Record({
'address_type': 'POSTAL_ADDRESS', 'address_type': 'POSTAL_ADDRESS',
'address_type_n': '通讯地址', 'address_type_n': '通讯地址',
'country_id': 37, 'country_id': 32,
'country_id_n': '中华人民共和国', 'country_id_n': '中华人民共和国'
'province_id': 0,
'province_id_n': '',
'city_id': 0,
'city_id_n': '',
'district_id': 0,
'district_id_n': '',
'address': ' ',
'phone': ' '
}); });
address_ds_id_ds.add(record2); address_ds_id_ds.add(record2);
......
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