Commit 804596fa authored by Luochenglong's avatar Luochenglong

Merge remote-tracking branch 'origin/remote_dev' into remote_dev

parents 8921a523 0344fd32
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:fields>
<bm:field name="year"/>
<bm:field name="month"/>
<bm:field name="base_journal_dir"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select sys_parameter_pkg.value('HLS_JOURNAL_DIR') base_journal_dir,
to_char(sysdate,'yyyy') year,
to_char(sysdate,'mm') month
from dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-03-21 14:20:22
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
delete from hls_journal_imp_tem ot where ot.session_id = ${/session/@session_id};
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
BEGIN
INSERT INTO hls_journal_imp_tem
(session_id, journal_header_id)
VALUES
(${/session/@session_id}, ${@journal_header_id});
END;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select ot.journal_header_id from hls_journal_imp_tem ot where ot.session_id = ${/session/@session_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -11,6 +11,9 @@
<bm:query-sql><![CDATA[
select * from (
select t1.journal_header_id,
t1.batch_id,
t1.batch_number,
t1.reverse_batch_number,
t1.journal_submit_batch_id,
t1.journal_num,
t1.error_message,
......@@ -58,6 +61,9 @@
and t1.journal_type in('COST_IMPORT','GLOBAL_TEMPLATE')
union
select t1.journal_header_id,
t1.batch_id,
t1.batch_number,
t1.reverse_batch_number,
t1.journal_submit_batch_id,
t1.journal_num,
t1.error_message,
......@@ -105,6 +111,9 @@
and t1.journal_type in('FUND_POOL','FINANCIAL_TEMPLATE')
union
select t1.journal_header_id,
t1.batch_id,
t1.batch_number,
t1.reverse_batch_number,
t1.journal_submit_batch_id,
t1.journal_num,
t1.error_message,
......@@ -152,6 +161,9 @@
and t1.journal_type in('GENERAL_SALARIES','BPO_SALARIES')
union
select t1.journal_header_id,
t1.batch_id,
t1.batch_number,
t1.reverse_batch_number,
t1.journal_submit_batch_id,
t1.journal_num,
t1.error_message,
......@@ -206,13 +218,15 @@
</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_num" queryExpression="t1.journal_num like &apos;%&apos;||${@journal_num}||&apos;%&apos;"/>
<bm:query-field name="batch_number" queryExpression="t1.batch_number like &apos;%&apos;||${@batch_number}||&apos;%&apos;"/>
<bm:query-field name="reverse_batch_number" queryExpression="t1.reverse_batch_number like &apos;%&apos;||${@reverse_batch_number}||&apos;%&apos;"/>
<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="description" queryExpression="t1.description like ${@description}"/>
<bm:query-field name="description" queryExpression="t1.description like &apos;%&apos;||${@description}||&apos;%&apos;"/>
<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>
......@@ -10,6 +10,7 @@
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.journal_header_id,
t1.batch_id,
t1.journal_submit_batch_id,
t1.journal_num,
t1.error_message,
......@@ -59,13 +60,13 @@
</bm:data-filters>
<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 &apos;%&apos;||${@journal_num}||&apos;%&apos;"/>
<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_submit_batch_id" queryExpression="t1.journal_submit_batch_id = ${@journal_submit_batch_id}"/>
<bm:query-field name="description" queryExpression="t1.description like ${@description}"/>
<bm:query-field name="description" queryExpression="t1.description like &apos;%&apos;||${@description}||&apos;%&apos;"/>
<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>
......
......@@ -54,13 +54,13 @@
</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_num" queryExpression="t1.journal_num like &apos;%&apos;||${@journal_num}||&apos;%&apos;"/>
<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="description" queryExpression="t1.description like &apos;%&apos;||${@description}||&apos;%&apos;"/>
<bm:query-field name="wfl_status" queryExpression="t1.wfl_status=${@wfl_status}"/>
</bm:query-fields>
</bm:model>
......@@ -21,9 +21,10 @@
<bm:operation name="update" >
<bm:update-sql><![CDATA[
BEGIN
hls_journal_import_pkg.init_journal_atm(p_document_number =>${@document_number},
hls_journal_import_pkg.init_other_journal_atm(p_session_id =>${/session/@session_id},
p_file_path =>${@file_path},
p_file_name =>${@file_name},
p_file_type =>${@file_type},
p_file_length =>${@file_length},
p_user_id =>${/session/@user_id});
END;
......
<?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>
<a:model-delete model="hls.HLS536.hls_attachment_tmp" trace="true"/>
<a:batch-apply sourcepath="/parameter/details">
<a:model-insert model="hls.HLS536.hls_attachment_tmp" trace="true"/>
</a:batch-apply>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
<?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>
<!--lsc文件在日志中打印参数信息-->
<p:echo></p:echo>
<p:echo></p:echo>
<a:model-insert model="hls.HLS536.submit_hls_journal_tmp" trace="true"/>
<a:batch-apply sourcepath="/parameter/details">
<!--只要是 record 里面没有 被 改变 的 数字字段 ,没有 改变还是 数字类型的,但是 改变后 传到 后端是 String 类型 的 了 -->
<a:model-update model="hls.HLS536.submit_hls_journal_tmp" trace="true"/>
<a:model-update model="hls.HLS536.submit_hls_journal_tmp" trace="true"/>
</a:batch-apply>
<a:model-execute model="hls.HLS536.submit_hls_journal_tmp" trace="true"/>
</a:init-procedure>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<p:echo/>
<s:server-script><![CDATA[
importPackage(java.io);
var request = $ctx['_instance.javax.servlet.http.HttpServletRequest'];
var response = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
try{
data = $bm('hls.HLS536.excel_system_parameter').queryAsMap().getChildren();
var base_dir=data[0].base_journal_dir;
var year=data[0].year;
var month=data[0].month;
var factory = new Packages.org.apache.commons.fileupload.disk.DiskFileItemFactory();
var up = new Packages.org.apache.commons.fileupload.servlet.ServletFileUpload(factory);
var items = up.parseRequest(request);
var i = items.iterator();
while (i.hasNext()) {
var item = i.next();
if (item.isFormField()) {
println("item.getFieldName()"+item.getFieldName() + "=" + item.getString());
} else {
var file_old_name =item.getName();
//println('文件名'+file_old_name);
var file_type_name = item.getName().substr(item.getName().lastIndexOf("."));
var file_type = item.getName().substr(item.getName().lastIndexOf(".")+1);
var guid_file_name_path = $bm('cont.CON500.con_contract_get_guid_file_name').queryAsMap();
var guid_file_name_tables = guid_file_name_path.getChildren();
var file_name=guid_file_name_tables[0].guid_file_name;
var file_path = base_dir+year+"\\"+month+"\\";
var dir=new File(String(file_path));
if(!dir.exists()){
createDir(file_path);
}
var f = item.getStoreLocation();
var input,output;
var tempFile=new File(String(f));
try{
input = new FileInputStream(tempFile);
output = new FileOutputStream(file_path+file_name);
var buf = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024);
var bytesRead;
while ((bytesRead = input.read(buf)) > 0) {
output.write(buf, 0, bytesRead);
}
input.close();
output.close();
}catch(e){
//删除临时表
$bm('hls.HLS536.hls_attachment_tmp').delete();
println('上传文件出错,请联系管联系管理员理员!e'+e);
if(input!=null){
input.close();
}
if(output!=null){
output.close();
}
raise_app_error('上传文件出错,请联系管理员!');
println('上传文件出错,请联系管理员!e');
}
var file_length=get_file_length(file_path+file_name);
//文件上传成功后进行附件挂载
$bm('hls.HLS536.insert_hls_journal_tmp').update({
"file_path":String(file_path+file_name),
"file_name":file_old_name,
"file_type":file_type,
file_length:file_length
})
//删除临时表
$bm('hls.HLS536.hls_attachment_tmp').delete();
}
}
}catch (e) {
//删除临时表
$bm('hls.HLS536.hls_attachment_tmp').delete();
raise_app_error(e);
}
function createDir(dir){
var file=new File(String(dir));
if(!file.exists()){//如果文件夹不存在
file.mkdirs();//创建文件夹
}
}
//获取文件长度
function get_file_length(path){
var file=new File(String(path));
if (file.exists() && file.isFile()){
//println(f.length());
length=file.length();
return length;
} else{
return 0;
}
}
]]></s:server-script>
</a:init-procedure>
<a:view>
<a:link id="hls_journal_entrance_import_link" url="${/request/@context_path}/modules/hls/HLS536/hls_journal_import_entrance.lview"/>
<script type="text/javascript"> <![CDATA[
window.location.href = $('hls_journal_entrance_import_link').getUrl();
]]></script>
</a:view>
</a:screen>
......@@ -14,8 +14,8 @@
<a:link id="hls_journal_con_contract_update_link_id" url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:screen-include screen="modules/hls/hls_common_javascript.lview"/>
<!--<a:link id="hls_journal_import_link" url="${/request/@context_path}/modules/hls/HLS536/hls_journal_import_handle.lview"/>-->
<a:link id="hls_journal_import_link" url="${/request/@context_path}/modules/hls/HLS536/hls_journal_import_upload.lview"/>
<a:link id="hls_journal_other_import_link" url="${/request/@context_path}/modules/hls/HLS536/hls_journal_other_attach_upload.lview"/>
<a:link id="hls_journal_submit_link_id" url="${/request/@context_path}/modules/hls/HLS536/batch_hls_journal_tmp.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"
......@@ -23,6 +23,8 @@
<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_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<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) {
......@@ -151,17 +153,16 @@
param['wfl_type'] = 'SALARIES';
}
if ($(ds_id).validate()) {
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认提交审批?', function () {
if(param['wfl_type']!='FINANCIAL_TEMPLATE'){
Leaf.showConfirm('${l:HLS.PROMPT}', '确认已无其它附件需要添加?', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
//先生成批次表数据,再update这几条数据的状态,最后提交工作流
Leaf.request({
url: $('hls_journal_submit_link_id').getUrl(),
para: param,
success: function (res) {
Leaf.Masker.unmask(Ext.getBody());
Leaf.showMessage('提示', '提交审批成功!');
// 审批成功后查询gird
hls536_journal_query();
$('hls_journal_header_result_ds').query();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
......@@ -171,7 +172,28 @@
},
scope: this
});
}, null);
},function(){},300,100);
}else{
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认提交审批?', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('hls_journal_submit_link_id').getUrl(),
para: param,
success: function (res) {
Leaf.Masker.unmask(Ext.getBody());
Leaf.showMessage('提示', '提交审批成功!');
$('hls_journal_header_result_ds').query();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
},function(){},300,100);
}
}
}
......@@ -182,8 +204,7 @@
Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录!');
return ;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
for (var i = 0; i < records.length; i++) {
if (records[i].get('wfl_status') != 'APPROVED') {
Leaf.showMessage('提示', '凭证没有审批通过不能进行反冲,请检查!');
return;
......@@ -192,7 +213,10 @@
Leaf.showMessage('提示', '存在已经反冲的凭证,请检查!');
return;
}
}
var datas = [];
for (var i = 0; i < records.length; i++) {
var obj = {};
obj['journal_header_id'] = records[i].get('journal_header_id');
obj['_status'] = 'execute';
......@@ -246,15 +270,13 @@
param['details'] = journal_header_imp_list;
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认提交审批?', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
//先生成批次表数据,再update这几条数据的状态,最后提交工作流
Leaf.request({
Leaf.request({
url: $('hls_journal_reverse_link_id').getUrl(),
para: param,
success: function (res) {
Leaf.Masker.unmask(Ext.getBody());
Leaf.showMessage('提示', '提交审批成功!');
// 审批成功后查询gird
hls536_journal_query();
$('hls_journal_header_result_ds').query();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
......@@ -272,7 +294,6 @@
function hls536_link_dynamic(reocrd_id, journal_header_id) {
//增加逻辑:审批中、审批通过的只读;新建、审批拒绝的可编辑
var record = $('hls_journal_header_result_ds').findById(reocrd_id);
//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 param = record.data;
......@@ -284,8 +305,7 @@
param['maintain_type'] = maintain_type;
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');
//}else if (record.get('wfl_status') == 'APPROVING' || record.get('wfl_status') == 'APPROVED'){
}else{
}else{
var maintain_type = 'READONLY';
var param = record.data;
param['currency'] = param['currency_code'];
......@@ -306,7 +326,7 @@
}
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){
......@@ -323,6 +343,84 @@
});
}
function attachment_upload(val,rec,name){
if(rec.get('wfl_status')=='NEW'||rec.get('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>';
}
}
//其它附件上传
function open_other_attachment_upload(record_id){
var url = $('journal_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() {
hls536_journal_query();
});
}
//其它附件下载
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() {
hls536_journal_query();
});
}
function selected_attachment_upload(){
var records = $('hls_journal_header_result_ds').getSelected();
if(records.length == 0){
Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录进行附件上传!');
return ;
}
for (var i = 0; i < records.length; i++) {
if (records[i].get('wfl_status') == 'APPROVED'||records[i].get('wfl_status') == 'APPROVING') {
Leaf.showMessage('提示', '凭证状态为审批中或者审批通过,不能进行批量附件上传!');
return;
}
}
var param = {};
var saveData = [];
for (var i = 0; i < records.length; i++) {
var record = records[i];
saveData.push({
'journal_header_id': record.get('journal_header_id'),
'_status': 'insert'
});
}
param['details'] = saveData;
Leaf.request({
url: $('batch_attachment_tmp_id').getUrl(),
para: param,
success: function () {
new Leaf.Window({
id: 'hls_journal_import_handle_winid',
url: $('hls_journal_other_import_link').getUrl(),
title: '附件导入',
width: 420,
height: 320
});
},
scope: this
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
......@@ -331,13 +429,15 @@
<a:dataSet id="hls_journal_header_query">
<a:fields>
<a:field name="journal_num"/>
<a:field name="batch_number"/>
<a:field name="reverse_batch_number"/>
<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:field name="wfl_status_n" displayField="code_value_name" defaultValue="新建" options="hls536_wfl_status_ds" returnField="wfl_status" valueField="code_value"/>
<a:field name="wfl_status" defaultValue="NEW"/>
<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>
......@@ -356,6 +456,7 @@
<a:toolbarButton click="hls536_journal_send" 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:toolbarButton id="hls536_upload_id" click="selected_attachment_upload" text="批量附件上传"/>
</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="凭证编号"/>
......@@ -366,10 +467,14 @@
<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="reverse_wfl_status_n" bindTarget="hls_journal_header_query" prompt="凭证反冲状态"/>
<a:textField name="batch_number" bindTarget="hls_journal_header_query" prompt="凭证导入批次号"/>
<a:textField name="reverse_batch_number" 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="batch_number" prompt="凭证导入批次号" width="120"/>
<a:column name="reverse_batch_number" prompt="凭证反冲批次号" 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"/>
......@@ -379,8 +484,9 @@
<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:column name="error_message" prompt="错误信息" width="150"/>
<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>
</a:screenBody>
......
......@@ -3,7 +3,7 @@
<a:init-procedure >
<!--<a:model-execute model="hls.HLS536.delete_hls_journal_tmp"/>-->
<a:model-query model="hls.HLS536.hls_journal_import_head_id" rootPath="header"/>
<a:import-excel header_id="${/model/header/record/@header_id}" attribute5="D:\u01\hls_journal,fnd_interface_headers,${/model/header/record/@header_id}" separator="," status_field="/parameter/@ImportSuccess" template_code="HLS_JOURNAL_IMPORT" user_id="${/session/@user_id}" />
<a:import-excel header_id="${/model/header/record/@header_id}" attribute5="D:\u01\hls_file\hls_journal,fnd_interface_headers,${/model/header/record/@header_id}" separator="," status_field="/parameter/@ImportSuccess" template_code="HLS_JOURNAL_IMPORT" user_id="${/session/@user_id}" />
<!--<a:import-excel header_id="${/session/@session_id}" attribute5="D:\u01,fnd_interface_headers,${/session/@session_id}" separator="," status_field="/parameter/@ImportSuccess" template_code="HLS_JOURNAL_IMPORT" user_id="${/session/@user_id}" />-->
<!--<a:model-execute model="hls.HLS536.insert_hls_journal_tmp"/>-->
......
<?xml version="1.0" encoding="UTF-8"?>
<!--<a:screen xmlns:a="http://www.leaf-framework.org/application">-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="hls.HLS536.hls_journal_position_query" rootPath="hls536_position_code"/>
......
......@@ -60,7 +60,7 @@
}
function open_upload_window(record_id){
var url = $('journal_attachment_uploadFile_id').getUrl() + '?table_name=HLS_JOURNAL_HEADER_IMP&header_id=' + record_id;
var url = $('journal_attachment_uploadFile_id').getUrl() + '?table_name=FND_INTERFACE_HEADERS&header_id=' + record_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
......@@ -73,6 +73,24 @@
});
}
function attachment_upload(val,rec,name){
return '<a href=javascript:open_attachment_upload('+rec.get('journal_header_id')+')>其它附件</a>';
}
function open_attachment_upload(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: '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>
......@@ -125,6 +143,7 @@
<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="other_attachment_file" prompt="其它附件" width="120" renderer="attachment_upload" align="center"/>
</a:columns>
</a:grid>
</a:screenBody>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-3-20 下午1:49:19
$Revision: 1.0
$Purpose: 手工凭证其它附件导入
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure/>
<a:view>
<script type="text/javascript"><![CDATA[
function saveClick(){
if (document.getElementById('importFile').value){
var fileName = document.getElementById('importFile').value;
var fileType = fileName.substr(fileName.lastIndexOf("."));
document.getElementById('importForm').submit();
}
}
]]></script>
<a:dataSets>
<a:dataSet id="label_ds" autoCreate="true">
</a:dataSet>
</a:dataSets>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入文件" width="400">
<form name="upload" id="importForm" action="hls_journal_attach_trans_upload.lview?session_id=${/parameter/@session_id}&amp;_csrf=${/session/@_csrf.token}" enctype="multipart/form-data" method="post">
<label style="margin-left:10px;margin-top:10px;"><![CDATA[请选择文件:]]></label>
<input name="CONTENT" id="importFile" style="margin-bottom:4px;width:160px;height:22px;" type="file"/>
<input onclick="saveClick()" style="margin-left:50px;margin-top:10px;width:60px;" type="button" value="导入"/>
</form>
</a:fieldSet>
</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