Commit 4c1dabfc authored by gzj34291's avatar gzj34291

卡家业务

parent 1b8d5624
......@@ -61,6 +61,7 @@
modelaction="update"/>
<a:link id="${/parameter/@layout_code}contract_number_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="check_machine_number_id" model="prj.PRJ501N.project_approval" modelaction="query"/>
<script type="text/javascript"><![CDATA[
// alert('${/parameter/@division}')
//add by zhuxianfei
......@@ -392,6 +393,7 @@
}
var bp_rate_flag;
/*保存前调用,生成项目编号*/
var 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');
......@@ -403,6 +405,39 @@
// 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 machine_number = lease_item_record.get('machine_number_70');
var project_id = project_record.get('project_id');
var machine_number_num = 0;
if(division == '92' && !Leaf.isEmpty(machine_number)){
Leaf.request({
url: $('check_machine_number_id').getUrl(),
para: {
machine_number: machine_number,
project_id :project_id
},
scope: this,
success: function (res) {
machine_number_num= res.result.record.v_count;
},
failure: function () {
return false;
},
scope: this,
sync: true
});
}
if (machine_number_num>0 && count == 0){
count = count+1;
$L.showErrorMessage('提示', '该机号已存在,请重新确认!');
return false;
}else if(machine_number_num>0 && count != 0){
count = 0;
return false;
}
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
......@@ -421,7 +456,7 @@
}
if (bp_tenant_detail_r && ds.id == prj_project_ds_id) {
for (var key in bp_tenant_detail_r.data) {
if(division!='70'){
if(division!='70'&&division!='92'){
//非铁甲排除铁甲必填
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id'&& key != 'contract_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n'&& key != 'third_guar_score'&& key != 'tj_score' ) {
if(!bp_tenant_detail_r.get(key)){
......@@ -432,7 +467,18 @@
bp_rate_flag = true;
}
}
}else{
}else if(division == '92'){
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age'&& key != 'contract_id' && key != 'project_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n'&& key != 'third_guar_score'&&key != 'tj_score') {
//if (!bp_tenant_detail_r.get(key)) {
if (typeof bp_tenant_detail_r.get(key) == "null" || typeof bp_tenant_detail_r.get(key) == "undefined" || bp_tenant_detail_r.get(key) === "") {
Leaf.showInfoMessage("提示", "承租人评分信息区域的所有字段,除\"第三方担保附件得分\"外,其他都为必输字段,请填写!");
bp_rate_flag = false;
break;
} else {
bp_rate_flag = true;
}
}
} else{
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id'&& key != 'contract_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n'&& key != 'third_guar_score' ) {
if(!bp_tenant_detail_r.get(key)){
Leaf.showInfoMessage("提示","承租人评分信息区域的所有字段,除\"第三方担保附件分数\"外,其他都为必输字段,请填写!");
......@@ -699,7 +745,7 @@
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 != '') {
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'
;
......@@ -724,7 +770,7 @@
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CONTRACT_AMOUNT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CONTRACT_AMOUNT').style.display = 'none';
} else if (division=='70'&&division!='') {
} else if ((division=='70'|| division=='92')&&division!='') {
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE').style.display = 'none';
......@@ -737,6 +783,11 @@
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
if (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'
;
}
}
if (ds_id == ds.id && ds_id) {
division=record.get('division');
......@@ -872,7 +923,7 @@
}
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if (lease_item_ds_id == ds.id && lease_item_ds_id) {
if(division=='70'){
if(division=='70' || division=='92'){
if(name=='lease_name_n'){
record.data.type_name=value;
}else if(name=='modelcd'){
......@@ -1112,7 +1163,7 @@
if(division!='30' && division!='50'){
$(gridId).hideColumn('machine_number_n');
}
if(division=='70'){
if(division=='70'|| division=='92'){
if(record!=''){
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
......@@ -1163,7 +1214,7 @@
}
var rk_value = seq_num + 1;
record.set('lease_item_seq', rk_value);
if(division=='70'){
if(division=='70'|| division=='92'){
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
record.getField('produce_date').setRequired(true);
......@@ -1266,7 +1317,7 @@
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if(current_record.get('division')=='70'){
if(current_record.get('division')=='70' || current_record.get('division')=='92'){
var bp_number;
$L.request({
url: '${/request/@context_path}/autocrud/prj.PRJ500N.get_bp_address/query',
......@@ -1449,7 +1500,7 @@
}
Leaf.onReady(function(){
if(division=='70'){
if(division=='70'|| division=='92'){
$('PROJECT_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('full_name_n');
$('PROJECT_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('division_n');
$('PROJECT_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('equipments');
......
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