Commit 5629e417 authored by gzj34291's avatar gzj34291

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

parents 11183e05 d6cbd6ce
......@@ -221,28 +221,13 @@
<artifactId>spring-test</artifactId>
<version>5.3.14</version>
</dependency>
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
<version>2.0.23</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.5</version>
<version>1.10</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
......@@ -250,12 +235,6 @@
<version>4.5.2</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<build>
......
......@@ -6,28 +6,22 @@ import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.RequestEntity;
import org.apache.commons.httpclient.methods.StringRequestEntity;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springframework.http.HttpHeaders;
import org.apache.commons.httpclient.methods.multipart.Part;
import org.apache.commons.httpclient.methods.multipart.StringPart;
import org.apache.commons.httpclient.params.HttpMethodParams;
import org.springframework.web.client.RestTemplate;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.*;
/**
* description
......@@ -69,7 +63,7 @@ public class HttpPostAttUtil {
public static String UploadFile(String url, Map<String, String> param, File file, String token, String tokentype ) throws Exception {
/*public static String UploadFile(String url, Map<String, String> param, File file, String token, String tokentype ) throws Exception {
try {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append( url)
......@@ -92,7 +86,7 @@ public class HttpPostAttUtil {
HttpPost httpPost = new HttpPost(post_url);
MultipartEntityBuilder builder=MultipartEntityBuilder.create();
builder.addBinaryBody("file",file);
HttpEntity httpEntity=(HttpEntity)builder.build();
HttpEntity httpEntity=builder.build();
httpPost.setHeader("Authorization", tokentype+" "+token);
httpPost.setEntity(httpEntity);//设置请求参数
HttpResponse response = httpClient.execute(httpPost);
......@@ -102,6 +96,38 @@ public class HttpPostAttUtil {
} catch (Exception ex) {
return ex.getMessage() ;
}
}*/
public static String UploadFile(String url, Map<String, String> param, File file, String token, String tokentype ) throws Exception {
HttpClient httpClient = new HttpClient();
HttpServletResponse response = null;
PostMethod post = new PostMethod(url);
String resultString = "";
List<Part> list = new ArrayList<>();
httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(5000);
try {
list.add(new FilePart("file", file));
if (param != null) {
for (String key : param.keySet()) {
list.add(new StringPart(key, param.get(key), "UTF-8"));
}
}
Part[] parts = list.toArray(new Part[list.size()]);
MultipartRequestEntity entity = new MultipartRequestEntity(parts, new HttpMethodParams());
post.setRequestEntity(entity);
post.addRequestHeader( "Authorization", tokentype+" "+token);
System.out.println(entity.getContentType());
int status = httpClient.executeMethod(post);
String result = post.getResponseBodyAsString() ;
System.out.println(result);
} catch (Exception e) {
e.printStackTrace();
} finally {
post.releaseConnection();
}
return "";
}
......
......@@ -14,8 +14,10 @@ import java.io.*;
import java.math.BigDecimal;
import java.net.URL;
import java.net.URLEncoder;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import javax.imageio.ImageIO;
......@@ -332,10 +334,19 @@ public class ConExportServiceImpl implements ConExportService {
if(x.compareTo((BigDecimal) map1.get("CF_ITEM")) ==0){
cell.setCellValue("");
}else {
// 系统时间大于应收日的才set值
DateFormat dft = new SimpleDateFormat("yyyy-MM-dd");
Date dueDate = dft.parse((String) map1.get("DUE_DATE"));
// 去除时分秒
Date now = dft.parse(dft.format(new Date()));
if(Objects.nonNull(dueDate) && now.compareTo(dueDate) == 1){
DataFormat df = wb.createDataFormat(); // 此处设置数据格式
contentTable.setDataFormat(df.getFormat("#,##0.00"));//保留两位小数点
cell.setCellStyle(contentTable);
cell.setCellValue(new DecimalFormat().parse(map1.get("UNRECEIVED_AMOUNT").toString()).doubleValue());// 未收金额
}else{
cell.setCellValue("");
}
}
} else {
cell.setCellValue(""); // 未收金额
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 早上 11:03:31
$Revision: 1.0
$Purpose: 电子档案池bm
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" >
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select v.code_value_name archive_type_desc
from sys_code_values_v v
where v.code = 'ARCHIVE_TYPE'
and v.code_value = ${@archive_type}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="archive_type_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ARCHIVE_TYPE_DESC"/>
</bm:fields>
</bm:model>
......@@ -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>
<?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,
......@@ -148,10 +157,13 @@
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,
t1.batch_id,
t1.batch_number,
t1.reverse_batch_number,
t1.journal_submit_batch_id,
t1.journal_num,
t1.error_message,
......@@ -191,27 +203,28 @@
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>
</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>
......
......@@ -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>
......@@ -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,14 +17,17 @@
<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" >
<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;
......
......@@ -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
......
......@@ -63,7 +63,7 @@
var ds = $('cloumn_para_ds');
var records=ds.getAll();
var paras = [];
var detail_masks = Ext.getBody();
var detail_mask = Ext.getBody();
var base_archive_id='${/parameter/@record_id}';
console.log(base_archive_id);
for(var n=0;n<records.length;n++){
......
......@@ -111,8 +111,8 @@
params: {
record_id: record_id
},
height: 350,
width: 700
height: 200,
width: 1100
});
}
......@@ -128,8 +128,8 @@
params: {
record_id: record_id
},
height: 350,
width: 700
height: 550,
width: 800
});
}
......
......@@ -13,19 +13,24 @@
name);
}
var para = $ctx.current_parameter || $ctx.parameter;
var logger = $logger('server-script');
var sql_content;
var query_validation_sql_bm = $bm('efile.EFILE1030.efile_pool_att_para_sql');
var query_archive_type_bm = $bm('efile.EFILE1030.efile_archive_type_sql');
var config_map = query_validation_sql_bm.queryAsMap(para);
var config_map_detail = config_map.getChildren();
logger.info(config_map_detail.length);
if (config_map_detail.length != 0) {
sql_content = config_map_detail[0].sql_content;
logger.info(sql_content);
para.sql_content = sql_content;
}
//println(sql_content);
var obj;
var dataSet_id='att_json_ds';
if(typeof(sql_content)!="undefined"){
sql_content = '{'+sql_content+'}';
sql_content ='{'+sql_content+'}';
obj = JSON.parse(sql_content).attachmentList;
}else{
obj='';
......@@ -48,6 +53,7 @@
// dataSets.addChild(dataSet.getData());
// var datas = newMap("datas");
// dataSet.addChild(datas.getData());
if(obj.length>0){
for (var k in obj) {
// if (obj[k] instanceof Object) {
......@@ -55,6 +61,11 @@
datasRecord.code_value = obj[k].fileURL;
datasRecord.code_value_name = obj[k].fileName;
datasRecord.action_type = obj[k].attachTypeCode;
var archive_type_desc_data=query_archive_type_bm.queryAsMap({
archive_type : obj[k].attachTypeCode
});
var archive_type_desc=archive_type_desc_data.getChildren()[0].archive_type_desc;
datasRecord.archive_type_desc=archive_type_desc;
datas.addChild(datasRecord.getData());
//println(datasRecord.code_value+":"+datasRecord.code_value_name);
......@@ -80,11 +91,11 @@
<a:dataSets>
</a:dataSets>
<a:screenBody>
<a:grid id="att_para_ds_id" bindTarget="att_json_ds" height="180" width="760" navBar="true">
<a:grid id="att_para_ds_id" bindTarget="att_json_ds" height="180" width="1050" navBar="true">
<a:columns>
<a:column name="action_type" prompt="附件类型" width="150"/>
<a:column name="code_value" prompt="附件地址" width="400"/>
<a:column name="code_value_name" prompt="附件名称" width="200"/>
<a:column name="code_value" prompt="附件地址" width="650"/>
<a:column name="code_value_name" prompt="附件名称" width="250"/>
</a:columns>
</a:grid>
</a:screenBody>
......
......@@ -76,10 +76,10 @@
<a:dataSets >
</a:dataSets>
<a:screenBody>
<a:grid id="post_stru_para_ds_id" bindTarget="post_stur_json_ds" marginHeight="200" width="355" navBar="true">
<a:grid id="post_stru_para_ds_id" bindTarget="post_stur_json_ds" marginHeight="480" width="740" navBar="true">
<a:columns>
<a:column name="code_value" prompt="字段代码" width="150"/>
<a:column name="code_value_name" prompt="值内容" width="200"/>
<a:column name="code_value_name" prompt="值内容" width="589"/>
</a:columns>
</a:grid>
</a:screenBody>
......
......@@ -43,7 +43,7 @@
var checkTokenQuery = check_token_valid_bm.queryAsMap();
var is_valid = checkTokenQuery.getChildren()[0].is_valid;
var fieldValueList_bm=$bm('efile.EFILE1040.efile_doc_import_query');
var je_data_json_bm=$bm('efile.EFILE1040.efile_journal_clob_query');
//var je_data_json_bm=$bm('efile.EFILE1040.efile_journal_clob_query');
var record=[];
var doc_data=[];
var batch_num=0;
......@@ -52,22 +52,22 @@
var fieldValueList_data = fieldValueList_bm.queryAsMap({
pool_id: batch_data[i].pool_id
});
var je_data_json_data;
var je_json_data_result;
var je_json_data;
var je_json_data1;
var je_json_data2;
if(batch_data[i].je_check_flag=='Y'){
je_data_json_data = je_data_json_bm.queryAsMap({
e_archives_id: batch_data[i].e_archives_id,
document_id: batch_data[i].document_id,
workflow_id: batch_data[i].workflow_id
});
je_json_data=je_data_json_data.getChildren()[0].je_data_json;
je_json_data_result=JSON.parse(je_json_data);
je_json_data1=je_json_data_result[0];
je_json_data2=je_json_data_result[1];
}
// var je_data_json_data;
// var je_json_data_result;
// var je_json_data;
// var je_json_data1;
// var je_json_data2;
//if(batch_data[i].je_check_flag=='Y'){
// je_data_json_data = je_data_json_bm.queryAsMap({
// e_archives_id: batch_data[i].e_archives_id,
// document_id: batch_data[i].document_id,
// workflow_id: batch_data[i].workflow_id
// });
// je_json_data=je_data_json_data.getChildren()[0].je_data_json;
// je_json_data_result=JSON.parse(je_json_data);
// je_json_data1=je_json_data_result[0];
// je_json_data2=je_json_data_result[1];
// }
var companyCode='HL';
var documentTypeCode=batch_data[i].base_archive_code;
......@@ -85,21 +85,21 @@
if(typeof(fieldValueList)=="undefined"){
fieldValueList=[];
if(batch_data[i].je_check_flag=='Y'){
fieldValueList.push(je_json_data1);
fieldValueList.push(je_json_data2);
fieldValueList=JSON.stringify(fieldValueList);
filelist.push(fieldValueList);
}else{
// if(batch_data[i].je_check_flag=='Y'){
// fieldValueList.push(je_json_data1);
// fieldValueList.push(je_json_data2);
// fieldValueList=JSON.stringify(fieldValueList);
// filelist.push(fieldValueList);
// }else{
filelist='[]' ;
}
//}
}else{
fieldValueList=fieldValueList.substring(17);
fieldValueList=JSON.parse(fieldValueList);
if(batch_data[i].je_check_flag=='Y'){
fieldValueList.push(je_json_data1);
fieldValueList.push(je_json_data2);
}
//if(batch_data[i].je_check_flag=='Y'){
//fieldValueList.push(je_json_data1);
// fieldValueList.push(je_json_data2);
// }
fieldValueList=JSON.stringify(fieldValueList);
filelist.push(fieldValueList);
}
......@@ -133,7 +133,6 @@
doc_data.push(fils);
}else{
attachmentList=attachmentList.substring(17);
logger.info(attachmentList);
attachmentList=JSON.parse(attachmentList);
attachmentList=JSON.stringify(attachmentList);
attlist.push(attachmentList);
......@@ -166,7 +165,7 @@
if(doc_data.length==100||doc_data.length==batch_data.length){
batch_num++;
if (is_valid == 'true') {
if (is_valid =='true') {
var SystokenQuery = token_savelogs_bm.queryAsMap();
var access_token = SystokenQuery.getChildren()[0].access_token;
var doc_data=JSON.stringify(doc_data);
......@@ -312,32 +311,28 @@
}else{
for(var i=0;i<req_date.length;i++){
var fieldValueList_data = fieldValueList_bm.queryAsMap({
pool_id: req_date[i].pool_id
});
var je_data_json_data;
var je_json_data_result;
var je_json_data;
var je_json_data1;
var je_json_data2;
if(req_date[i].je_check_flag=='Y'){
je_data_json_data = je_data_json_bm.queryAsMap({
e_archives_id: req_date[i].e_archives_id,
document_id: req_date[i].document_id,
workflow_id: req_date[i].workflow_id
});
je_json_data=je_data_json_data.getChildren()[0].je_data_json;
logger.info(je_json_data);
je_json_data_result=JSON.parse(je_json_data);
logger.info(je_json_data_result[0]);
je_json_data1=je_json_data_result[0];
logger.info(je_json_data_result[1]);
je_json_data2=je_json_data_result[1];
}
// var je_data_json_data;
// var je_json_data_result;
// var je_json_data;
// var je_json_data1;
// var je_json_data2;
// if(req_date[i].je_check_flag=='Y'){
// je_data_json_data = je_data_json_bm.queryAsMap({
// e_archives_id: req_date[i].e_archives_id,
// document_id: req_date[i].document_id,
// workflow_id: req_date[i].workflow_id
// });
// je_json_data=je_data_json_data.getChildren()[0].je_data_json;
// je_json_data_result=JSON.parse(je_json_data);
// je_json_data1=je_json_data_result[0];
// je_json_data2=je_json_data_result[1];
// }
var companyCode='HL';
var documentTypeCode=req_date[i].base_archive_code;
......@@ -354,24 +349,23 @@
if(typeof(fieldValueList)=="undefined"){
fieldValueList=[];
if(req_date[i].je_check_flag=='Y'){
fieldValueList.push(je_json_data1);
fieldValueList.push(je_json_data2);
fieldValueList=JSON.stringify(fieldValueList);
filelist.push(fieldValueList);
}else{
//if(req_date[i].je_check_flag=='Y'){
//fieldValueList.push(je_json_data1);
//fieldValueList.push(je_json_data2);
//fieldValueList=JSON.stringify(fieldValueList);
// filelist.push(fieldValueList);
//}else{
filelist='[]' ;
}
// }
}else{
fieldValueList=fieldValueList.substring(17);
fieldValueList=JSON.parse(fieldValueList);
if(req_date[i].je_check_flag=='Y'){
fieldValueList.push(je_json_data1);
fieldValueList.push(je_json_data2);
}
//if(req_date[i].je_check_flag=='Y'){
//fieldValueList.push(je_json_data1);
// fieldValueList.push(je_json_data2);
// }
fieldValueList=JSON.stringify(fieldValueList);
filelist.push(fieldValueList);
logger.info(filelist);
}
......@@ -508,7 +502,6 @@
var json_data = JSON.parse(data_result);
var statusCode =json_data.statusCode;
var message =json_data.message;
logger.info(statusCode);
var doc_import_return_bm = $bm('efile.EFILE1040.doc_import_return');
if(statusCode=='0000'){
......
<?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>
<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:batch-apply>
<a:model-execute model="hls.HLS536.submit_hls_journal_tmp" trace="true"/>
......
<?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,9 +23,11 @@
<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) {
if ('${/session/@user_id}'!=10418) {
$('reverse_btn_id').hide();
$('reverse_submit_btn_id').hide();
}
......@@ -151,17 +153,36 @@
param['wfl_type'] = 'SALARIES';
}
if ($(ds_id).validate()) {
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({
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);
}else{
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 +192,8 @@
},
scope: this
});
}, null);
},function(){},300,100);
}
}
}
......@@ -182,7 +204,6 @@
Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录!');
return ;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
if (records[i].get('wfl_status') != 'APPROVED') {
Leaf.showMessage('提示', '凭证没有审批通过不能进行反冲,请检查!');
......@@ -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';
......@@ -244,17 +268,15 @@
}
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}');
//先生成批次表数据,再update这几条数据的状态,最后提交工作流
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,7 +305,6 @@
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{
var maintain_type = 'READONLY';
var param = record.data;
......@@ -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){
......@@ -319,10 +339,89 @@
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'||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>';
}
}
//其它附件上传
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() {
$('hls_journal_header_result_ds').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() {
$('hls_journal_header_result_ds').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('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;
}
}
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 +430,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 +457,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 +468,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"/>
......@@ -380,7 +486,8 @@
<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>
</a:screenBody>
......
......@@ -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>
......
......@@ -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"/>-->
......@@ -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());
......
<?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"/>
......
......@@ -56,7 +56,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){
......@@ -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>
......@@ -124,7 +142,8 @@
<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>
</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