Commit c45ffb9f authored by niminmin's avatar niminmin

Merge branch 'develop' of https://hel.hand-china.com/hlcm/leaf-hlcm into feature/解约回购开发

parents c3b33c09 c3f0d324
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool ACP_INVOICE_LN.log
PROMPT
PROMPT CREATING TABLE TRAIN_CONFIG
PROMPT ============================
PROMPT
CREATE TABLE business_write_detail (
business_detail_id NUMBER,
write_off_id NUMBER,
cashflow_id NUMBER,
contract_id NUMBER,
transaction_id NUMBER,
transaction_number VARCHAR2(100),
transaction_type VARCHAR2(100),
times NUMBER,
cf_item_n VARCHAR2(100),
extra_name VARCHAR2(1000),
contract_number VARCHAR2(1000),
machine_number VARCHAR2(100),
bp_code_tenant VARCHAR2(100),
bp_name VARCHAR2(100),
id_card_no VARCHAR2(100),
contract_amount NUMBER,
due_date DATE,
due_amount NUMBER,
due_amount_penalty NUMBER,
transaction_date DATE,
write_off_date DATE,
received_amount NUMBER,
unreceived_amount NUMBER,
received_amount_penalty NUMBER
);
CREATE SEQUENCE business_write_detail_s;
ALTER TABLE business_write_detail ADD (write_off_amount NUMBER);
ALTER TABLE business_write_detail ADD (session_id NUMBER);
ALTER TABLE business_write_detail ADD (rest_due_amount NUMBER);
CREATE SEQUENCE business_write_detail_s;
create index index_cashflowid on business_write_detail(cashflow_id);
drop index index_cashflowid;
select t.business_detail_id, write_off_id, cashflow_id, contract_id, transaction_id, transaction_number, transaction_type, times, cf_item_n, extra_name, contract_number, machine_number, bp_code_tenant, bp_name, id_card_no, contract_amount, due_date, due_amount, due_amount_penalty, transaction_date, write_off_date, received_amount, unreceived_amount, received_amount_penalty, write_off_amount, session_id, rest_due_amount from business_write_detail t;
SPOOL OFF
EXIT
\ No newline at end of file
package com.hand.hls.hlcm.util;
import com.hand.hls.hlcm.contact.service.IBusinessContactService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -13,8 +10,7 @@ import java.util.regex.Pattern;
* @description
*/
public class DelHtmlScript {
@Autowired
private IBusinessContactService service;
/**
* 定义script的正则表达式
*/
......
......@@ -58,7 +58,7 @@ public class MailSend {
try {
MimeMessage message = new MimeMessage(session);
message.addHeader("X-Mailer", "Microsoft Outlook Express 6.00.2900.2869");
message.setFrom(new InternetAddress(from));
message.setFrom(new InternetAddress(from,"建机系统","utf-8"));
//如果含有分号则去掉
//收件人可能有多个
String[] toParams = jsonObject.optString("toAddress").split(";");
......@@ -93,14 +93,14 @@ public class MailSend {
// 创建多重消息
// 设置文本消息部分
//判断是html格式还是文本格式
if (CONTENT_TYPE_HTML.equals(jsonObject.optString("content_type"))) {
//删除html标签
body=DelHtmlScript.delHtmlTag(body);
}
// if (CONTENT_TYPE_HTML.equals(jsonObject.optString("content_type"))) {
// //删除html标签
// body=DelHtmlScript.delHtmlTag(body);
// }
messageBodyPart.setText(body);
multipart.addBodyPart(messageBodyPart);
if(ATTACHMENT_FLAG){
if(isNotEmpty(attchFlag)&&YES.equals(attchFlag)){
String fileName=jsonObject.optString("attch_file_name");
String filePath=jsonObject.optString("attch_file_path");
// 附件部分
......@@ -137,10 +137,10 @@ public class MailSend {
jb.put("toCcAddress", "");
jb.put("toSubject", "123");
jb.put("toBody", "<span style=\"white-space:nowrap;\">复制测试最后一百年</span>");
jb.put("content_type", "text/plain");
jb.put("content_type", "text/html");
jb.put("attch_flag", "Y");
jb.put("attch_file_name", "财务收支一览表.xlsx");
jb.put("attch_file_path", "/u01/hls_file/excel/excel1587545458258.xlsx");
jb.put("attch_file_path", "D:/u01/hls_file/task_excel/excel1589481201751.xlsx");
try{
mailSend.sendMain(jb.toString());
}catch(Exception e){
......
......@@ -314,7 +314,7 @@
<bm:query-field name="document_type" queryExpression="vv.document_type=${@document_type}"/>
<bm:query-field name="contract_status" queryExpression="vv.contract_status = ${@contract_status}"/>
<bm:query-field name="bp_id_agent_level1" queryExpression="vv.bp_id_agent_level1 = ${@bp_id_agent_level1}"/>
<bm:query-field name="bp_id_agent_level1_n" queryExpression="vv.bp_id_agent_level1_n like ${@bp_id_agent_level1_n}"/>
<bm:query-field name="bp_id_agent_level1_n" queryExpression="vv.bp_id_agent_level1_n like &apos;%&apos;||${@bp_id_agent_level1_n}||&apos;%&apos;"/>
<bm:query-field name="termination_date_from" queryExpression="to_date(t1.termination_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@termination_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="termination_date_to" queryExpression="to_date(t1.termination_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@termination_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="lease_channel" queryExpression="t1.lease_channel=${@lease_channel}"/>
......
......@@ -9,13 +9,16 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from ( select h.bp_name, h.bp_id
from hls_bp_master h
where h.bp_category = 'VENDER'
and h.enabled_flag='Y')
#WHERE_CLAUSE#
]]></bm:query-sql>
SELECT *
FROM (SELECT h.bp_name, h.bp_id
FROM hls_bp_master h
WHERE h.bp_category = 'VENDER'
AND h.enabled_flag = 'Y'
UNION ALL
SELECT '买断机' bp_name, -100 bp_id
FROM dual)
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
......
......@@ -63,10 +63,7 @@
<bm:field name="finance_type"/>
<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="vender_id_n" expression="(decode(vender_id,-100,'买断机',(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="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>
......
<?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 t.cashflow_id,
t.transaction_number transaction_num,
t.transaction_type,
t.times,
t.session_id,
t.contract_id,
t.cf_item_n,
t.extra_name extra_nam,
t.contract_number,
t.machine_number,
t.bp_code_tenant bp_id_tenant,
t.bp_name,
t.id_card_no,
t.contract_amount total_amount,
t.due_date,
t.due_amount -
(nvl((SELECT SUM(v.write_off_amount)
FROM business_write_detail v
WHERE v.cashflow_id = t.cashflow_id
and v.session_id=${/session/@session_id}
AND v.business_detail_id<t.business_detail_id),
0)) due_amount,
t.transaction_date,
t.write_off_date,
t.received_amount,
(t.due_amount- (nvl((SELECT SUM(v.write_off_amount)
FROM business_write_detail v
WHERE v.cashflow_id = t.cashflow_id
and v.session_id=${/session/@session_id}
AND v.business_detail_id<t.business_detail_id),
0))-t.write_off_amount)unreceived_amount,
t.write_off_amount received_amount
FROM business_write_detail t
#WHERE_CLAUSE#
order by extra_name,contract_number,times,transaction_date,write_off_date
]]></bm:query-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
contract_item_query_pkg.calc_business_write_report(p_user_id => ${/session/@user_id},
p_session_id => ${/session/@session_id});
end;]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="contract_number" queryExpression="t.contract_number like &apos;%&apos; || ${@contract_number} || &apos;%&apos;"/>
<bm:query-field name="bp_name" queryExpression="t.bp_name like &apos;%&apos; || ${@bp_name} || &apos;%&apos;"/>
<bm:query-field name="transaction_date_from" queryExpression="trunc(t.transaction_date) &gt;= trunc(to_date(${@transaction_date_from},'yyyy-mm-dd'))"/>
<bm:query-field name="transaction_date_to" queryExpression="trunc(t.transaction_date) &lt;= trunc(to_date(${@transaction_date_to},'yyyy-mm-dd'))"/>
<bm:query-field name="journal_date_from" queryExpression="trunc(t.write_off_date) &gt;= trunc(to_date(${@journal_date_from},'yyyy-mm-dd'))"/>
<bm:query-field name="journal_date_to" queryExpression="trunc(t.write_off_date) &lt;= trunc(to_date(${@journal_date_to},'yyyy-mm-dd'))"/>
<bm:query-field name="transaction_num" queryExpression="t.transaction_number like &apos;%&apos; || ${@transaction_num} || &apos;%&apos;"/>
<bm:query-field name="cf_item_n" queryExpression="t.cf_item_n like &apos;%&apos; || ${@cf_item_n} || &apos;%&apos;"/>
<bm:query-field name="extra_nam" queryExpression="t.extra_name like &apos;%&apos; || ${@extra_nam} || &apos;%&apos;"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t.session_id=${/session/@session_id}"/>
<bm:data-filter enforceOperations="query" expression="exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 WHERE a1.trx_category = 'CONTRACT' and a1.trx_id = t.contract_id AND trunc(sysdate) between a1.start_date AND nvl(a1.end_date, trunc(sysdate)) and a1.user_id = a2.owner_user_id AND a1.trx_category = a2.trx_category AND a2.authorized_user_id = ${/session/@user_id} AND trunc(sysdate) between a2.start_date and nvl(a2.end_date, trunc(sysdate)))"/>
<bm:data-filter enforceOperations="query" expression="( (decode(${/session/@user_id}, 10600, 1, 2) = 1
and exists (select 1 from con_contract c, hls_bp_master hb where c.contract_id = t.contract_id
and hb.bp_id = c.bp_id_agent_level1
and hb.bp_code in ('D00000028','D00000035','D00000016','D00000021','D00000039','D00000025','D00000034','D00000017','D00000018','D00000024','D00000032','D00000009','D00000012','D00000014','D00000015','D00000023')) )
or (decode(${/session/@user_id}, 10600, 1, 2) = 2) )"/>
</bm:data-filters>
</bm:model>
......@@ -328,10 +328,11 @@ SELECT h.extra_nam,
WHERE t.data_class = 'NORMAL'
AND t.bp_id_agent_level1 = h.bp_id
AND (t.contract_status IN ('INCEPT',
'PENDING',
'TERMINATING',
'ETING',
'REPURING')or (to_char(t.et_date,'yyyy-mm')>=${@period_name} and t.contract_status='TERMINATE' ))
'REPURING',
'ET')or (to_char(t.et_date,'yyyy-mm')>=${@period_name} and t.contract_status='TERMINATE' ))
and trunc(t.lease_start_date) <= trunc(last_day(to_date(${@start_calc_date},'yyyy-mm-dd')))
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: qwm
$Date: 2013-7-15 下午7:59:08
$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 t1.document_use_seal_id,
t1.document_table,
t1.CONTRACT_ID,
t1.instruments_types,
t1.instruments_types_n,
t1.common_seal,
t1.common_seal_n,
t1.corporate_visa_seal,
t1.corporate_visa_seal_n,
t1.legal_seal,
t1.legal_seal_n,
t1.con_special_seal,
t1.con_special_seal_n,
t1.financial_seal,
t1.financial_seal_n,
t1.supervisio_seal,
t1.supervisio_seal_n,
t1.SEAL_QUANTITY,
t1.seal_number,
t1.seal_number_n
FROM con_contract_use_seal_lv t1
WHERE
t1.contract_id = ${@contract_id}
and t1.document_table = 'CON_CONTRACT_FINISH'
]]></bm:query-sql>
<bm:parameters>
<bm:parameter name="contract_id"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -10,6 +10,17 @@
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
con_contract_closed_pkg.contract_use_seal_save(p_contract_id => ${@contract_id},
p_user_id => ${/session/@user_id},
p_instruments_types => ${@instruments_types},
p_common_seal => ${@common_seal},
p_corporate_visa_seal => ${@corporate_visa_seal},
p_legal_seal => ${@legal_seal},
p_con_special_seal => ${@con_special_seal},
p_financial_seal => ${@financial_seal},
p_supervisio_seal => ${@supervisio_seal},
p_seal_number => ${@seal_number});
con_contract_closed_pkg.terminate_contract(
p_contract_id =>${@contract_id},
p_user_id =>${/session/@user_id}
......
......@@ -67,11 +67,14 @@
AND ccc.cf_item IN (1, 8, 250)
AND trunc(ccc.due_date) <= trunc(SYSDATE)) -
nvl((SELECT SUM(nvl(gwo.write_off_amount, 0))
FROM gld_write_off gwo
FROM gld_write_off gwo ,con_contract_cashflow ccw
WHERE gwo.reversed_flag = 'N'
AND gwo.contract_id = cc.contract_id
AND gwo.cf_item IN (1, 8, 250)),
0) account_due_amount,
AND gwo.cf_item IN (1, 8, 250)
and gwo.cf_item =ccw.cf_item
and gwo.times =ccw.times
and gwo.contract_id =ccw.contract_id
AND trunc(ccw.due_date) <= trunc(SYSDATE)),0) account_due_amount,
contract_item_query_pkg.calc_business_overdue_times(p_contract_id => cc.contract_id,
p_calc_date => SYSDATE,
......@@ -90,14 +93,21 @@
FROM csh_write_off cwo
WHERE cwo.reversed_flag = 'N'
AND cwo.contract_id = cc.contract_id
AND cwo.cf_item IN (1, 8, 250)),
AND cwo.cf_item IN (1, 8, 250)
And Exists
(Select 1
From con_contract_cashflow cn
Where cn.cashflow_id = cwo.cashflow_id
And cn.cf_status = 'RELEASE'
And trunc(cn.due_date) <= trunc(Sysdate))),
0) 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,
AND ccc.write_off_flag <> 'FULL'
and ccc.cf_status = 'RELEASE') over_due_amount,
--营业最早逾期的预定支付日
(SELECT to_char(MIN(ccc.due_date),'yyyy-mm-dd')
......@@ -163,8 +173,10 @@
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = cc.contract_id
AND TRUNC(ccw.due_date)<=TRUNC(SYSDATE)
AND ccw.due_amount>ccw.received_amount
AND ccw.write_off_flag <> 'FULL')
AND ccw.due_amount>nvl(ccw.received_amount, 0)
AND ccw.write_off_flag <> 'FULL'
AND ccw.cf_status = 'RELEASE'
AND ccw.cf_direction = 'INFLOW')
AND ('Y' = 'Y' AND EXISTS
(SELECT 1
FROM aut_trx_user_authorize a1, aut_owner_user_authorize a2
......@@ -176,7 +188,11 @@
AND a1.trx_category = a2.trx_category
AND a2.authorized_user_id = ${/session/@user_id}
AND trunc(SYSDATE) BETWEEN a2.start_date AND
nvl(a2.end_date, trunc(SYSDATE))))) t1
nvl(a2.end_date, trunc(SYSDATE))))
And ( (decode(${/session/@user_id}, 10600, 1, 2) = 1
And exists (select 1 from hls_bp_master hb where hb.bp_id = cc.bp_id_agent_level1
And hb.bp_code in ('D00000028','D00000035','D00000016','D00000021','D00000039','D00000025','D00000034','D00000017','D00000018','D00000024','D00000032','D00000009','D00000012','D00000014','D00000015','D00000023')) )
or (decode(${/session/@user_id}, 10600, 1, 2) = 2) ) ) t1
#WHERE_CLAUSE#
......
......@@ -124,8 +124,8 @@
<bm:query-field name="currency_code_to" queryExpression="t1.currency_code &lt;= ${@currency_code_to}"/>
<bm:query-field name="bank_account_code_from" queryExpression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id) &gt;= ${@bank_account_code_from}"/>
<bm:query-field name="bank_account_code_to" queryExpression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id) &lt;= ${@bank_account_code_to}"/>
<bm:query-field name="transaction_date_from" queryExpression="transaction_date &gt;= to_date(${@transaction_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="transaction_date_to" queryExpression="transaction_date &lt;= to_date(${@transaction_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="transaction_date_from" queryExpression="trunc(transaction_date, &apos;fmdd&apos;) &gt;= to_date(${@transaction_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="transaction_date_to" queryExpression="trunc(transaction_date, &apos;fmdd&apos;) &lt;= to_date(${@transaction_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="user_id" queryExpression="t1.created_by=${@user_id}"/>
<bm:query-field name="receipt" queryExpression="(t1.transaction_type=${@receipt} or t1.transaction_type=${@advance_receipt} or t1.transaction_type=${@deposit} or t1.transaction_type=${@risk})"/>
<!--<bm:query-field name="full_write_off_flag" queryExpression="t1.write_off_flag!=${@full_write_off_flag}"/>-->
......
......@@ -122,9 +122,14 @@
(select 1
from exp_emp_assign_e_v ee
where ee.user_id = ${/session/@user_id}
and ee.unit_id not in (1565,1552,1564,1551,1559,1547,1560,1545,1546,1568,1566,1570,1550,1569,1555,1571,1558)
and ee.unit_id=(SELECT h.unit_id FROM hls_bp_master h WHERE h.bp_id=t1.bp_id)
and ${/session/@role_id} in (select v.role_id from sys_role_vl v where v.role_code in ('0018','0019')) ) )
or (${/session/@role_id} not in (select v.role_id from sys_role_vl v where v.role_code in ('0018','0019')) ))"/>
<bm:data-filter name="query" expression="( (decode(${/session/@user_id}, 10600, 1, 2) = 1
and exists (select 1 from hls_bp_master hb where hb.bp_id = t1.bp_id
and hb.bp_code in ('D00000028','D00000035','D00000016','D00000021','D00000039','D00000025','D00000034','D00000017','D00000018','D00000024','D00000032','D00000009','D00000012','D00000014','D00000015','D00000023')) )
or (decode(${/session/@user_id}, 10600, 1, 2) = 2) )"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field name="query_amount_flag" queryExpression="((${@query_amount_flag}='1' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0) )or(${@query_amount_flag}='2' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) =0) )or (${@query_amount_flag}='3' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >=0)))"/>
......
......@@ -9,7 +9,7 @@
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
begin
hls_bp_master_credit_pkg.update_credit_status(
p_bp_credit_hd_id =>${@bp_credit_hd_id},
p_credit_total_amount =>${@credit_total_amount},
......
......@@ -35,7 +35,7 @@
<bm:field name="calc_end_date" databaseType="DATE" datatype="java.util.Date" physicalName="CALC_END_DATE" prompt="CON_UNEARNED_FINANCE_INCOME.CALC_END_DATE"/>
<bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select p.project_name from prj_project p ,con_contract c where c.contract_id = t1.contract_id and p.project_id = c.project_id)" forInsert="false" forUpdate="false"/>
<bm:field name="finance_amount" databaseType="NUMBER" datatype="java.lang.Double" expression="(select c.finance_amount from con_contract c where c.contract_id = t1.contract_id)" forInsert="false" forUpdate="false"/>
<bm:field name="period" databaseType="VARCHAR2" datatype="java.lang.String" expression="((CASE WHEN t1.cf_item = 8 THEN (SELECT to_char(cf1.due_date,&apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf1 WHERE cf1.contract_id = t1.contract_id AND cf1.cf_item = t1.cf_item)||'-'||(SELECT TO_CHAR(cf.due_date, &apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id) ELSE ( (SELECT to_char(cf1.due_date,&apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf1 WHERE cf1.contract_id = t1.contract_id AND cf1.cf_item = t1.cf_item AND cf1.times = (SELECT cf.times - 1 FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id)) ||'-'|| (SELECT TO_CHAR(cf.due_date -1, &apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id))END))" forInsert="false" forUpdate="false"/>
<bm:field name="period" databaseType="VARCHAR2" datatype="java.lang.String" expression="((CASE WHEN t1.cf_item = 8 THEN (SELECT to_char(cf1.due_date,&apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf1 WHERE cf1.contract_id = t1.contract_id AND cf1.cf_item = t1.cf_item)|| '-' ||(SELECT TO_CHAR(cf.due_date, &apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id) ELSE ( (SELECT to_char(cf1.due_date,&apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf1 WHERE cf1.contract_id = t1.contract_id AND cf1.cf_item = t1.cf_item AND cf1.times = (SELECT cf.times - 1 FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id)) || nvl2((Select to_char(cf1.due_date, 'yyyy/mm/dd') From con_contract_cashflow cf1 Where cf1.contract_id = t1.contract_id And cf1.cf_item = t1.cf_item And cf1.times = (Select cf.times - 1 From con_contract_cashflow cf Where cf.cashflow_id = t1.cashflow_id)), '-', '') || (SELECT TO_CHAR(cf.due_date -1, &apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id))END))" forInsert="false" forUpdate="false"/>
<bm:field name="interest" databaseType="NUMBER" datatype="java.lang.Double" expression="(select c.interest from con_contract_cashflow c where c.cashflow_id = t1.cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="int_rate_implicit" databaseType="NUMBER" datatype="java.lang.Double" expression="round((select c.int_rate from con_contract c where c.contract_id = t1.contract_id),4)" forInsert="false" forUpdate="false"/>
<bm:field name="calc_period" databaseType="VARCHAR2" datatype="java.lang.String" expression="(to_char(t1.calc_start_date,&apos;yyyy/mm/dd&apos;)||&apos;-&apos;||to_char(t1.calc_end_date,&apos;yyyy/mm/dd&apos;))" forInsert="false" forUpdate="false"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: qwm
$Date: 2013-12-28 下午1:31:12
$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 to_char(t1.transaction_date, 'yyyy-mm') csh_date,
Count(t1.transaction_id) csh_count,
Count(t1.csh_not_id) csh_not,
Count(t1.csh_partial_id) csh_partial,
decode(Count(t1.transaction_id), Count(t1.csh_confirm), 'Y', 'N') As csh_confirm_flag,
t1.ref_v04
From (Select t.transaction_date,
t.transaction_id,
(Select c.transaction_id
From csh_transaction c
Where c.transaction_id = t.transaction_id
And nvl(c.write_off_flag, 'NOT') = 'NOT') As csh_not_id,
(Select c1.transaction_id
From csh_transaction c1
Where c1.transaction_id = t.transaction_id
And nvl(c1.write_off_flag, 'NOT') = 'PARTIAL') As csh_partial_id,
(Select c2.transaction_id
From csh_transaction c2
Where c2.transaction_id = t.transaction_id
And nvl(c2.business_monthly_flag, 'N') = 'Y') As csh_confirm,
t.ref_v04
From csh_transaction t
Where t.confirmed_flag in ('ACCAUDITED','APPROVED', 'WF_REJECTED', 'WF_APPROVING')
And t.transaction_type not in ('DEPOSIT', 'PAYMENT')
And t.returned_flag not in ('RETURN', 'FULL')
And nvl(t.reversed_flag, 'N') = 'N') t1
Where to_char(t1.transaction_date, 'yyyymm') <= to_char(sysdate, 'yyyymm')
And to_char(t1.transaction_date, 'yyyymm') > '201906'
Group By to_char(t1.transaction_date, 'yyyy-mm'), t1.ref_v04
Order By to_char(t1.transaction_date, 'yyyy-mm') desc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hls_monthend_new_pkg.csh_transaction_confirm(
p_role_flag => ${@role_flag},
p_csh_date => ${@csh_date},
p_ref_v04 => ${@ref_v04},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author:
$Date: 2020-05-11
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="role_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ROLE_CODE"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
Select nvl(decode(${/session/@user_id},
10413,
'NO',
(Select decode(t.role_code,
'0014',
'YES',
'0013',
'YES',
'0017',
'YES',
'HAND',
'YES',
'N')
From sys_role t
Where t.role_id = ${/session/@role_id})), 'N') as role_code
From dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -3,7 +3,7 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT to_char(v.calendar_date,'yyyy/mm/dd')calendar_date,
SELECT to_char(v.calendar_date,'yyyy/mm/dd')calendar_date,
v.named_day,
v.purchase_amount,
v.down_payment,
......@@ -35,7 +35,7 @@
(SELECT 1
FROM con_contract ct
WHERE ct.contract_status IN
('INCEPT', 'ETING', 'REPURING')
('INCEPT', 'PENDING','ETING', 'REPURING')
AND ct.contract_id = contract_id)) purchase_amount, --留购金
(SELECT SUM(due_amount - nvl(received_amount, 0))
FROM con_contract_cashflow
......@@ -45,7 +45,7 @@
(SELECT 1
FROM con_contract ct
WHERE ct.contract_status IN
('INCEPT', 'ETING', 'REPURING')
('INCEPT', 'PENDING','ETING', 'REPURING')
AND ct.contract_id = contract_id)) down_payment, --首付款
(SELECT SUM(due_amount)
FROM con_contract_cashflow ccc
......@@ -55,48 +55,72 @@
(SELECT 1
FROM con_contract ct
WHERE ct.contract_status IN
('INCEPT', 'ETING', 'REPURING')
('INCEPT', 'PENDING','ETING', 'REPURING')
AND ct.contract_id = contract_id)) lease_amount, --租金
(CASE
WHEN to_char(SYSDATE, 'dd') <= 20 AND
to_char(t.calendar_date, 'yyyymmdd') =
to_char(SYSDATE, 'yyyymm') || 20 THEN
-- to_char(SYSDATE, 'yyyymm') || decode(to_char(t.calendar_date, 'd'), 1, 18, 7, 19, 20)
to_char(Sysdate, 'yyyymm') ||
decode(to_char(to_date(to_char(Sysdate, 'yyyymm') || 20,
'yyyymmdd'),
'd'),
1,
18,
7,
19,
20) THEN
--当月的二十号统计数据
NVL((SELECT SUM(nvl(c.lease_item_amount, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND c.data_class='NORMAL'
AND to_char(add_months(c.lease_start_date, 1),
'yyyymmdd') = to_char(SYSDATE, 'yyyymmdd')
'yyyymm') = to_char(SYSDATE, 'yyyymm')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') =
'NO_DEDUCTION'),0) +
NVL((SELECT SUM(nvl(c.lease_item_amount, 0) -
nvl(c.down_payment, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND c.data_class='NORMAL'
AND to_char(add_months(c.lease_start_date, 1),
'yyyymmdd') = to_char(SYSDATE, 'yyyymmdd')
'yyyymm') = to_char(SYSDATE, 'yyyymm')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') <>
'NO_DEDUCTION'),0)
WHEN to_char(SYSDATE, 'dd') > 20 AND
to_char(add_months(t.calendar_date, -1), 'yyyymmdd') =
to_char(SYSDATE, 'yyyymm') || 20 THEN
-- to_char(add_months(t.calendar_date, -1), 'yyyymmdd') =
-- to_char(SYSDATE, 'yyyymm') || 20
to_char(t.calendar_date, 'yyyymmdd') =
decode(to_char(to_date((to_char(add_months(Sysdate, 1),
'yyyymm') || 20),
'yyyymmdd'),
'd'),
1,
to_char(add_months(Sysdate, 1), 'yyyymm') || 18,
7,
to_char(add_months(Sysdate, 1), 'yyyymm') || 19,
to_char(add_months(Sysdate, 1), 'yyyymm') || 20)
THEN
NVL((SELECT SUM(nvl(c.lease_item_amount, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND to_char(c.lease_start_date, 'yyyymmdd') =
to_char(SYSDATE, 'yyyymmdd')
AND c.data_class='NORMAL'
AND to_char(c.lease_start_date, 'yyyymm') =
to_char(SYSDATE, 'yyyymm')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') =
'NO_DEDUCTION'),0)+
NVL((SELECT SUM(nvl(c.lease_item_amount, 0) -
nvl(c.down_payment, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND to_char(c.lease_start_date, 'yyyymmdd') =
to_char(SYSDATE, 'yyyymmdd')
AND c.data_class='NORMAL'
AND to_char(c.lease_start_date, 'yyyymm') =
to_char(SYSDATE, 'yyyymm')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') <>
'NO_DEDUCTION'),0)
ELSE
0
null
END) outflow_amount
FROM (SELECT s.calendar_date
FROM fnd_calendar_details s
......@@ -109,7 +133,7 @@
(SELECT 1
FROM con_contract t
WHERE t.contract_status IN
('INCEPT', 'ETING', 'REPURING')
('INCEPT', 'PENDING','ETING', 'REPURING')
AND t.contract_id = ccc.contract_id
AND t.data_class = 'NORMAL'))
ORDER BY s.calendar_date) t) v
......
......@@ -58,8 +58,7 @@ SELECT h.period_year,
WHERE cashflow_id = l.cashflow_id)) due_date,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, l.amount_dr, 0)),
'HL_SALES_TAX_ACT_NEW',
SUM(decode(reference6, NULL, nvl(l.amount_dr,0), 0)),
(SELECT due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) due_amount,
......@@ -109,14 +108,13 @@ SELECT h.period_year,
FROM hls_journal_header h, hls_journal_detail l
WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null
AND h.je_transaction_code IN
('HL_SALES_TAX_ACT_NEW', 'HL_CSH_CONSOLIDATION_DALAY')
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
AND not EXISTS (SELECT 1
AND h.je_transaction_code ='HL_SALES_TAX_ACT_NEW'
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
AND not EXISTS (SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date,'yyyymm') <= ${@base_period}
AND to_char(hi.invoice_date,'yyyymm') < ${@base_period}
AND (li.cashflow_id = l.cashflow_id OR
li.ref_n04 = l.journal_line_id))
GROUP BY l.reference1,
......@@ -216,7 +214,64 @@ SELECT h.period_year,
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date,'yyyymm') <= ${@base_period}
AND ((hi.contract_id = l.source_doc_id AND li.cf_item IN (2))))
) t1
union
SELECT h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date,
h.sbo_num journal_num,
reference3 contract_number,
reference1 bp_code,
(SELECT BP_NAME
FROM hls_bp_master
WHERE bp_code = reference1
AND ROWNUM = 1) bp_name,
l.journal_header_id,
(SELECT hi.invoice_date
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.reversed_flag = 'N'
AND (li.cashflow_id = l.cashflow_id OR
li.ref_n03 = l.journal_header_id)
AND ROWNUM = 1) invoice_date,
SUM(calc_tax_amount(l.amount_dr)) amount_tax,
'违约金' times,
h.journal_date due_date,
SUM(l.amount_dr) due_amount,
NULL principal,
SUM(l.amount_dr) interest,
SUM(calc_tax_amount(l.amount_dr)) vat_due_amount,
nvl(ROUND( SUM(calc_tax_amount(l.amount_dr))/
(SUM(amount_dr) -SUM(calc_tax_amount(l.amount_dr))
),
2) * 100,
0) || '%' vat_rate,
h.je_transaction_code
FROM hls_journal_header h, hls_journal_detail l
WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null
AND h.je_transaction_code ='HL_CSH_CONSOLIDATION_DALAY'
AND l.amount_dr IS NOT NULL
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
AND not EXISTS (SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date,'yyyymm') < ${@base_period}
AND li.ref_n04 = l.journal_line_id)
GROUP BY l.reference1,
reference3,
reference4,
h.sbo_num,
l.cashflow_id,
l.journal_header_id,
h.je_transaction_code,
h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date
) t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
......
......@@ -12,6 +12,7 @@
select * from (
SELECT t.contract_id,
t.invoice_hd_id,
t.invoice_line_id,
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'ACR510_INVOICE_KIND'
......@@ -43,7 +44,7 @@
WHERE t.session_id=${/session/@session_id}
) t1
#WHERE_CLAUSE#
order by invoice_hd_id
order by invoice_hd_id,due_date ASC,invoice_line_id asc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
......
......@@ -54,4 +54,7 @@
<bm:query-field name="approve_user_name" queryExpression="t1.approve_user_name like ${@approve_user_name}"/>
<bm:query-field name="approve_user_code" queryExpression="t1.approve_user_code like ${@approve_user_code}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="query" expression="( (${/session/@role_id} = 2306 and t1.workflow_code in (&apos;CONTRACT_INCEPT_WFL&apos;, &apos;DCFL_CSH_PAYMENT_REQ&apos;)) or (${/session/@role_id} in (2314, 2313, 2312) and t1.workflow_code in (&apos;DCFL_CSH_PAYMENT_REQ&apos;)) or (${/session/@role_id} not in (2306, 2314, 2313, 2312) and 1 = 1))"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author:
$Date: 2020-05-11
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="sys_role_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SYS_ROLE_FLAG"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select decode(count(1), 1, 'Y', 'N') as sys_role_flag
from sys_role v
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<et:ReportTask xmlns:t="leaf.application.action" xmlns:a="http://www.leaf-framework.org/application" xmlns:et="leaf.plugin.export.task" xmlns:p="uncertain.proc" reportDir="/u01/hls_file/task_excel/">
<et:ReportTask xmlns:t="leaf.application.action" xmlns:a="http://www.leaf-framework.org/application" xmlns:et="leaf.plugin.export.task" xmlns:p="uncertain.proc" reportDir="D:/u01/hls_file/task_excel">
<!--下载报表的权限校验-->
<p:procedure name="pre-service">
<p:set field="@success" value="true"/>
......
var override_queryfields = [
];
var add_datafilters = [ {
name : 'record_id',
expression : " t1.record_id = ${@record_id}"
} ];
add_datafilter();
override();
......@@ -25,7 +25,7 @@
if (name == 'object_tax_registry_num' || name == 'invoice_bp_address_phone_num' || name == 'invoice_bp_bank_account') {
if (Ext.isEmpty(value)) {
//if (record.get('bill_object_bp_class') == 'NP' || record.get('object_taxpayer_type') == 'SMALL_SCALE_TAXPAYER' || record.get('tax_type_vat') != 'Y') {
if (record.get('bill_object_bp_class') == 'NP') {
if (record.get('bill_object_bp_class') == 'NP'||record.get('object_taxpayer_type')=='SMALL_SCALE_TAXPAYER') {
return true;
} else if (record.get('bill_object_bp_class') == 'ORG') {
return '必输字段不能为空!';
......@@ -396,7 +396,8 @@
<a:comboBox name="object_taxpayer_type_desc" bindTarget="allConditionDs" prompt="纳税人类型"/>
<a:datePicker name="last_received_date_from" bindTarget="allConditionDs" prompt="收款日期从"/>
<a:datePicker name="last_received_date_to" bindTarget="allConditionDs" prompt="收款日期到"/>
</a:hBox>
<a:lov name="bp_id_agent_level1_n" bindTarget="allConditionDs" prompt="代理店"/>
</a:hBox>
<!-- <a:formBody column="4" labelWidth="400">
<a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/>
<a:lov name="contract_number_to" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_TO_LANG"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-8-13 上午10:30:25
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
<a:init-procedure><![CDATA[
]]>
</a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
]]></script>
<a:dataSets>
<a:dataSet id="seal_info_ds" autoQuery="true" model="cont.CON560.con_contract_seal_info" queryUrl="${/request/@context_path}/autocrud/cont.CON560.con_contract_seal_info/query?contract_id=${/parameter/@contract_id}">
<a:fields>
<a:field name="instruments_types" readOnly="true"/>
<a:field name="common_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="corporate_visa_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="legal_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="con_special_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="financial_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="supervisio_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="seal_number_n" readOnly="true"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:grid id="seal_info_ds_id" bindTarget="seal_info_ds" height="300" marginWidth="140" navBar="true">
<a:columns>
<a:column name="instruments_types" prompt="文书种类" width="150"/>
<a:column name="common_seal" prompt="公章" editor="seal_info_check_id" width="150"/>
<a:column name="corporate_visa_seal" prompt="法人签证章" editor="seal_info_check_id" width="150"/>
<a:column name="legal_seal" prompt="法人章" editor="seal_info_check_id" width="150"/>
<a:column name="con_special_seal" prompt="合同专用章" editor="seal_info_check_id" width="150"/>
<a:column name="financial_seal" prompt="财务章" editor="seal_info_check_id" width="150"/>
<a:column name="supervisio_seal" prompt="监管专用章" editor="seal_info_check_id" width="150"/>
<a:column name="seal_number_n" prompt="文书部数" width="150"/>
</a:columns>
<a:editors>
<a:checkBox id="seal_info_check_id"/>
</a:editors>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
\ No newline at end of file
......@@ -31,12 +31,13 @@
url="${/request/@context_path}/modules/cont/CON301N/con_contract_print.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_query_link"
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<a:link id="${/parameter/@layout_code}_contract_seal_link_id" url="${/request/@context_path}/modules/cont/CON301N/con_contract_finish_seal_info.lview"/>
<a:link id="con_contract_finish_print_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_history_pdf_print.lsc"/>
<script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
Leaf.onReady(function() {
debugger;
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 = "";
......@@ -89,7 +90,43 @@
param['url_title'] = 'BS明细';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', ds_id);
}
function open_seal_win(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var win = new Leaf.Window({
id: 'con_contract_seal_win_id',
params: {
contract_id: record.get('contract_id'),
winid: 'con_contract_seal_win_id'
},
url: $('${/parameter/@layout_code}_contract_seal_link_id').getUrl(),
title: '用印信息',
width: 1240,
height: 350
});
}
/*
@Modified: Liyuan.Chen
@Date: 2020/5/18
@Description: _self 换成 _blank
@Param:
*/
function download_recovery(record_id, ds_id){
var record = $(ds_id).findById(record_id);
var contract_id = record.get('contract_id');
var url_l = $('con_contract_finish_print_link_id').getUrl() + '?document_id=' + contract_id + '&document_table=CON_CONTRACT_FINISH&batch_flag=Y&source_type=COMMON';
// window.open(href = url_l, target = "_self");
var OpenWindow = window.open(href = url_l, target = "_blank");
//OpenWindow.alert('正在下载...');
}
function download_ownership(record_id, ds_id){
var record = $(ds_id).findById(record_id);
var contract_id = record.get('contract_id');
var url_l = $('con_contract_finish_print_link_id').getUrl() + '?document_id=' + contract_id + '&document_table=CON_CONTRACT_FINISH_LEASE&batch_flag=Y&source_type=COMMON';
window.open(href = url_l, target = "_blank");
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
if (name == 'contract_number' && value) {
......@@ -101,6 +138,18 @@
if (name == 'bs_link') {
return '<a href="javascript:open_bs_Window(\'' + record.id + '\',\'' + record.ds.id + '\')">明细</a>';
}
if(record.get('contract_status') == 'TERMINATE'){
if(name == 'con_seal_link'){
return '<a href="javascript:open_seal_win(\'' + record.id + '\',\'' + record.ds.id + '\')">用印信息</a>';
}
if(name == 'rent_recovery_link'){
return '<a href="javascript:download_recovery(\'' + record.id + '\',\'' + record.ds.id + '\')">附件</a>';
}
if(name == 'ownership_link'){
return '<a href="javascript:download_ownership(\'' + record.id + '\',\'' + record.ds.id + '\')">附件</a>';
}
}
return value;
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
......
......@@ -6,9 +6,11 @@
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="business_write_detail_link" model="cont.CON3100N.business_write_detail_report"
modelaction="execute"/>
<script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
if(name=='transaction_date_from' &&value){
......@@ -22,6 +24,33 @@
}
}
}
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_cashflow');
var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds';
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('business_write_detail_link').getUrl(),
para: {},
success: function() {
$(ds_id).setQueryUrl('${/request/@context_path}/autocrud/cont.CON3100N.business_write_detail_report/query');
$(ds_id).setQueryDataSet($(form_ds_id));
Leaf.Masker.unmask(Ext.getBody());
$(ds_id).query();
},
failure: function() {
Leaf.Masker.unmask(detail_mask);
},
error: function() {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
}
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'F_WRITE_OFF_LIST', 'con_contract_cashflow');
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
......@@ -112,7 +112,7 @@
} catch (e) {
raise_app_error(e);
}
if (record_data.templet_code == 'FINANCE_LEASE_CONTRACT'||record_data.templet_code == 'BUSINESS_CONTRACT'||record_data.templet_code == 'BUSINESS_CONTRACT_XJ'||record_data.templet_code=='LEASE_EXCHANGE'||record_data.templet_code=='LEASE_EXCHANGE_GN'||record_data.templet_code=='FINANCE_LEASE_CONTRACT_EX') {
if (record_data.templet_code == 'FINANCE_LEASE_CONTRACT'||record_data.templet_code == 'BUSINESS_CONTRACT'||record_data.templet_code == 'BUSINESS_CONTRACT_XJ'||record_data.templet_code=='LEASE_EXCHANGE'||record_data.templet_code=='LEASE_EXCHANGE_GN'||record_data.templet_code=='FINANCE_LEASE_CONTRACT_EX'||record_data.templet_code=='BUSINESS_CONTRACT_GK') {
// word转pdf
var pdf_file_path=datePath+guid_file_name_tables[0].guid_file_name + 'con_' + record_data.content_id;
......
......@@ -70,8 +70,8 @@
}
}
function con560_con_contract_detail() {
var records = $('con560_contract_result_ds').getSelected();
var seal_record = $('seal_info_ds').getCurrentRecord();
if (!records.length) {
Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录');
return;
......@@ -86,12 +86,14 @@
}
}
var TerminateData = [];
debugger
for (var i = 0; i < records.length; i++) {
if(records[i].data.is_terminate=='否'){
$L.showInfoMessage("提示",'未收金额如果不为0不可进行合同结束');
return;
}
jQuery.each(seal_record.data, function(j, v){
records[i].set( j , v );
});
records[i].set('_status', 'update');
TerminateData.push(records[i].data);
}
......@@ -183,12 +185,19 @@
}
}
function onIndexChange(ds, record, name, value, oldvalue) {
function onIndexChange(ds, record, name, value, oldvalue){
$('receivedAmountDs').setQueryParameter('contract_id', record.get('contract_id'));
$('unreceivedAmountDs').setQueryParameter('contract_id', record.get('contract_id'));
$('receivedAmountDs').query();
$('unreceivedAmountDs').query();
/*$('seal_info_ds').setQueryParameter('contract_id', record.get('contract_id'));
$('seal_info_ds').query();*/
if(Ext.isEmpty($('seal_info_ds').getCurrentRecord())){
$('seal_info_ds').create();
}
}
]]></script>
......@@ -202,6 +211,7 @@
<a:dataSet id="con560_lease_organization_name_ds" loadData="true"
model="basic.hls_lease_organization_for_lov"/>
<a:dataSet id="con560_contract_status_grid_ds" lookupCode="CON500_CONTRACT_STATUS"/>
<a:dataSet id="seal_number_ds" lookupCode="SEAL_NUMBER_FINISH"/>
<a:dataSet id="con560_contract_query_ds" autoCreate="true">
<a:fields>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovLabelWidth="100"
......@@ -240,16 +250,27 @@
model="cont.CON560.con_contract_finish_for_query" queryDataSet="con560_contract_query_ds"
queryUrl="${/request/@context_path}/autocrud/cont.CON560.con_contract_finish_for_query/query"
selectable="true" selectionModel="single">
<!-- <a:fields>-->
<!-- <a:field name="contract_status_n" displayField="code_value_name"-->
<!-- options="con560_contract_status_grid_ds" returnField="contract_status"-->
<!-- valueField="code_value"/>-->
<!-- </a:fields>-->
<!--<a:fields>
<a:field name="contract_status_n" displayField="code_value_name" options="con560_contract_status_grid_ds" returnField="contract_status" valueField="code_value"/>
</a:fields>-->
<a:events>
<a:event name="indexChange" handler="onIndexChange"/>
<a:event name="query" handler="aut_authority_list_validate_query"/>
</a:events>
</a:dataSet>
<a:dataSet id="seal_info_ds" autoQuery="true" model="cont.CON560.con_contract_seal_info">
<a:fields>
<a:field name="instruments_types" readOnly="true" defaultValue="所有权转移通知书"/>
<a:field name="common_seal" readOnly="true" defaultValue="Y" uncheckedValue="N" checkedValue="Y"/>
<a:field name="corporate_visa_seal" readOnly="true" defaultValue="N" uncheckedValue="N" checkedValue="Y"/>
<a:field name="legal_seal" readOnly="true" defaultValue="N" uncheckedValue="N" checkedValue="Y"/>
<a:field name="con_special_seal" readOnly="true" defaultValue="N" uncheckedValue="N" checkedValue="Y"/>
<a:field name="financial_seal" readOnly="true" defaultValue="N" uncheckedValue="N" checkedValue="Y"/>
<a:field name="supervisio_seal" readOnly="true" defaultValue="N" uncheckedValue="N" checkedValue="Y"/>
<a:field name="seal_number_n" readOnly="true" displayField="code_value_name" options="seal_number_ds" returnField="seal_number" valueField="code_value" defaultValue="一式一份" />
<a:field name="seal_number" readOnly="true" defaultValue="SEAL_O_ON_NUMBER" />
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
......@@ -265,7 +286,7 @@
<!-- <a:comboBox name="lease_organization_name" bindTarget="con560_contract_query_ds" prompt="事业部"/>-->
<a:comboBox name="contract_status_n" bindTarget="con560_contract_query_ds" prompt="合同状态"/>
</a:form>
<a:grid id="con560_con_contract_grid_ds" bindTarget="con560_contract_result_ds" height="250"
<a:grid id="con560_con_contract_grid_ds" bindTarget="con560_contract_result_ds" height="350"
marginWidth="30" navBar="true">
<a:toolBar>
......@@ -338,6 +359,24 @@
</a:columns>
</a:grid>
</a:tab>
<a:tab prompt="用印信息" width="110">
<a:grid id="seal_info_ds_id" bindTarget="seal_info_ds" height="250" marginWidth="55" navBar="true">
<a:columns>
<a:column name="instruments_types" prompt="文书种类"/>
<a:column name="common_seal" prompt="公章" editor="seal_info_check_id"/>
<a:column name="corporate_visa_seal" prompt="法人签证章" editor="seal_info_check_id"/>
<a:column name="legal_seal" prompt="法人章" editor="seal_info_check_id"/>
<a:column name="con_special_seal" prompt="合同专用章" editor="seal_info_check_id"/>
<a:column name="financial_seal" prompt="财务章" editor="seal_info_check_id"/>
<a:column name="supervisio_seal" prompt="监管专用章" editor="seal_info_check_id"/>
<a:column name="seal_number_n" prompt="文书部数" editor="seal_info_combo_id"/>
</a:columns>
<a:editors>
<a:checkBox id="seal_info_check_id"/>
<a:comboBox id="seal_info_combo_id"/>
</a:editors>
</a:grid>
</a:tab>
</a:tabs>
</a:tabPanel>
</a:screenBody>
......
......@@ -130,6 +130,8 @@
$('receivedAmountDs').query();
$('unreceivedAmountDs').query();
$('seal_info_ds').setQueryParameter('contract_id', record.get('contract_id'));
$('seal_info_ds').query();
}
]]></script>
......@@ -186,6 +188,18 @@
<a:event name="query" handler="aut_authority_list_validate_query"/>
</a:events>
</a:dataSet>
<a:dataSet id="seal_info_ds" autoQuery="true" model="cont.CON560.con_contract_seal_info">
<a:fields>
<a:field name="instruments_types" readOnly="true"/>
<a:field name="common_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="corporate_visa_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="legal_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="con_special_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="financial_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="supervisio_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="seal_number_n" readOnly="true"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<!-- <a:screenTopToolbar>-->
......@@ -266,6 +280,24 @@
</a:columns>
</a:grid>
</a:tab>
<a:tab prompt="用印信息" width="110">
<a:grid bindTarget="seal_info_ds" height="250" marginWidth="55" navBar="true">
<a:columns>
<a:column name="instruments_types" prompt="文书种类"/>
<a:column name="common_seal" prompt="公章" editor="seal_info_check_id"/>
<a:column name="corporate_visa_seal" prompt="法人签证章" editor="seal_info_check_id"/>
<a:column name="legal_seal" prompt="法人章" editor="seal_info_check_id"/>
<a:column name="con_special_seal" prompt="合同专用章" editor="seal_info_check_id"/>
<a:column name="financial_seal" prompt="财务章" editor="seal_info_check_id"/>
<a:column name="supervisio_seal" prompt="监管专用章" editor="seal_info_check_id"/>
<a:column name="seal_number_n" prompt="文书部数" editor="seal_info_combo_id"/>
</a:columns>
<a:editors>
<a:checkBox id="seal_info_check_id"/>
<a:comboBox id="seal_info_combo_id"/>
</a:editors>
</a:grid>
</a:tab>
</a:tabs>
</a:tabPanel>
</a:screenBody>
......
......@@ -131,7 +131,6 @@
}
}
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)) {
......@@ -172,28 +171,35 @@
}
Leaf.onReady(function() {
if("${/model/role_info/record/@role_code}"=="0018"||"${/model/role_info/record/@role_code}"=="0019"){
$('CON601_con_contract_grid_ds').hideColumn('account_due_times');
$('CON601_con_contract_grid_ds').hideColumn('account_due_days');
$('CON601_con_contract_grid_ds').hideColumn('account_due_amount');
$('CON601_con_contract_grid_ds').hideColumn('ac_received_amount');
$('CON601_con_contract_grid_ds').hideColumn('ac_unreceived_amount');
document.getElementById('account_due_times_from_id').style.display = "none";
document.getElementById('account_due_times_from_id_prompt').style.display = "none";
document.getElementById('account_due_times_to_id').style.display = "none";
document.getElementById('account_due_times_to_id_prompt').style.display = "none";
document.getElementById('account_due_days_from_id').style.display = "none";
document.getElementById('account_due_days_from_id_prompt').style.display = "none";
document.getElementById('account_due_days_to_id').style.display = "none";
document.getElementById('account_due_days_to_id_prompt').style.display = "none";
document.getElementById('account_due_amount_from_id').style.display = "none";
document.getElementById('account_due_amount_from_id_prompt').style.display = "none";
document.getElementById('account_due_amount_to_id').style.display = "none";
document.getElementById('account_due_amount_to_id_prompt').style.display = "none";
$('CON601_con_contract_grid_ds').hideColumn('account_due_times');
$('CON601_con_contract_grid_ds').hideColumn('account_due_days');
$('CON601_con_contract_grid_ds').hideColumn('account_due_amount');
$('CON601_con_contract_grid_ds').hideColumn('ac_received_amount');
$('CON601_con_contract_grid_ds').hideColumn('ac_unreceived_amount');
document.getElementById('account_due_times_from_id').style.display = "none";
document.getElementById('account_due_times_from_id_prompt').style.display = "none";
document.getElementById('account_due_times_to_id').style.display = "none";
document.getElementById('account_due_times_to_id_prompt').style.display = "none";
document.getElementById('account_due_days_from_id').style.display = "none";
document.getElementById('account_due_days_from_id_prompt').style.display = "none";
document.getElementById('account_due_days_to_id').style.display = "none";
document.getElementById('account_due_days_to_id_prompt').style.display = "none";
document.getElementById('account_due_amount_from_id').style.display = "none";
document.getElementById('account_due_amount_from_id_prompt').style.display = "none";
document.getElementById('account_due_amount_to_id').style.display = "none";
document.getElementById('account_due_amount_to_id_prompt').style.display = "none";
var grid_id = $('CON601_con_contract_grid_ds');
grid_id.hideColumn('account_due_times');
grid_id.hideColumn('account_due_days');
grid_id.hideColumn('account_due_amount');
}
if("${/model/role_info/record/@role_code}"=="0020"||"${/model/role_info/record/@role_code}"=="0030"){
$('CON601_con_contract_grid_ds').hideColumn('account_due_times');
$('CON601_con_contract_grid_ds').hideColumn('account_due_days');
$('CON601_con_contract_grid_ds').hideColumn('account_due_amount');
$('CON601_con_contract_grid_ds').hideColumn('ac_received_amount');
$('CON601_con_contract_grid_ds').hideColumn('ac_unreceived_amount');
}
});
]]></script>
......
......@@ -206,7 +206,7 @@
hdrecord.set('currency_code', currency_code);
hdrecord.set('currency_name', currency_name);
record.set('act_amount', minus(record.get('amount'), record.get('sum_ddct_amount') || 0));
} else if(name=='amount_vender'&& value){
} else if(name=='amount_vender'){
var due_amount=record.get('due_amount');
var other_payment2=record.get('other_payment2');
var amount_agent=minus(minus(due_amount,other_payment2),value);
......@@ -443,22 +443,9 @@
function csh501_print() {
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var records_l = $(lnds_id).getAll();
var hd_record = $(hdds_id).getCurrentRecord();
//add by st
var url;
/* url = $('tre_loan_con_print_excel_link_id').getUrl() + '?payment_req_id=' +hd_record.get('payment_req_id');
window.open(href = url);*/
var templet_code = 'CSH_PAYMENT_REQ';
// 根据不同的厂商调用不用的模板
if(hd_record.get('vender_name').indexOf('永立')>=0){
var url_l = $('csh_payment_req_word_print_link_id').getUrl() + '?document_id=' + hd_record.get('payment_req_id') + '&document_table=CSH_PAYMENT_REQ_YL&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON';
}else{
var url_l = $('csh_payment_req_word_print_link_id').getUrl() + '?document_id=' + hd_record.get('payment_req_id') + '&document_table=CSH_PAYMENT_REQ&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON';
}
var url_l = $('csh_payment_req_word_print_link_id').getUrl() + '?document_id=' + hd_record.get('payment_req_id') + '&document_table=CSH_PAYMENT_REQ&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON';
window.open(href = url_l, target = "_self");
......@@ -774,13 +761,16 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
console.log('${/parameter/@division}');
var total_amount_agent=0;
var total_amount_vender=0;
var total_apply_amount=0;
//检验输入的数据是否符合要求
var check_due_amount_flag=true;
var line_datas=$(ds_line_id).data;
var head_record=$(ds_id).getAt(0);
//高空作业车个数
var gk_contract_num=0;
for(var i=0;i<line_datas.length;i++){
var line_data=line_datas[i];
//应付我司金额
......@@ -796,6 +786,10 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
//买断机合同 个数
if(amount_vender==0 || '${/parameter/@division}'==30){
gk_contract_num=gk_contract_num+1;
}
//根据金额判断代理店和厂商不能为空
if(amount_agent>0 &&!bp_bank_account_id){
......@@ -805,7 +799,7 @@
}
if(amount_vender>0 &&!vender_bank_account_id){
$L.showErrorMessage("提示",'请选择厂商账号信息!');
$L.showErrorMessage("提示",'请选择委托付款金额不为0的厂商账号信息!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
......@@ -823,10 +817,10 @@
total_amount_vender=plus(total_amount_vender,amount_vender);
}
//取消提示
/* if(!check_due_amount_flag){
$L.showInfoMessage("提示",'应付金额应等于应付我司金额,委托付款金额和首付款抵充金额之和!');
}*/
if(gk_contract_num<line_datas.length&&gk_contract_num!=0){
$L.showErrorMessage("提示",'买断机合同(即厂商的付款金额为0)不可与其他正常合同同时进行付款申请支付');
return false;
}
//给头表赋值
$(ds_id).getAt(0).set('amount_agent_total',total_amount_agent);
$(ds_id).getAt(0).set('amount_vender_total',total_amount_vender);
......
<?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>
<a:model-update model="hls.HLS811.hls_doc_file_templet_get_atm"/>
<s:server-script import="contract_print_path.js"><![CDATA[
importPackage(java.io);
importPackage(Packages.hls.plugin.docx4j);
importPackage(Packages.leaf.plugin.word2pdf);
importPackage(Packages.org.apache.commons.io);
//删除文件
function deleteFile(filePath) {
var file = new File(filePath);
if (file.exists()) {
file.delete();
}
}
//生成pdf
function wordToPdf(word_file_path,pdf_file_path) {
// word转pdf
var pdf_file_path_new = pdf_file_path + '.pdf';
var wordToPdf = new WordToPdf($instance('uncertain.ocm.IObjectRegistry'), "jacob-1.18-x64.dll");
wordToPdf.word2pdf(word_file_path, pdf_file_path_new);
//删除word文件
//deleteFile(word_file_path);
return pdf_file_path_new;
}
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 transfer(file_path, os) {
println(file_path);
var fis = new FileInputStream(file_path);
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 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_name, file_path) {
$ctx["__request_type__"] = 'file'; //to indicate this request is not a JSON_REQUEST
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(file_name, 'UTF-8'));
var os = resp.getOutputStream();
//transfer(file_path, os);
write_os_to_file(file_path, os);
os.flush();
}
//按日期创建目录
function getDatePath() {
set_parameter_file_path();
var file_path = $ctx.parameter.pdf_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 collection_create_content() {
try {
var datePath = getDatePath();
FileUtils.forceMkdir(new File(datePath)); //根据日期创建目录
var attachment_batch_dl = $bm('hls.HLS811.hls_doc_file_templet_get_atm');
var result = attachment_batch_dl.queryAsMap({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table,
batch_flag: $ctx.parameter.batch_flag,
content_id: $ctx.parameter.content_id
});
var from_file_data = result.getChildren();
for (var i = 0;i < from_file_data.length;i++) {
if (!$ctx.parameter.file_path) {
set_parameter_file_path();
}
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;
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 + 'doc' + 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.toString(), 'COMMON');
} 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 filename_str = record_data.to_file_name;
var outputfilename= filename_str.substr(0, filename_str.length - 5) +'.pdf';
var pdf_file = new File(outputfilepath);
var file_size = 0;
if (pdf_file.exists()) {
file_size = pdf_file.length();
}
$bm('hls.HLS811.hls_file_content_copy_update').update({
table_name: 'HLS_DOC_FILE_CONTENT',
content_id: record_data.content_id,
file_name: outputfilename.toString(),
file_path: outputfilepath.toString(),
source_type: $ctx.parameter.source_type
});
//var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
//HlsFileUtil.downloadFile(encodeURI(to_file_path,'utf-8'),encodeURI(to_file_name,'utf-8'),resp);
//print(outputfilepath.toString());
//print(outputfilename.toString());
download_file(outputfilename.toString(),outputfilepath.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>
......@@ -124,7 +124,6 @@
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
debugger;
if ((ds.id).indexOf('hls_bp_master') != -1) {
// record.getField('cell_phone').setRequired(true);
//record.getField('cell_phone').setRequired(true);
......@@ -137,6 +136,24 @@
if (ds.fields.parent_id) {
record.getField('parent_id_n').setReadOnly(true);
}
if(record.get('taxpayer_type')){
var value = record.get('taxpayer_type');
if(value == 'SMALL_SCALE_TAXPAYER'){
record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
record.getField('tax_registry_num').setRequired(false);
}
if(value == 'GENERAL_TAXPAYER'){
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
record.getField('tax_registry_num').setRequired(true);
}
}
}
};
......@@ -506,6 +523,8 @@
var test_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC', 'hls_bp_master');
var test_ds_id1 = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE_1', 'hls_bp_master');
var test_ds_id2 = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE', 'hls_bp_master');
// var org_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BILLING_1', 'hls_bp_master');
if (ds.id==test_ds_id1||ds.id==test_ds_id2) {
var hd_ds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC', 'hls_bp_master');
......@@ -526,7 +545,6 @@
bp2_record.set('marital_status', '40');
}
}else if(record.get('marital_status')=='30'){
debugger;
var bp2_record = $(test_ds_id2).getCurrentRecord();
if(bp2_record){
record.set('bp_name_sp',bp2_record.get('bp_name_sp'));
......@@ -544,6 +562,24 @@
}
if(ds.id == test_ds_id){
if(name == 'taxpayer_type' && value){
if(value == 'SMALL_SCALE_TAXPAYER'){
record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
record.getField('tax_registry_num').setRequired(false);
}
if(value == 'GENERAL_TAXPAYER'){
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
record.getField('tax_registry_num').setRequired(true);
}
}
}
};
......
......@@ -8,10 +8,49 @@
//退出按钮
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
$('hls_bp_master_billing').close();
}
};
// 加载事件(form)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
if(record.get('taxpayer_type')){
var value = record.get('taxpayer_type');
if(value == 'SMALL_SCALE_TAXPAYER'){
record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
record.getField('tax_registry_num').setRequired(false);
}
if(value == 'GENERAL_TAXPAYER'){
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
record.getField('tax_registry_num').setRequired(true);
}
}
};
// 更新事件
window['${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value) {
if(name == 'taxpayer_type' && value){
if(value == 'SMALL_SCALE_TAXPAYER'){
record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
record.getField('tax_registry_num').setRequired(false);
}
if(value == 'GENERAL_TAXPAYER'){
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
record.getField('tax_registry_num').setRequired(true);
}
}
};
Leaf.onReady(function () {
Leaf.onReady(function () {
var billing_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'hls_bp_master');
// console.log($(billing_ds));
$(billing_ds).setQueryParameter("bp_id","${/parameter/@bp_id}");
......
......@@ -74,7 +74,6 @@
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master');
function open_bp_modify_win(ds_id, record_id) {
var user_category ='${/model/default_value/record/@user_category}';
var record = $(ds_id).findById(record_id);
var param = record.data;
......
......@@ -41,6 +41,7 @@
<a:link id="hls_fin_calc_single_variable_calc_link_id" model="hls.HLS500.hls_fin_calc_single_variable_calc" modelaction="update"/>
<a:link id="hls_fin_calc_single_variable_manual_link_id" model="hls.HLS500.hls_fin_calc_single_variable_calc" modelaction="execute"/>
<a:link id="test_link_id" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calc_save_n.lsc"/>
<a:link id="hls_fin_calculator_print_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_history_pdf_print.lsc"/>
<style><![CDATA[
.finGrid td[dataindex=percent]{
......@@ -82,6 +83,14 @@
Leaf.Masker.mask(document.documentElement, '${l:HLS.LOADING}');
function hls_hls500_3JD() {
lock_calc_current_window('打印中');
var calc_session_id = '${/parameter/@calc_session_id}';
var url_l = $('hls_fin_calculator_print_link_id').getUrl() + '?document_id=' + calc_session_id + '&document_table=HLS_FIN_CALCULATOR_HD&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON';
window.open(href = url_l, target = "_self");
unlock_calc_current_window();
}
function hls_hls500_save(nextStep, source_procedure) {
debugger;
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
......@@ -1243,6 +1252,11 @@
Ext.fly('hls_fin_calculator_export_grid_id_wrap').setStyle({
display: 'none'
});
if('${/parameter/@document_category}' == 'PROJECT' || '${/parameter/@document_category}' == 'CONTRACT' ){
Ext.fly('hls_hls500_user_button3_col_id').setStyle({
display: 'none'
});
}
});
function hls_hls500_import() {
......@@ -1944,6 +1958,11 @@ debugger;
<a:gridButton id="hls_hls500_user_button2_col_id" click="hls_hls500_NJD" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="USER_BUTTON3">
<c:process-config>
<a:gridButton id="hls_hls500_user_button3_col_id" click="hls_hls500_3JD" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="*">
<c:process-config>
<a:gridButton id="hls500_${@button_code}" click="hls500_define_button" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
......
......@@ -59,6 +59,8 @@
<!--<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>-->
<a:link id="prj_check_prj_record_link_n" model="hls.HLS500N.check_prj_record" modelaction="execute"/>
<script type="text/javascript"><![CDATA[
jQuery.noConflict();
window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () {
......@@ -917,29 +919,64 @@
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if ($(ds_id).validate()) {
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('prj_approval_link_id').getUrl(),
para: {
project_id: project_id
},
scope: this,
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
Leaf.request({
url: $('prj_check_prj_record_link_n').getUrl(),
para: {
'project_id': project_id
},
success: function(res) {
var secondary_lease = res.result.secondary_lease;
var payment_deduction = res.result.payment_deduction;
var price_list = res.result.price_list;
var down_payment_rate_new=res.result.down_payment_rate_new;
var H16 = record.get('down_payment');
var H97 = record.get('third_party_deposit');
var H99 = record.get('other_fee');
var H102 = record.get('other_fee2');
var show = down_payment_rate_new * 100;
if((price_list=='HL_PRICR_E'||price_list=='HL_PRICR_TEST'||price_list=='HL_PRICR_NTEST'||price_list=='HL_PRICR_EN') && secondary_lease=='NO') {
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%');
return;
}
});
});
}
if ($(ds_id).validate()) {
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('prj_approval_link_id').getUrl(),
para: {
project_id: project_id
},
scope: this,
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
}
},
failure: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
error: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
scope: this
});
};
......
......@@ -4,10 +4,10 @@
<a:model-query fetchAll="true" model="rpt.RPT5090.atm_update" rootPath="/model/day"/>
<a:model-query fetchAll="true" model="rpt.RPT5090.atm_update_month" rootPath="/model/month"/>
<s:server-script><![CDATA[
var para = $ctx.current_parameter || $ctx.parameter;
println(para.toXML());
<!-- var para = $ctx.current_parameter || $ctx.parameter;-->
<!-- println(para.toXML());-->
$ctx.parameter.file_name='财务收支一览表.xlsx';
$ctx.parameter.file_path = '/u01/hls_file/task_excel/';
$ctx.parameter.file_path = 'D:/u01/hls_file/task_excel';
]]></s:server-script>
<dr:excel-report enableTask="true" fileName="${/parameter/@file_name}">
<dr:styles>
......
......@@ -29,6 +29,8 @@
attch_file_path:mail_list_result[i].attch_file_path,
attch_flag:mail_list_result[i].attch_flag //附件标志
};
println('1111');
println(mail_list_result[i].attch_file_path);
var sm = new MailSend();
var stringResult = sm.sendMain(JSON.stringify(jsonString));//调用接口
var ob = JSON.parse(stringResult);//将接口返回的string字符串解析成对象
......
......@@ -3,6 +3,7 @@
<a:init-procedure>
<a:model-query defaultWhereClause="v.code=&apos;ZJ_WFL_WORKFLOW_STATUS&apos; and v.code_value = &apos;1&apos;" model="zjwfl.sys_code_default_value" rootPath="workflow_status_default_value"/>
<a:model-query defaultWhereClause="v.code=&apos;ZJ_WFL_WORKFLOW_STATUS&apos; and v.code_value in (&apos;1&apos;,&apos;10&apos;,&apos;-1&apos;,&apos;-1000&apos;)" model="zjwfl.sys_code_default_value" rootPath="workflow_status_list"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;0014&apos;,&apos;0013&apos;,&apos;0012&apos;,&apos;0006&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
</a:init-procedure>
<a:view>
<a:link id="pageLink_node_approve_history" url="${/request/@context_path}/modules/zjwfl/ZJWFL1060/zj_wfl_monitoring_node_approve_history.lview"/>
......@@ -85,6 +86,12 @@
return '<a href=\"javascript:winOpen_do_operation(' + record.get('instance_id') + ',' + record.get('workflow_id') + ')\">操作</a>';
}
}
function onload(ds) {
var grid_id = $('monitorDs_grid');
if('${/model/role_flag_path/record/@sys_role_flag}' == 'Y') {
grid_id.hideColumn('do_operation');
}
}
]]></script>
<a:dataSets>
<a:dataSet id="instanceStatusDs">
......@@ -104,7 +111,11 @@
<a:field name="workflow_desc" readOnly="true"/>
</a:fields>
</a:dataSet>
<a:dataSet id="monitorDs" autoPageSize="true" autoQuery="true" model="zjwfl.ZJWFL1060.zj_wfl_monitoring_query" queryDataSet="para_monitorDs"/>
<a:dataSet id="monitorDs" autoPageSize="true" autoQuery="true" model="zjwfl.ZJWFL1060.zj_wfl_monitoring_query" queryDataSet="para_monitorDs">
<a:events>
<a:event name="load" handler="onload"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:form column="4" labelWidth="100" marginWidth="50" title="查询条件">
......
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