Commit 6ababe17 authored by 38823's avatar 38823

经租代码

parent e6bad3e6
......@@ -76,6 +76,12 @@
From hls_bp_master m
Where m.bp_id = cc.bp_id_agent_level1) bp_id_agent_level1_n,
cc.termination_date,
cc.search_term_1,
(select pp.project_number
from prj_project pp,prj_project_lease_item ppli,con_contract_lease_item ccli
where pp.project_id=ppli.source_project_id
and ppli.project_lease_item_id = ccli.project_lease_item_id
and ccli.contract_id = cc.contract_id) pur_number,
cc.lease_channel,
t2.cf_direction,
nvl(t2.billing_status,'NOT') billing_status,
......
......@@ -42,6 +42,11 @@
<bm:field name="full_elec_invoice_flag"/>
<bm:field name="full_elec_invoice_flag_n"/>
<bm:field name="business_type" />
<bm:field name="business_type_desc"/>
<bm:field name="pur_model"/>
<bm:field name="pur_unit"/>
<bm:field name="search_term_1"/>
<bm:field name="vender_project_number"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
......@@ -91,7 +96,7 @@
where v.rate_type_code = 'MANUAL') as exchange_rate_type_desc,
cf.times,
cf.last_received_date,
t.cf_item,
cf.cf_item,
(select i.description
from hls_cashflow_item i
where i.cf_item = t.cf_item) as cf_item_desc,
......@@ -114,6 +119,10 @@
else
''
end rl_flag,
con.con_search_term_1 as search_term_1,
con.vender_project_number,
decode(con.division,95,'高空作业平台','') as pur_model,
decode(con.division,95,'台','') as pur_unit,
con.business_type,
t.full_elec_invoice_flag,
(select v.code_value_name value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t.full_elec_invoice_flag) full_elec_invoice_flag_n
......
......@@ -65,6 +65,8 @@
WHERE l.ref_n04 = t.journal_line_id),0) cf_billing_amount,
t.contract_id,
con.contract_number,
con.con_search_term_1 as search_term_1,
con.vender_project_number,
con.contract_name,
con.project_id,
con.project_number,
......@@ -91,7 +93,11 @@
t.cf_item,
t.tax_amount,
'违约金' cf_item_desc,
'融资租赁费' AS product_name,
decode(con.division,95,'*经营租赁*'||'租赁费'||'('||to_char((SELECT cf.transaction_date FROM hls_journal_detail cf WHERE cf.journal_line_id = t.journal_line_id),'MM')||'月'||')','融资租赁费') as product_name,
decode(con.division,95,'高空作业平台','') as pur_model,
decode(con.division,95,'台','') as pur_unit,
con.business_type,
(select v.code_value_name from sys_code_values_v v where v.code = 'BUSINESS_TYPE' and v.code_value = con.business_type) business_type_desc,
t.invoice_kind_type,
(select v.code_value_name
from sys_code_values_v v
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$Date: 2023-10-18
$Revision: 1.0
$Purpose: 经营性租赁销项发票维护
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
FROM (SELECT t1.invoice_hd_id,
t1.description,
t1.document_number,
TO_CHAR(t1.invoice_date, 'yyyy-mm-dd') AS invoice_date,
t1.document_category,
t1.contract_id,
t1.contract_number,
nvl(t1.contract_name,(select contract_name from con_contract
where contract_id =(select cf.contract_id
from con_contract_Cashflow cf,acr_invoice_ln ln
where ln.invoice_hd_id=t1.invoice_hd_id
and cf.cashflow_id=ln.cashflow_id
and rownum=1)
))contract_name, --modify by wuts 2019-1-22
--decode(t1.lease_channel,'01',t1.project_name,'') contract_name2,
t1.project_id,
t1.project_number,
t1.project_name,
t1.invoice_bp_id,
t1.invoice_bp_code,
t1.invoice_bp_name,
t1.invoice_title,
t1.invoice_number,
t1.invoice_status,
t1.invoice_status_desc,
t1.currency,
t1.business_type,
t1.business_type_desc,
t1.business_type_n,
t1.business_type_desc_n,
t1.invoice_kind,
t1.invoice_kind_desc,
t1.document_type,
t1.created_by_name,
t1.created_by,
TO_CHAR(t1.accounting_date, 'yyyy-mm-dd') AS accounting_date,
t1.total_amount,
t1.tax_amount,
t1.billing_method,
t1.lease_organization,
t1.lease_channel,
t1.division,
t1.company_id,
t1.spv_company_id,
t1.invoice_type,
t1.invoice_kind_type,
t1.invoice_kind_type_n,
t1.full_elec_invoice_flag,
t1.full_elec_invoice_flag_n
FROM acr_invoice_hd_v t1 where t1.division = 95
ORDER BY t1.invoice_date DESC, t1.document_number DESC) t1 #WHERE_CLAUSE#
ORDER BY invoice_date DESC, document_number DESC
]]></bm:query-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
ACR_INVOICE_PKG.delete_invoice(p_invoice_hd_id => ${@invoice_hd_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
UPDATE
acr_invoice_hd a
SET
a.merge_flag = ${@merge_flag}
WHERE
a.invoice_hd_id = ${@invoice_hd_id};
acr_invoice_pkg.invoice_row_merge(p_invoice_hd_id => ${@invoice_hd_id}, p_user_id => ${/session/@user_id}, p_merge_flag =>${@merge_flag});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="document_number_f" queryExpression="t1.document_number &gt;= ${@document_number_f}"/>
<bm:query-field name="document_number_t" queryExpression="t1.document_number &lt;= ${@document_number_t}"/>
<bm:query-field name="invoice_number_f" queryExpression="t1.invoice_number &gt;= ${@invoice_number_f}"/>
<bm:query-field name="invoice_number_t" queryExpression="t1.invoice_number &lt;= ${@invoice_number_t}"/>
<bm:query-field name="contract_number_f" queryExpression="t1.contract_number &lt;= ${@contract_number_f}"/>
<bm:query-field name="contract_number_t" queryExpression="t1.contract_number &lt;= ${@contract_number_t}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name}"/>
<bm:query-field name="invoice_bp_name" queryExpression="t1.invoice_bp_name like ${@invoice_bp_name}"/>
<bm:query-field name="invoice_status" queryExpression="t1.invoice_status like ${@invoice_status}"/>
<bm:query-field name="invoice_date_f" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_t" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_f" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@accounting_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_t" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@accounting_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/>
<bm:query-field name="total_amount_t" queryExpression="t1.total_amount &lt;= ${@total_amount_t}"/>
<bm:query-field name="invoice_bp_code_f" queryExpression="t1.invoice_bp_code &gt;= ${@invoice_bp_code_f}"/>
<bm:query-field name="invoice_bp_code_t" queryExpression="t1.invoice_bp_code &lt;= ${@invoice_bp_code_t}"/>
<bm:query-field name="currency" queryExpression="t1.currency = ${@currency}"/>
<bm:query-field name="business_type" queryExpression="t1.business_type = ${@business_type}"/>
<bm:query-field name="invoice_kind" queryExpression="t1.invoice_kind = ${@invoice_kind}"/>
<bm:query-field name="invoice_title" queryExpression="t1.invoice_title like ${@invoice_title}"/>
<bm:query-field name="created_by" queryExpression="t1.created_by = ${@created_by}"/>
<!--
<bm:query-field name="contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
-->
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
<bm:query-field name="lease_channel" queryExpression="t1.lease_channel = ${@lease_channel}"/>
<bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
<bm:query-field name="business_type_n" queryExpression="t1.business_type_n = ${@business_type_n}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;REJECT&apos;)"/>
<bm:data-filter enforceOperations="query" expression="nvl(t1.spv_company_id,t1.company_id)=${/session/@company_id}"/>
<bm:data-filter enforceOperations="query" expression="not exists (select 1 from acr_invoice_hd_wfl ah where ah.invoice_hd_id = t1.invoice_hd_id and ah.invoice_status = &apos;CONFIRMING&apos;)"/>
</bm:data-filters>
</bm:model>
\ No newline at end of file
......@@ -39,6 +39,8 @@
t1.currency,
t1.business_type,
t1.business_type_desc,
t1.business_type_n,
t1.business_type_desc_n,
t1.invoice_kind,
t1.invoice_kind_desc,
t1.document_type,
......@@ -58,7 +60,7 @@
t1.invoice_kind_type_n,
t1.full_elec_invoice_flag,
t1.full_elec_invoice_flag_n
FROM acr_invoice_hd_v t1
FROM acr_invoice_hd_v t1 where t1.division != 95
ORDER BY t1.invoice_date DESC, t1.document_number DESC) t1 #WHERE_CLAUSE#
ORDER BY invoice_date DESC, document_number DESC
]]></bm:query-sql>
......
......@@ -149,12 +149,16 @@
<bm:query-field name="invoice_apply_num" queryExpression="(exists(select 1 from acr_invoice_apply ap, acr_invoice_hd_wfl aw where ap.wfl_apply_status = 'APPROVED' and ap.apply_mode = 'APPLY' and ap.invoice_apply_id = aw.invoice_apply_id and aw.invoice_hd_id = t1.invoice_hd_id and ap.invoice_apply_num=${@invoice_apply_num}) or exists(select ap.invoice_apply_num from acr_invoice_apply ap, acr_invoice_hd_wfl aw where ap.wfl_apply_status = 'APPROVED' and ap.apply_mode = 'REVERSE' and ap.invoice_apply_id = aw.invoice_apply_id and aw.invoice_hd_id = t1.source_invoice_header_id and ap.invoice_apply_num=${@invoice_apply_num}) )"/>
<bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
<bm:query-field name="search_term_1" queryExpression="t1.search_term_1 = ${@search_term_1}"/>
<bm:query-field name="pur_number" queryExpression="t1.pur_number = ${@pur_number}"/>
<bm:query-field name="business_type_n" queryExpression="t1.business_type_n = ${@business_type_n}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.company_id = ${/session/@company_id} and t1.reversed_flag in( &apos;N&apos;,&apos;O&apos;)"/>
<bm:data-filter enforceOperations="query" expression="(t1.invoice_status=&apos;CONFIRM&apos; OR t1.invoice_status=&apos;POST&apos;)"/>
<bm:data-filter enforceOperations="query" expression="(t1.invoice_kind = &apos;0&apos; or t1.invoice_kind = &apos;2&apos;)"/>
<bm:data-filter enforceOperations="query" expression="t1.business_type_n!=&apos;LEASEOPERAT&apos;"/>
</bm:data-filters>
<bm:features>
<f:standard-who/>
......
......@@ -5,6 +5,10 @@
<bm:query-sql><![CDATA[
select t1.* from(SELECT confirmed_by_name,
create_je_flag,
business_type_n,
business_type_desc_n,
null as search_term_1,
null as pur_number,
document_type_desc,
vat_interface_status,
project_name,
......@@ -180,6 +184,7 @@
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="nvl(t1.reversed_flag ,'N')= &apos;N&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.business_type_n!=&apos;LEASEOPERAT&apos;"/>
<!-- <bm:data-filter enforceOperations="query" expression="t2.write_off_flag = &apos;FULL&apos;"/>-->
<bm:data-filter enforceOperations="query" expression="t1.vat_interface_status = &apos;BACK&apos;"/>
<!-- <bm:data-filter name="query" expression="rownum &lt;=1000"/>-->
......
......@@ -5,6 +5,10 @@
<bm:query-sql><![CDATA[
select t1.* from( SELECT confirmed_by_name,
create_je_flag,
business_type_n,
business_type_desc_n,
search_term_1,
pur_number,
document_type_desc,
vat_interface_status,
project_name,
......@@ -181,6 +185,7 @@
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_id = t2.contract_id"/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t2.write_off_flag = &apos;FULL&apos;"/>-->
<bm:data-filter enforceOperations="query" expression="t1.vat_interface_status = &apos;BACK&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.business_type_n!=&apos;LEASEOPERAT&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.claim_status not in (&apos;UNCLAIMED&apos;)"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.* from( SELECT confirmed_by_name,
create_je_flag,
business_type_n,
business_type_desc_n,
search_term_1,
pur_number,
document_type_desc,
vat_interface_status,
project_name,
company_id,
business_type_desc,
billing_method,
claim_status_n,
total_amount,
confirmed_date,
invoice_bp_code,
tax_amount,
owner_user_id,
receipt_number,
contract_number,
exchange_rate_quotation,
ref_d01,
ref_v05,
express_company,
currency,
confirmed_by,
contract_name,
invoice_code,
to_char(accounting_date,'yyyy-mm-dd')accounting_date,
ref_d04,
invoice_kind,
contract_id,
project_id,
ref_v02,
created_by,
ref_v08,
return_tax_amount,
ref_v03,
ref_n01,
document_number,
document_category,
reverse_date,
express_by,
express_note,
invoice_bp_id,
ref_v07,
source_document_number,
ref_v04,
ref_n10,
ref_n04,
ref_d02,
invoice_number,
bp_agent_name,
division_desc,
vat_invoice_status,
invoice_title,
posted_by_name,
express_status_desc,
ref_vat_invoice_code,
ref_n09,
currency_desc,
vat_red_notice_num,
last_receipt_print_time,
spv_company_id,
lease_organization_desc,
posted_date,
receipt_print_status,
ref_n08,
posted_by,
invoice_status_desc,
billing_method_desc,
exchange_rate_type_desc,
invoice_bp_name,
dif_tax_amount,
document_type,
reversed_flag_desc,
lease_channel,
bp_address_phone_num,
owner_user_name,
invoice_kind_desc,
ref_v10,
ref_v09,
express_date,
lease_organization,
last_updated_by,
tax_code,
description,
express_status,
to_char(invoice_date,'yyyy-mm-dd')invoice_date,
manual_invoice_flag,
exchange_rate_type,
document_category_desc,
gld_interface_flag,
last_update_date,
business_type,
period_name,
source_invoice_header_id,
distribution_set_id,
ref_invoice_number,
internal_period_num,
billing_way_desc,
net_amount,
express_num,
tax_msg,
ref_n05,
ref_n03,
billing_way,
batch_id,
vat_invoice_code,
bp_tax_registry_num,
created_by_name,
ref_v06,
ref_n06,
invoice_status,
ref_d05,
project_number,
exchange_rate,
express_by_name,
ref_v01,
ref_d03,
lease_channel_desc,
creation_date,
bp_bank_account,
division,
invoice_hd_id,
ref_n07,
reversed_flag,
claim_status,
ref_n02,
invoice_apply_num,
ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t.invoice_hd_id)csh_transaction_flag,
decode(ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t.invoice_hd_id),'NOT','未收款','PARTIAL','部分收款','FULL','完全收款')csh_transaction_flag_desc,
invoice_type,
invoice_kind_type,
invoice_kind_type_n,
bp_id_agent_level1,
full_elec_invoice_flag,
full_elec_invoice_flag_n
FROM acr_invoice_hd_v t) t1
#WHERE_CLAUSE#
ORDER BY t1.invoice_date desc , t1.document_number desc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
acr_invoice_claim_pkg.apply_invoice_confirm(p_invoice_hd_id => ${@invoice_hd_id},
p_user_id => ${/session/@user_id});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/>
<bm:query-field name="total_amount_t" queryExpression="t1.total_amount &lt;= ${@total_amount_t}"/>
<bm:query-field name="invoice_kind_desc" queryExpression="t1.invoice_kind_desc = ${@invoice_kind_desc}"/>
<bm:query-field name="invoice_status_desc" queryExpression="t1.invoice_status_desc = ${@invoice_status_desc}"/>
<bm:query-field name="claim_status" queryExpression="t1.claim_status = ${@claim_status}"/>
<bm:query-field name="claim_status_n" queryExpression="t1.claim_status_n = ${@claim_status_n}"/>
<bm:query-field name="csh_transaction_flag" queryExpression="t1.csh_transaction_flag = ${@csh_transaction_flag}"/>
<bm:query-field name="cf_item_desc" queryExpression="t1.cf_item_desc = ${@cf_item_desc}"/>
<bm:query-field name="document_number" queryExpression="t1.document_number like ${@document_number}"/>
<bm:query-field name="contract_number" queryExpression="t1.contract_number like ${@contract_number}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name}"/>
<bm:query-field name="invoice_title" queryExpression="t1.invoice_title like ${@invoice_title}"/>
<bm:query-field name="invoice_apply_num" queryExpression="t1.invoice_apply_num like ${@invoice_apply_num}"/>
<bm:query-field name="invoice_code" queryExpression="t1.invoice_code like ${@invoice_code}"/>
<bm:query-field name="vat_invoice_code" queryExpression="t1.vat_invoice_code like ${@vat_invoice_code}"/>
<bm:query-field name="invoice_number" queryExpression="t1.invoice_number like ${@invoice_number}"/>
<bm:query-field name="invoice_date_from" queryExpression=" to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_to" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="query_contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
<bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
<bm:query-field name="pur_number" queryExpression="t1.pur_number = ${@pur_number}"/>
<bm:query-field name="search_term_1" queryExpression="t1.search_term_1 = ${@search_term_1}"/>
<bm:query-field name="business_type_n" queryExpression="t1.business_type_n = ${@business_type_n}"/>
</bm:query-fields>
<bm:data-filters>
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_id = t2.contract_id"/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t2.write_off_flag = &apos;FULL&apos;"/>-->
<bm:data-filter enforceOperations="query" expression="t1.vat_interface_status = &apos;BACK&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.business_type_n=&apos;LEASEOPERAT&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.claim_status not in (&apos;UNCLAIMED&apos;)"/>
</bm:data-filters>
</bm:model>
......@@ -26,6 +26,27 @@
From con_contract c
Where c.contract_id = ah.contract_id) contract_number,
(Select c.search_term_1
from con_contract c
where c.contract_id = ah.contract_id) pur_contract_number,
(Select p.project_number
from prj_project p,
prj_project_lease_item ppli,
con_contract_lease_item ccli,
con_contract cc
where p.project_id = ppli.source_project_id
and ppli.project_lease_item_id =
ccli.project_lease_item_id
and ccli.contract_id = cc.contract_id
and cc.contract_id = ah.contract_id) pur_number,
(Select v.code_value_name
from sys_code_values_v v, con_contract cc
where v.code = 'BUSINESS_TYPE'
and v.code_value = cc.business_type
and cc.contract_id = ah.contract_id) business_type,
(Select hb.bp_code
From hls_bp_master hb
Where hb.bp_id = ah.bp_id) bp_code,
......
......@@ -18,6 +18,12 @@
(Select c.contract_number
From con_contract c
Where c.contract_id = h.contract_id) contract_number,
(Select c.search_term_1
from con_contract c
where c.contract_id=h.contract_id) pur_contract_number,
(Select p.project_number from prj_project p,prj_project_lease_item ppli,con_contract_lease_item ccli,
con_contract cc where p.project_id=ppli.source_project_id and ppli.project_lease_item_id=ccli.project_lease_item_id
and ccli.contract_id=cc.contract_id and cc.contract_id=h.contract_id) pur_number,
(Select c.contract_name
From con_contract c
Where c.contract_id = h.contract_id) contract_name,
......
......@@ -13,6 +13,7 @@
</bm:fields>
<bm:data-filters>
<bm:data-filter expression=" t1.enabled_flag = &apos;Y&apos; "/>
<bm:data-filter expression="t1.division != &apos;95&apos;"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="division" queryOperator="like"/>
......
......@@ -37,14 +37,14 @@
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
and PARENT_UNIT_ID <> 1544
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60'))
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60','95'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'DIVISION'
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60')
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60','95')
AND NOT EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
......
......@@ -13,5 +13,6 @@
</ns1:query-fields>
<ns1:data-filters>
<ns1:data-filter name="query" enforceOperations="t1.due_date is not null"/>
<ns1:data-filter enforceOperations="query" expression="t1.division !=95"/>
</ns1:data-filters>
</ns1:model>
......@@ -13,6 +13,8 @@
con_contract_workflow_pkg.check_con_lease_item(
p_contract_id =>${@contract_id},
p_machine_number =>${@machine_number},
p_source_project_id =>${@source_project_id},
p_ref_d09 =>to_date(${@ref_d09},'yyyy-mm-dd hh24:mi:ss'),
p_user_id => ${/session/@user_id}
);
end;
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
-- Call the procedure
CON_CONTRACT_PKG.init_con_op_atm(p_contract_id => ${@p_contract_id},
p_file_path => ${@p_file_path},
p_file_name => ${@p_file_name},
p_file_size =>${@p_file_size},
p_user_id=>${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</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 * from (select cc.times,
to_char(cc.due_amount, 'FM999,999,999,990.00') as due_amount,
to_char(cc.due_date, 'yyyy-mm-dd') as due_date
from con_contract_cashflow cc
where contract_id = ${/parameter/@contract_id}
order by times asc) t
#WHERE_CLAUSE#
#ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<!-- <bm:query-field name="contract_id" queryExpression="t.contract_id=${@contract_id}"/>-->
</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 *
from (select c.contract_id,
to_char(c.lease_item_amount, 'FM999,999,999,990.00') as lease_item_amount,
to_char(c.lease_start_date, 'yyyy-mm-dd') as lease_start_date,
(to_number(c.int_rate)*100||'%') as int_rate,
(to_number(c.deposit_ratio)*100||'%') as deposit_ratio,
to_char(c.deposit, 'FM999,999,999,990.00') as deposit,
to_char(c.first_pay_date, 'yyyy-mm-dd') as first_pay_date,
to_char(c.pmt, 'FM999,999,999,990.00') as pmt,
to_char(c.lease_start_date, 'yyyy-mm-dd') as margin_date,
c.lease_times,
to_char(c.total_rental, 'FM999,999,999,990.00') as total_rental
from con_contract c) t
#WHERE_CLAUSE#
#ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<!-- <bm:query-field name="contract_id" queryExpression="t.contract_id=${@contract_id}"/>-->
</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 * from (
SELECT c.contract_number,
h.bp_name,
--机型
ccli.modelcd pattern,
--合同签订日
to_char(c.CONTRACT_SIGN_DATE,'yyyy-mm-dd') inception_of_lease,
--c.rate
ch.bp_code client_bp_code,
ch.bp_name client_bp_name,
--机号
ccli.machine_number,
c.contract_id,
to_char(c.lease_start_date,'yyyy-mm-dd')lease_start_date,
--期间
c.lease_times,
(to_number(c.int_rate_display)*100||'%')int_rate_display
from con_contract c,
hls_bp_master h,
hls_bp_master ch,
con_contract_lease_item ccli
WHERE c.bp_id_agent_level1=h.bp_id
AND ccli.contract_id=c.contract_id
AND ch.bp_id=c.bp_id_tenant
) t
#WHERE_CLAUSE#
#ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<!-- <bm:query-field name="contract_id" queryExpression="t.contract_id=${@contract_id}"/>-->
</bm:query-fields>
</bm:model>
......@@ -9,10 +9,14 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select et.employee_type_code
from exp_employees ee, exp_employee_types et, sys_user su
select et.employee_type_code, ev.unit_id
from exp_employees ee,
exp_employee_types et,
sys_user su,
exp_employee_assigns_v ev
where ee.employee_id = su.employee_id
and ee.employee_type_id = et.employee_type_id
and ee.employee_id = ev.employee_id
and su.user_id = ${/session/@user_id}
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Feng
$Date: 2013-9-27 上午10:27:56
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:s="leaf.plugin.script" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CON_CONTRACT_V" defaultOrderBy="lease_end_date desc" needAccessControl="false">
<bm:fields>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="CON_CONTRACT.CONTRACT_ID"/>
<bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="CON_CONTRACT.CONTRACT_NUMBER"/>
<bm:field name="business_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE" prompt="CON_CONTRACT.BUSINESS_TYPE"/>
<bm:field name="document_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE" prompt="CON_CONTRACT.DOCUMENT_TYPE"/>
<bm:field name="document_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_CATEGORY" prompt="CON_CONTRACT.DOCUMENT_CATEGORY"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="CON_CONTRACT.COMPANY_ID"/>
<bm:field name="lease_organization" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ORGANIZATION" prompt="CON_CONTRACT.LEASE_ORGANIZATION"/>
<bm:field name="lease_channel" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_CHANNEL" prompt="CON_CONTRACT.LEASE_CHANNEL"/>
<bm:field name="division" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION" prompt="CON_CONTRACT.DIVISION"/>
<bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_TENANT" prompt="CON_CONTRACT.BP_ID_TENANT"/>
<bm:field name="bp_name" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_tenant and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_agent_level1" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_AGENT_LEVEL1" prompt="CON_CONTRACT.BP_ID_AGENT_LEVEL1"/>
<bm:field name="et_date" databaseType="DATE" datatype="java.util.Date" physicalName="ET_DATE" prompt="CON_CONTRACT.ET_DATE"/>
<bm:field name="owner_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OWNER_USER_ID" prompt="CON_CONTRACT.OWNER_USER_ID"/>
<bm:field name="inception_of_lease" databaseType="DATE" datatype="java.util.Date" physicalName="INCEPTION_OF_LEASE" prompt="CON_CONTRACT.INCEPTION_OF_LEASE"/>
<bm:field name="lease_end_date" databaseType="DATE" datatype="java.util.Date" physicalName="LEASE_END_DATE" prompt="CON_CONTRACT.LEASE_END_DATE"/>
<bm:field name="lease_item_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_ITEM_AMOUNT" prompt="CON_CONTRACT.LEASE_ITEM_AMOUNT"/>
<bm:field name="contract_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_STATUS" prompt="CON_CONTRACT.CONTRACT_STATUS"/>
<!--<bm:field name="signing_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SIGNING_USER_ID" prompt="CON_CONTRACT.SIGNING_USER_ID"/>-->
<bm:field name="signing_location" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SIGNING_LOCATION" prompt="CON_CONTRACT.SIGNING_LOCATION"/>
<bm:field name="residual_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RESIDUAL_VALUE" prompt="CON_CONTRACT.RESIDUAL_VALUE"/>
<bm:field name="signing_date" databaseType="DATE" datatype="java.util.Date" physicalName="SIGNING_DATE" prompt="CON_CONTRACT.SIGNING_DATE"/>
<!--<bm:field name="bp_id_vender" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_VENDER" prompt="CON_CONTRACT.BP_ID_VENDER"/>-->
<bm:field name="down_payment" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DOWN_PAYMENT"/>
<!--<bm:field name="signing_user_id_n" expression="(select name from exp_employees where employee_id = t1.signing_user_id)" forInsert="false" forUpdate="false"/>-->
<bm:field name="lease_channel_desc" expression="(select description from hls_lease_channel where lease_channel = t1.lease_channel)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>-->
<bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>-->
<bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_agent_desc"/>
<bm:field name="business_type_n"/>
<bm:field name="division_n"/>
<bm:field name="con_search_term_1"/>
<bm:field name="vender_project_number"/>
<bm:field name="amount_total" expression="(select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item=1)" forInsert="false" forUpdate="false"/>
<bm:field name="received_amount_total" expression="(select sum(ccc.received_amount) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item=1)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_principal" expression="(select sum(nvl(ccc.principal,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos;)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_interest" expression="(select sum(nvl(ccc.interest,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and cf_item=1)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_received_interest" expression="(select sum(nvl(ccc.received_interest,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and cf_item=1)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_received_penalty" expression="(nvl((select sum(nvl(ccc.received_amount,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item=9),0))" forInsert="false" forUpdate="false"/>
</bm:fields>
<bm:features>
<f:standard-who/>
<!--<s:bm-script><![CDATA[-->
<!--var cx = Packages.leaf.javascript.Context.getCurrentContext();-->
<!--Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");-->
<!--]]></s:bm-script>-->
</bm:features>
<bm:primary-key>
<bm:pk-field name="contract_id"/>
</bm:primary-key>
<bm:query-fields>
<bm:query-field field="contract_number" queryExpression="contract_number like upper(&apos;%&apos;||${@contract_number}||&apos;%&apos;)"/>
<bm:query-field field="owner_user_id" queryOperator="="/>
<bm:query-field field="bp_id_tenant" queryOperator="="/>
<bm:query-field field="lease_organization" queryOperator="="/>
<bm:query-field field="bp_id_agent_desc" queryExpression="bp_id_agent_desc like upper(&apos;%&apos;||${@bp_id_agent_desc}||&apos;%&apos;)"/>
</bm:query-fields>
<bm:data-filters>
<!-- <bm:field name="is_terminate" expression="((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item = 1) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item = 1)) = 0"/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_status in (&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;ADING&apos;) "/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t1.lease_end_date &lt;= sysdate"/> -->
<bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.con_finish_batch_id = ${@con_finish_batch_id}"/>
<bm:data-filter enforceOperations="query" expression="t1.division = &apos;95&apos;"/>
<!--<bm:data-filter enforceOperations="query" expression=" NOT EXISTS (SELECT 1 FROM con_contract_cashflow WHERE contract_id = t1.contract_id AND cf_item IN (1,8,52) AND (write_off_flag IN (&apos;PARTIAL&apos;, &apos;NOT&apos;) OR received_amount != due_amount))"/>-->
<!--<bm:data-filter enforceOperations="query" expression="exists (select 1 from con_contract where contract_id = t1.contract_id and created_by = ${/session/@user_id})"/>-->
</bm:data-filters>
</bm:model>
......@@ -83,6 +83,7 @@
<bm:data-filter enforceOperations="query" expression="t1.contract_status in (&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;REPURING&apos;,&apos;TERMINATING&apos;) "/>
<!-- <bm:data-filter enforceOperations="query" expression="t1.lease_end_date &lt;= sysdate"/> -->
<bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.division != &apos;95&apos;"/>
<!-- <bm:data-filter enforceOperations="query" expression=" not exists (select 1 from con_contract_cashflow ccw where ccw.contract_id = t1.contract_id and ccw.cf_item=1 and ccw.cf_status=&apos;RELEASE&apos; and nvl(ccw.output_tax_create_je_flag,'N')='N')"/>-->
<bm:data-filter enforceOperations="query" expression=" not exists (select 1 from con_contract_cashflow ccw , con_unearned_finance_income cf where ccw.contract_id = t1.contract_id and ccw.cf_item=1 and cf.cashflow_id(+)=ccw.cashflow_id and ccw.cf_status=&apos;RELEASE&apos; and nvl(cf.create_je_flag,'N')='N' and nvl(ccw.output_tax_create_je_flag,'N')='N')"/>
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_id = ${@contract_id}"/>-->
......
......@@ -68,7 +68,8 @@
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_status in (&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;ADING&apos;) "/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t1.lease_end_date &lt;= sysdate"/> -->
<bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.contract_id = ${@contract_id}"/>
<bm:data-filter enforceOperations="query" expression="t1.con_finish_batch_id = ${@con_finish_batch_id}"/>
<bm:data-filter enforceOperations="query" expression="t1.division != &apos;95&apos;"/>
<!--<bm:data-filter enforceOperations="query" expression=" NOT EXISTS (SELECT 1 FROM con_contract_cashflow WHERE contract_id = t1.contract_id AND cf_item IN (1,8,52) AND (write_off_flag IN (&apos;PARTIAL&apos;, &apos;NOT&apos;) OR received_amount != due_amount))"/>-->
<!--<bm:data-filter enforceOperations="query" expression="exists (select 1 from con_contract where contract_id = t1.contract_id and created_by = ${/session/@user_id})"/>-->
</bm:data-filters>
......
......@@ -7,26 +7,63 @@
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:operation name="execute">
<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.contract_use_seal_save(p_con_finish_batch_id => ${/parameter/@con_finish_batch_id},
p_user_id => ${/session/@user_id});
con_contract_closed_pkg.terminate_contract(
p_contract_id =>${@contract_id},
p_user_id =>${/session/@user_id}
p_con_finish_batch_id =>${/parameter/@con_finish_batch_id},
p_user_id =>${/session/@user_id},
p_company_id => ${/session/@company_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="insert">
<bm:parameters>
<bm:parameter name="con_finish_batch_id" output="true" outputPath="@con_finish_batch_id"/>
</bm:parameters>
<bm:update-sql>
<![CDATA[
declare
v_con_finish_batch_id contract_finish_batch.con_finish_batch_id%TYPE := contract_finish_batch_s.nextval;
begin
${@con_finish_batch_id} := v_con_finish_batch_id;
insert into contract_finish_batch
(con_finish_batch_id,
instance_id,
wfl_status,
created_by,
creation_date,
last_updated_by,
last_update_date)
values
(v_con_finish_batch_id,
null,
null,
${/session/@user_id},
sysdate,
${/session/@user_id},
sysdate
);
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql>
<![CDATA[
update con_contract cc
set
cc.con_finish_batch_id = ${/parameter/@con_finish_batch_id},
cc.last_updated_by = ${/session/@user_id},
cc.last_update_date = sysdate
where cc.contract_id = ${@contract_id}
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -63,6 +63,7 @@
Where t.bp_id_tenant = b.bp_id(+)
And t.contract_status = 'INCEPT'
And t.data_class = 'NORMAL'
And t.division != '95'
And dt.document_type(+) = t.document_type
And Exists
(Select 1
......
......@@ -22,6 +22,7 @@
bp_code,
bp_name,
bp_category,
bp_type,
(SELECT description FROM hls_bp_category WHERE bp_category = t1.bp_category) bp_category_name,
bp_class,
(SELECT code_value_name
......@@ -51,5 +52,6 @@
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 name="query" expression="t1.bp_type not in (&apos;RENTER&apos;,&apos;MAN_FACTURER&apos;,&apos;ASSET_REGULATOR&apos;)"/>
</bm:data-filters>
</bm:model>
......@@ -149,7 +149,8 @@
t.bp_id_tenant = b.bp_id(+) AND
t.contract_status in ('INCEPT','REPURING') AND
t.data_class = 'NORMAL' AND
dt.document_type(+) = t.document_type
dt.document_type(+) = t.document_type AND
t.division != '95'
) t1 #WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]></bm:query-sql>
......
......@@ -46,6 +46,10 @@
WHERE cc.contract_id = h.contract_id
AND cc.data_class = 'NORMAL'
AND cc.contract_status = 'CLOSED')
AND NOT EXISTS (SELECT 1
FROM con_contract cc
WHERE cc.contract_id = h.contract_id
AND cc.division = '95')
AND t.returned_flag = 'NOT'
AND EXISTS
(SELECT 1
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$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.division from (select hb.division,ee.user_id
from exp_emp_assign_e_v ee,
hls_bp_master h,
hls_bp_master_agent_division hb
where ee.unit_id = h.unit_id
and h.bp_id = hb.bp_id
and h.bp_category = 'AGENT') t #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="user_id" queryExpression="t.user_id=${@user_id}"/>
</bm:query-fields>
</bm:model>
......@@ -26,6 +26,7 @@
<bm:field name="mark" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MARK" prompt="HLS_ACR_EBANK_OUTPUT_TEMP.MARK"/>
<bm:field name="apply_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="APPLY_AMOUNT" ></bm:field>
<bm:field name="due_amount_his" databaseType="NUMBER" datatype="java.lang.Double" physicalName="DUE_AMOUNT_HIS" ></bm:field>
<bm:field name="division" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select cc.division from con_contract cc where cc.data_class=&apos;NORMAL&apos; and cc.division!=&apos;95&apos; and cc.dd_bank_account_num=t1.dd_bank_account_num and rownum=1)"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$Date: 2023-09-07
$Revision: 1.0
$Purpose:经租新增校验机号唯一性
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
-- Call the procedure
hlcm_pur_order_pkg.pur_check_lease_item(p_peoject_id => ${@project_id},
p_project_lease_item_id => ${@project_lease_item_id},
p_user_id =>${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$Date: 2023-09-05
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hlcm_pur_order_pkg.pur_wfl_start(
p_project_id =>${@project_id},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql>
<![CDATA[
update prj_project pp
set
pp.project_status = 'CANCEL',
pp.last_updated_by = ${/session/@user_id},
pp.last_update_date = sysdate
where pp.project_id = ${@project_id}
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -12,7 +12,7 @@
select *
from con_contract_bp_lv p
where p.contract_id=${@contract_id}
and p.bp_category='TENANT'
and p.bp_category in ('TENANT','RENTER')
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......
......@@ -9,6 +9,10 @@ var add_datafilters=[{
{ name:'contract_status',
expression :" t1.contract_status not in ('NEW','INCEPTING','INCEPT_RETURN') "
},
{
name: 'division',
expression: "t1.division != 95"
}
];
......
......@@ -71,6 +71,10 @@ var add_datafilters = [
{
name : "con_status",
expression : "t1.contract_status in ('INCEPT','NEW') "
},
{
name : "division",
expression: "t1.division != '95'"
}
];
......
......@@ -4,6 +4,8 @@ var override_queryfields = [
queryoperator : "="
}
];
var add_datafilters = [{
name : 'bp_id_agent_level1',
......
var add_datafilters = [
{
name : "unit_code",
expression: "(t1.unit_code != '1011' or t1.unit_code is null)"
}
];
add_datafilter();
\ No newline at end of file
var add_datafilters = [
{
name : "unit_code",
expression: "t1.unit_code = '1011'"
}
];
add_datafilter();
\ No newline at end of file
var add_datafilters = [
{
name : "unit_code",
expression: "(t1.unit_code != '1011' or t1.unit_code is null)"
}
];
add_datafilter();
\ No newline at end of file
var add_datafilters = [
{
name : "unit_code",
expression: "t1.unit_code = '1011'"
}
];
add_datafilter();
\ No newline at end of file
var override_queryfields = [
{
name : 'ref_d10_from',
queryexpression : "trunc(t1.ref_d10) >=to_date(${@ref_d10_from},'yyyy-mm-dd')"
},
{
name : 'ref_d10_to',
queryexpression : "trunc(t1.ref_d10) <=to_date(${@ref_d10_to},'yyyy-mm-dd')"
},
{
name : 'ref_d09_from',
queryexpression : "trunc(t1.ref_d09) >=to_date(${@ref_d09_from},'yyyy-mm-dd')"
},
{
name : 'ref_d09_to',
queryexpression : "trunc(t1.ref_d09) <=to_date(${@ref_d09_to},'yyyy-mm-dd')"
},
{
name : 'lease_item_amount_from',
queryexpression : "trunc(t1.lease_item_amount) >=${@lease_item_amount_from}"
},
{
name : 'lease_item_amount_to',
queryexpression : "trunc(t1.lease_item_amount) <=${@lease_item_amount_to}"
}
];
override();
......@@ -234,13 +234,15 @@
<a:grid id="selectedDs_grid" bindTarget="selectedDs" marginHeight="270" marginWidth="60">
<a:columns>
<a:column name="contract_number" width="150"/>
<a:column name="search_term_1" prompt="厂商合同编号" width="150"/>
<a:column name="vender_project_number" prompt="采购单编号" width="150"/>
<a:column name="business_type_desc" prompt="业务类型" align="center" width="70"/>
<a:column name="times" align="right" width="40"/>
<a:column name="cf_item_desc"/>
<a:column name="product_name" editor="selectedDs_grid_editor_tf" width="150"/>
<!--<a:column name="invoice_kind_desc" editor="selectedDs_grid_editor_comb"/>-->
<a:column name="invoice_kind_type_n" editorFunction="" editor="selectedDs_grid_editor_comb" width="150"/>
<a:column name="billing_object_name" width="150"/>
<a:column name="currency_desc" align="center"/>
<a:column name="due_amount" align="right" renderer="Leaf.formatMoney"/>
<a:column name="principal" align="right" renderer="Leaf.formatMoney"/>
......
......@@ -202,8 +202,13 @@
<a:grid id="selectedDs_grid" bindTarget="selectedDs" marginHeight="270" marginWidth="60">
<a:columns>
<a:column name="contract_number" width="150"/>
<a:column name="search_term_1" prompt="厂商合同编号" width="150"/>
<a:column name="vender_project_number" prompt="采购单编号" width="150"/>
<a:column name="business_type_desc" prompt="业务类型" align="center" width="70"/>
<a:column name="cf_item_desc"/>
<a:column name="product_name" editor="selectedDs_grid_editor_tf" width="150"/>
<a:column name="pur_model" prompt="规格型号" editor="selectedDs_grid_model_tf" width="130"/>
<a:column name="pur_unit" prompt="单位" editor="selectedDs_grid_unit_tf" width="40"/>
<!--<a:column name="invoice_kind_desc" editor="selectedDs_grid_editor_comb"/>-->
<a:column name="invoice_kind_type_n" editorFunction="" editor="selectedDs_grid_editor_comb" width="150"/>
<a:column name="billing_object_name" width="150"/>
......
......@@ -263,6 +263,7 @@
<a:datas>
<a:record code_value="LEASE" code_value_name="直租"/>
<a:record code_value="LEASEBACK" code_value_name="售后回租"/>
<a:record code_value="LEASEOPERAT" code_value_name="经营性租赁"/>
</a:datas>
</a:dataSet>
<a:dataSet id="write_off_flag_ds">
......
......@@ -89,7 +89,9 @@
function acr512_invoice_query() {
$('acr512_invoice_result_ds').query();
$('acr512_invoice_op_result_ds').query();
var records = $('acr512_invoice_result_ds').getAll();
var record_op = $('acr512_invoice_op_result_ds').getAll();
for (var i = 0; i < records.length; i++) {
var record = record[i];
var invoice_hd_id = record.get('invoice_hd_id');
......@@ -109,6 +111,26 @@
});
}
$('acr512_invoice_result_ds').query();
for (var j = 0; j < record_op.length; i++) {
var record_op = record_op[j];
var invoice_hd_id = record_op.get('invoice_hd_id');
Leaf.request({
url: $('get_document_number_link').getUrl(),
para: {
invoice_hd_id: invoice_hd_id
},
success: function (res) {
var document_number = record_op[i].get('document_number');
if (res.result.record['isreturn'] > 0) {
return '<font color="red">' + document_number + '</font> ';
} else {
return value;
}
}
});
}
$('acr512_invoice_op_result_ds').query();
}
function acr512_invoice_reset() {
......@@ -136,8 +158,29 @@
}
}
function acr512_op_grid_update(record_id, invoice_hd_id) {
var maintain_type = 'UPDATE';
var currency_reocrd = $('acr512_invoice_op_result_ds').findById(record_id);
var param = currency_reocrd.data;
param['function_code'] = 'ACR512';
param['winid'] = 'confirm_invoice_win';
param['document_id'] = invoice_hd_id;
param['function_usage'] = 'MODIFY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:ACR.INVOICE_DETAIL}';
if (param['invoice_status'] == 'CONFIRMING') {
param['function_code'] = 'ACR512R';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr512_invoice_update_page', 'acr512_invoice_op_result_ds');
} else {
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr512_invoice_update_page', 'acr512_invoice_op_result_ds');
}
}
function acr512_document_number_render(value, record, name) {
if (name == 'document_number') {
if (name == 'document_number' && record.get('division')!='95') {
if (record.get('compare_date_flag') == 'Y') {
return '<a style="color:red" href="javascript:acr512_grid_update(\'' + record.id + '\',\'' + record.get('invoice_hd_id') + '\');">' + value + '</a>';
} else {
......@@ -145,6 +188,14 @@
}
}
if (name == 'document_number' && record.get('division')=='95') {
if (record.get('compare_date_flag') == 'Y') {
return '<a style="color:red" href="javascript:acr512_op_grid_update(\'' + record.id + '\',\'' + record.get('invoice_hd_id') + '\');">' + value + '</a>';
} else {
return '<a href="javascript:acr512_op_grid_update(\'' + record.id + '\',\'' + record.get('invoice_hd_id') + '\');">' + value + '</a>';
}
}
// return '<a href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
}
......@@ -192,7 +243,14 @@
}
function acr512_invoice_delete() {
debugger;
var records_op = $('acr512_invoice_op_result_ds').getSelected();
if(records_op == ''){
$('acr512_invoice_update_grid_ds').remove();
}else {
$('acr512_invoice_op_grid_ds').remove();
}
}
//发票提交
......@@ -243,7 +301,21 @@
}
function acr512_invoice_insert() {
var records = $('acr512_invoice_result_ds').getSelected();
var fl_ds = $('acr512_invoice_result_ds');
var fl_records = $('acr512_invoice_result_ds').getSelected();
var op_ds = $('acr512_invoice_op_result_ds');
var op_records = $('acr512_invoice_op_result_ds').getSelected();
if(fl_records == ''){
var records = op_records;
var result_ds = op_ds;
}else {
records = fl_records;
result_ds = fl_ds;
}
if(fl_records!='' && op_records!=''){
$L.showErrorMessage("提示",'请勾选同一业务类型的单据进行新建申请操作!');
return;
}
if (records.length < 1) {
Leaf.showMessage('${l:HLS.PROMPT}', '请选择需要审批的发票!');
return;
......@@ -317,7 +389,7 @@
fullScreen: true
});
win.on('close',function(){
$('acr512_invoice_result_ds').query();
result_ds.query();
});
},
failure: function () {
......@@ -349,6 +421,9 @@
<a:fields>
<a:field name="currency_name" displayField="currency_name" options="acr512_currency_ds"
returnField="currency" valueField="currency_code"/>
<a:field name="business_type_desc_n" displayField="code_value_name" options="business_type_desc_ds"
returnField="business_type_n" valueField="code_value"/>
<a:field name="business_type_n"/>
<a:field name="invoice_status_n" displayField="code_value_name" options="acr512_invoice_status_ds"
returnField="invoice_status" valueField="code_value"/>
<a:field name="full_elec_invoice_flag"/>
......@@ -418,6 +493,9 @@
<a:dataSet id="acr512_invoice_result_ds" autoPageSize="true" autoQuery="true"
model="acr.ACR512.acr_invoice_update_query" queryDataSet="acr512_invoice_query_ds"
selectable="true"/>
<a:dataSet id="acr512_invoice_op_result_ds" autoPageSize="true" autoQuery="true"
model="acr.ACR512.acr_invoice_update_op_query" queryDataSet="acr512_invoice_query_ds"
selectable="true"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
......@@ -442,6 +520,7 @@
<a:textField name="document_number_t" bindTarget="acr512_invoice_query_ds" prompt="单据编号到"
width="135"/>
<a:textField name="contract_name" bindTarget="acr512_invoice_query_ds" prompt="合同名称" width="353"/>
<a:comboBox name="business_type_desc_n" bindTarget="acr512_invoice_query_ds" prompt="业务类型" width="135"/>
<!-- <a:lov name="contract_number_f" bindTarget="acr512_invoice_query_ds" prompt="合同编号从" width="135"/>-->
<!--
......
......@@ -349,6 +349,8 @@
renderer="acr514_detail_renderer" width="120"/>
<a:column name="invoice_number" prompt="发票号码" align="center" width="100"/>
<a:column name="contract_number" prompt="合同编号" align="center" width="100"/>
<a:column name="pur_contract_number" prompt="厂商合同编号" align="center" width="100"/>
<a:column name="pur_number" prompt="采购单编号" align="center" width="100"/>
<a:column name="contract_name" prompt="合同名称" align="center" width="100"/>
<a:column name="bp_name" prompt="客户名称" align="center" width="100"/>
<a:column name="invoice_date" prompt="发票日期" renderer="Leaf.formatDate" align="center" width="95"/>
......
......@@ -32,6 +32,7 @@
<script><![CDATA[
function acr515_invoice_query() {
$('acr515_invoiceVatDs').query();
$('acr515_invoiceVatOpDs').query();
}
function acr515_invoice_refresh() {
......@@ -203,6 +204,7 @@
}
//融租开票
function acr515_invoice_post() {
......@@ -449,7 +451,11 @@
</a:events>
</a:dataSet>
<a:dataSet id="acr515_invoiceVatDs" autoPageSize="true" maxPageSize="10000" model="acr.ACR515.acr515_invoice_hd_v"
queryDataSet="acr515_invoiceVatParaDs" selectable="true"/>
<a:dataSet id="acr515_invoiceVatOpDs" autoPageSize="true" maxPageSize="10000" model="acr.ACR515.acr515_invoice_hd_op_v"
queryDataSet="acr515_invoiceVatParaDs" selectable="true">
<a:fields><![CDATA[
]]></a:fields>
<a:events>
......@@ -462,7 +468,8 @@
<a:screenTitle/>
<a:gridButton click="acr515_invoice_query" text="HLS.QUERY"/>
<a:gridButton click="acr515_invoice_reset" text="HLS.RESET"/>
<a:gridButton click="acr515_invoice_post" text="开票"/>
<a:gridButton click="acr515_invoice_post" text="融租开票"/>
<a:gridButton click="acr515_invoiceOp_post" text="经租开票"/>
<a:gridButton click="acr515_invoice_import" text="导入开票结果"/>
<!-- <a:gridButton click="acr515_vat_pause" text="暂挂"/>
<a:gridButton click="acr515_vat_cancel_pause" text="取消暂挂"/>
......@@ -497,7 +504,9 @@
<a:textField name="invoice_number_t" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>
<a:comboBox name="invoice_status_desc" bindTarget="acr515_invoiceVatParaDs" width="150"/>
<a:comboBox name="vat_interface_status_desc" bindTarget="acr515_invoiceVatParaDs" width="150"/>
<a:textField name="search_term_1" bindTarget="acr515_invoiceVatParaDs" width="150" prompt="厂商合同编号"/>
<a:textField name="pur_number" bindTarget="acr515_invoiceVatParaDs" width="150" prompt="采购单编号"/>
<a:comboBox name="business_type_n_desc" bindTarget="acr515_invoiceVatParaDs" width="150" prompt="业务类型"/>
</a:hBox>
<a:hBox labelSeparator=" ">
......
......@@ -32,14 +32,30 @@
//发票超练级
function acr516_invoice_query() {
$('acr516_invoice_result_ds').query();
$('acr516_invoice_op_result_ds').query();
}
function acr516_invoice_reset() {
$('acr516_invoice_query_ds').reset();
$('acr516_invoice_op_result_ds').reset();
}
function acr516_invoice_apply() {
var records = $('acr516_invoice_result_ds').getSelected();
debugger;
var record1 = $('acr516_invoice_result_ds');
var record2 = $('acr516_invoice_op_result_ds');
if(record1.getSelected() == ''){
var records = record2.getSelected();
var ds = record2;
}else {
records = record1.getSelected();
ds = record1;
}
if (records.length == 0) {
Leaf.showMessage('提示', '请至少勾选一条记录!', null, 350);
return;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
datas.push({
......@@ -59,7 +75,7 @@
msg: '操作成功',
duration: 2000
});
$('acr516_invoice_result_ds').query();
ds.query();
},
failure: function () {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
......@@ -76,6 +92,7 @@
function submit_success_btn(ds) {
$('acr516_invoice_result_ds').query();
$('acr516_invoice_op_result_ds').query();
}
//add by lihh 202104262 电子发票发送
function acr516_invoice_send(){
......
......@@ -32,18 +32,28 @@
function acr517_invoice_query() {
$('acr517_invoice_result_ds').query();
$('acr517_invoice_op_result_ds').query();
}
function acr517_invoice_reset() {
$('acr517_invoice_query_ds').reset();
$('acr517_invoice_op_result_ds').reset();
}
function acr517_invoice_confirm() {
// var records = $('acr517_invoice_result_ds').getSelected();
// $('acr517_invoice_result_ds').setSubmitUrl('${/request/@context_path}/autocrud/acr.ACR605.acr_invoice_claim_confirm_new/batch_update');
var records=$('acr517_invoice_result_ds').getSelected();
debugger;
var record1=$('acr517_invoice_result_ds');
var record2=$('acr517_invoice_op_result_ds');
if(record1.getSelected() == ''){
var records = record2.getSelected();
var ds = record2;
}else {
records = record1.getSelected();
ds = record1;
}
if (records.length == 0) {
Leaf.showMessage('提示', '请至少勾选一条记录!', null, 350);
return;
}
var datas = [];
var r_map = new Map();
for (var i = 0;i < records.length;i++) {
......@@ -87,7 +97,7 @@
msg: '操作成功',
duration: 2000
});
$('acr517_invoice_result_ds').query();
ds.query();
},
failure: function () {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
......@@ -121,7 +131,20 @@
}
function acr517_invoice_return() {
var records=$('acr517_invoice_result_ds').getSelected();
debugger;
var record1=$('acr517_invoice_result_ds');
var record2=$('acr517_invoice_op_result_ds');
if(record1.getSelected() == ''){
var records = record2.getSelected();
var ds = record2;
}else {
records = record1.getSelected();
ds = record1;
}
if (records.length == 0) {
Leaf.showMessage('提示', '请至少勾选一条记录!', null, 350);
return;
}
var datas = [];
for (var i = 0;i < records.length;i++) {
datas.push({
......@@ -141,7 +164,7 @@
msg: '操作成功',
duration: 2000
});
$('acr517_invoice_result_ds').query();
ds.query();
},
failure: function () {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
......@@ -157,6 +180,7 @@
}
function submit_success_btn(){
$('acr517_invoice_result_ds').query();
$('acr517_invoice_op_result_ds').query();
}
function MapTOJson(m) {
var str = '{';
......@@ -181,6 +205,7 @@
<a:dataSet id="overdue_status_ds" lookupCode="YES_NO"/>
<a:dataSet id="acr517_invoice_statu_ds" lookupCode="ACR510_AR_INVOICE_STATUS"/>
<a:dataSet id="acr517_claim_status_ds" lookupCode="CLAIM_STATUS"/>
<a:dataSet id="acr517_business_type_ds" lookupCode="BUSINESS_TYPE"/>
<a:dataSet id="cf_item_options">
<a:datas dataSource="/model/hls_cashflow_item_list"/>
</a:dataSet>
......@@ -211,6 +236,9 @@
<a:field name="csh_transaction_flag"/>
<a:field name="csh_transaction_flag_desc" options="csh_transaction_flag_ds"
displayField="code_value_name" returnField="csh_transaction_flag" valueField="code_value"/>
<a:field name="business_type_n"/>
<a:field name="business_type_desc_n" options="acr517_business_type_ds"
displayField="code_value_name" returnField="business_type_n" valueField="code_value"/>
<a:field name="cf_item"/>
<a:field name="cf_item_n" options="cf_item_options" displayField="description" returnField="cf_item" valueField="cf_item"/>
<!-- <a:field name="claim_status" options="claim_status_ds" displayField="code_value_name" valueField="code_value" returnField="claim_status"/>-->
......@@ -230,6 +258,14 @@
<a:event name="submitsuccess" handler="submit_success_btn"/>
</a:events>
</a:dataSet>
<a:dataSet id="acr517_invoice_op_result_ds" autoQuery="true" fetchAll="false" autoPageSize="true"
model="acr.ACR605.acr_invoice_claim_confirm_op_new" queryDataSet="acr517_invoice_query_ds" selectable="true">
<a:events>
<a:event name="submitsuccess" handler="submit_success_btn"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
......
......@@ -212,6 +212,10 @@
<a:hBox labelSeparator=" ">
<a:textField name="contract_number" bindTarget="acr610_invoice_detail_query_ds" prompt="合同编号"
width="135"/>
<a:textField name="pur_contract_number" bindTarget="acr610_invoice_detail_query_ds" prompt="厂商合同编号"
width="150"/>
<a:textField name="pur_number" bindTarget="acr610_invoice_detail_query_ds" prompt="采购单编号"
width="150"/>
<a:textField name="bp_code" bindTarget="acr610_invoice_detail_query_ds" prompt="客户编号" width="135"/>
<a:textField name="journal_month" bindTarget="acr610_invoice_detail_query_ds" prompt="税款所属期"
width="135" emptyText="YYYY-MM"/>
......@@ -235,8 +239,11 @@
<a:column name="document_number" lock="true" prompt="单据编号" align="center"
renderer="acr610_detail_renderer" width="120"/>
<a:column name="contract_number" prompt="合同编号" align="center" width="100"/>
<a:column name="pur_contract_number" prompt="厂商合同编号" align="center" width="100"/>
<a:column name="pur_number" prompt="采购单编号" align="center" width="100"/>
<a:column name="bp_code" prompt="客户编号" align="center" width="100"/>
<a:column name="bp_name" prompt="客户名称" align="center" width="100"/>
<a:column name="business_type" prompt="业务类型" align="center" width="100"/>
<a:column name="times" prompt="租期" align="center" width="60"/>
<a:column name="journal_month" prompt="税款所属期" align="center" width="120"
footerRenderer="sumFunction_foot"/>
......
......@@ -223,6 +223,10 @@
<a:hBox labelSeparator=" ">
<a:textField name="contract_number" bindTarget="acr610_invoice_detail_query_ds" prompt="合同编号"
width="135"/>
<a:textField name="pur_contract_number" bindTarget="acr610_invoice_detail_query_ds" prompt="厂商合同编号"
width="150"/>
<a:textField name="pur_number" bindTarget="acr610_invoice_detail_query_ds" prompt="采购单编号"
width="150"/>
<a:textField name="bp_code" bindTarget="acr610_invoice_detail_query_ds" prompt="客户编号" width="135"/>
<a:textField name="journal_month" bindTarget="acr610_invoice_detail_query_ds" prompt="税款所属期"
width="135" emptyText="YYYY-MM"/>
......@@ -246,6 +250,8 @@
<a:column name="document_number" lock="true" prompt="单据编号" align="center"
renderer="acr610_detail_renderer" width="120"/>
<a:column name="contract_number" prompt="合同编号" align="center" width="100"/>
<a:column name="pur_contract_number" prompt="厂商合同编号" align="center" width="100"/>
<a:column name="pur_number" prompt="采购单编号" align="center" width="100"/>
<a:column name="bp_code" prompt="客户编号" align="center" width="100"/>
<a:column name="bp_name" prompt="客户名称" align="center" width="100"/>
<a:column name="times" prompt="租期" align="center" width="60"/>
......
......@@ -164,6 +164,8 @@
<a:column name="document_number" lock="true" prompt="单据编号" align="center" renderer="acr620_detail_renderer" width="120"/>
<a:column name="invoice_number" prompt="发票号码" align="center" width="100"/>
<a:column name="contract_number" prompt="合同编号" align="center" width="100"/>
<a:column name="pur_contract_number" prompt="厂商合同编号" align="center" width="100"/>
<a:column name="pur_number" prompt="采购单编号" align="center" width="100"/>
<a:column name="contract_name" prompt="合同名称" align="center" width="100"/>
<a:column name="bp_name" prompt="客户名称" align="center" width="100"/>
<a:column name="invoice_date" prompt="发票日期" renderer="Leaf.formatDate" align="center" width="100"/>
......@@ -188,6 +190,8 @@
<a:column name="document_number" lock="true" prompt="单据编号" align="center" renderer="acr620_detail_renderer" width="120"/>
<a:column name="invoice_number" prompt="发票号码" align="center" width="100"/>
<a:column name="contract_number" prompt="合同编号" align="center" width="100"/>
<a:column name="pur_contract_number" prompt="厂商合同编号" align="center" width="100"/>
<a:column name="pur_number" prompt="采购单编号" align="center" width="100"/>
<a:column name="contract_name" prompt="合同名称" align="center" width="100"/>
<a:column name="bp_name" prompt="客户名称" align="center" width="100"/>
<a:column name="invoice_date" prompt="发票日期" renderer="Leaf.formatDate" align="center" width="100"/>
......
......@@ -33,6 +33,8 @@
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}con_contract_op_query_link"
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_op_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"/>-->
......@@ -41,10 +43,21 @@
<a:link id="rl_notice_print_link"
url="${/request/@context_path}/modules/cont/CON301N/rl_notice_print.lsc"/>
<a:link id="car_modify_link_readonly_c" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<a:link id="operate_readonly_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_opreat.lview"/>
<a:link id="prj2000_pur_deteail_link_id" url="${/request/@context_path}/modules/prj/PRJ2000/purchase_order_deteail.lview"></a:link>
<script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
Leaf.onReady(function() {
//只要经租代理店或者管理人员才可能看到采购单编号
if("${/model/role_info/record/@role_code}"=="0018"||"${/model/role_info/record/@role_code}"=="0019"){
if('${/model/user_type_code/record/@unit_id}'!="2224"){
if(document.getElementById('CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_PRJ_NUMBER')){
document.getElementById('CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_PRJ_NUMBER_prompt').style.display = 'none';
document.getElementById('CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_PRJ_NUMBER').style.display = 'none';
}
}
}
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 = "";
......@@ -93,19 +106,28 @@
}
}
});
function open_contract_win(ds_id, record_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
// param['function_code'] = 'CON301';
var division=param.division;
if(division!='95'){
param['function_usage'] = 'QUERY';
param['function_code'] = 'CON3200Q';
param['maintain_type'] = 'QUERY';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
var url = '${/parameter/@layout_code}con_contract_query_link';
}else {
param['function_usage'] = 'QUERY';
param['function_code'] = 'CON3200Q_OP';
param['maintain_type'] = 'QUERY';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
var url = '${/parameter/@layout_code}con_contract_op_query_link';
}
//hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', null);
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_link', ds_id);
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url, ds_id);
}
function open_project_Window(record_id, ds_id) {
......@@ -120,6 +142,7 @@
param['function_usage'] = 'QUERY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
if(record.get('division')!='95'){
if(record.get('is_constru_unit') == 'N'){
//不是虚拟店
param['function_code'] = 'PRJ501_WFL';
......@@ -129,11 +152,28 @@
param['function_code'] = 'PRJ501Q_CONSTRU';
url = 'car_modify_link_readonly_c';
}
}else {
param['function_code'] = 'PRJ501_OPERAT_WFL';
url = 'operate_readonly_link';
}
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url, ds_id);
}
function open_pur_Window(record_id, ds_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_code'] = 'PRJ2000D_WFL';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'QUERY'
param['url_title'] = '采购申请单维护';
param['project_id'] = record.get('source_project_id');
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'prj2000_pur_deteail_link_id', ds_id);
}
function open_bs_Window(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
......@@ -190,6 +230,9 @@
if (name == 'project_id_c' && value) {
return '<a href="javascript:open_project_Window(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
}
if(name == 'prj_number' && value){
return '<a href="javascript:open_pur_Window(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
}
if (name == 'bs_link') {
return '<a href="javascript:open_bs_Window(\'' + record.id + '\',\'' + record.ds.id + '\')">明细</a>';
}
......
......@@ -17,11 +17,14 @@
<a:link id="con_contract_modify_link" url="${/request/@context_path}/modules/cont/CON311/con_re_print_modify.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_query_op_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_op_modify.lview"/>
<a:link id="car_modify_special_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:link id="con_contract_update_print_detail_link_id" url="${/request/@context_path}/modules/cont/CON311/con_contract_update_print_word_detail.lview"/>
<a:link id="con_lease_org_print_link"
url="${/request/@context_path}/modules/cont/CON620/create_content_for_collection.lsc"/>
<a:link id="car_modify_link_readonly_c" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<a:link id="operate_readonly_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_opreat.lview"/>
<script type="text/javascript"><![CDATA[
......@@ -48,8 +51,10 @@
function open_contract_win(ds_id, record_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
if(record.get('division')!='95'){
if(record.get('sign_contract_status')=='NEW' || record.get('sign_contract_status')=='SIGN_RETURN'){
param['function_code'] = 'CON301MM';
param['function_usage'] = 'MODIFY';
......@@ -66,7 +71,25 @@
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_link', ds_id);
}
if(record.get('division')=='95'){
if(record.get('sign_contract_status')=='NEW' || record.get('sign_contract_status')=='SIGN_RETURN'){
param['function_code'] = 'CON301MM_OP';
param['function_usage'] = 'MODIFY';
}
else{
param['function_code'] = 'CON301OP';
param['function_usage'] = 'QUERY';
param['sign_contract_status'] = record.get('sign_contract_status');
param['contract_status'] = record.get('contract_status');
}
param['winid'] = 'con_contract_modify_op_win_id';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_op_link', ds_id);
}
}
function open_project_Window(record_id, ds_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
var url;
......@@ -79,6 +102,7 @@
/* param['window_open_flag'] = 'Y';
param['show_history_flag'] = 'Y'; */
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
if(record.get('division')!='95'){
if(record.get('is_constru_unit') == 'N'){
//不是虚拟店
param['function_code'] = 'PRJ501_WFL';
......@@ -88,6 +112,10 @@
param['function_code'] = 'PRJ501Q_CONSTRU';
url = 'car_modify_link_readonly_c';
}
}else {
param['function_code'] = 'PRJ501_OPERAT_WFL';
url = 'operate_readonly_link';
}
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url, ds_id, '${/parameter/@layout_code}');
}
......@@ -173,6 +201,11 @@
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var records = $(ds_id).getSelected();
var division=records[0].data.division;
if(division == '95'){
Leaf.showErrorMessage('提示','经营性租赁暂不支持线上生成合同文本!');
return;
}
if (records.length != 1) {
Leaf.showMessage('${l:PROMPT}','${l:HLS.SELECT_RECORD}');
return;
......@@ -197,6 +230,11 @@
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 records = $(ds_id).getSelected();
var division=records[0].data.division;
if(division == '95'){
Leaf.showErrorMessage('提示','经营性租赁暂不支持线上生成用印信息!');
return;
}
if (records.length != 1) {
Leaf.showMessage('${l:PROMPT}','${l:HLS.SELECT_RECORD}');
return;
......
......@@ -57,6 +57,8 @@
<!-- <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>-->
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id"
url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_op_update_link_id"
url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n_for_ol.lview"/>
<a:link id="get_atch_download_link"
url="${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"/>
<a:link id="check_contract_status" model="cont.CON3200.con_checklist_contract" modelaction="query"/>
......@@ -364,7 +366,10 @@
if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
} else {
}else if(record.get('bp_category')=='RENTER' || record.get('bp_category')=='MAN_FACTURER' || record.get('bp_category')=='ASSET_REGULATOR'){
param['function_code'] = 'HLS215D_OP';
param['function_usage'] = 'QUERY';
}else{
param['function_code'] = 'CON505H';
param['function_usage'] = 'QUERY';
}
......@@ -680,6 +685,12 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var cashflow_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_cashflow');
var record = $(ds_id).getCurrentRecord();
var division = record.get('division');
if(division == '95'){
var url =$('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_op_update_link_id').getUrl();
}else {
var url = $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl();
}
var price_list = record.get('price_list');
var calc_session_id = record.get('calc_session_id');
var parent_pk_value = record.get('contract_id');
......@@ -707,7 +718,7 @@
recreate_L_formula: 'Y',
recreate_H_formula: 'Y'
},
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl(),
url: url,
fullScreen: true,
draggable: true
});
......@@ -798,9 +809,34 @@
}
}
};
/* 时间戳转换为时间 */
function timestampToTime(timestamp) {
timestamp = timestamp ? timestamp : null;
var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
var Y = date.getFullYear() + '-';
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
// var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
// var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
// var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
return Y + M + D;
};
var count = 0;
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
debugger;
if('${/parameter/@layout_code}' == 'CONTRACT_OP_CREATE_INC'){
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'con_contract_lease_item');
var lease_item_record = $(lease_item_ds_id).getCurrentRecord();
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var contract_record = $(con_ds_id).getAt(0);
var ref_d09 = timestampToTime(Date.parse(lease_item_record.get('ref_d09')));
var lease_start_date = timestampToTime(Date.parse(record.get('lease_start_date')));
if(lease_start_date>ref_d09){
Leaf.showMessage('${l:PROMPT}','采购单的付款预定日期需大于合同起租日,请重新选择!');
return false;
}
}
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'con_contract_lease_item');
var lease_item_record = $(lease_item_ds_id).getCurrentRecord();
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
......
......@@ -17,10 +17,13 @@
<a:link id="con_contract_modify_link" url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.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}con_contract_op_query_link"
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_op_modify.lview"/>
<a:link id="car_modify_special_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:link id="cont_con_sale_contract_info_print_link"
url="${/request/@context_path}/modules/cont/CON3200/contract_receipt_detail_print.lsc"/>
<a:link id="car_modify_link_readonly_c" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<a:link id="operate_readonly_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_opreat.lview"/>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function() {
......@@ -38,8 +41,11 @@
});
function open_contract_win(ds_id, record_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
var division=param.division;
if(division !='95'){
if((record.get('contract_status')=='NEW' || record.get('contract_status')=='INCEPT_RETURN')&& (record.get('sign_contract_status')=='SIGNING' || record.get('sign_contract_status') =='SIGN')){
param['function_code'] = 'CON3200N';
param['function_usage'] = 'MODIFY';
......@@ -52,8 +58,25 @@
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_link', ds_id);
}
if(division =='95'){
if((record.get('contract_status')=='NEW' || record.get('contract_status')=='INCEPT_RETURN')&& (record.get('sign_contract_status')=='SIGNING' || record.get('sign_contract_status') =='SIGN')){
param['function_code'] = 'CON3200N_OP';
param['function_usage'] = 'MODIFY';
var link_id = '${/parameter/@layout_code}con_contract_op_query_link';
}
else{
param['function_code'] = 'CON3200Q_OP';
param['function_usage'] = 'QUERY';
var link_id = '${/parameter/@layout_code}con_contract_op_query_link';
}
param['winid'] = 'con_contract_op_modify_win_id';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, link_id, ds_id);
}
}
function open_project_Window(record_id, ds_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
var url;
......@@ -66,6 +89,7 @@
/* param['window_open_flag'] = 'Y';
param['show_history_flag'] = 'Y'; */
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
if(record.get('division')!='95'){
if(record.get('is_constru_unit') == 'N'){
//不是虚拟店
param['function_code'] = 'PRJ501_WFL';
......@@ -75,6 +99,10 @@
param['function_code'] = 'PRJ501Q_CONSTRU';
url = 'car_modify_link_readonly_c';
}
}else {
param['function_code'] = 'PRJ501_OPERAT_WFL';
url = 'operate_readonly_link';
}
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url, ds_id, '${/parameter/@layout_code}');
}
......@@ -116,6 +144,11 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
debugger
var selectedDS=$(ds_id).getSelected();
var division = selectedDS[0].data.division;
if(division == '95'){
$L.showErrorMessage("提示",'经营性租赁暂不支持打印应收明细!');
return;
}
if(selectedDS.length!=1){
$L.showErrorMessage("提示",'请选择一条数据进行打印!');
return;
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" xmlns:dr="leaf.plugin.excelreport" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="contract_id=${/parameter/@contract_id}" fetchAll="true" model="cont.CON1300.get_contract_print_info" rootPath="/model/head_info"/>
<a:model-query fetchAll="true" model="cont.CON1300.get_contract_print_grid_info" rootPath="/model/grid_data"/>
<s:server-script><![CDATA[
function getdate() {
var now = new Date()
y = now.getFullYear()
m = now.getMonth() + 1
d = now.getDate()
m = m < 10 ? "0" + m : m
d = d < 10 ? "0" + d : d
return y + "" + m + "" + d
}
$ctx.parameter.file_name = $ctx.parameter.file_name+getdate()+'.xlsx';
]]></s:server-script>
<dr:excel-report enableTask="false" fileName="${/parameter/@file_name}">
<styles>
<dr:cell-style name="title" align="ALIGN_CENTER">
<dr:font fontName="黑体" height="12" italic="false"/>
</dr:cell-style>
<dr:cell-style name="left" align="ALIGN_LEFT">
<dr:font fontName="黑体" height="10" italic="false"/>
</dr:cell-style>
<dr:cell-style name="right" align="ALIGN_RIGHT">
<dr:font fontName="黑体" height="10" italic="false"/>
</dr:cell-style>
<dr:cell-style name="grid_title" align="ALIGN_CENTER" borderbottom="BORDER_THIN" borderleft="BORDER_THIN" borderTop="BORDER_THIN" borderRight="BORDER_THIN">
<dr:font fontName="黑体" height="9" italic="false"/>
</dr:cell-style>
<dr:cell-style name="grid_cell" align="ALIGN_CENTER" borderbottom="BORDER_THIN" borderleft="BORDER_THIN" borderTop="BORDER_THIN" borderRight="BORDER_THIN">
<dr:font fontName="黑体" height="9" italic="false"/>
</dr:cell-style>
<dr:cell-style name="header" align="ALIGN_CENTER">
<dr:font bold="false" fontName="宋体" height="12"/>
</dr:cell-style>
<dr:cell-style name="foot">
<dr:font bold="false" fontName="宋体" height="12"/>
</dr:cell-style>
<dr:cell-style name="footNumber" dataFormat="#,##0.000">
<dr:font bold="false" fontName="宋体" height="12"/>
</dr:cell-style>
<dr:cell-style name="dateFormat" dataFormat="YYYY-MM-DD">
<dr:font bold="false" fontName="宋体" height="12"/>
</dr:cell-style>
<dr:cell-style name="group">
<dr:font bold="false" fontName="宋体" height="12"/>
</dr:cell-style>
</styles>
<sheets>
<dr:sheet name="第一页" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20" displayGridlines="true">
<dr:static-content>
<dr:cell-data cell="A" row="1" stylename="title" type="content" value="合同应收明细表"/>
<dr:cell-data cell="A" row="3" stylename="right" type="content" value="代理店:"/>
<dr:cell-data cell="B" row="3" stylename="left" type="content" value="${/model/head_info/record/@bp_name}"/>
<dr:cell-data cell="J" row="3" stylename="right" type="content" value="业务伙伴号:"/>
<dr:cell-data cell="k" row="3" stylename="left" type="content" value="${/model/head_info/record/@client_bp_code}"/>
<dr:cell-data cell="A" row="4" stylename="right" type="content" value="合同编号:"/>
<dr:cell-data cell="B" row="4" stylename="left" type="content" value="${/model/head_info/record/@contract_number}"/>
<dr:cell-data cell="J" row="4" stylename="right" type="content" value="客户名称:"/>
<dr:cell-data cell="k" row="4" stylename="left" type="content" value="${/model/head_info/record/@client_bp_name}"/>
<dr:cell-data cell="A" row="5" stylename="right" type="content" value="机型:"/>
<dr:cell-data cell="B" row="5" stylename="left" type="content" value="${/model/head_info/record/@pattern}"/>
<dr:cell-data cell="J" row="5" stylename="right" type="content" value="机号:"/>
<dr:cell-data cell="k" row="5" stylename="left" type="content" value="${/model/head_info/record/@machine_number}"/>
<dr:cell-data cell="A" row="6" stylename="right" type="content" value="合同签订日:"/>
<dr:cell-data cell="B" row="6" stylename="left" type="content" value="${/model/head_info/record/@inception_of_lease}"/>
<dr:cell-data cell="J" row="6" stylename="right" type="content" value="租赁开始日:"/>
<dr:cell-data cell="k" row="6" stylename="left" type="content" value="${/model/head_info/record/@lease_start_date}"/>
<dr:cell-data cell="A" row="7" stylename="right" type="content" value="利率:"/>
<dr:cell-data cell="B" row="7" stylename="left" type="content" value="${/model/head_info/record/@int_rate_display}"/>
<dr:cell-data cell="J" row="7" stylename="right" type="content" value="租赁期间:"/>
<dr:cell-data cell="k" row="7" stylename="left" type="content" value="${/model/head_info/record/@lease_times}"/>
</dr:static-content>
<dr:dynamic-content cell="A" datamodel="/model/grid_data" row="8">
<dr:columns>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="439" field="times" title="期数" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="440" field="due_date" title="预定收款日" type="content" groupDesc="计数" />
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="441" field="due_amount" title="预定收款金额" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="441" field="vat_due_amount" title="租金增值税" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="441" field="principal" title="本金" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="441" field="vat_principal" title="本金增值税" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="448" field="total_interest" title="利息合计" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="442" field="up_interest" title="利息上段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="443" field="down_interest" title="利息下段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="444" field="total_net_interest" title="利息(不含税)合计" type="content" />
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="445" field="up_net_interest" title="利息(不含税)上段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="446" field="down_net_interest" title="利息(不含税)下段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="447" field="total_vat_interest" title="利息(增值税)合计" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="447" field="up_vat_interest" title="利息(增值税)上段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="447" field="down_vat_interest" title="利息(增值税)下段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="447" field="total_weight_factor" title="本期天数合计" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="447" field="up_weight_factor" title="本期天数上段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="447" field="down_weight_factor" title="本期天数下段" type="content"/>
</dr:columns>
</dr:dynamic-content>
</dr:sheet>
</sheets>
</dr:excel-report>
</a:init-procedure>
</a:service>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?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:service xmlns:ns1="leaf.application.action" xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<s:server-script ><![CDATA[
importPackage(Packages.java.util);
importPackage(Packages.java.lang);
importPackage(Packages.com.hand.hl);
importPackage(Packages.java.io);
importPackage(java.io);
try{
var sys_url_bm=$bm('cont.CON4000.get_sys_url');
var parameter_code='HLS_SYSTEM_URL';
var SysurlQuery = sys_url_bm.queryAsMap({
parameter_code: parameter_code
});
var sys_url = SysurlQuery.getChildren()[0].parameter_value;
var down_url =sys_url+'modules/cont/CON505/contract_receipt_op_print.lsc?contract_id=' +$ctx.parameter.contract_id;
var now = new Date()
y = now.getFullYear()
m = now.getMonth() + 1
m = m < 10 ? "0" + m : m
d = now.getDate();
var fileDir_bm=$bm('cont.CON4000.get_sys_url');
var parameter_code='HLCM_OPERATOR_URL';
var fileDirQuery = fileDir_bm.queryAsMap({
parameter_code: parameter_code
});
var f_fileDir = fileDirQuery.getChildren()[0].parameter_value;
var filePath = (f_fileDir + y + "\\" + m + "\\").toString();
var tranfer_dir= new File(String(filePath));
if(!tranfer_dir.exists()){//如果文件夹不存在,创建文件夹
tranfer_dir.mkdirs();//创建文件夹
}
var f_fileName = ('还款计划表'+y+m+d+'.xlsx').toString();
var result_flag=DoloadFileByUrl.downloadFile(down_url, filePath, f_fileName);
file_size=get_file_length(filePath+f_fileName);
if(result_flag=true){
var business_daily_email=$bm('cont.CON1300.con_pur_sign').update({
p_contract_id : $ctx.parameter.contract_id,
p_file_path :(filePath+f_fileName).toString(),
p_file_name :f_fileName,
p_file_size :file_size,
p_user_id :1
});
}
}catch(e){
raise_app_error(e.message);
}
function get_file_length(path){
var file=new File(String(path));
if(file.exists() && file.isFile()){
//println(f.length());
length=file.length();
return length;}
else{
return 0 ;}
}
]]></s:server-script>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<p:echo></p:echo>
<a:model-insert model="cont.CON560.con_contract_terminate" trace="true"/>
<a:batch-apply sourcepath="/parameter">
<a:model-update model="cont.CON560.con_contract_terminate" trace="true"/>
</a:batch-apply>
<a:model-execute model="cont.CON560.con_contract_terminate" trace="true"/>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
......@@ -31,6 +31,17 @@
document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER_70").style.display = "none";
}
}
//经租
if("${/parameter/@division}"=='95'){
if(document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_PATTERN")){
document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_PATTERN_prompt").style.display = "none";
document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_PATTERN").style.display = "none";
}
if(document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER")){
document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER_prompt").style.display = "none";
document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER").style.display = "none";
}
}
});
]]></script>
......
......@@ -2,7 +2,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<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.code=&apos;ZJ_WFL_WORKFLOW_STATUS&apos; and v.code_value in (&apos;1&apos;,&apos;10&apos;,&apos;-1&apos;,&apos;-1000&apos;,&apos;-2&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;0017&apos;,&apos;HAND&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
</a:init-procedure>
<a:view>
......
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