Commit 9bd735f0 authored by 18083's avatar 18083

资管费付款调整

parent b38f57eb
...@@ -20,5 +20,18 @@ var override_queryfields = [ ...@@ -20,5 +20,18 @@ var override_queryfields = [
queryexpression:"t1.payment_req_number like '%'||${@payment_req_number}||'%'" queryexpression:"t1.payment_req_number like '%'||${@payment_req_number}||'%'"
} }
]; ];
var add_datafilters = [
{
name : '',
expression : "exists(select 1\n" +
" from csh_payment_req_ln l,con_contract cc,con_contract_cashflow cf\n" +
" where l.payment_req_id = t1.payment_req_id\n" +
" and l.ref_doc_category = 'CONTRACT'\n" +
" and l.ref_doc_id = cc.contract_id\n" +
" and l.ref_doc_line_id = cf.cashflow_id\n" +
" and cf.cf_item in ('40'))"
} ];
add_datafilter();
override(); override();
...@@ -225,10 +225,9 @@ ...@@ -225,10 +225,9 @@
function detail_link(id, name, query_only) { function detail_link(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var param = {}; var param = {};
param['payment_req_id'] = record.get('payment_req_id'); param['payment_req_id'] = record.get('payment_req_id');
param['document_category'] = record.get('document_category'); param['document_category'] = record.get('document_category');
param['business_type'] = record.get('business_type'); param['business_type'] = record.get('business_type');
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var param = {}; var param = {};
param['payment_req_id'] = record.get('payment_req_id'); param['payment_req_id'] = record.get('payment_req_id');
param['business_type'] = record.get('business_type');
if (record.get('approval_status') == 'NEW' || record.get('approval_status') == 'RETURN' || record.get('approval_status') == 'REJECT') { if (record.get('approval_status') == 'NEW' || record.get('approval_status') == 'RETURN' || record.get('approval_status') == 'REJECT') {
param['function_usage'] = 'UPDATE'; param['function_usage'] = 'UPDATE';
param['function_code'] = 'CSH501D_ASSET'; param['function_code'] = 'CSH501D_ASSET';
......
...@@ -33,12 +33,8 @@ ...@@ -33,12 +33,8 @@
<a:link id="acp_invoice_inf_import_total_link" model="acp.ACP522.acp_invoice_inf_import_total" modelaction="update"/> <a:link id="acp_invoice_inf_import_total_link" model="acp.ACP522.acp_invoice_inf_import_total" modelaction="update"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
jQuery.noConflict(); jQuery.noConflict();
var con_business_type='${/parameter/@con_business_type}'||'${/model/loan_flag_path/record/@business_type}'||'LEASE'; //var con_business_type='${/parameter/@con_business_type}'||'${/model/loan_flag_path/record/@business_type}'||'LEASE';
//工作流审批界面校验发票状态 function get_current_amount(amt) {
if ('${/parameter/@source_type}' == 'WFL_Y') {
//待校验
}
function get_current_amount(amt) {
if (!Ext.isEmpty(amt)) { if (!Ext.isEmpty(amt)) {
return parseFloat(amt).toFixed(2); return parseFloat(amt).toFixed(2);
} else { } else {
...@@ -53,24 +49,15 @@ ...@@ -53,24 +49,15 @@
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln'); var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var payment_req_id = '${/parameter/@payment_req_id}'; var payment_req_id = '${/parameter/@payment_req_id}';
if (payment_req_id) { //进项发票信息
$(lnds_id).setQueryUrl('${/request/@context_path}/autocrud/csh.CSH501.csh_payment_req_ln_query_after_save/query');
$(lnds_id).setQueryParameter("payment_req_id", payment_req_id);
$(lnds_id).query();
$(hdds_id).setQueryParameter("payment_req_id", payment_req_id);
$(hdds_id).query();
}
//进项发票信息
var first = document.getElementsByClassName("item-input-wrap"); var first = document.getElementsByClassName("item-input-wrap");
var second = first[5].getElementsByClassName('item-textField'); var second = first[5].getElementsByClassName('item-textField');
var third = second[0]; var third = second[0];
third.setAttribute('placeholder', '注:扫描时请将鼠标光标放在此处。。。'); third.setAttribute('placeholder', '注:扫描时请将鼠标光标放在此处。。。');
third.style.backgroundColor = '#FF7744'; third.style.backgroundColor = '#FF7744';
}); });
if ('${/parameter/@payment_req_id}') {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); var dirty_flag = 'N';
}
var dirty_flag = 'N';
window['${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
dirty_flag = 'Y'; dirty_flag = 'Y';
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
...@@ -253,26 +240,6 @@ ...@@ -253,26 +240,6 @@
}; };
//var first_load_flag = 'N';
function on_csh_payment_req_temp_ln_ds_load(ds) {
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var records = ds.getAll();
if (!'${/parameter/@payment_req_id}' && lnds_id && '${/parameter/@business_type}' == 'PAYMENT') {
for (var i = 0; i < records.length; i++) {
var record = records[i];
if (!record.get('apply_pay_date')) {
//添加时间为预定的每月20号
var pre_date = [new Date().getFullYear(), new Date().getMonth() + 1, 20].join('-');
record.set('apply_pay_date', pre_date);
}
$(lnds_id).create(Ext.apply({}, record.data));
}
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
//新增时调用(grid,table,gridBox) //新增时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function (ds, record, config_records, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function (ds, record, config_records, bp_seq) {
record.set("created_by_n", '${/model/user_name_path/record/@user_desc}'); record.set("created_by_n", '${/model/user_name_path/record/@user_desc}');
...@@ -418,21 +385,6 @@ ...@@ -418,21 +385,6 @@
}; };
//保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res, bp_seq) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
dirty_flag = 'N';
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var hd_record = $(hdds_id).getCurrentRecord();
var payment_req_id = hd_record.get('payment_req_id');
//获得相应的行信息
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
$(lnds_id).setQueryUrl('${/request/@context_path}/autocrud/csh.CSH501.csh_payment_req_ln_query_after_save/query');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
//合同编号超链接 //合同编号超链接
function open_con_contract_readonly_win(record_id, ds_id) { function open_con_contract_readonly_win(record_id, ds_id) {
//创建明细页面根据条件表TBL_LA11字段 function_code、bp_class匹配布局代码layout_code BCML_CONTRACT_NP_MAINTAIN、BCML_CONTRACT_ORG_MAINTAIN //创建明细页面根据条件表TBL_LA11字段 function_code、bp_class匹配布局代码layout_code BCML_CONTRACT_NP_MAINTAIN、BCML_CONTRACT_ORG_MAINTAIN
...@@ -453,7 +405,7 @@ ...@@ -453,7 +405,7 @@
function upload_csh_file(id,name,record_id,item_code) { function upload_csh_file(id,name,record_id,item_code) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if(record.get('approval_status'=='NEW')){ if(record.get('approval_status')=='NEW'){
var url = $('csh_uploadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_ASSET_HD&header_id=' + record_id; var url = $('csh_uploadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_ASSET_HD&header_id=' + record_id;
}else{ }else{
var url = $('csh_downloadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_ASSET_HD&header_id=' + record_id; var url = $('csh_downloadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_ASSET_HD&header_id=' + record_id;
...@@ -481,25 +433,10 @@ ...@@ -481,25 +433,10 @@
} }
}; };
function on_csh_payment_req_temp_ln_ds_query(ds, qpara) { ]]></script>
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); <a:link id="${/parameter/@layout_code}csh511_csh_payment_req_hd_query" model="csh.CSH511.csh_payment_req_hd"
qpara['payment_bp_id'] = '${/parameter/@payment_bp_id}'; modelaction="query"/>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
}
]]></script>
<a:link id="${/parameter/@layout_code}csh511_csh_payment_req_hd_query" model="csh.CSH511.csh_payment_req_hd"
modelaction="query"/>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<a:dataSet id="csh_payment_req_temp_ln_ds" autoQuery="true" fetchAll="true"
model="csh.CSH501.csh_payment_req_ln_query">
<a:events>
<a:event name="load" handler="on_csh_payment_req_temp_ln_ds_load"/>
<a:event name="query" handler="on_csh_payment_req_temp_ln_ds_query"/>
</a:events>
</a:dataSet>
</a:dataSets>
</a:view> </a:view>
</a:screen> </a:screen>
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