Commit 43cd8670 authored by 38823's avatar 38823

征信验收期间追加开发-建机部分追加中征码校验启用及报单中的维护管理

parent 7932723b
<?xml version="1.0" encoding="UTF-8"?>
<!--
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
Begin
update prj_project_bp pb
set pb.credit_code = ${@credit_code}
where pb.project_id = ${@project_id}
and pb.bp_class = 'ORG'
and pb.bp_category = 'TENANT';
End;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
<a:link id="${/parameter/@layout_code}_prj_project_update_status_link_id" <a:link id="${/parameter/@layout_code}_prj_project_update_status_link_id"
model="prj.PRJ505.prj_project_create_contract" modelaction="execute"/> model="prj.PRJ505.prj_project_create_contract" modelaction="execute"/>
<a:link id="prj501n_prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/> <a:link id="prj501n_prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/>
<a:link id="prj_update_credit_code_link_id" model="prj.PRJ500D.update_prj_credit_code" modelaction="update"/>
<a:link id="prj501n_check_machine_number_id" model="prj.PRJ501N.project_approval" modelaction="query"/> <a:link id="prj501n_check_machine_number_id" model="prj.PRJ501N.project_approval" modelaction="query"/>
<a:link id="prj501n_check_machine_number_repeat_id" model="prj.PRJ501N.check_machine_number_repeat" modelaction="execute"/> <a:link id="prj501n_check_machine_number_repeat_id" model="prj.PRJ501N.check_machine_number_repeat" modelaction="execute"/>
<a:link id="prj501n_wfl_machine_number_detail_link_id" url="${/request/@context_path}/modules/prj/PRJ501N/prj501n_wfl_machine_number_detail.lview"/> <a:link id="prj501n_wfl_machine_number_detail_link_id" url="${/request/@context_path}/modules/prj/PRJ501N/prj501n_wfl_machine_number_detail.lview"/>
...@@ -66,6 +67,8 @@ ...@@ -66,6 +67,8 @@
<link href="${/request/@context_path}/modules/viewerjs/viewer.css" rel="stylesheet"/> <link href="${/request/@context_path}/modules/viewerjs/viewer.css" rel="stylesheet"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer.js"/> <script src="${/request/@context_path}/modules/viewerjs/viewer.js"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer_tool.js"/> <script src="${/request/@context_path}/modules/viewerjs/viewer_tool.js"/>
<script src="${/request/@context_path}/modules/prj/PRJ500N/javascripts/input_validator.js"
type="text/javascript"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () {
Leaf.showConfirm('提示', '是否确认生成合同?', function () { Leaf.showConfirm('提示', '是否确认生成合同?', function () {
...@@ -538,6 +541,37 @@ ...@@ -538,6 +541,37 @@
$(tenant_ds_id).query(); $(tenant_ds_id).query();
} }
var creditCode;
var projectId;
if('${/parameter/@credit_flag}'=='N'){
if(bp_ds_id){
var record = $(bp_ds_id).getAll();
for(var i = 0;i<record.length;i++){
if(record[i].get('bp_class')=='ORG'&&record[i].get('bp_category')=='TENANT'){
creditCode = record[i].get('credit_code');
projectId = record[i].get('project_id');
}
}
Leaf.request({
url: $('prj_update_credit_code_link_id').getUrl(),
para: {
project_id:projectId,
credit_code:creditCode
},
success: function(res) {
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
bp_rate_flag = false;
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}; };
...@@ -630,6 +664,18 @@ ...@@ -630,6 +664,18 @@
record.getField('bp_category_n').setReadOnly(true); record.getField('bp_category_n').setReadOnly(true);
record.getField('bp_id_n').setReadOnly(true); record.getField('bp_id_n').setReadOnly(true);
} }
if('${/parameter/@credit_flag}'=='N'){
if(record.get('bp_category') == 'TENANT'&&record.get('bp_class') == 'ORG'){
record.getField('credit_code').setReadOnly(false);
record.getField('credit_code').setRequired(true);
}if(record.get('bp_category') == 'TENANT'&&record.get('bp_class') == 'NP'){
var ds_gridBpId= ds.bindname+'_layout_grid_id';
$(ds_gridBpId).hideColumn('credit_code');
}
}else {
var ds_gridBpId= ds.bindname+'_layout_grid_id';
$(ds_gridBpId).hideColumn('credit_code');
}
} }
...@@ -999,8 +1045,16 @@ ...@@ -999,8 +1045,16 @@
credit_record.getField('credit_line_n').setRequired(true); credit_record.getField('credit_line_n').setRequired(true);
record.set('editable_flag','Y'); record.set('editable_flag','Y');
}else { }else {
if(document.getElementById('${/parameter/@layout_code}_save')){ if('${/parameter/@credit_flag}'!='N'){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none"; if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}else{
if(credit_record.get('bp_class')=='NP'){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
} }
} }
}else if(create_bp_code =='X00010005' || create_bp_code =='J00010006') { }else if(create_bp_code =='X00010005' || create_bp_code =='J00010006') {
...@@ -1009,14 +1063,30 @@ ...@@ -1009,14 +1063,30 @@
credit_record.getField('credit_line').setRequired(false); credit_record.getField('credit_line').setRequired(false);
credit_record.getField('credit_line_n').setRequired(false); credit_record.getField('credit_line_n').setRequired(false);
if('${/parameter/@editable_flag}' != 'YE'){ if('${/parameter/@editable_flag}' != 'YE'){
if(document.getElementById('${/parameter/@layout_code}_save')){ if('${/parameter/@credit_flag}'!='N'){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none"; if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}else{
if(credit_record.get('bp_class')=='NP'){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
} }
} }
}else if('${/parameter/@editable_flag}' != 'YE'){ }else if('${/parameter/@editable_flag}' != 'YE'){
if(document.getElementById('${/parameter/@layout_code}_save')){ if('${/parameter/@credit_flag}'!='N'){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none"; if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}else{
if(credit_record.get('bp_class')=='NP'){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
} }
}else { }else {
} }
...@@ -1134,12 +1204,21 @@ ...@@ -1134,12 +1204,21 @@
} }
if('${/parameter/@function_usage}' == 'QUERY' && '${/parameter/@editable_flag}' != 'YE' && '${/parameter/@editable_flag}' != 'Y' ){ if('${/parameter/@function_usage}' == 'QUERY' && '${/parameter/@editable_flag}' != 'YE' && '${/parameter/@editable_flag}' != 'Y' ){
if(document.getElementById('${/parameter/@layout_code}_save')){ if('${/parameter/@credit_flag}'!='N'){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none"; if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}else{
if(credit_record.get('bp_class')=='NP'){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
} }
} }
}; };
if('${/parameter/@editable_flag}' == 'Y' || '${/parameter/@editable_flag}' == 'YE'){ if('${/parameter/@editable_flag}' == 'Y' || '${/parameter/@editable_flag}' == 'YE'){
debugger;
zjwfl5110_ApproveChecker_add('zjwfl5110_submit', function (type) { zjwfl5110_ApproveChecker_add('zjwfl5110_submit', function (type) {
var prj_project_ds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project'); var prj_project_ds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
if (type == 'agree') { if (type == 'agree') {
...@@ -1160,6 +1239,7 @@ ...@@ -1160,6 +1239,7 @@
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 tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project'); var tenant_ds_id = 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');
if(tenant_ds_id == ds.id&&tenant_ds_id){ if(tenant_ds_id == ds.id&&tenant_ds_id){
...@@ -1172,6 +1252,59 @@ ...@@ -1172,6 +1252,59 @@
} }
} }
if(bp_ds_id == ds.id&&bp_ds_id){
if(name == 'credit_code'){
var credit_code;
if (!Leaf.isEmpty(value)) {
//去除空格
credit_code = value.trim();
credit_code = credit_code.replace(/[\t\r\f\n\s]*/g,"");
if (credit_code.length == '16'){
// if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
// Leaf.showMessage('提示', '中征码首字母需要大写');
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// setTimeout(function () {
// record.set('credit_code', '');
// }, 20);
// return false;
//
// }else {
// return true;
// }
let financeCode = new Array(16);
for (let i = 0; i < credit_code.length && i < 16; i++) {
financeCode[i] = credit_code.charCodeAt(i);
}
if(!checkDKK(financeCode)){
Leaf.showMessage('提示', '中征码错误');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function () {
record.set('credit_code', '');
}, 20);
return false;
}else {
if(old_value != value){
Leaf.showConfirm('${l:HLS.PROMPT}', '本次中征码维护值与基本信息维护值不一致,是否继续?', function() {
debugger;
record.set('credit_code', value);
}, function() {
debugger;
$(bp_ds_id).query();
});
}
}
}else {
Leaf.showMessage('提示', '请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function () {
record.set('credit_code', '');
}, 20);
return false;
}
}
}
}
//选择承租人带出开票信息 //选择承租人带出开票信息
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
<a:link id="${/parameter/@layout_code}_prj_project_update_status_link_id" <a:link id="${/parameter/@layout_code}_prj_project_update_status_link_id"
model="prj.PRJ505.prj_project_create_contract" modelaction="execute"/> model="prj.PRJ505.prj_project_create_contract" modelaction="execute"/>
<a:link id="prj501n_prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/> <a:link id="prj501n_prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/>
<a:link id="prj_update_credit_code_link_id" model="prj.PRJ500D.update_prj_credit_code" modelaction="update"/>
<a:link id="prj501n_check_machine_number_id" model="prj.PRJ501N.project_approval" modelaction="query"/> <a:link id="prj501n_check_machine_number_id" model="prj.PRJ501N.project_approval" modelaction="query"/>
<a:link id="prj501n_wfl_machine_number_detail_link_id" url="${/request/@context_path}/modules/prj/PRJ501N/prj501n_wfl_machine_number_detail.lview"/> <a:link id="prj501n_wfl_machine_number_detail_link_id" url="${/request/@context_path}/modules/prj/PRJ501N/prj501n_wfl_machine_number_detail.lview"/>
<a:link id="prj501n_check_machine_number_repeat_id" model="prj.PRJ501N.check_machine_number_repeat" modelaction="execute"/> <a:link id="prj501n_check_machine_number_repeat_id" model="prj.PRJ501N.check_machine_number_repeat" modelaction="execute"/>
...@@ -72,6 +73,8 @@ ...@@ -72,6 +73,8 @@
<link href="${/request/@context_path}/modules/viewerjs/viewer.css" rel="stylesheet"/> <link href="${/request/@context_path}/modules/viewerjs/viewer.css" rel="stylesheet"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer.js"/> <script src="${/request/@context_path}/modules/viewerjs/viewer.js"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer_tool.js"/> <script src="${/request/@context_path}/modules/viewerjs/viewer_tool.js"/>
<script src="${/request/@context_path}/modules/prj/PRJ500N/javascripts/input_validator.js"
type="text/javascript"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () {
Leaf.showConfirm('提示', '是否确认生成合同?', function () { Leaf.showConfirm('提示', '是否确认生成合同?', function () {
...@@ -596,7 +599,6 @@ ...@@ -596,7 +599,6 @@
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 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 tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master'); var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref'); var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
...@@ -607,6 +609,37 @@ ...@@ -607,6 +609,37 @@
$(tenant_ds_id).query(); $(tenant_ds_id).query();
} }
var creditCode;
var projectId;
if('${/parameter/@credit_flag}'=='M'){
if(bp_ds_id){
var record = $(bp_ds_id).getAll();
for(var i = 0;i<record.length;i++){
if(record[i].get('bp_class')=='ORG'&&record[i].get('bp_category')=='TENANT'){
creditCode = record[i].get('credit_code');
projectId = record[i].get('project_id');
}
}
Leaf.request({
url: $('prj_update_credit_code_link_id').getUrl(),
para: {
project_id:projectId,
credit_code:creditCode
},
success: function(res) {
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
bp_rate_flag = false;
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}; };
...@@ -647,6 +680,7 @@ ...@@ -647,6 +680,7 @@
//加载时调用(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) {
debugger;
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 lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item'); var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
//控制资管费现金流隐藏 //控制资管费现金流隐藏
...@@ -737,6 +771,18 @@ ...@@ -737,6 +771,18 @@
record.getField('vender_bank_account_num').setRequired(false); record.getField('vender_bank_account_num').setRequired(false);
} }
} }
if('${/parameter/@credit_flag}'=='M'){
if(record.get('bp_category') == 'TENANT'&&record.get('bp_class') == 'ORG'){
record.getField('credit_code').setReadOnly(false);
record.getField('credit_code').setRequired(true);
}if(record.get('bp_category') == 'TENANT'&&record.get('bp_class') == 'NP'){
var ds_gridBpId= ds.bindname+'_layout_grid_id';
$(ds_gridBpId).hideColumn('credit_code');
}
}else {
var ds_gridBpId= ds.bindname+'_layout_grid_id';
$(ds_gridBpId).hideColumn('credit_code');
}
} }
//现金流列表加载时隐藏资管费 18083 //现金流列表加载时隐藏资管费 18083
if(cashflow_ds_id == ds.id &&cashflow_ds_id){ if(cashflow_ds_id == ds.id &&cashflow_ds_id){
...@@ -1189,8 +1235,16 @@ ...@@ -1189,8 +1235,16 @@
credit_record.getField('credit_line_n').setRequired(true); credit_record.getField('credit_line_n').setRequired(true);
record.set('editable_flag','Y'); record.set('editable_flag','Y');
}else { }else {
if(document.getElementById('${/parameter/@layout_code}_save')){ if('${/parameter/@credit_flag}' !='M'){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none"; if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}else{
if(credit_record.get('bp_class')=='NP'){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
} }
} }
}else if(create_bp_code =='X00010005' || create_bp_code =='J00010006') { }else if(create_bp_code =='X00010005' || create_bp_code =='J00010006') {
...@@ -1199,8 +1253,16 @@ ...@@ -1199,8 +1253,16 @@
credit_record.getField('credit_line').setRequired(false); credit_record.getField('credit_line').setRequired(false);
credit_record.getField('credit_line_n').setRequired(false); credit_record.getField('credit_line_n').setRequired(false);
if('${/parameter/@editable_flag}' != 'YE'){ if('${/parameter/@editable_flag}' != 'YE'){
if(document.getElementById('${/parameter/@layout_code}_save')){ if('${/parameter/@credit_flag}' !='M'){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none"; if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}else{
if(credit_record.get('bp_class')=='NP'){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
} }
} }
}else if('${/parameter/@editable_flag}' != 'YE' && division != '93'){ }else if('${/parameter/@editable_flag}' != 'YE' && division != '93'){
...@@ -1209,9 +1271,16 @@ ...@@ -1209,9 +1271,16 @@
'prompt').style.display = 'none'; 'prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE').style.display = 'none'; document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE').style.display = 'none';
} }
if('${/parameter/@credit_flag}' !='M'){
if(document.getElementById('${/parameter/@layout_code}_save')){ if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none"; document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}else{
if(credit_record.get('bp_class')=='NP'){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
} }
}else if(division !='93') { }else if(division !='93') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE')){ if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE')){
...@@ -1224,8 +1293,16 @@ ...@@ -1224,8 +1293,16 @@
credit_record.getField('credit_line').setRequired(true); credit_record.getField('credit_line').setRequired(true);
credit_record.getField('credit_line_n').setRequired(true); credit_record.getField('credit_line_n').setRequired(true);
}else if(division=='93' && '${/parameter/@editable_flag}' != 'YE'){ }else if(division=='93' && '${/parameter/@editable_flag}' != 'YE'){
if(document.getElementById('${/parameter/@layout_code}_save')){ if('${/parameter/@credit_flag}' !='M'){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none"; if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}else{
if(credit_record.get('bp_class')=='NP'){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
} }
} }
} }
...@@ -1384,13 +1461,22 @@ ...@@ -1384,13 +1461,22 @@
} }
if('${/parameter/@function_usage}' == 'QUERY' && '${/parameter/@editable_flag}' != 'YE' && '${/parameter/@editable_flag}' != 'Y' ){ if('${/parameter/@function_usage}' == 'QUERY' && '${/parameter/@editable_flag}' != 'YE' && '${/parameter/@editable_flag}' != 'Y' ){
if(document.getElementById('${/parameter/@layout_code}_save')){ if('${/parameter/@credit_flag}' !='M'){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none"; if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}else{
if(credit_record.get('bp_class')=='NP'){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
} }
} }
}; };
if('${/parameter/@editable_flag}' == 'Y' || '${/parameter/@editable_flag}' == 'YE'){ if('${/parameter/@editable_flag}' == 'Y' || '${/parameter/@editable_flag}' == 'YE'){
debugger;
zjwfl5110_ApproveChecker_add('zjwfl5110_submit', function (type) { zjwfl5110_ApproveChecker_add('zjwfl5110_submit', function (type) {
var prj_project_ds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project'); var prj_project_ds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
if (type == 'agree') { if (type == 'agree') {
...@@ -1409,7 +1495,6 @@ ...@@ -1409,7 +1495,6 @@
} }
//更新时调用 //更新时调用
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 tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project'); var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
var prj_quotation_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation'); var prj_quotation_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
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');
...@@ -1429,6 +1514,57 @@ ...@@ -1429,6 +1514,57 @@
} }
} }
} }
if(name == 'credit_code'){
var credit_code;
if (!Leaf.isEmpty(value)) {
//去除空格
credit_code = value.trim();
credit_code = credit_code.replace(/[\t\r\f\n\s]*/g,"");
if (credit_code.length == '16'){
// if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
// Leaf.showMessage('提示', '中征码首字母需要大写');
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// setTimeout(function () {
// record.set('credit_code', '');
// }, 20);
// return false;
//
// }else {
// return true;
// }
let financeCode = new Array(16);
for (let i = 0; i < credit_code.length && i < 16; i++) {
financeCode[i] = credit_code.charCodeAt(i);
}
if(!checkDKK(financeCode)){
Leaf.showMessage('提示', '中征码错误');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function () {
record.set('credit_code', '');
}, 20);
return false;
}else {
if(old_value != value){
Leaf.showConfirm('${l:HLS.PROMPT}', '本次中征码维护值与基本信息维护值不一致,是否继续?', function() {
debugger;
record.set('credit_code', value);
}, function() {
debugger;
$(bp_ds_id).query();
});
}
}
}else {
Leaf.showMessage('提示', '请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function () {
record.set('credit_code', '');
}, 20);
return false;
}
}
}
} }
if(tenant_ds_id == ds.id&&tenant_ds_id){ if(tenant_ds_id == ds.id&&tenant_ds_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