Commit 15233c0c authored by niminmin's avatar niminmin

Merge branch 'feature/报表及线上问题对应' into develop

# Conflicts:
#	src/main/webapp/modules/cont/CON500/con_doc_batch_create.lsc
parents 00479ad3 9981eb86
Pipeline #5764 canceled with stages
package leaf.plugin.word2pdf;
import java.io.*;
import com.aspose.cells.Workbook;
import com.aspose.slides.Presentation;
import com.aspose.slides.SaveFormat;
import com.aspose.words.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class AsposeUtil {
private static final Logger logger = LoggerFactory.getLogger(AsposeUtil.class);
//校验license
private static boolean judgeLicense() {
boolean result = false;
try {
InputStream is = AsposeUtil.class.getClassLoader().getResourceAsStream("license.xml");
License aposeLic = new License();
aposeLic.setLicense(is);
result = true;
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
// 转换
public static void trans(String filePath, String pdfPath, String type) {
if (!judgeLicense()) {
logger.error("error","license错误");
}
try {
logger.info("as开始:" + filePath);
long old = System.currentTimeMillis();
File file = new File(pdfPath);
if (file.exists()) {
file.delete();
}
toPdf(file, filePath, type);
long now = System.currentTimeMillis();
logger.info("完成:" + pdfPath);
logger.info("共耗时:" + ((now - old) / 1000.0) + "秒");
} catch (Exception e) {
logger.error("pdf转换失败", e);
}
}
private static void toPdf(File file, String filePath, String type) {
if ("word".equals(type) || "txt".equals(type)) {
wordofpdf(file, filePath);
} else if ("excel".equals(type)) {
exceOfPdf(file, filePath);
} else if ("ppt".equals(type)) {
pptofpdf(file, filePath);
}else{
logger.error("error", "暂不支持该类型:"+type);
}
}
private static void wordofpdf(File file, String filePath) {
FileOutputStream os = null;
Document doc;
try {
os = new FileOutputStream(file);
doc = new Document(filePath);
doc.save(os, com.aspose.words.SaveFormat.PDF);
} catch (Exception e) {
logger.error("pdf转换失败", e);
} finally {
try {
os.close();
} catch (IOException e) {
logger.error("pdf转换失败", e);
}
}
}
private static void exceOfPdf(File file, String filePath) {
FileOutputStream os = null;
try {
os = new FileOutputStream(file);
Workbook wb = new Workbook(filePath);
wb.save(os, com.aspose.cells.SaveFormat.PDF);
} catch (Exception e) {
logger.error("pdf转换失败", e);
} finally {
try {
os.close();
} catch (IOException e) {
logger.error("pdf转换失败", e);
}
}
}
private static void pptofpdf(File file, String filePath) {
FileOutputStream os = null;
try {
os = new FileOutputStream(file);
Presentation pres = new Presentation(filePath);// 输入pdf路径
pres.save(os, SaveFormat.Pdf);
} catch (Exception e) {
logger.error("pdf转换失败", e);
} finally {
try {
os.close();
} catch (IOException e) {
logger.error("pdf转换失败", 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");
// trans("D:\\u01\\hls_file\\excel\\8F5D12B0B1504518928FDD193C67A0A5con28168",
// "D:\\hand-Prpjects\\融资租赁合同文本-5pdf.pdf","word");
// 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");
}
}
package leaf.plugin.word2pdf;
public class Test {
public static void testWord(String path_word, String pafpath) throws Exception {
String word1 = path_word + "01正方数字.docx";
String word2 = path_word + "02正方数字.docx";
String word3 = path_word + "03正方数字.doc";
String word4 = path_word + "04正方数字.doc";
String word5 = path_word + "05正方数字.docx";
String word6 = path_word + "06正方数字.doc";
AsposeUtil.trans(word1, pafpath + "aspose-word-01测试.pdf","word");
AsposeUtil.trans(word2, pafpath + "aspose-word-02测试.pdf","word");
AsposeUtil.trans(word3, pafpath + "aspose-word-03测试.pdf","word");
AsposeUtil.trans(word4, pafpath + "aspose-word-04测试.pdf","word");
AsposeUtil.trans(word5, pafpath + "aspose-word-05测试.pdf","word");
AsposeUtil.trans(word6, pafpath + "aspose-word-06测试.pdf","word");
}
public static void testWord2(String path_word, String pafpath) throws Exception {
String word1 = path_word + "01.docx";
String word2 = path_word + "02.docx";
String word3 = path_word + "03.doc";
String word4 = path_word + "04.doc";
String word5 = path_word + "05.docx";
String word6 = path_word + "06.doc";
AsposeUtil.trans(word1, pafpath + "aspose-word-01.pdf","word");
AsposeUtil.trans(word2, pafpath + "aspose-word-02.pdf","word");
AsposeUtil.trans(word3, pafpath + "aspose-word-03.pdf","word");
AsposeUtil.trans(word4, pafpath + "aspose-word-04.pdf","word");
AsposeUtil.trans(word5, pafpath + "aspose-word-05.pdf","word");
AsposeUtil.trans(word6, pafpath + "aspose-word-06.pdf","word");
}
public static void testTxt(String path_word, String pafpath) throws Exception {
String txt1 = path_word + "01jvm.txt";
String txt2 = path_word + "02jvm.txt";
String txt3 = path_word + "03jvm.txt";
AsposeUtil.trans(txt1, pafpath + "aspose-txt-01测试.pdf","txt");
AsposeUtil.trans(txt2, pafpath + "aspose-txt-02测试.pdf","txt");
AsposeUtil.trans(txt3, pafpath + "aspose-txt-03测试.pdf","txt");
}
public static void testTxt2(String path_word, String pafpath) throws Exception {
String txt1 = path_word + "01jvm.txt";
String txt2 = path_word + "02jvm.txt";
String txt3 = path_word + "03jvm.txt";
AsposeUtil.trans(txt1, pafpath + "aspose-txt-01.pdf","txt");
AsposeUtil.trans(txt2, pafpath + "aspose-txt-02.pdf","txt");
AsposeUtil.trans(txt3, pafpath + "aspose-txt-03.pdf","txt");
}
public static void testExcel(String path_word, String pafpath) throws Exception {
String txt1 = path_word + "01部门开发任务管理.xlsx";
String txt2 = path_word + "02部门开发任务管理.xlsx";
String txt3 = path_word + "03部门开发任务管理.xlsx";
AsposeUtil.trans(txt1, pafpath + "aspose-excel-01测试.pdf","txt");
AsposeUtil.trans(txt2, pafpath + "aspose-excel-02测试.pdf","txt");
AsposeUtil.trans(txt3, pafpath + "aspose-excel-03测试.pdf","txt");
}
public static void testExcel2(String path_word, String pafpath) throws Exception {
String txt1 = path_word + "01.xlsx";
String txt2 = path_word + "02.xlsx";
String txt3 = path_word + "03.xlsx";
AsposeUtil.trans(txt1, pafpath + "aspose-excel-01.pdf","txt");
AsposeUtil.trans(txt2, pafpath + "aspose-excel-02.pdf","txt");
AsposeUtil.trans(txt3, pafpath + "aspose-excel-03.pdf","txt");
}
public static void testPPt(String path_ppt, String pafpath) throws Exception {
String txt1 = path_ppt + "01jquery.pptx";
String txt2 = path_ppt + "02jquery.pptx";
String txt3 = path_ppt + "03jquery.ppt";
AsposeUtil.trans(txt1, pafpath + "aspose-ppt-01测试.pdf","ppt");
AsposeUtil.trans(txt2, pafpath + "aspose-ppt-02测试.pdf","ppt");
AsposeUtil.trans(txt3, pafpath + "aspose-ppt-03测试.pdf","ppt");
}
public static void testPPt2(String path_ppt, String pafpath) throws Exception {
String txt1 = path_ppt + "01jquery.pptx";
String txt2 = path_ppt + "02jquery.pptx";
String txt3 = path_ppt + "03jquery培训.ppt";
AsposeUtil.trans(txt1, pafpath + "aspose-ppt-01.pdf","ppt");
AsposeUtil.trans(txt2, pafpath + "aspose-ppt-02.pdf","ppt");
AsposeUtil.trans(txt3, pafpath + "aspose-ppt-03.pdf","ppt");
}
public static void winTest() throws Exception {
String path_word = "C:/Users/Administrator.DESKTOP-QN9A3AA/Desktop/office/测试文档/转换前文档/01word/";
String path_txt = "C:/Users/Administrator.DESKTOP-QN9A3AA/Desktop/office/测试文档/转换前文档/02txt/";
String path_excel = "C:/Users/Administrator.DESKTOP-QN9A3AA/Desktop/office/测试文档/转换前文档/03excel/";
String path_ppt = "C:/Users/Administrator.DESKTOP-QN9A3AA/Desktop/office/测试文档/转换前文档/04ppt/";
String pafpath = "C:/Users/Administrator.DESKTOP-QN9A3AA/Desktop/office/测试文档/pdf/";
System.out.println("************************");
testWord(path_word, pafpath);
System.out.println("************************");
testTxt(path_txt, pafpath);
System.out.println("************************");
testExcel(path_excel, pafpath);
System.out.println("************************");
testPPt(path_ppt, pafpath);
}
public static void LinuxTest() throws Exception {
String path_word = "/software/songyan/hah/01word/";
String path_txt = "/software/songyan/hah/02txt/";
String path_excel = "/software/songyan/hah/03excel/";
String path_ppt = "/software/songyan/hah/04ppt/";
String pafpath = "/software/songyan/hah/pdf/";
System.out.println("************************");
testWord(path_word, pafpath);
System.out.println("************************");
testTxt(path_txt, pafpath);
System.out.println("************************");
testExcel(path_excel, pafpath);
System.out.println("************************");
testPPt(path_ppt, pafpath);
}
public static void LinuxTest2() throws Exception {
String path_word = "/software/songyan/hah/01word/";
String path_txt = "/software/songyan/hah/02txt/";
String path_excel = "/software/songyan/hah/03excel/";
String path_ppt = "/software/songyan/hah/04ppt/";
String pafpath = "/software/songyan/hah/pdf/";
System.out.println("************************");
testWord2(path_word, pafpath);
System.out.println("************************");
testTxt2(path_txt, pafpath);
System.out.println("************************");
testExcel2(path_excel, pafpath);
System.out.println("************************");
testPPt2(path_ppt, pafpath);
}
public static void main(String[] args) throws Exception {
winTest();
}
}
\ No newline at end of file
......@@ -28,9 +28,10 @@ public class WordToPdf {
// 添加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;
jacobDllPath = webInfPath + "/server-script/jacob/" + jacobDllName;
System.setProperty("jacob.dll.path", jacobDllPath);
System.setProperty("com.jacob.debug", "true");
logger.info("加载的配置文件路径:" + jacobDllPath);
}
public static boolean word2pdf(String inFilePath, String outFilePath) {
......@@ -41,8 +42,11 @@ public class WordToPdf {
Dispatch doc = null;
boolean flag = false;
try {
ComThread.InitMTA();
app = new ActiveXComponent("Word.Application");
// logger.info("Word转PDF开始启动...234");
app.setProperty("Visible", new Variant(false));
// logger.info("Word转PDF开始启动...456");
Dispatch docs = app.getProperty("Documents").toDispatch();
logger.info("打开文档:" + inFilePath);
doc = Dispatch.invoke(
......@@ -64,7 +68,9 @@ public class WordToPdf {
logger.info("转换完成,用时:" + (end - start) + "ms");
flag = true;
} catch (Exception e) {
// logger.error("error",e);
logger.info("Word转PDF出错:" + e.getMessage());
// logger.info("Word转PDF出错:" + e.toString());
flag = false;
logger.info("关闭文档");
if (app != null) {
......@@ -168,6 +174,7 @@ public class WordToPdf {
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");
......
package leaf.plugin.word2pdf;
import com.artofsolving.jodconverter.DocumentConverter;
import com.artofsolving.jodconverter.openoffice.connection.OpenOfficeConnection;
import com.artofsolving.jodconverter.openoffice.connection.SocketOpenOfficeConnection;
import com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
public class doc2pdf2 {
private static final Logger logger = LoggerFactory.getLogger(doc2pdf2.class);
/**
* doc转pdf(程序启动openoffice)
*
* @param inFilePath 输入文件
* @param outFilePath 输出文件
* @return
*/
public static boolean doc2pdf2(String officePath, String inFilePath, String outFilePath) {
boolean result = false;
// 源文件目录
File inputFile = new File(inFilePath);
if (!inputFile.exists()) {
System.out.println("源文件不存在!");
return false;
}
// 输出文件目录
File outputFile = new File(outFilePath);
if (outputFile.exists()) {
outputFile.delete();
}
// OpenOffice的安装目录
// String OpenOffice_HOME = "C:/Program Files (x86)/OpenOffice 4";//G:/Program Files (x86)/OpenOffice
String OpenOffice_HOME = officePath;
if (OpenOffice_HOME.charAt(OpenOffice_HOME.length() - 1) != '/') {
OpenOffice_HOME += "/";
}
Process process = null;
try {
logger.info("Word转PDF开始启动...");
logger.info("Word转PDF开始启动..."+outFilePath);
// 启动OpenOffice的服务
String command = OpenOffice_HOME
+ "program/soffice.exe -headless -accept=\"socket,host=127.0.0.1,port=8100;urp;\"";
// System.out.println(command);
logger.info("Word转PDF开始启动...命令"+command);
process = Runtime.getRuntime().exec(command);
// 连接 OpenOffice实例,运行在8100端口
OpenOfficeConnection connection = new SocketOpenOfficeConnection("127.0.0.1", 8100);
connection.connect();
logger.info("Word转PDF开始启动...3232323");
// 转换
DocumentConverter converter = new OpenOfficeDocumentConverter(connection);
converter.convert(inputFile, outputFile);
// 关闭连接
connection.disconnect();
// 销毁OpenOffice服务的进程
process.destroy();
logger.info("****pdf转换成功,PDF输出:" + outputFile.getPath() + "****");
return true;
} catch (Exception e) {
logger.error("pdf转换失败", e);
} finally {
if (process != null) {
process.destroy();
}
}
return result;
}
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");
doc2pdf2("C:/Program Files (x86)/OpenOffice 4","D:\\u01\\hls_file\\excel\\1C676966F0684947A67356CDB537C45Ccon28167.docx",
"D:\\hand-Prpjects\\融资租赁合同文本-4pdf.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");
}
}
<License>
<Data>
<Products>
<Product>Aspose.Total for Java</Product>
<Product>Aspose.Words for Java</Product>
</Products>
<EditionType>Enterprise</EditionType>
<SubscriptionExpiry>20991231</SubscriptionExpiry>
<LicenseExpiry>20991231</LicenseExpiry>
<SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>
</Data>
<Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>
</License>
\ No newline at end of file
......@@ -64,6 +64,9 @@
<bm:field name="secondary_lease"/>
<bm:field name="vender_id"/>
<bm:field name="vender_id_n" expression="(select scv.bp_name from hls_bp_master scv where scv.enabled_flag=&apos;Y&apos; and scv.bp_id = t1.vender_id)" forInsert="false" forUpdate="false"/>
<bm:field name="pay_method"/>
<bm:field name="pay_method_n" expression="(select code_value_name from sys_code_values_v scv where scv.code=&apos;PAY_METHODS&apos; and scv.code_value = t1.pay_method)" forInsert="false" forUpdate="false"/>
<bm:field name="finance_type_n" expression="(select code_value_name from sys_code_values_v scv where scv.code=&apos;FINANCE_TYPE&apos; and scv.code_value = t1.finance_type)" forInsert="false" forUpdate="false"/>
</bm:fields>
......
......@@ -36,7 +36,8 @@
ct.contract_id = cc.contract_id
) to_file_name,
lt.pwd,
cc.content_id
cc.content_id,
t.templet_code
FROM
fnd_atm_attachment faa,
fnd_atm_attachment_multi m,
......@@ -69,5 +70,6 @@
<bm:field name="to_file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TO_FILE_NAME"/>
<bm:field name="pwd" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PWD"/>
<bm:field name="content_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTENT_ID"/>
<bm:field name="templet_code" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sf
$Date: 2019-01-14 16:29:48
$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 *
from SYS_ROLE_VL t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="role_id" queryOperator="="/>
</bm:query-fields>
</bm:model>
......@@ -16,9 +16,10 @@
</bm:parameters>
<bm:update-sql><![CDATA[
BEGIN
cus_con_et_pkg.calc_et_date_amount(p_contract_id => ${@contract_id},
cus_con_et_pkg.calc_et_date_amount(p_change_req_id =>${@change_req_id},
p_contract_id => ${@contract_id},
p_et_date => TO_DATE(${@termination_date},'yyyy-mm-dd'),
p_ET_FEE => ${@et_fee},
p_ET_FEE => ${@et_fee},
p_et_interest_rate => ${@et_interest_rate},
p_et_total_amount => ${@et_total_amount},
p_et_due_amount => ${@et_due_amount},
......
......@@ -5,7 +5,7 @@
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
......
<License>
<Data>
<Products>
<Product>Aspose.Total for Java</Product>
<Product>Aspose.Words for Java</Product>
</Products>
<EditionType>Enterprise</EditionType>
<SubscriptionExpiry>20991231</SubscriptionExpiry>
<LicenseExpiry>20991231</LicenseExpiry>
<SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>
</Data>
<Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>
</License>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: WangYu
$Date: 2014-4-25 上午09:30:21
$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 v.*,
--未收金额
(due_amount-received_amount) unreceived_amount
FROM (SELECT
t.contract_number,
(SELECT bp_name FROM hls_bp_master h WHERE h.bp_id=t.bp_id_tenant) bp_tenant_name,
(SELECT H.extra_nam FROM hls_bp_master h WHERE h.bp_id=t.bp_id_agent_level1) agent_extra_name,
to_char(t.lease_start_date, 'yyyy-mm-dd') lease_start_date,
ccli.machine_number,
ccli.modelcd,
( ccc.times||(SELECT ci.description FROM hls_cashflow_item ci WHERE ci.cf_item=ccc.cf_item) ) times,
to_char(ccc.due_date, 'yyyy-mm-dd') due_date,
(NVL(t.int_rate_display, 0) * 100 || '%') int_rate_display, --利率
--应收款金额
(ccc.due_amount - NVL((SELECT SUM(cwo.write_off_due_amount) FROM csh_transaction t,csh_write_off cwo
WHERE cwo.cashflow_id=ccc.cashflow_id
AND t.transaction_id=cwo.csh_transaction_id
AND NVL(cwo.reversed_flag,'N')='N'
AND TRUNC(T.transaction_date) <=TRUNC(to_date(${@before_end},'yyyy-mm-dd'))),0))due_amount,
--已收款金额
NVL((SELECT SUM(cwo.write_off_due_amount) FROM csh_transaction t,csh_write_off cwo
WHERE cwo.cashflow_id=ccc.cashflow_id
AND t.transaction_id=cwo.csh_transaction_id
AND NVL(cwo.reversed_flag,'N')='N'
AND TRUNC(T.transaction_date) >= TRUNC(to_date(${@cur_begin},'yyyy-mm-dd'))
AND TRUNC(T.transaction_date) <= TRUNC(to_date(${@cur_end},'yyyy-mm-dd'))
),0) received_amount,
--相减
--逾期日
(
CASE
WHEN (ccc.due_amount- NVL((SELECT SUM(cwo.write_off_due_amount) FROM csh_transaction t,csh_write_off cwo
WHERE cwo.cashflow_id=ccc.cashflow_id
AND t.transaction_id=cwo.csh_transaction_id
AND NVL(cwo.reversed_flag,'N')='N'
AND TRUNC(T.transaction_date) <= TRUNC(to_date(${@cur_end},'yyyy-mm-dd'))
),0)) >0 THEN
FLOOR(TO_date(${@cur_end},'yyyy-mm-dd')-ccc.due_date)
ELSE
0
END
) overdue_days,
--保证金
NVL((select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
from csh_transaction tt
where tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
AND NVL(tt.reversed_flag,'N')='N'
and tt.ref_contract_id = T.contract_id),0) deposit_amount
from con_contract_cashflow ccc,con_contract t,con_contract_lease_item ccli
WHERE ccc.contract_id=t.contract_id
AND ccli.contract_id(+)=t.contract_id
AND ccc.cf_item IN (1,8,200)
AND ((t.contract_status ='INCEPT'
AND ((TRUNC(ccc.due_date)<=TRUNC(to_date(${@before_end},'yyyy-mm-dd'))
AND ccc.due_amount > NVL((SELECT SUM(cwo.write_off_due_amount) FROM csh_transaction t,csh_write_off cwo
WHERE cwo.cashflow_id=ccc.cashflow_id
AND t.transaction_id=cwo.csh_transaction_id
AND NVL(cwo.reversed_flag,'N')='N'
AND TRUNC(T.transaction_date) <=TRUNC(to_date(${@before_end},'yyyy-mm-dd'))),0)
)
OR(
TRUNC(ccc.due_date)<=TRUNC(to_date(${@cur_end},'yyyy-mm-dd')) AND TRUNC(ccc.due_date) > TRUNC(to_date(${@before_end},'yyyy-mm-dd'))
))) or( t.contract_status ='TERMINATE' and exists (select 1 from csh_transaction t,csh_write_off cwo WHERE cwo.cashflow_id=ccc.cashflow_id
AND t.transaction_id=cwo.csh_transaction_id
AND NVL(cwo.reversed_flag,'N')='N'
and TRUNC(T.transaction_date) > TRUNC(to_date(${@before_end},'yyyy-mm-dd')))))
order by t.contract_id
) v
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
rpt5012_rental_balance_pkg.rental_balance_insert(
p_month =>${@month},
p_user_id =>${/session/@user_id},
p_batch_id =>${@batch_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="agent_extra_name"/>
<bm:field name="bp_tenant_name"/>
<bm:field name="contract_number"/>
<bm:field name="lease_start_date"/>
<bm:field name="modelcd"/>
<bm:field name="machine_number"/>
<bm:field name="int_rate_display"/>
<bm:field name="times"/>
<bm:field name="due_date"/>
<bm:field name="due_amount"/>
<bm:field name="received_amount"/>
<bm:field name="unreceived_amount"/>
<bm:field name="overdue_days"/>
<bm:field name="deposit_amount"/>
</bm:fields>
<!-- <bm:query-fields>-->
<!-- <bm:query-field field="bp_id_tenant_n" queryExpression="t1.bp_id_tenant_n = ${@bp_id_tenant_n}"/>-->
<!-- <bm:query-field field="account_name" queryExpression="t1.account_name = ${@account_name}"/>-->
<!-- <bm:query-field field="account_id_n" queryExpression="t1.account_id_n = ${@account_id_n}"/>-->
<!-- </bm:query-fields>-->
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: WangYu
$Date: 2014-4-25 上午09:30:21
$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
(SELECT m.extra_nam
FROM hls_bp_master m
WHERE m.bp_id = ct.bp_id_agent_level1) agent_extra_name, --代理店简称
(SELECT m.bp_name FROM hls_bp_master m WHERE m.bp_id = ct.bp_id_tenant) AS bp_tenant_name, --承租人名称
ct.contract_number, --合同编号
to_char(ct.lease_start_date, 'yyyy-mm-dd') lease_start_date, --租赁期开始日
(SELECT ccli.modelcd
FROM con_contract_lease_item ccli
WHERE ccli.contract_id = ct.contract_id) modelcd, --机型
(SELECT i.machine_number
FROM con_contract_lease_item i
WHERE i.contract_id = ct.contract_id
AND i.equipment_type = 'MAIN') machine_number, --机号
(NVL(ct.int_rate_display, 0) * 100 || '%') int_rate_display, --利率
ct.lease_times, --租赁期间
(NVL(ct.down_payment_ratio, 0) * 100 || '%') down_payment_ratio, --首付比例
ct.lease_item_amount as lease_item_amount, --设备款
NVL(ct.residual_value, 0) residual_amount, --留购金
NVL(ct.total_rental, 0) + NVL(ct.down_payment, 0) +
NVL(ct.residual_value, 0) contract_amount, --合同金额
NVL(ct.down_payment, 0) down_payment, --首付款
(case when ct.contract_status='TERMINATE' then
0 else
((select sum(ccw.due_amount)
from con_contract_cashflow ccw
where ccw.contract_id = ct.contract_id
and ccw.cf_item in (1, 200)) -
nvl((select sum(nvl(cw.write_off_due_amount, 0))
from csh_transaction cn, csh_write_off cw
where cw.csh_transaction_id = cn.transaction_id
and cw.cf_item in (1, 200)
and cw.contract_id = ct.contract_id
and NVL(cw.reversed_flag,'N')='N'
and trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end},'yyyy-mm-dd'))),
0))
end )month_due_amount, --当月末应收款余额(合计)
(case when ct.contract_status='TERMINATE' then
0 else
((select sum(ccw.principal)
from con_contract_cashflow ccw
where ccw.contract_id = ct.contract_id
and ccw.cf_item in (1, 200)) -
nvl((select sum(nvl(cw.write_off_principal, 0))
from csh_transaction cn, csh_write_off cw
where cw.csh_transaction_id = cn.transaction_id
and cw.cf_item in (1, 200)
and cw.contract_id = ct.contract_id
and NVL(cw.reversed_flag,'N')='N'
and trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end},'yyyy-mm-dd'))),
0))
end) month_due_principal, --当月末本金余额(合计)
(case when ct.contract_status='TERMINATE' then
0 else
((select sum(ccw.interest)
from con_contract_cashflow ccw
where ccw.contract_id = ct.contract_id
and ccw.cf_item in (1, 200)) -
nvl((select sum(nvl(cw.write_off_interest, 0))
from csh_transaction cn, csh_write_off cw
where cw.csh_transaction_id = cn.transaction_id
and cw.cf_item in (1, 200)
and cw.contract_id = ct.contract_id
and NVL(cw.reversed_flag,'N')='N'
and trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end},'yyyy-mm-dd'))),
0)) end ) month_interest, --当月末利息余额(合计)
(case when ct.contract_status='TERMINATE' then
0 else
((select sum(ccw.due_amount)
from con_contract_cashflow ccw
where ccw.contract_id = ct.contract_id
and ccw.cf_item in (8)) -
nvl((select sum(nvl(cw.write_off_due_amount, 0))
from csh_transaction cn, csh_write_off cw
where cw.csh_transaction_id = cn.transaction_id
and cw.cf_item in (8)
and cw.contract_id = ct.contract_id
and NVL(cw.reversed_flag,'N')='N'
and trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end},'yyyy-mm-dd'))),
0)) end ) month_residual, --当月末留购金余额
(case when ct.contract_status='TERMINATE' then
0 else
con_contract_pkg.get_business_times(p_contract_id => ct.contract_id,
p_calc_date => to_date(${@cur_end},'yyyy-mm-dd'),
p_contract_inception_date => ct.contract_inception_date) end) business_due_times, --逾期期数
(case when ct.contract_status='TERMINATE' then
0 else
(nvl((select sum(ccw.due_amount)-sum(nvl((SELECT SUM(nvl(cwo.write_off_due_amount, 0))
FROM csh_write_off cwo, csh_transaction cn
WHERE nvl(cwo.reversed_flag, 'N') = 'N'
AND cwo.contract_id = ccw.contract_id
AND cwo.times = ccw.times
and cwo.csh_transaction_id = cn.transaction_id
AND cwo.cf_item = ccw.cf_item
and trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
from con_contract_cashflow ccw
where ccw.contract_id =ct.contract_id
and ccw.cf_item in (1, 200, 8)
and trunc(ccw.due_date) <= trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),0)
-nvl((select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
from csh_transaction tt
where tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
and tt.ref_contract_id = ct.contract_id),0)) end ) business_due_amount, --当月末逾期金额(合计)
(select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
from csh_transaction tt
where tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
and tt.ref_contract_id = ct.contract_id) deposit_amount, --保证金金额
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'CON500_CONTRACT_STATUS'
AND v.code_value = ct.contract_status) AS contract_status_n, --合同金额
(select to_char(due_date, 'yyyy-mm-dd')
from con_contract_cashflow
where contract_id = ct.contract_id
and cf_item = 8) residual_date ,-- 合同终了
to_char(ct.et_date, 'yyyy-mm-dd') terminate_date
from con_contract ct
where ct.contract_status not in ('CANCEL')
order by ct.bp_id_agent_level1
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
rpt5012_rental_balance_pkg.rental_balance_insert(
p_month =>${@month},
p_user_id =>${/session/@user_id},
p_batch_id =>${@batch_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
rpt5012_rental_balance_pkg.get_month_date(
p_month =>${@month},
p_cur_begin =>${@cur_begin},
p_cur_end =>${@cur_end},
p_before_begin =>${@before_begin},
p_before_end =>${@before_end}
);
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="cur_begin" dataType="date" input="true" output="true"
outputPath="/parameter/@cur_begin"/>
<bm:parameter name="cur_end" dataType="date" input="true" output="true"
outputPath="/parameter/@cur_end"/>
<bm:parameter name="before_begin" dataType="date" input="true" output="true"
outputPath="/parameter/@before_begin"/>
<bm:parameter name="before_end" dataType="date" input="true" output="true"
outputPath="/parameter/@before_end"/>
</bm:parameters>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="agent_extra_name"/>
<bm:field name="bp_tenant_name"/>
<bm:field name="contract_number"/>
<bm:field name="lease_start_date"/>
<bm:field name="modelcd"/>
<bm:field name="machine_number"/>
<bm:field name="int_rate_display"/>
<bm:field name="lease_times"/>
<bm:field name="down_payment_ratio"/>
<bm:field name="lease_item_amount"/>
<bm:field name="residual_amount"/>
<bm:field name="contract_amount"/>
<bm:field name="down_payment"/>
<bm:field name="month_due_amount"/>
<bm:field name="month_due_principal"/>
<bm:field name="month_interest"/>
<bm:field name="month_residual"/>
<bm:field name="business_due_times"/>
<bm:field name="business_due_amount"/>
<bm:field name="deposit_amount"/>
<bm:field name="contract_status_n"/>
<bm:field name="residual_date"/>
<bm:field name="terminate_date"/>
</bm:fields>
<!-- <bm:query-fields>-->
<!-- <bm:query-field field="bp_id_tenant_n" queryExpression="t1.bp_id_tenant_n = ${@bp_id_tenant_n}"/>-->
<!-- <bm:query-field field="account_name" queryExpression="t1.account_name = ${@account_name}"/>-->
<!-- <bm:query-field field="account_id_n" queryExpression="t1.account_id_n = ${@account_id_n}"/>-->
<!-- </bm:query-fields>-->
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: WangYu
$Date: 2014-4-25 上午09:30:21
$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 t.*
from con_rental_balance_rpt t
where t.month = ${@month}
order by t.contract_id desc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
rpt5012_rental_balance_pkg.rental_balance_insert(
p_month =>${@month},
p_user_id =>${/session/@user_id},
p_batch_id =>${@batch_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="agent_extra_name"/>
<bm:field name="bp_tenant_name"/>
<bm:field name="contract_number"/>
<bm:field name="lease_start_date"/>
<bm:field name="modelcd"/>
<bm:field name="machine_number"/>
<bm:field name="int_rate_diaplay"/>
<bm:field name="lease_times"/>
<bm:field name="down_payment_ratio"/>
<bm:field name="lease_item_amount"/>
<bm:field name="residual_amount"/>
<bm:field name="contract_amount"/>
<bm:field name="down_payment"/>
<bm:field name="month_due_amount"/>
<bm:field name="month_due_principal"/>
<bm:field name="month_interest"/>
<bm:field name="month_residual"/>
<bm:field name="business_due_times"/>
<bm:field name="business_due_amount"/>
<bm:field name="deposit_amount"/>
<bm:field name="contract_status_n"/>
<bm:field name="residual_date"/>
<bm:field name="terminate_date"/>
</bm:fields>
<!-- <bm:query-fields>-->
<!-- <bm:query-field field="bp_id_tenant_n" queryExpression="t1.bp_id_tenant_n = ${@bp_id_tenant_n}"/>-->
<!-- <bm:query-field field="account_name" queryExpression="t1.account_name = ${@account_name}"/>-->
<!-- <bm:query-field field="account_id_n" queryExpression="t1.account_id_n = ${@account_id_n}"/>-->
<!-- </bm:query-fields>-->
</bm:model>
<?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="query">
<bm:query-sql><![CDATA[
select to_char(add_months(to_date(${@month}, 'YYYYMM'), 0), 'MM')cur,
to_char(add_months(to_date(${@month}, 'YYYYMM'), -1), 'MM')befor1,
to_char(add_months(to_date(${@month}, 'YYYYMM'), -2), 'MM')befor2,
to_char(add_months(to_date(${@month}, 'YYYYMM'), -3), 'MM')befor3,
to_char(add_months(to_date(${@month}, 'YYYYMM'), -4), 'MM')befor4,
to_char(add_months(to_date(${@month}, 'YYYYMM'), -5), 'MM')befor5,
to_char(add_months(to_date(${@month}, 'YYYYMM'), -1), 'MM')||'月底三期机器分类情况明细表' befor_title,
to_char(add_months(to_date(${@month}, 'YYYYMM'), 0), 'MM')||'月底逾期期次' cur_overdue_times,
to_char(add_months(to_date(${@month}, 'YYYYMM'), 0), 'MM')||'月小时数' cur_hour,
to_char(add_months(to_date(${@month}, 'YYYYMM'), -1), 'MM')||'月小时数' befor1_hour,
to_char(add_months(to_date(${@month}, 'YYYYMM'), -2), 'MM')||'月小时数' befor2_hour,
to_char(add_months(to_date(${@month}, 'YYYYMM'), 0), 'MM')||'月实收金额' cur_amount,
to_char(add_months(to_date(${@month}, 'YYYYMM'), -1), 'MM')||'月实收金额' befor1_amount,
to_char(add_months(to_date(${@month}, 'YYYYMM'), -2), 'MM')||'月实收金额' befor2_amount,
to_char(add_months(to_date(${@month}, 'YYYYMM'), -3), 'MM')||'月实收金额' befor3_amount,
to_char(add_months(to_date(${@month}, 'YYYYMM'), -4), 'MM')||'月实收金额' befor4_amount,
to_char(add_months(to_date(${@month}, 'YYYYMM'), -5), 'MM')||'月实收金额' befor5_amount
from dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters><![CDATA[
]]></bm:data-filters>
</bm:model>
......@@ -16,6 +16,7 @@
}
]]></script>
<a:dataSets>
<a:dataSet id="pay_methods_ds" lookupCode="PAY_METHODS"/>
<a:dataSet id="con202_withway_ds" lookupCode="WITHHOLD_WAYS"/>
<a:dataSet id="secondary_lease_ds" lookupCode="SECONDARY_LEASE"/>
<a:dataSet id="con202_finance_type" lookupCode="FINANCE_TYPE"/>
......@@ -31,7 +32,7 @@
<a:dataSet id="con_basic_clause_detail_ds" autoQuery="true" model="cont.CON202.con_contract_tmpt_clause_main" queryUrl="${/request/@context_path}/autocrud/cont.CON202.con_contract_tmpt_clause_main/query?tmpt_id=${/parameter/@tmpt_id}" selectable="true">
<a:fields>
<a:field name="withhold_way_n" displayField="code_value_name" options="con202_withway_ds" returnField="withhold_way" valueField="code_value"/>
<a:field name="pay_method_n" displayField="code_value_name" options="pay_methods_ds" returnField="pay_method" valueField="code_value"/>
<a:field name="secondary_lease_n" displayField="code_value_name" options="secondary_lease_ds" returnField="secondary_lease" valueField="code_value"/>
<a:field name="finance_type"/>
<a:field name="finance_type_n" displayField="code_value_name" options="con202_finance_type" returnField="finance_type" valueField="code_value"/>
......@@ -115,7 +116,9 @@
</a:toolBar>
<a:columns>
<a:column name="contract_number" editor="lov" prompt="合同编号" width="100"/>
<a:column name="withhold_way_n" editor="cb" prompt="代扣方式"/>
<!-- <a:column name="withhold_way_n" editor="cb" prompt="代扣方式"/>-->
<a:column name="pay_method_n" editor="cb" prompt="支付方式"/>
<a:column name="bp_category_n" editor="lov" prompt="商业伙伴类型" width="100"/>
<a:column name="vender_id_n" editor="lov" prompt="厂商" width="100"/>
<a:column name="secondary_lease_n" editor="cb" prompt="二次租赁" width="100"/>
......
......@@ -132,9 +132,10 @@
if (!Leaf.isEmpty(temp[0])) {
var file_name = temp[0].toUpperCase();
var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_name.indexOf('.PDF') >= 0) {
url = url + '<a href=javascript:view_pdf(\'' + temp[1] + '\')>' + temp[0] + '</a>' + ',';
} else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
// if (file_name.indexOf('.PDF') >= 0) {
// url = url + '<a href=javascript:view_pdf(\'' + temp[1] + '\')>' + temp[0] + '</a>' + ',';
// } else
if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
url = url + '<a href=' + link + temp[1] + ' ref="img">' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
......@@ -504,6 +505,7 @@
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_update_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
price_list: price_list,
document_category: 'CONTRACT',
......@@ -516,7 +518,8 @@
global_flag: 'Y',
id_num: 1,
calc_type: calc_type,
recreate_L_formula: 'N'
recreate_L_formula: 'Y',
recreate_H_formula:'Y'
},
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl(),
fullScreen: true,
......
......@@ -10,22 +10,22 @@
importPackage(Packages.org.apache.commons.io);
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);
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();
}
fis.close();
fos.close();
}
//删除文件
//删除文件
function deleteFile(filePath) {
var file = new File(filePath);
if (file.exists()) {
file.delete();
}
var file = new File(filePath);
if (file.exists()) {
file.delete();
}
}
//生成pdf
......@@ -37,7 +37,7 @@
//删除word文件
// deleteFile(word_file_path);
return pdf_file_path_new;
return pdf_file_path_new;
}
//生成pdf openoffice
function doc2pdf(word_file_path,pdf_file_path) {
......
......@@ -49,9 +49,10 @@
//按日期创建目录
function getDatePath() {
set_parameter_file_path();
var file_path = $ctx.parameter.pdf_path; //file_path = c:/hls_test_files/content_files/
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
......@@ -122,31 +123,13 @@
} catch (e) {
raise_app_error(e);
}
// word转pdf
var pdf_file_path=to_file_path;
var outputfilepath = wordToPdf(to_file_path,pdf_file_path);
var outputfilename= record_data.to_file_name +'.pdf';
var pdf_file = new File(outputfilepath);
var file_size = 0;
if (pdf_file.exists()) {
file_size = pdf_file.length();
}
//保存文本名及路径
$bm('cont.CON500.con_file_content_copy_update').execute({
table_name: 'CON_CONTRACT_CONTENT',
content_id: record_data.content_id,
file_name: outputfilename.toString(),
file_path: outputfilepath.toString(),
file_size: file_size,
file_type_code: 'pdf',
mime_type: 'application/pdf',
user_id: $ctx.parameter.user_id
});
download_file(outputfilepath.toString(),outputfilename.toString());
$bm('cont.CON500.con_file_content_copy_update').update({
table_name: 'CON_CONTRACT_CONTENT',
content_id: record_data.content_id,
file_name: to_file_name.toString(),
file_path: to_file_path.toString()
});
download_file(to_file_path.toString(),to_file_name.toString());
}
}
......
......@@ -132,12 +132,24 @@
// var url = $('con_contract_change_req_link').getUrl() + '?xmlTemp=' + xmlTemp + '&fileName=' + fileName;
// window.open(url);
// };
//合同变更维护和查询功能那里,各个角色只能看到自己角色提交的变更申请
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'], 'con_contract');
if (ds == $(ds_id)) {
aut_authority_list_validate_query(ds, qpara);
}
//aut_authority_list_validate_query(ds, qpara);
var role_code='${/model/role_info/record/@role_code}';
if(role_code=='0007'){
$(ds_id).setQueryParameter('ccr_document_type', 'ACC_CHAG');
}else if(role_code=='0008'){
$(ds_id).setQueryParameter('ccr_document_type', 'LEASE_CHAG');
}
else if(role_code=='0019'){
$(ds_id).setQueryParameter('change_created_by', '${/session/@user_id}');
}
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
......@@ -4,7 +4,9 @@
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script"
customizationEnabled="true" dynamiccreateenabled="true" trace="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:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
......@@ -161,7 +163,18 @@
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'], 'con_contract');
if (ds == $(ds_id)) {
aut_authority_list_validate_query(ds, qpara);
//aut_authority_list_validate_query(ds, qpara);
var role_code='${/model/role_info/record/@role_code}';
if(role_code=='0007'){
$(ds_id).setQueryParameter('ccr_document_type', 'ACC_CHAG');
}else if(role_code=='0008'){
$(ds_id).setQueryParameter('ccr_document_type', 'LEASE_CHAG');
}
else if(role_code=='0019'){
$(ds_id).setQueryParameter('change_created_by', '${/session/@user_id}');
}
}
};
]]></script>
......
......@@ -7,7 +7,9 @@
-->
<a:screen xmlns:s="leaf.plugin.script" 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.role_id=${/session/@role_id}" fetchAll="true" model="cont.CON733.query_roles_info" rootPath="role_code"/>
</a:init-procedure>
<a:view>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
......@@ -19,6 +21,34 @@
<a:link id="con_contract_change_req_link"
url="${/request/@context_path}/modules/cont/CON701/con_contract_et_print.lsc"/>
<script type="text/javascript"><![CDATA[
//合同变更创建:营业内勤只能选到回款账户变更,
// 债权担当只能选到承租人变更,
// 代理店下级只能选到租金计划变更;
Leaf.onReady(function(){
var role_code='${/model/role_code/record/@role_code}';
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_change_req');
var head_record = $(ds_id).getAt(0);
if(head_record){
if(role_code=='0007'){
head_record.set('ccr_document_type','ACC_CHAG');
head_record.set('ccr_document_type_n','回款账户变更');
head_record.getField('ccr_document_type').setReadOnly(true);
head_record.getField('ccr_document_type_n').setReadOnly(true);
}else if(role_code=='0008'){
head_record.set('ccr_document_type','LEASE_CHAG');
head_record.set('ccr_document_type_n','承租人变更');
head_record.getField('ccr_document_type').setReadOnly(true);
head_record.getField('ccr_document_type_n').setReadOnly(true);
}
else if(role_code=='0019'){
head_record.set('ccr_document_type','CUT_CHAG');
head_record.set('ccr_document_type_n','租金计划变更');
head_record.getField('ccr_document_type').setReadOnly(true);
head_record.getField('ccr_document_type_n').setReadOnly(true);
}
}
});
function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
......
......@@ -30,6 +30,7 @@
Leaf.request({
url: $('con_et001_calc_et_date_amount_link').getUrl(),
para: {
change_req_id:record.get('change_req_id'),
contract_id: record.get('contract_id'),
termination_date: value,
et_fee:record.get('et_fee'),
......@@ -56,7 +57,7 @@
record.set('penalty', '');
record.set('fund_possession_time','');
record.set('fund_possession_cost','');
record.set('fund_possession_rate','');
//record.set('fund_possession_rate','');
record.set('last_rent_due_date','');
record.set('sum_unreceived_principal','');
},
......@@ -68,7 +69,7 @@
record.set('penalty', '');
record.set('fund_possession_time','');
record.set('fund_possession_cost','');
record.set('fund_possession_rate','');
//record.set('fund_possession_rate','');
record.set('last_rent_due_date','');
record.set('sum_unreceived_principal','');
},
......@@ -99,10 +100,10 @@
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
$('${/parameter/@layout_code}_submit_approval').disable();
$('${/parameter/@layout_code}_save').disable();
$('${/parameter/@layout_code}_user_button1').disable();
$('${/parameter/@layout_code}_user_button3').disable();
//$('${/parameter/@layout_code}_submit_approval').disable();
//$('${/parameter/@layout_code}_save').disable();
// $('${/parameter/@layout_code}_user_button1').disable();
// $('${/parameter/@layout_code}_user_button3').disable();
//setTimeout(window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](con_repo001_submit), 2000);
// window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](con_repo001_submit);
con_repo001_submit();
......@@ -112,6 +113,10 @@
};
function con_repo001_submit() {
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认提交审批?', function () {
$('${/parameter/@layout_code}_submit_approval').disable();
//$('${/parameter/@layout_code}_save').disable();
// $('${/parameter/@layout_code}_user_button1').disable();
// $('${/parameter/@layout_code}_user_button3').disable();
var req_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract_change_req');
var req_record = $(req_ds_id).getAt(0);
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
......@@ -215,8 +220,9 @@
//取消变更
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
$('${/parameter/@layout_code}_user_button3').disable(); //按钮不可用
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认取消变更?', function() {
$('${/parameter/@layout_code}_user_button3').disable(); //按钮不可用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('con_et002_cancel_link').getUrl(),
......
......@@ -54,7 +54,7 @@
}
]]></style>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<a:screen-include screen="${/request/@context_path}/modules/hls/HLS500/hls_fin_calculator_dynamic.lview?calc_session_id=${/parameter/@calc_session_id}&amp;calc_type=CLASSIC_CALCULATOR&amp;document_category=${/parameter/@document_category}&amp;winId=${/parameter/@winId}"/>
<a:screen-include screen="modules/hls/HLS500/hls_fin_calculator_dynamic.lview?calc_session_id=${/parameter/@calc_session_id}&amp;calc_type=CLASSIC_CALCULATOR&amp;document_category=${/parameter/@document_category}&amp;winId=${/parameter/@winId}"/>
<script type="text/javascript"><![CDATA[
var formula_column_name = '';
var formula_column_code = '';
......@@ -1107,18 +1107,35 @@
}
}
//均等计算合并计算按钮一起
function hls_hls500_JD() {
debugger;
hls_hls500_save_new(calc_execute_JD_new, 'CALC');
}
//不均等
function hls_hls500_NJD() {
hls_hls500_save_new(calc_execute_NJD_new, 'CALC');
}
//add by syj 单变量求解
function hls_hls500_user_button1() {
debugger;
flag = 'Y';
lock_calc_current_window();
// lock_calc_current_window();
Leaf.request({
url: $('hls_fin_calc_single_variable_manual_link_id').getUrl(),
para: {
calc_session_id: '${/parameter/@calc_session_id}',
contract_id:'${/parameter/@document_id}'
},
success: function() {
success: function(res) {
get_warning_message();
if('${/parameter/@document_category}'=='CONTRACT'){
$('CON_BUYBACK_02_G_QUOTATION_04_con_contract_cashflow_ds').query();
}
......@@ -1135,9 +1152,8 @@
}
function hls_hls500_save_new(nextStep, source_procedure) {
lock_calc_current_window('${l:HLS.SAVING}');
debugger;
lock_calc_current_window('${l:HLS.CALCULATING}');
if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) {
unlock_calc_current_window();
return;
......@@ -1175,8 +1191,6 @@
function hls_hls500_user_button2() {
flag = 'Y';
lock_calc_current_window();
Leaf.request({
url: $('hls_fin_calc_single_variable_manual_link_id').getUrl(),
para: {
......@@ -1184,6 +1198,7 @@
contract_id:'${/parameter/@document_id}'
},
success: function() {
get_warning_message();
if('${/parameter/@document_category}'=='CONTRACT'){
$('CON_BUYBACK_02_G_QUOTATION_04_con_contract_cashflow_ds').query();
}
......@@ -1201,7 +1216,7 @@
}
function calc_execute_JD_new(source_procedure) {
debugger;
var final_recreate_H_formula, final_recreate_L_formula;
if (source_procedure == 'RE_CALC') {
final_recreate_H_formula = 'Y';
......@@ -1209,6 +1224,7 @@
} else {
final_recreate_H_formula = recreate_H_formula;
final_recreate_L_formula = recreate_L_formula;
}
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calculator_calc/update',
......@@ -1276,19 +1292,6 @@
}
//均等计算合并计算按钮一起
function hls_hls500_JD() {
hls_hls500_save_new(calc_execute_JD_new, 'CALC');
}
//不均等
function hls_hls500_NJD() {
hls_hls500_save_new(calc_execute_NJD_new, 'CALC');
}
]]></script>
<a:dataSets>
<a:placeHolder id="dynamicDataSet_left_id"/>
......@@ -1339,7 +1342,7 @@
</a:fields>
<a:events>
<a:event name="update" handler="do_hls500_head_update"/>
<!--<a:event name="load" handler="onEditorHdload"/>-->
<a:event name="load" handler="onEditorHdload"/>
</a:events>
</a:dataSet>
<a:dataSet id="hls_fin_calculator_ln_ds" autoQuery="true" bindName="ln_calc_bind_name" bindTarget="hls_fin_cal_save_hd_ds" fetchAll="true" processfunction="hls500_ln_process" queryUrl="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_base_query.lsc?calc_session_id=${/parameter/@calc_session_id}&amp;ln_table_flag=Y" selectable="true">
......
......@@ -72,21 +72,21 @@
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_repo_change_link', ds_id);
};
//回购解除协议打印
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var prj_project_result_ds = $(ds_id);
var records = prj_project_result_ds.getSelected();
if (records.length != 1) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
return false;
}
var record = records[0];
var contract_id = record.get('contract_id');
var templet_code = 'CON_GRANT_DEDUCT';
var url = $('con_grant_deduct_print_link').getUrl() + '?contract_id=' + contract_id + '&templet_code=' + templet_code;
window.open(url, '_self');
};
// //回购解除协议打印
// window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
// var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
// var prj_project_result_ds = $(ds_id);
// var records = prj_project_result_ds.getSelected();
// if (records.length != 1) {
// Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
// return false;
// }
// var record = records[0];
// var contract_id = record.get('contract_id');
// var templet_code = 'CON_GRANT_DEDUCT';
// var url = $('con_grant_deduct_print_link').getUrl() + '?contract_id=' + contract_id + '&templet_code=' + templet_code;
// window.open(url, '_self');
// };
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) { //查询权限
......
......@@ -120,6 +120,10 @@
return 'color:red';
}
}
function indexChangeFunction(ds, record){
$('csh_write_off_lov_ds').setQueryParameter('contract_id',record.get('contract_id'));
}
]]></script>
<a:dataSets>
......@@ -141,7 +145,11 @@
</a:fields>
</a:dataSet>
<a:dataSet id="csh_lov_con_contract_ds" selectable="true" autoQuery="true" selectionModel="single"
model="csh.CSH531N.con_contract" queryDataSet="csh_query_con_ds"/>
model="csh.CSH531N.con_contract" queryDataSet="csh_query_con_ds">
<a:events>
<a:event name="indexchange" handler="indexChangeFunction"/>
</a:events>
</a:dataSet>
<a:dataSet id="csh_write_off_lov_ds" fetchAll="true" bindTarget="csh_lov_con_contract_ds"
bindName="csh_con_cf" selectable="true" selectionModel="multiple"
model="csh.CSH531N.csh_con_contract_cashflow" queryDataSet="csh_query_cf_ds"
......
......@@ -70,12 +70,25 @@
Leaf.Masker.unmask(body);
return;
}
var H1;
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0;i < temp_head_records.length;i++) {
if (!$('temp_hd_attribute_ds').find('column_code', temp_head_records[i].get('column_code'))) {
$('temp_hd_attribute_ds').create(temp_head_records[i].data);
}
if (temp_head_records[i].get('column_code') == 'H1') {
H1 = temp_head_records[i].get('column_value') || 0;
}
}
// if(H1<2){
// alert(1111);
// }
if(H1<2){
Leaf.showMessage('${l:PROMPT}', '系统暂时不支持还款期数小于2期的租金计划');
Leaf.Masker.unmask(body);
return false;
}
var all_records = $('temp_hd_attribute_ds').getAll();
var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
create_record_column(all_records, headRecord);
......
......@@ -36,6 +36,10 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}else{
journal_record.set('total_amount_dr', sum_dr);
journal_record.set('total_amount_cr', sum_dr);
journal_record.set('total_amount_fuc_dr', sum_dr);
journal_record.set('total_amount_fuc_cr', sum_dr);
if (journal_record.get('journal_num')) {
return true;
}
......@@ -78,7 +82,6 @@
header_ds_record.set('post_gl_status', 'N');
}
header_ds_record.set('reversed_flag', 'N');
// if (name = 'document_type') {
// Leaf.request({
// url: $('get_document_type_id').getUrl(),
......
This diff is collapsed.
......@@ -118,6 +118,7 @@
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
document_category: 'PROJECT',
maintain_type: 'MODIFY',
......@@ -159,6 +160,7 @@
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_update_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
document_category: 'PROJECT',
maintain_type: 'MODIFY',
......
......@@ -176,6 +176,7 @@
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
price_list: price_list,
secondary_lease: secondary_lease,
......@@ -220,6 +221,7 @@
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_update_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
price_list: price_list,
secondary_lease: secondary_lease,
......@@ -270,6 +272,7 @@
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
price_list: price_list,
secondary_lease: secondary_lease,
......
......@@ -168,8 +168,9 @@
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
document_category: 'PORJECT',
document_category: 'PROJECT',
maintain_type: 'MODIFY',
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
......@@ -208,8 +209,9 @@
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_update_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
document_category: 'PORJECT',
document_category: 'PROJECT',
maintain_type: 'MODIFY',
calc_session_id: record.get('calc_session_id'),
quotation_id: record.get('quotation_id'),
......@@ -254,8 +256,9 @@
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
document_category: 'PORJECT',
document_category: 'PROJECT',
maintain_type: 'MODIFY',
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
......
......@@ -155,5 +155,6 @@
</dr:sheet>
</dr:sheets>
</dr:excel-report>
</a:init-procedure>
</a:service>
......@@ -7,10 +7,12 @@
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query autoCount="false" model="rpt.RPT5012.rpt5012_get_batch" rootPath="batch_id"/>
<!-- <a:model-query autoCount="false" model="rpt.RPT5012.rpt5012_get_batch" rootPath="batch_id"/>-->
</a:init-procedure>
<a:view>
<a:link id="rpt5010_print_link_id" model="rpt.RPT5012.rpt5010_get_data" modelaction="update"/>
<a:link id="rpt5012_report_query_link" url="${/request/@context_path}/modules/rpt/RPT5012/rpt5012_repory_query.lview"/>
<a:link id="rpt5012_print_link_id" model="rpt.RPT5012.rpt5012_result_query" modelaction="execute"/>
<script><![CDATA[
function rpt5012_reset() {
$('rpt5012_query_ds').reset();
......@@ -24,7 +26,7 @@
return '时间格式应为【yyyymm】,举例【201812】';
}
function rpt5012_query_ds() {
function rpt5012_query() {
debugger;
Leaf.Masker.mask(Ext.getBody(), '${l:BEING_IMPLEMENTED}');
var record = $('rpt5012_query_ds').getAt(0);
......@@ -39,17 +41,36 @@
Leaf.showMessage('${l:PROMPT}', '年月未填写');
return;
}
Leaf.request({
url: $('rpt5012_print_link_id').getUrl(),
para: {
month: month,
batch_id:'${/model/batch_id/record/@batch_id}'
month: month
},
success: function(res) {
var days = res.result.days;
debugger;
Leaf.Masker.unmask(Ext.getBody());
var url = '${/request/@context_path}/modules/rpt/rpt5012/export_excel_sheets' + days + '.lsc?month=' + month + '&file_name=' + month + '每日合同未收本金表.xls';
window.open(encodeURI(url), '_self');
var cur_begin = Leaf.formatDate(res.result.cur_begin),
cur_end = Leaf.formatDate(res.result.cur_end),
before_begin = Leaf.formatDate(res.result.before_begin),
before_end = Leaf.formatDate(res.result.before_end);
var win = new Leaf.Window({
id: 'rpt5012_report_query_link_id',
url: $('rpt5012_report_query_link').getUrl(),
params: {
month:month,
cur_begin:cur_begin,
cur_end:cur_end,
before_begin:before_begin,
before_end:before_end
},
title: '月结报表',
fullScreen: true
});
win.on('close', function () {
// document.getElementsByClassName('alert')[0].remove();
});
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
......@@ -61,31 +82,11 @@
});
}
function rpt5110_run_job() {
Leaf.showConfirm('${l:HLS.PROMPT}', '<font color="red">该任务需执行约1小时,请耐心等待!</font></br></br><font color="red">【特别注意】任务发起后1小时内请勿重复点击</font>', function() {
Leaf.Masker.mask(Ext.getBody(), '${l:BEING_IMPLEMENTED}');
Leaf.request({
url: $('rpt5012_run_job_link_id').getUrl(),
para: {},
success: function(res) {
Leaf.Masker.unmask(Ext.getBody());
Leaf.SideBar.show({
msg: '发起成功!',
duration: 2000
});
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, null, 300, 150);
}
]]></script>
<a:dataSets>
<a:dataSet id="four_month_date_ds" loadData="true" model="rpt.RPT5012.rpt5012_four_month"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: WangYu
$Date: 2014-4-25 上午09:31:11
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:view>
<!-- <a:link id="con_cashflow_pre_query_id" model="cont.CON930.con_contract_cashflow_monthly" modelaction="update"/>-->
<script><![CDATA[
]]></script>
<a:dataSets>
<a:dataSet id="con_contract_rental_result_ds" pageSize="13" autoQuery="true" model="rpt.RPT5012.rpt5012_result_query" queryUrl="${/request/@context_path}/autocrud/rpt.RPT5012.rpt5012_result_query/query?month=${/parameter/@month}&amp;cur_begin=${/parameter/@cur_begin}&amp;cur_end=${/parameter/@cur_end}&amp;before_begin=${/parameter/@before_begin}&amp;before_end=${/parameter/@before_end}" autoPageSize="true"/>
<a:dataSet id="con_contract_cashflow_rental_result_ds" pageSize="13" autoQuery="true" model="rpt.RPT5012.rpt5012_csh_result_query" queryUrl="${/request/@context_path}/autocrud/rpt.RPT5012.rpt5012_csh_result_query/query?month=${/parameter/@month}&amp;cur_begin=${/parameter/@cur_begin}&amp;cur_end=${/parameter/@cur_end}&amp;before_begin=${/parameter/@before_begin}&amp;before_end=${/parameter/@before_end}" autoPageSize="true"/>
</a:dataSets>
<a:screenBody>
<!-- <a:screenTopToolbar>-->
<!--&lt;!&ndash; <a:gridButton click="CON321_con_contract_query" text="HLS.QUERY"/>&ndash;&gt;-->
<!--&lt;!&ndash; <a:gridButton click="CON321_con_contract_reset" text="HLS.RESET"/>&ndash;&gt;-->
<!-- </a:screenTopToolbar>-->
<a:tabPanel marginHeight="25" marginWidth="20">
<a:tabs>
<a:tab prompt="租金余额表" width="110">
<a:grid id="con_contract_rental_result_grid" bindTarget="con_contract_rental_result_ds" marginHeight="115" navBar="true" marginWidth="30">
<a:columns>
<a:column name="agent_extra_name" align="center" prompt="代理店" width="120"/>
<a:column name="bp_tenant_name" align="center" prompt="客户名称" width="120"/>
<a:column name="contract_number" align="center" prompt="合同编号" width="100"/>
<a:column name="lease_start_date" align="center" prompt="租赁期开始日" width="80"/>
<a:column name="modelcd" align="center" prompt=" 机型" width="180"/>
<a:column name="machine_number" align="center" prompt="机器号码" width="80"/>
<a:column name="int_rate_display" align="center" prompt="利率" width="80"/>
<a:column name="int_rate_display" align="center" prompt="基准利率" width="80"/>
<a:column name="lease_times" align="center" prompt="租赁期间" width="80"/>
<a:column name="down_payment_ratio" align="center" prompt="首付款比率" width="80"/>
<a:column name="lease_item_amount" align="center" prompt="代理店销售金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="residual_amount" align="center" prompt="留购价格" renderer="Leaf.formatMoney" width="80"/>
<a:column name="contract_amount" align="center" prompt="合同总金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="down_payment" align="center" prompt="首付款" renderer="Leaf.formatMoney" width="80"/>
<a:column name="month_due_amount" align="center" prompt="当月末应收款余额(合计)" renderer="Leaf.formatMoney" width="80"/>
<a:column name="month_due_principal" align="center" prompt="当月末本金余额(合计)" renderer="Leaf.formatMoney" width="80"/>
<a:column name="month_interest" align="center" prompt="当月末利息余额(合计)" renderer="Leaf.formatMoney" width="80"/>
<a:column name="month_residual" align="center" prompt="当月末留购金余额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="business_due_times" align="center" prompt="逾期期数" width="80"/>
<a:column name="business_due_amount" align="center" prompt="当月末逾期金额(合计)" renderer="Leaf.formatMoney" width="80"/>
<a:column name="deposit_amount" align="center" prompt="保证金" renderer="Leaf.formatMoney" width="80"/>
<a:column name="contract_status_n" align="center" prompt="合同状态" width="80"/>
<a:column name="residual_date" align="center" prompt="合同终了" width="80"/>
<a:column name="terminate_date" align="center" prompt="结清年月" width="80"/>
</a:columns>
</a:grid>
</a:tab>
<a:tab prompt="回收逾期明细表" width="110">
<a:grid id="con_contract_cashflow_rental_result_grid" bindTarget="con_contract_cashflow_rental_result_ds" marginHeight="115" navBar="true" marginWidth="30">
<a:columns>
<a:column name="agent_extra_name" align="center" prompt="代理店" width="120"/>
<a:column name="bp_tenant_name" align="center" prompt="客户名称" width="120"/>
<a:column name="contract_number" align="center" prompt="合同编号" width="100"/>
<a:column name="lease_start_date" align="center" prompt="租赁期开始日" width="80"/>
<a:column name="modelcd" align="center" prompt=" 机型" width="180"/>
<a:column name="machine_number" align="center" prompt="机器号码" width="80"/>
<a:column name="int_rate_display" align="center" prompt="利率" width="80"/>
<a:column name="times" align="center" prompt="回数" width="80"/>
<a:column name="due_date" align="center" prompt="支付预定日" width="80"/>
<a:column name="due_amount" align="center" prompt="应收款金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="received_amount" align="center" prompt="已收款金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="unreceived_amount" align="center" prompt="未收金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="overdue_days" align="center" prompt="逾期天数" width="80"/>
<a:column name="deposit_amount" align="center" prompt="保证金" renderer="Leaf.formatMoney" width="80"/>
</a:columns>
</a:grid>
</a:tab>
</a:tabs>
</a:tabPanel>
</a:screenBody>
</a:view>
</a:screen>
This diff is collapsed.
This diff is collapsed.
......@@ -29,6 +29,7 @@
$('sys_code_query_ds').reset();
}
function indexChangeFunction(ds, record){
$('sys_code_ref_ds').setQueryParameter('code_id',record.get('code_id'));
if(record.get('sys_flag')=='Y'){
isSys='Y'
$('btn_ref_add').disable();
......
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