Commit 6b949168 authored by panhong18943's avatar panhong18943

汇丰付款单页面优化

parent d7d8551c
...@@ -158,9 +158,11 @@ ...@@ -158,9 +158,11 @@
window['${/parameter/@layout_code}_on_layout_dynamic_grid_select'] = function(ds, record, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_grid_select'] = function(ds, record, bp_seq) {
var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds'; var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds';
var formr_r_ds_id = '${/parameter/@layout_code}_R_F_QUERY__ds';
var req_ln_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln'); var req_ln_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return'); var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var form_record = $(form_ds_id).getAt(0); var form_record = $(form_ds_id).getAt(0);
var form_r_record = $(formr_r_ds_id).getAt(0);
var req_records = $(req_ln_ds_id).getSelected(); var req_records = $(req_ln_ds_id).getSelected();
var con_records = $(con_ds_id).getSelected(); var con_records = $(con_ds_id).getSelected();
...@@ -177,15 +179,17 @@ ...@@ -177,15 +179,17 @@
for (var i = 0;i < con_records.length;i++) { for (var i = 0;i < con_records.length;i++) {
sum = plus(sum, con_records[i].get('this_return_amount')); sum = plus(sum, con_records[i].get('this_return_amount'));
} }
form_record.set('total_unpaid_amount', sum); form_r_record.set('total_unpaid_amount', sum);
} }
}; };
window['${/parameter/@layout_code}_on_layout_dynamic_grid_unselect'] = function(ds, record, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_grid_unselect'] = function(ds, record, bp_seq) {
var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds'; var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds';
var formr_r_ds_id = '${/parameter/@layout_code}_R_F_QUERY__ds';
var req_ln_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln'); var req_ln_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return'); var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var form_record = $(form_ds_id).getAt(0); var form_record = $(form_ds_id).getAt(0);
var form_r_record = $(formr_r_ds_id).getAt(0);
var req_records = $(req_ln_ds_id).getSelected(); var req_records = $(req_ln_ds_id).getSelected();
var con_records = $(con_ds_id).getSelected(); var con_records = $(con_ds_id).getSelected();
...@@ -202,7 +206,7 @@ ...@@ -202,7 +206,7 @@
for (var i = 0;i < con_records.length;i++) { for (var i = 0;i < con_records.length;i++) {
sum = plus(sum, con_records[i].get('this_return_amount')); sum = plus(sum, con_records[i].get('this_return_amount'));
} }
form_record.set('total_unpaid_amount', sum); form_r_record.set('total_unpaid_amount', sum);
} }
}; };
......
...@@ -9,10 +9,12 @@ ...@@ -9,10 +9,12 @@
<a:init-procedure/> <a:init-procedure/>
<a:view> <a:view>
<a:link id="prj_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="prj_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="prj_project_query_link" url="${/request/@context_path}/modules/prj/PRJ501DF/prj_project_maintain.screen"/> <!--<a:link id="prj_project_query_link" url="${/request/@context_path}/modules/prj/PRJ501DF/prj_project_maintain.screen"/>
<a:link id="${/parameter/@layout_code}_df_csh_payment_apply_link" url="${/request/@context_path}/modules/csh/CSH770/df_csh_payment_apply_wfl.screen"/> <a:link id="${/parameter/@layout_code}_df_csh_payment_apply_link" url="${/request/@context_path}/modules/csh/CSH770/df_csh_payment_apply_wfl.screen"/>-->
<a:link id="${/parameter/@layout_code}con_contract_query_link" url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<a:link id="transaction_return_downloadFile_link_id" url="${/request/@context_path}/downloadFile.lview"/>
<script><![CDATA[ <script><![CDATA[
function open_project_win(ds_id, record_id) { /*function open_project_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id); var record = $(ds_id).findById(record_id);
var param = {}; var param = {};
param['project_id'] = record.get('contract_id'); param['project_id'] = record.get('contract_id');
...@@ -35,16 +37,50 @@ ...@@ -35,16 +37,50 @@
param['url_title'] = '付款明细'; param['url_title'] = '付款明细';
param['winid'] = 'payment_req_number_link'; param['winid'] = 'payment_req_number_link';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, '${/parameter/@layout_code}_df_csh_payment_apply_link', ds_id,'${/parameter/@layout_code}'); hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, '${/parameter/@layout_code}_df_csh_payment_apply_link', ds_id,'${/parameter/@layout_code}');
}; };*/
function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_usage'] = 'QUERY';
param['function_code'] = 'CON3200Q';
param['maintain_type'] = 'QUERY';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_link', ds_id,'${/parameter/@layout_code}');
}
function open_return_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var header_id = record.data.source_id;
var url = $('transaction_return_downloadFile_link_id').getUrl() + '?table_name=CSH_TRANSACTION_RETURN&_csrf=${/session/@_csrf.token}&header_id=' + header_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'transaction_return_uploadFile_id',
width: 850,
height: 400
});
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) { window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
if (name == 'contract_number' && value && '${/parameter/@lease_channel}' == '01') { if (name == 'contract_number' && value) {
return '<a href="javascript:open_project_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>'; return '<a href="javascript:open_contract_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
} }
if (name == 'payment_req_number' && value && '${/parameter/@lease_channel}' == '01') { if (name == 'attachment_r' && record.get('source_table') == 'CSH_TRANSACTION_RETURN') {
return '<a href="javascript:open_return_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + '附件' + '</a>';
}
/*if (name == 'payment_req_number' && value && '${/parameter/@lease_channel}' == '01') {
link_function = '${/parameter/@layout_code}_payment_req_number_win'; link_function = '${/parameter/@layout_code}_payment_req_number_win';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.get('payment_req_id') + '\',\'' + record.ds.id + '\',\'' + '\');">' + value + '</a>'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.get('payment_req_id') + '\',\'' + record.ds.id + '\',\'' + '\');">' + value + '</a>';
} }
if (name == 'payment_req_number' && value && '${/parameter/@lease_channel}' == '01') {
return value;
}*/
if (name == 'payment_req_number' && value && '${/parameter/@lease_channel}' == '01') {
link_function = '${/parameter/@layout_code}_payment_req_number_win';
return value
}
if (name == 'payment_req_number' && value && '${/parameter/@lease_channel}' == '01') { if (name == 'payment_req_number' && value && '${/parameter/@lease_channel}' == '01') {
return value; return value;
} }
......
...@@ -233,6 +233,60 @@ ...@@ -233,6 +233,60 @@
} }
}); });
window['${/parameter/@layout_code}_on_layout_dynamic_grid_select'] = function(ds, record, bp_seq) {
var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds';
var formr_r_ds_id = '${/parameter/@layout_code}_R_F_QUERY__ds';
var g_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_RESULT', 'hl_hsbc_paying_batch');
var r_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'R_RESULT', 'hl_hsbc_paying_batch');
var form_record = $(form_ds_id).getAt(0);
var form_r_record = $(formr_r_ds_id).getAt(0);
var g_records = $(g_ds_id).getSelected();
var r_records = $(r_ds_id).getSelected();
if (g_ds_id == ds.id) {
var sum = 0;
for (var i = 0;i < g_records.length;i++) {
sum = plus(sum, g_records[i].get('totalamt'));
}
form_record.set('total_unpaid_amount', sum);
}
if (r_ds_id == ds.id) {
var sum = 0;
for (var i = 0;i < r_records.length;i++) {
sum = plus(sum, r_records[i].get('totalamt'));
}
form_r_record.set('total_unpaid_amount', sum);
}
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_unselect'] = function(ds, record, bp_seq) {
var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds';
var formr_r_ds_id = '${/parameter/@layout_code}_R_F_QUERY__ds';
var g_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_RESULT', 'hl_hsbc_paying_batch');
var r_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'R_RESULT', 'hl_hsbc_paying_batch');
var form_record = $(form_ds_id).getAt(0);
var form_r_record = $(formr_r_ds_id).getAt(0);
var g_records = $(g_ds_id).getSelected();
var r_records = $(r_ds_id).getSelected();
if (g_ds_id == ds.id) {
var sum = 0;
for (var i = 0;i < g_records.length;i++) {
sum = plus(sum, g_records[i].get('totalamt'));
}
form_record.set('total_unpaid_amount', sum);
}
if (r_ds_id == ds.id) {
var sum = 0;
for (var i = 0;i < r_records.length;i++) {
sum = plus(sum, r_records[i].get('totalamt'));
}
form_r_record.set('total_unpaid_amount', sum);
}
};
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment