Commit f83e589a authored by 王炜's avatar 王炜

承租人变更评分提交

parent db9ef57a
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select
to_char(t.bp_birth,'yyyy-mm-dd') bp_birth,
t.BP_MARRIAGE,
bp_marriage_n,
t.BP_HEALTH,
t.BP_HEALTH_n,
t.BP_BORN,
t.BP_BORN_n,
t.PROPERTY_BELONG,
t.PROPERTY_BELONG_n,
t.OWN_PROPERTY_ADDRESS,
t.HOUSE_AREA,
t.HOUSE_VALUE,
t.OWN_MONEY,
t.BANK_CREDIT_APPROVAL,
t.BANK_CREDIT_APPROVAL_n,
t.OTHER_OWN_ASSETS,
t.FAMILY_SOURCE_INCOME,
t.FAMILY_AVG_INCOME,
t.FAMILY_MONTH_AVG_OUTCOME,
t.BANK_LOAN,
t.OTHER_LOAN,
t.FIXED_ASSETS,
t.CAPITAL,
t.CAPITAL_PLACE,
t.CAR_TYPE,
t.CAR_BRAND,
t.CAR_NUM,
t.CAR_BUY_DATE,
t.CAR_BUY_MONEY,
t.WORK_EXPERIENCE,
t.WORK_EXPERIENCE_n,
t.WORK_OPERATOR,
t.WORK_OPERATOR_n,
t.WORK_TYPE,
t.WORK_TYPE_n,
t.WORK_AVG_MONTH_INCOME,
t.WORK_AVG_MONTH_OUTCOME,
t.OTHER_DESCRIPTION,
t.PAYMENT_SOURCE,
t.E_PLACE,
t.E_CONTRACT_AMOUNT,
t.CONTRACT_COPY,
t.CONTRACT_COPY_n,
t.E_CON_AUTHENTICITY,
t.E_CON_AUTHENTICITY_n,
t.SURVEY_FIT,
t.SURVEY_FIT_n,
t.DAILY_CREDIT,
t.DAILY_CREDIT_n,
t.BORROW_SITUATION,
t.BORROW_SITUATION_n,
t.RENT_REPAYMENT,
t.RENTAL_BALANCE,
t.LIQUIDATED_DAMAGES,
t.GUAR_MORTGAGE_STATUS,
t.GUAR_MORTGAGE_STATUS_n,
t.PAST_CONT_EXE_STATUS,
t.PAST_CONT_EXE_STATUS_n,
t.INDUSTRY_JUDGEMENT,
t.INDUSTRY_JUDGEMENT_n,
t.THIRD_PARTY_GUARANTEE,
t.THIRD_PARTY_GUARANTEE_n,
t.THIRD_PARTY_CREDIBILITY,
t.THIRD_PARTY_CREDIBILITY_n,
t.E_PLACE_n,
t.BP_AGE,
t.score_name,
t.third_guar_score
from (select t1.*
from bp_tenant_rate_detail_v t1
where exists (select 1
from prj_project p
where p.project_id = t1.PROJECT_ID
and p.bp_id_tenant = ${@bp_id}
and p.project_status not in ('CLOSED'))
order by t1.project_id desc) t
where rownum = 1
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -109,6 +109,15 @@ ...@@ -109,6 +109,15 @@
} }
} }
} }
function remove_query_field(name) {
importClass(Packages.uncertain.composite.CompositeUtil);
var qf_root = $this.getObjectContext().getChild("query-fields");
var query_field = CompositeUtil.findChild(qf_root, "query-field", "field", name);
if (query_field) {
qf_root.removeChild(query_field);
}
}
function import_server_bm_tplt() { function import_server_bm_tplt() {
var cx = Packages.leaf.javascript.Context.getCurrentContext(); var cx = Packages.leaf.javascript.Context.getCurrentContext();
...@@ -255,7 +264,7 @@ ...@@ -255,7 +264,7 @@
/* println('==============================='); /* println('===============================');
println($ctx.parameter.authority_flag); println($ctx.parameter.authority_flag);
println('==============================='); println('===============================');
println($this.getObjectContext().toXML()); */ println($this.getObjectContext().toXML());*/
]]></s:bm-script> ]]></s:bm-script>
</bm:features> </bm:features>
<bm:relations/> <bm:relations/>
......
...@@ -92,6 +92,8 @@ ...@@ -92,6 +92,8 @@
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,
NULL,
NULL NULL
FROM hls_bp_master h) FROM hls_bp_master h)
ORDER BY bp_detail_id DESC) t1 ORDER BY bp_detail_id DESC) t1
......
remove_query_field('CONTRACT_ID');
remove_datafilter('contract_id');
var add_datafilters=[
{
name:'bp_id',
expression:'(t1.bp_id = ${@bp_id})'
}
];
add_datafilter();
\ No newline at end of file
...@@ -30,12 +30,19 @@ ...@@ -30,12 +30,19 @@
url="${/request/@context_path}/downloadFile.lview"/> url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="con731_hls_bp_master_query_link" <a:link id="con731_hls_bp_master_query_link"
url="${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"/> url="${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"/>
<a:link id="${/parameter/@layout_code}hls_bp_master_query_link"
url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/>
<a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id" <a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id"
model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="con_buyback_info_print_link_id" <a:link id="con_buyback_info_print_link_id"
url="${/request/@context_path}/modules/csh/CSH501/csh_con_req_history_pdf_print.lsc"/> url="${/request/@context_path}/modules/csh/CSH501/csh_con_req_history_pdf_print.lsc"/>
<a:link id="con_check_deduction_limit_link" model="check_after_save_bm.con_check_deduction_limit_after_save" <a:link id="con_check_deduction_limit_link" model="check_after_save_bm.con_check_deduction_limit_after_save"
modelaction="update"/> 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="${/parameter/@layout_code}_tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ902/prj_project_score_result.lview"/>
<a:link id="${/parameter/@layout_code}get_bp_tenant_rate_detail_link" model="cont.CON731.get_bp_tenant_rate_detail" modelaction="query"></a:link>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
Ext.ux.Lightbox.register('a[ref=img]', true); Ext.ux.Lightbox.register('a[ref=img]', true);
Leaf.onReady(function () { Leaf.onReady(function () {
...@@ -135,6 +142,47 @@ ...@@ -135,6 +142,47 @@
if (ds.id == ds_con_id) { if (ds.id == ds_con_id) {
// 承租人变更 // 承租人变更
if ('${/parameter/@layout_code}' == 'CON_TENANT_CHANGE_MODIFY') { if ('${/parameter/@layout_code}' == 'CON_TENANT_CHANGE_MODIFY') {
if(name=='bp_id_tenant'){
//让历史信息查询
var history_con_id=get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
$(history_con_id).setQueryParameter('bp_id', value);
$(history_con_id).query();
var tennat_score_ds_id=get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var tenant_score_record=$(tennat_score_ds_id).getAt(0);
if(tenant_score_record){
Leaf.request({
url: $('${/parameter/@layout_code}get_bp_tenant_rate_detail_link').getUrl(),
para: {
bp_id: value
},
success: function (data) {
if (data.result.record && !data.result.record.length) {
//评分信息
for (var name in tenant_score_record.data) {
if (name != 'bp_detail_id' && name != 'project_id'&& name != 'contract_id') {
if(data.result.record[name]){
tenant_score_record.set(name, data.result.record[name]);
}else{
tenant_score_record.set(name, '');
}
}
}
}
},
failure: function () {
},
error: function () {
},
scope: this
});
}
}
// 承租人变更日計算未收金額相關信息 // 承租人变更日計算未收金額相關信息
if (name == 'ccr_lease_date' && value) { if (name == 'ccr_lease_date' && value) {
Leaf.request({ Leaf.request({
...@@ -495,6 +543,40 @@ ...@@ -495,6 +543,40 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}; };
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
var ds_con_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_01', 'con_contract');
var record = $(ds_con_id).getCurrentRecord();
if (record) {
var param = record.data;
if (record.get('contract_id')) {
param['project_id'] = record.get('contract_id');
param['winid'] = 'hl_tenant_score_rate_win_id';
param['url_title'] = '客户评分明细';
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var r = $(score_ds_id).getCurrentRecord();
if (r.dirty && '${/parameter/@function_usage}' == 'MODIFY') {
Leaf.showInfoMessage('提示', '评分数据发生修改,请先保存再进行评分');
return;
}
if ($(ds_con_id).validate()) {
var win = new Leaf.Window({
id: param['winid'],
params: param,
url: $('${/parameter/@layout_code}_tenant_rate_query_link').getUrl(),
title: param['url_title'],
fullScreen: true,
draggable: true
});
}
} else {
Leaf.showMessage('${l:PROMPT}', '请先保存');
}
}
}
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
// $('${/parameter/@layout_code}_user_button1').disable(); // $('${/parameter/@layout_code}_user_button1').disable();
...@@ -550,13 +632,50 @@ ...@@ -550,13 +632,50 @@
} }
} }
function con731n_bp_code_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['bp_id'] = record.get('bp_id');
param['bp_class'] = record.get('bp_class');
if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
} else {
param['function_code'] = 'HLS215D';
param['function_usage'] = 'QUERY';
}
param['winid'] = '${/parameter/@layout_code}_bp_win_id';
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
}
function con731n_contract_number_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['contract_id'] = record.get('contract_id');
param['function_code'] = 'CON301';
param['function_usage'] = 'QUERY';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}contract_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) { window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
var link_function = ''; var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record; window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'bp_link' && record.get('bp_id') && record.get('record_id')) { if (name == 'bp_link' && record.get('bp_id') && record.get('record_id')) {
link_function = '${/parameter/@layout_code}_open_bp_detail_window'; link_function = '${/parameter/@layout_code}_open_bp_detail_window';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'attachment') { } else if (name == 'bp_link1' && !record.isNew) {
link_function = 'con731n_bp_code_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'contract_number') {
link_function = 'con731n_contract_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>';
}else if (name == 'attachment') {
link_function = 'con_repo001_upload_file'; link_function = 'con_repo001_upload_file';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'attach_file_name') { } else if (name == 'attach_file_name') {
...@@ -600,7 +719,6 @@ ...@@ -600,7 +719,6 @@
}; };
window['${/parameter/@layout_code}_open_bp_detail_window'] = function (id, name) { window['${/parameter/@layout_code}_open_bp_detail_window'] = function (id, name) {
debugger;
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};//record.data; var param = {};//record.data;
param['bp_id'] = record.get('bp_id'); param['bp_id'] = record.get('bp_id');
...@@ -626,12 +744,19 @@ ...@@ -626,12 +744,19 @@
}; };
//加载时调用(grid,table,gridBox) //加载时调用(grid,table,gridBox)
/*window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record, config_records, bp_seq) { var query_count = 1;
if(record.get('bp_category') == 'TENANT' || record.get('bp_category') == 'AGENT'){ window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record, config_records, bp_seq) {
record.getField('bp_id').setReadOnly(true); if ('${/parameter/@layout_code}' == 'CON_TENANT_CHANGE_MODIFY'){
record.getField('bp_id_n').setReadOnly(true); var project_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_01', 'con_contract');
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
if(ds.id==ds_id&& ds_id && query_count == 1) {
query_count = query_count + 1;
var bp_id = $(project_ds_id).getAt(0).get('bp_id_tenant');
$(ds_id).setQueryParameter('bp_id', bp_id);
$(ds_id).query();
} }
};*/ }
};
//选择事件(grid,attach,gridbox,table) //选择事件(grid,attach,gridbox,table)
/*window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_before_select'] = function(ds, record, bp_seq) { /*window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_before_select'] = function(ds, record, bp_seq) {
if((record.get('bp_category') == 'TENANT' || record.get('bp_category') == 'AGENT') && record.isSelected){ if((record.get('bp_category') == 'TENANT' || record.get('bp_category') == 'AGENT') && record.isSelected){
...@@ -642,7 +767,6 @@ ...@@ -642,7 +767,6 @@
};*/ };*/
//add by lihh 20210330审批记录打印 //add by lihh 20210330审批记录打印
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var records = $(ds_id).getCurrentRecord(); var records = $(ds_id).getCurrentRecord();
var document_id = records.get('contract_id'); var document_id = records.get('contract_id');
...@@ -664,7 +788,6 @@ ...@@ -664,7 +788,6 @@
}; };
//保存前调用 //保存前调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
debugger;
var check_flag = true; var check_flag = true;
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
...@@ -714,6 +837,24 @@ ...@@ -714,6 +837,24 @@
} }
} }
} }
if('${/parameter/@layout_code}' == 'CON_TENANT_CHANGE_MODIFY'){
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();
if (bp_tenant_detail_r && ds.id == ds_id) {
for (var key in bp_tenant_detail_r.data) {
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n'&& key != 'third_guar_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("提示", "承租人评分信息区域的所有字段,除\"第三方担保附件得分\"外,其他都为必输字段,请填写!");
check_flag = false;
break;
} else {
check_flag = true;
}
}
}
}
}
return check_flag; return check_flag;
}; };
......
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