Commit 478e1114 authored by Darming's avatar Darming

Merge branch 'develop' of https://hel.hand-china.com/hlcm/leaf-hlcm into develop

parents 9e452e58 ce89a077
...@@ -142,6 +142,6 @@ INSERT INTO sys_function_dynamic ...@@ -142,6 +142,6 @@ INSERT INTO sys_function_dynamic
creation_date, creation_date,
created_by, created_by,
last_update_date, last_update_date,
last_updated_by) last_updated_by )
VALUES VALUES
('HLS36105', '商业伙伴授信维护', 1, SYSDATE, -1, SYSDATE, -1); ('HLS36105', '商业伙伴授信维护', 1, SYSDATE, -1, SYSDATE, -1);
\ No newline at end of file
...@@ -95,7 +95,6 @@ ...@@ -95,7 +95,6 @@
</tr> </tr>
<!--循环获取数据--> <!--循环获取数据-->
<#if model.getObject("/model/payment_details").getChilds()??> <#if model.getObject("/model/payment_details").getChilds()??>
<#list model.getObject('/model/payment_details').getChilds() as detail_item_l> <#list model.getObject('/model/payment_details').getChilds() as detail_item_l>
<tr height="0.7"> <tr height="0.7">
<tc width="4"> <tc width="4">
......
...@@ -2,7 +2,7 @@ var add_datafilters = [ ...@@ -2,7 +2,7 @@ var add_datafilters = [
{ {
name:'contract_status', name:'contract_status',
expression:"t1.contract_status not in ('NEW','SIGN_RETURN')" expression:"t1.contract_status in ('SIGNING','SIGN','INCEPTING','INCEPT','INCEPT_RETURN')"
}, },
{ {
name : 'authority', name : 'authority',
......
...@@ -4,6 +4,10 @@ var add_datafilters = [ ...@@ -4,6 +4,10 @@ var add_datafilters = [
name: 'document_type', name: 'document_type',
expression: "t1.document_type = 'CARCON'" expression: "t1.document_type = 'CARCON'"
}, },
{
name: 'contract_status',
expression: "t1.contract_status in ('NEW','SIGNING','SIGNING','SIGN_RETURN')"
},
{ {
name : 'authority', name : 'authority',
expression : "(exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 where a1.trx_category = 'CONTRACT' and a1.trx_id = t1.contract_id and trunc(sysdate) between a1.start_date and nvl(a1.end_date, trunc(sysdate)) and a1.user_id = a2.owner_user_id and a1.trx_category = a2.trx_category and a2.authorized_user_id = ${/session/@user_id} and trunc(sysdate) between a2.start_date and nvl(a2.end_date, trunc(sysdate))))" expression : "(exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 where a1.trx_category = 'CONTRACT' and a1.trx_id = t1.contract_id and trunc(sysdate) between a1.start_date and nvl(a1.end_date, trunc(sysdate)) and a1.user_id = a2.owner_user_id and a1.trx_category = a2.trx_category and a2.authorized_user_id = ${/session/@user_id} and trunc(sysdate) between a2.start_date and nvl(a2.end_date, trunc(sysdate))))"
......
...@@ -67,6 +67,13 @@ ...@@ -67,6 +67,13 @@
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_case_record'); var ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_case_record');
var reduce_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_penalty_reduce');
if($(reduce_ds_id).data.length<1){
$L.showInfoMessage('提示','请维护罚息减免信息!')
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
if(!$(ds_id1).validate()){ if(!$(ds_id1).validate()){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return; return;
...@@ -124,6 +131,7 @@ ...@@ -124,6 +131,7 @@
function getXml() { function getXml() {
var req_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_case_record'); var req_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_case_record');
var reduce_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_penalty_reduce');
var req_record = $(req_ds_id).getAt(0); var req_record = $(req_ds_id).getAt(0);
var record_id = req_record.data.record_id var record_id = req_record.data.record_id
if (!record_id) { if (!record_id) {
...@@ -132,10 +140,19 @@ ...@@ -132,10 +140,19 @@
return; return;
} }
//检验必须字段 //检验必须字段
var records=$(reduce_ds_id).data;
for(var i=0;i<records.length;i++){
//如果没有进行测算,
if( records[i].get('calc_flag')!='Y'){
Leaf.showMessage('${l:HLS.PROMPT}', '所有数据测算后才能提交!');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
}
/*小额不用审批直接通过*/ //判断所有的单据是否已经进行测算过
//将小额审批改为工作工作流审批
//所有的单据都默认为小额审批
Leaf.request({ Leaf.request({
url: $('con_contract_penalty_reduction_link').getUrl(), url: $('con_contract_penalty_reduction_link').getUrl(),
para: { para: {
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_penalty_reduce'); var ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_penalty_reduce');
var record1 = $(ds_id1).getCurrentRecord(); var record1 = $(ds_id1).getCurrentRecord();
Leaf.request({ Leaf.request({
url: '${/request/@context_path}/autocrud/cont.CON1020.con_contract_penalty_info_save/execute', url: '${/request/@context_path}/autocrud/cont.CON1020.con_contract_penalty_info_save/execute',
para: { para: {
...@@ -129,6 +131,12 @@ ...@@ -129,6 +131,12 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_penalty_reduce'); var ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_penalty_reduce');
var record1 = $(ds_id1).getCurrentRecord(); var record1 = $(ds_id1).getCurrentRecord();
if( record1.get('reduce_amount_total')<0){
$L.showInfoMessage('提示','罚息减免总金额不能小于0');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
Leaf.request({ Leaf.request({
url: '${/request/@context_path}/autocrud/cont.CON1020.con_contract_penalty_info_save/execute', url: '${/request/@context_path}/autocrud/cont.CON1020.con_contract_penalty_info_save/execute',
para: { para: {
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
//批量导入 //批量导入
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var records = $(con_ds_id).getSelected(); // var records = $(con_ds_id).getSelected();
var win = new Leaf.Window({ var win = new Leaf.Window({
id: 'con_insurance_upload_link_winId', id: 'con_insurance_upload_link_winId',
url: $('con_insurance_upload_link').getUrl(), url: $('con_insurance_upload_link').getUrl(),
......
...@@ -77,9 +77,8 @@ ...@@ -77,9 +77,8 @@
<a:link id="tre_loan_con_print_excel_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_contract_export.lsc"/> <a:link id="tre_loan_con_print_excel_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_contract_export.lsc"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
//测试
jQuery.noConflict(); jQuery.noConflict();
//如果头id 不为空,就使用自在定义的ds进行查询 //如果头id 不为空,就使用自在定义的ds进行查询
Leaf.onReady(function(){ Leaf.onReady(function(){
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln'); var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true"> trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="basic.sys_session_info" rootPath="user_name_path"/>
</a:init-procedure>
<a:view> <a:view>
<a:link id="con_contract_get_layout_code_link" model="cont.CON500.con_contract_get_layout_code" <a:link id="con_contract_get_layout_code_link" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/> modelaction="update"/>
...@@ -95,6 +98,11 @@ ...@@ -95,6 +98,11 @@
} }
}; };
//新增时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
record.set("created_by_n",'${/model/user_name_path/record/@user_name}');
record.set("created_by",'${/session/@user_id}');
};
//更新机型信息 //更新机型信息
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
......
...@@ -80,6 +80,29 @@ ...@@ -80,6 +80,29 @@
} }
}); });
//删除角色按钮
window['${/parameter/@layout_code}_G_ROLE_USER_BUTTON1_layout_dynamic_tab_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var records = $(ds_id).getSelected();
if (!records.length) {
Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录');
return false;
}
//else{
// Leaf.showMessage('${l:PROMPT}', '是否删除角色?');
//}
//alert(records.length);
for (var i = 0; i < records.length; i++) {
var primary_flag = records[i].get('primary_flag');
if(primary_flag == 'Y'){
Leaf.showMessage('${l:PROMPT}', '主角色无法被删除!');
continue;
}else{
$(ds_id).remove(records[i]);
}
}
};
//保存submitsuccess调用 //保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res, bp_seq) {
...@@ -130,7 +153,7 @@ ...@@ -130,7 +153,7 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
if ((ds.id).indexOf('hls_bp_master') != -1) { if ((ds.id).indexOf('hls_bp_master') != -1) {
record.getField('cell_phone').setRequired(true); // record.getField('cell_phone').setRequired(true);
//身份证验证 //身份证验证
if (ds.fields.id_card_no) { if (ds.fields.id_card_no) {
...@@ -293,12 +316,48 @@ ...@@ -293,12 +316,48 @@
// } // }
// }); // });
function CheckSocialCreditCode(Code) {
var patrn = /^[0-9A-Z]+$/;
//18位校验及大写校验
if ((Code.length != 18) || (patrn.test(Code) == false)) {
return false;
} else {
var Ancode;//统一社会信用代码的每一个值
var Ancodevalue;//统一社会信用代码每一个值的权重
var total = 0;
var weightedfactors = [1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28];//加权因子
var str = '0123456789ABCDEFGHJKLMNPQRTUWXY';
//不用I、O、S、V、Z
for (var i = 0; i < Code.length - 1; i++) {
Ancode = Code.substring(i, i + 1);
Ancodevalue = str.indexOf(Ancode);
total = total + Ancodevalue * weightedfactors[i];
//权重与加权因子相乘之和
}
var logiccheckcode = 31 - total % 31;
if (logiccheckcode == 31) {
logiccheckcode = 0;
}
var Str = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,T,U,W,X,Y";
var Array_Str = Str.split(',');
logiccheckcode = Array_Str[logiccheckcode];
var checkcode = Code.substring(17, 18);
if (logiccheckcode != checkcode) {
return false;
} else {
return true;
}
}
}
//保存前调用,生成商机编号 //保存前调用,生成商机编号
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) { window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var head_record = $(ds_id).getCurrentRecord(); var head_record = $(ds_id).getCurrentRecord();
var bp_class = head_record.get('bp_class'); var bp_class = head_record.get('bp_class');
var social_code = head_record.get('social_code');
var extra_nam = head_record.get('extra_nam'); var extra_nam = head_record.get('extra_nam');
var regax = /^[A-Z]+$/; var regax = /^[A-Z]+$/;
//alert('${/parameter/@unbrand}'); //alert('${/parameter/@unbrand}');
...@@ -359,6 +418,11 @@ ...@@ -359,6 +418,11 @@
if (head_record.get('bp_code')) { if (head_record.get('bp_code')) {
return true; return true;
} }
if (!CheckSocialCreditCode(social_code)) {
Leaf.showMessage('提示', '统一社会信用代码有误,请重新输入!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
Leaf.request({ Leaf.request({
url: $('get_special_fields_link_id').getUrl(), url: $('get_special_fields_link_id').getUrl(),
para: { para: {
......
...@@ -34,6 +34,12 @@ ...@@ -34,6 +34,12 @@
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'hls_bp_master'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'hls_bp_master');
var data=$(ds_id).selected[0]; var data=$(ds_id).selected[0];
var bp_class = data.get('bp_class');
if(bp_class == 'NP'){
Leaf.showMessage('${l:PROMPT}', '只有法人类型商业伙伴才可以修改开票信息!');
return false;
}else if(bp_class == 'ORG'){
var invoice_bp_bank_account = data.get('invoice_bp_bank_account'); var invoice_bp_bank_account = data.get('invoice_bp_bank_account');
var invoice_title = data.get('invoice_title'); var invoice_title = data.get('invoice_title');
var invoice_bp_address_phone_num = data.get('invoice_bp_address_phone_num'); var invoice_bp_address_phone_num = data.get('invoice_bp_address_phone_num');
...@@ -59,6 +65,8 @@ ...@@ -59,6 +65,8 @@
}); });
} }
}
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master'); // stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master');
function open_bp_modify_win(ds_id, record_id) { function open_bp_modify_win(ds_id, record_id) {
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sf
$Date: 2019/09/24 21:19
$Revision: 1.0
$Purpose: 商业伙伴授信维护
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="basic.get_sys_default_time" rootPath="sys_default_time"/>-->
</a:init-procedure>
<a:view>
<a:link id="credit_enhance_detail_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="hls361N_update_credit_link_id" model="hls.HLS361N.hls_bp_master_credit_update_status" modelaction="update"/>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function() {
var credit_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd');
console.log('${/parameter/@bp_credit_hd_id}');
$(credit_ds).setQueryParameter('bp_credit_hd_id', '${/parameter/@bp_credit_hd_id}')
$(credit_ds).query();
})
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var check_flag = true;
var credit_date_from=Leaf.formatDate(record.get('credit_date_from'))
var credit_date_to=Leaf.formatDate(record.get('credit_date_to'));
var total_amount=record.get('credit_total_amount');
var used_credit_amount=record.get('used_amount');
if(total_amount<used_credit_amount){
$L.showErrorMessage("错误",'修改后剩余授信额度小于0',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(credit_date_from>credit_date_to){
$L.showErrorMessage("错误",'终止日需大于生效日',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(credit_date_to<Leaf.formatDate(new Date())){
$L.showErrorMessage("错误",'终止日早于当前时间',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
Leaf.request({
url: $('hls361N_update_credit_link_id').getUrl(),
para: {
bp_credit_hd_id : record.get('bp_credit_hd_id'),
credit_total_amount: total_amount,
credit_date_from : credit_date_from,
credit_date_to : credit_date_to
},
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
return check_flag;
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
...@@ -15,6 +15,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -15,6 +15,7 @@ $Purpose: 商业伙伴授信维护
<a:link id="hn1150_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="hn1150_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="hls361_hls_bp_master_credit_tenant_detail_link" url="${/request/@context_path}/modules/hls/HLS361N/credit_entrance_detail.lview"/> <a:link id="hls361_hls_bp_master_credit_tenant_detail_link" url="${/request/@context_path}/modules/hls/HLS361N/credit_entrance_detail.lview"/>
<a:link id="hls361_hls_bp_master_create_link" url="${/request/@context_path}/modules/hls/HLS361N/credit_credit.lview"/> <a:link id="hls361_hls_bp_master_create_link" url="${/request/@context_path}/modules/hls/HLS361N/credit_credit.lview"/>
<a:link id="hls361_hls_bp_master_maintain_link" url="${/request/@context_path}/modules/hls/HLS361N/credit_credit_maintain.lview"/>
<a:link id="hls361_hls_bp_master_credit_agent_detail_link" url="${/request/@context_path}/modules/hls/HLS362N/credit_entrance_detail_confirm.lview"/> <a:link id="hls361_hls_bp_master_credit_agent_detail_link" url="${/request/@context_path}/modules/hls/HLS362N/credit_entrance_detail_confirm.lview"/>
<a:link id="hls361N_update_credit_status_link_id" model="hls.HLS361N.hls_bp_master_credit_update_status" modelaction="update"/> <a:link id="hls361N_update_credit_status_link_id" model="hls.HLS361N.hls_bp_master_credit_update_status" modelaction="update"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
...@@ -70,10 +71,11 @@ $Purpose: 商业伙伴授信维护 ...@@ -70,10 +71,11 @@ $Purpose: 商业伙伴授信维护
//1. 营业内勤/营业担当勾选授信状态为“启用”或“停用 //1. 营业内勤/营业担当勾选授信状态为“启用”或“停用
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
//授信额度变更 //授信额度变更
var param={};
var credit_ds=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd'); var credit_ds=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd');
var datas=$(credit_ds).selected; var datas=$(credit_ds).selected;
if(datas.length!=1){ if(datas.length!=1){
$L.showInfoMessage("提示",'请选择一条数据',null,null) $L.showInfoMessage("提示",'请选择要变更的数据',null,null)
return; return;
} }
//启用和审批冻结判断 //启用和审批冻结判断
...@@ -89,7 +91,21 @@ $Purpose: 商业伙伴授信维护 ...@@ -89,7 +91,21 @@ $Purpose: 商业伙伴授信维护
return; return;
} }
var credit_date_from=Leaf.formatDate(datas[0].data.credit_date_from) //跳转到维护页面
param['function_code'] = 'HLS36105_M';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
param['url_title'] = '商业伙伴授信维护';
param['bp_category_n']=datas[0].get('bp_category_n');
param['bp_credit_hd_id']=datas[0].get('bp_credit_hd_id');
param['bp_name']=datas[0].get('bp_name');
param['credit_date_from']=datas[0].get('credit_date_from');
param['credit_total_amount']=datas[0].get('credit_total_amount');
param['bp_code']=datas[0].get('bp_code');
hls_doc_get_layout_code('hn1150_get_layout_code_link_id', param, 'hls361_hls_bp_master_maintain_link', null);
/* var credit_date_from=Leaf.formatDate(datas[0].data.credit_date_from)
var credit_date_to=Leaf.formatDate(datas[0].data.credit_date_to) var credit_date_to=Leaf.formatDate(datas[0].data.credit_date_to)
//进行数据的校验 //进行数据的校验
//1) “授信总额度”录入值不能小于“已使用额度”;若小于,则报错提示:“修改后剩余授信额度小于0!”; //1) “授信总额度”录入值不能小于“已使用额度”;若小于,则报错提示:“修改后剩余授信额度小于0!”;
...@@ -137,7 +153,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -137,7 +153,7 @@ $Purpose: 商业伙伴授信维护
sync: true, sync: true,
scope: this scope: this
}); });
}) })*/
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
<a:link id="check_prj_lease_item_link_id" model="prj.PRJ501N.project_approval" modelaction="execute"/> <a:link id="check_prj_lease_item_link_id" model="prj.PRJ501N.project_approval" modelaction="execute"/>
<a:link id="${/parameter/@layout_code}tenant_rate_query_link" <a:link id="${/parameter/@layout_code}tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_history_display.lview"/> url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_history_display.lview"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_occu_object_display" rootPath="occu_object"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
// alert('${/parameter/@division}') // alert('${/parameter/@division}')
//add by zhuxianfei //add by zhuxianfei
...@@ -362,6 +363,7 @@ ...@@ -362,6 +363,7 @@
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res) { window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res) {
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'], 'prj_project'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1','prj_project'); var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1','prj_project');
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP','prj_project_bp'); var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP','prj_project_bp');
var prj_project_lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR','prj_project_lease_item'); var prj_project_lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR','prj_project_lease_item');
...@@ -373,6 +375,7 @@ ...@@ -373,6 +375,7 @@
$(bp_ds_id).query(); $(bp_ds_id).query();
$(tenant_ds_id).query(); $(tenant_ds_id).query();
$(prj_project_lease_item_ds_id).query(); $(prj_project_lease_item_ds_id).query();
$(prj_quotation_ds_id).query();
} }
...@@ -433,27 +436,24 @@ ...@@ -433,27 +436,24 @@
}; };
//更新时调用 //更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
/* var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item'); if(name=='pay_method'){
if (ds_id == ds.id) { if ( record.get('pay_method') == 'WIRE_TRANSFER') {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); record.set('bank_branch_name',null);
var record = $(ds_id).getCurrentRecord(); record.set('bank_branch_name_n',null);
Leaf.request({ record.getField('bank_branch_name').setReadOnly(true);
url: $('check_prj_lease_item_link_id').getUrl(), record.getField('bank_branch_name_n').setReadOnly(true);
para: { record.getField('bank_branch_name').setRequired(false);
'machine_number': record.get('machine_number') record.getField('bank_branch_name_n').setRequired(false);
}, } else {
success: function(res) { record.getField('bank_branch_name').setReadOnly(false);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); record.getField('bank_branch_name_n').setReadOnly(false);
}, record.getField('bank_branch_name').setRequired(true);
failure: function() { record.getField('bank_branch_name_n').setRequired(true);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); }
},
error: function() { }
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}*/
}; };
...@@ -574,6 +574,7 @@ ...@@ -574,6 +574,7 @@
} }
/* Leaf.onReady(function(){ /* Leaf.onReady(function(){
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master'); var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master');
var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}'; var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
......
...@@ -439,6 +439,7 @@ function prj501n_contract_number_renderer(id, name, query_only){ ...@@ -439,6 +439,7 @@ function prj501n_contract_number_renderer(id, name, query_only){
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res) { window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res) {
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'], 'prj_project'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1','prj_project'); var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1','prj_project');
var prj_project_lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR','prj_project_lease_item'); var prj_project_lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR','prj_project_lease_item');
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP','prj_project_bp'); var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP','prj_project_bp');
...@@ -450,6 +451,7 @@ function prj501n_contract_number_renderer(id, name, query_only){ ...@@ -450,6 +451,7 @@ function prj501n_contract_number_renderer(id, name, query_only){
$(bp_ds_id).query(); $(bp_ds_id).query();
$(tenant_ds_id).query(); $(tenant_ds_id).query();
$(prj_project_lease_item_ds_id).query(); $(prj_project_lease_item_ds_id).query();
$(prj_quotation_ds_id).query();
} }
...@@ -476,29 +478,25 @@ function prj501n_contract_number_renderer(id, name, query_only){ ...@@ -476,29 +478,25 @@ function prj501n_contract_number_renderer(id, name, query_only){
}; };
//更新时调用 //更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
/* var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item'); if(name=='pay_method'){
if (ds_id == ds.id) { if ( record.get('pay_method') == 'WIRE_TRANSFER') {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); record.set('bank_branch_name',null);
var record = $(ds_id).getCurrentRecord(); record.set('bank_branch_name_n',null);
Leaf.request({ record.getField('bank_branch_name').setReadOnly(true);
url: $('check_prj_lease_item_link_id').getUrl(), record.getField('bank_branch_name_n').setReadOnly(true);
para: { record.getField('bank_branch_name').setRequired(false);
'machine_number': record.get('machine_number') record.getField('bank_branch_name_n').setRequired(false);
}, } else {
success: function(res) { record.getField('bank_branch_name').setReadOnly(false);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); record.getField('bank_branch_name_n').setReadOnly(false);
}, record.getField('bank_branch_name').setRequired(true);
failure: function() { record.getField('bank_branch_name_n').setRequired(true);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); }
},
error: function() { }
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}*/
}; };
//加载时调用(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) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record, config_records, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_BP', 'prj_project_bp'); var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_BP', 'prj_project_bp');
......
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