Commit 62666b28 authored by 38823's avatar 38823

付款凭证开发完善

parent 4dd5a7b1
var add_datafilters=[
{
name:'payment_batch_id',
expression:"(t1.payment_batch_id=${/parameter/@payment_batch_id})"
}
];
add_datafilter();
\ No newline at end of file
......@@ -12,6 +12,17 @@
<a:view>
<a:link id="save_detail_link" model="inv.inv100.payment_detail_save" modelaction="update"/>
<script type="text/javascript"><![CDATA[
$L.onReady(function(){
debugger;
if("${/parameter/@function_usage}"=='QUERY'){
if(document.getElementById('${/parameter/@layout_code}_user_button1')){
document.getElementById("${/parameter/@layout_code}_user_button1").style.display = "none";
}
if(document.getElementById('${/parameter/@layout_code}_exit')){
document.getElementById("${/parameter/@layout_code}_exit").style.display = "none";
}
}
});
//自定义保存
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
debugger;
......
......@@ -24,8 +24,13 @@
param['payment_journal_id'] = record.get('payment_journal_id');
param['journal_header_id'] = record.get('journal_header_id');
param['function_code'] = 'INV110';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'MODIFY';
if(record.get('wfl_status')=='NEW' || record.get('wfl_status')=='REJECT'){
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'MODIFY';
}else {
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'QUERY';
}
param['url_title'] = '付款凭证审批明细';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}journal_detail_link',ds_id);
}
......@@ -42,14 +47,21 @@
//提交审批
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hl_cm_payment_journal');
var records = $(ds_id).getSelected();
var ParaData = [];
if(records.length ==0){
$L.showMessage("提示",'请至少选择一条数据!');
return;
}
for(var i=0; i<records.length;i++){
if(records[i].data.wfl_status == 'APPROVING' || records[i].data.wfl_status == 'APPROVED'){
$L.showMessage("提示",'请选择新建或者审批拒绝的单据!');
return;;
}
records[i].set('_status','execute');
ParaData.push(records[i].data);
}
console.log(ParaData);
Leaf.showConfirm('${l:PROMPT}', '确认提交付款凭证工作流?', function () {
Leaf.request({
url: $('payment_wfl_link_id').getUrl(),
......@@ -59,7 +71,7 @@
msg: '提交成功',
duration: 2000
});
ds_id.query();
$(ds_id).query();
},
scope: this
});
......
......@@ -10,13 +10,39 @@
<a:init-procedure>
</a:init-procedure>
<a:view>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="${/parameter/@layout_code}journal_detail_link"
url="${/request/@context_path}/modules/inv/INV100/inv_payment_detail.lview"/>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function() {
debugger;
// var result_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_detail');
// result_ds.setQueryParameter('payment_bat')
var result_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hl_cm_payment_journal');
$(result_ds).setQueryParameter('payment_batch_id','${/parameter/@payment_batch_id}');
$(result_ds).query();
});
function open_journal_detail(record_id, ds_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = {};
param['payment_journal_id'] = record.get('payment_journal_id');
param['journal_header_id'] = record.get('journal_header_id');
param['function_code'] = 'INV110';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'QUERY';
param['url_title'] = '付款凭证审批明细';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}journal_detail_link',ds_id);
}
//超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if(name == 'journal_num'){
link_function = 'open_journal_detail';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
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