Commit 4dd5a7b1 authored by 38823's avatar 38823

付款凭证功能初版开发

parent 3c6f0a2f
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$Date: 2023-12-25
$Revision: 1
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
HL_CM_PAYMENT_JOURNAL_PKG.payment_save(
p_payment_journal_id =>${@payment_journal_id},
p_user_id => ${/session/@user_id},
p_invoice_series =>${@invoice_series}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$Date: 2023-12-25
$Revision: 1
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="insert">
<bm:parameters>
<bm:parameter name="payment_batch_id" output="true" outputPath="@payment_batch_id"/>
</bm:parameters>
<bm:update-sql><![CDATA[
declare
v_payment_batch_id hl_cm_payment_journal_batch.payment_batch_id%TYPE := hl_cm_payment_journal_batch_s.nextval;
begin
${@payment_batch_id} := v_payment_batch_id;
insert into hl_cm_payment_journal_batch
(payment_batch_id,
instance_id,
wfl_status,
created_by,
creation_date,
last_updated_by,
last_update_date)
values
(v_payment_batch_id,
null,
null,
${/session/@user_id},
sysdate,
${/session/@user_id},
sysdate
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
update hl_cm_payment_journal hc
set hc.payment_batch_id =${/parameter/@payment_batch_id},
hc.last_updated_by = ${/session/@user_id},
hc.last_update_date = sysdate
where hc.payment_journal_id = ${@payment_journal_id}
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
HL_CM_PAYMENT_JOURNAL_PKG.payment_wfl_start(p_payment_batch_id =>${/parameter/@payment_batch_id},
p_user_id =>${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -338,5 +338,12 @@ var enableLayoutConfig = {
'modules/prj/PRJ501N/prj_project_lease_import.lview:':true,
'modules/csh/CSH531F/csh_bank_recoi_margin_check.lview:':true,
'modules/csh/CSH531F/csh_bank_recoi_processing.lview':true,
'modules/csh/CSH531F/csh_bank_recoi_processing_workflow.lview':true
'modules/csh/CSH531F/csh_bank_recoi_processing_workflow.lview':true,
'modules/csh/CSH531F/csh_bank_recoi_margin_check.lview':true,
'modules/prj/PRJ500N/prj_project_constru_create.lview':true,
'modules/prj/PRJ501N/prj_project_maintain_constru.lview':true,
'modules/prj/PRJ501N/prj_project_maintain_constru_wfl.lview':true,
'modules/inv/INV100/inv_payment_wfl.lview':true,
'modules/inv/INV100/inv_payment_detail.lview':true,
'modules/inv/INV100/inv_payment_wfl_detail.lview':true
};
\ No newline at end of file
var override_queryfields = [
{
name:'journal_date_from',
queryexpression:"t1.journal_date between to_date(${@journal_date_from},'yyyy-mm-dd') and nvl(to_date(${@journal_date_to},'yyyy-mm-dd'),t1.journal_date)"
},
{
name:'journal_date_to',
queryexpression:"t1.journal_date between nvl(to_date(${@journal_date_from},'yyyy-mm-dd'),t1.journal_date) and to_date(${@journal_date_to},'yyyy-mm-dd')"
},
{
name: 'total_amount_dr_from',
queryexpression: "t1.total_amount_fuc_dr between ${@total_amount_dr_from} and nvl(${@total_amount_dr_to},${@total_amount_dr_from})"
},
{
name:'total_amount_dr_to',
queryexpression: "t1.total_amount_fuc_dr between ${@total_amount_dr_from} and nvl(${@total_amount_dr_to},${@total_amount_dr_from})"
},
{
name: 'desc',
queryexpression: "t1.description like ${@desc}"
},
{
name: 'contract_number',
queryexpression: "t1.contract_number like ${@contract_number}"
},
{
name:'bp_id_tenant',
queryexpression: "t1.bp_id_tenant like ${@bp_id_tenant}"
}
];
var add_datafilters=[
{
name:'division',
expression:"(t1.division not in ('70','92','95'))"
},
{
name:'approval_status',
expression: "(t1.approval_status='APPROVED')"
}
];
override();
add_datafilter();
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<p:echo></p:echo>
<a:model-insert model="inv.inv100.payment_wfl_approval" trace="true"/>
<a:batch-apply sourcepath="/parameter">
<a:model-update model="inv.inv100.payment_wfl_approval" trace="true"/>
</a:batch-apply>
<a:model-execute model="inv.inv100.payment_wfl_approval" trace="true"/>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$Date: 2023-12-21
$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:init-procedure>
<a:view>
<a:link id="save_detail_link" model="inv.inv100.payment_detail_save" modelaction="update"/>
<script type="text/javascript"><![CDATA[
//自定义保存
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
debugger;
var ds_id =get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
var record = $(ds_id).getCurrentRecord();
var invoiceSeries = record.get('invoice_series');
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
Leaf.request({
url: $('save_detail_link').getUrl(),
para: {
payment_journal_id: "${/parameter/@payment_journal_id}",
invoice_series: invoiceSeries
},
success: function(res) {
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
},
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>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$Date: 2023-12-20
$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: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"/>
<a:link id="payment_wfl_link_id"
url="${/request/@context_path}/modules/inv/INV100/inv_payment_batch.lsc"/>
<script type="text/javascript"><![CDATA[
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'] = 'MODIFY';
param['maintain_type'] = 'MODIFY';
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>';
}
};
//提交审批
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 records = $(ds_id).getSelected();
var ParaData = [];
for(var i=0; i<records.length;i++){
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(),
para: ParaData,
success: function () {
Leaf.SideBar.show({
msg: '提交成功',
duration: 2000
});
ds_id.query();
},
scope: this
});
}, function () {
}, null, null);
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$Date: 2023-12-21
$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:init-procedure>
<a:view>
<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')
});
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</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