Commit d6cbd6ce authored by 18083's avatar 18083

手工凭证批量文件上传及批次号调整

parent 354fadce
......@@ -92,9 +92,13 @@
<bm:query-field name="description" queryExpression="t1.description like &apos;%&apos;||${@description}||&apos;%&apos;"/>
<bm:query-field name="query_reversed_flag" queryExpression="(${@query_reversed_flag}=&apos;Y&apos; and nvl(t1.reversed_flag,&apos;N&apos;)=&apos;N&apos;)"/>
<bm:query-field name="status_list_flag" queryExpression="(${@status_list_flag}=&apos;Y&apos; and t1.status in (&apos;U&apos;,&apos;B&apos;))"/>
<bm:query-field name="gld_flag" queryExpression="exists (select 1 from gld_je_transaction d where d.je_transaction_code = t1.je_transaction_code and d.gld_flag = ${@gld_flag})"/>
<!--<bm:query-field name="gld_flag" queryExpression="exists (select 1 from gld_je_transaction d where d.je_transaction_code = t1.je_transaction_code and d.gld_flag = ${@gld_flag})"/>-->
<bm:query-field name="bp_id_tenant" queryExpression="exists (select 1 from hls_journal_detail_v dv where dv.reference1=(select a.bp_code from hls_bp_master a where a.bp_id=${@bp_id_tenant} )and dv.journal_header_id=t1.journal_header_id )"/>
<bm:query-field name="desc" queryExpression="t1.description like &apos;%&apos;||${@desc}||&apos;%&apos; "/>
<bm:query-field name="post_sap" queryExpression="(decode(t1.sap_belnr,null,'N','Y') = ${@post_sap})"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="query" expression="(CASE WHEN ${/session/@role_id} in (select role_id from sys_role where role_code in('HAND','0017')) THEN nvl(t1.manual_flag,&apos;N&apos;) else 'N' end =&apos;N&apos;)"/>
</bm:data-filters>
</bm:model>
......@@ -157,7 +157,7 @@
EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
AND t.position_code IN ('026'))
AND t.position_code IN ('026','025'))
and t1.journal_type in('GENERAL_SALARIES','BPO_SALARIES')
union
select t1.journal_header_id,
......@@ -203,15 +203,14 @@
where t.journal_header_imp_id = t1.journal_header_id
) post_gl_status
FROM hls_journal_header_imp t1
where
EXISTS (SELECT 1
where EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
AND t.position_code IN ('017') or ${/session/@user_id} = 10418
AND t.position_code IN ('002','013') or ${/session/@user_id} = 10418
)
and t1.journal_type in('GENERAL_SALARIES','BPO_SALARIES','COST_IMPORT','FUND_POOL','GLOBAL_TEMPLATE','FINANCIAL_TEMPLATE')
) t1
) t1
#WHERE_CLAUSE#
order by t1.journal_header_id desc
]]></bm:query-sql>
......
......@@ -8,6 +8,7 @@
hls_journal_import_pkg.insert_hls_journal_tmp(p_user_id => ${/session/@user_id},
p_header_id => ${@header_id},
p_company_id => ${/session/@company_id},
p_count =>${@v_count},
p_template_type=>${@template_type}
);
END;
......@@ -16,6 +17,8 @@
<bm:parameter inputPath="/session/@user_id"/>
<bm:parameter inputPath="/session/@session_id"/>
<bm:parameter inputPath="/session/@template_type"/>
<bm:parameter name="v_count" dataType="java.lang.Long" input="false" output="true" outputPath="@v_count"/>
</bm:parameters>
</bm:operation>
<bm:operation name="update" >
......
......@@ -56,7 +56,7 @@
</bm:query-fields>
<bm:data-filters>
<!--<bm:data-filter name="query" expression="( (${/session/@role_id} = (select role_id from sys_role where role_code = '0006') and t1.workflow_code in (&apos;CONTRACT_INCEPT_WFL&apos;, &apos;DCFL_CSH_PAYMENT_REQ&apos;)) or (${/session/@role_id} in (select role_id from sys_role where role_code in ('0012', '0013', '0014')) and t1.workflow_code in (&apos;DCFL_CSH_PAYMENT_REQ&apos;, &apos;DEPOSIT_RETURN&apos;)) or (${/session/@role_id} = (select role_id from sys_role where role_code = '0005') and t1.workflow_code in (&apos;PROJECT_WFL&apos;)) or (${/session/@role_id} = (select role_id from sys_role where role_code = '0008') and t1.workflow_code in (&apos;CON_ET_WFL&apos;,&apos;TENANT_CHANGE_WFL&apos;,&apos;CON_BUYBACK_WFL&apos;,&apos;DEPOSIT_RETURN&apos;,&apos;WFL_FEE_REMIT&apos;)) or (${/session/@role_id} not in (select role_id from sys_role where role_code in('0005', '0006', '0008', '0012', '0013', '0014')) and 1 = 1))"/>-->
<bm:data-filter name="query" expression="( (${/session/@role_id} = (select role_id from sys_role where role_code = '0006') and t1.workflow_code in (&apos;CONTRACT_INCEPT_WFL&apos;, &apos;DCFL_CSH_PAYMENT_REQ&apos;)) or (${/session/@role_id} in (select role_id from sys_role where role_code in ('0012', '0013', '0014')) and t1.workflow_code in (&apos;DCFL_CSH_PAYMENT_REQ&apos;, &apos;DEPOSIT_RETURN&apos;)) or (${/session/@role_id} = (select role_id from sys_role where role_code = '0005') and t1.workflow_code in (&apos;PROJECT_WFL&apos;)) or (${/session/@role_id} = (select role_id from sys_role where role_code = '0008') and t1.workflow_code in (&apos;CON_ET_WFL&apos;,&apos;TENANT_CHANGE_WFL&apos;,&apos;CON_BUYBACK_WFL&apos;,&apos;DEPOSIT_RETURN&apos;)) or (${/session/@role_id} not in (select role_id from sys_role where role_code in('0005', '0006', '0008', '0012', '0013', '0014')) and 1 = 1)
<bm:data-filter name="query" expression="( (${/session/@role_id} = (select role_id from sys_role where role_code = '0006') and t1.workflow_code in (&apos;CONTRACT_INCEPT_WFL&apos;, &apos;DCFL_CSH_PAYMENT_REQ&apos;)) or (${/session/@role_id} in (select role_id from sys_role where role_code in ('0012', '0013', '0014')) and t1.workflow_code in (&apos;DCFL_CSH_PAYMENT_REQ&apos;, &apos;DEPOSIT_RETURN&apos;)) or (${/session/@role_id} = (select role_id from sys_role where role_code = '0005') and t1.workflow_code in (&apos;PROJECT_WFL&apos;)) or (${/session/@role_id} = (select role_id from sys_role where role_code = '0008') and t1.workflow_code in (&apos;CON_ET_WFL&apos;,&apos;TENANT_CHANGE_WFL&apos;,&apos;CON_BUYBACK_WFL&apos;,&apos;DEPOSIT_RETURN&apos;)) or (${/session/@role_id} in (select role_id from sys_role where role_code in ('0017','HAND')) and t1.workflow_code not in (&apos;HLS_JOURNAL_WFL&apos;, &apos;HLS_JOURNAL_REVERSE_WFL&apos;)) or (${/session/@role_id} not in (select role_id from sys_role where role_code in('0005', '0006', '0008', '0012', '0013', '0014','0017','HAND')) and 1 = 1)
or( ((t1.SUBMITTED_BY = ${/session/@user_id}) or (
(${/session/@user_id}
in (Select t.user_id
......
......@@ -27,7 +27,7 @@
<a:link id="batch_attachment_tmp_id" url="${/request/@context_path}/modules/hls/HLS536/batch_attchment_tmp.lsc"/>
<script><![CDATA[
Leaf.onReady(function() {
if ('${/session/@user_id}'!=10418 && '${/session/@user_id}'!=1) {
if ('${/session/@user_id}'!=10418) {
$('reverse_btn_id').hide();
$('reverse_submit_btn_id').hide();
}
......@@ -153,7 +153,7 @@
param['wfl_type'] = 'SALARIES';
}
if ($(ds_id).validate()) {
if(param['wfl_type']!='FINANCIAL_TEMPLATE'){
if(param['wfl_type']!='FINANCIAL_TEMPLATE' && param['wfl_type']!='FUND_POOL'){
Leaf.showConfirm('${l:HLS.PROMPT}', '确认已无其它附件需要添加?', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
......@@ -268,7 +268,7 @@
}
var param = {};
param['details'] = journal_header_imp_list;
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认提交审批?', function () {
Leaf.showConfirm('${l:HLS.PROMPT}', '确认已无其它附件需要添加?', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('hls_journal_reverse_link_id').getUrl(),
......@@ -339,12 +339,12 @@
height: 400
});
win.on('close', function() {
hls536_journal_query();
$('hls_journal_header_result_ds').query();
});
}
function attachment_upload(val,rec,name){
if(rec.get('wfl_status')=='NEW'||rec.get('wfl_status')=='REJECT'){
if(rec.get('wfl_status')=='NEW'||rec.get('wfl_status')=='REJECT'||rec.get('reverse_wfl_status')=='NEW'||rec.get('reverse_wfl_status')=='REJECT'){
return '<a href=javascript:open_other_attachment_upload('+rec.get('journal_header_id')+')>其它附件</a>';
}else{
return '<a href=javascript:open_other_attachment_download('+rec.get('journal_header_id')+')>其它附件</a>';
......@@ -362,7 +362,7 @@
height: 400
});
win.on('close', function() {
hls536_journal_query();
$('hls_journal_header_result_ds').query();
});
}
......@@ -377,7 +377,7 @@
height: 400
});
win.on('close', function() {
hls536_journal_query();
$('hls_journal_header_result_ds').query();
});
}
......@@ -388,7 +388,8 @@
return ;
}
for (var i = 0; i < records.length; i++) {
if (records[i].get('wfl_status') == 'APPROVED'||records[i].get('wfl_status') == 'APPROVING') {
if ((records[i].get('reversed_flag') == 'R' && (records[i].get('reverse_wfl_status') == 'APPROVING'||records[i].get('reverse_wfl_status') == 'APPROVED'))||
(records[i].get('reversed_flag') == 'N' && (records[i].get('wfl_status') == 'APPROVING'||records[i].get('wfl_status') == 'APPROVED'))) {
Leaf.showMessage('提示', '凭证状态为审批中或者审批通过,不能进行批量附件上传!');
return;
}
......
......@@ -14,7 +14,6 @@
<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}');
......@@ -69,10 +68,28 @@
height: 400
});
win.on('close', function() {
hls536_journal_query();
$('hls_journal_header_result_ds').query();
});
}
function attachment_upload(val,rec,name){
return '<a href=javascript:open_other_attachment_download('+rec.get('journal_header_id')+')>其它附件</a>';
}
//其它附件下载
function open_other_attachment_download(record_id){
var url = $('journal_attachment_uploadFile_id').getUrl() + '?table_name=HLS_JOURNAL_DETAIL_IMP&header_id=' + record_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'other_attachment_uploadFile_id',
width: 850,
height: 400
});
win.on('close', function() {
$('hls_journal_header_result_ds').query();
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
......@@ -120,6 +137,7 @@
<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="other_attachment_file" prompt="其它附件" width="120" renderer="attachment_upload" align="center"/>
<!--<a:column name="error_message" prompt="错误信息" width="150"/>-->
<!--<a:column name="attachment_file" prompt="附件" width="120" renderer="receipt_attachment_upload" align="center"/>-->
</a:columns>
......
......@@ -22,11 +22,16 @@
para: param,
success: function (res) {
Leaf.Masker.unmask(Ext.getBody());
if(res.result.v_count>0){
Leaf.showInfoMessage('成功','导入成功!',function(){
window.location.href = $('hls_journal_entrance_import_link').getUrl();
});
}else{
Leaf.showInfoMessage('失败','导入失败!',function(){
window.location.href = $('hls_journal_entrance_import_link').getUrl();
});
}
},
failure: function (res) {
Leaf.Masker.unmask(Ext.getBody());
......
......@@ -56,11 +56,11 @@
}
function receipt_attachment_upload(val,rec,name){
return '<a href=javascript:open_upload_window('+rec.get('journal_header_id')+')>附件</a>';
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=FND_INTERFACE_HEADERS&header_id=' + 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}',
......@@ -142,7 +142,7 @@
<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:column name="attachment_file" prompt="凭证模板附件" width="120" renderer="receipt_attachment_upload" align="center"/>
<a:column name="other_attachment_file" prompt="其它附件" width="120" renderer="attachment_upload" align="center"/>
</a:columns>
</a:grid>
......
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