Commit f78f4ae7 authored by stone's avatar stone

Merge branch 'develop' of https://hel.hand-china.com/hlcm/leaf-hlcm into develop

parents 08d424d9 c4568124
...@@ -94,6 +94,12 @@ ...@@ -94,6 +94,12 @@
<version>1.4.1</version> <version>1.4.1</version>
</dependency> </dependency>
<!-- 网银 代扣 ftp --> <!-- 网银 代扣 ftp -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox-app</artifactId>
<version>1.8.10</version>
</dependency>
<dependency> <dependency>
<groupId>com.jayway.jsonpath</groupId> <groupId>com.jayway.jsonpath</groupId>
......
package leaf.plugin.word2pdf;
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.ComThread;
import com.jacob.com.Dispatch;
import com.jacob.com.Variant;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import uncertain.core.UncertainEngine;
import uncertain.ocm.IObjectRegistry;
import java.io.File;
/**
* @author niminmin
*/
public class WordToPdf {
IObjectRegistry registry;
String jacobDllPath;
private static final Logger logger = LoggerFactory.getLogger(WordToPdf.class);
public WordToPdf(IObjectRegistry registry, String jacobDllName)
throws Exception {
this.registry = registry;
UncertainEngine engine = (UncertainEngine) this.registry
.getInstanceOfType(UncertainEngine.class);
String webInfPath = engine.getDirectoryConfig().getConfigDirectory();
// 添加jacob-1.18-x64.dll到C:\Java\jre1.7.0_79\bin目录 或者按照以下代码进行设置
// D:\work\leafProjects\MX_leasing\web\WEB-INF\server-script\jacob\jacob-1.18-x64.dll
jacobDllPath = webInfPath + "/server-script/jacob/" + jacobDllName;
System.setProperty("jacob.dll.path", jacobDllPath);
System.setProperty("com.jacob.debug", "true");
}
public static boolean word2pdf(String inFilePath, String outFilePath) {
logger.info("Word转PDF开始启动...");
long start = System.currentTimeMillis();
ActiveXComponent app = null;
Dispatch doc = null;
boolean flag = false;
try {
app = new ActiveXComponent("Word.Application");
app.setProperty("Visible", new Variant(false));
Dispatch docs = app.getProperty("Documents").toDispatch();
logger.info("打开文档:" + inFilePath);
doc = Dispatch.invoke(
docs,
"Open",
1,
new Object[]{inFilePath, new Variant(false),
new Variant(true)}, new int[1]).toDispatch();
logger.info("转换文档到PDF:" + outFilePath);
File tofile = new File(outFilePath);
if (tofile.exists()) {
tofile.delete();
}
Dispatch.invoke(doc, "SaveAs", 1, new Object[]{outFilePath,
new Variant(17)}, new int[1]);
Dispatch.call(doc, "Close", new Object[]{new Variant(false)});
long end = System.currentTimeMillis();
logger.info("转换完成,用时:" + (end - start) + "ms");
flag = true;
} catch (Exception e) {
logger.info("Word转PDF出错:" + e.getMessage());
flag = false;
logger.info("关闭文档");
if (app != null) {
app.invoke("Quit", 0);
}
ComThread.Release();
} finally {
logger.info("关闭文档");
if (app != null) {
app.invoke("Quit", 0);
}
ComThread.Release();
}
return flag;
}
/**
* 如果PDF存在则删除PDF
*
* @param pdfPath
*/
private static void deletePdf(String pdfPath) {
File pdfFile = new File(pdfPath);
if (pdfFile.exists()) {
pdfFile.delete();
}
}
/**
* excel to pdf
*
* @param inFilePath
* @param outFilePath
* @return
*/
public static boolean excel2pdf(String inFilePath, String outFilePath) {
ActiveXComponent activeXComponent = new ActiveXComponent("Excel.Application");
activeXComponent.setProperty("Visible", false);
// deletePdf(outFilePath);
Dispatch excels = activeXComponent.getProperty("Workbooks").toDispatch();
Dispatch excel = Dispatch.call(excels, "Open", inFilePath, false, true).toDispatch();
Dispatch.call(excel, "ExportAsFixedFormat", 0, outFilePath);
Dispatch.call(excel, "Close", false);
activeXComponent.invoke("Quit");
return true;
}
/**
* excel to pdf Orientation excel横向转成pdf
*
* @param inFilePath
* @param outFilePath
* @return
*/
public static boolean excel2pdfOrientation(String inFilePath, String outFilePath) {
ActiveXComponent activeXComponent = new ActiveXComponent("Excel.Application");
activeXComponent.setProperty("Visible", false);
// deletePdf(outFilePath);
Dispatch excels = activeXComponent.getProperty("Workbooks").toDispatch();
Dispatch excel = Dispatch.call(excels, "Open", inFilePath, false, true).toDispatch();
Dispatch currentSheet = Dispatch.get((Dispatch) excel,
"ActiveSheet").toDispatch();
Dispatch pageSetup = Dispatch.get(currentSheet, "PageSetup")
.toDispatch();
Dispatch.put(pageSetup, "Orientation", new Variant(2));
Dispatch.call(excel, "ExportAsFixedFormat", 0, outFilePath);
Dispatch.call(excel, "Close", false);
activeXComponent.invoke("Quit");
return true;
}
public static void cutPdf(String pdfPath)
{
File file = new File(pdfPath);
PDDocument document = new PDDocument();
try{
document = PDDocument.load(file);
}catch(Exception e){
logger.error("error",e);
}
int noOfPages = document.getNumberOfPages();
System.out.println(noOfPages);
document.removePage(noOfPages-1);
try{
document.save(pdfPath);
document.close();
}catch(Exception e){
logger.error("error",e);
}
}
public static void main(String[] args) throws Exception {
// String jacobDllPath = "D:\\ideaProjects\\leaf-hlcm\\src\\main\\webapp\\WEB-INF\\server-script\\jacob\\jacob-1.18-x64.dll";
// System.setProperty("jacob.dll.path", jacobDllPath);
// System.setProperty("com.jacob.debug", "true");
// word2pdf("D:\\hand-Prpjects\\付款请求书打印.doc",
// "D:\\hand-Prpjects\\付款请求书打印.pdf");
cutPdf("D:\\\\hand-Prpjects\\\\付款请求书打印.pdf");
// excel2pdf("D:\\work\\leafProjects\\YondaTl\\src\\test.xlsx",
// "D:\\work\\leafProjects\\YondaTl\\src\\付款通知书NEW.pdf");
// excel2pdfOrientation("D:\\work\\leafProjects\\YondaTl\\src\\test.xlsx",
// "D:\\work\\leafProjects\\YondaTl\\src\\付款通知书NEW.pdf");
}
}
...@@ -90,7 +90,7 @@ data.backup = false ...@@ -90,7 +90,7 @@ data.backup = false
data.backup.filePath=e:\\hand data.backup.filePath=e:\\hand
# sso login flag # sso login flag
ssoLoginFlag=true ssoLoginFlag=false
#Electronic Invoice Interface wsdl url FOR PROD #Electronic Invoice Interface wsdl url FOR PROD
acr.webservice.url= acr.webservice.url=
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
and c.code_value = t.billing_object) as billing_object_desc, and c.code_value = t.billing_object) as billing_object_desc,
(select m.bp_name (select m.bp_name
from hls_bp_master_s_v m from hls_bp_master_s_v m
where m.bp_id = con.bp_id_tenant) billing_object_name, where m.bp_id =t.bp_id) billing_object_name,
t.due_amount, t.due_amount,
t.billing_amount, t.billing_amount,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
$Purpose: $Purpose:
--> -->
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" extend="hls.HLS005.hls_cashflow_item_v" extendMode="reference"> <ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" extend="hls.HLS005.hls_cashflow_item_v" extendMode="reference" needAccessControl="false">
<ns1:fields> <ns1:fields>
<ns1:field name="cf_item" forDisplay="false" forQuery="false"/> <ns1:field name="cf_item" forDisplay="false" forQuery="false"/>
<ns1:field name="cf_item_desc" forDisplay="true" forQuery="true"/> <ns1:field name="cf_item_desc" forDisplay="true" forQuery="true"/>
......
...@@ -87,7 +87,8 @@ ...@@ -87,7 +87,8 @@
<bm:query-field name="invoice_number_t" queryExpression="t1.invoice_number &lt;= ${@invoice_number_t}"/> <bm:query-field name="invoice_number_t" queryExpression="t1.invoice_number &lt;= ${@invoice_number_t}"/>
<bm:query-field name="contract_number_f" queryExpression="t1.contract_number &lt;= ${@contract_number_f}"/> <bm:query-field name="contract_number_f" queryExpression="t1.contract_number &lt;= ${@contract_number_f}"/>
<bm:query-field name="contract_number_t" queryExpression="t1.contract_number &lt;= ${@contract_number_t}"/> <bm:query-field name="contract_number_t" queryExpression="t1.contract_number &lt;= ${@contract_number_t}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name}"/>
<bm:query-field name="invoice_bp_name" queryExpression="t1.invoice_bp_name like ${@invoice_bp_name}"/>
<bm:query-field name="invoice_date_f" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_f},&apos;yyyy-mm-dd&apos;)"/> <bm:query-field name="invoice_date_f" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_t" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_t},&apos;yyyy-mm-dd&apos;)"/> <bm:query-field name="invoice_date_t" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_t},&apos;yyyy-mm-dd&apos;)"/>
......
...@@ -80,8 +80,8 @@ ...@@ -80,8 +80,8 @@
<bm:query-field name="accounting_date_t" queryExpression="t1.accounting_date &lt;= to_date(${@accounting_date_t},&apos;yyyy-mm-dd&apos;)"/> <bm:query-field name="accounting_date_t" queryExpression="t1.accounting_date &lt;= to_date(${@accounting_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/> <bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/>
<bm:query-field name="total_amount_t" queryExpression="t1.total_amount &lt;= ${@total_amount_t}"/> <bm:query-field name="total_amount_t" queryExpression="t1.total_amount &lt;= ${@total_amount_t}"/>
<bm:query-field name="invoice_bp_code_f" queryExpression="t1.invoice_bp_code &gt;= ${@invoice_bp_code_f}"/> <bm:query-field name="invoice_bp_code" queryExpression="t1.invoice_bp_code= ${@invoice_bp_code}"/>
<bm:query-field name="invoice_bp_code_t" queryExpression="t1.invoice_bp_code &lt;= ${@invoice_bp_code_t}"/> <!--<bm:query-field name="invoice_bp_code_t" queryExpression="t1.invoice_bp_code &lt;= ${@invoice_bp_code_t}"/>-->
<bm:query-field name="currency" queryExpression="t1.currency = ${@currency}"/> <bm:query-field name="currency" queryExpression="t1.currency = ${@currency}"/>
<bm:query-field name="invoice_status" queryExpression="t1.invoice_status = ${@invoice_status}"/> <bm:query-field name="invoice_status" queryExpression="t1.invoice_status = ${@invoice_status}"/>
<bm:query-field name="vat_interface_status" queryExpression="t1.vat_interface_status = ${@vat_interface_status}"/> <bm:query-field name="vat_interface_status" queryExpression="t1.vat_interface_status = ${@vat_interface_status}"/>
......
...@@ -78,7 +78,13 @@ ...@@ -78,7 +78,13 @@
where ccc.contract_id = cc.contract_id where ccc.contract_id = cc.contract_id
and ccc.overdue_status = 'Y' and ccc.overdue_status = 'Y'
and ccc.cf_item = 1 and ccc.cf_item = 1
and ccc.write_off_flag <> 'FULL') business_due_amount --营业逾期总金额 and ccc.write_off_flag <> 'FULL') business_due_amount, --营业逾期总金额
(select sum(ccc.due_amount-nvl(ccc.received_amount,0))
from con_contract_cashflow ccc
where ccc.contract_id = cc.contract_id
and ccc.cf_item =9
and ccc.write_off_flag <> 'FULL') over_due_amount
FROM con_contract cc FROM con_contract cc
where exists (select 1 where exists (select 1
from con_contract_cashflow ccw from con_contract_cashflow ccw
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Feng
$Date: 2013-9-24 下午2:19:04
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT
e.role_id,
e.role_code,
e.role_name
FROM
sys_role_vl e
WHERE
e.role_id = ${/session/@role_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -112,6 +112,7 @@ ...@@ -112,6 +112,7 @@
</bm:data-filters> </bm:data-filters>
<bm:query-fields> <bm:query-fields>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/> <bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
<bm:query-field field="bp_bank_account_num" queryOperator="like"/>
<bm:query-field field="write_off_flag" queryExpression="t1.write_off_flag =${@write_off_flag}"/> <bm:query-field field="write_off_flag" queryExpression="t1.write_off_flag =${@write_off_flag}"/>
<bm:query-field field="bp_bank_account_name" queryOperator="like"/> <bm:query-field field="bp_bank_account_name" queryOperator="like"/>
<bm:query-field field="receipt_type" queryOperator="="/> <bm:query-field field="receipt_type" queryOperator="="/>
......
...@@ -96,9 +96,9 @@ ...@@ -96,9 +96,9 @@
t1.WRITE_OFF_DUE_AMOUNT write_off_amount, t1.WRITE_OFF_DUE_AMOUNT write_off_amount,
t1.WRITE_OFF_PRINCIPAL, t1.WRITE_OFF_PRINCIPAL,
t1.WRITE_OFF_INTEREST, t1.WRITE_OFF_INTEREST,
(select principal from con_contract_cashflow where cashflow_id = t.cashflow_id) principal, (select principal from con_contract_cashflow where cashflow_id = t1.cashflow_id) principal,
(select interest from con_contract_cashflow where cashflow_id = t.cashflow_id) interest, (select interest from con_contract_cashflow where cashflow_id = t1.cashflow_id) interest,
(select due_amount from con_contract_cashflow where cashflow_id = t.cashflow_id) due_amount, (select due_amount from con_contract_cashflow where cashflow_id = t1.cashflow_id) due_amount,
(select bp_name from hls_bp_master h,con_contract c where h.bp_id = c.bp_id_tenant and c.contract_id = t1.contract_id) bp_tenant_name (select bp_name from hls_bp_master h,con_contract c where h.bp_id = c.bp_id_tenant and c.contract_id = t1.contract_id) bp_tenant_name
from csh_write_off t1) t from csh_write_off t1) t
#WHERE_CLAUSE# #WHERE_CLAUSE#
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hls_bp_master_credit_pkg.check_create_record(
p_bp_credit_hd_id =>${@bp_credit_hd_id}
);
end;]]></bm:update-sql>
</bm:operation>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from (select rd.bp_credit_hd_id,
rd.bp_id,
hbm.bp_name,
hbm.bp_code,
hbm.bp_category,
(select description
from hls_bp_category hbc
where hbc.bp_category = hbm.bp_category) bp_category_n,
hbm.bp_name bp_id_n,
rd.credit_total_amount,
rd.credit_type,
(select v.code_value_name
from sys_code_values_v v
where v.code = 'DS_CREDIT_TYPE'
and v.code_value = rd.credit_type) credit_type_n,
to_char(rd.credit_date_from,'yyyy-mm-dd')credit_date_from,
rd.credit_status,
(select code_value_name
from sys_code_values_v
where code = 'CREDIT_STATUS'
and code_value = rd.credit_status) credit_status_n,
to_char(rd.credit_date_to,'yyyy-mm-dd')credit_date_to,
rd.enable_flag,
to_char(rd.last_update_date,'yyyy-mm-dd')last_update_date,
(select description from sys_user s where s.user_id= rd.created_by)last_updated_by_desc
from HLS_BP_MASTER_CREDIT_HD hd,
hls_bp_master hbm,
hls_bp_mast_credit_hd_rd rd
where hd.bp_id = hbm.bp_id
and hd.bp_credit_hd_id = rd.bp_credit_hd_id)v
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="query" expression="bp_credit_hd_id=${@bp_credit_hd_id}"/>
</bm:data-filters>
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: niminmin
$Date: 2019-10-24 上午09:52:30
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
prj_project_content_pkg.prj_quotation_content_create(
p_project_id =>${@project_id},
p_user_id =>${/session/@user_id},
p_templet_code=>${@templet_code}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2015-6-10 下午03:17:55
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT
faa.file_name,
faa.file_type_code,
faa.file_path,
pp.content_id,
(SELECT
'Y'
FROM
fnd_atm_attachment_multi m1
WHERE
m1.table_name = 'PRJ_PROJECT_CONTENT' AND
m1.table_pk_value = pp.content_id
) file_exists_flag,
p.project_number || '-' || pp.content_number to_file_name
FROM
fnd_atm_attachment faa,
fnd_atm_attachment_multi m,
hls_doc_file_templet lt,
con_clause_templet t,
prj_project_content pp,
prj_project p
WHERE
faa.attachment_id = m.attachment_id AND
m.table_name = 'HLS_DOC_FILE_TEMPLET' AND
m.table_pk_value = lt.templet_id AND
lt.templet_id = t.doc_template_id AND
t.doc_plugin_flag = 'Y' AND
pp.project_id = p.project_id AND
t.templet_id = pp.templet_id AND
(pp.content_id =${/parameter/@content_id} OR
(
pp.project_id =${/parameter/@project_id} AND
${/parameter/@batch_flag}='Y'
)
)
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="content_id"/>
<bm:field name="file_type_code"/>
<bm:field name="file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
<bm:field name="file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_PATH"/>
<bm:field name="file_exists_flag" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="FILE_EXISTS_FLAG"/>
<bm:field name="to_file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TO_FILE_NAME"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
hls_doc_file_templet_pkg.office_insert_fnd_atm(
p_record_id =>${@record_id},
p_table_name =>${@table_name},
p_table_pk_value =>${@content_id},
p_file_name =>${@file_name},
p_file_path =>${@file_path},
p_source_type =>${@source_type},
p_user_id =>${/session/@user_id}
);
END;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="record_id" dataType="java.lang.Double" output="true" outputPath="/parameter/@record_id"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -11,15 +11,18 @@ ...@@ -11,15 +11,18 @@
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
SELECT SELECT
p.bookmark, p.bookmark,
hls_doc_file_templet_pkg.get_doc_bookmark_value_new(${/session/@session_id},cc.content_id, p.bookmark, ${/session/@user_id},'PROJECT') bookmark_value, hls_doc_file_templet_pkg.get_doc_bookmark_value_new(nvl(${/session/@session_id},${/parameter/@session_id}),cc.content_id, p.bookmark, nvl(${/session/@user_id},${/parameter/@user_id}),'PROJECT') bookmark_value,
NVL(p.bookmark_type,'TEXT') bookmark_type NVL(p.bookmark_type,'TEXT') bookmark_type,
NVL(NVL(l.font_family,p.font_family),'微软雅黑') font_family,
NVL(NVL(l.font_size,p.font_size),'15') font_size,
NVL(l.underline,p.underline) underline
FROM FROM
prj_project_content cc, prj_project_content cc,
con_clause_templet t, con_clause_templet t,
hls_doc_file_tmp_para_link l, hls_doc_file_tmp_para_link l,
hls_doc_file_templet_para p hls_doc_file_templet_para p
WHERE WHERE
cc.content_id = ${/parameter/@content_id} AND cc.content_id = nvl(${/parameter/@content_id},${@content_id}) AND
cc.templet_id = t.templet_id AND cc.templet_id = t.templet_id AND
t.doc_template_id = l.templet_id AND t.doc_template_id = l.templet_id AND
t.doc_plugin_flag = 'Y' AND t.doc_plugin_flag = 'Y' AND
...@@ -33,5 +36,8 @@ ...@@ -33,5 +36,8 @@
<bm:field name="bookmark" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BOOKMARK"/> <bm:field name="bookmark" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BOOKMARK"/>
<bm:field name="bookmark_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BOOKMARK_TYPE"/> <bm:field name="bookmark_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BOOKMARK_TYPE"/>
<bm:field name="bookmark_value" databaseType="CLOB" datatype="java.sql.Clob" physicalName="BOOKMARK_VALUE"/> <bm:field name="bookmark_value" databaseType="CLOB" datatype="java.sql.Clob" physicalName="BOOKMARK_VALUE"/>
<bm:field name="font_family"/>
<bm:field name="font_size"/>
<bm:field name="underline"/>
</bm:fields> </bm:fields>
</bm:model> </bm:model>
...@@ -20,7 +20,9 @@ ...@@ -20,7 +20,9 @@
<bm:features> <bm:features>
<s:bm-script><![CDATA[ <s:bm-script><![CDATA[
var model = $this.getObjectContext(); var model = $this.getObjectContext();
var para = $ctx.current_parameter || $ctx.parameter; // var para = $ctx.current_parameter || $ctx.parameter;
var para = $ctx.parameter;
println(JSON.stringify(para));
var validation_sql; var validation_sql;
function get_validation_sql() { function get_validation_sql() {
......
...@@ -12,7 +12,14 @@ ...@@ -12,7 +12,14 @@
SELECT SELECT
p.bookmark, p.bookmark,
pa.column_name, pa.column_name,
pa.column_num pa.column_num,
pa.column_width,
pa.alignment,
pa.column_desc,
NVL(p.table_width,0) table_width,
NVL(p.ind_width,0) ind_width,
NVL(p.font_family,'宋体') font_family,
NVL(p.font_size,'15') font_size
FROM FROM
prj_project_content cc, prj_project_content cc,
con_clause_templet t, con_clause_templet t,
...@@ -20,7 +27,7 @@ ...@@ -20,7 +27,7 @@
hls_doc_file_templet_para p, hls_doc_file_templet_para p,
hls_doc_file_para_table pa hls_doc_file_para_table pa
WHERE WHERE
cc.content_id = ${/parameter/@content_id} AND cc.content_id = nvl(${/parameter/@content_id},${@content_id}) AND
cc.templet_id = t.templet_id AND cc.templet_id = t.templet_id AND
t.doc_template_id = l.templet_id AND t.doc_template_id = l.templet_id AND
t.doc_plugin_flag = 'Y' AND t.doc_plugin_flag = 'Y' AND
...@@ -36,6 +43,13 @@ ...@@ -36,6 +43,13 @@
<bm:fields> <bm:fields>
<bm:field name="bookmark" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BOOKMARK" required="true"/> <bm:field name="bookmark" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BOOKMARK" required="true"/>
<bm:field name="column_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_NAME"/> <bm:field name="column_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_NAME"/>
<bm:field name="column_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_DESC"/>
<bm:field name="alignment" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ALIGNMENT"/>
<bm:field name="column_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COLUMN_NUM"/> <bm:field name="column_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COLUMN_NUM"/>
<bm:field name="table_width" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TABLE_WIDTH"/>
<bm:field name="ind_width" databaseType="NUMBER" datatype="java.lang.Long" physicalName="IND_WIDTH"/>
<bm:field name="column_width" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COLUMN_WIDTH"/>
<bm:field name="font_family" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FONT_FAMILY"/>
<bm:field name="font_size" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FONT_SIZE"/>
</bm:fields> </bm:fields>
</bm:model> </bm:model>
...@@ -343,7 +343,7 @@ ...@@ -343,7 +343,7 @@
<!--<a:column name="invoice_type_desc" prompt="发票类型"/>--> <!--<a:column name="invoice_type_desc" prompt="发票类型"/>-->
<!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>--> <!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>-->
<a:column name="contract_number" lock="true" prompt="合同编号" width="150"/> <a:column name="contract_number" lock="true" prompt="合同编号" width="150"/>
<a:column name="billing_object_name" prompt="开票对象名称"/> <a:column name="billing_object_name" prompt="发票抬头"/>
<a:column name="bp_id_agent_level1" prompt="代理店"/> <a:column name="bp_id_agent_level1" prompt="代理店"/>
<a:column name="times" align="right" lock="true" prompt="期数" width="40"/> <a:column name="times" align="right" lock="true" prompt="期数" width="40"/>
<a:column name="cf_item_desc" lock="true" prompt="应收项目"/> <a:column name="cf_item_desc" lock="true" prompt="应收项目"/>
......
...@@ -143,12 +143,12 @@ ...@@ -143,12 +143,12 @@
var ds_batch_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acr_invoice_batch_ln'); var ds_batch_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acr_invoice_batch_ln');
var invoice_hd_id = $(ds_id).getCurrentRecord().get('invoice_hd_id'); var invoice_hd_id = $(ds_id).getCurrentRecord().get('invoice_hd_id');
var message = ''; var message = '您确认吗';
if ($(ds_id).getCurrentRecord().get('merge_flag') == 'Y') { // if ($(ds_id).getCurrentRecord().get('merge_flag') == 'Y') {
message = '您确认行合并吗'; // message = '您确认行合并吗';
} else { // } else {
message = '您确认行不合并吗'; // message = '您确认行不合并吗';
} // }
Leaf.showConfirm('提示', message, function() { Leaf.showConfirm('提示', message, function() {
Leaf.request({ Leaf.request({
......
...@@ -185,6 +185,8 @@ ...@@ -185,6 +185,8 @@
<a:fields> <a:fields>
<a:field name="currency_name" displayField="currency_name" options="acr512_currency_ds" returnField="currency" valueField="currency_code"/> <a:field name="currency_name" displayField="currency_name" options="acr512_currency_ds" returnField="currency" valueField="currency_code"/>
<a:field name="invoice_kind" /> <a:field name="invoice_kind" />
<a:field name="contract_name"/>
<a:field name="invoice_bp_name"/>
<a:field name="invoice_kind_desc" displayField="code_value_name" options="acr512_invoice_kind_ds" returnField="invoice_kind" valueField="code_value"/> <a:field name="invoice_kind_desc" displayField="code_value_name" options="acr512_invoice_kind_ds" returnField="invoice_kind" valueField="code_value"/>
<a:field name="business_type_desc" displayField="business_type_desc" options="acr512_business_type_ds" returnField="business_type" valueField="business_type"/> <a:field name="business_type_desc" displayField="business_type_desc" options="acr512_business_type_ds" returnField="business_type" valueField="business_type"/>
<a:field name="created_by_name" lovGridHeight="320" lovHeight="500" lovService="acr.ACR512.acr_invoice_sys_user_lov" lovWidth="500" title="开票人选择"> <a:field name="created_by_name" lovGridHeight="320" lovHeight="500" lovService="acr.ACR512.acr_invoice_sys_user_lov" lovWidth="500" title="开票人选择">
...@@ -256,12 +258,13 @@ ...@@ -256,12 +258,13 @@
<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div> <div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>
--> -->
<a:textField name="document_number_t" bindTarget="acr512_invoice_query_ds" prompt="单据编号到" width="135"/> <a:textField name="document_number_t" bindTarget="acr512_invoice_query_ds" prompt="单据编号到" width="135"/>
<a:textField name="contract_name" bindTarget="acr512_invoice_query_ds" prompt="合同名称" width="353"/>
<a:lov name="contract_number_f" bindTarget="acr512_invoice_query_ds" prompt="合同编号从" width="135"/> <!-- <a:lov name="contract_number_f" bindTarget="acr512_invoice_query_ds" prompt="合同编号从" width="135"/>-->
<!-- <!--
<div><![CDATA[${l:HLS.CONTRACT_NUMBER_TO}]]></div> <div><![CDATA[${l:HLS.CONTRACT_NUMBER_TO}]]></div>
--> -->
<a:lov name="contract_number_t" bindTarget="acr512_invoice_query_ds" prompt="合同编号到" width="135"/> <!-- <a:lov name="contract_number_t" bindTarget="acr512_invoice_query_ds" prompt="合同编号到" width="135"/>-->
<!-- <a:lov name="project_number_f" bindTarget="acr512_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/> <!-- <a:lov name="project_number_f" bindTarget="acr512_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/>
<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div> <div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>
<a:lov name="project_number_t" bindTarget="acr512_invoice_query_ds" prompt="" width="135"/>--> <a:lov name="project_number_t" bindTarget="acr512_invoice_query_ds" prompt="" width="135"/>-->
...@@ -289,15 +292,13 @@ ...@@ -289,15 +292,13 @@
<div><![CDATA[${l:ACR.INVOICE_DATE_TO}]]></div> <div><![CDATA[${l:ACR.INVOICE_DATE_TO}]]></div>
--> -->
<a:datePicker name="invoice_date_t" bindTarget="acr512_invoice_query_ds" prompt="发票日期到" width="135"/> <a:datePicker name="invoice_date_t" bindTarget="acr512_invoice_query_ds" prompt="发票日期到" width="135"/>
<a:lov name="invoice_bp_code_f" bindTarget="acr512_invoice_query_ds" prompt="客户编号从" width="135"/> <!-- <a:lov name="invoice_bp_code_f" bindTarget="acr512_invoice_query_ds" prompt="客户编号从" width="135"/>-->
<!-- <!--
<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div> <div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>
--> -->
<a:lov name="invoice_bp_code_t" bindTarget="acr512_invoice_query_ds" prompt="客户编号到" width="135"/> <!-- <a:lov name="invoice_bp_code_t" bindTarget="acr512_invoice_query_ds" prompt="客户编号到" width="135"/>-->
</a:hBox> <a:textField name="invoice_bp_name" bindTarget="acr512_invoice_query_ds" prompt="客户名称" width="135"/>
<a:hBox labelSeparator=" ">
<a:comboBox name="invoice_kind_desc" bindTarget="acr512_invoice_query_ds" prompt="ACR.INVOICE_KIND" width="135"/> <a:comboBox name="invoice_kind_desc" bindTarget="acr512_invoice_query_ds" prompt="ACR.INVOICE_KIND" width="135"/>
</a:hBox> </a:hBox>
</a:form> </a:form>
<a:grid id="acr512_invoice_update_grid_ds" bindTarget="acr512_invoice_result_ds" marginHeight="250" marginWidth="30" navBar="true"> <a:grid id="acr512_invoice_update_grid_ds" bindTarget="acr512_invoice_result_ds" marginHeight="250" marginWidth="30" navBar="true">
......
...@@ -129,12 +129,12 @@ ...@@ -129,12 +129,12 @@
return; return;
} }
} }
for (var i = 0;i < records.length;i++) { // for (var i = 0;i < records.length;i++) {
if (records[i].get('vat_interface_status')=='BACK') { // if (records[i].get('vat_interface_status')=='BACK') {
Leaf.showMessage('${l:HLS.PROMPT}', '单据号:' + records[i].get('document_number') + '金税状态已回写,不可反冲'); // Leaf.showMessage('${l:HLS.PROMPT}', '单据号:' + records[i].get('document_number') + '金税状态已回写,不可反冲');
return; // return;
} // }
} // }
for (var i = 0;i < records.length;i++) { for (var i = 0;i < records.length;i++) {
records[i].getField('vat_red_notice_num').setRequired(false); records[i].getField('vat_red_notice_num').setRequired(false);
...@@ -231,14 +231,20 @@ ...@@ -231,14 +231,20 @@
<a:map from="description" to="confirmed_by_name"/> <a:map from="description" to="confirmed_by_name"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="invoice_bp_code_f" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择"> <!--<a:field name="invoice_bp_code_f" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">-->
<!--<a:mapping>-->
<!--<a:map from="bp_code" to="invoice_bp_code_f"/>-->
<!--</a:mapping>-->
<!--</a:field>-->
<!--<a:field name="invoice_bp_code_t" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">-->
<!--<a:mapping>-->
<!--<a:map from="bp_code" to="invoice_bp_code_t"/>-->
<!--</a:mapping>-->
<!--</a:field>-->
<a:field name="invoice_bp_name" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping> <a:mapping>
<a:map from="bp_code" to="invoice_bp_code_f"/> <a:map from="bp_code" to="invoice_bp_code"/>
</a:mapping> <a:map from="bp_name" to="invoice_bp_name"/>
</a:field>
<a:field name="invoice_bp_code_t" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_t"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="project_number_f" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500" title="项目选择"> <a:field name="project_number_f" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500" title="项目选择">
...@@ -291,15 +297,21 @@ ...@@ -291,15 +297,21 @@
<a:hBox labelSeparator="" labelWidth="120"> <a:hBox labelSeparator="" labelWidth="120">
<a:textField name="document_number_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.DOCUMENT_NUMBER_FROM" width="135"/> <a:textField name="document_number_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.DOCUMENT_NUMBER_FROM" width="135"/>
<!--<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>--> <!--<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>-->
<a:textField name="document_number_t" bindTarget="acr514_invoice_query_ds" prompt="单据编号到" width="135"/>
<a:lov name="project_number_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/>
<a:textField name="document_number_t" bindTarget="acr514_invoice_query_ds" prompt="单据号到" width="135"/> <a:textField name="document_number_t" bindTarget="acr514_invoice_query_ds" prompt="单据号到" width="135"/>
<!-- <a:lov name="project_number_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/>--> <!-- <a:lov name="project_number_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/>-->
<!--<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>--> <!--<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>-->
<a:lov name="project_number_t" bindTarget="acr514_invoice_query_ds" prompt="申请编号到" width="135"/>
<a:comboBox name="business_type_desc" bindTarget="acr514_invoice_query_ds" prompt="HLS.BUSINESS_TYPE_DESC" width="135"/>
<!-- <a:lov name="project_number_t" bindTarget="acr514_invoice_query_ds" prompt="申请编号到" width="135"/>--> <!-- <a:lov name="project_number_t" bindTarget="acr514_invoice_query_ds" prompt="申请编号到" width="135"/>-->
<!-- <a:comboBox name="business_type_desc" bindTarget="acr514_invoice_query_ds" prompt="HLS.BUSINESS_TYPE_DESC" width="135"/>--> <!-- <a:comboBox name="business_type_desc" bindTarget="acr514_invoice_query_ds" prompt="HLS.BUSINESS_TYPE_DESC" width="135"/>-->
<a:comboBox name="currency_name" bindTarget="acr514_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/>--> <a:comboBox name="currency_name" bindTarget="acr514_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/>-->
<a:textField name="invoice_number_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_NUMBER_FROM" width="135"/> <a:textField name="invoice_number_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_NUMBER_FROM" width="135"/>
<a:textField name="invoice_number_t" bindTarget="acr514_invoice_query_ds" prompt="发票编号到" width="135"/> <a:textField name="invoice_number_t" bindTarget="acr514_invoice_query_ds" prompt="发票编号到" width="135"/>
</a:hBox> </a:hBox>
<a:hBox labelWidth="100">
<a:textField name="invoice_number_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_NUMBER_FROM" width="135"/>
<a:hBox labelSeparator="" labelWidth="120"> <a:hBox labelSeparator="" labelWidth="120">
<!--<div><![CDATA[${l:ACR.INVOICE_NUMBER_TO}]]></div>--> <!--<div><![CDATA[${l:ACR.INVOICE_NUMBER_TO}]]></div>-->
<a:lov name="contract_number_f" bindTarget="acr514_invoice_query_ds" prompt="合同编号" width="135"/> <a:lov name="contract_number_f" bindTarget="acr514_invoice_query_ds" prompt="合同编号" width="135"/>
...@@ -308,16 +320,28 @@ ...@@ -308,16 +320,28 @@
<a:lov name="contract_number_t" bindTarget="acr514_invoice_query_ds" prompt="合同编号到" width="135"/> <a:lov name="contract_number_t" bindTarget="acr514_invoice_query_ds" prompt="合同编号到" width="135"/>
--> -->
<a:comboBox name="invoice_kind_desc" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_KIND" width="135"/> <a:comboBox name="invoice_kind_desc" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_KIND" width="135"/>
<a:lov name="created_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CREATED_BY_NAME" width="135"/> <a:lov name="created_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CREATED_BY_NAME" width="135"/>
<a:datePicker name="invoice_date_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_DATE_FROM" width="135"/> <a:datePicker name="invoice_date_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_DATE_FROM" width="135"/>
<a:datePicker name="invoice_date_t" bindTarget="acr514_invoice_query_ds" prompt="发票日期到" width="135"/> <a:datePicker name="invoice_date_t" bindTarget="acr514_invoice_query_ds" prompt="发票日期到" width="135"/>
</a:hBox> </a:hBox>
<a:hBox labelWidth="100">
<a:datePicker name="invoice_date_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_DATE_FROM" width="135"/>
<a:hBox labelSeparator="" labelWidth="120"> <a:hBox labelSeparator="" labelWidth="120">
<!--<div><![CDATA[${l:ACR.INVOICE_DATE_TO}]]></div>--> <!--<div><![CDATA[${l:ACR.INVOICE_DATE_TO}]]></div>-->
<a:datePicker name="invoice_date_t" bindTarget="acr514_invoice_query_ds" prompt="发票日期到" width="135"/>
<!--<a:lov name="invoice_bp_code_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.CUSTOMER_NUMBER_FROM" width="135"/>-->
<!--&lt;!&ndash;<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>&ndash;&gt;-->
<!--<a:lov name="invoice_bp_code_t" bindTarget="acr514_invoice_query_ds" prompt="客户编号到" width="135"/>-->
<a:lov name="invoice_bp_name" bindTarget="acr514_invoice_query_ds" prompt="客户编号" width="135"/>
<a:lov name="invoice_bp_code_f" bindTarget="acr514_invoice_query_ds" prompt="客户编号" width="135"/> <a:lov name="invoice_bp_code_f" bindTarget="acr514_invoice_query_ds" prompt="客户编号" width="135"/>
<!--<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>--> <!--<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>-->
<!-- <a:lov name="invoice_bp_code_t" bindTarget="acr514_invoice_query_ds" prompt="客户编号到" width="135"/>--> <!-- <a:lov name="invoice_bp_code_t" bindTarget="acr514_invoice_query_ds" prompt="客户编号到" width="135"/>-->
<a:textField name="invoice_title" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_TITLE" width="135"/> <a:textField name="invoice_title" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_TITLE" width="135"/>
<a:comboBox name="currency_name" bindTarget="acr514_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/>
</a:hBox>
<a:hBox labelWidth="100">
<a:lov name="confirmed_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CHECKER" width="135"/> <a:lov name="confirmed_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CHECKER" width="135"/>
<a:datePicker name="accounting_date_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.ACCOUNT_DATE_FROM" width="135"/> <a:datePicker name="accounting_date_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.ACCOUNT_DATE_FROM" width="135"/>
<a:datePicker name="accounting_date_t" bindTarget="acr514_invoice_query_ds" prompt="记账日期到" width="135"/> <a:datePicker name="accounting_date_t" bindTarget="acr514_invoice_query_ds" prompt="记账日期到" width="135"/>
...@@ -327,6 +351,14 @@ ...@@ -327,6 +351,14 @@
<a:numberField name="total_amount_f" allowFormat="true" bindTarget="acr514_invoice_query_ds" prompt="ACR.TOTAL_AMOUNT_FROM" width="135"/> <a:numberField name="total_amount_f" allowFormat="true" bindTarget="acr514_invoice_query_ds" prompt="ACR.TOTAL_AMOUNT_FROM" width="135"/>
<!--<div><![CDATA[${l:ACR.TOTAL_AMOUNT_TO}]]></div>--> <!--<div><![CDATA[${l:ACR.TOTAL_AMOUNT_TO}]]></div>-->
<a:numberField name="total_amount_t" allowFormat="true" bindTarget="acr514_invoice_query_ds" prompt="发票金额到" width="135"/> <a:numberField name="total_amount_t" allowFormat="true" bindTarget="acr514_invoice_query_ds" prompt="发票金额到" width="135"/>
<a:comboBox name="vat_interface_status_desc" bindTarget="acr514_invoice_query_ds" prompt="ACR310.VAT_INTERFACE_STATUS_NAME" width="135"/>
</a:hBox>
<a:hBox labelWidth="100">
<a:lov name="created_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CREATED_BY_NAME" width="135"/>
<a:lov name="confirmed_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CHECKER" width="135"/>
<!--<a:comboBox name="invoice_status_desc" bindTarget="acr514_invoice_query_ds" prompt="发票状态" width="135"/>-->
<a:comboBox name="invoice_status_desc" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_STATUS" width="135"/> <a:comboBox name="invoice_status_desc" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_STATUS" width="135"/>
<a:comboBox name="vat_interface_status_desc" bindTarget="acr514_invoice_query_ds" prompt="金税状态" width="135"/> <a:comboBox name="vat_interface_status_desc" bindTarget="acr514_invoice_query_ds" prompt="金税状态" width="135"/>
</a:hBox> </a:hBox>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<a:field name="cf_item"/> <a:field name="cf_item"/>
<a:field name="cf_item_n" options="cf_item_options" displayField="description" returnField="cf_item" valueField="cf_item"/> <a:field name="cf_item_n" options="cf_item_options" displayField="description" returnField="cf_item" valueField="cf_item"/>
<a:field name="claim_status" options="claim_status_ds" displayField="code_value_name" valueField="code_value" returnField="claim_status"/> <a:field name="claim_status" options="claim_status_ds" displayField="code_value_name" valueField="code_value" returnField="claim_status"/>
<a:field name="cf_item_desc" autoComplete="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="100" lovService="csh.CSH518.hls_cashflow_item_v_lov?cf_direction=INFLOW" lovWidth="520" title="现金流项目"> <a:field name="cf_item_desc" autoComplete="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="100" lovService="acr.ACR510.hls_cashflow_item_v_lov" lovWidth="520" title="现金流项目">
<a:mapping> <a:mapping>
<a:map from="cf_item" to="cf_item"/> <a:map from="cf_item" to="cf_item"/>
<a:map from="cf_item_desc" to="cf_item_desc"/> <a:map from="cf_item_desc" to="cf_item_desc"/>
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true"> trace="true">
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view> <a:view>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check" <a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check"
url="${/request/@context_path}/modules/zjwfl/zj_wfl_approve_history_check.lview"/> url="${/request/@context_path}/modules/zjwfl/zj_wfl_approve_history_check.lview"/>
...@@ -30,7 +33,20 @@ ...@@ -30,7 +33,20 @@
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract'); // stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
Leaf.onReady(function() {
if("${/model/role_info/record/@role_code}"!="0018"&&"${/model/role_info/record/@role_code}"!="0019") {
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM_prompt").style.display = "";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM").style.display = "";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_BP_ID_AGENT_LEVEL1_prompt").style.display = "";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_BP_ID_AGENT_LEVEL1").style.display = "";
} else {
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM_prompt").style.display = "none";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM").style.display = "none";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_BP_ID_AGENT_LEVEL1_prompt").style.display = "none";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_BP_ID_AGENT_LEVEL1").style.display = "none";
}
});
function open_contract_win(ds_id, record_id) { function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id); var record = $(ds_id).findById(record_id);
var param = record.data; var param = record.data;
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
$ctx.parameter.tomcat_source = con_print_path['tomcat_source']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]> ]]>
</s:server-script> </s:server-script>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id" <a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
...@@ -154,6 +155,16 @@ ...@@ -154,6 +155,16 @@
} }
} }
}; };
Leaf.onReady(function() {
if("${/model/role_info/record/@role_code}"!="0018"&&"${/model/role_info/record/@role_code}"!="0019") {
document.getElementById("CON_DUE_DETAIL_user_button4").style.display = "";
document.getElementById("CON_DUE_DETAIL_user_button3").style.display = "";
} else {
document.getElementById("CON_DUE_DETAIL_user_button4").style.display = "none";
document.getElementById("CON_DUE_DETAIL_user_button3").style.display = "none";
}
});
]]></script> ]]></script>
</a:view> </a:view>
</a:screen> </a:screen>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
<a:init-procedure/> <a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view> <a:view>
<a:link id="con_dun_record_id" url="${/request/@context_path}/modules/cont/CON620/con_dun_record.lview"/> <a:link id="con_dun_record_id" url="${/request/@context_path}/modules/cont/CON620/con_dun_record.lview"/>
<a:link id="hls_bp_master_id" <a:link id="hls_bp_master_id"
...@@ -109,70 +111,46 @@ ...@@ -109,70 +111,46 @@
} }
function summaryRenderer(datas, name) { function summaryRenderer(datas, name) {
var sum = 0; var sum = 0;
var sum2 = 0; var sum2 = 0;
var sum3 = 0; var sum3 = 0;
var sum4 = 0;
var sum5 = 0;
for (var i = 0; i < datas.length; i++) { for (var i = 0; i < datas.length; i++) {
record = datas[i]; record = datas[i];
if (name == "overdue_amount") { if (name == "account_due_amount") {
var t_1 = record.get("overdue_amount"); var r_1 = record.get("account_due_amount")||0;
var t_2 = parseFloat(t_1);
if (!isNaN(t_2)) {
sum += t_2;
}
}
if (name == "remain_principal") {
var d_1 = record.get("remain_principal");
var d_2 = parseFloat(d_1);
if (!isNaN(d_2)) {
sum2 += d_2;
}
}
if (name == "penalty") {
var p_1 = record.get("penalty");
var p_2 = parseFloat(p_1);
if (!isNaN(p_2)) {
sum3 += p_2;
}
}
if (name == "promised_return_amount") {
var r_1 = record.get("promised_return_amount");
var r_2 = parseFloat(r_1); var r_2 = parseFloat(r_1);
if (!isNaN(r_2)) { if (!isNaN(r_2)) {
sum4 += r_2; sum += r_2;
} }
} }
if (name == "deposit") { if (name == "business_due_amount") {
var s_1 = record.get("deposit"); var s_1 = record.get("business_due_amount")||0;
var s_2 = parseFloat(s_1); var s_2 = parseFloat(s_1);
if (!isNaN(s_2)) { if (!isNaN(s_2)) {
sum5 += s_2; sum2 += s_2;
}
}
if (name == "over_due_amount") {
debugger;
var t_1 = record.get("over_due_amount")||0;
var t_2 = parseFloat(t_1);
if (!isNaN(t_2)) {
sum3 += t_2;
} }
} }
} }
if (name == "overdue_days") { if (name == "division_n") {
return '<div align="right">合计:</div>'; return '<div align="right">合计:</div>';
} }
if (name == "overdue_amount") { if (name == "account_due_amount") {
return '<font color="red">' + Leaf.formatNumber(sum, 2) + '</font>'; return '<font color="red">' + Leaf.formatNumber(sum, 2) + '</font>';
} }
if (name == "remain_principal") { if (name == "business_due_amount") {
return '<font color="red">' + Leaf.formatNumber(sum2, 2) + '</font>'; return '<font color="red">' + Leaf.formatNumber(sum2, 2) + '</font>';
} }
if (name == "penalty") { if (name == "over_due_amount") {
return '<font color="red">' + Leaf.formatNumber(sum3, 2) + '</font>'; return '<font color="red">' + Leaf.formatNumber(sum3, 2) + '</font>';
} }
if (name == "promised_return_amount") {
return '<font color="red">' + Leaf.formatNumber(sum4, 2) + '</font>';
}
if (name == "deposit") {
return '<font color="red">' + Leaf.formatNumber(sum5, 2) + '</font>';
}
} }
// function onIndexChange(ds, record, name, value, oldvalue) { // function onIndexChange(ds, record, name, value, oldvalue) {
...@@ -180,12 +158,14 @@ ...@@ -180,12 +158,14 @@
// $('bgt_contract_payment_detail_line_ds').query(); // $('bgt_contract_payment_detail_line_ds').query();
// } // }
// function ds_query(ds) { function ds_query(ds) {
// if (ds.getAll().length == 0) { var grid_id = $('CON601_con_contract_grid_ds');
// $('bgt_contract_payment_detail_line_ds').setQueryParameter('contract_id', null); if("${/model/role_info/record/@role_code}"=="0018"||"${/model/role_info/record/@role_code}"=="0019"){
// $('bgt_contract_payment_detail_line_ds').query(); grid_id.hideColumn('account_due_times');
// } grid_id.hideColumn('account_due_days');
// } grid_id.hideColumn('account_due_amount');
}
}
]]></script> ]]></script>
<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"/>
...@@ -236,7 +216,7 @@ ...@@ -236,7 +216,7 @@
</a:fields> </a:fields>
<a:events> <a:events>
<!--<a:event name="indexChange" handler="onIndexChange"/>--> <!--<a:event name="indexChange" handler="onIndexChange"/>-->
<!--<a:event name="load" handler="ds_query"/>--> <a:event name="load" handler="ds_query"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
<!--<a:dataSet id="bgt_contract_payment_detail_line_ds" fetchAll="true" model="cont.CON620.bgt_contract_payment_detail_line"/>--> <!--<a:dataSet id="bgt_contract_payment_detail_line_ds" fetchAll="true" model="cont.CON620.bgt_contract_payment_detail_line"/>-->
...@@ -279,18 +259,20 @@ ...@@ -279,18 +259,20 @@
align="center"/> align="center"/>
<a:column name="bp_id_agent_desc" align="center" prompt="代理店" width="200"/> <a:column name="bp_id_agent_desc" align="center" prompt="代理店" width="200"/>
<a:column name="business_type_n" align="center" prompt="业务类型" width="60"/> <a:column name="business_type_n" align="center" prompt="业务类型" width="60"/>
<a:column name="division_n" align="center" prompt="租赁物" width="60"/> <a:column name="division_n" align="center" prompt="租赁物" width="60" footerRenderer="summaryRenderer"/>
<a:column name="account_due_times" align="center" prompt="会计逾期总期数" <a:column name="account_due_times" align="center" prompt="会计逾期总期数"
width="100"/> width="100"/>
<a:column name="account_due_days" align="center" prompt="会计逾期总天数" <a:column name="account_due_days" align="center" prompt="会计逾期总天数"
width="100"/> width="100"/>
<a:column name="account_due_amount" align="right" prompt="会计逾期总金额" renderer="Leaf.formatMoney" <a:column name="account_due_amount" align="right" prompt="会计逾期总金额" footerRenderer="summaryRenderer"
width="100"/> width="100"/>
<a:column name="business_due_times" align="center" prompt="营业逾期总期数" <a:column name="business_due_times" align="center" prompt="营业逾期总期数"
width="100"/> width="100"/>
<a:column name="business_due_days" align="center" prompt="营业逾期总天数" <a:column name="business_due_days" align="center" prompt="营业逾期总天数"
width="100"/> width="100"/>
<a:column name="business_due_amount" align="right" prompt="营业逾期总金额" renderer="Leaf.formatMoney" <a:column name="business_due_amount" align="right" prompt="营业逾期总金额" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="over_due_amount" align="right" prompt="违约金" footerRenderer="summaryRenderer"
width="100"/> width="100"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
......
...@@ -169,6 +169,7 @@ ...@@ -169,6 +169,7 @@
var confirmed_flag = datas[i].get('confirmed_flag'); var confirmed_flag = datas[i].get('confirmed_flag');
if(confirmed_flag!='ACCAUDITING'){ if(confirmed_flag!='ACCAUDITING'){
$L.showInfoMessage("提示",'请选择收款确认中的收款单据'); $L.showInfoMessage("提示",'请选择收款确认中的收款单据');
$('csh509_csh_trx_bank_refuse').enable();
return; return;
} }
// //需要债权用户和会计担当才能驳回单据 // //需要债权用户和会计担当才能驳回单据
......
...@@ -95,10 +95,14 @@ ...@@ -95,10 +95,14 @@
$('csh511_receipt_save_id').disable(); $('csh511_receipt_save_id').disable();
$('csh_transaction_receipt_head_ds').submit(); $('csh_transaction_receipt_head_ds').submit();
$('csh511_receipt_save_id').enable(); $('csh511_receipt_save_id').enable();
$('csh_transaction_receipt_link_winid').close(); // $('csh_transaction_receipt_link_winid').close();
} }
function onSubmitSuccess(){
$('csh_transaction_receipt_link_winid').close();
}
function csh511_receipt_posted() { function csh511_receipt_posted() {
if ($('csh_transaction_receipt_head_ds').validate()) { if ($('csh_transaction_receipt_head_ds').validate()) {
Leaf.Masker.mask(Ext.getBody(), '${l:CSH511.SAVE_AND_POST}'); Leaf.Masker.mask(Ext.getBody(), '${l:CSH511.SAVE_AND_POST}');
...@@ -443,6 +447,7 @@ ...@@ -443,6 +447,7 @@
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="onUpdate_csh511_receipt"/> <a:event name="update" handler="onUpdate_csh511_receipt"/>
<a:event name="submitsuccess" handler="onSubmitSuccess"/>
<!--<a:event name="add" handler="onAdd_csh511_receipt"/> <!--<a:event name="add" handler="onAdd_csh511_receipt"/>
<a:event name="load" handler="onAdd_csh511_receipt"/>--> <a:event name="load" handler="onAdd_csh511_receipt"/>-->
</a:events> </a:events>
......
...@@ -716,11 +716,11 @@ ...@@ -716,11 +716,11 @@
<!--银行流水号--> <!--银行流水号-->
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE"/> <a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE"/>
<!--对方账户户名--> <!--对方账户户名-->
<a:lov name="bp_bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/> <a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<!--对方银行名称--> <!--对方银行名称-->
<a:lov name="opposite_band_na" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/> <a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<!--对方账户账号--> <!--对方账户账号-->
<a:lov name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/> <a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:textField style="display:none"/> <a:textField style="display:none"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/> <a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="单据审批状态"/> <a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="单据审批状态"/>
......
...@@ -391,7 +391,11 @@ ...@@ -391,7 +391,11 @@
} }
} }
var h_record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord(); var h_record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
h_record.set('for_allocate_amount',minus(h_record.get('unwrite_off_amount'),sum)); var for_allocate_amount = 0;
if(h_record.get('unwrite_off_amount') && h_record.get('unwrite_off_amount') > 0){
for_allocate_amount = minus(h_record.get('unwrite_off_amount'),sum);
}
h_record.set('for_allocate_amount',for_allocate_amount);
} }
function csh531n_write_off_return() { function csh531n_write_off_return() {
...@@ -481,13 +485,15 @@ ...@@ -481,13 +485,15 @@
} }
function attachment_upload() { function attachment_upload() {
if ('${/parameter/@transaction_id}') { if ('${/parameter/@transaction_id}') {
// //
// ds = $('csh_transaction_receipt_head_ds'); var ds = $('csh_transaction_receipt_write_off_detail_ds');
// record = ds.getCurrentRecord(); var record = ds.getCurrentRecord();
// var header_id = record.get('transaction_id'); // var header_id = '${/parameter/@transaction_id}';
var header_id = '${/parameter/@transaction_id}'; var header_id = record.get('transaction_id');
if(record.get('transaction_type') == 'ADVANCE_RECEIPT'){
header_id = record.get('source_csh_trx_id');
}
var url = $('transaction_downloadFile_id').getUrl() + '?table_name=CSH_TRANSACTION&header_id=' + header_id; var url = $('transaction_downloadFile_id').getUrl() + '?table_name=CSH_TRANSACTION&header_id=' + header_id;
var win = new Leaf.Window({ var win = new Leaf.Window({
url: url, url: url,
...@@ -738,7 +744,7 @@ ...@@ -738,7 +744,7 @@
<a:fields> <a:fields>
<a:field name="company_id" defaultValue="${/parameter/@company_id}"/> <a:field name="company_id" defaultValue="${/parameter/@company_id}"/>
<a:field name="write_off_date" validator="write_off_date_validator" required="true" <a:field name="write_off_date" validator="write_off_date_validator" required="true"
defaultValue="${/parameter/@transaction_date}"/> defaultValue="${/model/sys_default_time/record/@now_date}"/>
<a:field name="journal_date" required="true" <a:field name="journal_date" required="true"
defaultValue="${/model/sys_default_time/record/@now_date}"/> defaultValue="${/model/sys_default_time/record/@now_date}"/>
<a:field name="write_off_period_name" defaultValue="${/parameter/@period_name}"/> <a:field name="write_off_period_name" defaultValue="${/parameter/@period_name}"/>
...@@ -808,7 +814,7 @@ ...@@ -808,7 +814,7 @@
<a:field name="company_id" defaultValue="${/session/@company_id}"/> <a:field name="company_id" defaultValue="${/session/@company_id}"/>
<a:field name="write_off_amount"/> <a:field name="write_off_amount"/>
<a:field name="write_off_date" validator="write_off_date_validator" required="true" <a:field name="write_off_date" validator="write_off_date_validator" required="true"
defaultValue="${/parameter/@transaction_date}"/> defaultValue="${/model/sys_default_time/record/@now_date}"/>
</a:fields> </a:fields>
</a:dataSet> </a:dataSet>
<a:dataSet id="csh_transaction_advanced_ds" model="csh.CSH531N.csh_transaction_plan_query" fetchAll="true" <a:dataSet id="csh_transaction_advanced_ds" model="csh.CSH531N.csh_transaction_plan_query" fetchAll="true"
...@@ -833,7 +839,7 @@ ...@@ -833,7 +839,7 @@
<a:field name="write_off_amount"/> <a:field name="write_off_amount"/>
<a:field name="create_wf_flag" defaultValue="N"/> <a:field name="create_wf_flag" defaultValue="N"/>
<a:field name="write_off_date" validator="write_off_date_validator" required="true" <a:field name="write_off_date" validator="write_off_date_validator" required="true"
defaultValue="${/parameter/@transaction_date}"/> defaultValue="${/model/sys_default_time/record/@now_date}"/>
</a:fields> </a:fields>
</a:dataSet> </a:dataSet>
</a:dataSets> </a:dataSets>
......
...@@ -107,6 +107,12 @@ ...@@ -107,6 +107,12 @@
} }
} }
function changeColor(record, index) {
if (index == 0) {
return 'color:red';
}
}
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="csh_lov_cf_item_ds" autoQuery="true" model="csh.CSH531N.hls_cashflow_item_v" <a:dataSet id="csh_lov_cf_item_ds" autoQuery="true" model="csh.CSH531N.hls_cashflow_item_v"
...@@ -166,7 +172,7 @@ ...@@ -166,7 +172,7 @@
</a:vBox> </a:vBox>
<a:vBox> <a:vBox>
<a:grid bindTarget="csh_write_off_lov_ds" marginHeight="120" id="csh_con_contract_cashflow_ds" <a:grid bindTarget="csh_write_off_lov_ds" marginHeight="120" id="csh_con_contract_cashflow_ds"
width="800" navBar="true"> width="800" navBar="true" rowRenderer="changeColor">
<a:columns> <a:columns>
<a:column name="times" prompt="HLS.TIMES" align="center" width="60"/> <a:column name="times" prompt="HLS.TIMES" align="center" width="60"/>
<a:column name="cf_item_desc" prompt="HLS.CF_ITEM_DESC" align="center" width="80"/> <a:column name="cf_item_desc" prompt="HLS.CF_ITEM_DESC" align="center" width="80"/>
...@@ -176,7 +182,9 @@ ...@@ -176,7 +182,9 @@
width="110"/> width="110"/>
<a:column name="principal" align="right" prompt="应收本金" renderer="Leaf.formatMoney" <a:column name="principal" align="right" prompt="应收本金" renderer="Leaf.formatMoney"
width="110"/> width="110"/>
<a:column name="interest" align="right" prompt="应收利息" renderer="Leaf.formatMoney" width="110"/> <!-- <a:column prompt="营业">--> <a:column name="interest" align="right" prompt="应收利息" renderer="Leaf.formatMoney"
width="110"/>
<!-- <a:column prompt="营业">-->
<a:column name="unreceived_amount" prompt="未收金额" align="right" <a:column name="unreceived_amount" prompt="未收金额" align="right"
renderer="Leaf.formatMoney" width="110"/> renderer="Leaf.formatMoney" width="110"/>
<a:column name="unreceived_principal" prompt="未收本金" align="right" <a:column name="unreceived_principal" prompt="未收本金" align="right"
......
...@@ -362,10 +362,10 @@ ...@@ -362,10 +362,10 @@
//保存submitsuccess调用 //保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var head_record = $(ds_id).getCurrentRecord(); var head_record = $(ds_id).getCurrentRecord();
if(!head_record.get('bp_code')){
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({ Leaf.request({
url: $('get_special_fields_link_id').getUrl(), url: $('get_special_fields_link_id').getUrl(),
para: { para: {
...@@ -386,6 +386,8 @@ ...@@ -386,6 +386,8 @@
sync: true, sync: true,
scope: this scope: this
}); });
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}; };
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
...@@ -438,12 +440,26 @@ ...@@ -438,12 +440,26 @@
if (!checkCard(value)) { if (!checkCard(value)) {
Leaf.showMessage('${l:HLS.PROMPT}', '个人身份证号错误!'); Leaf.showMessage('${l:HLS.PROMPT}', '个人身份证号错误!');
return false; return false;
}else{
if (value.length == 18) {
record.set('date_of_birth', new Date(value.substr(6, 4) + '/' + value.substr(10, 2) + '/' + value.substr(12, 2)));
record.set('age', new Date().getFullYear() - value.substr(6, 4));
if (value.substr(16, 1) % 2 == 1) {
record.set('gender', 'MALE');
record.set('gender_n', '男');
} else if (value.substr(16, 1) % 2 == 0) {
record.set('gender', 'FEMALE');
record.set('gender_n', '女');
}
}
} }
} }
// ds.fields.id_card_no.pro.validator = id_card_no_validate; // ds.fields.id_card_no.pro.validator = id_card_no_validate;
//自动带出籍贯 //自动带出籍贯
record.set('resident_addres', get_native_place(value)) // record.set('resident_addres', get_native_place(value))
} }
if (name == 'id_no_sp') { if (name == 'id_no_sp') {
if (!value) { if (!value) {
...@@ -453,10 +469,14 @@ ...@@ -453,10 +469,14 @@
if (!checkCard(value)) { if (!checkCard(value)) {
Leaf.showMessage('${l:HLS.PROMPT}', '配偶身份证号错误!'); Leaf.showMessage('${l:HLS.PROMPT}', '配偶身份证号错误!');
return false; return false;
}else{
if (value.length == 18) {
record.set('date_of_birth_sp', new Date(value.substr(6, 4) + '/' + value.substr(10, 2) + '/' + value.substr(12, 2)));
}
} }
} }
// ds.fields.id_no_sp.pro.validator = id_card_no_validate; // ds.fields.id_no_sp.pro.validator = id_card_no_validate;
record.set('resident_addres_sp', get_native_place(value)) // record.set('resident_addres_sp', get_native_place(value))
} }
} }
......
...@@ -29,6 +29,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -29,6 +29,7 @@ $Purpose: 商业伙伴授信维护
var credit_date_to=Leaf.formatDate(record.get('credit_date_to')); var credit_date_to=Leaf.formatDate(record.get('credit_date_to'));
var total_amount=record.get('credit_total_amount'); var total_amount=record.get('credit_total_amount');
var used_credit_amount=record.get('used_amount'); var used_credit_amount=record.get('used_amount');
if (record.dirty){
if(total_amount<used_credit_amount){ if(total_amount<used_credit_amount){
$L.showErrorMessage("错误",'修改后剩余授信额度小于0',null,null); $L.showErrorMessage("错误",'修改后剩余授信额度小于0',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
...@@ -71,7 +72,12 @@ $Purpose: 商业伙伴授信维护 ...@@ -71,7 +72,12 @@ $Purpose: 商业伙伴授信维护
}, },
sync: true, sync: true,
scope: this scope: this
}); });}else{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
$('credit_ds').query();
}
......
...@@ -8,7 +8,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -8,7 +8,7 @@ $Purpose: 商业伙伴授信维护
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure> <a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id} and position_code in(006,007)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/> <a:model-query defaultWhereClause="t1.user_id=${/session/@user_id} and position_code in(005,006)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
...@@ -20,7 +20,9 @@ $Purpose: 商业伙伴授信维护 ...@@ -20,7 +20,9 @@ $Purpose: 商业伙伴授信维护
<a:link id="hls361N_update_credit_status_link_id" model="hls.HLS361N.hls_bp_master_credit_update_status" modelaction="update"/> <a:link id="hls361N_update_credit_status_link_id" model="hls.HLS361N.hls_bp_master_credit_update_status" modelaction="update"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="check_roles" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="check_roles" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="check_create_record_link_id" model="hls.HLS361N.hls_bp_master_create_record"
modelaction="update"/>
<a:link id="credit_detail_link" url="${/request/@context_path}/modules/hls/HLS361N/hls_bp_mster_credit_record.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
var user_code=''; var user_code='';
Leaf.onReady(function(){ Leaf.onReady(function(){
...@@ -68,7 +70,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -68,7 +70,7 @@ $Purpose: 商业伙伴授信维护
//设置为可以修改 //设置为可以修改
//datas[0].getField('credit_total_amount').setReadOnly(false); //datas[0].getField('credit_total_amount').setReadOnly(false);
} }
//1. 营业内勤/营业担当勾选授信状态为“启用”或“停用 //1. 营业副部长/营业担当勾选授信状态为“启用”或“停用
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
//授信额度变更 //授信额度变更
var param={}; var param={};
...@@ -80,14 +82,19 @@ $Purpose: 商业伙伴授信维护 ...@@ -80,14 +82,19 @@ $Purpose: 商业伙伴授信维护
} }
//启用和审批冻结判断 //启用和审批冻结判断
var credit_status=datas[0].data.credit_status; var credit_status=datas[0].data.credit_status;
if(credit_status!='ENABLE'&&credit_status!='DISABLE'&&credit_status!='REFUSE'){ // if(credit_status!='ENABLE'&&credit_status!='DISABLE'&&credit_status!='REFUSE'){
$L.showInfoMessage("提示",'请选择状态为启用,停用和审批拒绝的数据!',null,null) // $L.showInfoMessage("提示",'请选择状态为启用,停用和审批拒绝的数据!',null,null)
// return;
// }
//005 营业副部长
//006 营业担当
if(user_code==''||user_code==undefined){
$L.showInfoMessage("提示",'只有营业副部长和营业担当才能操作数据!');
return; return;
} }
//角色判断 00215 营业内勤 if(datas[0].get('credit_status')=='APPROVING'){
//00213 营业担当 $L.showInfoMessage("提示",'该授信记录审批中,无法维护!');
if(user_code==''||user_code==undefined){
$L.showInfoMessage("提示",'只有营业内勤和营业担当才能操作数据!');
return; return;
} }
...@@ -102,6 +109,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -102,6 +109,7 @@ $Purpose: 商业伙伴授信维护
param['credit_date_from']=datas[0].get('credit_date_from'); param['credit_date_from']=datas[0].get('credit_date_from');
param['credit_total_amount']=datas[0].get('credit_total_amount'); param['credit_total_amount']=datas[0].get('credit_total_amount');
param['bp_code']=datas[0].get('bp_code'); param['bp_code']=datas[0].get('bp_code');
param['credit_status']=datas[0].get('credit_status');
param['winid']='hls_bp_credit_winId'; param['winid']='hls_bp_credit_winId';
hls_doc_get_layout_code('hn1150_get_layout_code_link_id', param, 'hls361_hls_bp_master_maintain_link', credit_ds); hls_doc_get_layout_code('hn1150_get_layout_code_link_id', param, 'hls361_hls_bp_master_maintain_link', credit_ds);
...@@ -194,6 +202,43 @@ $Purpose: 商业伙伴授信维护 ...@@ -194,6 +202,43 @@ $Purpose: 商业伙伴授信维护
hls_doc_get_layout_code('hn1150_get_layout_code_link_id', param, 'hls361_hls_bp_master_credit_agent_detail_link', null); hls_doc_get_layout_code('hn1150_get_layout_code_link_id', param, 'hls361_hls_bp_master_credit_agent_detail_link', null);
} }
// //变更履历按钮
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function() {
var credit_ds=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd');
var record = $(credit_ds).getCurrentRecord();
Leaf.Masker.mask(Ext.getBody(), '正在执行...');
Leaf.request({
url: $('check_create_record_link_id').getUrl(),
para: {
bp_credit_hd_id: record.get('bp_credit_hd_id')
},
success: function () {
Leaf.Masker.unmask(Ext.getBody());
var win = new Leaf.Window({
id: 'hls_bp_credit_record_window',
params: {
bp_credit_hd_id: record.get('bp_credit_hd_id'),
winid: 'hls_bp_credit_record_window'
},
url: $('credit_detail_link').getUrl(),
title: '授信额度变更履历',
fullScreen: true
});
win.on('close', function () {
// ds.query(ds.currentPage);
});
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
]]></script> ]]></script>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: niminmin
$Date: 2019-10-28 上午11:10:33
$Revision: 1.0
$Purpose:授信额度履历
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
</a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
]]></script>
<a:dataSets>
<a:dataSet id="hls_bp_master_credit_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS361N.hls_bp_master_create_record" queryDataSet="csh_deposit_transfer_maintain_query_ds" queryUrl="${/request/@context_path}/autocrud/hls.HLS361N.hls_bp_master_create_record/query?bp_credit_hd_id=${/parameter/@bp_credit_hd_id}">
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<!--<a:gridButton click="cus100_deposit_transfer" text="划转" id="cus100_deposit_transfer_id"/>-->
<!--<a:gridButton click="cus100_deposit_transfer_query" text="HLS.QUERY" id="cus100_deposit_transfer_query_id"/>-->
<!--<a:gridButton click="cus100_deposit_transfer_reset" text="HLS.RESET"/>-->
</a:screenTopToolbar>
<a:fieldSet labelWidth="150" style="margin-left:20px">
<a:grid id="hls_bp_master_credit_result_grid_ds" bindTarget="hls_bp_master_credit_result_ds" marginHeight="165" marginWidth="100" navBar="true" >
<a:columns>
<a:column name="bp_code" prompt="代理店编码" align="center" width="120"/>
<a:column name="bp_name" prompt="代理店名称" align="center" width="170"/>
<a:column name="credit_total_amount" prompt="授信总额度" align="center" width="200"/>
<a:column name="credit_date_from" prompt="授信日期从" align="center" width="120"/>
<a:column name="credit_date_to" prompt="授信日期到" width="110" align="center"/>
<a:column name="last_updated_by_desclast_update_date" prompt="变更日期" width="110" align="center"/>
<!--<a:column name="" prompt="变更人" width="110" align="center"/>-->
</a:columns>
</a:grid>
</a:fieldSet>
</a:screenBody>
</a:view>
</a:screen>
...@@ -17,6 +17,10 @@ $Purpose: 商业伙伴授信维护 ...@@ -17,6 +17,10 @@ $Purpose: 商业伙伴授信维护
<a:link id="hls361_hls_bp_master_credit_agent_detail_link" url="${/request/@context_path}/modules/hls/HLS362N/credit_entrance_detail_confirm.lview"/> <a:link id="hls361_hls_bp_master_credit_agent_detail_link" url="${/request/@context_path}/modules/hls/HLS362N/credit_entrance_detail_confirm.lview"/>
<a:link id="hls362N_update_credit_confirmed_link_id" model="hls.HLS361N.hls_bp_master_credit_confirmed" modelaction="update"/> <a:link id="hls362N_update_credit_confirmed_link_id" model="hls.HLS361N.hls_bp_master_credit_confirmed" modelaction="update"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="check_create_record_link_id" model="hls.HLS361N.hls_bp_master_create_record"
modelaction="update"/>
<a:link id="credit_detail_link" url="${/request/@context_path}/modules/hls/HLS361N/hls_bp_mster_credit_record.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
var user_code=''; var user_code='';
Leaf.onReady(function(){ Leaf.onReady(function(){
...@@ -52,8 +56,8 @@ $Purpose: 商业伙伴授信维护 ...@@ -52,8 +56,8 @@ $Purpose: 商业伙伴授信维护
} }
//审批冻结判断 //审批冻结判断
var credit_status=datas[0].data.credit_status; var credit_status=datas[0].data.credit_status;
if(credit_status!='FREZZING'){ if(credit_status!='APPROVING'){
$L.showInfoMessage("提示",'请选择状态为审批冻结的数据!',null,null) $L.showInfoMessage("提示",'请选择状态为审批的数据!',null,null)
return; return;
} }
//角色判断 //角色判断
...@@ -68,7 +72,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -68,7 +72,7 @@ $Purpose: 商业伙伴授信维护
url: $('hls362N_update_credit_confirmed_link_id').getUrl(), url: $('hls362N_update_credit_confirmed_link_id').getUrl(),
para: { para: {
bp_credit_hd_id : datas[0].data.bp_credit_hd_id, bp_credit_hd_id : datas[0].data.bp_credit_hd_id,
wanted_status : 'ENABLE', wanted_status : 'APPROVED',
}, },
success: function () { success: function () {
Leaf.SideBar.show({ Leaf.SideBar.show({
...@@ -115,7 +119,8 @@ $Purpose: 商业伙伴授信维护 ...@@ -115,7 +119,8 @@ $Purpose: 商业伙伴授信维护
url: $('hls362N_update_credit_confirmed_link_id').getUrl(), url: $('hls362N_update_credit_confirmed_link_id').getUrl(),
para: { para: {
bp_credit_hd_id : datas[0].data.bp_credit_hd_id, bp_credit_hd_id : datas[0].data.bp_credit_hd_id,
wanted_status : 'REFUSE', wanted_status : 'REJECT'
}, },
success: function () { success: function () {
Leaf.SideBar.show({ Leaf.SideBar.show({
...@@ -159,6 +164,47 @@ $Purpose: 商业伙伴授信维护 ...@@ -159,6 +164,47 @@ $Purpose: 商业伙伴授信维护
hls_doc_get_layout_code('hn1150_get_layout_code_link_id', param, 'hls361_hls_bp_master_credit_agent_detail_link', null); hls_doc_get_layout_code('hn1150_get_layout_code_link_id', param, 'hls361_hls_bp_master_credit_agent_detail_link', null);
} }
//变更履历按钮
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
var credit_ds=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd');
var record = $(credit_ds).getSelected();
if (record.length!=1){
$L.showInfoMessage("提示",'请选择一条数据!');
return;
}
Leaf.Masker.mask(Ext.getBody(), '正在执行...');
Leaf.request({
url: $('check_create_record_link_id').getUrl(),
para: {
bp_credit_hd_id: record[0].get('bp_credit_hd_id')
},
success: function () {
Leaf.Masker.unmask(Ext.getBody());
var win = new Leaf.Window({
id: 'hls_bp_credit_record_window',
params: {
bp_credit_hd_id: record.get('bp_credit_hd_id'),
winid: 'hls_bp_credit_record_window'
},
url: $('credit_detail_link').getUrl(),
title: '授信额度变更履历',
fullScreen: true
});
win.on('close', function () {
// ds.query(ds.currentPage);
});
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
]]></script> ]]></script>
......
...@@ -76,9 +76,9 @@ ...@@ -76,9 +76,9 @@
var headers_ds = $('hls_monthly_statement_ds'); var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0); var record = headers_ds.getAt(0);
var period_name = typeof (record.get('period_name')) == 'undefined' ? 0 : record.get('period_name'); var period_name = typeof (record.get('period_name')) == 'undefined' ? 0 : record.get('period_name');
var calc_end_date = typeof (record.get('calc_end_date')) == 'undefined' ? 0 : record.get('calc_end_date');
if (period_name == 0 || period_name == '') { if (period_name == 0 || period_name == '' || calc_end_date == 0 || calc_end_date == '') {
Leaf.showMessage('${l:HLS.PROMPT}', '请确认期间!'); Leaf.showMessage('${l:HLS.PROMPT}', '请确认期间以及截止日!');
} else { } else {
nextStep(); nextStep();
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<s:server-script import="con_print_path.js"><![CDATA[
importPackage(java.io);
importPackage(Packages.hls.plugin.docx4j)
importPackage(Packages.org.apache.commons.io);
function RandomString(length) {
var str = '';
for (; str.length < length; str += Math.random().toString(36).substr(2)) ;
return str.substr(0, length);
}
//删除文件
function deleteFile(filePath) {
var file = new File(filePath);
if (file.exists()) {
file.delete();
}
}
function copyFile(fOld, fNew) {
var fis = new java.io.FileInputStream(fOld);
var fos = new java.io.FileOutputStream(fNew);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 4);
var len = -1;
while ((len = fis.read(b)) != -1) {
fos.write(b, 0, len);
}
fis.close();
fos.close();
}
//按日期创建目录
function getDatePath() {
set_parameter_file_path();
var file_path = $ctx.parameter.file_path; //file_path = c:/hls_test_files/content_files/
var now = new Date()
y = now.getFullYear()
m = now.getMonth() + 1
m = m < 10 ? "0" + m : m
var datePath = file_path + y + "/" + m + "/";
return datePath; //datePath = d:/hls_test_files/fileupload/2018/04/
}
function write_os_to_file(file, os) {
var fis = new FileInputStream(file);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function download_file(file_path, file_name) {
$ctx["__request_type__"] = 'file';
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(file_name, 'utf-8'));
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
try {
var os = resp.getOutputStream();
write_os_to_file(file_path, os);
//write_os_to_file(file_path+file_name, os);
os.flush();
} catch (e) {
$logger("server-script").severe(e.message);
}
}
function collection_create_content() {
try {
//第一步生成合同文本
$bm('prj.PRJ501N.create_content_for_prj_quotation').update({
project_id: $ctx.parameter.project_id,
templet_code: $ctx.parameter.templet_code
});
//获取日期目录
set_parameter_file_path();
var datePath = getDatePath();
$ctx.parameter.batch_flag = 'Y';
FileUtils.forceMkdir(new File(datePath)); //根据日期创建目录
var from_file_data_map = $bm('prj.PRJ501N.prj_doc_file_templet_get_atm').queryAsMap({
project_id_id: $ctx.parameter.project_id,
batch_flag: $ctx.parameter.batch_flag,
});
var from_file_data = from_file_data_map.getChildren();
for (var i = 0; i < from_file_data.length; i++) {
var to_file_path = $ctx.parameter.file_path;
var record_data = from_file_data[i];
if (record_data.file_exists_flag != 'Y') {
var to_file_name = record_data.to_file_name + '.' + record_data.file_type_code || 'doc';
var from_file_path = record_data.file_path;
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();
to_file_path = datePath + guid_file_name_tables[0].guid_file_name + 'con' + record_data.content_id;
copyFile(from_file_path, to_file_path);
try {
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id,'PROJECT');
} catch (e) {
raise_app_error(e);
}
$bm('prj.PRJ501N.prj_file_content_copy_update').update({
table_name: 'PRJ_PROJECT_CONTENT',
content_id: record_data.content_id,
file_name: to_file_name.toString(),
file_path: to_file_path.toString(),
source_type: 'PROJECT'
});
var test = new File(to_file_path);
var test1 = new File('D:' + to_file_path);
download_file(to_file_path.toString(), to_file_name.toString());
}
}
$ctx.parameter.return_status = 'S';
$ctx.parameter.return_message = '执行成功';
} catch (e) {
$ctx.success = "true";
$ctx.parameter.return_status = 'E';
$ctx.parameter.return_message = $ctx.get('/error/@message') || String(e);
raise_app_error(e);
}
var result = {
result: $ctx.parameter.return_status,
message: $ctx.parameter.return_message
};
$ctx.parameter.json = JSON.stringify(result);
}
if ($ctx.parameter.return_status != 'E' && $ctx.parameter.return_status != 'TIMEOUT') {
collection_create_content();
}
]]></s:server-script>
</a:init-procedure>
<a:service-output/>
</a:service>
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<a:link id="prj_project_modify_special_link" <a:link id="prj_project_modify_special_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_special.lview"/> url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_special.lview"/>
<a:link id="prj_project_close_link_id" model="prj.PRJ501.prj_project_close" modelaction="update"/> <a:link id="prj_project_close_link_id" model="prj.PRJ501.prj_project_close" modelaction="update"/>
<a:link id="prj_quotation_print_link" url="${/request/@context_path}/modules/prj/PRJ501N/create_content_for_prj_quotation.lsc"/>
<!-- <link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/> <!-- <link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>--> <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>-->
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
...@@ -150,6 +151,15 @@ ...@@ -150,6 +151,15 @@
prj_project_result_ds.query(prj_project_result_ds.currentPage); prj_project_result_ds.query(prj_project_result_ds.currentPage);
}); });
}; };
//报价单打印
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var project_id = $(ds_id).getSelected()[0].get('project_id');
var templet_code = 'PROJECT_QUOTATION';
var url=$('prj_quotation_print_link').getUrl() + '?project_id=' + project_id + '&templet_code=' + templet_code;
window.open(url, '_self');
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
$Purpose: 项目报告维护入口界面 $Purpose: 项目报告维护入口界面
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view> <a:view>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check" url="${/request/@context_path}/modules/zjwfl/zj_wfl_approve_history_check.lview"/> <a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check" url="${/request/@context_path}/modules/zjwfl/zj_wfl_approve_history_check.lview"/>
<a:link id="prj_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="prj_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
...@@ -132,6 +135,16 @@ ...@@ -132,6 +135,16 @@
var grid_id = ds_id.replace('ds', 'layout_grid_id'); var grid_id = ds_id.replace('ds', 'layout_grid_id');
$(grid_id)._export(); $(grid_id)._export();
}; };
Leaf.onReady(function() {
if("${/model/role_info/record/@role_code}"!="0018"&&"${/model/role_info/record/@role_code}"!="0019") {
document.getElementById("PROJECT_QUERY_ENTRANCE_F_QUERY_NULL_INVOICE_AGENT_ID_prompt").style.display = "";
document.getElementById("PROJECT_QUERY_ENTRANCE_F_QUERY_NULL_INVOICE_AGENT_ID").style.display = "";
} else {
document.getElementById("PROJECT_QUERY_ENTRANCE_F_QUERY_NULL_INVOICE_AGENT_ID_prompt").style.display = "none";
document.getElementById("PROJECT_QUERY_ENTRANCE_F_QUERY_NULL_INVOICE_AGENT_ID").style.display = "none";
}
});
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=PROJECT&amp;function_code=PRJ501"/> <a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=PROJECT&amp;function_code=PRJ501"/>
<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"/>
......
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