Commit 1a79c299 authored by xy's avatar xy

[建机]-正式环境代码覆盖

parent 894bb4b2
......@@ -103,10 +103,36 @@
dirty_flag = 'Y';
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
hd_ds = $(hdds_id);
var hdrecord = hd_ds.getCurrentRecord();
var bank_account_name = hdrecord.get('third_bp_id_n');
var vender_bank_account_id = hdrecord.get('t_bank_account_id');
var bank_account_num = hdrecord.get('t_bank_account_num');
var hd_ds, ln_ds, lineRecords, currency_code, currency_name;
if (hdds_id) {
hd_ds = $(hdds_id);
hdrecord = hd_ds.getCurrentRecord();
if((name == 't_bank_account_name'||name == 't_bank_account_name_n') && !Ext.isEmpty(hdrecord.get('t_bank_account_name_n')) && !Ext.isEmpty(hdrecord.get('third_bp_id_n'))){
var records = $(lnds_id).getAll();
for (var i = 0; i < records.length; i++) {
records[i].set('vender_bank_account_number', bank_account_num);
records[i].set('vender_bank_account_number_n', bank_account_num);
records[i].set('vender_bank_account_name', bank_account_name);
records[i].set('vender_bank_account_id', vender_bank_account_id);
records[i].getField('vender_bank_account_number').setReadOnly(true);
records[i].getField('vender_bank_account_number_n').setReadOnly(true);
}
}
if((name == 'third_bp_id'||name == 'third_bp_id_n') && (Leaf.isEmpty(record.get('document_number_t')) || bank_account_name=='')){
var records = $(lnds_id).getAll();
hdrecord.set('t_bank_account_num',null);
hdrecord.set('t_bank_branch_name',null);
hdrecord.set('t_bank_full_name',null);
hdrecord.set('t_bank_account_id',null);
for (var i = 0; i < records.length; i++) {
records[i].getField('vender_bank_account_number').setReadOnly(false);
records[i].getField('vender_bank_account_number_n').setReadOnly(false);
}
}
}
if (lnds_id && $L.CmpManager.get(lnds_id)) {
ln_ds = $(lnds_id);
......@@ -171,6 +197,21 @@
hd_ds = $(hdds_id);
hdrecord = hd_ds.getCurrentRecord();
}
if (ds.id == ds_id) {
var handrecord = $(hdds_id).getCurrentRecord();
if (!Ext.isEmpty(handrecord)) {
var bank_account_name = handrecord.get('third_bp_id_n');
if (!Ext.isEmpty(hdrecord.get('third_bp_id_n'))) {
var records = $(ds_id).getAll();
for (var i = 0; i < records.length; i++) {
records[i].getField('vender_bank_account_number').setReadOnly(true);
records[i].getField('vender_bank_account_number_n').setReadOnly(true);
}
}
}
}
if (record) {
if ('${/parameter/@function_code}' == 'CSH502D') {
record.getField('pay_amount').setReadOnly(false);
......@@ -189,7 +230,7 @@
}
var lnds_records = $(ds_id).getAll();
if (con_business_type == 'LEASEBACK'){
debugger
if ('${/parameter/@division}' ==91||'${/parameter/@division}' =='神钢建机'){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var records = $(ds_id).getAll();
......@@ -220,15 +261,6 @@
}
}
}
var lnds_records = $(ds_id).getAll();
if (ds.id == ds_id) {
for (var i = 0; i < lnds_records.length; i++) {
if (lnds_records[i].get('division') == '70' || lnds_records[i].get('division') == '92') {
lnds_records[i].getField('tenant_bank_account_number').setRequired(false);
lnds_records[i].getField('tenant_bank_account_number_n').setRequired(false);
}
}
}
//非虚拟店 应付承租人金额非必填且未只读
if(is_constru_unit != 'Y'){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
......@@ -242,6 +274,16 @@
}
}
}
var lnds_records = $(ds_id).getAll();
if (ds.id == ds_id) {
for (var i = 0; i < lnds_records.length; i++) {
if (lnds_records[i].get('division') == '70' || lnds_records[i].get('division') == '92') {
lnds_records[i].getField('tenant_bank_account_number').setRequired(false);
lnds_records[i].getField('tenant_bank_account_number_n').setRequired(false);
}
}
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
......@@ -273,8 +315,7 @@
}
}
}
if ('${/parameter/@division}' ==91||'${/parameter/@division}' =='神钢建机'||'${/parameter/@division}' ==92||'${/parameter/@division}' =='北京卡家' ){
debugger
if ('${/parameter/@division}' ==91||'${/parameter/@division}' =='神钢建机'||'${/parameter/@division}' ==92||'${/parameter/@division}' =='北京心诚' ){
if (con_business_type == 'LEASEBACK'){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var records = $(ds_id).getAll();
......@@ -424,6 +465,13 @@
var head_record = $(ds_id).getAt(0);
//高空作业车个数
var gk_contract_num = 0;
if(!Ext.isEmpty(head_record.get('t_bank_account_id'))){
for (var i = 0; i < line_datas.length; i++) {
var line_data = line_datas[i];
line_data.set('vender_bank_account_id',head_record.get('t_bank_account_id'));
}
}
for (var i = 0; i < line_datas.length; i++) {
var line_data = line_datas[i];
//应付我司金额
......@@ -479,7 +527,7 @@
}
} else if (con_business_type == 'LEASEBACK') {
var entrusted_amount = get_current_amount(line_data.get('entrusted_amount'));
if (plus(plus(amount_agent, amount_vender),repur_con_ddct_amt) != entrusted_amount && is_constru_unit =!= 'Y') {
if (plus(plus(amount_agent, amount_vender),repur_con_ddct_amt) != entrusted_amount && is_constru_unit != 'Y') {
$L.showErrorMessage("提示", '应付代理店金额、应付厂商金额、回购租金抵冲金额合计不等于合同签约时承租人所填写委托付款金额,请重新填写!',null,500,300);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
......@@ -597,6 +645,7 @@
record.set('contract_id', '${/parameter/@contract_id}');
}
}
var head_record = $(hdds_id).getAt(0);
if (hdds_id == ds.id) {
if ('${/parameter/@function_usage}' == 'READONLY') {
......@@ -608,6 +657,31 @@
record.getField('las_compensatory_amount').setReadOnly(true);
}
}
if(head_record.get('con_division') == '30' || head_record.get('con_division') == '50'||'${/parameter/@division}' == '50' || '${/parameter/@division}' == '30'){
// record.getField('third_bp_id').setRequired(true);
// record.getField('third_bp_id_n').setRequired(true);
// record.getField('t_bank_account_name').setRequired(true);
//record.getField('t_bank_account_name_n').setRequired(true);
}else{
if(document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_THIRD_BP_ID')){
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_THIRD_BP_ID_prompt').style.display = 'none';
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_THIRD_BP_ID').style.display = 'none';
}
if(document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_ACCOUNT_NAME')){
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_ACCOUNT_NAME_prompt').style.display = 'none';
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_ACCOUNT_NAME').style.display = 'none';
}
if(document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_ACCOUNT_NUM')){
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_ACCOUNT_NUM_prompt').style.display = 'none';
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_ACCOUNT_NUM').style.display = 'none';
}
if(document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_FULL_NAME')){
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_FULL_NAME_prompt').style.display = 'none';
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_FULL_NAME').style.display = 'none';
}
}
//add by 18938
if(is_constru_unit == 'Y'){
if(document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_THIRD_BP_ID')){
......
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