Commit ff22a1df authored by gzj34291's avatar gzj34291

报价创建新增租赁物校验

parent 9058f6f6
......@@ -398,6 +398,7 @@
var bp_rate_flag;
/*保存前调用,生成项目编号*/
var count = 0;
var item_count = 0;
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
var check_flag = true;
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
......@@ -409,9 +410,17 @@
// var lease_item_ds_id = '${/parameter/@layout_code}' + '_G_CAR_INFO_prj_project_lease_item_ds';
var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
var project_record = $(project_ds_id).getCurrentRecord();
debugger;
var lease_item_ds_id_n = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var lease_item_record = $(lease_item_ds_id_n).getCurrentRecord();
var project_lease_item_id = $(lease_item_ds_id).getAll();
if(project_lease_item_id.length<1 && item_count == 0){
$L.showErrorMessage('提示', '租赁物信息不能为空!');
item_count = item_count+1;
return false;
}else if(project_lease_item_id.length<1 && item_count != 0){
item_count = 0;
return false;
}
var machine_number = lease_item_record.get('machine_number_70');
var project_id = project_record.get('project_id');
var machine_number_num = 0;
......@@ -731,7 +740,6 @@
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
if(tenant_ds_id == ds.id){
//debugger;
if (Leaf.isEmpty(record.get('send_message'))){
record.set('send_message', 'YES');
record.set('send_message_n', '是');
......@@ -748,7 +756,6 @@
}
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
if (prj_quotation_ds_id == ds.id && prj_quotation_ds_id) {
debugger;
if (division != '70'&&division!='92' && division != '') {
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN').style.display = 'none'
......@@ -828,6 +835,10 @@
record.getField('bank_account_id_n').setRequired(false);
}
if(division == '92'){
record.getField('pay_method').setReadOnly(false);
record.getField('pay_method_n').setReadOnly(false);
}
//深圳美鹏和hcs显示分公司,其他隐藏
var bp_code = '${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code) && bp_code !== 'D00010001' && bp_code !== 'D00000009') {
......@@ -840,7 +851,6 @@
//星邦高空作业车 默认承租人为只读;
//厦门恒立兴、福州恒立兴、三明恒立兴、江西恒立兴 可选为必填;
//其它代理店不展示该字段,默认为代理店;
debugger;
//获取员工类型
var description = '${/model/description/record/@employee_type_code}';
var bp_code='${/model/user_agent_description/record/@bp_code}';
......@@ -1079,7 +1089,6 @@
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)或建行扣款(两方)”时展示,必填,大于0,默认20万,可修改;
if (name=='pay_method') {
debugger;
if(value=='CCB_THREE'||value=='CCB_TWO'){
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'block';
......
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