Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
02e01bb4
Commit
02e01bb4
authored
Jun 28, 2024
by
lizhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取消机号校验请求
parent
681b2a2d
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
3469 additions
and
380 deletions
+3469
-380
con_re_incept_modify.lview
...in/webapp/modules/cont/CON3200/con_re_incept_modify.lview
+10
-39
con_re_incept_op_modify.lview
...webapp/modules/cont/CON3200/con_re_incept_op_modify.lview
+899
-0
con_contract_modify.lview
...main/webapp/modules/cont/CON505/con_contract_modify.lview
+1
-1
con_contract_op_modify.lview
...n/webapp/modules/cont/CON505/con_contract_op_modify.lview
+1224
-0
con_contract_closed_wfl.lview
.../webapp/modules/cont/CON542/con_contract_closed_wfl.lview
+1197
-0
prj_project_create.lview
src/main/webapp/modules/prj/PRJ500N/prj_project_create.lview
+66
-96
prj_project_create_constru.lview
...bapp/modules/prj/PRJ500N/prj_project_create_constru.lview
+0
-29
prj_project_maintain.lview
...ain/webapp/modules/prj/PRJ501N/prj_project_maintain.lview
+72
-114
prj_project_maintain_constru.lview
...pp/modules/prj/PRJ501N/prj_project_maintain_constru.lview
+0
-31
prj_project_maintain_constru_wfl.lview
...odules/prj/PRJ501N/prj_project_maintain_constru_wfl.lview
+0
-29
prj_project_maintain_wfl_new.lview
...pp/modules/prj/PRJ501N/prj_project_maintain_wfl_new.lview
+0
-41
No files found.
src/main/webapp/modules/cont/CON3200/con_re_incept_modify.lview
View file @
02e01bb4
...
...
@@ -844,53 +844,24 @@
}
}
if(!Leaf.isEmpty(secondary_lease)
&&
secondary_lease!='YES')
{
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;
}
}
}
]]
></script>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
<script
type=
"text/javascript"
>
<![CDATA[
Leaf.onReady(init);
Leaf.onReady(init);
function init() {
//用户对应员工不是员工 就不显示该附件组件
if("${/model/employee_info/record/@employee_type_code}" != 'STAFF'){
document.getElementById('${/parameter/@layout_code}_C_ATTCH_2_con_contract_grid_id_wrap').style.display = 'none';
function init() {
//用户对应员工不是员工 就不显示该附件组件
if("${/model/employee_info/record/@employee_type_code}" != 'STAFF'){
document.getElementById('${/parameter/@layout_code}_C_ATTCH_2_con_contract_grid_id_wrap').style.display = 'none';
}
//if('${/parameter/@paper_sign_ccr}' == 'Y' && "${/model/get_contract_ccr/record/@crr_count}" == 'Y'){
// Leaf.showInfoMessage('${l:PROMPT}','此合同进行过签约前变更,请注意租赁开始日和对应的租金还款计划',null,250,100);
//}
}
//if('${/parameter/@paper_sign_ccr}' == 'Y' && "${/model/get_contract_ccr/record/@crr_count}" == 'Y'){
// Leaf.showInfoMessage('${l:PROMPT}','此合同进行过签约前变更,请注意租赁开始日和对应的租金还款计划',null,250,100);
//}
}
]]>
</script>
]]>
</script>
</a:view>
</a:screen>
src/main/webapp/modules/cont/CON3200/con_re_incept_op_modify.lview
0 → 100644
View file @
02e01bb4
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Date: 2023-08-30
$Revision: 1.0
$Purpose:经营性租赁合同起租明细
-->
<a:screen
xmlns:a=
"http://www.leaf-framework.org/application"
xmlns:s=
"leaf.plugin.script"
customizationEnabled=
"true"
dynamiccreateenabled=
"true"
trace=
"true"
>
<a:init-procedure>
<a:model-query
model=
"cont.CON620.get_sys_role"
rootPath=
"role_info"
/>
<a:model-query
model=
"csh.CSH531F.csh_transaction_recoi_check_wfl"
rootPath=
"wfl_status"
/>
<a:model-query
model=
"cont.CON3200.get_user_employee_type"
rootPath=
"employee_info"
/>
<a:model-query
fetchAll=
"true"
model=
"cont.CON500.con_contract_get_guid_file_name"
rootPath=
"file_name_path"
/>
<s:server-script
import=
"contract_print_path.js"
>
<![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]>
</s:server-script>
<s:server-script
import=
"con_print_path.js"
>
<![CDATA[
set_parameter_file_path();
]]>
</s:server-script>
</a:init-procedure>
<a:view>
<a:link
id=
"wfl_readonly_pageLink_projectQueryScreen_update_project"
url=
"${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"
/>
<a:link
id=
"${/parameter/@layout_code}_con_contract_get_layout_code_link_id"
model=
"cont.CON500.con_contract_get_layout_code"
modelaction=
"update"
/>
<a:link
id=
"${/parameter/@layout_code}_con_contract_content_confirm_link_id"
url=
"${/request/@context_path}/modules/cont/CON501N/con_contract_content_confirm.lview"
/>
<a:link
id=
"contract_lease_item_query_link"
url=
"${/request/@context_path}/modules/cont/CON505/con_lease_item_query.lview"
/>
<a:link
id=
"contract_history_window_link"
url=
"${/request/@context_path}/modules/cont/CON501N/con_document_history_query.lview"
/>
<a:link
id=
"con505_hls_bp_master_query_link"
url=
"${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"
/>
<a:link
id=
"${/parameter/@layout_code}_prj500_cdd_uploadFile_id"
url=
"${/request/@context_path}/uploadFile.lview"
/>
<a:link
id=
"${/parameter/@layout_code}_prj500_cdd_downloadFile_id"
url=
"${/request/@context_path}/downloadFile.lview"
/>
<a:link
id=
"check_machine_number_id"
model=
"prj.PRJ501N.project_approval"
modelaction=
"query"
/>
<!--打印使用-->
<a:link
id=
"${/parameter/@layout_code}_con505_contract_content_id"
model=
"cont.CON505.con505_contract_content"
modelaction=
"update"
/>
<a:link
id=
"${/parameter/@layout_code}_creat_con_contract_content_link_id"
model=
"cont.CON505.con505_contract_content"
modelaction=
"execute"
/>
<a:link
id=
"${/parameter/@layout_code}_file_copy_from_template_link_id"
url=
"${/request/@context_path}/modules/cont/CON505/file_copy_from_template.lsc"
/>
<a:link
id=
"${/parameter/@layout_code}_con_batch_dl_link_id"
url=
"${/request/@context_path}/modules/cont/CON505/con_atm_batch_dl.lsc"
/>
<a:link
id=
"${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link"
url=
"${/request/@context_path}/modules/cont/CON302N/con_cashflow_wirte_off_detail.lview"
/>
<a:link
id=
"con_approval_link_id"
model=
"cont.CON505.contract_approval"
modelaction=
"execute"
/>
<!-- <link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>-->
<!-- <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>-->
<a:link
id=
"${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id"
url=
"${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n_for_ol.lview"
/>
<a:link
id=
"get_atch_download_link"
url=
"${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"
/>
<a:link
id=
"check_contract_status"
model=
"cont.CON3200.con_checklist_contract"
modelaction=
"query"
/>
<a:link
id=
"prj2000_pur_order_deteail_link_id"
url=
"${/request/@context_path}/modules/prj/PRJ2000/purchase_order_deteail.lview"
></a:link>
<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_tool.js"
/>
<script
type=
"text/javascript"
>
<![CDATA[
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var contract_id = $(ds_id).getCurrentRecord().get('contract_id');
new Leaf.Window({
id: 'contract_history_window',
url: $('contract_history_window_link').getUrl(),
params: {
contract_id: contract_id
},
fullScreen: true
});
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
// if (ds_id == ds.id && ds_id) {
// if (record.get('business_type') == 'LEASEBACK'&&'${/parameter/@function_usage}'=='MODIFY') {
// record.set('submit_date',null);
// record.set('guarantee_letter_f','N');
// record.set('guarantee_letter_f_n','否');
// record.getField('submit_date').setReadOnly(true);
// record.getField('guarantee_letter_f').setReadOnly(true);
// record.getField('guarantee_letter_f_n').setReadOnly(true);
// }else
// if (record.get('division')!='70'&&record.get('division')!='92'){
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN').style.display = 'none';
// if(document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_WRITE_OFF_AMOUNT_prompt')!=null){
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_WRITE_OFF_AMOUNT_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_WRITE_OFF_AMOUNT').style.display = 'none';
// }
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_BRAND_VALUE_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_BRAND_VALUE').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_MODELCD_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_MODELCD').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_USING_HOUR_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_USING_HOUR').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_RESIDUAL_VALUE_AMOUNT_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_RESIDUAL_VALUE_AMOUNT').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OWNERSHIP_FLAG_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OWNERSHIP_FLAG').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_PRODUCE_DATE_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_PRODUCE_DATE').style.display = 'none';
// }else if (record.get('division')=='70'||record.get('division')=='92'){
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_THIRD_PARTY_DEPOSIT_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_THIRD_PARTY_DEPOSIT').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE2_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE2').style.display = 'none';
// }
// if(record.get('division')=='92'){
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_WRITE_OFF_AMOUNT_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_WRITE_OFF_AMOUNT').style.display = 'none';
// }
//
//
// if (record.get('business_type') == 'LEASE') {
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT').style.display = 'none';
// }
// if (record.get('secondary_lease') == 'YES') {
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_REPUR_CONTRACT_ID').style.display = 'block';
// } else /*if (record.get('secondary_lease') == 'NO') */{
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_REPUR_CONTRACT_ID').style.display = 'none';
// }
// if (record.get('contract_status') != 'REPUR' && record.get('contract_status') != 'REPURING') {
// if (document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_BP_ID_TENANT_BF_REPUR_N')) {
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_BP_ID_TENANT_BF_REPUR_N_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_BP_ID_TENANT_BF_REPUR_N').style.display = 'none';
// }
// }
// //新增 “限制金额”字段;
// //“扣款限额”:“租金支付方式”为“建行扣款”时展示;
// if (record.get('pay_method') == 'CCB_THREE'||record.get('pay_method') == 'CCB_TWO') {
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'block';
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'block';
// } else {
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'none';
// }
// // if('${/parameter/@layout_code}' == "CONTRACT_CREATE_INC" && (record.get('division') == '70'&&record.get('division') == '92')){
// // if(Ext.isEmpty(record.get('guarantee_letter_f'))){
// // record.set('guarantee_letter_f','N');
// // record.set('guarantee_letter_f_n','否');
// // }
// // }
// }
};
// window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
// if (name == 'car_detail') {
// return '<a href="javascript:open_contract_window(\'' + record.id + '\',\'' + record.ds.id + '\')">
' + config_record.get('prompt') + '
</a>
';
// }
// return value;
// };
window['${/parameter/@layout_code}_received_amount_detail'] = function (ds_id, id, name, query_only) {
var url = $('${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link').getUrl();
var record = $(ds_id).findById(id);
if (record) {
var win = new Leaf.Window({
id: 'con_cashflow_wirte_off_detail_window',
url: url,
params: {
cashflow_id: record.get('cashflow_id'),
winid: 'con_cashflow_wirte_off_detail_window'
},
draggable: true,
fullScreen: true
});
}
};
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'project_number') {
return '
<a
href=
"javascript:wfl_prj501_grid_update(\'' + record.id + '\',\'' + record.ds.id + '\')"
>
' + value + '
</a>
';
} else if (name == 'gps_attch') {
link_function = '${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload';
if (record.get('atm_num3') > 0) {
return '
<a
style=
"color:red"
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
} else {
return '
<a
style=
"font-weight:bolder;font-size:1.2em"
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
}
} else if (name == 'description') {
if (record.get('important_flag') == 'Y') {
return '
<font
color=
"RED"
>
' + value + '
</font>
';
}
return value;
} else if (name == 'bp_link'
&&
record.get('bp_id')
&&
record.get('record_id')) {
link_function = '${/parameter/@layout_code}_open_bp_detail_window';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');"
>
' + config_record.get('prompt') + '
</a>
';
} else if (name == 'car_detail'
&&
record.get('contract_lease_item_id')) {
link_function = '${/parameter/@layout_code}_open_lease_item_detail_window';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');"
>
' + config_record.get('prompt') + '
</a>
';
} else if (name == 'attachment') {
link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_upload';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
} else if (name == 'attach_file_name' || name == 'attach_file_name_print' || name == 'attachment_new') {
var content_type = record.get('content_type');
var content_id = record.get('content_id');
//电子合同
// if(content_type == '01'){
// var link = '${/request/@context_path}/modules/xxx/pdf_download.lsc?type=SIN
&
content_id=' + content_id;
// var url = '';
// url = url + '
<a
href=
' + link + '
>
' + '下载' + '
</a>
' + ',';
// return url;
// }else {
if (value != null) {
var link = '${/request/@context_path}/atm_download.lsc?attachment_id=';
var str = value.split(';;');
var url = '';
for (var i = 0; i
< str.length
;
i++)
{
var
temp =
str[i].split('--');
if
(!Leaf.isEmpty(temp[0]))
{
var
file_name =
temp[0].toUpperCase();
var
file_suffix =
temp[0].substr(temp[0].lastIndexOf('.')
+
1).toUpperCase();
//
if
(file_name.indexOf('.PDF')
>
= 0) {
// url = url + '
<a
href=
javascript:view_pdf(\''
+
temp[1]
+
'\')
>
' + temp[0] + '
</a>
' + ',';
// } else
// if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
// url = url + '
<a
href=
' + link + temp[1] + '
ref=
"img"
>
' + temp[0] + '
</a>
' + ',';
// }
if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
// url = url + '
<a
ref=
"img"
href=
' + link + temp[1] + '
>
' + temp[0] + '
</a>
' + ',';
link_function = 'show_viewer_more';
url = url + '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + link + '\',\'' + temp[1] + '\',\'' + temp[0] + '\',\'' + value + '\');"
>
' + temp[0] + '
</a>
' + ',';
} else {
url = url + '
<a
href=
' + link + temp[1] + '
>
' + temp[0] + '
</a>
' + ',';
}
}
}
return url;
}
//}
} else if (name == 'received_amount') {
link_function = '${/parameter/@layout_code}_received_amount_detail';
if (value) {
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + Leaf.formatMoney(value) + '
</a>
';
}
return '';
} else if (name == 'attach_file_name_new') {
link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_new_upload';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
}else if(name=='lease_detail'
&&
record.get('project_lease_item_id')!=null) {
link_function = 'cont3200_lease_renderer';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' +'明细' + '
</a>
';
}
};
function wfl_prj501_grid_update(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var param = {};
param['bp_class'] = record.get('bp_class');
param['project_id'] = record.get('project_id');
param['function_code'] = 'PRJ502D';
param['function_usage'] = 'QUERY';
param['url_title'] = '租赁申请查询';
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'wfl_readonly_pageLink_projectQueryScreen_update_project', record.ds.id, '${/parameter/@layout_code}');
}
function cont3200_lease_renderer(record_id, ds_id) {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item');
var record = $(ds_id).getCurrentRecord();
var project_id=record.get('source_project_id');
var param = {};
var param = record.data;
param['function_code'] = 'PRJ2000D_WFL';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY'
param['url_title'] = '采购申请单维护';
param['project_id'] = project_id;
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'prj2000_pur_order_deteail_link_id', null, '${/parameter/@layout_code}');
}
window['${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload'] = function (ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
// if (record.get('con_contract_id')) {
var url;
if (query_only == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT
&
header_id=' + record.get('contract_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT
&
header_id=' + record.get('contract_id');
}
var win = new Leaf.Window({
url: url,
title: 'gps附件上传',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_ast_con_cdd4_attachtment_upload_id',
width: 850,
height: 400
});
// win.on('close', function(){
// $(ds_id).query();
// });
// } else {
// Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
// }
};
window['${/parameter/@layout_code}_open_lease_item_detail_window'] = function (id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
var contract_lease_item_id = record.get('contract_lease_item_id');
new Leaf.Window({
id: 'contract_lease_item_maintain_window',
url: $('contract_lease_item_query_link').getUrl(),
params: {
contract_lease_item_id: contract_lease_item_id,
winid: 'contract_lease_item_maintain_window'
},
draggable: true,
fullScreen: true
});
};
window['${/parameter/@layout_code}_open_bp_detail_window'] = function (id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};//record.data;
param['bp_id'] = record.get('bp_id');
param['cdd_list_id'] = record.get('cdd_list_id');
param['company_id'] = '${/session/company_id}';
param['document_id'] = record.get('bp_id');
param['document_category'] = 'BP';
param['bp_class'] = record.get('bp_class');
param['bp_category'] = record.get('bp_category');
if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
} else {
param['function_code'] = 'HLS215D_OP';
param['function_usage'] = 'QUERY';
}
param['bp_type'] = record.get('bp_type');
param['download'] = 'Y';
param['url_title'] = '${l:HLS212.BP_MASTER_QUERY}';
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'con505_hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
};
// function open_contract_window(record_id, ds_id) {
// var record = $(ds_id).findById(record_id);
// var param = record.data;
// var contract_lease_item_id = record.get('contract_lease_item_id');
// new Leaf.Window({
// id: 'contract_lease_item_maintain_window',
// url: $('contract_lease_item_maintain_link').getUrl(),
// params: {
// contract_lease_item_id: contract_lease_item_id
// },
// fullScreen: true
// });
// // param['function_code'] = 'CON501D';
// // param['function_usage'] = 'MODIFY';
// // param['maintain_type'] = 'UPDATE';
// // param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
// // hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link',ds_id);
// }
window['${/parameter/@layout_code}_prj500_cdd_attachtment_upload'] = function (ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('check_id')) {
var url;
if (record.get('attachment_tab_group') == 'LEASE_ANNEX'
&&
'${/parameter/@con_query_only}' == 'N') {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
} else if (record.get('attachment_tab_group') == 'LEASE_ANNEX'
&&
'${/parameter/@con_query_only}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
} else if (query_only == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_downloadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
};
//add by 24976
window['${/parameter/@layout_code}_prj500_cdd_attachtment_new_upload'] = function (ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('check_id')) {
var url;
//add by lijingjing 2019-11-15
if (query_only == 'Y' || '${/parameter/@download}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT
&
header_id=' + record.get('check_id');
} else {
//url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT
&
header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_downloadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
};
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
//
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record = $(ds_id).getCurrentRecord();
var content_id;
//alert($('${/parameter/@layout_code}_con505_contract_content_id').getUrl);
Leaf.request({
url: $('${/parameter/@layout_code}_con505_contract_content_id').getUrl(),
para: {
content_id: content_id,
contract_id: record.get('contract_id'),
contract_bp_id: record.get('content_bp_pk'),
clause_usage: 'GH_WITHHOLD_AGREE'
},
success: function (rsc) {
//
//alert(rsc.result.content_id);
Leaf.request({
url: $('${/parameter/@layout_code}_creat_con_contract_content_link_id').getUrl(),
para: {
content_id: rsc.result.content_id,
file_path: '${/parameter/@file_path}'
},
success: function () {
Leaf.request({
url: $('${/parameter/@layout_code}_file_copy_from_template_link_id').getUrl(),
para: {
contract_id: record.get('contract_id'),
content_id: rsc.result.content_id,
file_path: '${/parameter/@file_path}',
batch_flag: 'Y'
},
success: function () {
var url = $('${/parameter/@layout_code}_con_batch_dl_link_id').getUrl() + '?contract_id=' + record.get('contract_id') + '
&
content_id=' + rsc.result.content_id;
window.open(url, '_self');
unlock_current_window();
}
});
unlock_current_window();
},
error: function () {
unlock_current_window();
},
failure: function () {
unlock_current_window();
},
scope: this
});
},
error: function () {
unlock_current_window();
},
failure: function () {
unlock_current_window();
},
scope: this
});
};
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record = $(ds_id).getCurrentRecord();
var direct_debit_bank_id = record.get('direct_debit_bank_id');
var dd_bank_account_name = record.get('dd_bank_account_name');
var dd_bank_account_num = record.get('dd_bank_account_num');
if (!Ext.isEmpty(record.get('contract_number'))) {
new Leaf.Window({
id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id',
params: {
action: 'VIEW',
contract_id: record.get('contract_id'),
company_id: record.get('company_id'),
document_category: record.get('document_category'),
business_type: record.get('business_type'),
winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id'
},
url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(),
title: '合同查看',
width: 1300,
height: 550
});
} else {
Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!');
}
};
var change_flag = 'N';
//工作流中合同文本生成按钮
//基本信息tab页 新增必输字段的校验 add by liukang 20160328
window['${/parameter/@layout_code}_print_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var con_lease_item_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item');
var record = $(ds_id).getCurrentRecord();
var con_lease_record = $(con_lease_item_id).getCurrentRecord();
var direct_debit_bank_id = record.get('direct_debit_bank_id');
var dd_bank_account_name = record.get('dd_bank_account_name');
var dd_bank_account_num = record.get('dd_bank_account_num');
var color_of_apprearance = con_lease_record.get('color_of_apprearance');
var item_frame_number = con_lease_record.get('item_frame_number');
var item_engine_number = con_lease_record.get('item_engine_number');
var license_number = con_lease_record.get('license_number');
/* if (Ext.isEmpty(direct_debit_bank_id)) {
Leaf.showMessage('${l:HLS.PROMPT}', '请先填写数据并保存!');
} else */
if (!Ext.isEmpty(record.get('contract_number'))) {
var win = new Leaf.Window({
id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id',
params: {
contract_id: record.get('contract_id'),
company_id: record.get('company_id'),
document_category: record.get('document_category'),
business_type: record.get('business_type'),
winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id',
change_flag: change_flag,
contract_name: record.get('contract_name'),
contract_number: record.get('contract_number')
},
url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(),
title: '合同文本生成',
width: 1300,
height: 550
});
//在关闭页面之后,刷新一下ds
win.on('close', function () {
if (ds_id) {
$(ds_id).query();
}
});
} else {
Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!');
}
};
//add by zhuxianfei 20180207
function view_pdf(attachment_id) {
Leaf.request({
url: '${/request/@context_path}/autocrud/fnd.fnd_atm_attachment/query',
para: {
attachment_id: attachment_id
},
success: function (res) {
var path = res.result.record.file_path;
path = path.substr(path.indexOf('hls_attachment'));
var tomcat_source = '${/parameter/@tomcat_source}';
var source_path = 'http://' + window.location.host + '/' + tomcat_source + '/' + path + '?type=pdf';
var oWin = window.open(source_path);
},
scope: this
});
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
// var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_bs_score');
// if (ds == $(ds_id)) {
// qpara.contract_id = '${/parameter/@contract_id}';
//$(ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}');
// }
};
/* 时间戳转换为时间 */
function timestampToTime(timestamp) {
timestamp = timestamp ? timestamp : null;
var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
var Y = date.getFullYear() + '-';
var M = (date.getMonth() + 1
< 10
?
'0'
+
(date.getMonth()
+
1)
:
date.getMonth()
+
1)
+
'-';
var
D =
(date.getDate()
<
10
?
'0'
+
date.getDate()
:
date.getDate());
//
var
h =
(date.getHours()
<
10
?
'0'
+
date.getHours()
:
date.getHours())
+
':';
//
var
m =
(date.getMinutes()
<
10
?
'0'
+
date.getMinutes()
:
date.getMinutes())
+
':';
//
var
s =
date.getSeconds()
<
10
?
'0'
+
date.getSeconds()
:
date.getSeconds();
return
Y
+
M
+
D;
};
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click']
=
function
()
{
debugger;
var
ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
var
lease_item_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract_lease_item');
var
record =
$(ds_id).getCurrentRecord();
var
lease_item_record =
$(lease_item_id).getAt(0);
var
contract_id =
record.get('contract_id');
var
ref_d09 =
timestampToTime(Date.parse(lease_item_record.get('ref_d09')));
var
lease_start_date =
timestampToTime(Date.parse(record.get('lease_start_date')));
/*if(lease_start_date
>
ref_d09){
Leaf.showMessage('${l:PROMPT}','采购单的付款预定日期需大于合同起租日,请重新选择!');
return;
}*/
if (lease_item_record.dirty) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if ($(ds_id).validate()) {
if(record.get('write_off_amount')
<record.get
('deposit')){
Leaf.showMessage('${l:PROMPT}','经租设备需要保证金入账后才能起租');
return;
}
if('${/parameter/@sign_contract_status}'
==
'SIGNING'){
Leaf.showErrorMessage('提示','当前合同处于签约中,请先完成合同签约!');
return
false;
}
Leaf.showConfirm('${HLS.PROMPT}',
'确认要提交工作流吗?',
function
()
{
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url:
$('con_approval_link_id').getUrl(),
para:
{
contract_id:
contract_id
},
scope:
this,
success:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
}
window['${/parameter/@layout_code}_quote_layout_dynamic_click']
=
function
()
{
debugger;
var
ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
var
cashflow_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract_cashflow');
var
record =
$(ds_id).getCurrentRecord();
var
price_list =
record.get('price_list');
var
calc_session_id =
record.get('calc_session_id');
var
parent_pk_value =
record.get('contract_id');
var
calc_type =
'${/parameter/@calc_type}'
||
'CLASSIC_CALCULATOR';
var
maintain_type =
'QUERY'
if
(calc_session_id)
{
//直接进入报价页面
var
win =
new
Leaf.Window({
id:
'hls_fin_calc_quotation_update_link_winid',
params:
{
layout_code:
'${/parameter/@layout_code}',
document_id:
parent_pk_value,
price_list:
price_list,
document_category:
'CONTRACT',
contract_status:
record.get('contract_status'),
maintain_type:
'MODIFY',
business_type:
record.get('business_type'),
calc_session_id:
record.get('calc_session_id'),
quotation_id:
record.get('quotation_id'),
dsId:
cashflow_ds_id,
winId:
'hls_fin_calc_quotation_update_link_winid',
global_flag:
'Y',
id_num:
1,
calc_type:
calc_type,
recreate_L_formula:
'Y',
recreate_H_formula:
'Y'
},
url:
$('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl(),
fullScreen:
true,
draggable:
true
});
win.on('close',
function
()
{
$(cashflow_ds_id).query();
$(ds_id).query();
});
}
}
Leaf.onReady(function
()
{
debugger;
var
ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'T_INVOICE_INFO',
'con_contract_bp');
if
(ds_id)
{
$(ds_id).setQueryUrl('${/request/@context_path}/autocrud/prj.PRJ501N.con_contract_bp/query');
$(ds_id).setQueryParameter('contract_id',
'${/parameter/@contract_id}');
$(ds_id).query();
}
})
//附件打包下载
window['${/parameter/@layout_code}_C_ATTCH_I_USER_BUTTON1_layout_dynamic_tab_click']
=
function
()
{
var
con_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
var
contract_record =
$(con_ds_id).getAt(0);
var
contract_id =
contract_record.get('contract_id');
var
contract_number =
contract_record.get('contract_number');
var
cdd_list_id =
contract_record.get('cdd_list_id');
var
doc_code =
contract_number
+
'-'
+
'SIGN';
var
url_l =
$('get_atch_download_link').getUrl()
+
'?
table_pk_value=
' + contract_id + '
&
table_name=
CON_CONTRACT'
+
'&
doc_code=
' + doc_code + '
&
group_flag=
Y'
+
'&
cdd_list_id=
' + cdd_list_id + '
&
group_code=
SIGN'
+
'&
ele_flag=
Y';
window.open(
href =
url_l,
target =
"_self"
);
};
//附件打包下载
window['${/parameter/@layout_code}_C_ATTCH_2_USER_BUTTON1_layout_dynamic_tab_click']
=
function
()
{
var
con_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
var
contract_record =
$(con_ds_id).getAt(0);
var
contract_id =
contract_record.get('contract_id');
var
contract_number =
contract_record.get('contract_number');
var
cdd_list_id =
contract_record.get('cdd_list_id');
var
doc_code =
contract_number
+
'-'
+
'SIGN';
var
url_l =
$('get_atch_download_link').getUrl()
+
'?
table_pk_value=
' + contract_id + '
&
table_name=
CON_CONTRACT'
+
'&
doc_code=
' + doc_code + '
&
group_flag=
Y'
+
'&
cdd_list_id=
' + cdd_list_id + '
&
group_code=
LEASE_ANNEX';
window.open(
href =
url_l,
target =
"_self"
);
};
//附件打包下载
window['${/parameter/@layout_code}_C_ATTCH_1_USER_BUTTON1_layout_dynamic_tab_click']
=
function
()
{
var
con_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
var
contract_record =
$(con_ds_id).getAt(0);
var
contract_id =
contract_record.get('contract_id');
var
contract_number =
contract_record.get('contract_number');
var
cdd_list_id =
contract_record.get('cdd_list_id');
var
doc_code =
contract_number
+
'-'
+
'PRJ';
var
url_l =
$('get_atch_download_link').getUrl()
+
'?
table_pk_value=
' + contract_id + '
&
table_name=
CON_CONTRACT'
+
'&
doc_code=
' + doc_code + '
&
group_flag=
Y'
+
'&
cdd_list_id=
' + cdd_list_id + '
&
group_code=
CREDIT_CHECK';
window.open(
href =
url_l,
target =
"_self"
);
};
//加载时调用(grid,table,gridBox)
add
by
23459
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load']
=
function
(ds,
record,
config_records,
bp_seq)
{
var
lease_item_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'G_LEASE_HEAD_CAR',
'con_contract_lease_item');
//
if(
ds.id =
=
lease_item_ds_id&&lease_item_ds_id){
//
var
gridId=
ds.bindname+'_layout_grid_id';
//
if(
record.data.division=
='70'
||
record.data.division=
='92'){
//
$(gridId).hideColumn('full_name');
//
$(gridId).hideColumn('division_n');
//
$(gridId).hideColumn('equipments');
//
$(gridId).hideColumn('machine_model_class_n');
//
$(gridId).hideColumn('item_type_n');
//
$(gridId).hideColumn('equipment_type_n');
//
$(gridId).hideColumn('machine_number');
//
record.getField('machine_number').setRequired(false);
//
}else
{
//
$(gridId).hideColumn('machine_number_70');
//
$(gridId).hideColumn('lease_name_n');
//
$(gridId).hideColumn('brand_value');
//
$(gridId).hideColumn('type_name');
//
$(gridId).hideColumn('produce_date');
//
$(gridId).hideColumn('using_hour');
//
$(gridId).hideColumn('detention_amount');
//
$(gridId).hideColumn('residual_value_amount');
//
$(gridId).hideColumn('ownership_flag_n');
//
$(gridId).hideColumn('created_by_n');
//
}
//
//
}
var
cashflow_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'G_CASHFLOW_1',
'con_contract_cashflow');
if(
ds.id =
=
cashflow_ds_id&&cashflow_ds_id){
var
gridId=
ds.bindname+'_layout_grid_id';
if("${/model/role_info/record/@role_code}"
=="0018"
||
"${/model/role_info/record/@role_code}"
=="0019"
){
$(gridId).hideColumn('gld_received_amount');
}
}
};
var
count =
0;
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit']
=
function
(ds,
record)
{
debugger;
var
lease_item_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'G_LEASE_HEAD_CAR',
'con_contract_lease_item');
var
lease_item_record =
$(lease_item_ds_id).getCurrentRecord();
var
con_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
var
contract_record =
$(con_ds_id).getAt(0);
var
project_id =
contract_record.get('project_id');
var
machine_number =
lease_item_record.get('machine_number_70');
var
division =
lease_item_record.get('division');
var
machine_number_num =
0;
var
secondary_lease =
record.get('secondary_lease')
;
var
contract_id =
record.get('contract_id');
var
contract_status =
record.get('contract_status');
var
contract_status_result =
''
;
var
ref_d09 =
timestampToTime(Date.parse(lease_item_record.get('ref_d09')));
var
lease_start_date =
timestampToTime(Date.parse(contract_record.get('lease_start_date')));
//校验付款预定日期
/*if(lease_start_date
>
ref_d09){
Leaf.showMessage('${l:PROMPT}','采购单的付款预定日期需大于合同起租日,请重新选择!');
return false;
}*/
//校验合同状态
if(!Leaf.isEmpty(contract_status)){
Leaf.request({
url: $('check_contract_status').getUrl(),
para: {
contract_id: contract_id
},
scope: this,
sync: true,
success: function (res) {
contract_status_result = res.result.record.contract_status;
},
failure: function () {
return false;
},
});
if (contract_status != contract_status_result) {
$L.showErrorMessage('提示', '合同状态已发生改变,需要重新刷新页面!');
return false;
}
}
if(!Leaf.isEmpty(secondary_lease)
&&
secondary_lease!='YES') {
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;
}
}
}
]]>
</script>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
<script
type=
"text/javascript"
>
<![CDATA[
Leaf.onReady(init);
function init() {
//用户对应员工不是员工 就不显示该附件组件
if("${/model/employee_info/record/@employee_type_code}" != 'STAFF'){
document.getElementById('${/parameter/@layout_code}_C_ATTCH_2_con_contract_grid_id_wrap').style.display = 'none';
}
}
]]>
</script>
</a:view>
</a:screen>
src/main/webapp/modules/cont/CON505/con_contract_modify.lview
View file @
02e01bb4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/main/webapp/modules/cont/CON505/con_contract_op_modify.lview
0 → 100644
View file @
02e01bb4
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$Date: 2023-8-30
$Revision: 1.0
$Purpose:
-->
<a:screen
xmlns:a=
"http://www.leaf-framework.org/application"
xmlns:s=
"leaf.plugin.script"
customizationEnabled=
"true"
dynamiccreateenabled=
"true"
trace=
"true"
>
<a:init-procedure>
<a:model-query
model=
"cont.CON620.get_sys_role"
rootPath=
"role_info"
/>
<a:model-query
fetchAll=
"true"
model=
"cont.CON620.get_sysdate"
rootPath=
"sysdate"
/>
<a:model-query
fetchAll=
"true"
model=
"cont.CON500.con_contract_get_guid_file_name"
rootPath=
"file_name_path"
/>
<a:model-query
defaultWhereClause=
"t1.user_id=${/session/@user_id}"
fetchAll=
"true"
model=
"wx.WX100.sys_pilot_run_user"
rootPath=
"pilot_run_user"
/>
<s:server-script
import=
"contract_print_path.js"
>
<![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]>
</s:server-script>
<s:server-script
import=
"con_print_path.js"
>
<![CDATA[
set_parameter_file_path();
]]>
</s:server-script>
</a:init-procedure>
<a:view>
<a:link
id=
"wfl_readonly_pageLink_projectQueryScreen_update_project"
url=
"${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"
/>
<a:link
id=
"${/parameter/@layout_code}_con_contract_get_layout_code_link_id"
model=
"cont.CON500.con_contract_get_layout_code"
modelaction=
"update"
/>
<a:link
id=
"${/parameter/@layout_code}_con_contract_content_confirm_link_id"
url=
"${/request/@context_path}/modules/cont/CON501N/con_contract_content_confirm.lview"
/>
<a:link
id=
"contract_lease_item_query_link"
url=
"${/request/@context_path}/modules/cont/CON505/con_lease_item_query.lview"
/>
<a:link
id=
"contract_history_window_link"
url=
"${/request/@context_path}/modules/cont/CON501N/con_document_history_query.lview"
/>
<a:link
id=
"con505_hls_bp_master_query_link"
url=
"${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"
/>
<a:link
id=
"${/parameter/@layout_code}_prj500_cdd_uploadFile_id"
url=
"${/request/@context_path}/uploadFile.lview"
/>
<a:link
id=
"${/parameter/@layout_code}_prj500_cdd_downloadFile_id"
url=
"${/request/@context_path}/downloadFile.lview"
/>
<a:link
id=
"check_machine_number_id_con"
model=
"prj.PRJ501N.project_approval"
modelaction=
"query"
/>
<!--打印使用-->
<a:link
id=
"${/parameter/@layout_code}_con505_contract_content_id"
model=
"cont.CON505.con505_contract_content"
modelaction=
"update"
/>
<a:link
id=
"${/parameter/@layout_code}_creat_con_contract_content_link_id"
model=
"cont.CON505.con505_contract_content"
modelaction=
"execute"
/>
<a:link
id=
"${/parameter/@layout_code}_file_copy_from_template_link_id"
url=
"${/request/@context_path}/modules/cont/CON505/file_copy_from_template.lsc"
/>
<a:link
id=
"${/parameter/@layout_code}_con_batch_dl_link_id"
url=
"${/request/@context_path}/modules/cont/CON505/con_atm_batch_dl.lsc"
/>
<a:link
id=
"${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link"
url=
"${/request/@context_path}/modules/cont/CON302N/con_cashflow_wirte_off_detail.lview"
/>
<a:link
id=
"con_approval_link_id"
model=
"cont.CON505.contract_approval"
modelaction=
"update"
/>
<a:link
id=
"con_sign_cancel_link_id"
model=
"cont.CON505.contract_sign_cancel"
modelaction=
"update"
/>
<a:link
id=
"${/parameter/@layout_code}_con_ele_content_create_link_id"
url=
"${/request/@context_path}/modules/wx/WX100/con_ele_content_create.lsc"
/>
<a:link
id=
"${/parameter/@layout_code}_con_ele_agent_link_id"
url=
"${/request/@context_path}/modules/wx/WX100/con_ele_agent_content_create.lsc"
/>
<a:link
id=
"${/parameter/@layout_code}_con_ele_sign_cancel_link_id"
url=
"${/request/@context_path}/modules/cont/CON505/con_ele_sign_cancel.lsc"
/>
<a:link
id=
"${/parameter/@layout_code}_ele_operator_verify_link_id"
url=
"${/request/@context_path}/modules/wx/WX100/wx_ele_verify_operator.lsc"
/>
<a:link
id=
"cont_con_sale_contract_info_print_link"
url=
"${/request/@context_path}/modules/cont/CON505/contract_receipt_op.lsc"
/>
<!-- <link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>-->
<!-- <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>-->
<a:link
id=
"get_atch_download_link_con"
url=
"${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"
/>
<a:link
id=
"prj2000_pur_order_deteail_link_id"
url=
"${/request/@context_path}/modules/prj/PRJ2000/purchase_order_deteail.lview"
></a:link>
<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_tool.js"
/>
<script
type=
"text/javascript"
>
<![CDATA[
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var contract_id = $(ds_id).getCurrentRecord().get('contract_id');
new Leaf.Window({
id: 'contract_history_window',
url: $('contract_history_window_link').getUrl(),
params: {
contract_id: contract_id
},
fullScreen: true
});
};
// window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
// if (name == 'car_detail') {
// return '<a href="javascript:open_contract_window(\'' + record.id + '\',\'' + record.ds.id + '\')">
' + config_record.get('prompt') + '
</a>
';
// }
// return value;
// };
window['${/parameter/@layout_code}_received_amount_detail'] = function (ds_id, id, name, query_only) {
var url = $('${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link').getUrl();
var record = $(ds_id).findById(id);
if (record) {
var win = new Leaf.Window({
id: 'con_cashflow_wirte_off_detail_window',
url: url,
params: {
cashflow_id: record.get('cashflow_id'),
winid: 'con_cashflow_wirte_off_detail_window'
},
draggable: true,
fullScreen: true
});
}
};
//超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'project_number') {
return '
<a
href=
"javascript:wfl_prj501_grid_update(\'' + record.id + '\',\'' + record.ds.id + '\')"
>
' + value + '
</a>
';
} else if (name == 'gps_attch') {
link_function = '${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload';
if (record.get('atm_num3') > 0) {
return '
<a
style=
"color:red"
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
} else {
return '
<a
style=
"font-weight:bolder;font-size:1.2em"
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
}
} else if (name == 'description') {
if (record.get('important_flag') == 'Y') {
return '
<font
color=
"RED"
>
' + value + '
</font>
';
}
return value;
} else if (name == 'bp_link'
&&
record.get('bp_id')
&&
record.get('record_id')) {
link_function = '${/parameter/@layout_code}_open_bp_detail_window';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');"
>
' + config_record.get('prompt') + '
</a>
';
} else if (name == 'car_detail'
&&
record.get('contract_lease_item_id')) {
link_function = '${/parameter/@layout_code}_open_lease_item_detail_window';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');"
>
' + config_record.get('prompt') + '
</a>
';
} else if (name == 'attachment') {
link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_upload';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
} else if (name == 'attach_file_name' || name == 'attach_file_name_print' || name == 'attachment_new') {
var content_type = record.get('content_type');
var content_id = record.get('content_id');
//电子合同
// if(content_type == '01'){
// var link = '${/request/@context_path}/modules/xxx/pdf_download.lsc?type=SIN
&
content_id=' + content_id;
// var url = '';
// url = url + '
<a
href=
' + link + '
>
' + '下载' + '
</a>
' + ',';
// return url;
// }else {
if (value != null) {
var link = '${/request/@context_path}/atm_download.lsc?attachment_id=';
var str = value.split(';;');
var url = '';
for (var i = 0; i
< str.length
;
i++)
{
var
temp =
str[i].split('--');
if
(!Leaf.isEmpty(temp[0]))
{
var
file_name =
temp[0].toUpperCase();
var
file_suffix =
temp[0].substr(temp[0].lastIndexOf('.')
+
1).toUpperCase();
//
if
(file_name.indexOf('.PDF')
>
= 0) {
// url = url + '
<a
href=
javascript:view_pdf(\''
+
temp[1]
+
'\')
>
' + temp[0] + '
</a>
' + ',';
// } else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
// url = url + '
<a
href=
' + link + temp[1] + '
ref=
"img"
>
' + temp[0] + '
</a>
' + ',';
// }
if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
// url = url + '
<a
ref=
"img"
href=
' + link + temp[1] + '
>
' + temp[0] + '
</a>
' + ',';
link_function = 'show_viewer_more';
url = url + '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + link + '\',\'' + temp[1] + '\',\'' + temp[0] + '\',\'' + value + '\');"
>
' + temp[0] + '
</a>
' + ',';
}
else {
url = url + '
<a
href=
' + link + temp[1] + '
>
' + temp[0] + '
</a>
' + ',';
}
}
}
return url;
}
//}
} else if (name == 'received_amount') {
link_function = '${/parameter/@layout_code}_received_amount_detail';
if (value) {
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + Leaf.formatMoney(value) + '
</a>
';
}
return '';
} else if (name == 'attach_file_name_new') {
link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_new_upload';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
}else if (name == 'signer_attachment') {
link_function = '${/parameter/@layout_code}_signer_attachtment_upload';
if(record.get('bp_class') == 'NP'){
return '';
}else {
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
}
} else if(name=='lease_detail'
&&
record.get('project_lease_item_id')!=null) {
link_function = 'cont501n_lease_renderer';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' +'明细' + '
</a>
';
}
};
function wfl_prj501_grid_update(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var param = {};
param['bp_class'] = record.get('bp_class');
param['project_id'] = record.get('project_id');
param['function_code'] = 'PRJ502D';
param['function_usage'] = 'QUERY';
param['url_title'] = '租赁申请查询';
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'wfl_readonly_pageLink_projectQueryScreen_update_project', record.ds.id, '${/parameter/@layout_code}');
}
function cont501n_lease_renderer(record_id, ds_id) {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item');
var record = $(ds_id).getCurrentRecord();
var project_id=record.get('source_project_id');
var param = {};
var param = record.data;
param['function_code'] = 'PRJ2000D_WFL';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY'
param['url_title'] = '采购申请单维护';
param['project_id'] = project_id;
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'prj2000_pur_order_deteail_link_id', null, '${/parameter/@layout_code}');
}
window['${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload'] = function (ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
// if (record.get('con_contract_id')) {
var url;
if (query_only == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT
&
header_id=' + record.get('contract_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT
&
header_id=' + record.get('contract_id');
}
var win = new Leaf.Window({
url: url,
title: 'gps附件上传',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_ast_con_cdd4_attachtment_upload_id',
width: 850,
height: 400
});
// win.on('close', function(){
// $(ds_id).query();
// });
// } else {
// Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
// }
};
window['${/parameter/@layout_code}_open_lease_item_detail_window'] = function (id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
var contract_lease_item_id = record.get('contract_lease_item_id');
new Leaf.Window({
id: 'contract_lease_item_maintain_window',
url: $('contract_lease_item_query_link').getUrl(),
params: {
contract_lease_item_id: contract_lease_item_id,
winid: 'contract_lease_item_maintain_window'
},
draggable: true,
fullScreen: true
});
};
window['${/parameter/@layout_code}_open_bp_detail_window'] = function (id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};//record.data;
param['bp_id'] = record.get('bp_id');
param['cdd_list_id'] = record.get('cdd_list_id');
param['company_id'] = '${/session/company_id}';
param['document_id'] = record.get('bp_id');
param['document_category'] = 'BP';
param['bp_class'] = record.get('bp_class');
param['bp_category'] = record.get('bp_category');
if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
} else {
param['function_code'] = 'HLS215D_OP';
param['function_usage'] = 'QUERY';
}
param['bp_type'] = record.get('bp_type');
param['download'] = 'Y';
param['url_title'] = '${l:HLS212.BP_MASTER_QUERY}';
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'con505_hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
};
// function open_contract_window(record_id, ds_id) {
// var record = $(ds_id).findById(record_id);
// var param = record.data;
// var contract_lease_item_id = record.get('contract_lease_item_id');
// new Leaf.Window({
// id: 'contract_lease_item_maintain_window',
// url: $('contract_lease_item_maintain_link').getUrl(),
// params: {
// contract_lease_item_id: contract_lease_item_id
// },
// fullScreen: true
// });
// // param['function_code'] = 'CON501D';
// // param['function_usage'] = 'MODIFY';
// // param['maintain_type'] = 'UPDATE';
// // param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
// // hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link',ds_id);
// }
window['${/parameter/@layout_code}_prj500_cdd_attachtment_upload'] = function (ds_id, id, name, query_only) {
debugger;
var record = $(ds_id).findById(id);
if (record.get('check_id')) {
var url;
//add by lijingjing 2019-11-15
if (record.get('attachment_tab_group') == 'ORERAT_CHECK'
&&
'${/parameter/@query_only}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
} else if (record.get('attachment_tab_group') == 'PUR_CON_SIGN'
&&
'${/parameter/@con_query_only}' == 'N') {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
} else if (record.get('attachment_tab_group') == 'PUR_CON_SIGN'
&&
'${/parameter/@con_query_only}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
} else if (query_only == 'Y' || '${/parameter/@download}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
};
window['${/parameter/@layout_code}_prj500_cdd_attachtment_new_upload'] = function (ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('check_id')) {
var url;
//add by lijingjing 2019-11-15
if (query_only == 'Y' || '${/parameter/@download}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT
&
header_id=' + record.get('check_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT
&
header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
};
//签约人授权附件
window['${/parameter/@layout_code}_signer_attachtment_upload'] = function (ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('signer')
&&
record.get('bp_class') == 'ORG'
&&
record.get('sign_type_n') == '电子签约') {
var url;
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=HLS_BP_MASTER_SIGNER
&
header_id=' + record.get('signer');
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
}
};
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
//
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record = $(ds_id).getCurrentRecord();
var content_id;
//alert($('${/parameter/@layout_code}_con505_contract_content_id').getUrl);
Leaf.request({
url: $('${/parameter/@layout_code}_con505_contract_content_id').getUrl(),
para: {
content_id: content_id,
contract_id: record.get('contract_id'),
contract_bp_id: record.get('content_bp_pk'),
clause_usage: 'GH_WITHHOLD_AGREE'
},
success: function (rsc) {
//
//alert(rsc.result.content_id);
Leaf.request({
url: $('${/parameter/@layout_code}_creat_con_contract_content_link_id').getUrl(),
para: {
content_id: rsc.result.content_id,
file_path: '${/parameter/@file_path}'
},
success: function () {
Leaf.request({
url: $('${/parameter/@layout_code}_file_copy_from_template_link_id').getUrl(),
para: {
contract_id: record.get('contract_id'),
content_id: rsc.result.content_id,
file_path: '${/parameter/@file_path}',
batch_flag: 'Y'
},
success: function () {
var url = $('${/parameter/@layout_code}_con_batch_dl_link_id').getUrl() + '?contract_id=' + record.get('contract_id') + '
&
content_id=' + rsc.result.content_id;
window.open(url, '_self');
unlock_current_window();
}
});
unlock_current_window();
},
error: function () {
unlock_current_window();
},
failure: function () {
unlock_current_window();
},
scope: this
});
},
error: function () {
unlock_current_window();
},
failure: function () {
unlock_current_window();
},
scope: this
});
};
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record = $(ds_id).getCurrentRecord();
var direct_debit_bank_id = record.get('direct_debit_bank_id');
var dd_bank_account_name = record.get('dd_bank_account_name');
var dd_bank_account_num = record.get('dd_bank_account_num');
if (!Ext.isEmpty(record.get('contract_number'))) {
new Leaf.Window({
id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id',
params: {
action: 'VIEW',
contract_id: record.get('contract_id'),
company_id: record.get('company_id'),
document_category: record.get('document_category'),
business_type: record.get('business_type'),
winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id'
},
url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(),
title: '合同查看',
width: 1300,
height: 550
});
} else {
Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!');
}
};
var change_flag = 'N';
//工作流中合同文本生成按钮
//基本信息tab页 新增必输字段的校验 add by liukang 20160328
window['${/parameter/@layout_code}_print_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var con_lease_item_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item');
var record = $(ds_id).getCurrentRecord();
var con_lease_record = $(con_lease_item_id).getCurrentRecord();
var direct_debit_bank_id = record.get('direct_debit_bank_id');
var dd_bank_account_name = record.get('dd_bank_account_name');
var dd_bank_account_num = record.get('dd_bank_account_num');
var color_of_apprearance = con_lease_record.get('color_of_apprearance');
var item_frame_number = con_lease_record.get('item_frame_number');
var item_engine_number = con_lease_record.get('item_engine_number');
var license_number = con_lease_record.get('license_number');
/* if (Ext.isEmpty(direct_debit_bank_id)) {
Leaf.showMessage('${l:HLS.PROMPT}', '请先填写数据并保存!');
} else */
if (!Ext.isEmpty(record.get('contract_number'))) {
var win = new Leaf.Window({
id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id',
params: {
contract_id: record.get('contract_id'),
company_id: record.get('company_id'),
document_category: record.get('document_category'),
business_type: record.get('business_type'),
winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id',
change_flag: change_flag,
contract_name: record.get('contract_name'),
contract_number: record.get('contract_number')
},
url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(),
title: '合同文本生成',
width: 1300,
height: 550
});
//在关闭页面之后,刷新一下ds
win.on('close', function () {
if (ds_id) {
$(ds_id).query();
}
});
} else {
Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!');
}
};
//add by zhuxianfei 20180207
function view_pdf(attachment_id) {
Leaf.request({
url: '${/request/@context_path}/autocrud/fnd.fnd_atm_attachment/query',
para: {
attachment_id: attachment_id
},
success: function (res) {
var path = res.result.record.file_path;
path = path.substr(path.indexOf('hls_attachment'));
var tomcat_source = '${/parameter/@tomcat_source}';
var source_path = 'http://' + window.location.host + '/' + tomcat_source + '/' + path + '?type=pdf';
var oWin = window.open(source_path);
},
scope: this
});
}
//加载时调用(grid,table,gridBox) add by 24976
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_1', 'con_contract_bp');
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'con_contract_lease_item');
if(ds.id == lease_item_ds_id
&&
lease_item_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if(record.data.division=='70'|| record.data.division=='92'){
$(gridId).hideColumn('full_name');
$(gridId).hideColumn('division_n');
$(gridId).hideColumn('equipments');
$(gridId).hideColumn('machine_model_class_n');
$(gridId).hideColumn('item_type_n');
$(gridId).hideColumn('equipment_type_n');
$(gridId).hideColumn('machine_number');
}else {
$(gridId).hideColumn('machine_number_70');
$(gridId).hideColumn('lease_name_n');
$(gridId).hideColumn('brand_value');
$(gridId).hideColumn('type_name');
$(gridId).hideColumn('produce_date');
$(gridId).hideColumn('using_hour');
$(gridId).hideColumn('detention_amount');
$(gridId).hideColumn('residual_value_amount');
$(gridId).hideColumn('ownership_flag_n');
$(gridId).hideColumn('created_by_n');
}
}
if (ds.id == bp_ds_id) {
//var bp_class = record.get('bp_class');
var marital_status = record.get('marital_status');
var sp_sign_flag_n = record.get('sp_sign_flag_n');
if (marital_status != 30
&&
marital_status != 40
&&
sp_sign_flag_n === undefined) {
record.getField('sp_sign_flag').setReadOnly(true);
record.getField('sp_sign_flag_n').setReadOnly(true);
record.set('sp_sign_flag', '-');
record.set('sp_sign_flag_n', '-');
}
if(sp_sign_flag_n == '-'){
record.getField('sp_sign_flag').setReadOnly(true);
record.getField('sp_sign_flag_n').setReadOnly(true);
}
}
// var cashflow_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CASHFLOW_1', 'con_contract_cashflow');
// if(ds.id == cashflow_ds_id
&&
cashflow_ds_id){
// var gridId= ds.bindname+'_layout_grid_id';
// if("${/model/role_info/record/@role_code}" =="0018" || "${/model/role_info/record/@role_code}" =="0019" ){
// $(gridId).hideColumn('gld_received_amount');
// }
// }
var cashflow_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CASHFLOW_1', 'con_contract_cashflow');
if(ds.id == cashflow_ds_id
&&
cashflow_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if("${/model/role_info/record/@role_code}" =="0018" || "${/model/role_info/record/@role_code}" =="0019" ){
$(gridId).hideColumn('gld_received_amount');
}
}
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_bs_score');
if (ds.id == ds_id) {
qpara.contract_id = '${/parameter/@contract_id}';
//$(ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}');
}
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record=$(ds_id).getCurrentRecord();
if(ds_id==ds.id
&&
ds_id){
record.set('sign_type','PAPER_SIGN');
record.set('sign_type_n','纸质签约');
}
// if (ds_id == ds.id
&&
ds_id) {
// if (record.get('division')!='70'
&&
record.get('division')!='92'){
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_BRAND_VALUE_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_BRAND_VALUE').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_MODELCD_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_MODELCD').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_USING_HOUR_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_USING_HOUR').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_RESIDUAL_VALUE_AMOUNT_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_RESIDUAL_VALUE_AMOUNT').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OWNERSHIP_FLAG_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OWNERSHIP_FLAG').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_PRODUCE_DATE_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_PRODUCE_DATE').style.display = 'none';
// }else if(record.get('division')=='70'||record.get('division')=='92'){
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_THIRD_PARTY_DEPOSIT_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_THIRD_PARTY_DEPOSIT').style.display = 'none';
//
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE2_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE2').style.display = 'none';
// record.getField('lease_item_location').setRequired(true);
// }
// if(record.get('division')=='92'){
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN').style.display = 'none';
// }
//
// //业务类型回租时,默认只读“首付款抵扣”选项
// if (record.get('business_type') == 'LEASEBACK'
&&
'${/parameter/@function_usage}' == 'MODIFY') {
// //document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT_prompt').style.display = 'block';
// // document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT').style.display = 'block';
// record.getField('entrusted_amount').setRequired(true);
// } else if (record.get('business_type') == 'LEASE') {
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT').style.display = 'none';
// }
// if(record.get('bp_class') == 'NP' || record.get('sign_type_n') == '纸质签约'){
// record.getField('signer_n').setReadOnly(true);
// /* record.getField('sale_con_ele_flag_n').setReadOnly(true);
// record.getField('to_seller_amount').setReadOnly(true);
// record.getField('to_factory_amount').setReadOnly(true);*/
// record.getField('signer_n').setRequired(false);
// /* record.getField('sale_con_ele_flag_n').setRequired(false);
// record.getField('to_seller_amount').setRequired(false);
// record.getField('to_factory_amount').setRequired(false);*/
// record.set('signer_n','');
//
// }else if ('${/parameter/@function_usage}' == 'MODIFY'
&&
record.get('sign_type_n') == '电子签约'
&&
record.get('bp_class') == 'ORG'){
// record.getField('signer_n').setReadOnly(false);
// record.getField('signer_n').setRequired(true);
// }
// if (record.get('prj_delivery_address') != null
&&
record.get('prj_delivery_address') != ''){
// record.getField('delivery_address').setReadOnly(true);
// }
// if (record.get('prj_lease_item_location') != null
&&
record.get('prj_lease_item_location') != ''){
// record.getField('lease_item_location').setReadOnly(true);
// }
// //如果选择电子签约,且买卖合同电子签、且是直租
// if('${/parameter/@function_usage}' == 'MODIFY'
&&
record.get('sign_type_n') == '电子签约'){
// if (record.get('business_type') == 'LEASE' || record.get('secondary_lease') == 'YES'){
// record.getField('sale_con_ele_flag_n').setRequired(true);
// record.getField('sale_con_ele_flag_n').setReadOnly(false);
// }else{
// record.getField('sale_con_ele_flag_n').setReadOnly(true);
// record.getField('to_seller_amount').setReadOnly(true);
// record.getField('to_factory_amount').setReadOnly(true);
// record.getField('sale_con_ele_flag_n').setRequired(false);
// record.getField('to_seller_amount').setRequired(false);
// record.getField('to_factory_amount').setRequired(false);
// }
// }
// //买卖合同是否生成
// if('${/parameter/@function_usage}' == 'MODIFY'
&&
record.get('sale_con_ele_flag_n') == '是'){
// record.getField('to_seller_amount').setReadOnly(false);
// record.getField('to_factory_amount').setReadOnly(false);
// record.getField('to_seller_amount').setRequired(true);
// record.getField('to_factory_amount').setRequired(true);
// }else if('${/parameter/@function_usage}' == 'MODIFY'
&&
record.get('sale_con_ele_flag_n') == '否'){
// record.getField('to_seller_amount').setReadOnly(true);
// record.getField('to_factory_amount').setReadOnly(true);
// record.getField('to_seller_amount').setRequired(false);
// record.getField('to_factory_amount').setRequired(false);
// }
// //新增 “限制金额”字段;
// //“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示;
// if (record.get('pay_method') == 'CCB_THREE'||record.get('pay_method') == 'CCB_TWO') {
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'block';
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'block';
// } else {
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'none';
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'none';
// }
// }
};
//更新时调用
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'], 'con_contract');
if (ds_id == ds.id
&&
ds_id) {
var record = $(ds_id).getCurrentRecord();
var bp_tenant_class = record.get('bp_class');
if (name == 'sign_type_n') {
if(value == '纸质签约'){
record.getField('signer_n').setReadOnly(true);
record.getField('sale_con_ele_flag_n').setReadOnly(true);
record.getField('to_seller_amount').setReadOnly(true);
record.getField('to_factory_amount').setReadOnly(true);
record.getField('signer_n').setRequired(false);
record.getField('sale_con_ele_flag_n').setRequired(false);
record.getField('to_seller_amount').setRequired(false);
record.getField('to_factory_amount').setRequired(false);
record.set('signer_n','');
record.set('sale_con_ele_flag_n','');
record.set('to_seller_amount','');
record.set('to_factory_amount','');
}else if (value == '电子签约'
&&
bp_tenant_class == 'ORG'){
record.getField('signer_n').setReadOnly(false);
record.getField('sale_con_ele_flag_n').setReadOnly(false);
record.getField('to_seller_amount').setReadOnly(false);
record.getField('to_factory_amount').setReadOnly(false);
record.getField('signer_n').setRequired(true);
record.set('ec_sign_type','NEW');
record.set('sign_contract_status','NEW');
//如果选择电子签约,且买卖合同电子签、且是直租
if (record.get('business_type') == 'LEASE' || record.get('secondary_lease') == 'YES'){
record.getField('sale_con_ele_flag_n').setRequired(true);
record.getField('sale_con_ele_flag_n').setReadOnly(false);
record.getField('to_seller_amount').setReadOnly(false);
record.getField('to_factory_amount').setReadOnly(false);
}else{
record.getField('sale_con_ele_flag_n').setReadOnly(true);
record.getField('to_seller_amount').setReadOnly(true);
record.getField('to_factory_amount').setReadOnly(true);
record.getField('sale_con_ele_flag_n').setRequired(false);
record.getField('to_seller_amount').setRequired(false);
record.getField('to_factory_amount').setRequired(false);
}
}else if(value == '电子签约'
&&
bp_tenant_class == 'NP'){
record.getField('signer_n').setReadOnly(true);
record.set('ec_sign_type','NEW');
record.set('sign_contract_status','NEW');
//如果选择电子签约,且买卖合同电子签、且是直租
if (record.get('business_type') == 'LEASE' || record.get('secondary_lease') == 'YES'){
record.getField('sale_con_ele_flag_n').setRequired(true);
record.getField('sale_con_ele_flag_n').setReadOnly(false);
record.getField('to_seller_amount').setReadOnly(false);
record.getField('to_factory_amount').setReadOnly(false);
}else{
record.getField('sale_con_ele_flag_n').setReadOnly(true);
record.getField('sale_con_ele_flag_n').setRequired(false);
}
}
}
if(name == 'sale_con_ele_flag_n'){
//如果选择电子签约,且买卖合同电子签、且是直租
if (value == '是'){
record.getField('to_seller_amount').setRequired(true);
record.getField('to_factory_amount').setRequired(true);
record.getField('to_seller_amount').setReadOnly(false);
record.getField('to_factory_amount').setReadOnly(false);
}else{
record.getField('to_seller_amount').setRequired(false);
record.getField('to_factory_amount').setRequired(false);
record.getField('to_seller_amount').setReadOnly(true);
record.getField('to_factory_amount').setReadOnly(true);
}
}
}
};
/*保存前调用校验*/
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
var check_flag = true;
var contract_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var con_record = $(contract_ds_id).getAt(0);
if (contract_ds_id == ds.id
&&
$(contract_ds_id).validate()) {
if (con_record.get('business_type') == 'LEASEBACK') {
//“保存”按钮增加校验:若所填写小于0或大于设备款价格,点击按钮校验提示:“委托付款金额有误,请重新填写!”
if (con_record.get('entrusted_amount')
< 0
||
con_record.get('entrusted_amount')
>
minus(con_record.get('lease_item_amount'),con_record.get('other_payment2')||0)) {
Leaf.showMessage('${HLS.PROMPT}', '委托付款金额有误,请重新填写!');
return false;
}
}
debugger;
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'con_contract_lease_item');
var lease_item_record = $(lease_item_ds_id).getCurrentRecord();
var machine_number = lease_item_record.get('machine_number_70');
var division = lease_item_record.get('division');
var project_id = con_record.get('project_id');
var machine_number_num = 0;
var secondary_lease = record.get('secondary_lease') ;
if(!Leaf.isEmpty(secondary_lease)
&&
secondary_lease!='YES') {
if (division == '92'
&&
!Leaf.isEmpty(machine_number)) {
Leaf.request({
url: $('check_machine_number_id_con').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) {
$L.showErrorMessage('提示', '该机号已存在,请重新确认!');
return false;
}
}
//add by 26887cz 2021-07-21
if (record.get('signing_city')){
// var reg = /^([\u2E80-\u9FFF]){4,}$/;
// if (!reg.test(record.get('signing_city'))) {
// $L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)');
// return false;
// }
//var reg=/^[\u2E80-\u9FFF]{1,}市[\u2E80-\u9FFF]{1,}[州县区][a-zA-Z0-9-\u2E80-\u9FFF]+$/;
if (record.get('signing_city').indexOf('州') == -1
&&
record.get('signing_city').indexOf('县') == -1
&&
record.get('signing_city').indexOf('区') == -1) {
Leaf.showConfirm('${HLS.PROMPT}', '合同签订地所填写内容,未细化到区/县/州级别,是否确认?', function () {});
}
}
} else {
check_flag = false;
}
return check_flag;
};
//取消签约按钮 add by 24976
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record = $(ds_id).getCurrentRecord();
var contract_id = record.get('contract_id');
var sign_contract_status = record.get('sign_contract_status');
var sign_type = record.get('sign_type') || 'PAPER_SIGN';
if (sign_contract_status != 'SIGNING') {
Leaf.showMessage('${l:PROMPT}', '只有签约中的合同可以取消签约');
return;
}
if (sign_contract_status == 'SIGNING'
&&
sign_type == 'PAPER_SIGN'){
Leaf.showConfirm('${HLS.PROMPT}', '确认要取消签约吗?', function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('con_sign_cancel_link_id').getUrl(),
para: {
contract_id: contract_id
},
scope: this,
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}else if(sign_type == 'ELE_SIGN'
&&
sign_contract_status == 'SIGNING'){
Leaf.showConfirm('${HLS.PROMPT}', '确认取消电子签约吗?', function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('${/parameter/@layout_code}_con_ele_sign_cancel_link_id').getUrl(),
para: {
contract_id: contract_id
},
scope: this,
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if (res.result.message != null){
Leaf.showMessage('${l:HLS.PROMPT}', res.result.message)
}else{
$('${/parameter/@winid}').close();
}
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
};
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record = $(ds_id).getCurrentRecord();
var contract_id = record.get('contract_id');
//add by 24976
var sign_type = record.get('sign_type');
var lease_start_date = record.get('lease_start_date');
var business_type = record.get('business_type');
var bp_class = record.get('bp_class');
var con_lease_item_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item');
var con_lease_record = $(con_lease_item_id).getCurrentRecord();
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP_1', 'con_contract_bp');
var machine_number = con_lease_record.get('machine_number');
var con_bp_record = $(bp_ds_id).getCurrentRecord();
if (record.dirty == true || con_lease_record.dirty == true || con_bp_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
// if(record.get('contract_status')!='NEW'){
// $L.showErrorMessage("错误",'只能新建状态的合同才能发起签约!');
// return;
// }
debugger;
if ($(ds_id).validate()) {
if (sign_type == 'ELE_SIGN'){
Leaf.showConfirm('${HLS.PROMPT}', '确认要发起电子签约吗?', function () {
debugger;
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
//获取当前日期
var date = new Date('${/model/sysdate/record/@sys_date}').format('yyyy-mm-dd');
//校验起租日
var v_lease_start_date = lease_start_date.format('yyyy-mm-dd');
var dtNew=new Date(v_lease_start_date);
var dateTime=dtNew.setDate(dtNew.getDate()+2);
var data2=new Date(dateTime).format('yyyy-mm-dd');
if (data2
< date
||
date<v_lease_start_date)
{
Leaf.showMessage('${l:PROMPT}',
'当前时间不在起租72小时范围内,不允许发起电子签约!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
/*
if
(v_lease_start_date
!=
date)
{
Leaf.showMessage('${l:PROMPT}',
'起租日不等于当前时间,不允许发起电子签约!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}*/
if(
business_type =
=
'LEASEBACK'
&&
bp_class =
=
'NP'&&
record.get('division')
!=
70
&&
record.get('division')
!=
92){
Leaf.showMessage('${l:PROMPT}',
'此类业务尚未开放电子签约功能');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
//addby
xsh35973
20221017
神钢建机回租不让发起电子签约
if
(record.get('division')
==
91
&&
business_type =
=
'LEASEBACK'){
Leaf.showMessage('${l:PROMPT}',
'此类业务尚未开放电子签约功能');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
if
(Ext.isEmpty(machine_number)
&&
Ext.isEmpty(con_lease_record.get('machine_number_70')))
{//update
by
xsh25973
铁甲机号machine_number_70
Leaf.showMessage('${l:HLS.PROMPT}',
'请先填写机号并保存!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
var
con_bp_records =
$(bp_ds_id).getAll();
for
(var
i =
0;i
<
con_bp_records.length;i++)
{
var
sp_sign_flag =
con_bp_records[i].get('sp_sign_flag');
var
sp_sign_flag_n =
con_bp_records[i].get('sp_sign_flag_n');
if
(Ext.isEmpty(sp_sign_flag)
||
Ext.isEmpty(sp_sign_flag_n))
{
Leaf.showMessage('${l:HLS.PROMPT}',
'请先选择配偶是否签署并保存!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
}
Leaf.request({
url:$('${/parameter/@layout_code}_ele_operator_verify_link_id').getUrl(),
para:{
contract_id:contract_id,
esign_type:'CE'
},
scope:this,
success:
function
(res)
{
if(
res.result.check_flag =
=
'N'){
Leaf.showConfirm('${HLS.PROMPT}',
res.result.result_message,
function
()
{
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url:
$('${/parameter/@layout_code}_con_ele_content_create_link_id').getUrl(),
para:
{
contract_id:
contract_id
},
scope:
this,
success:
function
()
{
Leaf.request({
url:
$('${/parameter/@layout_code}_con_ele_agent_link_id').getUrl(),
para:
{
contract_id:
contract_id
},
scope:
this,
success:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure:
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']();
},
error:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}else{
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url:
$('${/parameter/@layout_code}_con_ele_content_create_link_id').getUrl(),
para:
{
contract_id:
contract_id
},
scope:
this,
success:
function
()
{
Leaf.request({
url:
$('${/parameter/@layout_code}_con_ele_agent_link_id').getUrl(),
para:
{
contract_id:
contract_id
},
scope:
this,
success:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure:
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']();
},
error:
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']();
}
});
});
}
else
if
(
sign_type =
=
'PAPER_SIGN'){
debugger;
Leaf.showConfirm('${HLS.PROMPT}',
'确认要提交工作流吗?',
function
()
{
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url:
$('con_approval_link_id').getUrl(),
para:
{
contract_id:
contract_id,
},
scope:
this,
success:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
}
};
if
('${/parameter/@source_type}'
==
'WFL')
{
zjwfl5110_ApproveChecker_add('zjwfl5110_submit',
function
(type)
{
var
con_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
if
(
type =
=
'agree')
{
if
($(con_ds_id).validate())
{
if
($(con_ds_id).isModified())
{
Leaf.showMessage('${HLS.PROMPT}',
'请先保存');
return
false;
}
//提交先保存
return
true;
}
else
{
return
false;
}
}
else
return
true;
});
}
Leaf.onReady(function
()
{
debugger;
var
ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'T_INVOICE_INFO',
'con_contract_bp');
if
(ds_id)
{
$(ds_id).setQueryUrl('${/request/@context_path}/autocrud/prj.PRJ501N.con_contract_bp/query');
$(ds_id).setQueryParameter('contract_id',
'${/parameter/@contract_id}');
$(ds_id).query();
}
//add
by
24976
if("${/parameter/@function_usage}"
==
'QUERY'&&
"${/parameter/@sign_contract_status}"
==
'SIGNING'
&&
"${/parameter/@contract_status}"
==
'NEW'){
document.getElementById("${/parameter/@layout_code}_user_button4")
.style.display =
''
;
}else
if
("${/parameter/@function_usage}"
==
'QUERY'){
//$("${/parameter/@layout_code}_user_button4").hide();
document.getElementById("${/parameter/@layout_code}_user_button4")
.style.display =
"none"
;
}
if
('${/model/pilot_run_user/record/@pilot_run_flag}'
!=
'Y'
&&
"${/parameter/@function_usage}"
==
'QUERY'){
document.getElementById("${/parameter/@layout_code}_user_button4")
.style.display =
"none"
;
}
})
//附件打包下载
window['${/parameter/@layout_code}_C_ATTCH_I_USER_BUTTON1_layout_dynamic_tab_click']
=
function
()
{
var
con_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
var
contract_record =
$(con_ds_id).getAt(0);
var
contract_id =
contract_record.get('contract_id');
var
contract_number =
contract_record.get('contract_number');
var
cdd_list_id=
contract_record.get('cdd_list_id');
var
doc_code=
contract_number+'-'+'SIGN';
var
url_l =
$('get_atch_download_link_con').getUrl()
+
'?
table_pk_value=
' + contract_id + '
&
table_name=
CON_CONTRACT'+
'&
doc_code=
' + doc_code+ '
&
group_flag=
Y'+
'&
cdd_list_id=
' + cdd_list_id+ '
&
group_code=
SIGN';
window.open(
href =
url_l,
target =
"_self"
);
};
//附件打包下载
window['${/parameter/@layout_code}_C_ATTCH_2_USER_BUTTON1_layout_dynamic_tab_click']
=
function
()
{
var
con_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
var
contract_record =
$(con_ds_id).getAt(0);
var
contract_id =
contract_record.get('contract_id');
var
contract_number =
contract_record.get('contract_number');
var
cdd_list_id=
contract_record.get('cdd_list_id');
var
doc_code=
contract_number+'-'+'SIGN';
var
url_l =
$('get_atch_download_link_con').getUrl()
+
'?
table_pk_value=
' + contract_id + '
&
table_name=
CON_CONTRACT'+
'&
doc_code=
' + doc_code+ '
&
group_flag=
Y'+
'&
cdd_list_id=
' + cdd_list_id+ '
&
group_code=
SIGN';
window.open(
href =
url_l,
target =
"_self"
);
};
//附件打包下载
window['${/parameter/@layout_code}_C_ATTCH_1_USER_BUTTON1_layout_dynamic_tab_click']
=
function
()
{
var
con_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
var
contract_record =
$(con_ds_id).getAt(0);
var
contract_id =
contract_record.get('contract_id');
var
contract_number =
contract_record.get('contract_number');
var
cdd_list_id=
contract_record.get('cdd_list_id');
var
doc_code=
contract_number+'-'+'PRJ';
var
url_l =
$('get_atch_download_link_con').getUrl()
+
'?
table_pk_value=
' + contract_id + '
&
table_name=
CON_CONTRACT'+
'&
doc_code=
' + doc_code+ '
&
group_flag=
Y'+
'&
cdd_list_id=
' + cdd_list_id+ '
&
group_code=
CREDIT_CHECK';
window.open(
href =
url_l,
target =
"_self"
);
};
//计划生成表打印
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click']
=
function()
{
debugger;
var
ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
var
record =
$(ds_id).getCurrentRecord();
var
contract_id =
record.get('contract_id');
var
search_term_1 =
record.get('search_term_1');
if(
search_term_1 =
=
undefined
||
$(ds_id).isModified()==true){
Leaf.showErrorMessage('提示:','请先保存当前页面!');
return
false;
}
Leaf.Masker.mask(Ext.getBody());
var
url =
$('cont_con_sale_contract_info_print_link').getUrl();
Leaf.request({
url:
url,
para:
{
contract_id:
contract_id,
},
success:
function(res)
{
debugger;
Leaf.Masker.unmask(Ext.getBody());
var
ds_id=
'CONTRACT_CREATE_OP_N_C_ATTCH_2_prj_cdd_item_doc_ref_ds'
;
$(ds_id).query();
},
failure:
function()
{
Leaf.Masker.unmask(Ext.getBody());
},
error:
function()
{
Leaf.Masker.unmask(Ext.getBody());
},
scope:
this
});
}
]]
></script>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
</a:view>
</a:screen>
src/main/webapp/modules/cont/CON542/con_contract_closed_wfl.lview
0 → 100644
View file @
02e01bb4
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zlf
$Date: 2014-11-10 下午5:42:24
$Revision: 1.0
$Purpose:
-->
<a:screen
xmlns:a=
"http://www.leaf-framework.org/application"
xmlns:s=
"leaf.plugin.script"
customizationEnabled=
"true"
dynamiccreateenabled=
"true"
trace=
"true"
>
<a:init-procedure>
<a:model-query
model=
"cont.CON620.get_sys_role"
rootPath=
"role_info"
/>
<a:model-query
fetchAll=
"true"
model=
"cont.CON620.get_sysdate"
rootPath=
"sysdate"
/>
<a:model-query
fetchAll=
"true"
model=
"cont.CON500.con_contract_get_guid_file_name"
rootPath=
"file_name_path"
/>
<a:model-query
defaultWhereClause=
"t1.user_id=${/session/@user_id}"
fetchAll=
"true"
model=
"wx.WX100.sys_pilot_run_user"
rootPath=
"pilot_run_user"
/>
<s:server-script
import=
"contract_print_path.js"
>
<![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]>
</s:server-script>
<s:server-script
import=
"con_print_path.js"
>
<![CDATA[
set_parameter_file_path();
]]>
</s:server-script>
</a:init-procedure>
<a:view>
<a:link
id=
"wfl_readonly_pageLink_projectQueryScreen_update_project"
url=
"${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"
/>
<a:link
id=
"${/parameter/@layout_code}_con_contract_get_layout_code_link_id"
model=
"cont.CON500.con_contract_get_layout_code"
modelaction=
"update"
/>
<a:link
id=
"${/parameter/@layout_code}_con_contract_content_confirm_link_id"
url=
"${/request/@context_path}/modules/cont/CON501N/con_contract_content_confirm.lview"
/>
<a:link
id=
"contract_lease_item_query_link"
url=
"${/request/@context_path}/modules/cont/CON505/con_lease_item_query.lview"
/>
<a:link
id=
"contract_history_window_link"
url=
"${/request/@context_path}/modules/cont/CON501N/con_document_history_query.lview"
/>
<a:link
id=
"con505_hls_bp_master_query_link"
url=
"${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"
/>
<a:link
id=
"${/parameter/@layout_code}_prj500_cdd_uploadFile_id"
url=
"${/request/@context_path}/uploadFile.lview"
/>
<a:link
id=
"${/parameter/@layout_code}_prj500_cdd_downloadFile_id"
url=
"${/request/@context_path}/downloadFile.lview"
/>
<a:link
id=
"check_machine_number_id_con"
model=
"prj.PRJ501N.project_approval"
modelaction=
"query"
/>
<!--打印使用-->
<a:link
id=
"${/parameter/@layout_code}_con505_contract_content_id"
model=
"cont.CON505.con505_contract_content"
modelaction=
"update"
/>
<a:link
id=
"${/parameter/@layout_code}_creat_con_contract_content_link_id"
model=
"cont.CON505.con505_contract_content"
modelaction=
"execute"
/>
<a:link
id=
"${/parameter/@layout_code}_file_copy_from_template_link_id"
url=
"${/request/@context_path}/modules/cont/CON505/file_copy_from_template.lsc"
/>
<a:link
id=
"${/parameter/@layout_code}_con_batch_dl_link_id"
url=
"${/request/@context_path}/modules/cont/CON505/con_atm_batch_dl.lsc"
/>
<a:link
id=
"${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link"
url=
"${/request/@context_path}/modules/cont/CON302N/con_cashflow_wirte_off_detail.lview"
/>
<a:link
id=
"con_approval_link_id"
model=
"cont.CON505.contract_approval"
modelaction=
"update"
/>
<a:link
id=
"con_sign_cancel_link_id"
model=
"cont.CON505.contract_sign_cancel"
modelaction=
"update"
/>
<a:link
id=
"${/parameter/@layout_code}_con_ele_content_create_link_id"
url=
"${/request/@context_path}/modules/wx/WX100/con_ele_content_create.lsc"
/>
<a:link
id=
"${/parameter/@layout_code}_con_ele_agent_link_id"
url=
"${/request/@context_path}/modules/wx/WX100/con_ele_agent_content_create.lsc"
/>
<a:link
id=
"${/parameter/@layout_code}_con_ele_sign_cancel_link_id"
url=
"${/request/@context_path}/modules/cont/CON505/con_ele_sign_cancel.lsc"
/>
<a:link
id=
"${/parameter/@layout_code}_ele_operator_verify_link_id"
url=
"${/request/@context_path}/modules/wx/WX100/wx_ele_verify_operator.lsc"
/>
<!-- <link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>-->
<!-- <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>-->
<a:link
id=
"get_atch_download_link_con"
url=
"${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"
/>
<a:link
id=
"prj2000_pur_order_deteail_link_id"
url=
"${/request/@context_path}/modules/prj/PRJ2000/purchase_order_deteail.lview"
></a:link>
<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_tool.js"
/>
<script
type=
"text/javascript"
>
<![CDATA[
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var contract_id = $(ds_id).getCurrentRecord().get('contract_id');
new Leaf.Window({
id: 'contract_history_window',
url: $('contract_history_window_link').getUrl(),
params: {
contract_id: contract_id
},
fullScreen: true
});
};
// window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
// if (name == 'car_detail') {
// return '<a href="javascript:open_contract_window(\'' + record.id + '\',\'' + record.ds.id + '\')">
' + config_record.get('prompt') + '
</a>
';
// }
// return value;
// };
window['${/parameter/@layout_code}_received_amount_detail'] = function (ds_id, id, name, query_only) {
var url = $('${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link').getUrl();
var record = $(ds_id).findById(id);
if (record) {
var win = new Leaf.Window({
id: 'con_cashflow_wirte_off_detail_window',
url: url,
params: {
cashflow_id: record.get('cashflow_id'),
winid: 'con_cashflow_wirte_off_detail_window'
},
draggable: true,
fullScreen: true
});
}
};
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'project_number') {
return '
<a
href=
"javascript:wfl_prj501_grid_update(\'' + record.id + '\',\'' + record.ds.id + '\')"
>
' + value + '
</a>
';
} else if (name == 'gps_attch') {
link_function = '${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload';
if (record.get('atm_num3') > 0) {
return '
<a
style=
"color:red"
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
} else {
return '
<a
style=
"font-weight:bolder;font-size:1.2em"
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
}
} else if (name == 'description') {
if (record.get('important_flag') == 'Y') {
return '
<font
color=
"RED"
>
' + value + '
</font>
';
}
return value;
} else if (name == 'bp_link'
&&
record.get('bp_id')
&&
record.get('record_id')) {
link_function = '${/parameter/@layout_code}_open_bp_detail_window';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');"
>
' + config_record.get('prompt') + '
</a>
';
} else if (name == 'car_detail'
&&
record.get('contract_lease_item_id')) {
link_function = '${/parameter/@layout_code}_open_lease_item_detail_window';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');"
>
' + config_record.get('prompt') + '
</a>
';
} else if (name == 'attachment') {
link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_upload';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
} else if (name == 'attach_file_name' || name == 'attach_file_name_print' || name == 'attachment_new') {
var content_type = record.get('content_type');
var content_id = record.get('content_id');
//电子合同
// if(content_type == '01'){
// var link = '${/request/@context_path}/modules/xxx/pdf_download.lsc?type=SIN
&
content_id=' + content_id;
// var url = '';
// url = url + '
<a
href=
' + link + '
>
' + '下载' + '
</a>
' + ',';
// return url;
// }else {
if (value != null) {
var link = '${/request/@context_path}/atm_download.lsc?attachment_id=';
var str = value.split(';;');
var url = '';
for (var i = 0; i
< str.length
;
i++)
{
var
temp =
str[i].split('--');
if
(!Leaf.isEmpty(temp[0]))
{
var
file_name =
temp[0].toUpperCase();
var
file_suffix =
temp[0].substr(temp[0].lastIndexOf('.')
+
1).toUpperCase();
//
if
(file_name.indexOf('.PDF')
>
= 0) {
// url = url + '
<a
href=
javascript:view_pdf(\''
+
temp[1]
+
'\')
>
' + temp[0] + '
</a>
' + ',';
// } else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
// url = url + '
<a
href=
' + link + temp[1] + '
ref=
"img"
>
' + temp[0] + '
</a>
' + ',';
// }
if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
// url = url + '
<a
ref=
"img"
href=
' + link + temp[1] + '
>
' + temp[0] + '
</a>
' + ',';
link_function = 'show_viewer_more';
url = url + '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + link + '\',\'' + temp[1] + '\',\'' + temp[0] + '\',\'' + value + '\');"
>
' + temp[0] + '
</a>
' + ',';
}
else {
url = url + '
<a
href=
' + link + temp[1] + '
>
' + temp[0] + '
</a>
' + ',';
}
}
}
return url;
}
//}
} else if (name == 'received_amount') {
link_function = '${/parameter/@layout_code}_received_amount_detail';
if (value) {
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + Leaf.formatMoney(value) + '
</a>
';
}
return '';
} else if (name == 'attach_file_name_new') {
link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_new_upload';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
}else if(name=='lease_detail'
&&
record.get('project_lease_item_id')!=null) {
link_function = 'cont501n_lease_renderer';
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' +'明细' + '
</a>
';
}else if (name == 'signer_attachment') {
link_function = '${/parameter/@layout_code}_signer_attachtment_upload';
if(record.get('bp_class') == 'NP'){
return '';
}else {
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
}
}
};
function wfl_prj501_grid_update(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var param = {};
param['bp_class'] = record.get('bp_class');
param['project_id'] = record.get('project_id');
param['function_code'] = 'PRJ502D';
param['function_usage'] = 'QUERY';
param['url_title'] = '租赁申请查询';
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'wfl_readonly_pageLink_projectQueryScreen_update_project', record.ds.id, '${/parameter/@layout_code}');
}
function cont501n_lease_renderer(record_id, ds_id) {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item');
var record = $(ds_id).getCurrentRecord();
var project_id=record.get('source_project_id');
var param = {};
var param = record.data;
param['function_code'] = 'PRJ2000D_WFL';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY'
param['url_title'] = '采购申请单维护';
param['project_id'] = project_id;
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'prj2000_pur_order_deteail_link_id', null, '${/parameter/@layout_code}');
}
window['${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload'] = function (ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
// if (record.get('con_contract_id')) {
var url;
if (query_only == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT
&
header_id=' + record.get('contract_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT
&
header_id=' + record.get('contract_id');
}
var win = new Leaf.Window({
url: url,
title: 'gps附件上传',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_ast_con_cdd4_attachtment_upload_id',
width: 850,
height: 400
});
// win.on('close', function(){
// $(ds_id).query();
// });
// } else {
// Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
// }
};
window['${/parameter/@layout_code}_open_lease_item_detail_window'] = function (id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
var contract_lease_item_id = record.get('contract_lease_item_id');
new Leaf.Window({
id: 'contract_lease_item_maintain_window',
url: $('contract_lease_item_query_link').getUrl(),
params: {
contract_lease_item_id: contract_lease_item_id,
winid: 'contract_lease_item_maintain_window'
},
draggable: true,
fullScreen: true
});
};
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 param = {};//record.data;
param['bp_id'] = record.get('bp_id');
param['cdd_list_id'] = record.get('cdd_list_id');
param['company_id'] = '${/session/company_id}';
param['document_id'] = record.get('bp_id');
param['document_category'] = 'BP';
param['bp_class'] = record.get('bp_class');
param['bp_category'] = record.get('bp_category');
if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
}else if(record.get('bp_category')=='RENTER' || record.get('bp_category')=='MAN_FACTURER' || record.get('bp_category')=='ASSET_REGULATOR'){
param['function_code'] = 'HLS215D_OP';
param['function_usage'] = 'QUERY';
}else{
param['function_code'] = 'CON505H';
param['function_usage'] = 'QUERY';
}
param['bp_type'] = record.get('bp_type');
param['download'] = 'Y';
param['url_title'] = '${l:HLS212.BP_MASTER_QUERY}';
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'con505_hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
};
// function open_contract_window(record_id, ds_id) {
// var record = $(ds_id).findById(record_id);
// var param = record.data;
// var contract_lease_item_id = record.get('contract_lease_item_id');
// new Leaf.Window({
// id: 'contract_lease_item_maintain_window',
// url: $('contract_lease_item_maintain_link').getUrl(),
// params: {
// contract_lease_item_id: contract_lease_item_id
// },
// fullScreen: true
// });
// // param['function_code'] = 'CON501D';
// // param['function_usage'] = 'MODIFY';
// // param['maintain_type'] = 'UPDATE';
// // param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
// // hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link',ds_id);
// }
window['${/parameter/@layout_code}_prj500_cdd_attachtment_upload'] = function (ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('check_id')) {
var url;
//add by lijingjing 2019-11-15
if (record.get('attachment_tab_group') == 'CREDIT_CHECK'
&&
'${/parameter/@query_only}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
} else if (record.get('attachment_tab_group') == 'SIGN'
&&
'${/parameter/@con_query_only}' == 'N') {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
} else if (record.get('attachment_tab_group') == 'SIGN'
&&
'${/parameter/@con_query_only}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
} else if (query_only == 'Y' || '${/parameter/@download}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
};
window['${/parameter/@layout_code}_prj500_cdd_attachtment_new_upload'] = function (ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('check_id')) {
var url;
//add by lijingjing 2019-11-15
if (query_only == 'Y' || '${/parameter/@download}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT
&
header_id=' + record.get('check_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT
&
header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
};
//签约人授权附件
window['${/parameter/@layout_code}_signer_attachtment_upload'] = function (ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('signer')
&&
record.get('bp_class') == 'ORG'
&&
record.get('sign_type_n') == '电子签约') {
var url;
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=HLS_BP_MASTER_SIGNER
&
header_id=' + record.get('signer');
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
}
};
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
//
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record = $(ds_id).getCurrentRecord();
var content_id;
//alert($('${/parameter/@layout_code}_con505_contract_content_id').getUrl);
Leaf.request({
url: $('${/parameter/@layout_code}_con505_contract_content_id').getUrl(),
para: {
content_id: content_id,
contract_id: record.get('contract_id'),
contract_bp_id: record.get('content_bp_pk'),
clause_usage: 'GH_WITHHOLD_AGREE'
},
success: function (rsc) {
//
//alert(rsc.result.content_id);
Leaf.request({
url: $('${/parameter/@layout_code}_creat_con_contract_content_link_id').getUrl(),
para: {
content_id: rsc.result.content_id,
file_path: '${/parameter/@file_path}'
},
success: function () {
Leaf.request({
url: $('${/parameter/@layout_code}_file_copy_from_template_link_id').getUrl(),
para: {
contract_id: record.get('contract_id'),
content_id: rsc.result.content_id,
file_path: '${/parameter/@file_path}',
batch_flag: 'Y'
},
success: function () {
var url = $('${/parameter/@layout_code}_con_batch_dl_link_id').getUrl() + '?contract_id=' + record.get('contract_id') + '
&
content_id=' + rsc.result.content_id;
window.open(url, '_self');
unlock_current_window();
}
});
unlock_current_window();
},
error: function () {
unlock_current_window();
},
failure: function () {
unlock_current_window();
},
scope: this
});
},
error: function () {
unlock_current_window();
},
failure: function () {
unlock_current_window();
},
scope: this
});
};
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record = $(ds_id).getCurrentRecord();
var direct_debit_bank_id = record.get('direct_debit_bank_id');
var dd_bank_account_name = record.get('dd_bank_account_name');
var dd_bank_account_num = record.get('dd_bank_account_num');
if (!Ext.isEmpty(record.get('contract_number'))) {
new Leaf.Window({
id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id',
params: {
action: 'VIEW',
contract_id: record.get('contract_id'),
company_id: record.get('company_id'),
document_category: record.get('document_category'),
business_type: record.get('business_type'),
winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id'
},
url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(),
title: '合同查看',
width: 1300,
height: 550
});
} else {
Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!');
}
};
var change_flag = 'N';
//工作流中合同文本生成按钮
//基本信息tab页 新增必输字段的校验 add by liukang 20160328
window['${/parameter/@layout_code}_print_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var con_lease_item_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item');
var record = $(ds_id).getCurrentRecord();
var con_lease_record = $(con_lease_item_id).getCurrentRecord();
var direct_debit_bank_id = record.get('direct_debit_bank_id');
var dd_bank_account_name = record.get('dd_bank_account_name');
var dd_bank_account_num = record.get('dd_bank_account_num');
var color_of_apprearance = con_lease_record.get('color_of_apprearance');
var item_frame_number = con_lease_record.get('item_frame_number');
var item_engine_number = con_lease_record.get('item_engine_number');
var license_number = con_lease_record.get('license_number');
/* if (Ext.isEmpty(direct_debit_bank_id)) {
Leaf.showMessage('${l:HLS.PROMPT}', '请先填写数据并保存!');
} else */
if (!Ext.isEmpty(record.get('contract_number'))) {
var win = new Leaf.Window({
id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id',
params: {
contract_id: record.get('contract_id'),
company_id: record.get('company_id'),
document_category: record.get('document_category'),
business_type: record.get('business_type'),
winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id',
change_flag: change_flag,
contract_name: record.get('contract_name'),
contract_number: record.get('contract_number')
},
url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(),
title: '合同文本生成',
width: 1300,
height: 550
});
//在关闭页面之后,刷新一下ds
win.on('close', function () {
if (ds_id) {
$(ds_id).query();
}
});
} else {
Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!');
}
};
//add by zhuxianfei 20180207
function view_pdf(attachment_id) {
Leaf.request({
url: '${/request/@context_path}/autocrud/fnd.fnd_atm_attachment/query',
para: {
attachment_id: attachment_id
},
success: function (res) {
var path = res.result.record.file_path;
path = path.substr(path.indexOf('hls_attachment'));
var tomcat_source = '${/parameter/@tomcat_source}';
var source_path = 'http://' + window.location.host + '/' + tomcat_source + '/' + path + '?type=pdf';
var oWin = window.open(source_path);
},
scope: this
});
}
//加载时调用(grid,table,gridBox) add by 24976
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_1', 'con_contract_bp');
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'con_contract_lease_item');
if(ds.id == lease_item_ds_id
&&
lease_item_ds_id){
debugger;
var gridId= ds.bindname+'_layout_grid_id';
if(record.data.division=='70'|| record.data.division=='92'){
$(gridId).hideColumn('full_name');
$(gridId).hideColumn('division_n');
$(gridId).hideColumn('equipments');
$(gridId).hideColumn('machine_model_class_n');
$(gridId).hideColumn('item_type_n');
$(gridId).hideColumn('equipment_type_n');
$(gridId).hideColumn('machine_number');
}else {
$(gridId).hideColumn('machine_number_70');
$(gridId).hideColumn('lease_name_n');
$(gridId).hideColumn('brand_value');
$(gridId).hideColumn('type_name');
$(gridId).hideColumn('produce_date');
$(gridId).hideColumn('using_hour');
$(gridId).hideColumn('detention_amount');
$(gridId).hideColumn('residual_value_amount');
$(gridId).hideColumn('ownership_flag_n');
$(gridId).hideColumn('created_by_n');
}
}
if (ds.id == bp_ds_id) {
//var bp_class = record.get('bp_class');
var marital_status = record.get('marital_status');
var sp_sign_flag_n = record.get('sp_sign_flag_n');
if (marital_status != 30
&&
marital_status != 40
&&
sp_sign_flag_n === undefined) {
record.getField('sp_sign_flag').setReadOnly(true);
record.getField('sp_sign_flag_n').setReadOnly(true);
record.set('sp_sign_flag', '-');
record.set('sp_sign_flag_n', '-');
}
if(sp_sign_flag_n == '-'){
record.getField('sp_sign_flag').setReadOnly(true);
record.getField('sp_sign_flag_n').setReadOnly(true);
}
}
// var cashflow_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CASHFLOW_1', 'con_contract_cashflow');
// if(ds.id == cashflow_ds_id
&&
cashflow_ds_id){
// var gridId= ds.bindname+'_layout_grid_id';
// if("${/model/role_info/record/@role_code}" =="0018" || "${/model/role_info/record/@role_code}" =="0019" ){
// $(gridId).hideColumn('gld_received_amount');
// }
// }
var cashflow_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CASHFLOW_1', 'con_contract_cashflow');
if(ds.id == cashflow_ds_id
&&
cashflow_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if("${/model/role_info/record/@role_code}" =="0018" || "${/model/role_info/record/@role_code}" =="0019" ){
$(gridId).hideColumn('gld_received_amount');
}
}
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_bs_score');
if (ds.id == ds_id) {
qpara.contract_id = '${/parameter/@contract_id}';
//$(ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}');
}
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
debugger;
if('${/parameter/@cond_para2}'=='N' || '${/parameter/@cond_para2}'==''){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
if (ds_id == ds.id
&&
ds_id) {
if (record.get('division')!='70'
&&
record.get('division')!='92'){
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_BRAND_VALUE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_BRAND_VALUE').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_MODELCD_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_MODELCD').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_USING_HOUR_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_USING_HOUR').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_RESIDUAL_VALUE_AMOUNT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_RESIDUAL_VALUE_AMOUNT').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OWNERSHIP_FLAG_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OWNERSHIP_FLAG').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_PRODUCE_DATE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_PRODUCE_DATE').style.display = 'none';
}else if(record.get('division')=='70'||record.get('division')=='92'){
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_THIRD_PARTY_DEPOSIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_THIRD_PARTY_DEPOSIT').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE2_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE2').style.display = 'none';
record.getField('lease_item_location').setRequired(true);
}
if(record.get('division')=='92'){
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN').style.display = 'none';
}
//业务类型回租时,默认只读“首付款抵扣”选项
if (record.get('business_type') == 'LEASEBACK'
&&
'${/parameter/@function_usage}' == 'MODIFY') {
//document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT_prompt').style.display = 'block';
// document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT').style.display = 'block';
record.getField('entrusted_amount').setRequired(true);
} else if (record.get('business_type') == 'LEASE') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT').style.display = 'none';
}
if(record.get('bp_class') == 'NP' || record.get('sign_type_n') == '纸质签约'){
record.getField('signer_n').setReadOnly(true);
/* record.getField('sale_con_ele_flag_n').setReadOnly(true);
record.getField('to_seller_amount').setReadOnly(true);
record.getField('to_factory_amount').setReadOnly(true);*/
record.getField('signer_n').setRequired(false);
/* record.getField('sale_con_ele_flag_n').setRequired(false);
record.getField('to_seller_amount').setRequired(false);
record.getField('to_factory_amount').setRequired(false);*/
record.set('signer_n','');
}else if ('${/parameter/@function_usage}' == 'MODIFY'
&&
record.get('sign_type_n') == '电子签约'
&&
record.get('bp_class') == 'ORG'){
record.getField('signer_n').setReadOnly(false);
record.getField('signer_n').setRequired(true);
}
if (record.get('prj_delivery_address') != null
&&
record.get('prj_delivery_address') != ''){
record.getField('delivery_address').setReadOnly(true);
}
if (record.get('prj_lease_item_location') != null
&&
record.get('prj_lease_item_location') != ''){
record.getField('lease_item_location').setReadOnly(true);
}
//如果选择电子签约,且买卖合同电子签、且是直租
if('${/parameter/@function_usage}' == 'MODIFY'
&&
record.get('sign_type_n') == '电子签约'){
if (record.get('business_type') == 'LEASE' || record.get('secondary_lease') == 'YES'){
record.getField('sale_con_ele_flag_n').setRequired(true);
record.getField('sale_con_ele_flag_n').setReadOnly(false);
}else{
record.getField('sale_con_ele_flag_n').setReadOnly(true);
record.getField('to_seller_amount').setReadOnly(true);
record.getField('to_factory_amount').setReadOnly(true);
record.getField('sale_con_ele_flag_n').setRequired(false);
record.getField('to_seller_amount').setRequired(false);
record.getField('to_factory_amount').setRequired(false);
}
}
//买卖合同是否生成
if('${/parameter/@function_usage}' == 'MODIFY'
&&
record.get('sale_con_ele_flag_n') == '是'){
record.getField('to_seller_amount').setReadOnly(false);
record.getField('to_factory_amount').setReadOnly(false);
record.getField('to_seller_amount').setRequired(true);
record.getField('to_factory_amount').setRequired(true);
}else if('${/parameter/@function_usage}' == 'MODIFY'
&&
record.get('sale_con_ele_flag_n') == '否'){
record.getField('to_seller_amount').setReadOnly(true);
record.getField('to_factory_amount').setReadOnly(true);
record.getField('to_seller_amount').setRequired(false);
record.getField('to_factory_amount').setRequired(false);
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示;
if (record.get('pay_method') == 'CCB_THREE'||record.get('pay_method') == 'CCB_TWO') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'block';
} else {
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'none';
}
}
}
};
//更新时调用
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'], 'con_contract');
if (ds_id == ds.id
&&
ds_id) {
var record = $(ds_id).getCurrentRecord();
var bp_tenant_class = record.get('bp_class');
if (name == 'sign_type_n') {
if(value == '纸质签约'){
record.getField('signer_n').setReadOnly(true);
record.getField('sale_con_ele_flag_n').setReadOnly(true);
record.getField('to_seller_amount').setReadOnly(true);
record.getField('to_factory_amount').setReadOnly(true);
record.getField('signer_n').setRequired(false);
record.getField('sale_con_ele_flag_n').setRequired(false);
record.getField('to_seller_amount').setRequired(false);
record.getField('to_factory_amount').setRequired(false);
record.set('signer_n','');
record.set('sale_con_ele_flag_n','');
record.set('to_seller_amount','');
record.set('to_factory_amount','');
}else if (value == '电子签约'
&&
bp_tenant_class == 'ORG'){
record.getField('signer_n').setReadOnly(false);
record.getField('sale_con_ele_flag_n').setReadOnly(false);
record.getField('to_seller_amount').setReadOnly(false);
record.getField('to_factory_amount').setReadOnly(false);
record.getField('signer_n').setRequired(true);
record.set('ec_sign_type','NEW');
record.set('sign_contract_status','NEW');
//如果选择电子签约,且买卖合同电子签、且是直租
if (record.get('business_type') == 'LEASE' || record.get('secondary_lease') == 'YES'){
record.getField('sale_con_ele_flag_n').setRequired(true);
record.getField('sale_con_ele_flag_n').setReadOnly(false);
record.getField('to_seller_amount').setReadOnly(false);
record.getField('to_factory_amount').setReadOnly(false);
}else{
record.getField('sale_con_ele_flag_n').setReadOnly(true);
record.getField('to_seller_amount').setReadOnly(true);
record.getField('to_factory_amount').setReadOnly(true);
record.getField('sale_con_ele_flag_n').setRequired(false);
record.getField('to_seller_amount').setRequired(false);
record.getField('to_factory_amount').setRequired(false);
}
}else if(value == '电子签约'
&&
bp_tenant_class == 'NP'){
record.getField('signer_n').setReadOnly(true);
record.set('ec_sign_type','NEW');
record.set('sign_contract_status','NEW');
//如果选择电子签约,且买卖合同电子签、且是直租
if (record.get('business_type') == 'LEASE' || record.get('secondary_lease') == 'YES'){
record.getField('sale_con_ele_flag_n').setRequired(true);
record.getField('sale_con_ele_flag_n').setReadOnly(false);
record.getField('to_seller_amount').setReadOnly(false);
record.getField('to_factory_amount').setReadOnly(false);
}else{
record.getField('sale_con_ele_flag_n').setReadOnly(true);
record.getField('sale_con_ele_flag_n').setRequired(false);
}
}
}
if(name == 'sale_con_ele_flag_n'){
//如果选择电子签约,且买卖合同电子签、且是直租
if (value == '是'){
record.getField('to_seller_amount').setRequired(true);
record.getField('to_factory_amount').setRequired(true);
record.getField('to_seller_amount').setReadOnly(false);
record.getField('to_factory_amount').setReadOnly(false);
}else{
record.getField('to_seller_amount').setRequired(false);
record.getField('to_factory_amount').setRequired(false);
record.getField('to_seller_amount').setReadOnly(true);
record.getField('to_factory_amount').setReadOnly(true);
}
}
}
};
/*保存前调用校验*/
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
var check_flag = true;
var contract_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var con_record = $(contract_ds_id).getAt(0);
if (contract_ds_id == ds.id
&&
$(contract_ds_id).validate()) {
if (con_record.get('business_type') == 'LEASEBACK') {
//“保存”按钮增加校验:若所填写小于0或大于设备款价格,点击按钮校验提示:“委托付款金额有误,请重新填写!”
if (con_record.get('entrusted_amount')
< 0
||
con_record.get('entrusted_amount')
>
minus(con_record.get('lease_item_amount'),con_record.get('other_payment2')||0)) {
Leaf.showMessage('${HLS.PROMPT}', '委托付款金额有误,请重新填写!');
return false;
}
}
debugger;
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'con_contract_lease_item');
var lease_item_record = $(lease_item_ds_id).getCurrentRecord();
var machine_number = lease_item_record.get('machine_number_70');
var division = lease_item_record.get('division');
var project_id = con_record.get('project_id');
var machine_number_num = 0;
var secondary_lease = record.get('secondary_lease') ;
if(!Leaf.isEmpty(secondary_lease)
&&
secondary_lease!='YES') {
if (division == '92'
&&
!Leaf.isEmpty(machine_number)) {
Leaf.request({
url: $('check_machine_number_id_con').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) {
$L.showErrorMessage('提示', '该机号已存在,请重新确认!');
return false;
}
}
//add by 26887cz 2021-07-21
if (record.get('signing_city')){
// var reg = /^([\u2E80-\u9FFF]){4,}$/;
// if (!reg.test(record.get('signing_city'))) {
// $L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)');
// return false;
// }
//var reg=/^[\u2E80-\u9FFF]{1,}市[\u2E80-\u9FFF]{1,}[州县区][a-zA-Z0-9-\u2E80-\u9FFF]+$/;
if (record.get('signing_city').indexOf('州') == -1
&&
record.get('signing_city').indexOf('县') == -1
&&
record.get('signing_city').indexOf('区') == -1) {
Leaf.showConfirm('${HLS.PROMPT}', '合同签订地所填写内容,未细化到区/县/州级别,是否确认?', function () {});
}
}
} else {
check_flag = false;
}
return check_flag;
};
//取消签约按钮 add by 24976
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record = $(ds_id).getCurrentRecord();
var contract_id = record.get('contract_id');
var sign_contract_status = record.get('sign_contract_status');
var sign_type = record.get('sign_type') || 'PAPER_SIGN';
if (sign_contract_status != 'SIGNING') {
Leaf.showMessage('${l:PROMPT}', '只有签约中的合同可以取消签约');
return;
}
if (sign_contract_status == 'SIGNING'
&&
sign_type == 'PAPER_SIGN'){
Leaf.showConfirm('${HLS.PROMPT}', '确认要取消签约吗?', function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('con_sign_cancel_link_id').getUrl(),
para: {
contract_id: contract_id
},
scope: this,
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}else if(sign_type == 'ELE_SIGN'
&&
sign_contract_status == 'SIGNING'){
Leaf.showConfirm('${HLS.PROMPT}', '确认取消电子签约吗?', function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('${/parameter/@layout_code}_con_ele_sign_cancel_link_id').getUrl(),
para: {
contract_id: contract_id
},
scope: this,
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if (res.result.message != null){
Leaf.showMessage('${l:HLS.PROMPT}', res.result.message)
}else{
$('${/parameter/@winid}').close();
}
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
};
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record = $(ds_id).getCurrentRecord();
var source_type = '${/parameter/@source_type}';
var contract_id = record.get('contract_id');
//add by 24976
var sign_type = record.get('sign_type');
var lease_start_date = record.get('lease_start_date');
var business_type = record.get('business_type');
var bp_class = record.get('bp_class');
var con_lease_item_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item');
var con_lease_record = $(con_lease_item_id).getCurrentRecord();
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP_1', 'con_contract_bp');
var machine_number = con_lease_record.get('machine_number');
var con_bp_record = $(bp_ds_id).getCurrentRecord();
if (record.dirty == true || con_lease_record.dirty == true || con_bp_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
// if(record.get('contract_status')!='NEW'){
// $L.showErrorMessage("错误",'只能新建状态的合同才能发起签约!');
// return;
// }
debugger;
if ($(ds_id).validate()) {
if (sign_type == 'ELE_SIGN'){
Leaf.showConfirm('${HLS.PROMPT}', '确认要发起电子签约吗?', function () {
debugger;
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
//获取当前日期
var date = new Date('${/model/sysdate/record/@sys_date}').format('yyyy-mm-dd');
//校验起租日
var v_lease_start_date = lease_start_date.format('yyyy-mm-dd');
var dtNew=new Date(v_lease_start_date);
var dateTime=dtNew.setDate(dtNew.getDate()+2);
var data2=new Date(dateTime).format('yyyy-mm-dd');
if (data2
< date
||
date<v_lease_start_date)
{
Leaf.showMessage('${l:PROMPT}',
'当前时间不在起租72小时范围内,不允许发起电子签约!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
/*
if
(v_lease_start_date
!=
date)
{
Leaf.showMessage('${l:PROMPT}',
'起租日不等于当前时间,不允许发起电子签约!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}*/
if(
business_type =
=
'LEASEBACK'
&&
bp_class =
=
'NP'&&
record.get('division')
!=
70
&&
record.get('division')
!=
92){
Leaf.showMessage('${l:PROMPT}',
'此类业务尚未开放电子签约功能');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
//addby
xsh35973
20221017
神钢建机回租不让发起电子签约
if
(record.get('division')
==
91
&&
business_type =
=
'LEASEBACK'){
Leaf.showMessage('${l:PROMPT}',
'此类业务尚未开放电子签约功能');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
if
(Ext.isEmpty(machine_number)
&&
Ext.isEmpty(con_lease_record.get('machine_number_70')))
{//update
by
xsh25973
铁甲机号machine_number_70
Leaf.showMessage('${l:HLS.PROMPT}',
'请先填写机号并保存!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
var
con_bp_records =
$(bp_ds_id).getAll();
for
(var
i =
0;i
<
con_bp_records.length;i++)
{
var
sp_sign_flag =
con_bp_records[i].get('sp_sign_flag');
var
sp_sign_flag_n =
con_bp_records[i].get('sp_sign_flag_n');
if
(Ext.isEmpty(sp_sign_flag)
||
Ext.isEmpty(sp_sign_flag_n))
{
Leaf.showMessage('${l:HLS.PROMPT}',
'请先选择配偶是否签署并保存!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
}
Leaf.request({
url:$('${/parameter/@layout_code}_ele_operator_verify_link_id').getUrl(),
para:{
contract_id:contract_id,
esign_type:'CE'
},
scope:this,
success:
function
(res)
{
if(
res.result.check_flag =
=
'N'){
Leaf.showConfirm('${HLS.PROMPT}',
res.result.result_message,
function
()
{
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url:
$('${/parameter/@layout_code}_con_ele_content_create_link_id').getUrl(),
para:
{
contract_id:
contract_id
},
scope:
this,
success:
function
()
{
Leaf.request({
url:
$('${/parameter/@layout_code}_con_ele_agent_link_id').getUrl(),
para:
{
contract_id:
contract_id
},
scope:
this,
success:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure:
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']();
},
error:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}else{
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url:
$('${/parameter/@layout_code}_con_ele_content_create_link_id').getUrl(),
para:
{
contract_id:
contract_id
},
scope:
this,
success:
function
()
{
Leaf.request({
url:
$('${/parameter/@layout_code}_con_ele_agent_link_id').getUrl(),
para:
{
contract_id:
contract_id
},
scope:
this,
success:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure:
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']();
},
error:
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']();
}
});
});
}
else
if
(
sign_type =
=
'PAPER_SIGN'){
Leaf.showConfirm('${HLS.PROMPT}',
'确认要提交工作流吗?',
function
()
{
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url:
$('con_approval_link_id').getUrl(),
para:
{
contract_id:
contract_id
},
scope:
this,
success:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error:
function
()
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
}
};
if
('${/parameter/@source_type}'
==
'WFL')
{
zjwfl5110_ApproveChecker_add('zjwfl5110_submit',
function
(type)
{
var
con_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
if
(
type =
=
'agree')
{
if
($(con_ds_id).validate())
{
if
($(con_ds_id).isModified())
{
Leaf.showMessage('${HLS.PROMPT}',
'请先保存');
return
false;
}
//提交先保存
return
true;
}
else
{
return
false;
}
}
else
return
true;
});
}
Leaf.onReady(function
()
{
debugger;
var
ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'T_INVOICE_INFO',
'con_contract_bp');
if
(ds_id)
{
$(ds_id).setQueryUrl('${/request/@context_path}/autocrud/prj.PRJ501N.con_contract_bp/query');
$(ds_id).setQueryParameter('contract_id',
'${/parameter/@contract_id}');
$(ds_id).query();
}
//add
by
24976
if("${/parameter/@function_usage}"
==
'QUERY'&&
"${/parameter/@sign_contract_status}"
==
'SIGNING'
&&
"${/parameter/@contract_status}"
==
'NEW'){
document.getElementById("${/parameter/@layout_code}_user_button4")
.style.display =
''
;
}else
if
("${/parameter/@function_usage}"
==
'QUERY'){
//$("${/parameter/@layout_code}_user_button4").hide();
document.getElementById("${/parameter/@layout_code}_user_button4")
.style.display =
"none"
;
document.getElementById("${/parameter/@layout_code}_save")
.style.display =
"none"
;
document.getElementById("${/parameter/@layout_code}_exit")
.style.display =
"none"
;
}
if
('${/model/pilot_run_user/record/@pilot_run_flag}'
!=
'Y'
&&
"${/parameter/@function_usage}"
==
'QUERY'){
document.getElementById("${/parameter/@layout_code}_user_button4")
.style.display =
"none"
;
}
if("${/parameter/@function_usage}"
==
'MODIFY'
&&
"${/parameter/@layout_code}"
==
'CONTRACT_QUERY_N'){
document.getElementById("${/parameter/@layout_code}_user_button4")
.style.display =
"none"
;
}
if("${/parameter/@function_usage}"
==
'MODIFY'
&&
"${/parameter/@layout_code}"
==
'CONTRACT_QUERY_OP_N'){
document.getElementById("${/parameter/@layout_code}_user_button4")
.style.display =
"none"
;
}
})
//附件打包下载
window['${/parameter/@layout_code}_C_ATTCH_I_USER_BUTTON1_layout_dynamic_tab_click']
=
function
()
{
var
con_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
var
contract_record =
$(con_ds_id).getAt(0);
var
contract_id =
contract_record.get('contract_id');
var
contract_number =
contract_record.get('contract_number');
var
cdd_list_id=
contract_record.get('cdd_list_id');
var
doc_code=
contract_number+'-'+'SIGN';
var
url_l =
$('get_atch_download_link_con').getUrl()
+
'?
table_pk_value=
' + contract_id + '
&
table_name=
CON_CONTRACT'+
'&
doc_code=
' + doc_code+ '
&
group_flag=
Y'+
'&
cdd_list_id=
' + cdd_list_id+ '
&
group_code=
SIGN';
window.open(
href =
url_l,
target =
"_self"
);
};
//附件打包下载
window['${/parameter/@layout_code}_C_ATTCH_2_USER_BUTTON1_layout_dynamic_tab_click']
=
function
()
{
var
con_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
var
contract_record =
$(con_ds_id).getAt(0);
var
contract_id =
contract_record.get('contract_id');
var
contract_number =
contract_record.get('contract_number');
var
cdd_list_id=
contract_record.get('cdd_list_id');
var
doc_code=
contract_number+'-'+'SIGN';
var
url_l =
$('get_atch_download_link_con').getUrl()
+
'?
table_pk_value=
' + contract_id + '
&
table_name=
CON_CONTRACT'+
'&
doc_code=
' + doc_code+ '
&
group_flag=
Y'+
'&
cdd_list_id=
' + cdd_list_id+ '
&
group_code=
SIGN';
window.open(
href =
url_l,
target =
"_self"
);
};
//附件打包下载
window['${/parameter/@layout_code}_C_ATTCH_1_USER_BUTTON1_layout_dynamic_tab_click']
=
function
()
{
var
con_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'con_contract');
var
contract_record =
$(con_ds_id).getAt(0);
var
contract_id =
contract_record.get('contract_id');
var
contract_number =
contract_record.get('contract_number');
var
cdd_list_id=
contract_record.get('cdd_list_id');
var
doc_code=
contract_number+'-'+'PRJ';
var
url_l =
$('get_atch_download_link_con').getUrl()
+
'?
table_pk_value=
' + contract_id + '
&
table_name=
CON_CONTRACT'+
'&
doc_code=
' + doc_code+ '
&
group_flag=
Y'+
'&
cdd_list_id=
' + cdd_list_id+ '
&
group_code=
CREDIT_CHECK';
window.open(
href =
url_l,
target =
"_self"
);
};
]]
></script>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
</a:view>
</a:screen>
src/main/webapp/modules/prj/PRJ500N/prj_project_create.lview
View file @
02e01bb4
...
...
@@ -21,7 +21,7 @@
</s:server-script>
</a:init-procedure>
<a:view>
<a:link
id=
"${/parameter/@layout_code}lease_prj_create_query_link"
<a:link
id=
"${/parameter/@layout_code}lease_prj_create_query_link"
url=
"${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import_details.lview"
/>
<a:link
id=
"${/parameter/@layout_code}hls_bp_master_query_link"
url=
"${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"
/>
...
...
@@ -65,11 +65,11 @@
<script
type=
"text/javascript"
>
<![CDATA[
// alert('${/parameter/@division}')
//add by zhuxianfei
Leaf.onReady(function() {
if(division!='30' && division!='50'&& division!='99'){
var gridId= 'PROJECT_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id';
$(gridId).hideColumn('machine_number_n');
}
Leaf.onReady(function() {
if(division!='30' && division!='50'&& division!='99'){
var gridId= 'PROJECT_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id';
$(gridId).hideColumn('machine_number_n');
}
});
...
...
@@ -113,10 +113,10 @@
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'||division=='99'){
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
...
...
@@ -183,13 +183,13 @@
});
} else {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'||division=='99'){
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
...
...
@@ -426,36 +426,6 @@
var project_id = project_record.get('project_id');
var machine_number_num = 0;
var secondary_lease = project_record.get('secondary_lease');
if(!Leaf.isEmpty(secondary_lease) && secondary_lease !='YES'){
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();
if (prj_project_ds_id == ds.id && prj_project_ds_id) {
...
...
@@ -554,9 +524,9 @@
};
function prj501n_lease_number_renderer(record_id, ds_id){
var prj_quotation_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var record = $(ds_id).findById(record_id);
function prj501n_lease_number_renderer(record_id, ds_id){
var prj_quotation_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var record = $(ds_id).findById(record_id);
var param = {};
param['project_status'] = 'NEW';
param['division'] = record.get('division');
...
...
@@ -638,9 +608,9 @@
$(prj_project_lease_item_ds_id).query();
$(prj_quotation_ds_id).query();
}
if (prj_project_lease_item_ds_id==ds.id){
$(prj_quotation_ds_id).query();
}
if (prj_project_lease_item_ds_id==ds.id){
$(prj_quotation_ds_id).query();
}
var record = $(ds_id).getCurrentRecord();
var url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}
&
bp_id=' + record.get('bp_id_tenant');
...
...
@@ -863,15 +833,15 @@
//获取员工类型
var
description =
'${/model/description/record/@employee_type_code}'
;
var
bp_code=
'${/model/user_agent_description/record/@bp_code}'
;
var
invoice_agent_id=
record.get('invoice_agent_id');
var
invoice_agent_id=
record.get('invoice_agent_id');
if(!Ext.isEmpty(description)
&&
description =
=
'AGENT'){
if(!Ext.isEmpty(bp_code)){
if((
division=
='80'||division=='30'||division=='50'||division=='99')
&&
bp_code
!==
'D00010019'){
record.set('credit_line','TENANT');
record.set('credit_line_n','承租人');
if(!Ext.isEmpty(bp_code)){
if((
division=
='80'||division=='30'||division=='50'||division=='99')
&&
bp_code
!==
'D00010019'){
record.set('credit_line','TENANT');
record.set('credit_line_n','承租人');
}
}
}
}
}
if(!Ext.isEmpty(description)
&&
description =
=
'AGENT'){
if(!Ext.isEmpty(bp_code)){
if(bp_code
!==
'D00000029'
&&
bp_code
!==
'D00000031'
&&
bp_code
!==
'D00000026'
&&
bp_code
!==
'D00000030'){
...
...
@@ -907,7 +877,7 @@
}
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt')
.style.display =
'none'
;
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE')
.style.display =
'none'
;
//add
by
wangwei
非铁甲业务隐藏铁甲评分
//add
by
wangwei
非铁甲业务隐藏铁甲评分
var
bp_tenant_rate_detail_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'bp_tenant_rate_detail');
if
(
bp_tenant_rate_detail_ds_id =
=
ds.id
&&
bp_tenant_rate_detail_ds_id)
{
if
(division
!=
'70'
&&
division
!=
'')
{
...
...
@@ -953,7 +923,7 @@
if
(
lease_item_ds_id =
=
ds.id
&&
lease_item_ds_id)
{
if(
division=
='70'
||
division=
='92'){
if(
name=
='lease_name_n'){
record.data.type_name=
value;
record.data.type_name=
value;
}else
if(
name=
='modelcd'){
record.data.pattern=
value;
}
...
...
@@ -964,16 +934,16 @@
//选择承租人带出开票信息
if
(
prj_project_ds_id =
=
ds.id
&&
prj_project_ds_id)
{
if
(
name =
=
"payment_deduction"
&&
value=
="DOWN_PAYMENT_DEDUCTION")
{
//业务类型回租时,默认只读“首付款抵扣”选项
if
($(prj_project_ds_id).getAt(0).get('business_type')
==
'LEASE')
{
Leaf.showInfoMessage("提示",
"直租业务不能选择首付款抵扣");
setTimeout(function
()
{
$(prj_project_ds_id).getAt(0).set('payment_deduction',
null);
$(prj_project_ds_id).getAt(0).set('payment_deduction_n',
null);
},
10);
//业务类型回租时,默认只读“首付款抵扣”选项
if
($(prj_project_ds_id).getAt(0).get('business_type')
==
'LEASE')
{
Leaf.showInfoMessage("提示",
"直租业务不能选择首付款抵扣");
setTimeout(function
()
{
$(prj_project_ds_id).getAt(0).set('payment_deduction',
null);
$(prj_project_ds_id).getAt(0).set('payment_deduction_n',
null);
},
10);
}
}
}
if
(
name =
=
"bp_id_tenant_n"
&&
value)
{
var
bp_id_tenant =
record.get('bp_id_tenant');
Leaf.Masker.mask(Ext.getBody());
...
...
@@ -1108,9 +1078,9 @@
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'
;
record.getField('deduction_limit').setRequired(true);
if(Ext.isEmpty(record.get('deduction_limit'))){
record.set('deduction_limit',200000);
}
if(Ext.isEmpty(record.get('deduction_limit'))){
record.set('deduction_limit',200000);
}
}else{
record.getField('deduction_limit').setRequired(false);
record.set('deduction_limit',null);
...
...
@@ -1187,7 +1157,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){
var gridId= ds.bindname+'_layout_grid_id';
if(division!='30'
&&
division!='50'
&&
division!='99'){
if(division!='30'
&&
division!='50'
&&
division!='99'){
$(gridId).hideColumn('machine_number_n');
}
if(division=='70'|| division=='92'){
...
...
@@ -1392,7 +1362,7 @@
if
($(ds_id).validate())
{
Leaf.showConfirm('${HLS.PROMPT}',
'确认要提交工作流吗?',
function
()
{
var
lease_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_QUOTATION_N',
'prj_quotation');
var
lease_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_QUOTATION_N',
'prj_quotation');
var
ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'G_LEASE_HEAD_CAR',
'prj_project_lease_item');
if(
division=
='30'||division=='50'||division=='99'){
var
record=
$(lease_ds_id).getCurrentRecord();
...
...
@@ -1403,7 +1373,7 @@
var
lease_item_amount=
record.get('lease_item_amount');
var
residual_value=
record.get('residual_value');
var
q_value=
records.get('q_value');
var
q_value=
records.get('q_value');
if(total_price!=lease_item_amount
&&total_price!=null){
Leaf.showMessage('${l:PROMPT}',
'支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
return;
...
...
@@ -1451,29 +1421,29 @@
}else
{
if
($(ds_id).validate())
{
Leaf.showConfirm('${HLS.PROMPT}',
'确认要提交工作流吗?',
function
()
{
var
lease_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_QUOTATION_N',
'prj_quotation');
var
ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'G_LEASE_HEAD_CAR',
'prj_project_lease_item');
if(
division=
='30'||division=='50'||division=='99'){
var
record=
$(lease_ds_id).getCurrentRecord();
var
records=
$(ds_id).getCurrentRecord();
var
set_number=
records.get('set_number');
var
total_number=
records.get('total_number');
var
total_price=
records.get('total_price');
var
lease_item_amount=
record.get('lease_item_amount');
var
residual_value=
record.get('residual_value');
var
q_value=
records.get('q_value');
if(total_price!=lease_item_amount
&&total_price!=null){
Leaf.showMessage('${l:PROMPT}',
'支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
return;
}else
if(q_value!=residual_value){
Leaf.showMessage('${l:PROMPT}',
'支付计划中留购价与报价计算不一致,无法提交审批!');
return;
}else
if(total_number!=0
&&
set_number!=total_number){
Leaf.showMessage('${l:HLS.PROMPT}',
'租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
var
lease_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_QUOTATION_N',
'prj_quotation');
var
ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'G_LEASE_HEAD_CAR',
'prj_project_lease_item');
if(
division=
='30'||division=='50'||division=='99'){
var
record=
$(lease_ds_id).getCurrentRecord();
var
records=
$(ds_id).getCurrentRecord();
var
set_number=
records.get('set_number');
var
total_number=
records.get('total_number');
var
total_price=
records.get('total_price');
var
lease_item_amount=
record.get('lease_item_amount');
var
residual_value=
record.get('residual_value');
var
q_value=
records.get('q_value');
if(total_price!=lease_item_amount
&&total_price!=null){
Leaf.showMessage('${l:PROMPT}',
'支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
return;
}else
if(q_value!=residual_value){
Leaf.showMessage('${l:PROMPT}',
'支付计划中留购价与报价计算不一致,无法提交审批!');
return;
}else
if(total_number!=0
&&
set_number!=total_number){
Leaf.showMessage('${l:HLS.PROMPT}',
'租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
...
...
@@ -1497,7 +1467,7 @@
});
}
}
}
//
if
($(ds_id).validate())
{
//
Leaf.showConfirm('${HLS.PROMPT}',
'确认要提交工作流吗?',
function
()
{
...
...
src/main/webapp/modules/prj/PRJ500N/prj_project_create_constru.lview
View file @
02e01bb4
...
...
@@ -409,35 +409,6 @@
var project_id = project_record.get('project_id');
var machine_number_num = 0;
var secondary_lease = project_record.get('secondary_lease');
if(!Leaf.isEmpty(secondary_lease) && secondary_lease !='YES'){
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');
...
...
src/main/webapp/modules/prj/PRJ501N/prj_project_maintain.lview
View file @
02e01bb4
...
...
@@ -177,19 +177,19 @@
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
//首次插入
if (!record.get('calc_session_id')) {
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'|| division=='99'){
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y';
...
...
@@ -257,15 +257,15 @@
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'|| division=='99'){
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
var cal_hd_price_list = record.get('cal_hd_price_list');
var price_list = record.get('price_list');
//追加二手机报价重算条件,选择了适用或者调整了利率组合则需要重算报价
...
...
@@ -289,7 +289,7 @@
int_rate_display=0;
}
if(check_empty(cal_btb_int_rate)){
cal_btb_int_rate =0;
cal_btb_int_rate =0;
}
if(check_empty(cal_int_rate_display)){
cal_int_rate_display=0;
...
...
@@ -623,9 +623,9 @@
$(score_ds_id).query();
}
if (prj_project_lease_item_ds_id==ds.id){
$(prj_quotation_ds_id).query();
}
if (prj_project_lease_item_ds_id==ds.id){
$(prj_quotation_ds_id).query();
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
...
...
@@ -702,7 +702,7 @@
var
prj_quotation_ds_id =
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'prj_quotation');
var
lease_item_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'G_LEASE_HEAD_CAR',
'prj_project_lease_item');
var
tenant_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_BASIC_INFO_1',
'prj_project');
//二手车资管费为否,隐藏组合利率组件及将字段设置为空
//二手车资管费为否,隐藏组合利率组件及将字段设置为空
if
(
prj_quotation_ds_id =
=
ds.id)
{
if
(
name =
=
'hd_user_col_v06')
{
if('${/parameter/@asset_fee_flag}'=='Y'){
...
...
@@ -718,8 +718,8 @@
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')
.style.display =
'none'
;
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}
else
{
record.getField('asset_id').setRequired(true);
...
...
@@ -729,8 +729,8 @@
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')
.style.display =
'block'
;
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_fee');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_fee');
}
}
}
...
...
@@ -1156,41 +1156,41 @@
//现金流列表加载时隐藏资管费 18083
if(cashflow_ds_id == ds.id
&&
cashflow_ds_id){
//var hd_user_col_v06 = $(cashflow_ds_id).getAt(0).get('hd_user_col_v06');
if('${/parameter/@asset_fee_flag}'=='N'||'${/parameter/@asset_fee_flag}'==''){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if(Ext.isEmpty($(cashflow_ds_id).getAt(0))){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if (Ext.isEmpty($(cashflow_ds_id).getAt(0).get('hd_user_col_v06'))) {
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if($(cashflow_ds_id).getAt(0).get('hd_user_col_v06')=='N'){
if('${/parameter/@asset_fee_flag}'=='N'||'${/parameter/@asset_fee_flag}'==''){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_fee');
}
}
}
}
}
}
}else{
if(Ext.isEmpty($(cashflow_ds_id).getAt(0))){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if (Ext.isEmpty($(cashflow_ds_id).getAt(0).get('hd_user_col_v06'))) {
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if($(cashflow_ds_id).getAt(0).get('hd_user_col_v06')=='N'){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_fee');
}
}
}
}
}
}
};
...
...
@@ -1205,7 +1205,7 @@
}
var
division=
''
;
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load']
=
function
(ds,
record,
config_records,
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');
if(
tenant_ds_id =
=
ds.id){
if
(Leaf.isEmpty(record.get('send_message'))){
...
...
@@ -1361,15 +1361,15 @@
var
bp_code=
'${/model/user_agent_description/record/@bp_code}'
;
var
credit_record =
$(ds_id).getCurrentRecord();
var
invoice_agent_id=
record.get('invoice_agent_id');
if(!Ext.isEmpty(description)
&&
description =
=
'AGENT'){
if(!Ext.isEmpty(bp_code)){
if((
division=
='80'||division=='30'||division=='50'||
division=
='99')
&&
bp_code
!==
'D00010019'){
credit_record.set('credit_line','TENANT');
credit_record.set('credit_line_n','承租人');
}
}
var
invoice_agent_id=
record.get('invoice_agent_id');
if(!Ext.isEmpty(description)
&&
description =
=
'AGENT'){
if(!Ext.isEmpty(bp_code)){
if((
division=
='80'||division=='30'||division=='50'||
division=
='99')
&&
bp_code
!==
'D00010019'){
credit_record.set('credit_line','TENANT');
credit_record.set('credit_line_n','承租人');
}
}
}
if(!Ext.isEmpty(description)
&&
description =
=
'AGENT'){
if(!Ext.isEmpty(bp_code)){
if(bp_code
!==
'D00000026'
&&
bp_code
!==
'D00000029'
&&
bp_code
!==
'D00000030'
&&
bp_code
!==
'D00000031'){
...
...
@@ -1405,7 +1405,7 @@
//产品线维护了组合利率的调整加载事件显示
if('${/parameter/@asset_fee_flag}'=='N'||'${/parameter/@asset_fee_flag}'==''){
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')
.style.display =
'none'
;
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')
.style.display =
'none'
;
}
record.getField('hd_user_col_v06').setRequired(false);
record.getField('hd_user_col_v06_n').setRequired(false);
...
...
@@ -1423,7 +1423,7 @@
record.getField('asset_id_n').setRequired(false);
//隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')
.style.display =
'none'
;
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')
.style.display =
'none'
;
}
}else{
...
...
@@ -1569,8 +1569,8 @@
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')
.style.display =
'none'
;
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}
});
...
...
@@ -1777,9 +1777,9 @@
if
((
price_list =
=
'HL_PRICR_E'
||
price_list =
=
'HL_PRICR_TEST'
||
price_list =
=
'HL_PRICR_NTEST'
||
price_list =
=
'HL_PRICR_EN')
&&
secondary_lease =
=
'NO')
{
if
((div((H16
+
H97),
(H99
+
H102
-
H16)).toFixed(2)
*
1)
<
down_payment_rate_new)
{
if(current_record.get('division')!='91'){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}',
'首付款比例+首付款保证金比例之和不能低于'
+
down_payment_rate_new
*
100
+
'%');
return;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}',
'首付款比例+首付款保证金比例之和不能低于'
+
down_payment_rate_new
*
100
+
'%');
return;
}
}
}
...
...
@@ -1875,9 +1875,9 @@
if
((
price_list =
=
'HL_PRICR_E'
||
price_list =
=
'HL_PRICR_TEST'
||
price_list =
=
'HL_PRICR_NTEST'
||
price_list =
=
'HL_PRICR_EN')
&&
secondary_lease =
=
'NO')
{
if
((div((H16
+
H97),
(H99
+
H102
-
H16)).toFixed(2)
*
1)
<
down_payment_rate_new)
{
if(current_record.get('division')!='91'&¤t_record.get('division')!='93')
{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}',
'首付款比例+首付款保证金比例之和不能低于'
+
down_payment_rate_new
*
100
+
'%');
return;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}',
'首付款比例+首付款保证金比例之和不能低于'
+
down_payment_rate_new
*
100
+
'%');
return;
}
}
}
...
...
@@ -1894,7 +1894,7 @@
var
lease_item_amount=
record.get('lease_item_amount');
var
residual_value=
record.get('residual_value');
var
q_value=
records.get('q_value');
var
q_value=
records.get('q_value');
if(total_price!=lease_item_amount
&&total_price!=null){
Leaf.showMessage('${l:PROMPT}',
'支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
return;
...
...
@@ -1953,7 +1953,7 @@
var
total_price=
records.get('total_price');
var
lease_item_amount=
record.get('lease_item_amount');
var
residual_value=
record.get('residual_value');
var
q_value=
records.get('q_value');
var
q_value=
records.get('q_value');
if(total_price!=lease_item_amount
&&total_price!=null){
Leaf.showMessage('${l:PROMPT}',
'支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
...
...
@@ -2147,48 +2147,6 @@
var
project_id =
project_record.get('project_id');
var
machine_number_num =
0;
var
secondary_lease =
project_record.get('secondary_lease');
if(!Leaf.isEmpty(secondary_lease)
&&
secondary_lease!='YES'){
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;
}
}
//神钢建机,新报单的机号与关联的合同机号必须相同
if(division == '91'){
var machine_number1 = lease_item_record.get('machine_number');
var machine_number2 = project_record.get('machine_number');
if(typeof(machine_number1) != 'undefined'
&&
typeof(machine_number2) != 'undefined'){
if( machine_number1 != machine_number2){
$L.showErrorMessage('提示', '新报单的机号与关联的合同机号必须相同!');
return false;
}
}
}
return
true;
...
...
src/main/webapp/modules/prj/PRJ501N/prj_project_maintain_constru.lview
View file @
02e01bb4
...
...
@@ -1764,37 +1764,6 @@
var
project_id =
project_record.get('project_id');
var
machine_number_num =
0;
var
secondary_lease =
project_record.get('secondary_lease');
if(!Leaf.isEmpty(secondary_lease)
&&
secondary_lease!='YES'){
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;
}
}
return
true;
...
...
src/main/webapp/modules/prj/PRJ501N/prj_project_maintain_constru_wfl.lview
View file @
02e01bb4
...
...
@@ -378,35 +378,6 @@
var machine_number = lease_item_record.get('machine_number_70');
var machine_number_num = 0;
var secondary_lease = project_record.get('secondary_lease');
if(!Leaf.isEmpty(secondary_lease) && secondary_lease !='YES') {
if (division == '92' && !Leaf.isEmpty(machine_number)) {
Leaf.request({
url: $('prj501n_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;
}
}
if(!bp_rate_flag){
return false;
}
...
...
src/main/webapp/modules/prj/PRJ501N/prj_project_maintain_wfl_new.lview
View file @
02e01bb4
...
...
@@ -419,47 +419,6 @@
var machine_number = lease_item_record.get('machine_number_70');
var machine_number_num = 0;
var secondary_lease = project_record.get('secondary_lease');
if(!Leaf.isEmpty(secondary_lease) && secondary_lease !='YES') {
if ((division == '92' || division == '70') && !Leaf.isEmpty(machine_number)) {
Leaf.request({
url: $('prj501n_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;
}
}
//神钢建机,新报单的机号与关联的合同机号必须相同
if(division == '91'){
debugger;
var machine_number1 = lease_item_record.get('machine_number');
var machine_number2 = project_record.get('machine_number');
if(typeof(machine_number1) != 'undefined'
&&
typeof(machine_number2) != 'undefined'){
if( machine_number1 != machine_number2){
$L.showErrorMessage('提示', '新报单的机号与关联的合同机号必须相同!');
return false;
}
}
}
if(!bp_rate_flag){
return false;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment