Commit 90119130 authored by 18083's avatar 18083

资产管理费需求变更调整

parent ef9a644c
......@@ -21,7 +21,7 @@
param['function_code'] = 'CSH501D_ASSET';
} else {
param['function_usage'] = 'QUERY';
param['function_code'] = 'CSH501D_ASSET';
param['function_code'] = 'ASSET_SAVE';
param['download'] = 'Y';
}
param['winid'] = 'csh_payment_asset_update_window';
......
......@@ -43,12 +43,12 @@
}
//如果头id 不为空,就使用自在定义的ds进行查询
Leaf.onReady(function () {
if ('${/parameter/@source_type}' == 'WFL') {
if ('${/parameter/@source_type}' == 'WFL'||'${/parameter/@source_type}' == 'WFL_N') {
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
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 payment_req_id = '${/parameter/@payment_req_id}';
//进项发票信息
var first = document.getElementsByClassName("item-input-wrap");
var second = first[5].getElementsByClassName('item-textField');
......@@ -57,6 +57,31 @@
third.style.backgroundColor = '#FF7744';
});
//form加载
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'], 'csh_payment_req_hd');
if (ds_id == ds.id && ds_id) {
if ('${/parameter/@source_type}' == 'WFL_N') {
record.getField('bp_bank_account_num').setReadOnly(true);
record.getField('bp_bank_account_num_n').setReadOnly(true);
record.getField('req_date').setReadOnly(true);
}
}
}
//grid加载
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
var lnds_id_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
if(lnds_id_ds_id == ds.id &&lnds_id_ds_id){
//代理店节点只能上传附件,不能编辑
if ('${/parameter/@source_type}' == 'WFL_N') {
record.getField('apply_pay_date').setReadOnly(true);
}
}
}
var dirty_flag = 'N';
window['${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
dirty_flag = 'Y';
......@@ -73,7 +98,7 @@
if((name == 'bp_bank_account_num'||name == 'bp_bank_account_name') && !Ext.isEmpty(hdrecord.get('bp_bank_account_num')) && !Ext.isEmpty(hdrecord.get('bp_bank_account_name'))){
var records = $(lnds_id).getAll();
for (var i = 0; i < records.length; i++) {
records[i].set('bp_bank_account_num', bank_account_num);
records[i].set('bp_bank_account_num', bp_bank_account_num);
records[i].set('bp_bank_full_name', bp_bank_full_name);
records[i].set('bp_bank_account_name', bp_bank_account_name);
records[i].set('bp_bank_account_id', bp_bank_account_id);
......@@ -286,7 +311,7 @@
});
}
//打印
//打印:待确认是否有打印文件,先预留
function csh501_print() {
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var hd_record = $(hdds_id).getCurrentRecord();
......@@ -403,12 +428,13 @@
hls_doc_get_layout_code('csh501d_get_layout_code_link_id', param, 'con_rd_wfl_link', '', '${/parameter/@layout_code}');
}
function upload_csh_file(id,name,record_id,item_code) {
//上传附件
function upload_csh_file(id,name,record_id,query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if(record.get('approval_status')=='NEW'){
var url = $('csh_uploadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_ASSET_HD&header_id=' + record_id;
}else{
if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY'){
var url = $('csh_downloadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_ASSET_HD&header_id=' + record_id;
}else{
var url = $('csh_uploadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_ASSET_HD&header_id=' + record_id;
}
var win = new Leaf.Window({
url: url,
......@@ -418,17 +444,40 @@
height: 400
});
win.on('close', function () {
record.ds.query();
//record.ds.query();
});
}
//上传发票附件:用于电子档案
function upload_invoice_file(id,name,record_id,query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY'){
var url = $('csh_downloadFile_id').getUrl() + '?table_name=HL_REQ_PAYMENT_ACP&header_id=' + record_id;
}else{
var url = $('csh_uploadFile_id').getUrl() + '?table_name=HL_REQ_PAYMENT_ACP&header_id=' + record_id;
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'invoice_attachment_uploadFile_id',
width: 850,
height: 400
});
win.on('close', function () {
//record.ds.query();
});
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'contract_number'&& value) {
return '<a href="javascript:open_con_contract_readonly_win(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
}else if (name == 'attach_link'){
return '<a href=javascript:upload_csh_file(\''+record.id+'\',\''+ name + '\',\'' +record.get('payment_req_id')+'\',\'' + record.get('item_code')+'\')>附件上传</a>';
return '<a href=javascript:upload_csh_file(\''+record.id+'\',\''+ name + '\',\'' +record.get('payment_req_id')+'\',\'' + config_record.get('query_only')+'\')>附件上传</a>';
}else if (name == 'invoice_link'){
return '<a href=javascript:upload_invoice_file(\''+record.id+'\',\''+ name + '\',\'' +record.get('payment_req_id')+'\',\'' + config_record.get('query_only')+'\')>发票附件上传</a>';
}
};
......
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