Commit 61038efe authored by 18083's avatar 18083

手工凭证反冲调整

parent a1ac21d0
...@@ -12,5 +12,12 @@ ...@@ -12,5 +12,12 @@
select fnd_interface_headers_s.nextval header_id from dual select fnd_interface_headers_s.nextval header_id from dual
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
BEGIN
hls_journal_import_pkg.reverse_hls_journal_import( p_journal_header_id =>${@journal_header_id}, p_user_id =>${/session/@user_id} );
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations> </bm:operations>
</bm:model> </bm:model>
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
from sys_code_values_v v from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS' where v.code = 'HLS536_WFL_STATUS'
and v.code_value = t1.wfl_status) wfl_status_n, and v.code_value = t1.wfl_status) wfl_status_n,
t1.reversed_flag,
t1.reverse_wfl_status, t1.reverse_wfl_status,
(select v.code_value_name value_name (select v.code_value_name value_name
from sys_code_values_v v from sys_code_values_v v
...@@ -46,7 +47,8 @@ ...@@ -46,7 +47,8 @@
t1.journal_type, t1.journal_type,
(select t.post_gl_status (select t.post_gl_status
from hls_journal_header t from hls_journal_header t
where t.journal_num = t1.journal_num) post_gl_status where t.journal_header_imp_id = t1.journal_header_id
) post_gl_status
FROM hls_journal_header_imp t1 FROM hls_journal_header_imp t1
where 1=1 where 1=1
AND EXISTS (SELECT 1 AND EXISTS (SELECT 1
...@@ -83,6 +85,7 @@ ...@@ -83,6 +85,7 @@
from sys_code_values_v v from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS' where v.code = 'HLS536_WFL_STATUS'
and v.code_value = t1.wfl_status) wfl_status_n, and v.code_value = t1.wfl_status) wfl_status_n,
t1.reversed_flag,
t1.reverse_wfl_status, t1.reverse_wfl_status,
(select v.code_value_name value_name (select v.code_value_name value_name
from sys_code_values_v v from sys_code_values_v v
...@@ -91,7 +94,8 @@ ...@@ -91,7 +94,8 @@
t1.journal_type, t1.journal_type,
(select t.post_gl_status (select t.post_gl_status
from hls_journal_header t from hls_journal_header t
where t.journal_num = t1.journal_num) post_gl_status where t.journal_header_imp_id = t1.journal_header_id
) post_gl_status
FROM hls_journal_header_imp t1 FROM hls_journal_header_imp t1
where 1=1 where 1=1
AND EXISTS (SELECT 1 AND EXISTS (SELECT 1
...@@ -128,6 +132,7 @@ ...@@ -128,6 +132,7 @@
from sys_code_values_v v from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS' where v.code = 'HLS536_WFL_STATUS'
and v.code_value = t1.wfl_status) wfl_status_n, and v.code_value = t1.wfl_status) wfl_status_n,
t1.reversed_flag,
t1.reverse_wfl_status, t1.reverse_wfl_status,
(select v.code_value_name value_name (select v.code_value_name value_name
from sys_code_values_v v from sys_code_values_v v
...@@ -136,7 +141,8 @@ ...@@ -136,7 +141,8 @@
t1.journal_type, t1.journal_type,
(select t.post_gl_status (select t.post_gl_status
from hls_journal_header t from hls_journal_header t
where t.journal_num = t1.journal_num) post_gl_status where t.journal_header_imp_id = t1.journal_header_id
) post_gl_status
FROM hls_journal_header_imp t1 FROM hls_journal_header_imp t1
where 1=1 where 1=1
AND EXISTS (SELECT 1 AND EXISTS (SELECT 1
...@@ -173,6 +179,7 @@ ...@@ -173,6 +179,7 @@
from sys_code_values_v v from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS' where v.code = 'HLS536_WFL_STATUS'
and v.code_value = t1.wfl_status) wfl_status_n, and v.code_value = t1.wfl_status) wfl_status_n,
t1.reversed_flag,
t1.reverse_wfl_status, t1.reverse_wfl_status,
(select v.code_value_name value_name (select v.code_value_name value_name
from sys_code_values_v v from sys_code_values_v v
...@@ -181,7 +188,8 @@ ...@@ -181,7 +188,8 @@
t1.journal_type, t1.journal_type,
(select t.post_gl_status (select t.post_gl_status
from hls_journal_header t from hls_journal_header t
where t.journal_num = t1.journal_num) post_gl_status where t.journal_header_imp_id = t1.journal_header_id
) post_gl_status
FROM hls_journal_header_imp t1 FROM hls_journal_header_imp t1
where 1=1 where 1=1
AND EXISTS (SELECT 1 AND EXISTS (SELECT 1
...@@ -205,5 +213,6 @@ ...@@ -205,5 +213,6 @@
<bm:query-field name="total_amount_dr_to" datatype="java.lang.Double" queryExpression="nvl(t1.total_amount_dr,t1.total_amount_cr) &lt;= ${@total_amount_dr_to}"/> <bm:query-field name="total_amount_dr_to" datatype="java.lang.Double" queryExpression="nvl(t1.total_amount_dr,t1.total_amount_cr) &lt;= ${@total_amount_dr_to}"/>
<bm:query-field name="description" queryExpression="t1.description like ${@description}"/> <bm:query-field name="description" queryExpression="t1.description like ${@description}"/>
<bm:query-field name="wfl_status" queryExpression="t1.wfl_status=${@wfl_status}"/> <bm:query-field name="wfl_status" queryExpression="t1.wfl_status=${@wfl_status}"/>
<bm:query-field name="reverse_wfl_status" queryExpression="t1.reverse_wfl_status=${@reverse_wfl_status}"/>
</bm:query-fields> </bm:query-fields>
</bm:model> </bm:model>
...@@ -52,6 +52,10 @@ ...@@ -52,6 +52,10 @@
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:data-filters>
<bm:data-filter name="query" expression="t1.reversed_journal_header_id is null "/>
</bm:data-filters>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="journal_num" queryExpression="t1.journal_num like ${@journal_num}"/> <bm:query-field name="journal_num" queryExpression="t1.journal_num like ${@journal_num}"/>
<bm:query-field name="journal_date_from" queryExpression="to_date(t1.journal_date,'yyyy-mm-dd') &gt;= to_date(${@journal_date_from},'yyyy-mm-dd')"/> <bm:query-field name="journal_date_from" queryExpression="to_date(t1.journal_date,'yyyy-mm-dd') &gt;= to_date(${@journal_date_from},'yyyy-mm-dd')"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2022-12-6 下午2:36:27
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.journal_header_id,
t1.journal_submit_batch_id,
t1.journal_reverse_batch_id,
t1.journal_num,
t1.error_message,
t1.total_amount_dr,
t1.total_amount_cr,
(select c.company_short_name
from fnd_companies_vl c
where c.company_id = t1.je_company_id) js_company_short_name,
t1.period_name,
to_char(t1.journal_date,'yyyy-mm-dd') journal_date,
t1.currency_code,
(SELECT gc.currency_name
FROM gld_currency_v gc
WHERE gc.currency_code = t1.currency_code) currency_desc,
t1.total_amount_fuc_dr,
(SELECT d.je_transaction_desc
FROM gld_je_transaction d
WHERE d.je_transaction_code = t1.je_transaction_code) je_transaction_desc,
t1.description,
(SELECT COUNT(1)
FROM hls_journal_detail_imp t
WHERE t.journal_header_id = t1.journal_header_id) je_detail_count,
t1.wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS'
and v.code_value = t1.wfl_status) wfl_status_n,
t1.reverse_wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS_REVERSE'
and v.code_value = t1.reverse_wfl_status) reverse_wfl_status_n,
t1.journal_type,
(select t.post_gl_status
from hls_journal_header t
where t.journal_num = t1.journal_num) post_gl_status
FROM hls_journal_header_imp t1
#WHERE_CLAUSE#
order by t1.journal_header_id desc
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="journal_num" queryExpression="t1.journal_num like ${@journal_num}"/>
<bm:query-field name="journal_date_from" queryExpression="to_date(t1.journal_date,'yyyy-mm-dd') &gt;= to_date(${@journal_date_from},'yyyy-mm-dd')"/>
<bm:query-field name="journal_date_to" queryExpression="to_date(t1.journal_date,'yyyy-mm-dd') &lt;= to_date(${@journal_date_to},'yyyy-mm-dd')"/>
<bm:query-field name="total_amount_dr_from" datatype="java.lang.Double" queryExpression="nvl(t1.total_amount_dr,t1.total_amount_cr) &gt;= ${@total_amount_dr_from}"/>
<bm:query-field name="total_amount_dr_to" datatype="java.lang.Double" queryExpression="nvl(t1.total_amount_dr,t1.total_amount_cr) &lt;= ${@total_amount_dr_to}"/>
<bm:query-field name="journal_reverse_batch_id" queryExpression="t1.journal_reverse_batch_id = ${@journal_submit_batch_id}"/>
<bm:query-field name="description" queryExpression="t1.description like ${@description}"/>
<bm:query-field name="wfl_status" queryExpression="t1.wfl_status=${@wfl_status}"/>
</bm:query-fields>
</bm:model>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
(v_journal_submit_batch_id, (v_journal_submit_batch_id,
null, null,
'NEW', 'NEW',
${@wfl_type}, '',
${/session/@user_id}, ${/session/@user_id},
sysdate, sysdate,
${/session/@user_id}, ${/session/@user_id},
...@@ -40,18 +40,14 @@ ...@@ -40,18 +40,14 @@
<![CDATA[ <![CDATA[
begin begin
update hls_journal_header_imp hjhi update hls_journal_header_imp hjhi
set hjhi.reverse_wfl_status = 'NEW', set hjhi.reverse_wfl_status = 'APPROVING',
hjhi.reversed_flag = 'R', hjhi.journal_reverse_batch_id = ${/parameter/@journal_submit_batch_id},
hjhi.journal_submit_batch_id = ${/parameter/@journal_submit_batch_id},
hjhi.last_updated_by = ${/session/@user_id}, hjhi.last_updated_by = ${/session/@user_id},
hjhi.last_update_date = sysdate hjhi.last_update_date = sysdate
where hjhi.journal_header_id = ${@journal_header_id}; where hjhi.journal_header_id = ${@journal_header_id};
end; end;
]]> ]]>
</bm:update-sql> </bm:update-sql>
<!--<bm:parameters>
<bm:parameter inputPath="/session/@session_id"/>
</bm:parameters>-->
</bm:operation> </bm:operation>
<bm:operation name="execute"> <bm:operation name="execute">
<bm:update-sql> <bm:update-sql>
...@@ -65,9 +61,6 @@ ...@@ -65,9 +61,6 @@
end; end;
]]> ]]>
</bm:update-sql> </bm:update-sql>
<!--<bm:parameters>
<bm:parameter inputPath="/session/@session_id"/>
</bm:parameters>-->
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
</bm:model> </bm:model>
...@@ -20,11 +20,14 @@ ...@@ -20,11 +20,14 @@
<a:link id="hls_journal_reverse_link_id" url="${/request/@context_path}/modules/hls/HLS536/batch_hls_journal_reverse.lsc"/> <a:link id="hls_journal_reverse_link_id" url="${/request/@context_path}/modules/hls/HLS536/batch_hls_journal_reverse.lsc"/>
<a:link id="hls_journal_import_delete_link" model="hls.HLS536.hls_journal_import_delete" <a:link id="hls_journal_import_delete_link" model="hls.HLS536.hls_journal_import_delete"
modelaction="batch_update"/> modelaction="batch_update"/>
<a:link id="hls_journal_import_reverse_link" model="hls.HLS536.hls_journal_import_head_id"
modelaction="batch_update"/>
<a:link id="journal_attachment_uploadFile_id" url="${/request/@context_path}/downloadFile.lview"/> <a:link id="journal_attachment_uploadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<script><![CDATA[ <script><![CDATA[
Leaf.onReady(function() { Leaf.onReady(function() {
if ('${/session/@user_id}'!=10418) { if ('${/session/@user_id}'!=10418 && '${/session/@user_id}'!=1) {
$('reverse_btn_id').hide(); $('reverse_btn_id').hide();
$('reverse_submit_btn_id').hide();
} }
}); });
//查询按钮 //查询按钮
...@@ -57,7 +60,6 @@ ...@@ -57,7 +60,6 @@
//删除凭证 //删除凭证
function hls536_journal_delete(){ function hls536_journal_delete(){
debugger;
var records = $('hls_journal_header_result_ds').getSelected(); var records = $('hls_journal_header_result_ds').getSelected();
if(records.length == 0){ if(records.length == 0){
Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录!'); Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录!');
...@@ -65,7 +67,7 @@ ...@@ -65,7 +67,7 @@
} }
var datas = []; var datas = [];
for (var i = 0; i < records.length; i++) { for (var i = 0; i < records.length; i++) {
if (records[i].get('wfl_status') == 'APPROVING' || records[i].get('wfl_status') == 'APPROVED') { if ((records[i].get('reversed_flag') == 'N'&&(records[i].get('wfl_status') == 'APPROVING' || records[i].get('wfl_status') == 'APPROVED'))||(records[i].get('reversed_flag') == 'R'&&(records[i].get('reverse_wfl_status') == 'APPROVING' || records[i].get('reverse_wfl_status') == 'APPROVED'))){
Leaf.showMessage('提示', '只有新建和拒绝状态的单据才能刪除!'); Leaf.showMessage('提示', '只有新建和拒绝状态的单据才能刪除!');
return; return;
} }
...@@ -173,8 +175,46 @@ ...@@ -173,8 +175,46 @@
} }
} }
//反冲 //生成反冲数据,生成后数据可编辑
function hls536_journal_reverse(){ function hls536_journal_reverse(){
debugger;
var records = $('hls_journal_header_result_ds').getSelected();
if(records.length == 0){
Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录!');
return ;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
if (records[i].get('wfl_status') != 'APPROVED') {
Leaf.showMessage('提示', '凭证没有审批通过不能进行反冲,请检查!');
return;
}
if (records[i].get('reversed_flag') == 'R') {
Leaf.showMessage('提示', '存在已经反冲的凭证,请检查!');
return;
}
var obj = {};
obj['journal_header_id'] = records[i].get('journal_header_id');
obj['_status'] = 'execute';
datas[i] = obj;
}
Leaf.request({
url: $('hls_journal_import_reverse_link').getUrl(),
para: datas,
success: function () {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
$('hls_journal_header_result_ds').query();
},
scope: this
});
}
//反冲提交流程
function hls536_journal_reverse_submit(){
var records = $('hls_journal_header_result_ds').getSelected(); var records = $('hls_journal_header_result_ds').getSelected();
if(records.length == 0){ if(records.length == 0){
Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录!'); Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录!');
...@@ -182,11 +222,20 @@ ...@@ -182,11 +222,20 @@
} }
//凭证传输状态不为Y的不能进行反冲 //凭证传输状态不为Y的不能进行反冲
for (var i = 0; i < records.length; i++) { for (var i = 0; i < records.length; i++) {
if (records[i].get('wfl_status') != 'APPROVED' || records[i].get('post_gl_status') != 'Y') { if (records[i].get('wfl_status') != 'APPROVED') {
Leaf.showMessage('提示', '凭证没有审批通过或者凭证没有传输至SBO,请检查!'); Leaf.showMessage('提示', '凭证没有审批通过不能提交反冲审批,请检查!');
return; return;
} }
if (records[i].get('reversed_flag') != 'R') {
Leaf.showMessage('提示', '非反冲数据不能提交反冲审批,请检查!');
return;
} }
if (records[i].get('reversed_flag') == 'R' && (records[i].get('reverse_wfl_status') == 'APPROVING'||records[i].get('reverse_wfl_status') == 'APPROVED')) {
Leaf.showMessage('提示', '反冲审批中或审批通过的单据不能提交审批,请检查!');
return;
}
}
var journal_header_imp_list = []; var journal_header_imp_list = [];
for (var i = 0; i < records.length; i++) { for (var i = 0; i < records.length; i++) {
...@@ -224,7 +273,8 @@ ...@@ -224,7 +273,8 @@
function hls536_link_dynamic(reocrd_id, journal_header_id) { function hls536_link_dynamic(reocrd_id, journal_header_id) {
//增加逻辑:审批中、审批通过的只读;新建、审批拒绝的可编辑 //增加逻辑:审批中、审批通过的只读;新建、审批拒绝的可编辑
var record = $('hls_journal_header_result_ds').findById(reocrd_id); var record = $('hls_journal_header_result_ds').findById(reocrd_id);
if(record.get('wfl_status') == 'NEW' || record.get('wfl_status') == 'REJECT'){ //if (record.get('wfl_status') == 'APPROVING' || record.get('wfl_status') == 'APPROVED'){
if((record.get('reversed_flag')=='N' && record.get('wfl_status') !='APPROVING' && record.get('wfl_status') != 'APPROVED') ||(record.get('reversed_flag')=='R' && record.get('reverse_wfl_status') != 'APPROVING' && record.get('reverse_wfl_status') != 'APPROVED')){
var maintain_type = 'UPDATE'; var maintain_type = 'UPDATE';
var param = record.data; var param = record.data;
param['currency'] = param['currency_code']; param['currency'] = param['currency_code'];
...@@ -235,7 +285,8 @@ ...@@ -235,7 +285,8 @@
param['maintain_type'] = maintain_type; param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}'; param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_import_create_link_id'); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_import_create_link_id');
}else if (record.get('wfl_status') == 'APPROVING' || record.get('wfl_status') == 'APPROVED'){ //}else if (record.get('wfl_status') == 'APPROVING' || record.get('wfl_status') == 'APPROVED'){
}else{
var maintain_type = 'READONLY'; var maintain_type = 'READONLY';
var param = record.data; var param = record.data;
param['currency'] = param['currency_code']; param['currency'] = param['currency_code'];
...@@ -277,6 +328,7 @@ ...@@ -277,6 +328,7 @@
<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"/>
<a:dataSets> <a:dataSets>
<a:dataSet id="hls536_wfl_status_ds" lookupCode="HLS536_WFL_STATUS"/> <a:dataSet id="hls536_wfl_status_ds" lookupCode="HLS536_WFL_STATUS"/>
<a:dataSet id="hls536_reverse_wfl_status_ds" lookupCode="HLS536_WFL_STATUS_REVERSE"/>
<a:dataSet id="hls_journal_header_query"> <a:dataSet id="hls_journal_header_query">
<a:fields> <a:fields>
<a:field name="journal_num"/> <a:field name="journal_num"/>
...@@ -287,6 +339,8 @@ ...@@ -287,6 +339,8 @@
<a:field name="description"/> <a:field name="description"/>
<a:field name="wfl_status_n" displayField="code_value_name" options="hls536_wfl_status_ds" returnField="wfl_status" valueField="code_value"/> <a:field name="wfl_status_n" displayField="code_value_name" options="hls536_wfl_status_ds" returnField="wfl_status" valueField="code_value"/>
<a:field name="wfl_status" /> <a:field name="wfl_status" />
<a:field name="reverse_wfl_status_n" displayField="code_value_name" options="hls536_reverse_wfl_status_ds" returnField="reverse_wfl_status" valueField="code_value"/>
<a:field name="reverse_wfl_status" />
</a:fields> </a:fields>
</a:dataSet> </a:dataSet>
<a:dataSet id="hls_journal_header_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS536.hls_journal_import_header" queryDataSet="hls_journal_header_query" selectable="true"> <a:dataSet id="hls_journal_header_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS536.hls_journal_import_header" queryDataSet="hls_journal_header_query" selectable="true">
...@@ -301,7 +355,8 @@ ...@@ -301,7 +355,8 @@
<a:toolbarButton click="hls536_journal_import" text="导入凭证模板"/> <a:toolbarButton click="hls536_journal_import" text="导入凭证模板"/>
<a:toolbarButton click="hls536_journal_delete" text="删除凭证"/> <a:toolbarButton click="hls536_journal_delete" text="删除凭证"/>
<a:toolbarButton click="hls536_journal_send" text="提交审批"/> <a:toolbarButton click="hls536_journal_send" text="提交审批"/>
<a:toolbarButton id="reverse_btn_id" click="hls536_journal_reverse" text="反冲"/> <a:toolbarButton id="reverse_btn_id" click="hls536_journal_reverse" text="生成反冲"/>
<a:toolbarButton id="reverse_submit_btn_id" click="hls536_journal_reverse_submit" text="提交反冲"/>
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form column="5" labelSeparator=" " labelWidth="100" marginWidth="40" title="HAP_QUERY_TITLE"> <a:form column="5" labelSeparator=" " labelWidth="100" marginWidth="40" title="HAP_QUERY_TITLE">
<a:textField name="journal_num" bindTarget="hls_journal_header_query" prompt="凭证编号"/> <a:textField name="journal_num" bindTarget="hls_journal_header_query" prompt="凭证编号"/>
...@@ -311,6 +366,7 @@ ...@@ -311,6 +366,7 @@
<a:numberField name="total_amount_dr_to" allowFormat="true" bindTarget="hls_journal_header_query" prompt="金额到"/> <a:numberField name="total_amount_dr_to" allowFormat="true" bindTarget="hls_journal_header_query" prompt="金额到"/>
<a:textField name="description" bindTarget="hls_journal_header_query" prompt="凭证摘要"/> <a:textField name="description" bindTarget="hls_journal_header_query" prompt="凭证摘要"/>
<a:comboBox name="wfl_status_n" bindTarget="hls_journal_header_query" prompt="凭证导入状态"/> <a:comboBox name="wfl_status_n" bindTarget="hls_journal_header_query" prompt="凭证导入状态"/>
<a:comboBox name="reverse_wfl_status_n" bindTarget="hls_journal_header_query" prompt="凭证反冲状态"/>
</a:form> </a:form>
<a:grid id="hls_journal_headers_grid" bindTarget="hls_journal_header_result_ds" marginHeight="250" marginWidth="40" navBar="true"> <a:grid id="hls_journal_headers_grid" bindTarget="hls_journal_header_result_ds" marginHeight="250" marginWidth="40" navBar="true">
<a:columns> <a:columns>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2012-12-6 上午11:18:39
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
</a:init-procedure>
<a:view>
<a:link id="hls_journal_import_create_link_id" url="${/request/@context_path}/modules/hls/HLS536/hls_journal_import_create.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="journal_attachment_uploadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:screen-include screen="modules/hls/hls_common_javascript.lview"/>
<script><![CDATA[
Leaf.onReady(function () {
$('hls_journal_header_result_ds').setQueryParameter('journal_submit_batch_id','${/parameter/@journal_submit_batch_id}');
})
//查询按钮
function hls536_journal_query() {
$('hls_journal_header_result_ds').setQueryParameter('journal_submit_batch_id','${/parameter/@journal_submit_batch_id}');
$('hls_journal_header_result_ds').query();
}
//重置按钮
function hls536_journal_reset() {
$('hls_journal_header_query').reset();
}
// 审批流程中,叶唯吟节点可编辑页面
function hls536_link_dynamic(reocrd_id, journal_header_id) {
var record = $('hls_journal_header_result_ds').findById(reocrd_id);
var param = record.data;
param['currency'] = param['currency_code'];
param['function_code'] = 'HLS536';
param['document_id'] = journal_header_id;
param['document_category'] = 'JE';
var edit_flag = '${/parameter/@edit_flag}';
if(edit_flag == 'Y' ){
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
}else {
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
}
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_import_create_link_id');
}
function hls536_journal_num_render(value, record, name) {
return '<a href="javascript:hls536_link_dynamic(' + record.id + ',' + record.get('journal_header_id') + ');">' + value + '</a>';
}
function receipt_attachment_upload(val,rec,name){
return '<a href=javascript:open_upload_window('+rec.get('journal_header_id')+')>附件</a>';
}
function open_upload_window(record_id){
var url = $('journal_attachment_uploadFile_id').getUrl() + '?table_name=HLS_JOURNAL_HEADER_IMP&header_id=' + record_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'attachment_uploadFile_id',
width: 850,
height: 400
});
win.on('close', function() {
hls536_journal_query();
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<a:dataSet id="hls536_wfl_status_ds" lookupCode="HLS536_WFL_STATUS"/>
<a:dataSet id="hls_journal_header_query">
<a:fields>
<a:field name="journal_num"/>
<a:field name="journal_date_from"/>
<a:field name="journal_date_to"/>
<a:field name="total_amount_dr_from"/>
<a:field name="total_amount_dr_to"/>
<a:field name="description"/>
<a:field name="wfl_status_n" displayField="code_value_name" options="hls536_wfl_status_ds" returnField="wfl_status" valueField="code_value"/>
<a:field name="wfl_status" />
</a:fields>
</a:dataSet>
<a:dataSet id="hls_journal_header_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS536.hls_journal_import_reverse_wfl" queryDataSet="hls_journal_header_query" selectable="true" queryUrl="${/request/@context_path}/autocrud/hls.HLS536.hls_journal_import_reverse_wfl/query?journal_reverse_batch_id=${/parameter/@journal_submit_batch_id}">
>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:toolbarButton click="hls536_journal_query" text="HLS.QUERY"/>
<a:toolbarButton click="hls536_journal_reset" text="HLS.RESET"/>
</a:screenTopToolbar>
<a:form column="5" labelSeparator=" " labelWidth="100" marginWidth="40" title="HAP_QUERY_TITLE">
<a:textField name="journal_num" bindTarget="hls_journal_header_query" prompt="凭证编号"/>
<a:datePicker name="journal_date_from" bindTarget="hls_journal_header_query" prompt="凭证日期从"/>
<a:datePicker name="journal_date_to" bindTarget="hls_journal_header_query" prompt="凭证日期到"/>
<a:numberField name="total_amount_dr_from" allowFormat="true" bindTarget="hls_journal_header_query" prompt="金额从"/>
<a:numberField name="total_amount_dr_to" allowFormat="true" bindTarget="hls_journal_header_query" prompt="金额到"/>
<a:textField name="description" bindTarget="hls_journal_header_query" prompt="凭证摘要"/>
<a:comboBox name="wfl_status_n" bindTarget="hls_journal_header_query" prompt="凭证导入状态"/>
</a:form>
<a:grid id="hls_journal_headers_grid" bindTarget="hls_journal_header_result_ds" marginHeight="250" marginWidth="40" navBar="true">
<a:columns>
<a:column name="journal_num" lock="true" prompt="凭证编号" renderer="hls536_journal_num_render" width="120"/>
<a:column name="js_company_short_name" prompt="记账公司" width="90"/>
<a:column name="period_name" align="center" prompt="期间" width="80"/>
<a:column name="journal_date" align="center" prompt="凭证日期" renderer="Leaf.formatDate" width="90"/>
<a:column name="currency_desc" align="center" prompt="币种" width="80"/>
<a:column name="total_amount_fuc_dr" align="right" prompt="金额" renderer="Leaf.formatMoney" width="120"/>
<a:column name="description" prompt="凭证摘要" width="220"/>
<a:column name="je_detail_count" prompt="凭证行数量" width="50"/>
<!--<a:column name="wfl_status_n" prompt="凭证导入状态" width="100"/>-->
<a:column name="reverse_wfl_status_n" prompt="凭证反冲状态" width="100"/>
<!--<a:column name="error_message" prompt="错误信息" width="150"/>-->
<!--<a:column name="attachment_file" prompt="附件" width="120" renderer="receipt_attachment_upload" align="center"/>-->
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
alert('请选择正确的导入文件!请使用xls或者xlsx后缀的文件'); alert('请选择正确的导入文件!请使用xls或者xlsx后缀的文件');
} else { } else {
doSubmit(templatetype); doSubmit(templatetype);
//document.getElementById('importForm').submit();
} }
} }
} }
......
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