Commit baa1c4ca authored by xiaochao's avatar xiaochao

【收款维护限制验证调整】

parent 168e4f68
...@@ -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') != 'Y'){ if (record.get('guarantor_name_duty') != 'Y' || record.get('guarantor_name_duty') != 'NULL'){
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') != 'Y'){ if (record.get('guarantor_name_duty') != 'Y' || record.get('guarantor_name_duty') != 'NULL'){
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>';
} }
} }
......
...@@ -274,8 +274,8 @@ ...@@ -274,8 +274,8 @@
} }
}else if(unit_code != 241 || unit_code != 610){ }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','NULL');
record.getField('guarantor_name_duty_desc').setRequired(false); record.getField('guarantor_name_duty_desc').setRequired(false);
} }
}, },
...@@ -320,8 +320,8 @@ ...@@ -320,8 +320,8 @@
record.getField('guarantor_name_duty_desc').setRequired(true); record.getField('guarantor_name_duty_desc').setRequired(true);
} else if (unit_code != 241 || unit_code != 610) { } 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', 'NULL');
record.getField('guarantor_name_duty_desc').setRequired(false); record.getField('guarantor_name_duty_desc').setRequired(false);
} }
}, },
...@@ -340,10 +340,39 @@ ...@@ -340,10 +340,39 @@
} }
}else if(record.get('paid_byother_flag') =='F'){ }else if(record.get('paid_byother_flag') =='F'){
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(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);
} 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', 'NULL');
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(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
record.getField('guarantor_name_duty_desc').setRequired(false);
}
} }
} }
} }
......
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
var paid_byother_flag = record.get('paid_byother_flag'); var paid_byother_flag = record.get('paid_byother_flag');
//深圳美鹏 //深圳美鹏
var bp_code = record.get('bp_code'); var bp_code = record.get('bp_code');
//dev环境下的深圳美鹏的code bp_code == 'C00010168' //dev环境下的深圳美鹏的code bp_code == 'C00010168'
//uat 和生产环境下深圳美鹏的code D00010001 D00000009 //uat 和生产环境下深圳美鹏的code D00010001 D00000009
if (paid_byother_flag == 'T'){ if (paid_byother_flag == 'T'){
...@@ -135,19 +136,25 @@ ...@@ -135,19 +136,25 @@
record.set('guarantor_name_duty','Y'); record.set('guarantor_name_duty','Y');
record.set('guarantor_name_duty_desc','是'); record.set('guarantor_name_duty_desc','是');
record.getField('guarantor_name_duty_desc').setReadOnly(false); record.getField('guarantor_name_duty_desc').setReadOnly(false);
}else { }else if (bp_code == 'C00010168'){
record.set('guarantor_name_duty_desc','否');
record.set('guarantor_name_duty','N');
record.getField('guarantor_name_duty_desc').setReadOnly(true);
}
}else if (paid_byother_flag == 'T' && bp_code == 'C00010168'){
record.set('guarantor_name_duty','Y'); record.set('guarantor_name_duty','Y');
record.set('guarantor_name_duty_desc','是'); record.set('guarantor_name_duty_desc','是');
record.getField('guarantor_name_duty_desc').setReadOnly(false); record.getField('guarantor_name_duty_desc').setReadOnly(false);
}else {
record.set('guarantor_name_duty_desc',' ');
record.set('guarantor_name_duty','NULL');
record.getField('guarantor_name_duty_desc').setReadOnly(true);
}
}else{ }else{
if (bp_code == 'D00010001' || bp_code == 'D00000009' || bp_code == 'C00010168'){
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').setReadOnly(true); record.getField('guarantor_name_duty_desc').setReadOnly(true);
}else{
record.set('guarantor_name_duty_desc','');
record.set('guarantor_name_duty','NULL');
record.getField('guarantor_name_duty_desc').setReadOnly(true);
}
} }
}else if (name == 'bp_name_code'){ }else if (name == 'bp_name_code'){
...@@ -176,46 +183,52 @@ ...@@ -176,46 +183,52 @@
scope: this, scope: this,
success: function (res) { success: function (res) {
var unit_code = res.result.unit_code; var unit_code = res.result.unit_code;
// alert(paid_byother_flag); // alert(unit_code);
if (unit_code == 241 || unit_code == 610){ if (unit_code == 241 || unit_code == 610){
if (paid_byother_flag == null){ if (paid_byother_flag == null){
//dev环境code --- C00010168 //dev环境code --- C00010168(每次部署uat或者生产,需要将下面代码注释)
record.set('bp_code','C00010168'); // record.set('bp_code','C00010168');
//uat和生产有两个深圳美鹏code
// if (unit_code == 241){
// record.set('bp_code','D00010001');
// }else if (unit_code == 610){
// record.set('bp_code','D00000009');
// }
//uat和生产有两个深圳美鹏code(每次部署uat或者生产,需求解除下面代码注释)
if (unit_code == 241){
record.set('bp_code','D00010001');
}else if (unit_code == 610){
record.set('bp_code','D00000009');
}
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');
}else { }else if (paid_byother_flag == 'T'){
record.set('bp_code','C00000000'); //dev环境code --- C00010168(每次部署uat或者生产,需要将下面代码注释)
record.getField('guarantor_name_duty_desc').setReadOnly(true); // record.set('bp_code','C00010168');
record.set('guarantor_name_duty_desc','否');
record.set('guarantor_name_duty','N');
}
}else if (unit_code == 241 || unit_code == 610){
if (paid_byother_flag == 'T'){
//dev环境code --- C00010168
record.set('bp_code','C00010168');
//uat和生产有两个深圳美鹏code
// if (unit_code == 241){
// record.set('bp_code','D00010001');
// }else if (unit_code == 610){
// record.set('bp_code','D00000009');
// }
//uat和生产有两个深圳美鹏code(每次部署uat或者生产,需求解除下面代码注释)
if (unit_code == 241){
record.set('bp_code','D00010001');
}else if (unit_code == 610){
record.set('bp_code','D00000009');
}
record.set('guarantor_name_duty','Y'); record.set('guarantor_name_duty','Y');
record.set('guarantor_name_duty_desc','是'); record.set('guarantor_name_duty_desc','是');
record.getField('guarantor_name_duty_desc').setReadOnly(false); record.getField('guarantor_name_duty_desc').setReadOnly(false);
}else { }else {
//默认值 //dev环境code --- C00010168(每次部署uat或者生产,需要将下面代码注释)
// if (unit_code == 241 || unit_code == 610){
// record.set('bp_code','C00010168');
// }else{
// record.set('bp_code','C00000000');
// }
//uat和生产有两个深圳美鹏code(每次部署uat或者生产,需求解除下面代码注释)
if (unit_code == 241){
record.set('bp_code','D00010001');
}else if (unit_code == 610){
record.set('bp_code','D00000009');
}else{
record.set('bp_code','C00000000'); record.set('bp_code','C00000000');
}
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');
...@@ -223,8 +236,8 @@ ...@@ -223,8 +236,8 @@
}else { }else {
record.set('bp_code','C00000000'); record.set('bp_code','C00000000');
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','NULL');
} }
}, },
failure: function () { failure: function () {
...@@ -306,7 +319,8 @@ ...@@ -306,7 +319,8 @@
record.set('guarantor_name_duty_desc','否'); record.set('guarantor_name_duty_desc','否');
record.getField('guarantor_name_duty_desc').setReadOnly(true); record.getField('guarantor_name_duty_desc').setReadOnly(true);
} }
}else if(paid_byother_flag == 'T' && bp_code == 'C00010168'){ }else if(bp_code == 'C00010168'){
if (paid_byother_flag == 'T'){
record.set('guarantor_name_duty','Y'); record.set('guarantor_name_duty','Y');
record.set('guarantor_name_duty_desc','是'); record.set('guarantor_name_duty_desc','是');
record.getField('guarantor_name_duty_desc').setReadOnly(false); record.getField('guarantor_name_duty_desc').setReadOnly(false);
...@@ -315,6 +329,11 @@ ...@@ -315,6 +329,11 @@
record.set('guarantor_name_duty_desc','否'); record.set('guarantor_name_duty_desc','否');
record.getField('guarantor_name_duty_desc').setReadOnly(true); record.getField('guarantor_name_duty_desc').setReadOnly(true);
} }
}else{
record.set('guarantor_name_duty','NULL');
record.set('guarantor_name_duty_desc',' ');
record.getField('guarantor_name_duty_desc').setReadOnly(true);
}
} }
} }
function change_background_color(record) { function change_background_color(record) {
......
...@@ -304,8 +304,8 @@ ...@@ -304,8 +304,8 @@
} }
} else if (unit_code != 241 || unit_code != 610) { } 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', 'NULL');
record.getField('guarantor_name_duty_desc').setRequired(false); record.getField('guarantor_name_duty_desc').setRequired(false);
} }
}, },
...@@ -350,8 +350,8 @@ ...@@ -350,8 +350,8 @@
record.getField('guarantor_name_duty_desc').setRequired(true); record.getField('guarantor_name_duty_desc').setRequired(true);
} else if (unit_code != 241 || unit_code != 610) { } 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', 'NULL');
record.getField('guarantor_name_duty_desc').setRequired(false); record.getField('guarantor_name_duty_desc').setRequired(false);
} }
}, },
...@@ -369,6 +369,34 @@ ...@@ -369,6 +369,34 @@
record.getField('guarantor_name_duty_desc').setRequired(true); record.getField('guarantor_name_duty_desc').setRequired(true);
} }
}else if(record.get('paid_byother_flag') =='F'){ }else if(record.get('paid_byother_flag') =='F'){
var extra_id = record.get('bp_id');
if (extra_id != undefined){
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(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.set('guarantor_name_duty_desc', '');
record.set('guarantor_name_duty', 'NULL');
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(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');
...@@ -376,6 +404,7 @@ ...@@ -376,6 +404,7 @@
} }
} }
} }
}
// 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');
......
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