Commit ca50c851 authored by niminmin's avatar niminmin

Merge branch 'develop'

# Conflicts:
#	src/main/webapp/modules/cont/CON505/con_contract_modify.lview
parents d113e828 c8ab0da5
......@@ -91,7 +91,7 @@
(select i.description
from hls_cashflow_item i
where i.cf_item = t.cf_item) as cf_item_desc,
'融资租赁费' as product_name,
decode(t.cf_item,250,'设备款','融资租赁费') as product_name,
con.contract_status contract_status,
cf.cf_status cf_status,
t.invoice_kind_type,
......
......@@ -28,7 +28,7 @@
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="code" expression="t1.code =decode(${@lease_channel},&apos;00&apos;,&apos;CON500_CONTRACT_STATUS&apos;,&apos;01&apos;,&apos;CON660_CONTRACT_STATUS&apos;,&apos;CON500_CONTRACT_STATUS&apos;)"/>
<bm:data-filter name="code_value" enforceOperations="query" expression="t1.code_value in(&apos;NEW&apos;,&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;REPURING&apos;,&apos;CLOSED&apos;)"/>
<bm:data-filter name="code_value" enforceOperations="query" expression="t1.code_value in(&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;REPURING&apos;,&apos;TERMINATE&apos;,&apos;TERMINATING&apos;,&apos;ET&apos;,&apos;REPUR&apos;)"/>
</bm:data-filters>
</bm:model>
......@@ -3,11 +3,12 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select hb.bp_name from hls_bp_master hb where hb.bp_id = ${@bp_id}
select hb.bp_name,hb.bp_code from hls_bp_master hb where hb.bp_id = ${@bp_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME"/>
<bm:field name="bp_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CODE"/>
</bm:fields>
</bm:model>
\ No newline at end of file
......@@ -57,6 +57,7 @@
Where ctr.transaction_id = cw.csh_transaction_id
and al.cashflow_id = cw.cashflow_id
and cw.reversed_flag='N'
and cw.cf_item<>2
and ctr.paid_byother_flag='T'),0,'F','T') paid_byother_flag,
(Select v.code_value_name
From sys_code_values_v v
......@@ -67,6 +68,7 @@
Where ctr.transaction_id = cw.csh_transaction_id
and al.cashflow_id = cw.cashflow_id
and cw.reversed_flag='N'
and cw.cf_item<>2
and ctr.paid_byother_flag='T'),0,'F','T')) paid_byother_flag_n,
(case when al.cf_item<>'9' then cwo.received_amount else
al.total_amount end)received_amount,
......@@ -77,6 +79,7 @@
Where ctr.transaction_id = cw.csh_transaction_id
and al.cashflow_id = cw.cashflow_id
and cw.reversed_flag='N'
and cw.cf_item<>2
and nvl(ctr.guarantor_name_duty,'N')='Y'),0,'N','Y') guarantor_name_duty,
(Select to_char(max(cw.write_off_date),'yyyy-mm-dd')
From csh_transaction ctr,csh_write_off cw
......@@ -95,6 +98,7 @@
And alw.cashflow_id = cco.cashflow_id
and cw.reversed_flag='N'
and ctr.paid_byother_flag='T'
and cw.cf_item<>2
and nvl(ctr.guarantor_name_duty,'N')='N')paid_byother_sum_flag,
null attachment
From acr_invoice_apply aa,
......
......@@ -100,6 +100,7 @@
begin
acr_invoice_wfl_pkg.update_reverse_method(p_invoice_apply_id => ${@invoice_apply_id},
p_reverse_method => ${@reverse_method},
p_note => ${@note},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
......
......@@ -22,6 +22,13 @@
p_company_id => ${/session/@company_id},
p_user_id => ${/session/@user_id}
);
hls_bp_master_change_req_pkg.update_hls_bp_master_status(
p_change_req_id => ${@change_req_id},
p_bp_id => r_hls_bp_master_req.bp_id,
p_status => 'APPROVED',
p_req_type => r_hls_bp_master_req.req_type,
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2015-12-02 下午1:29:07
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
cus_con_change_req_pkg.check_con_dedution_limit(
p_change_req_id =>${@change_req_id},
p_user_id =>${/session/@user_id},
p_pay_method =>${@pay_method},
p_bank_branch_num =>${@bank_branch_num},
p_contract_number =>${@contract_number},
p_deduction_limit =>${@deduction_limit},
p_layout_code =>${@layout_code},
p_err_msg =>${@err_msg});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="err_msg" dataType="java.lang.String" input="false" output="true" outputPath="@err_msg"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -20,7 +20,9 @@
p_save_source_type =>${@save_source_type},
p_project_status =>${@project_status},
p_bp_id_tenant =>${@bp_id_tenant},
p_cdd_list_id => ${@cdd_list_id});
p_cdd_list_id => ${@cdd_list_id},
p_editable_flag =>${@editable_flag},
p_credit_line =>${@credit_line});
END;
]]></bm:update-sql>
</bm:operation>
......
......@@ -15,7 +15,11 @@
pa.column_num,
pa.column_width,
pa.alignment,
pa.column_desc,
--pa.column_desc,
hls_doc_file_templet_pkg.get_cus_bookmark_column_desc(cc.content_id,
p.bookmark,
pa.column_name,
pa.column_desc) column_desc,
NVL(p.table_width,0) table_width,
NVL(p.ind_width,0) ind_width,
NVL(p.font_family,'宋体') font_family,
......
......@@ -80,6 +80,6 @@
<bm:query-field field="write_off_id" queryOperator="="/>
<bm:query-field field="csh_transaction_id" queryOperator="="/>
<bm:query-field field="reversed_flag" queryOperator="="/>
<bm:query-field name="reverse_detail_flag" queryExpression="((nvl(${@deposit_type},'N')=&apos;Y&apos; and t1.write_off_type=&apos;DEPOSIT_CREDIT&apos;)or(${@reverse_detail_flag}=&apos;Y&apos; and nvl(${@deposit_type},'N') in(&apos;N&apos;,null) and t1.write_off_type in (&apos;RECEIPT_CREDIT&apos;,&apos;RECEIPT_ADVANCE_RECEIPT&apos;,&apos;ADVANCE_RECEIPT_CREDIT&apos;,&apos;DEPOSIT&apos;,&apos;RISK&apos;,&apos;DEPOSIT_CUS&apos;,&apos;RECEIPT_NONBUSINESS&apos;)))"/>
<bm:query-field name="reverse_detail_flag" queryExpression="((nvl(${@deposit_type},'N')=&apos;Y&apos; and t1.write_off_type=&apos;DEPOSIT_CREDIT&apos;)or(${@reverse_detail_flag}=&apos;Y&apos; and nvl(${@deposit_type},'N') in(&apos;N&apos;,null) and t1.write_off_type in (&apos;RECEIPT_CREDIT&apos;,&apos;RECEIPT_ADVANCE_RECEIPT&apos;,&apos;ADVANCE_RECEIPT_CREDIT&apos;,&apos;DEPOSIT&apos;,&apos;RISK&apos;,&apos;DEPOSIT_CUS&apos;,&apos;RECEIPT_NONBUSINESS&apos;,&apos;RECEIPT_DEPOSIT_POOL&apos;)))"/>
</bm:query-fields>
</bm:model>
......@@ -58,20 +58,18 @@ select t.parent_company_id company_id
<bm:query-field field="dd_bank_account_name" queryOperator="="/>
<!--<bm:query-field name="bp_id"
queryExpression="(t.bp_id_tenant = ${@bp_id} or t.bp_id_agent_level1 = ${@bp_id} or ((select bp_category from hls_bp_master where bp_id = ${@bp_id}) = 'VENDER'))"/>-->
<bm:query-field name="bp_id" queryExpression="(Exists (Select 1 From (Select h.bp_id From hls_bp_master h Where h.bp_name = (Select hbm.bp_name From hls_bp_master hbm Where hbm.bp_id = ${@bp_id})) t1 Where t1.bp_id = t.bp_id_tenant) Or Exists
<bm:query-field name="bp_id" queryExpression="(Exists (Select 1
From hls_bp_master h, hls_bp_master_role hbr
Where h.bp_id = ${@bp_id}
and hbr.bp_id = h.bp_id
and hbr.bp_type = 'TENANT'
and h.bp_id = t.bp_id_tenant) Or not Exists
(Select 1
From (Select h.bp_id
From hls_bp_master h
Where h.bp_name =
(Select hbm.bp_name
From hls_bp_master hbm
Where hbm.bp_id = ${@bp_id})) t2
Where t2.bp_id = t.bp_id_agent_level1) Or Exists
(Select 1
From con_contract_lease_item ccli, hls_lease_item hli
Where ccli.lease_item_id = hli.lease_item_id
And hli.vender_id = ${@bp_id}
And t.contract_id = ccli.contract_id))"/>
From hls_bp_master h, hls_bp_master_role hbr
Where h.bp_id = ${@bp_id}
and hbr.bp_id = h.bp_id
and hbr.bp_type = 'TENANT'
))"/>
<bm:query-field name="bp_name" queryExpression="t.bp_name like '%' || ${@bp_name} || '%'"/>
</bm:query-fields>
</bm:model>
......@@ -16,7 +16,7 @@
<bm:field name="write_off_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="WRITE_OFF_AMOUNT" prompt="核销金额"/>
<bm:field name="write_off_date" databaseType="DATE" datatype="java.util.Date" physicalName="WRITE_OFF_DATE" prompt="CSH_TRANSACTION_PLAN.WRITE_OFF_DATE"/>
<bm:field name="company_id" databaseType="NUMBER" databasetype="java.lang.Long" physicalName="COMPANY_ID" prompt="CSH_TRANSACTION_PLAN.COMPANY_ID"/>
<bm:field name="create_wf_flag_desc" expression="(decode(t1.create_wf_flag,'Y','是','否'))"/>
<bm:field name="create_wf_flag_desc" expression="(decode(t1.create_wf_flag,'Y','是','否'))" forInsert="false" forceUpdate="false"/>
<bm:field name="create_wf_flag"/>
</bm:fields>
<bm:query-fields>
......
......@@ -109,6 +109,7 @@
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.transaction_type in (&apos;DEPOSIT&apos;))"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is null)"/>
<bm:data-filter name="query" expression="(nvl(t1.reversed_flag,'N') = 'N')"/>
<bm:data-filter name="query" expression="(t1.confirmed_flag not in('ACCAUDITING','NEW','CT_REJECTED'))"/>
<bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>
</bm:data-filters>
......
......@@ -70,7 +70,8 @@
<bm:field name="rate_method_code" expression="(select t.rate_method_code from gld_exchangerate_types t where t.type_code=t1.exchange_rate_type)" forInsert="false" forUpdate="false"/>
<bm:field name="zero_amounts_allowed" expression="(select d.zero_amounts_allowed from csh_bank_account_v d where d.bank_account_id=t1.bank_account_id)" forInsert="false" forUpdate="false"/>
<bm:field name="transaction_type_desc" forInsert="false" forUpdate="false" prompt="HLS.TRANSACTION_TYPE"/>
<bm:field name="unwrite_off_amount" expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0))" forInsert="false" forUpdate="false" prompt="HLS.UNWRITEOFF_AMOUNT"/>
<!-- <bm:field name="unwrite_off_amount" expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0))" forInsert="false" forUpdate="false" prompt="HLS.UNWRITEOFF_AMOUNT"/>-->
<bm:field name="unwrite_off_amount" expression="(t1.transaction_amount-nvl((select sum(cw.write_off_due_amount) from csh_write_off cw where cw.csh_transaction_id=t1.transaction_id and cw.reversed_flag='N' and cw.write_off_date &lt;=nvl(to_date(${@write_off_date_to},&apos;yyyy-mm-dd&apos;),sysdate) ),0))" forInsert="false" forUpdate="false" prompt="HLS.UNWRITEOFF_AMOUNT"/>
<bm:field name="precision" expression="(select g.precision from gld_currency g where g.currency_code =t1.currency_code)" forInsert="false" forUpdate="false"/>
<bm:field name="reverse_amount" expression="(-1*t1.transaction_amount)" forInsert="false" forUpdate="false" prompt="CSH511.REVERSE_AMOUNT"/>
<bm:field name="user_desc" expression="(select su.description from sys_user su where su.user_id=t1.created_by)" forInsert="false" forUpdate="false"/>
......@@ -132,7 +133,7 @@
or (decode(${/session/@user_id}, 10600, 1, 2) = 2) )"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field name="query_amount_flag" queryExpression="((${@query_amount_flag}='1' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0) )or(${@query_amount_flag}='2' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) =0) )or (${@query_amount_flag}='3' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >=0)))"/>
<bm:query-field name="query_amount_flag" queryExpression="((${@query_amount_flag}='1' and ((t1.transaction_amount-nvl((select sum(cw.write_off_due_amount) from csh_write_off cw where cw.csh_transaction_id=t1.transaction_id and cw.reversed_flag='N' and cw.write_off_date &lt;=nvl(to_date(${@write_off_date_to},&apos;yyyy-mm-dd&apos;),sysdate) ),0))>0) )or(${@query_amount_flag}='2' and ( (t1.transaction_amount-nvl((select sum(cw.write_off_due_amount) from csh_write_off cw where cw.csh_transaction_id=t1.transaction_id and cw.reversed_flag='N' and cw.write_off_date &lt;=nvl(to_date(${@write_off_date_to},&apos;yyyy-mm-dd&apos;),sysdate) ),0))=0) )or (${@query_amount_flag}='3' and ( (t1.transaction_amount-nvl((select sum(cw.write_off_due_amount) from csh_write_off cw where cw.csh_transaction_id=t1.transaction_id and cw.reversed_flag='N' and cw.write_off_date &lt;=nvl(to_date(${@write_off_date_to},&apos;yyyy-mm-dd&apos;),sysdate) ),0))>=0)))"/>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
<bm:query-field field="write_off_flag" queryExpression="t1.write_off_flag =${@write_off_flag}"/>
<bm:query-field field="bp_bank_account_name" queryOperator="like"/>
......
......@@ -37,7 +37,8 @@
rd.enable_flag,
to_char(rd.last_update_date,'yyyy-mm-dd')last_update_date,
(select description from sys_user s where s.user_id= rd.created_by)last_updated_by_desc,
(select description from sys_user s where s.user_id= rd.temp_user)temp_user_desc
(select description from sys_user s where s.user_id= rd.temp_user)temp_user_desc,
(select v.unit_name from exp_emp_assign_e_v v where v.unit_id = hbm.unit_id and rownum = 1) agent_name
from HLS_BP_MASTER_CREDIT_HD hd,
hls_bp_master hbm,
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="HLS_ACR_EBANK_OUTPUT_TEMP">
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="HLS_ACR_EBANK_OUTPUT_TEMP" defaultOrderBy="t1.ebank_tmp_id">
<bm:fields>
<bm:field name="ebank_tmp_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="EBANK_TMP_ID" prompt="HLS_ACR_EBANK_OUTPUT_TEMP.EBANK_TMP_ID"/>
<bm:field name="session_id" databaseType="NUMBER" datatype="java.lang.Double" prompt="HLS_ACR_EBANK_OUTPUT_TEMP.SESSION_ID"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="HLS_ACR_EBANK_OUTPUT_TEMP">
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="HLS_ACR_EBANK_OUTPUT_TEMP" defaultOrderBy="t1.ebank_tmp_id">
<bm:fields>
<bm:field name="ebank_tmp_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="EBANK_TMP_ID" prompt="HLS_ACR_EBANK_OUTPUT_TEMP.EBANK_TMP_ID"/>
<bm:field name="session_id" databaseType="NUMBER" datatype="java.lang.Double" prompt="HLS_ACR_EBANK_OUTPUT_TEMP.SESSION_ID"/>
......
<?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 r1.employee_type_code
FROM EXP_EMPLOYEES t1, EXP_EMPLOYEE_TYPES_VL r1
WHERE t1.EMPLOYEE_TYPE_ID = r1.EMPLOYEE_TYPE_ID
AND t1.employee_id =
(SELECT su.employee_id FROM sys_user su WHERE su.user_id = ${/session/@user_id})
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: lihh
$Date: 2021-06-10 上午10:30:21
$Revision: 1.0
$Purpose: 逾期租金表(保证金后)获取数据
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select
rct.agent_extra_name agent_extra_name_af,
rct.bp_tenant_name bp_tenant_name_af,
rct.branch_code branch_code_af,
rct.contract_id contract_id_af,
rct.contract_number contract_number_af,
rct.cshflow_id cshflow_id_af,
nvl(rct.deposit_amount,0) deposit_amount_af,
rct.due_amount due_amount_af,
to_char(rct.due_date,'yyyy-mm-dd') due_date_af,
(NVL(rct.int_rate_display, 0) * 100 ||'%') int_rate_display_af,
rct.is_buyout,
(Select v1.code_value_name
From sys_code_values_v v1
Where v1.code = 'YES_OR_NO'
And v1.code_enabled_flag = 'Y'
And v1.code_value_enabled_flag = 'Y'
and v1.CODE_VALUE = rct.is_buyout) is_buyout_af,
rct.large_balance large_balance_af,
rct.machine_number machine_number_af,
to_char(rct.lease_start_date,'yyyy-mm-dd') lease_start_date_af,
rct.modelcd modelcd_af,
nvl(rct.overdue_days,0) overdue_days_af,
nvl(rct.received_amount,0) received_amount_af,
rct.times times_af,
nvl(rct.unreceived_amount,0) unreceived_amount_af,
rct.rent_type
from
rpt5012_csh_result_after_temp rct
order by rct.contract_number,rct.times
]]></bm:query-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
csh_result_query_pkg.get_result_received_amount(
p_month =>${@month},
p_cur_begin =>${@cur_begin},
p_cur_end =>${@cur_end},
p_before_begin =>${@before_begin},
p_before_end =>${@before_end}
);
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="cur_begin" dataType="date" input="true" output="true"
outputPath="/parameter/@cur_begin"/>
<bm:parameter name="cur_end" dataType="date" input="true" output="true"
outputPath="/parameter/@cur_end"/>
<bm:parameter name="before_begin" dataType="date" input="true" output="true"
outputPath="/parameter/@before_begin"/>
<bm:parameter name="before_end" dataType="date" input="true" output="true"
outputPath="/parameter/@before_end"/>
</bm:parameters>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="agent_extra_name_af"/>
<bm:field name="bp_tenant_name_af"/>
<bm:field name="contract_number_af"/>
<bm:field name="lease_start_date_af"/>
<bm:field name="modelcd_af"/>
<bm:field name="machine_number_af"/>
<bm:field name="int_rate_display_af"/>
<bm:field name="times_af"/>
<bm:field name="due_date_af"/>
<bm:field name="due_amount_af" datatype="java.lang.Double"/>
<bm:field name="received_amount_af" datatype="java.lang.Double"/>
<bm:field name="unreceived_amount_af" datatype="java.lang.Double"/>
<bm:field name="overdue_days_af" datatype="java.lang.Double"/>
<bm:field name="deposit_amount_af" datatype="java.lang.Double"/>
<bm:field name="is_buyout_af"/>
<bm:field name="rent_type"/>
</bm:fields>
</bm:model>
......@@ -26,7 +26,12 @@
'yyyy-mm-dd') lease_start_date,
ccli.machine_number,
ccli.modelcd,
ccc.times,
(CASE
WHEN ccc.cf_item = 8 THEN
'留购价'
ELSE
to_char(ccc.times)
END) times,
to_char(ccc.due_date, 'yyyy-mm-dd') due_date,
(NVL(t.int_rate_display, 0) * 100 ||
......@@ -95,7 +100,13 @@
Where v.code = 'BRANCH_CODE_SZMP'
And v.code_enabled_flag = 'Y'
And v.code_value_enabled_flag = 'Y'
And v.code_value = t.branch_code) branch_code_n
And v.code_value = t.branch_code) branch_code_n,
(CASE
WHEN to_char(ccc.due_date,'MM') = to_char(to_date(${@cur_begin}, 'yyyy-mm-dd'),'MM') THEN
'新增租金'
ELSE
'往期租金'
END) rent_type
from con_contract_cashflow ccc, con_contract t, con_contract_lease_item ccli
WHERE ccc.contract_id = t.contract_id
AND ccli.contract_id (+) = t.contract_id
......@@ -118,7 +129,7 @@
AND trunc(t.transaction_date) <
trunc(to_date(${@cur_begin}, 'yyyy-mm-dd'))),
0)
order by t.contract_id
order by t.contract_id,ccc.times,decode(ccc.cf_item,1,1,200,2,8,3,4)
) v
]]></bm:query-sql>
</bm:operation>
......@@ -144,12 +155,13 @@
<bm:field name="int_rate_display"/>
<bm:field name="times"/>
<bm:field name="due_date"/>
<bm:field name="due_amount"/>
<bm:field name="received_amount"/>
<bm:field name="unreceived_amount"/>
<bm:field name="overdue_days"/>
<bm:field name="deposit_amount"/>
<bm:field name="due_amount" datatype="java.lang.Double"/>
<bm:field name="received_amount" datatype="java.lang.Double"/>
<bm:field name="unreceived_amount" datatype="java.lang.Double"/>
<bm:field name="overdue_days" datatype="java.lang.Double"/>
<bm:field name="deposit_amount" datatype="java.lang.Double"/>
<bm:field name="is_buyout_n"/>
<bm:field name="rent_type"/>
</bm:fields>
<!-- <bm:query-fields>-->
<!-- <bm:query-field field="bp_id_tenant_n" queryExpression="t1.bp_id_tenant_n = ${@bp_id_tenant_n}"/>-->
......
......@@ -9,210 +9,683 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select
SELECT
(SELECT m.extra_nam
FROM hls_bp_master m
WHERE m.bp_id = ct.bp_id_agent_level1) agent_extra_name,
--代理店简称
(SELECT m.bp_name
FROM hls_bp_master m
WHERE m.bp_id =
ct.bp_id_tenant) AS bp_tenant_name,
(SELECT m.bp_name FROM hls_bp_master m WHERE m.bp_id = ct.bp_id_tenant) AS bp_tenant_name,
--承租人名称
ct.contract_number,
--合同编号
to_char(ct.lease_start_date,
'yyyy-mm-dd') lease_start_date,
to_char(ct.lease_start_date, 'yyyy-mm-dd') lease_start_date,
--租赁期开始日
(SELECT ccli.modelcd
FROM con_contract_lease_item ccli
WHERE ccli.contract_id =
ct.contract_id) modelcd,
WHERE ccli.contract_id = ct.contract_id) modelcd,
--机型
(SELECT i.machine_number
FROM con_contract_lease_item i
WHERE i.contract_id = ct.contract_id
AND i.equipment_type =
'MAIN') machine_number,
AND i.equipment_type = 'MAIN') machine_number,
--机号
(NVL(ct.int_rate_display, 0) * 100 ||
'%') int_rate_display,
to_char(NVL(ct.int_rate_display, 0) * 100, 'FM99,999,999,990.00') || '%' int_rate_display,
-- (NVL(ct.int_rate_display, 0) * 100 ||
-- '%') int_rate_display,
--利率
ct.lease_times,
--租赁期间
(NVL(ct.down_payment_ratio, 0) * 100 ||
'%') down_payment_ratio,
(NVL(ct.down_payment_ratio, 0) * 100 || '%') down_payment_ratio,
--首付比例
ct.lease_item_amount as lease_item_amount,
ct.lease_item_amount AS lease_item_amount,
--设备款
NVL(ct.residual_value,
0) residual_amount,
NVL(ct.residual_value, 0) residual_amount,
--留购金
NVL(ct.total_rental, 0) + NVL(ct.down_payment, 0) +
NVL(ct.residual_value,
0) contract_amount,
NVL(ct.residual_value, 0) contract_amount,
--合同金额
NVL(ct.down_payment,
0) down_payment,
NVL(ct.down_payment, 0) down_payment,
--首付款
(case when ct.contract_status = 'TERMINATE'
then
(case when ((CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
else
((select sum(ccw.due_amount)
from con_contract_cashflow ccw
where ccw.contract_id = ct.contract_id
and ccw.cf_item in (1, 200)) -
nvl((select sum(nvl(cw.write_off_due_amount, 0))
from csh_transaction cn, csh_write_off cw
where cw.csh_transaction_id = cn.transaction_id
and cw.cf_item in (1, 200)
and cw.contract_id = ct.contract_id
and NVL(cw.reversed_flag, 'N') = 'N'
and trunc(cn.transaction_date) <=
ELSE
((SELECT SUM(ccw.due_amount)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_due_amount, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END)<=0) then 0 else
(CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.due_amount)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_due_amount, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END)
end) month_due_amount,
--当月末应收款余额(合计)
(case when ct.contract_status = 'TERMINATE'
then
(CASE
WHEN (CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
else
((select sum(ccw.principal)
from con_contract_cashflow ccw
where ccw.contract_id = ct.contract_id
and ccw.cf_item in (1, 200)) -
nvl((select sum(nvl(cw.write_off_principal, 0))
from csh_transaction cn, csh_write_off cw
where cw.csh_transaction_id = cn.transaction_id
and cw.cf_item in (1, 200)
and cw.contract_id = ct.contract_id
and NVL(cw.reversed_flag, 'N') = 'N'
and trunc(cn.transaction_date) <=
ELSE
((SELECT SUM(ccw.due_amount)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_due_amount, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0) - nvl((SELECT SUM((nvl(tt.transaction_amount, 0) -
nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
FROM csh_transaction tt
WHERE tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
AND tt.ref_contract_id = ct.contract_id
AND tt.transaction_date <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END) <= 0 THEN
0
ELSE
(CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.due_amount)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_due_amount, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0) - nvl((SELECT SUM((nvl(tt.transaction_amount, 0) -
nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
FROM csh_transaction tt
WHERE tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
AND tt.ref_contract_id = ct.contract_id
AND tt.transaction_date <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END)
END) month_due_amount_after,
--当月末应收款余额(合计)保证金后
(case when ((CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.principal)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_principal, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END) <=0) then 0 else
(CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.principal)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_principal, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END)
end) month_due_principal,
--当月末本金余额(合计)
(case when ct.contract_status = 'TERMINATE'
then
(CASE
WHEN (CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
else
((select sum(ccw.interest)
from con_contract_cashflow ccw
where ccw.contract_id = ct.contract_id
and ccw.cf_item in (1, 200)) -
nvl((select sum(nvl(cw.write_off_interest, 0))
from csh_transaction cn, csh_write_off cw
where cw.csh_transaction_id = cn.transaction_id
and cw.cf_item in (1, 200)
and cw.contract_id = ct.contract_id
and NVL(cw.reversed_flag, 'N') = 'N'
and trunc(cn.transaction_date) <=
ELSE
((SELECT SUM(ccw.principal)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_principal, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0) - nvl((SELECT SUM((nvl(tt.transaction_amount, 0) -
nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
FROM csh_transaction tt
WHERE tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
AND tt.ref_contract_id = ct.contract_id
AND tt.transaction_date <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END) <= 0 THEN
0
ELSE
(CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.principal)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_principal, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0) - nvl((SELECT SUM((nvl(tt.transaction_amount, 0) -
nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
FROM csh_transaction tt
WHERE tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
AND tt.ref_contract_id = ct.contract_id
AND tt.transaction_date <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END)
END) month_due_principal_after,
--当月末本金余额(合计)保证金后
(case when ((CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.interest)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_interest, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END) <=0) then 0 else
(CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.interest)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_interest, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0)) end) month_interest,
0))
END)
end) month_interest,
--当月末利息余额(合计)
(case when ct.contract_status = 'TERMINATE'
then
(CASE
WHEN ((SELECT SUM((nvl(tt.transaction_amount, 0) -
nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
FROM csh_transaction tt
WHERE tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
AND tt.ref_contract_id = ct.contract_id
AND tt.transaction_date <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))) - ((CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
else
((select sum(ccw.due_amount)
from con_contract_cashflow ccw
where ccw.contract_id = ct.contract_id
and ccw.cf_item in (8)) -
nvl((select sum(nvl(cw.write_off_due_amount, 0))
from csh_transaction cn, csh_write_off cw
where cw.csh_transaction_id = cn.transaction_id
and cw.cf_item in (8)
and cw.contract_id = ct.contract_id
and NVL(cw.reversed_flag, 'N') = 'N'
and trunc(cn.transaction_date) <=
ELSE
((SELECT SUM(ccw.principal)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_principal, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0)) end) month_residual,
0))
END))) > 0 THEN
(CASE
WHEN ((CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.interest)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_interest, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END) - (SELECT SUM((nvl(tt.transaction_amount, 0) -
nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
FROM csh_transaction tt
WHERE tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
AND tt.ref_contract_id = ct.contract_id
AND tt.transaction_date <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))) - (CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.principal)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_principal, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END)) <= 0 THEN
0
ELSE
((CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.interest)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_interest, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END) -
(SELECT SUM((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
FROM csh_transaction tt
WHERE tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
AND tt.ref_contract_id = ct.contract_id
AND tt.transaction_date <= trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))) -
(CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.principal)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_principal, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END))
END)
ELSE
(CASE
WHEN (CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.interest)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_interest, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END) <= 0 THEN
0
ELSE
(CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.interest)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 250)
AND ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_interest, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (1, 200, 250)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END)
END)
END) month_interest_after,
--当月末利息余额(合计)保证金后
(CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
((SELECT SUM(ccw.due_amount)
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (8)
and ccw.cf_status = 'RELEASE') -
nvl((SELECT SUM(nvl(cw.write_off_due_amount, 0))
FROM csh_transaction cn, csh_write_off cw
WHERE cw.csh_transaction_id = cn.transaction_id
AND cw.cf_item IN (8)
AND cw.contract_id = ct.contract_id
AND NVL(cw.reversed_flag, 'N') = 'N'
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END) month_residual,
--当月末留购金余额
(case when ct.contract_status = 'TERMINATE'
then
(CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
else
ELSE
con_contract_pkg.get_business_times(p_contract_id => ct.contract_id,
p_calc_date => to_date(${@cur_end}, 'yyyy-mm-dd'),
p_contract_inception_date => ct.contract_inception_date) end) business_due_times,
--逾期期数
(case when ct.contract_status = 'TERMINATE'
then
p_calc_date => to_date(${@cur_end},
'yyyy-mm-dd'),
p_contract_inception_date => ct.contract_inception_date)
END) business_due_times_after,
--逾期期数(保证金后)
(CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
else
(nvl((select sum(ccw.due_amount) - sum(nvl((SELECT SUM(nvl(cwo.write_off_due_amount, 0))
ELSE
(Select count(*)
From con_contract_cashflow ccw
Where trunc(ccw.due_date) <= trunc(to_date(${@cur_end},'yyyy-mm-dd'))
And ccw.contract_id = ct.contract_id
And ccw.cf_item In (1, 200,250)
and ccw.cf_status = 'RELEASE'
And ccw.times > 0
and ccw.due_amount > ccw.received_amount)
END) business_due_times,
--逾期期数(保证金前)
(case when ((CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
(nvl((SELECT SUM(ccw.due_amount) -
SUM(nvl((SELECT SUM(nvl(cwo.write_off_due_amount, 0))
FROM csh_write_off cwo, csh_transaction cn
WHERE nvl(cwo.reversed_flag, 'N') = 'N'
AND cwo.contract_id = ccw.contract_id
AND cwo.times = ccw.times
and
cwo.csh_transaction_id = cn.transaction_id
AND cwo.csh_transaction_id =
cn.transaction_id
AND cwo.cf_item = ccw.cf_item
and trunc(cn.transaction_date) <=
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end},
'yyyy-mm-dd'))),
0))
from con_contract_cashflow ccw
where ccw.contract_id = ct.contract_id
and ccw.cf_item in (1, 200, 8)
and trunc(ccw.due_date) <= trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))), 0)
- nvl((select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 8, 250)
AND ccw.cf_status = 'RELEASE'
AND trunc(ccw.due_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END)<=0) then 0 else (CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
(nvl((SELECT SUM(ccw.due_amount) -
SUM(nvl((SELECT SUM(nvl(cwo.write_off_due_amount, 0))
FROM csh_write_off cwo, csh_transaction cn
WHERE nvl(cwo.reversed_flag, 'N') = 'N'
AND cwo.contract_id = ccw.contract_id
AND cwo.times = ccw.times
AND cwo.csh_transaction_id =
cn.transaction_id
AND cwo.cf_item = ccw.cf_item
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end},
'yyyy-mm-dd'))),
0))
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 8, 250)
AND ccw.cf_status = 'RELEASE'
AND trunc(ccw.due_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END)
end) business_due_amount,
--当月末逾期金额(合计)
(case when (CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
(nvl((SELECT SUM(ccw.due_amount) -
SUM(nvl((SELECT SUM(nvl(cwo.write_off_due_amount, 0))
FROM csh_write_off cwo, csh_transaction cn
WHERE nvl(cwo.reversed_flag, 'N') = 'N'
AND cwo.contract_id = ccw.contract_id
AND cwo.times = ccw.times
AND cwo.csh_transaction_id = cn.transaction_id
AND cwo.cf_item = ccw.cf_item
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 8, 250)
AND ccw.cf_status = 'RELEASE'
AND trunc(ccw.due_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0) - nvl((SELECT SUM((nvl(tt.transaction_amount, 0) -
nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
from csh_transaction tt
where tt.transaction_type = 'DEPOSIT'
FROM csh_transaction tt
WHERE tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
and tt.ref_contract_id = ct.contract_id),
0)) end) business_due_amount,
--当月末逾期金额(合计)
(select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
AND tt.ref_contract_id = ct.contract_id
AND tt.transaction_date <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END)<=0 then
0
else
(CASE
WHEN ct.contract_status IN ('TERMINATE', 'REPUR', 'ET') THEN
0
ELSE
(nvl((SELECT SUM(ccw.due_amount) -
SUM(nvl((SELECT SUM(nvl(cwo.write_off_due_amount, 0))
FROM csh_write_off cwo, csh_transaction cn
WHERE nvl(cwo.reversed_flag, 'N') = 'N'
AND cwo.contract_id = ccw.contract_id
AND cwo.times = ccw.times
AND cwo.csh_transaction_id = cn.transaction_id
AND cwo.cf_item = ccw.cf_item
AND trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = ct.contract_id
AND ccw.cf_item IN (1, 200, 8, 250)
AND ccw.cf_status = 'RELEASE'
AND trunc(ccw.due_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0) - nvl((SELECT SUM((nvl(tt.transaction_amount, 0) -
nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
from csh_transaction tt
where tt.transaction_type = 'DEPOSIT'
FROM csh_transaction tt
WHERE tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
and tt.ref_contract_id =
ct.contract_id) deposit_amount,
AND tt.ref_contract_id = ct.contract_id
AND tt.transaction_date <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0))
END)
end) business_due_amount_after,
--当月末逾期金额(合计)保证金后
((SELECT SUM(nvl(tt.transaction_amount, 0))
FROM csh_transaction tt
WHERE tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
AND tt.ref_contract_id = ct.contract_id
AND tt.transaction_date <= trunc(to_date(${@cur_end}, 'yyyy-mm-dd')))
-
(SELECT sum(nvl(cwo.WRITE_OFF_DUE_AMOUNT,0))
FROM csh_write_off cwo
where cwo.write_off_type in ('CSH_RETURN','DEPOSIT_TRANSFER','DEPOSIT_CREDIT')
AND cwo.csh_transaction_id in (select cts.transaction_id from csh_transaction cts where cts.ref_contract_id = ct.contract_id)
AND cwo.write_off_date <= trunc(to_date(${@cur_end}, 'yyyy-mm-dd')))) deposit_amount,
--保证金金额
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'CON500_CONTRACT_STATUS'
AND v.code_value =
ct.contract_status) AS contract_status_n,
AND v.code_value = ct.contract_status) AS contract_status_n,
--合同金额
(select to_char(due_date, 'yyyy-mm-dd')
from con_contract_cashflow
where contract_id = ct.contract_id
and cf_status='RELEASE'
and cf_item =
8) residual_date,
(SELECT to_char(due_date, 'yyyy-mm-dd')
FROM con_contract_cashflow
WHERE contract_id = ct.contract_id
AND cf_status = 'RELEASE'
AND cf_item = 8) residual_date,
-- 合同终了
to_char(ct.et_date,
'yyyy-mm-dd') terminate_date,
(CASE
WHEN ct.contract_status IN ('INCEPT', 'ETING', 'TERMINATE', 'ET') THEN
(SELECT to_char(MAX(cc.last_received_date),'yyyy-mm-dd')
FROM con_contract_cashflow cc
WHERE cc.contract_id = ct.contract_id
AND cf_status = 'RELEASE'
AND cf_item = 8)
WHEN ct.contract_status IN ('REPUR') THEN
(SELECT to_char(MAX(cc.last_received_date),'yyyy-mm-dd')
FROM con_contract_cashflow cc
WHERE cc.contract_id = ct.contract_id
AND cf_status = 'RELEASE'
AND cf_item = 250)
ELSE
''
END) terminate_date,
ct.is_buyout,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'YES_OR_NO'
And v.code_enabled_flag = 'Y'
And v.code_value_enabled_flag = 'Y'
and v.CODE_VALUE = ct.is_buyout) is_buyout_n,
(select sh.large_balance from prj_quotation sh where sh.DOCUMENT_ID = ct.project_id) large_balance,
(select v.code_value_name
from sys_code_values_v v
where v.code = 'SECONDARY_LEASE'
and v.code_value = (select sh.large_balance from prj_quotation sh where sh.DOCUMENT_ID = ct.project_id)) large_balance_n,
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'YES_OR_NO'
AND v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.CODE_VALUE = ct.is_buyout) is_buyout_n,
(SELECT sh.large_balance
FROM prj_quotation sh
WHERE sh.DOCUMENT_ID = ct.project_id) large_balance,
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'SECONDARY_LEASE'
AND v.code_value =
(SELECT sh.large_balance
FROM prj_quotation sh
WHERE sh.DOCUMENT_ID = ct.project_id)) large_balance_n,
ct.branch_code,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'BRANCH_CODE_SZMP'
And v.code_enabled_flag = 'Y'
And v.code_value_enabled_flag = 'Y'
And v.code_value = ct.branch_code) branch_code_n
from con_contract ct
where ct.contract_status not in ('CANCEL')
and ct.data_class = 'NORMAL'
order by ct.bp_id_agent_level1
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'BRANCH_CODE_SZMP'
AND v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code_value = ct.branch_code) branch_code_n
FROM con_contract ct
WHERE ct.contract_status NOT IN ('CANCEL')
AND ct.data_class = 'NORMAL'
ORDER BY ct.bp_id_agent_level1
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
......@@ -257,20 +730,25 @@
<bm:field name="lease_start_date"/>
<bm:field name="modelcd"/>
<bm:field name="machine_number"/>
<bm:field name="int_rate_display"/>
<bm:field name="lease_times"/>
<bm:field name="int_rate_display" datatype="java.lang.String"/>
<bm:field name="lease_times" datatype="java.lang.Long"/>
<bm:field name="down_payment_ratio"/>
<bm:field name="lease_item_amount"/>
<bm:field name="residual_amount"/>
<bm:field name="contract_amount"/>
<bm:field name="down_payment"/>
<bm:field name="month_due_amount"/>
<bm:field name="month_due_principal"/>
<bm:field name="month_interest"/>
<bm:field name="month_residual"/>
<bm:field name="business_due_times"/>
<bm:field name="business_due_amount"/>
<bm:field name="deposit_amount"/>
<bm:field name="lease_item_amount" datatype="java.lang.Double"/>
<bm:field name="residual_amount" datatype="java.lang.Double"/>
<bm:field name="contract_amount" datatype="java.lang.Double"/>
<bm:field name="down_payment" datatype="java.lang.Double"/>
<bm:field name="month_due_amount" datatype="java.lang.Double"/>
<bm:field name="month_due_amount_after" datatype="java.lang.Double"/>
<bm:field name="month_due_principal" datatype="java.lang.Double"/>
<bm:field name="month_due_principal_after" datatype="java.lang.Double"/>
<bm:field name="month_interest" datatype="java.lang.Double"/>
<bm:field name="month_interest_after" datatype="java.lang.Double"/>
<bm:field name="month_residual" datatype="java.lang.Double"/>
<bm:field name="business_due_times" datatype="java.lang.Long"/>
<bm:field name="business_due_times_after" datatype="java.lang.Long"/>
<bm:field name="business_due_amount" datatype="java.lang.Double"/>
<bm:field name="business_due_amount_after" datatype="java.lang.Double"/>
<bm:field name="deposit_amount" datatype="java.lang.Double"/>
<bm:field name="contract_status_n"/>
<bm:field name="residual_date"/>
<bm:field name="terminate_date"/>
......
<?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 h.bp_name, h.bp_code, h.bp_id
FROM exp_emp_assign_e_v ee, hls_bp_master h
WHERE ee.user_id = (SELECT zw.submitted_by
FROM zj_wfl_workflow_instance zw
WHERE zw.instance_id = ${/parameter/@instance_id})
AND ee.unit_id = h.unit_id
AND h.bp_category = 'AGENT'
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
......@@ -41,7 +41,8 @@
url: $('acr620_invoice_reverse_save_link').getUrl(),
para: {
invoice_apply_id: invoice_apply_id,
reverse_method: record.get('reverse_method')
reverse_method: record.get('reverse_method'),
note: record.get('note')
},
success: function () {
Leaf.SideBar.show({
......@@ -167,6 +168,7 @@
datas['invoice_hd_ids'] = invoice_hd_ids;
datas['apply_mode'] = 'REVERSE';
datas['details'] = saveData;
datas['note'] = head_record.get('note');
if (head_ds.validate()) {
if (head_record.get('reverse_method') == 'REVERSE') {
var all_record = $('acr514_invoice_reverse_detail_result_ds').getAll();
......@@ -278,6 +280,7 @@
<a:field name="reverse_method_n" displayField="code_value_name" options="acr514_reverse_method_ds"
returnField="reverse_method" valueField="code_value" required="true"
requiredMessage="请输入必输字段:反冲方式"/>
<a:field name="note" required="true" requiredMessage="请输入必输字段:反冲意见"/>
</a:fields>
</a:dataSet>
<a:dataSet id="acr514_invoice_reverse_detail_result_ds" autoPageSize="true" autoQuery="true" fetchAll="true"
......@@ -310,6 +313,9 @@
<a:comboBox name="reverse_method_n" bindTarget="acr514_invoice_reverse_apply_basic_ds" prompt="反冲方式"
width="135"/>
</a:hBox>
<a:hBox row="2" labelSeparator=" ">
<a:textArea name="note" bindTarget="acr514_invoice_reverse_apply_basic_ds" prompt="反冲意见" height="60" width="565"/>
</a:hBox>
</a:form>
<a:grid id="acr514_invoice_reverse_detail_grid_ds" bindTarget="acr514_invoice_reverse_detail_result_ds"
marginHeight="130"
......
......@@ -117,6 +117,7 @@
msg: '发送成功',
duration: 2000
});
$('acr516_invoice_result_ds').query();
}
});
},null);
......
......@@ -37,8 +37,8 @@
bp_id: str
});
var bp_att = bp_map.getChildren();
var bp_name = bp_att[0].bp_name;
return bp_name;
//var bp_name = bp_att[0].bp_name;
return bp_att[0];
}
try {
var resultStr = $ctx.parameter.result_map;
......@@ -51,8 +51,9 @@
var fileN = [];
//转为数字
var bp_id = parseInt(key);
var bp_name = getBpName(bp_id);
//println(key);
var bp_name = getBpName(bp_id).bp_name;
var bp_code = getBpName(bp_id).bp_code;
//println(bp_code);
var hds = jm[key];
println(hds);
//转为数组
......@@ -60,7 +61,7 @@
//println(typeof hdsArr);
//println(hdsArr.length);
//压缩文件夹
var zip_filename = '['+bp_name+']'+bp_id+'电子发票.zip';
var zip_filename = '['+bp_name+']'+bp_code+'电子发票.zip';
var tranfer_file_path = file_dir + zip_filename;
var zipFile= new File(String(tranfer_file_path));
if(!zipFile.exists()){//如果文件夹不存在,创建文件夹
......
......@@ -99,7 +99,6 @@
return '<a href="javascript:acr610_detail_grid_readonly(' + record.id + ',' + record.get('invoice_hd_wfl_id') + ');">' + value + '</a>';
}
if (name == 'attachment') {
if (record.get('invoice_kind') == '0') {
if (record.get('paid_byother_flag') == 'T') {
if (record.get('guarantor_name_duty') != 'Y' || record.get('guarantor_name_duty') == 'NULL') {
......
......@@ -99,7 +99,6 @@
return '<a href="javascript:acr610_detail_grid_readonly(' + record.id + ',' + record.get('invoice_hd_wfl_id') + ');">' + value + '</a>';
}
if (name == 'attachment') {
if (record.get('invoice_kind') == '0') {
if (record.get('paid_byother_flag') == 'T') {
if (record.get('guarantor_name_duty') != 'Y' || record.get('guarantor_name_duty') == 'NULL') {
......
......@@ -33,7 +33,8 @@
url: $('acr620_invoice_reverse_save_link').getUrl(),
para: {
invoice_apply_id: '${/parameter/@invoice_apply_id}',
reverse_method: record.get('reverse_method')
reverse_method: record.get('reverse_method'),
note: record.get('note')
},
success: function () {
Leaf.SideBar.show({
......@@ -138,6 +139,7 @@
<a:field name="invoice_apply_date"/>
<a:field name="reverse_method_n" displayField="code_value_name" options="acr620_reverse_method_ds"
returnField="reverse_method" valueField="code_value" required="true" requiredMessage="请输入必输字段:反冲方式"/>
<a:field name="note" required="true" requiredMessage="请输入必输字段:反冲意见"/>
</a:fields>
<a:events>
<a:event name="load" handler="acr620_invoice_reverse_load"/>
......@@ -161,6 +163,9 @@
<a:textField name="invoice_apply_date" bindTarget="acr620_invoice_reverse_apply_basic_ds" prompt="申请时间" width="135" readOnly="true"/>
<a:comboBox name="reverse_method_n" bindTarget="acr620_invoice_reverse_apply_basic_ds" prompt="反冲方式" width="135"/>
</a:hBox>
<a:hBox row="2" labelSeparator=" ">
<a:textArea name="note" bindTarget="acr620_invoice_reverse_apply_basic_ds" prompt="反冲意见" height="60" width="565"/>
</a:hBox>
</a:form>
<a:grid id="acr620_invoice_reverse_detail_grid_ds" bindTarget="acr620_invoice_reverse_detail_result_ds" marginHeight="135"
marginWidth="30" navBar="true">
......
......@@ -101,6 +101,7 @@
<a:field name="invoice_apply_user_n"/>
<a:field name="invoice_apply_date"/>
<a:field name="reverse_method_n"/>
<a:field name="note"/>
</a:fields>
</a:dataSet>
<a:dataSet id="acr620_invoice_reverse_detail_result_ds" autoPageSize="true" autoQuery="true" fetchAll="true"
......@@ -133,6 +134,9 @@
<a:textField name="invoice_apply_date" bindTarget="acr620_invoice_reverse_apply_basic_ds" prompt="申请时间" width="135" readOnly="true"/>
<a:comboBox name="reverse_method_n" bindTarget="acr620_invoice_reverse_apply_basic_ds" prompt="反冲方式" width="135" readOnly="true"/>
</a:hBox>
<a:hBox row="2" labelSeparator=" ">
<a:textArea name="note" bindTarget="acr620_invoice_reverse_apply_basic_ds" prompt="反冲意见" height="60" width="565" readOnly="true"/>
</a:hBox>
</a:form>
<a:switch test="/parameter/@button_flag">
<a:case value="YES">
......
......@@ -59,8 +59,10 @@
// $('hls_ccb_grid_create_ds').query();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody()); //解锁
},
error: function () {
Leaf.Masker.unmask(Ext.getBody()); //解锁
},
scope: this
});
......
......@@ -5,7 +5,8 @@
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true"
dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="cont.CON500.con_contract_get_guid_file_name" rootPath="file_name_path"/>
<s:server-script import="contract_print_path.js"><![CDATA[
......@@ -19,26 +20,40 @@
</s:server-script>
</a:init-procedure>
<a:view>
<a:link id="wfl_readonly_pageLink_projectQueryScreen_update_project" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/>
<a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_con_contract_content_confirm_link_id" url="${/request/@context_path}/modules/cont/CON501N/con_contract_content_confirm.lview"/>
<a:link id="contract_lease_item_query_link" url="${/request/@context_path}/modules/cont/CON505/con_lease_item_query.lview"/>
<a:link id="contract_history_window_link" url="${/request/@context_path}/modules/cont/CON501N/con_document_history_query.lview"/>
<a:link id="con505_hls_bp_master_query_link" url="${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"/>
<a:link id="${/parameter/@layout_code}_prj500_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}_prj500_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="wfl_readonly_pageLink_projectQueryScreen_update_project"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/>
<a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id"
model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_con_contract_content_confirm_link_id"
url="${/request/@context_path}/modules/cont/CON501N/con_contract_content_confirm.lview"/>
<a:link id="contract_lease_item_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_lease_item_query.lview"/>
<a:link id="contract_history_window_link"
url="${/request/@context_path}/modules/cont/CON501N/con_document_history_query.lview"/>
<a:link id="con505_hls_bp_master_query_link"
url="${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"/>
<a:link id="${/parameter/@layout_code}_prj500_cdd_uploadFile_id"
url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}_prj500_cdd_downloadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
<!--打印使用-->
<a:link id="${/parameter/@layout_code}_con505_contract_content_id" model="cont.CON505.con505_contract_content" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_creat_con_contract_content_link_id" model="cont.CON505.con505_contract_content" modelaction="execute"/>
<a:link id="${/parameter/@layout_code}_file_copy_from_template_link_id" url="${/request/@context_path}/modules/cont/CON505/file_copy_from_template.lsc"/>
<a:link id="${/parameter/@layout_code}_con_batch_dl_link_id" url="${/request/@context_path}/modules/cont/CON505/con_atm_batch_dl.lsc"/>
<a:link id="${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link" url="${/request/@context_path}/modules/cont/CON302N/con_cashflow_wirte_off_detail.lview"/>
<a:link id="${/parameter/@layout_code}_con505_contract_content_id" model="cont.CON505.con505_contract_content"
modelaction="update"/>
<a:link id="${/parameter/@layout_code}_creat_con_contract_content_link_id"
model="cont.CON505.con505_contract_content" modelaction="execute"/>
<a:link id="${/parameter/@layout_code}_file_copy_from_template_link_id"
url="${/request/@context_path}/modules/cont/CON505/file_copy_from_template.lsc"/>
<a:link id="${/parameter/@layout_code}_con_batch_dl_link_id"
url="${/request/@context_path}/modules/cont/CON505/con_atm_batch_dl.lsc"/>
<a:link id="${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link"
url="${/request/@context_path}/modules/cont/CON302N/con_cashflow_wirte_off_detail.lview"/>
<a:link id="con_approval_link_id" model="cont.CON505.contract_approval" modelaction="execute"/>
<!-- <link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>-->
<!-- <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>-->
<!-- <link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>-->
<!-- <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>-->
<a:link id="${/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="get_atch_download_link" url="${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"/>
<a:link id="get_atch_download_link"
url="${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"/>
<link href="${/request/@context_path}/modules/viewerjs/viewer.css" rel="stylesheet"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer.js"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer_tool.js"/>
......@@ -75,7 +90,7 @@
// record.getField('guarantee_letter_f').setReadOnly(true);
// record.getField('guarantee_letter_f_n').setReadOnly(true);
// }else
if(record.get('business_type') == 'LEASE'){
if (record.get('business_type') == 'LEASE') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT').style.display = 'none';
}
......@@ -86,10 +101,22 @@
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_REPUR_CONTRACT_ID').style.display = 'none';
}
if (record.get('contract_status') == 'REPUR'&&record.get('contract_status') == 'REPURING') {
if (record.get('contract_status') != 'REPUR' && record.get('contract_status') != 'REPURING') {
if (document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_BP_ID_TENANT_BF_REPUR_N')) {
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_BP_ID_TENANT_BF_REPUR_N_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_BP_ID_TENANT_BF_REPUR_N').style.display = 'none';
}
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示;
if (record.get('pay_method') == 'CCB_THREE') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'block';
} else {
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'none';
}
}
};
......@@ -174,8 +201,7 @@
// url = url + '<a ref="img" href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
link_function = 'show_viewer_more';
url = url + '<a href="javascript:window[\'' + link_function + '\'](\'' + link + '\',\'' + temp[1] + '\',\'' + temp[0] + '\',\'' + value + '\');">' + temp[0] + '</a>' + ',';
}
else {
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
......@@ -258,10 +284,10 @@
param['document_category'] = 'BP';
param['bp_class'] = record.get('bp_class');
param['bp_category'] = record.get('bp_category');
if( record.get('bp_category')=='AGENT'){
if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
}else{
} else {
param['function_code'] = 'CON505H';
param['function_usage'] = 'QUERY';
}
......@@ -300,12 +326,11 @@
var record = $(ds_id).findById(id);
if (record.get('check_id')) {
var url;
if(record.get('attachment_tab_group')=='SIGN' && '${/parameter/@con_query_only}'=='N'){
if (record.get('attachment_tab_group') == 'SIGN' && '${/parameter/@con_query_only}' == 'N') {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}else if(record.get('attachment_tab_group')=='SIGN' && '${/parameter/@con_query_only}'=='Y'){
} else if (record.get('attachment_tab_group') == 'SIGN' && '${/parameter/@con_query_only}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
else if (query_only == 'Y') {
} else if (query_only == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
......@@ -498,7 +523,7 @@
var path = res.result.record.file_path;
path = path.substr(path.indexOf('hls_attachment'));
var tomcat_source = '${/parameter/@tomcat_source}';
var source_path = 'http://' + window.location.host + '/' + tomcat_source + '/' + path+'?type=pdf';
var source_path = 'http://' + window.location.host + '/' + tomcat_source + '/' + path + '?type=pdf';
var oWin = window.open(source_path);
},
scope: this
......@@ -506,8 +531,7 @@
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
// var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_bs_score');
// if (ds == $(ds_id)) {
......@@ -521,9 +545,9 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var lease_item_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item');
var record = $(ds_id).getCurrentRecord();
var lease_item_record=$(lease_item_id).getAt(0);
var contract_id=record.get('contract_id');
if(lease_item_record.dirty){
var lease_item_record = $(lease_item_id).getAt(0);
var contract_id = record.get('contract_id');
if (lease_item_record.dirty) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
......@@ -531,23 +555,23 @@
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if($(ds_id).validate()){
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function() {
if ($(ds_id).validate()) {
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('con_approval_link_id').getUrl(),
para: {
contract_id:contract_id
contract_id: contract_id
},
scope: this,
success: function() {
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
......@@ -566,17 +590,17 @@
var calc_session_id = record.get('calc_session_id');
var parent_pk_value = record.get('contract_id');
var calc_type = '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR';
var maintain_type='QUERY'
var maintain_type = 'QUERY'
if (calc_session_id) {
//直接进入报价页面
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_update_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
layout_code: '${/parameter/@layout_code}',
document_id: parent_pk_value,
price_list: price_list,
document_category: 'CONTRACT',
contract_status:record.get('contract_status'),
contract_status: record.get('contract_status'),
maintain_type: 'MODIFY',
business_type: record.get('business_type'),
calc_session_id: record.get('calc_session_id'),
......@@ -587,7 +611,7 @@
id_num: 1,
calc_type: calc_type,
recreate_L_formula: 'Y',
recreate_H_formula:'Y'
recreate_H_formula: 'Y'
},
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl(),
fullScreen: true,
......@@ -601,10 +625,10 @@
}
}
Leaf.onReady(function(){
Leaf.onReady(function () {
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_INVOICE_INFO', 'con_contract_bp');
$(ds_id).setQueryUrl('${/request/@context_path}/autocrud/prj.PRJ501N.con_contract_bp/query');
$(ds_id).setQueryParameter('contract_id','${/parameter/@contract_id}');
$(ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}');
$(ds_id).query();
})
//附件打包下载
......@@ -613,9 +637,9 @@
var contract_record = $(con_ds_id).getAt(0);
var contract_id = contract_record.get('contract_id');
var contract_number = contract_record.get('contract_number');
var cdd_list_id=contract_record.get('cdd_list_id');
var doc_code=contract_number+'-'+'SIGN';
var url_l = $('get_atch_download_link').getUrl() + '?table_pk_value=' + contract_id + '&table_name=CON_CONTRACT'+ '&doc_code=' + doc_code+ '&group_flag=Y'+ '&cdd_list_id=' + cdd_list_id+ '&group_code=SIGN'+'&ele_flag=Y';
var cdd_list_id = contract_record.get('cdd_list_id');
var doc_code = contract_number + '-' + 'SIGN';
var url_l = $('get_atch_download_link').getUrl() + '?table_pk_value=' + contract_id + '&table_name=CON_CONTRACT' + '&doc_code=' + doc_code + '&group_flag=Y' + '&cdd_list_id=' + cdd_list_id + '&group_code=SIGN' + '&ele_flag=Y';
window.open(href = url_l, target = "_self");
};
......@@ -625,9 +649,9 @@
var contract_record = $(con_ds_id).getAt(0);
var contract_id = contract_record.get('contract_id');
var contract_number = contract_record.get('contract_number');
var cdd_list_id=contract_record.get('cdd_list_id');
var doc_code=contract_number+'-'+'SIGN';
var url_l = $('get_atch_download_link').getUrl() + '?table_pk_value=' + contract_id + '&table_name=CON_CONTRACT'+ '&doc_code=' + doc_code+ '&group_flag=Y'+ '&cdd_list_id=' + cdd_list_id+ '&group_code=LEASE_ANNEX';
var cdd_list_id = contract_record.get('cdd_list_id');
var doc_code = contract_number + '-' + 'SIGN';
var url_l = $('get_atch_download_link').getUrl() + '?table_pk_value=' + contract_id + '&table_name=CON_CONTRACT' + '&doc_code=' + doc_code + '&group_flag=Y' + '&cdd_list_id=' + cdd_list_id + '&group_code=LEASE_ANNEX';
window.open(href = url_l, target = "_self");
};
//附件打包下载
......@@ -636,9 +660,9 @@
var contract_record = $(con_ds_id).getAt(0);
var contract_id = contract_record.get('contract_id');
var contract_number = contract_record.get('contract_number');
var cdd_list_id=contract_record.get('cdd_list_id');
var doc_code=contract_number+'-'+'PRJ';
var url_l = $('get_atch_download_link').getUrl() + '?table_pk_value=' + contract_id + '&table_name=CON_CONTRACT'+ '&doc_code=' + doc_code+ '&group_flag=Y'+ '&cdd_list_id=' + cdd_list_id+ '&group_code=CREDIT_CHECK';
var cdd_list_id = contract_record.get('cdd_list_id');
var doc_code = contract_number + '-' + 'PRJ';
var url_l = $('get_atch_download_link').getUrl() + '?table_pk_value=' + contract_id + '&table_name=CON_CONTRACT' + '&doc_code=' + doc_code + '&group_flag=Y' + '&cdd_list_id=' + cdd_list_id + '&group_code=CREDIT_CHECK';
window.open(href = url_l, target = "_self");
};
......
......@@ -28,9 +28,14 @@
url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="con731_hls_bp_master_query_link" url="${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"/>
<a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="con_buyback_info_print_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_con_req_history_pdf_print.lsc"/>
<a:link id="con731_hls_bp_master_query_link"
url="${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"/>
<a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id"
model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="con_buyback_info_print_link_id"
url="${/request/@context_path}/modules/csh/CSH501/csh_con_req_history_pdf_print.lsc"/>
<a:link id="con_check_deduction_limit_link" model="check_after_save_bm.con_check_deduction_limit_after_save"
modelaction="update"/>
<script type="text/javascript"><![CDATA[
Ext.ux.Lightbox.register('a[ref=img]', true);
Leaf.onReady(function () {
......@@ -160,8 +165,9 @@
},
scope: this
});
}if (name == 'pay_method') {
if ( value== 'WIRE_TRANSFER') {
}
if (name == 'pay_method') {
if (value == 'WIRE_TRANSFER') {
record.set('bank_account_id', null);
record.set('bank_account_id_n', null);
record.getField('bank_account_id').setReadOnly(true);
......@@ -172,35 +178,49 @@
record.set('bank_branch_num', null);
record.set('bank_branch_name', null);
record.set('withhold_way', null);
} else if (value== 'AGRI_THREE'){
} else if (value == 'AGRI_THREE') {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(true);
record.getField('bank_account_id_n').setRequired(true);
record.set('withhold_way', 'ABC');
}
else if (value == 'AGRI_TWO'){
} else if (value == 'AGRI_TWO') {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(true);
record.getField('bank_account_id_n').setRequired(true);
record.set('withhold_way', 'ABC_2');
}
else if (value == 'CCB_THREE'){
} else if (value == 'CCB_THREE') {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(true);
record.getField('bank_account_id_n').setRequired(true);
record.set('withhold_way', null);
}
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示,必填,大于0,默认20万,可修改;
if (name == 'pay_method') {
if (value == 'CCB_THREE') {
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'block';
record.getField('deduction_limit').setRequired(true);
if (Ext.isEmpty(record.get('deduction_limit'))) {
record.set('deduction_limit', 200000);
}
} else {
record.getField('deduction_limit').setRequired(false);
record.set('deduction_limit', null);
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'none';
}
}
}
// 回款賬戶變更
if ('${/parameter/@layout_code}' == 'CON_ACCOUNT_CHANGE_MODIFY') {
if (name == 'pay_method') {
if ( value== 'WIRE_TRANSFER') {
if (value == 'WIRE_TRANSFER') {
record.set('bank_account_id', null);
record.set('bank_account_id_n', null);
record.getField('bank_account_id').setReadOnly(true);
......@@ -211,28 +231,42 @@
record.set('bank_branch_num', null);
record.set('bank_branch_name', null);
record.set('withhold_way', null);
} else if (value== 'AGRI_THREE'){
} else if (value == 'AGRI_THREE') {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(true);
record.getField('bank_account_id_n').setRequired(true);
record.set('withhold_way', 'ABC');
}
else if (value == 'AGRI_TWO'){
} else if (value == 'AGRI_TWO') {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(true);
record.getField('bank_account_id_n').setRequired(true);
record.set('withhold_way', 'ABC_2');
}
else if (value == 'CCB_THREE'){
} else if (value == 'CCB_THREE') {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(true);
record.getField('bank_account_id_n').setRequired(true);
record.set('withhold_way', null);
}
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示,必填,大于0,默认20万,可修改;
if (name == 'pay_method') {
if (value == 'CCB_THREE') {
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'block';
record.getField('deduction_limit').setRequired(true);
if (Ext.isEmpty(record.get('deduction_limit'))) {
record.set('deduction_limit', 200000);
}
} else {
record.getField('deduction_limit').setRequired(false);
record.set('deduction_limit', null);
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'none';
}
}
}
// 租赁计划變更
......@@ -289,20 +323,41 @@
record.set('bank_account_name', null);
record.set('bank_branch_num', null);
record.set('bank_branch_name', null);
}
if ('${/parameter/@layout_code}' == 'CON_ACCOUNT_CHANGE_MODIFY' || '${/parameter/@layout_code}' == 'CON_TENANT_CHANGE_MODIFY') {
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示,必填,大于0,默认20万,可修改;
if (record.get('pay_method') == 'CCB_THREE') {
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'block';
record.getField('deduction_limit').setRequired(true);
} else {
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'none';
record.getField('deduction_limit').setRequired(false);
}
}
//原楼扣款限额隐藏
if ('${/parameter/@layout_code}' == 'CON_ACCOUNT_CHANGE_MODIFY') {
if (record.get('pay_method_old') == 'CCB_THREE') {
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT_S_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT_S').style.display = 'block';
} else {
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT_S_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_DEDUCTION_LIMIT_S').style.display = 'none';
}
if('${/parameter/@function_code}' == 'CON_REPO001D_WQ'){
if (!record.get('rec_residue_amount')){
var rec_residue_amount = record.get('sum_unreceived_rent_amount') + record.get('sum_overdue_amount')+record.get('due_amount')+record.get('residual_value');
record.set('rec_residue_amount',rec_residue_amount);
}
}
if ('${/parameter/@function_code}' == 'CON_REPO001D_WQ') {
if (!record.get('rec_residue_amount')) {
var rec_residue_amount = record.get('sum_unreceived_rent_amount') + record.get('sum_overdue_amount') + record.get('due_amount') + record.get('residual_value');
record.set('rec_residue_amount', rec_residue_amount);
}
}
};
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () {
// $('${/parameter/@layout_code}_submit_approval').disable();
debugger;
var req_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var req_ds_id2 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_change_req');
var attch_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
......@@ -311,7 +366,7 @@
var document_type = '${/parameter/@document_type}';
var calc_session_id = req_record.get('calc_session_id');
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
for (var i=0;i<$(attch_id).getAll().length;i++){
for (var i = 0; i < $(attch_id).getAll().length; i++) {
if ($(attch_id).getAll()[i].dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
// $('${/parameter/@layout_code}_submit_approval').enable();
......@@ -351,8 +406,7 @@
Leaf.showMessage('警告', '变更承租人和原承租人不能重复!');
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
else {
} else {
con731_submit();
}
......@@ -556,10 +610,10 @@
param['document_category'] = 'BP';
param['bp_class'] = record.get('bp_class');
param['bp_category'] = record.get('bp_category');
if( record.get('bp_category')=='AGENT'){
if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
}else{
} else {
param['function_code'] = 'CON505H';
param['function_usage'] = 'QUERY';
}
......@@ -587,38 +641,94 @@
}
};*/
//add by lihh 20210330审批记录打印
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function() {
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var records = $(ds_id).getCurrentRecord();
var document_id = records.get('contract_id');
var url_l;
var file_name;
if('${/parameter/@function_code}' == 'CON_REPO001D_WQ'){
if ('${/parameter/@function_code}' == 'CON_REPO001D_WQ') {
file_name = records.get('contract_number') + "合同-解约回购审批记录打印";
url_l = $('con_buyback_info_print_link_id').getUrl() + '?document_id=' + document_id + '&file_name=' + encodeURI(file_name) +'&document_table=CON_CONTRACT_BUYBACK_INFO&batch_flag=Y&source_type=COMMON';
url_l = $('con_buyback_info_print_link_id').getUrl() + '?document_id=' + document_id + '&file_name=' + encodeURI(file_name) + '&document_table=CON_CONTRACT_BUYBACK_INFO&batch_flag=Y&source_type=COMMON';
}
if('${/parameter/@function_code}' == 'CON_ET002_WQ'){
if ('${/parameter/@function_code}' == 'CON_ET002_WQ') {
file_name = records.get('contract_number') + "合同-提前结清审批记录打印";
url_l = $('con_buyback_info_print_link_id').getUrl() + '?document_id=' + document_id + '&file_name=' + encodeURI(file_name) +'&document_table=CON_CONTRACT_CLOSE_BEFORE&batch_flag=Y&source_type=COMMON';
url_l = $('con_buyback_info_print_link_id').getUrl() + '?document_id=' + document_id + '&file_name=' + encodeURI(file_name) + '&document_table=CON_CONTRACT_CLOSE_BEFORE&batch_flag=Y&source_type=COMMON';
}
if('${/parameter/@function_code}' == 'CON733BPT_WQ'){
if ('${/parameter/@function_code}' == 'CON733BPT_WQ') {
file_name = records.get('contract_number') + "合同-承租人变更审批记录打印";
url_l = $('con_buyback_info_print_link_id').getUrl() + '?document_id=' + document_id + '&file_name=' + encodeURI(file_name) +'&document_table=CON_CONTRACT_TENANT_CHANGE&batch_flag=Y&source_type=COMMON';
url_l = $('con_buyback_info_print_link_id').getUrl() + '?document_id=' + document_id + '&file_name=' + encodeURI(file_name) + '&document_table=CON_CONTRACT_TENANT_CHANGE&batch_flag=Y&source_type=COMMON';
}
var OpenWindow = window.open(href = url_l, target = "_blank");
};
//保存前调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
debugger;
var check_flag = true;
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
if (ds_id == ds.id && ds_id) {
if ('${/parameter/@layout_code}' == 'CON_ACCOUNT_CHANGE_MODIFY' || '${/parameter/@layout_code}' == 'CON_TENANT_CHANGE_MODIFY') {
if (record.get('pay_method') == 'CCB_THREE') {
if (record.get('deduction_limit') <= 0) {
Leaf.showMessage('${l:HLS.PROMPT}', '扣款限额应大于0');
return false;
}
$L.request({
url: $('con_check_deduction_limit_link').getUrl(),
para: {
change_req_id: record.get('change_req_id'),
pay_method: record.get('pay_method'),
bank_branch_num: record.get('bank_branch_num'),
contract_number: record.get('contract_number'),
deduction_limit: record.get('deduction_limit'),
layout_code:'${/parameter/@layout_code}'
},
success: function (args) {
$L.Masker.unmask(Ext.getBody());
check_flag = false;
if (args.result.err_msg) {
$L.showConfirm('提示', args.result.err_msg, function () {
var root_ds = $('${/parameter/@bp_seq}${/parameter/@layout_code}_virtual_ds');
root_ds.submit();
});
} else {
check_flag = true;
return check_flag;
}
},
failure: function (res) {
check_flag = false;
return check_flag;
$L.Masker.unmask(Ext.getBody());
},
error: function (res) {
check_flag = false;
return check_flag;
$L.Masker.unmask(Ext.getBody());
},
sync: true,
scope: this
});
}
}
}
return check_flag;
};
Leaf.onReady(init);
function init() {
debugger;
if('${/parameter/@function_code}' == 'CON_REPO001D_WQ' || '${/parameter/@function_code}' == 'CON_ET002_WQ' || '${/parameter/@function_code}' == 'CON733BPT_WQ'){
if ('${/parameter/@function_code}' == 'CON_REPO001D_WQ' || '${/parameter/@function_code}' == 'CON_ET002_WQ' || '${/parameter/@function_code}' == 'CON733BPT_WQ') {
if ('${/model/default_value_path/record/@req_status}' != 'APPROVED') {
document.getElementById('${/parameter/@layout_code}_user_button4').style.display = "none";
// $('${/parameter/@layout_code}_user_button4').disable();
}
}
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
......@@ -80,6 +80,12 @@
function csh511_receipt_save() {
var record=$('csh_transaction_receipt_head_ds').getAt(0);
if (record.get('collection_classes') == 'COMBINED') {
if (record.get('paid_byother_flag') != 'T'||record.get('bp_category')!='AGENT') {
Leaf.showMessage('${l:PROMPT}', '混合类款项为代理店代付,请检查代付标志和所选商业伙伴!');
return;
}
}
// Leaf.Masker.mask(Ext.getBody());
// Leaf.request({
// url: $('csh510_update_bp_info_link').getUrl(),
......
......@@ -55,6 +55,12 @@
//不将这条数据传递到数组中
continue;
}
if (record.get('collection_classes') == 'COMBINED') {
if (record.get('paid_byother_flag') != 'T'||record.get('bp_category')!='AGENT') {
Leaf.showMessage('${l:PROMPT}', '混合类款项为代理店代付,请检查代付标志和所选商业伙伴!');
return;
}
}
//否则的话添加必要的字段
record.set('receipt_type', 'IMPORT');
record.set('bank_account_num', record.get('attribute_1'));
......
......@@ -95,6 +95,14 @@
$('csh511_receipt_save').disable();
if ($('csh_transaction_receipt_head_ds').validate()) {
var record = $('csh_transaction_receipt_head_ds').getAt(0);
if (record.get('collection_classes') == 'COMBINED') {
if (record.get('paid_byother_flag') != 'T'||record.get('bp_category')!='AGENT') {
Leaf.showMessage('${l:PROMPT}', '混合类款项为代理店代付,请检查代付标志和所选商业伙伴!');
$('csh511_receipt_save').enable();
return;
}
}
if (flag != 'Y') {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
}
......@@ -263,7 +271,7 @@
// record.getField('guarantor_name_duty_desc').setRequired(false);
// }
// }
else if (name =='bp_code') {
else if (name == 'bp_code') {
var bp_id = record.get('bp_id');
Leaf.request({
url: $('extra_nam_csh_transaction_receipt_data_link_id').getUrl(),
......@@ -291,12 +299,12 @@
success: function (res) {
var unit_code = res.result.unit_code;
if (unit_code == 241 || unit_code == 610) {
if(record.get('paid_byother_flag') == 'T'){
if (record.get('paid_byother_flag') == 'T') {
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc', '是');
record.set('guarantor_name_duty', 'Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}else if(record.get('paid_byother_flag') == 'F'){
} else if (record.get('paid_byother_flag') == 'F') {
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
......@@ -333,10 +341,10 @@
Leaf.Masker.unmask(Ext.getBody());
}
});
}else if(name == 'paid_byother_flag'){
if(record.get('paid_byother_flag') =='T'){
} else if (name == 'paid_byother_flag') {
if (record.get('paid_byother_flag') == 'T') {
var extra_id = record.get('bp_id');
if (extra_id != null){
if (extra_id != null) {
Leaf.request({
url: $('get_extra_code_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id: extra_id},
......@@ -362,15 +370,15 @@
Leaf.Masker.unmask(Ext.getBody());
}
});
}else {
} else {
record.getField('guarantor_name_duty_desc').setReadOnly(false);
record.set('guarantor_name_duty_desc', '是');
record.set('guarantor_name_duty', 'Y');
record.getField('guarantor_name_duty_desc').setRequired(true);
}
}else if(record.get('paid_byother_flag') =='F'){
} else if (record.get('paid_byother_flag') == 'F') {
var extra_id = record.get('bp_id');
if (extra_id != undefined){
if (extra_id != undefined) {
Leaf.request({
url: $('get_extra_code_csh_transaction_receipt_data_link_id').getUrl(),
para: {bp_id: extra_id},
......@@ -396,7 +404,7 @@
Leaf.Masker.unmask(Ext.getBody());
}
});
}else {
} else {
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
......@@ -405,6 +413,7 @@
}
}
}
// function onAdd_csh511_receipt(ds, record) {
// record.set('precision',2);
// record.set('zero_amounts_allowed','N');
......@@ -426,8 +435,8 @@
record.set('currency_name', '人民币');
record.getField('guarantor_name_duty_desc').setReadOnly(true);
record.set('guarantor_name_duty_desc','否');
record.set('guarantor_name_duty','N');
record.set('guarantor_name_duty_desc', '否');
record.set('guarantor_name_duty', 'N');
}
......@@ -525,7 +534,7 @@
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
return;
}
}
......@@ -590,7 +599,8 @@
</a:field>
<!--担保人履行担保义务-->
<a:field name="guarantor_name_duty_desc" displayField="code_value_name" options="yes_no_ds" prompt="担保人履行担保义务" returnField="guarantor_name_duty" valueField="code_value"/>
<a:field name="guarantor_name_duty_desc" displayField="code_value_name" options="yes_no_ds"
prompt="担保人履行担保义务" returnField="guarantor_name_duty" valueField="code_value"/>
<a:field name="guarantor_name_duty" required="true"/>
<!-- <a:field name="bank_slip_num" lovGridHeight="350" lovHeight="600" lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="1200" title="合同编号">
......@@ -669,8 +679,9 @@
<a:field name="bp_bank_account_num"/>
<a:field name="bp_bank_account_name" required="true"/>
<a:field name="collection_classes" />
<a:field name="collection_classes_desc" required="true" options="ds_collection_classes_ds" prompt="款项用途"
<a:field name="collection_classes"/>
<a:field name="collection_classes_desc" required="true" options="ds_collection_classes_ds"
prompt="款项用途"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="paid_byother_flag_n" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag"
displayField="code_value_name" valueField="code_value" required="true"/>
......@@ -749,7 +760,7 @@
<!--代理店简称-->
<a:lov name="extra_nam" bindTarget="csh_transaction_receipt_head_ds"
prompt="代理店简称" width="180" readOnly="true" />
prompt="代理店简称" width="180" readOnly="true"/>
</a:hBox>
<a:hBox style="width:800px">
......@@ -758,7 +769,7 @@
bindTarget="csh_transaction_receipt_head_ds"/>
<!--担保人履行担保义务-->
<a:comboBox name="guarantor_name_duty_desc" bindTarget="csh_transaction_receipt_head_ds"
prompt="担保人履行担保义务" width="180" />
prompt="担保人履行担保义务" width="180"/>
</a:hBox>
</a:fieldSet>
<!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
......
......@@ -390,6 +390,8 @@
readOnly: readOnly,
interfaceQueryFlag: interfaceQueryFlag,
approval_flag: approval_flag,
collection_classes:record.get('collection_classes'),
transaction_type:transaction_type||'RECEIPT',
winid: 'csh_write_off_window'
},
url: $('batch_detail_link').getUrl(),
......
......@@ -399,6 +399,8 @@
readOnly: readOnly,
interfaceQueryFlag: interfaceQueryFlag,
approval_flag: approval_flag,
collection_classes:record.get('collection_classes'),
transaction_type:transaction_type||'RECEIPT',
winid: 'csh_write_off_window'
},
url: $('batch_detail_link').getUrl(),
......
......@@ -9,7 +9,8 @@
<a:link id="csh531n_submit_link_id" model="csh.CSH531N.csh_data_confirm" modelaction="execute"/>
<a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="transaction_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="csh531n_submit_interface_link_id" model="csh.CSH531N.csh_write_off_interface" modelaction="batch_update"/>
<a:link id="csh531n_submit_interface_link_id" model="csh.CSH531N.csh_write_off_interface"
modelaction="batch_update"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
......@@ -28,7 +29,7 @@
function init() {
if ('${/parameter/@depositDisplayFlag}' == 'Y') {
if ('${/parameter/@collection_classes}' == 'COMBINED' && '${/parameter/@transaction_type}' !== 'DEPOSIT') {
document.getElementById('write_off_deposit').style.display = 'block';
}
if ('${/parameter/@advanceDisplayFlag}' == 'Y') {
......@@ -38,6 +39,8 @@
if ('${/parameter/@readOnly}' == 'Y') {
$('csh_grid_add_bt').setVisible(false);
$('csh_grid_delete_bt').setVisible(false);
$('csh_grid_deposit_add_bt').setVisible(false);
$('csh_grid_deposit_delete_bt').setVisible(false);
$('csh_write_off_grid').hideColumn('left_amount');
$('csh_write_off_grid').hideColumn('left_principal');
$('csh_write_off_grid').hideColumn('left_interest');
......@@ -68,7 +71,7 @@
var readOnly = '${/parameter/@readOnly}';
var write_off_type = record.get('write_off_type');
if (batch_status == 'SUBMIT' || readOnly == 'Y') {
return;
} else {
if (name == 'contract_number') {
if (write_off_type != 'DEPOSIT_POOL_CREDIT') {
......@@ -112,7 +115,7 @@
if (name == 'write_off_classification_desc') {
return 'csh_write_off_grid_cb';
}
return;
}
}
......@@ -149,7 +152,7 @@
function csh531_update_fun(ds, record, name, value, oldValue) {
if (name == 'write_off_amount') {
if(!checkAmount()){
if (!checkAmount()) {
setTimeout(function () {//防止递归
record.set(name, oldValue);
});
......@@ -176,7 +179,7 @@
} else {
record.set('write_off_principal', null);
}
x_amount = minus(value,left_principal);
x_amount = minus(value, left_principal);
if (left_interest > 0) {
record.set('write_off_interest', x_amount);
} else {
......@@ -276,8 +279,8 @@
record.set('left_principal', '');
record.set('left_interest', '');
}
if (name == 'wirte_off_date'){
record.set('journal_date',value);
if (name == 'wirte_off_date') {
record.set('journal_date', value);
}
}
......@@ -377,29 +380,29 @@
for (var i = 0; i < write_off_recs.length; i++) {
var t = parseFloat(write_off_recs[i].get('write_off_amount'));
if (!isNaN(t)) {
sum = plus(sum,t);
sum = plus(sum, t);
}
}
var deposit_recs = $('csh_transaction_deposit_ds').getAll();
for (var i = 0; i < deposit_recs.length; i++) {
var t = parseFloat(deposit_recs[i].get('write_off_amount'));
if (!isNaN(t)) {
sum = plus(sum,t);
sum = plus(sum, t);
}
}
var advanced_recs = $('csh_transaction_advanced_ds').getAll();
for (var i = 0; i < advanced_recs.length; i++) {
var t = parseFloat(advanced_recs[i].get('write_off_amount'));
if (!isNaN(t)) {
sum = plus(sum,t);
sum = plus(sum, t);
}
}
var h_record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var for_allocate_amount = 0;
if(h_record.get('unwrite_off_amount') && h_record.get('unwrite_off_amount') > 0){
for_allocate_amount = minus(h_record.get('unwrite_off_amount'),sum);
if (h_record.get('unwrite_off_amount') && h_record.get('unwrite_off_amount') > 0) {
for_allocate_amount = minus(h_record.get('unwrite_off_amount'), sum);
}
h_record.set('for_allocate_amount',for_allocate_amount);
h_record.set('for_allocate_amount', for_allocate_amount);
}
function csh531n_write_off_return() {
......@@ -495,10 +498,10 @@
var record = ds.getCurrentRecord();
// var header_id = '${/parameter/@transaction_id}';
var header_id = record.get('transaction_id');
if(record.get('transaction_type') == 'ADVANCE_RECEIPT'||record.get('transaction_type') == 'DEPOSIT'){
if (record.get('transaction_type') == 'ADVANCE_RECEIPT' || record.get('transaction_type') == 'DEPOSIT') {
header_id = record.get('source_csh_trx_id');
}
if(header_id){
if (header_id) {
var url = $('transaction_downloadFile_id').getUrl() + '?table_name=CSH_TRANSACTION&header_id=' + header_id;
var win = new Leaf.Window({
url: url,
......@@ -515,7 +518,7 @@
// });
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
return;
}
}
......@@ -533,7 +536,7 @@
var datas = [];
var para = {};
var records = $('csh_write_off_interface_ds').getAll();
for (var i = 0;i < records.length;i++) {
for (var i = 0; i < records.length; i++) {
para = records[i].data;
para['_status'] = 'update';
datas.push(para);
......@@ -541,17 +544,17 @@
Leaf.request({
url: $('csh531n_submit_interface_link_id').getUrl(),
para: datas,
success: function(res) {
success: function (res) {
Leaf.Masker.unmask(Ext.getBody());
$('csh_transaction_deposit_ds').submit();
$('csh_transaction_advanced_ds').submit();
csh531_submitsuccess();
},
failure: function() {
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
csh531_submitfailed();
},
error: function() {
error: function () {
Leaf.Masker.unmask(Ext.getBody());
csh531_submitfailed();
},
......@@ -569,21 +572,21 @@
for (var i = 0; i < write_off_recs.length; i++) {
var t = parseFloat(write_off_recs[i].get('write_off_amount'));
if (!isNaN(t)) {
sum = plus(sum,t);
sum = plus(sum, t);
}
}
var deposit_recs = $('csh_transaction_deposit_ds').getAll();
for (var i = 0; i < deposit_recs.length; i++) {
var t = parseFloat(deposit_recs[i].get('write_off_amount'));
if (!isNaN(t)) {
sum = plus(sum,t);
sum = plus(sum, t);
}
}
var advanced_recs = $('csh_transaction_advanced_ds').getAll();
for (var i = 0; i < advanced_recs.length; i++) {
var t = parseFloat(advanced_recs[i].get('write_off_amount'));
if (!isNaN(t)) {
sum = plus(sum,t);
sum = plus(sum, t);
}
}
var header_rec = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
......@@ -617,16 +620,17 @@
function csh_deposit_edit_function(record, name) {
if ('${/parameter/@readOnly}' == 'Y') {
return;
} else {
if (name == 'write_off_amount') {
return 'csh_transaction_deposit_grid_nf';
}
}
}
function csh_advance_edit_function(record, name) {
if ('${/parameter/@readOnly}' == 'Y') {
return;
} else {
if (name == 'write_off_amount') {
var r = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
......@@ -673,7 +677,7 @@
// Leaf.showInfoMessage("提示", "存在未保存数据,请先保存再进行提交操作!");
// return;
// }
sum = plus(sum,allRs[i].get('write_off_amount') || 0);
sum = plus(sum, allRs[i].get('write_off_amount') || 0);
}
if (sum == 0) {
......@@ -681,13 +685,13 @@
return;
}
// 以旧换新与三方协议合同的首付款不可进行电汇核销
var cf_item_2_count=0;
var cf_item_2_count = 0;
for (var i = 0; i < interfaceRs.length; i++) {
if ((interfaceRs[i].get('payment_deduction')=='TRADE_IN'||interfaceRs[i].get('payment_deduction')=='TRI_AGREEMENT')&&interfaceRs[i].get('write_off_cf_item')=='2') {
cf_item_2_count = plus(cf_item_2_count,1);
if ((interfaceRs[i].get('payment_deduction') == 'TRADE_IN' || interfaceRs[i].get('payment_deduction') == 'TRI_AGREEMENT') && interfaceRs[i].get('write_off_cf_item') == '2') {
cf_item_2_count = plus(cf_item_2_count, 1);
}
}
if (cf_item_2_count>0) {
if (cf_item_2_count > 0) {
Leaf.showInfoMessage('提示', ' 首付款抵扣为“无”以外的合同,不可进行首付款电汇核销!');
return;
}
......@@ -723,15 +727,15 @@
}
function write_off_amount_dblclick(grid, record, row, name) {
if(!record){
if (!record) {
record = grid.record;
}
var head_record = $('csh_transaction_receipt_write_off_detail_ds').getAt(0);
// record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var for_allocate_amount = head_record.get('for_allocate_amount'),
unreceived_amount = record.get('unreceived_amount');
if(unreceived_amount){
if (Ext.isEmpty(record.get('write_off_amount'))||record.get('write_off_amount') == 0) {
if (unreceived_amount) {
if (Ext.isEmpty(record.get('write_off_amount')) || record.get('write_off_amount') == 0) {
record.set('write_off_amount', get_min_amount(for_allocate_amount, unreceived_amount));
}
}
......@@ -776,7 +780,7 @@
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="ref_v01"/>
<a:field name="approving_return_amount" readOnly="true"/>
<a:field name="for_allocate_amount" readOnly="true" />
<a:field name="for_allocate_amount" readOnly="true"/>
</a:fields>
</a:dataSet>
......@@ -786,7 +790,8 @@
selectable="true">
<a:fields>
<a:field name="company_id" defaultValue="${/parameter/@company_id}"/>
<a:field name="write_off_date" datatype="java.util.Date" validator="write_off_date_validator" required="true"
<a:field name="write_off_date" datatype="java.util.Date" validator="write_off_date_validator"
required="true"
defaultValue="${/model/sys_default_time/record/@now_date}"/>
<a:field name="journal_date" required="true"
defaultValue="${/model/sys_default_time/record/@now_date}"/>
......@@ -844,20 +849,32 @@
queryUrl="${/request/@context_path}/autocrud/csh.CSH531N.csh_transaction_plan_query/query?transaction_id=${/parameter/@transaction_id}&amp;write_off_type=RECEIPT_DEPOSIT_POOL"
selectable="true">
<a:fields>
<a:field name="bp_agent_name" lovGridHeight="350" lovHeight="550" lovLabelWidth="50" lovWidth="550"
required="true" readOnly="true" autoComplete="true" autoCompleteField="bp_agent_name"
lovService="basic.hls_bp_master_v_for_lov?bp_category=AGENT&amp;bp_id=${/parameter/@bp_id}"
title="HLS.BP_TITLE">
<!-- <a:field name="bp_agent_name" lovGridHeight="350" lovHeight="550" lovLabelWidth="50" lovWidth="550"-->
<!-- required="true" readOnly="true" autoComplete="true" autoCompleteField="bp_agent_name"-->
<!-- lovService="basic.hls_bp_master_v_for_lov?bp_category=AGENT&amp;bp_id=${/parameter/@bp_id}"-->
<!-- title="HLS.BP_TITLE">-->
<!-- <a:mapping>-->
<!-- <a:map from="bp_id" to="bp_id"/>-->
<!-- <a:map from="bp_name" to="bp_agent_name"/>-->
<!-- </a:mapping>-->
<!-- </a:field>-->
<a:field name="bp_name" readOnly="true" autoComplete="true" lovGridHeight="350" lovHeight="550"
lovLabelWidth="50"
lovWidth="550"
required="true"
lovService="basic.hls_bp_master_v_for_lov?bp_id=${/parameter/@bp_id}" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_agent_name"/>
<a:map from="bp_name" to="bp_name"/>
</a:mapping>
</a:field>
<a:field name="bp_id" defaultValue="${/parameter/@bp_id}"/>
<a:field name="bp_name" defaultValue="${/model/csh_transaction_path/record/@bp_name}"/>
<a:field name="transaction_id" defaultValue="${/parameter/@transaction_id}"/>
<a:field name="write_off_type" defaultValue="RECEIPT_DEPOSIT_POOL"/>
<a:field name="company_id" defaultValue="${/session/@company_id}"/>
<a:field name="write_off_amount"/>
<a:field name="create_wf_flag" defaultValue="N"/>
<a:field name="write_off_date" validator="write_off_date_validator" required="true"
defaultValue="${/model/sys_default_time/record/@now_date}"/>
</a:fields>
......@@ -878,6 +895,7 @@
</a:mapping>
</a:field>
<a:field name="bp_id" defaultValue="${/parameter/@bp_id}"/>
<a:field name="bp_name" defaultValue="${/parameter/@bp_name}"/>
<a:field name="transaction_id" defaultValue="${/parameter/@transaction_id}"/>
<a:field name="write_off_type" defaultValue="RECEIPT_ADVANCE_RECEIPT"/>
<a:field name="company_id" defaultValue="${/session/@company_id}"/>
......@@ -945,7 +963,8 @@
<a:box column="3" labelWidth="100">
<a:label prompt="附件查看" colspan="2" bindTarget="csh_transaction_receipt_write_off_detail_ds"
renderer="attachment_rendered" width="370"/>
<a:numberField name="for_allocate_amount" renderer="Leaf.formatMoney" prompt="剩余可分配金额" readOnly="true" bindTarget="csh_transaction_receipt_write_off_detail_ds" />
<a:numberField name="for_allocate_amount" renderer="Leaf.formatMoney" prompt="剩余可分配金额"
readOnly="true" bindTarget="csh_transaction_receipt_write_off_detail_ds"/>
</a:box>
<!-- <a:box column="4" labelWidth="100">-->
......@@ -1080,17 +1099,17 @@
</a:events>
</a:grid>
</a:tab>
<a:tab id="write_off_deposit" tabStyle="display:none" prompt="核销为租金保证金" width="150">
<a:tab id="write_off_deposit" tabStyle="display:none" prompt="核销为保证金" width="150">
<a:grid id="csh_transaction_deposit_grid" navBar="true"
bindTarget="csh_transaction_deposit_ds"
height="370"
marginWidth="10">
<!-- <a:toolBar>-->
<!-- <a:button id="csh_grid_deposit_add_bt" type="add"/>-->
<!-- <a:button id="csh_grid_deposit_delete_bt" type="delete"/>-->
<!-- </a:toolBar>-->
<a:toolBar>
<a:button id="csh_grid_deposit_add_bt" type="add"/>
<a:button id="csh_grid_deposit_delete_bt" type="delete"/>
</a:toolBar>
<a:columns>
<a:column name="bp_agent_name" prompt="代理店" width="180" align="center"
<a:column name="bp_name" prompt="商业伙伴" width="180" align="center"
editor="csh_transaction_deposit_grid_lv"/>
<a:column name="write_off_amount" prompt="核销金额"
editorFunction="csh_deposit_edit_function" renderer="Leaf.formatMoney"
......@@ -1102,9 +1121,16 @@
</a:columns>
<a:editors>
<a:lov id="csh_transaction_deposit_grid_lv"/>
<a:numberField id="csh_transaction_deposit_grid_nf" allowNegative="false"/>
<a:numberField id="csh_transaction_deposit_grid_nf" allowNegative="false">
<a:events>
<a:event name="focus" handler="write_off_amount_dblclick"/>
</a:events>
</a:numberField>
<a:datePicker id="csh_transaction_deposit_grid_dp"/>
</a:editors>
<a:events>
<a:event name="dblclick" handler="write_off_amount_dblclick"/>
</a:events>
</a:grid>
</a:tab>
<a:tab id="write_off_advance" tabStyle="display:none" prompt="核销为预收款" width="150">
......
......@@ -428,6 +428,9 @@
bindTarget="csh_transaction_receipt_maintain_query_ds"/>
<a:comboBox name="query_amount_flag_n" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="剩余可用金额"/>
<a:datePicker name="write_off_date_to"
bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="核销日期到"/>
</a:fieldSet>
</a:hBox>
</a:form>
......
......@@ -29,8 +29,9 @@
<a:fieldSet labelWidth="150" style="margin-left:20px">
<a:grid id="hls_bp_master_credit_result_grid_ds" bindTarget="hls_bp_master_credit_result_ds" marginHeight="165" marginWidth="100" navBar="true" >
<a:columns>
<a:column name="bp_code" prompt="代理店编码" align="center" width="120"/>
<a:column name="bp_name" prompt="代理店名称" align="center" width="170"/>
<a:column name="bp_code" prompt="授信对象编码" align="center" width="120"/>
<a:column name="bp_name" prompt="授信对象名称" align="center" width="170"/>
<a:column name="agent_name" prompt="代理店名称" align="center" width="170"/>
<a:column name="credit_total_amount" prompt="授信总额度" align="center" width="200" renderer="Leaf.formatMoney"/>
<a:column name="credit_date_from" prompt="授信日期从" align="center" width="120"/>
<a:column name="credit_date_to" prompt="授信日期到" width="110" align="center"/>
......
......@@ -94,8 +94,8 @@
// Leaf.Masker.unmask(body);
// return false;
// }
if(H1>51){
Leaf.showMessage('${l:PROMPT}', '还款期数应小于51期');
if(H1>60){
Leaf.showMessage('${l:PROMPT}', '还款期数应小于60期');
Leaf.Masker.unmask(body);
return false;
}
......
......@@ -1524,8 +1524,8 @@
// Leaf.showMessage('${l:PROMPT}', '系统暂时不支持还款期数小于2期的租金计划');
// return false;
// }
if (H1 > 51) {
Leaf.showMessage('${l:PROMPT}', '还款期数应小于51期');
if (H1 > 60) {
Leaf.showMessage('${l:PROMPT}', '还款期数应小于60期');
unlock_calc_current_window();
return false;
}
......@@ -1553,7 +1553,7 @@
unlock_calc_current_window();
return;
}
//if ('${/parameter/@document_category}' == 'PROJECT' && '${/parameter/@business_type}' == 'LEASE') {
if ('${/parameter/@document_category}' == 'PROJECT'||'${/parameter/@document_category}' == 'CONTRACT') {
Leaf.request({
url: $('prj_check_prj_record_link_id').getUrl(),
para: {
......@@ -1719,47 +1719,47 @@
});
// } else {
// var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
// for (var i = 0; i < temp_head_records.length; i++) {
// if (!$('temp_hd_attribute_ds').find('column_code', temp_head_records[i].get('column_code'))) {
// $('temp_hd_attribute_ds').create(temp_head_records[i].data);
// }
// var H16;
// if (temp_head_records[i].get('column_code') == 'H16') {
// H16 = temp_head_records[i].get('column_value');
// }
// if (temp_head_records[i].get('column_code') == 'H109') {
// temp_head_records[i].set('column_value', H16);
// // temp_head_records[i].set('column_value_c',0);
// }
// }
// var all_records = $('temp_hd_attribute_ds').getAll();
// var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
// headRecord.isNew = false;
// headRecord.dirty = true;
// create_record_column(all_records, headRecord);
//
// function hls_fin_cal_save_hd_submitsuccess_new(ds, res) {
// if (typeof (nextStep) == 'function') {
// nextStep(source_procedure);
// } else {
// function on_ln_formula_load(ds) {
// Leaf.SideBar.enable = true;
// success_sidebar_show();
// unlock_calc_current_window();
// $('ln_formula_ds').un('load', on_ln_formula_load);
// }
//
// $('ln_formula_ds').on('load', on_ln_formula_load);
// $('ln_formula_ds').query();
// }
// }
//
// $('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess_new);
// Leaf.SideBar.enable = false;
// $('hls_fin_cal_save_hd_ds').submit();
// }
} else {
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0; i < temp_head_records.length; i++) {
if (!$('temp_hd_attribute_ds').find('column_code', temp_head_records[i].get('column_code'))) {
$('temp_hd_attribute_ds').create(temp_head_records[i].data);
}
var H16;
if (temp_head_records[i].get('column_code') == 'H16') {
H16 = temp_head_records[i].get('column_value');
}
if (temp_head_records[i].get('column_code') == 'H109') {
temp_head_records[i].set('column_value', H16);
// temp_head_records[i].set('column_value_c',0);
}
}
var all_records = $('temp_hd_attribute_ds').getAll();
var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
headRecord.isNew = false;
headRecord.dirty = true;
create_record_column(all_records, headRecord);
function hls_fin_cal_save_hd_submitsuccess_new(ds, res) {
if (typeof (nextStep) == 'function') {
nextStep(source_procedure);
} else {
function on_ln_formula_load(ds) {
Leaf.SideBar.enable = true;
success_sidebar_show();
unlock_calc_current_window();
$('ln_formula_ds').un('load', on_ln_formula_load);
}
$('ln_formula_ds').on('load', on_ln_formula_load);
$('ln_formula_ds').query();
}
}
$('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess_new);
Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit();
}
}
......
......@@ -66,7 +66,7 @@
for (var i = 0;i < export_data.length;i++) {
var f = export_data[i];
var write = "";
write = f.serial_no + split //顺序号
write = f.sequence_no + split //顺序号
+ f.dd_bank_account_num + split //账号
+ f.bp_name + split //户名
+ f.due_amount + split //金额
......
......@@ -38,15 +38,23 @@
debugger;
if ($('hls_acr_ebank_output_ds').validate()) {
var data = $('hls_acr_ebank_output_ds').getJsonData(false);
Leaf.Masker.mask(Ext.getBody(), '正在执行');
Leaf.request({
url: 'hls_acr_ebank_output_init.lsc',
para: data,
success: function (args) {
Leaf.Masker.unmask(Ext.getBody());
file_name = args.result.file_name;
output_id = args.result.record.output_id;
$('hls_acr_ebank_output_temp_ds').setQueryParameter('output_id', output_id);
$('hls_acr_ebank_output_temp_ds').query();
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
......@@ -127,6 +135,7 @@
return;
}
if (hd_record.get('generate_rules') =='N'){
//add by wdd 20180530 for HL
//导出时相同客户账号不能有多条校验
var same_dd_bank_account_num_n = '';
......@@ -147,6 +156,7 @@
}
}
}
}
if (!Ext.isEmpty(same_dd_bank_account_num_n)) {
Leaf.showMessage('提示', '客户账号 ' + same_dd_bank_account_num_n + '存在多条,不可导出,请核实!');
return;
......@@ -232,9 +242,10 @@
<a:field name="currency_name" readOnly="true" defaultValue="人民币" displayField="currency_name"
options="hls_currency_ds" required="true" returnField="currency_code"
valueField="currency_code"/>
<a:field name="payment_method_display" displayField="code_value_name"
<a:field name="payment_method_display" readOnly="true" displayField="code_value_name"
options="hls_acr_payment_method_ds" required="true" returnField="payment_method"
valueField="code_value"/>
valueField="code_value" defaultValue="农行代扣(两方)"/>
<a:field name="payment_method" defaultValue="ABC_2" readOnly="true"/>
<!-- <a:field name="payment_method_display" defaultValue="ABC" displayField="code_value_name" readOnly="true" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/> -->
<!-- <a:field name="payment_method_display_n" defaultValue="农行代扣" displayField="code_value_name" readOnly="true" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/> -->
<a:field name="customer_type_display" displayField="code_value_name" options="hls_customer_type_ds"
......@@ -247,10 +258,10 @@
</a:mapping>
</a:field>
<a:field name="limit_amount" validator="amountValidator"/>
<a:field name="generate_rules_display" readOnly="true" defaultValue="汇总"
<a:field name="generate_rules_display" readOnly="true" defaultValue="明细到合同每期"
displayField="code_value_name" options="hls_generate_rules_ds" required="true"
returnField="generate_rules" valueField="code_value"/>
<a:field name="generate_rules" defaultValue="N"/>
<a:field name="generate_rules" defaultValue="Y"/>
<a:field name="contract_number"/>
</a:fields>
<a:events>
......@@ -289,9 +300,9 @@
<a:column name="bp_name" prompt="客户名称" width="150"/>
<a:column name="due_amount" align="right" prompt="应扣金额" renderer="numberRenderer" width="120"/>
<a:column name="id_card_no" prompt="证件号" width="150"/>
<!-- <a:column name="contract_number" prompt="合同编号" width="150"/>-->
<!-- <a:column name="times" prompt="期数" width="150"/>-->
<!-- <a:column name="due_date" prompt="计划付款日" width="150"/>-->
<a:column name="contract_number" prompt="合同编号" width="150"/>
<a:column name="times" prompt="期数" width="150"/>
<a:column name="due_date" prompt="计划付款日" width="150"/>
</a:columns>
</a:grid>
<a:hBox>
......
......@@ -21,8 +21,8 @@
var records = hd_ds.getSelected();
Leaf.showConfirm('${l:PROMPT}', '是否确定删除?', function() {
var detail_mask = Ext.getBody();
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
if (records.length) {
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
for (var i = 0;i < records.length;i++) {
var line_record = records[i];
if (line_record.get('handle_flag') == 'Y') {
......
......@@ -13,6 +13,7 @@
<a:model-query fetchAll="true" model="prj.PRJ500D.amount_check" rootPath="amount_check"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;HAND&apos;,&apos;0017&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_description" rootPath="description"/>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
......@@ -30,7 +31,7 @@
<!-- <a:link id="get_special_fields_link_id" model="cont.CON500.con_contract_get_special_fields" modelaction="update"/> -->
<!--<a:link id="get_special_fields_link_id" model="prj.PRJ500.get_new_prj_number" modelaction="update"/>-->
<a:link id="get_special_fields_link_id" model="prj.PRJ500.get_two_prj_number" modelaction="update"/>
<a:link id="principal_eq_pymt_adj_link_n" model="hls.HLS500N.query_principal_eq_pymt_adj" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_principal_eq_pymt_adj_link_n" model="hls.HLS500N.query_principal_eq_pymt_adj" modelaction="update"/>
<a:link id="hls_bp_master_billing_link" model="prj.PRJ500N.hls_bp_master_billing" modelaction="query"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
......@@ -368,7 +369,19 @@
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
if (prj_project_ds_id == ds.id && prj_project_ds_id) {
if (record.get('pay_method') == 'CCB_THREE' && record.get('deduction_limit') <=0) {
Leaf.showMessage('${l:HLS.PROMPT}', '扣款限额应大于0');
return false;
}
if (record.get('signing_city')){
var reg = /^([\u2E80-\u9FFF]){4,}$/;
if (!reg.test(record.get('signing_city'))) {
$L.showErrorMessage('提示', '合同签订地请输入**市**区!');
return false;
}
}
}
if (bp_tenant_detail_r && ds.id == prj_project_ds_id) {
for (var key in bp_tenant_detail_r.data) {
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n') {
......@@ -597,13 +610,13 @@
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
}else if(record.get('secondary_lease') == 'NO'){
} else if (record.get('secondary_lease') == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id',null);
record.set('repur_contract_id_n',null);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
......@@ -624,17 +637,55 @@
}
//深圳美鹏和hcs显示分公司,其他隐藏
var bp_code='${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code)&&bp_code!== 'D00010001'&&bp_code!=='D00000009') {
var bp_code = '${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code) && bp_code !== 'D00010001' && bp_code !== 'D00000009') {
record.getField('branch_code').setRequired(false);
record.getField('branch_code_n').setRequired(false);
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE').style.display = 'none';
}
//星邦高空作业车 默认承租人为只读;
//厦门恒立兴、福州恒立兴、三明恒立兴、江西恒立兴 可选为必填;
//其它代理店不展示该字段,默认为代理店;
debugger;
//获取员工类型
var description = '${/model/description/record/@employee_type_code}';
var bp_code='${/model/user_agent_description/record/@bp_code}';
if(!Ext.isEmpty(description) && description == 'AGENT'){
if(!Ext.isEmpty(bp_code)){
if(bp_code !== 'C00010180' && bp_code !== 'C00010175' && bp_code !== 'C00010176' && bp_code !== 'C00010187'){
if(bp_code =='D00010001'){
record.set('credit_line','TENANT');
record.set('credit_line_n','承租人');
record.getField('credit_line').setRequired(false);
record.getField('credit_line_n').setRequired(false);
record.getField('credit_line').setReadOnly(true);
record.getField('credit_line_n').setReadOnly(true);
}else {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE').style.display = 'none';
}
}
}
}else {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE').style.display = 'none';
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示,必填,大于0,默认20万,可修改;
if (record.get('PAY_METHOD') == 'CCB_THREE') {
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'block';
record.getField('deduction_limit').setRequired(true);
} else {
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'none';
record.getField('deduction_limit').setRequired(false);
}
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
};
//更新时调用
......@@ -785,9 +836,25 @@
}
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示,必填,大于0,默认20万,可修改;
if (name=='pay_method') {
if(value=='CCB_THREE'){
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'block';
record.getField('deduction_limit').setRequired(true);
if(Ext.isEmpty(record.get('deduction_limit'))){
record.set('deduction_limit',200000);
}
}else{
record.getField('deduction_limit').setRequired(false);
record.set('deduction_limit',null);
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'none';
}
}
}
if (score_ds_id == ds.id) {
if (name == 'bp_birth' && value) {
if (jsGetAge(value.format('yyyy-mm-dd').toString()) == -1) {
......@@ -834,8 +901,6 @@
}
}
}
};
......@@ -965,7 +1030,7 @@
if (record.get('large_balance') == 'YES') {
var project_number = current_record.get('project_number');
Leaf.request({
url: $('principal_eq_pymt_adj_link_n').getUrl(),
url: $('${/parameter/@layout_code}_principal_eq_pymt_adj_link_n').getUrl(),
para: {p_project_number: project_number},
scope: this,
success: function (res) {
......
......@@ -14,6 +14,7 @@
defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;HAND&apos;,&apos;0017&apos;)"
model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_description" rootPath="description"/>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
......@@ -38,7 +39,7 @@
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id"
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_doc_quotation.lsc"/>
<a:link id="principal_eq_pymt_adj_link_n" model="hls.HLS500N.query_principal_eq_pymt_adj" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_principal_eq_pymt_adj_link_n" model="hls.HLS500N.query_principal_eq_pymt_adj" modelaction="update"/>
<a:link id="${/parameter/@layout_code}hls_bp_master_query_link"
url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/>
......@@ -768,10 +769,25 @@
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示,必填,大于0,默认20万,可修改;
if (name=='pay_method') {
if(value=='CCB_THREE'){
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'block';
record.getField('deduction_limit').setRequired(true);
if(Ext.isEmpty(record.get('deduction_limit'))){
record.set('deduction_limit',200000);
}
}else{
record.getField('deduction_limit').setRequired(false);
record.set('deduction_limit',null);
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'none';
}
}
}
if (score_ds_id == ds.id) {
if (name == 'bp_birth' && value) {
if (jsGetAge(value.format('yyyy-mm-dd').toString()) == -1) {
......@@ -804,13 +820,13 @@
var quotation_record = $(prj_quotation_ds_id).getCurrentRecord();
if ($(prj_project_ds_id).getAt(0).get('business_type') == 'LEASE') {
if (value == 'HL_PRICR_E' || value == 'HL_PRICR_EN'){
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'block';
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'block';
}else{
quotation_record.set('large_balance','NO');
quotation_record.set('large_balance_n','否');
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
}
}
......@@ -850,8 +866,9 @@
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
debugger;
// debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
if (ds_id == ds.id && ds_id) {
if (record.get('pay_method') == 'WIRE_TRANSFER') {
record.getField('bank_account_id').setReadOnly(true);
......@@ -859,6 +876,17 @@
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示,必填,大于0,默认20万,可修改;
if (record.get('pay_method') == 'CCB_THREE') {
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'block';
record.getField('deduction_limit').setRequired(true);
} else {
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'none';
record.getField('deduction_limit').setRequired(false);
}
if ('${/parameter/@function_usage}' != 'QUERY') {
if (record.get('secondary_lease') == 'YES') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
......@@ -916,32 +944,68 @@
record.getField('branch_code').setRequired(false);
record.getField('branch_code_n').setRequired(false);
}
//获取员工类型
debugger;
var description = '${/model/description/record/@employee_type_code}';
var bp_code='${/model/user_agent_description/record/@bp_code}';
var credit_record = $(ds_id).getCurrentRecord();
if(!Ext.isEmpty(description) && description == 'AGENT'){
if(!Ext.isEmpty(bp_code)){
if(bp_code !== 'C00010180' && bp_code !== 'C00010175' && bp_code !== 'C00010176' && bp_code !== 'C00010187'){
if(bp_code =='D00010001'){
credit_record.set('credit_line','TENANT');
credit_record.set('credit_line_n','承租人');
credit_record.getField('credit_line').setReadOnly(true);
credit_record.getField('credit_line_n').setReadOnly(true);
credit_record.getField('credit_line').setRequired(false);
credit_record.getField('credit_line_n').setRequired(false);
}else {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE').style.display = 'none';
}
}
}
}else {
credit_record.getField('credit_line').setReadOnly(true);
credit_record.getField('credit_line_n').setReadOnly(true);
credit_record.getField('credit_line').setRequired(false);
credit_record.getField('credit_line_n').setRequired(false);
}
}
//只读页面隐藏保存按钮
if('${/parameter/@function_usage}' == 'QUERY'){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
if (prj_quotation_ds_id == ds.id && prj_quotation_ds_id){
var bp_code = '${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code)){
// if (bp_code == 'C00010168' || bp_code == 'C00010198' || bp_code == 'C00010170') {
if (bp_code == 'D00000041' || bp_code =='D00010001' || bp_code=='D00000026') {
//===============================
// var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
// var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var quotation_record = $(prj_quotation_ds_id).getCurrentRecord();
if ($(ds_id).getAt(0).get('business_type') == 'LEASE') {
if (quotation_record.get('price_list') == 'HL_PRICR_E' || quotation_record.get('price_list') == 'HL_PRICR_EN'){
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'block';
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'block';
}else{
quotation_record.set('large_balance','NO');
quotation_record.set('large_balance_n','否');
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
}
}else{
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
}else {
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('PROJECT_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
}
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
......@@ -1123,7 +1187,7 @@
if (record.get('large_balance') == 'YES') {
var project_number = current_record.get('project_number');
Leaf.request({
url: $('principal_eq_pymt_adj_link_n').getUrl(),
url: $('${/parameter/@layout_code}_principal_eq_pymt_adj_link_n').getUrl(),
para: {p_project_number: project_number},
scope: this,
success: function (res) {
......@@ -1410,7 +1474,19 @@
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
if (prj_project_ds_id == ds.id && prj_project_ds_id) {
if (record.get('pay_method') == 'CCB_THREE' && record.get('deduction_limit') <= 0) {
Leaf.showMessage('${l:HLS.PROMPT}', '扣款限额应大于0');
return false;
}
if (record.get('signing_city')){
var reg = /^([\u2E80-\u9FFF]){4,}$/;
if (!reg.test(record.get('signing_city'))) {
$L.showErrorMessage('提示', '合同签订地请输入**市**区!');
return false;
}
}
}
if (bp_tenant_detail_r && ds.id == prj_project_ds_id) {
for (var key in bp_tenant_detail_r.data) {
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n') {
......
......@@ -11,6 +11,7 @@
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="prj.PRJ500D.sys_user_lv"
rootPath="user_name_path"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="zjwfl.ZJWFL1060.zi_wfl_approve_get_submitted" rootPath="approve_history_rp"/>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
......@@ -130,10 +131,14 @@
// Leaf.showMessage('${l:PROMPT}', '${l:HLS.CALC_TYPE_IS_NULL}');
// return;
}
/* if (record.dirty == true) {
if (head_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}*/
}
if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if ($(quotation_ds_id).validate()) {
/* if (!record.get('price_list') || !record.get('currency') || !record.get('lease_times')) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.QUOTATION_EXECUTE_AFTER_SAVE}');
......@@ -306,7 +311,19 @@
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
if (prj_project_ds_id == ds.id && prj_project_ds_id) {
if (record.get('pay_method') == 'CCB_THREE' && record.get('deduction_limit') < 0) {
Leaf.showMessage('${l:HLS.PROMPT}', '扣款限额不能小于0');
return false;
}
if (record.get('signing_city')){
var reg = /^([\u2E80-\u9FFF]){4,}$/;
if (!reg.test(record.get('signing_city'))) {
$L.showErrorMessage('提示', '合同签订地请输入**市**区!');
return false;
}
}
}
if (bp_tenant_detail_r && ds.id == prj_project_ds_id) {
for (var key in bp_tenant_detail_r.data) {
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id'&& key != 'third_party_credibility' && key != 'third_party_credibility_n') {
......@@ -495,19 +512,25 @@
//选择事件(grid,attach,gridbox,table)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_select'] = function (ds, record, bp_seq) {
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP', 'prj_project_bp');
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP', 'prj_project_bp');
if (bp_ds_id == ds.id && bp_ds_id) {
if (record.get('bp_category') == 'TENANT') {
//实际为不选中
Leaf.showMessage('${l:HLS.PROMPT}', '无法删除主承租人!');
//ds.unSelect(record);
//ds.select(record);
setTimeout(function () {
ds.unSelect(record);
ds.Select(record);
}, 1);
}
if (record.get('bp_category') == 'AGENT') {
//实际为不选中
Leaf.showMessage('${l:HLS.PROMPT}', '无法删除经销商!');
// ds.unSelect(record);
// ds.select(record);
setTimeout(function () {
ds.unSelect(record);
ds.Select(record);
}, 1);
}
}
};
......@@ -711,6 +734,7 @@
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
if (ds_id == ds.id && ds_id) {
if (record.get('pay_method') == 'WIRE_TRANSFER') {
record.getField('bank_branch_name').setReadOnly(true);
......@@ -719,6 +743,17 @@
record.getField('bank_branch_name_n').setRequired(false);
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示,必填,大于0,默认20万,可修改;
if (record.get('pay_method') == 'CCB_THREE') {
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'block';
record.getField('deduction_limit').setRequired(true);
} else {
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'none';
record.getField('deduction_limit').setRequired(false);
}
if('${/parameter/@function_usage}'!='QUERY') {
if (record.get('secondary_lease') == 'YES') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
......@@ -777,9 +812,93 @@
record.getField('branch_code').setRequired(false);
record.getField('branch_code_n').setRequired(false);
}
//获取员工类型
var create_bp_code = '${/model/approve_history_rp/record/@bp_code}';
var credit_record = $(ds_id).getCurrentRecord();
if(!Ext.isEmpty(create_bp_code)){
debugger;
if(create_bp_code == 'C00010180' || create_bp_code == 'C00010175' || create_bp_code == 'C00010176' || create_bp_code == 'C00010187'){
if('${/parameter/@editable_flag}' == 'Y' || '${/parameter/@editable_flag}' == 'YE'){
credit_record.getField('credit_line').setReadOnly(false);
credit_record.getField('credit_line_n').setReadOnly(false);
credit_record.getField('credit_line').setRequired(true);
credit_record.getField('credit_line_n').setRequired(true);
record.set('editable_flag','Y');
}else {
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}else if(create_bp_code =='D00010001') {
credit_record.getField('credit_line').setReadOnly(true);
credit_record.getField('credit_line_n').setReadOnly(true);
credit_record.getField('credit_line').setRequired(false);
credit_record.getField('credit_line_n').setRequired(false);
if('${/parameter/@editable_flag}' != 'YE'){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}else if('${/parameter/@editable_flag}' != 'YE'){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE').style.display = 'none';
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}else {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE').style.display = 'none';
}
}
}
if (prj_quotation_ds_id == ds.id && prj_quotation_ds_id){
var bp_code = '${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code)){
// if (bp_code == 'C00010168' || bp_code == 'C00010198' || bp_code == 'C00010170') {
if (bp_code == 'D00000041' || bp_code =='D00010001' || bp_code=='D00000026') {
//===============================
// var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
// var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var quotation_record = $(prj_quotation_ds_id).getCurrentRecord();
if ($(ds_id).getAt(0).get('business_type') == 'LEASE') {
if (quotation_record.get('price_list') == 'HL_PRICR_E' || quotation_record.get('price_list') == 'HL_PRICR_EN'){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'block';
}else{
quotation_record.set('large_balance','NO');
quotation_record.set('large_balance_n','否');
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
}
}else{
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
}else {
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'block';
}
}
debugger;
if('${/parameter/@function_usage}' == 'QUERY' && '${/parameter/@editable_flag}' != 'YE' && '${/parameter/@editable_flag}' != 'Y' ){
debugger;
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
};
if('${/parameter/@editable_flag}' == 'Y' || '${/parameter/@editable_flag}' == 'YE'){
zjwfl5110_ApproveChecker_add('zjwfl5110_submit', function (type) {
var prj_project_ds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
if (type == 'agree') {
if ($(prj_project_ds).validate()) {
if ($(prj_project_ds).isModified()) {
Leaf.showMessage('${HLS.PROMPT}', '请先保存');
return false;
}
//提交先保存
return true;
} else {
return false;
}
} else return true;
});
}
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
//选择承租人带出开票信息
......@@ -787,7 +906,7 @@
var prj_project_history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
;
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
if (prj_project_ds_id == ds.id && prj_project_ds_id) {
if (name == "payment_deduction" && value=="DOWN_PAYMENT_DEDUCTION") {
//业务类型回租时,默认只读“首付款抵扣”选项
......@@ -861,6 +980,9 @@
}
record.getField('bank_account_id').setLovPara('bp_id_tenant', record.get('bp_id_tenant'));
}
if(name == 'credit_line' && value) {
$(prj_project_ds_id).get(0).set('credit_line',value);
}
}
if (name == 'pay_method') {
......@@ -934,7 +1056,23 @@
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示,必填,大于0,默认20万,可修改;
if (name=='pay_method') {
if(value=='CCB_THREE'){
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'block';
record.getField('deduction_limit').setRequired(true);
if(Ext.isEmpty(record.get('deduction_limit'))){
record.set('deduction_limit',200000);
}
}else{
record.getField('deduction_limit').setRequired(false);
record.set('deduction_limit',null);
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'none';
}
}
if (score_ds_id == ds.id) {
if (name == 'bp_birth' && value) {
......@@ -959,6 +1097,28 @@
}
}
}
var bp_code='${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code)){
// if (bp_code == 'C00010168' || bp_code == 'C00010198' || bp_code == 'C00010170'){
if (bp_code == 'D00000041' || bp_code =='D00010001' || bp_code=='D00000026') {
if (prj_quotation_ds_id == ds.id){
if (name == 'price_list' && value){
var quotation_record = $(prj_quotation_ds_id).getCurrentRecord();
if ($(prj_project_ds_id).getAt(0).get('business_type') == 'LEASE') {
if (value == 'HL_PRICR_E' || value == 'HL_PRICR_EN'){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'block';
}else{
quotation_record.set('large_balance','NO');
quotation_record.set('large_balance_n','否');
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
}
}
}
}
}
};
//附件打包下载
window['${/parameter/@layout_code}_ACY_USER_BUTTON1_layout_dynamic_tab_click'] = function () {
......
......@@ -13,6 +13,7 @@
<a:link id="rpt5012_report_query_link" url="${/request/@context_path}/modules/rpt/RPT5012/rpt5012_repory_query.lview"/>
<a:link id="rpt5012_print_link_id" model="rpt.RPT5012.rpt5012_result_query" modelaction="execute"/>
<a:link id="rpt5012_csh_result_after_link_id" model="rpt.RPT5012.rpt5012_csh_result_after_query" modelaction="execute"/>
<script><![CDATA[
function rpt5012_reset() {
$('rpt5012_query_ds').reset();
......@@ -43,7 +44,7 @@
}
Leaf.request({
url: $('rpt5012_print_link_id').getUrl(),
url: $('rpt5012_csh_result_after_link_id').getUrl(),
para: {
month: month
},
......
......@@ -41,7 +41,7 @@
/*
if (!Ext.isEmpty(bp_code)&&bp_code!== 'D00010001'&&bp_code!=='D00000009') {
$('con_contract_rental_result_grid').hideColumn('branch_code_n');
$('con_contract_rental_result_grid').hideColumn('branch_code');
......@@ -64,11 +64,12 @@
$('con_contract_cashflow_rental_result_grid').hideColumn('large_balance');
}
}
});
});*/
]]></script>
<a:dataSets>
<a:dataSet id="con_contract_rental_result_ds" pageSize="13" autoQuery="true" model="rpt.RPT5012.rpt5012_result_query" queryUrl="${/request/@context_path}/autocrud/rpt.RPT5012.rpt5012_result_query/query?month=${/parameter/@month}&amp;cur_begin=${/parameter/@cur_begin}&amp;cur_end=${/parameter/@cur_end}&amp;before_begin=${/parameter/@before_begin}&amp;before_end=${/parameter/@before_end}" autoPageSize="true"/>
<a:dataSet id="con_contract_cashflow_rental_result_ds" pageSize="13" autoQuery="true" model="rpt.RPT5012.rpt5012_csh_result_query" queryUrl="${/request/@context_path}/autocrud/rpt.RPT5012.rpt5012_csh_result_query/query?month=${/parameter/@month}&amp;cur_begin=${/parameter/@cur_begin}&amp;cur_end=${/parameter/@cur_end}&amp;before_begin=${/parameter/@before_begin}&amp;before_end=${/parameter/@before_end}" autoPageSize="true"/>
<a:dataSet id="con_contract_cashflow_rental_result_after_ds" pageSize="13" autoQuery="true" model="rpt.RPT5012.rpt5012_csh_result_after_query" queryUrl="${/request/@context_path}/autocrud/rpt.RPT5012.rpt5012_csh_result_after_query/query" autoPageSize="true"/>
</a:dataSets>
<a:screenBody>
<!-- <a:screenTopToolbar>-->
......@@ -77,7 +78,7 @@
<!-- </a:screenTopToolbar>-->
<a:tabPanel marginHeight="25" marginWidth="20">
<a:tabs>
<a:tab prompt="租金余额表" width="110">
<a:tab prompt="租金余额表(保证金前)" width="150">
<a:grid id="con_contract_rental_result_grid" bindTarget="con_contract_rental_result_ds" marginHeight="115" navBar="true" marginWidth="30">
<a:columns>
<a:column name="agent_extra_name" align="center" prompt="代理店" width="120"/>
......@@ -89,7 +90,7 @@
<a:column name="is_buyout_n" align="center" prompt="是否买断机" width="100"/>
<a:column name="modelcd" align="center" prompt=" 机型" width="180"/>
<a:column name="machine_number" align="center" prompt="机器号码" width="80"/>
<a:column name="int_rate_display" align="center" prompt="利率" width="80"/>
<a:column name="int_rate_display" exportDataFormat="" align="center" prompt="利率" width="80"/>
<a:column name="int_rate_display" align="center" prompt="基准利率" width="80"/>
<a:column name="lease_times" align="center" prompt="租赁期间" width="80"/>
<a:column name="down_payment_ratio" align="center" prompt="首付款比率" width="80"/>
......@@ -110,7 +111,40 @@
</a:columns>
</a:grid>
</a:tab>
<a:tab prompt="回收逾期明细表" width="110">
<a:tab prompt="租金余额表(保证金后)" width="150">
<a:grid id="con_contract_rental_result_after_grid" bindTarget="con_contract_rental_result_ds" marginHeight="115" navBar="true" marginWidth="30">
<a:columns>
<a:column name="agent_extra_name" align="center" prompt="代理店" width="120"/>
<a:column name="bp_tenant_name" align="center" prompt="客户名称" width="120"/>
<a:column name="contract_number" align="center" prompt="合同编号" width="100"/>
<a:column name="lease_start_date" align="center" prompt="租赁期开始日" width="80"/>
<a:column name="branch_code_n" align="center" prompt="分公司" width="100"/>
<a:column name="large_balance_n" align="center" prompt="大额尾款" width="100"/>
<a:column name="is_buyout_n" align="center" prompt="是否买断机" width="100"/>
<a:column name="modelcd" align="center" prompt=" 机型" width="180"/>
<a:column name="machine_number" align="center" prompt="机器号码" width="80"/>
<a:column name="int_rate_display" exportDataFormat="" align="center" prompt="利率" width="80"/>
<a:column name="int_rate_display" align="center" prompt="基准利率" width="80"/>
<a:column name="lease_times" align="center" prompt="租赁期间" width="80"/>
<a:column name="down_payment_ratio" align="center" prompt="首付款比率" width="80"/>
<a:column name="lease_item_amount" align="center" prompt="代理店销售金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="residual_amount" align="center" prompt="留购价格" renderer="Leaf.formatMoney" width="80"/>
<a:column name="contract_amount" align="center" prompt="合同总金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="down_payment" align="center" prompt="首付款" renderer="Leaf.formatMoney" width="80"/>
<a:column name="month_due_amount_after" align="center" prompt="当月末应收款余额(合计)" renderer="Leaf.formatMoney" width="80"/>
<a:column name="month_due_principal_after" align="center" prompt="当月末本金余额(合计)" renderer="Leaf.formatMoney" width="80"/>
<a:column name="month_interest_after" align="center" prompt="当月末利息余额(合计)" renderer="Leaf.formatMoney" width="80"/>
<a:column name="month_residual" align="center" prompt="当月末留购金余额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="business_due_times_after" align="center" prompt="逾期期数" width="80"/>
<a:column name="business_due_amount_after" align="center" prompt="当月末逾期金额(合计)" renderer="Leaf.formatMoney" width="80"/>
<a:column name="deposit_amount" align="center" prompt="保证金" renderer="Leaf.formatMoney" width="80"/>
<a:column name="contract_status_n" align="center" prompt="合同状态" width="80"/>
<a:column name="residual_date" align="center" prompt="合同终了" width="80"/>
<a:column name="terminate_date" align="center" prompt="结清年月" width="80"/>
</a:columns>
</a:grid>
</a:tab>
<a:tab prompt="回收逾期明细表(保证金前)" width="180">
<a:grid id="con_contract_cashflow_rental_result_grid" bindTarget="con_contract_cashflow_rental_result_ds" marginHeight="115" navBar="true" marginWidth="30">
<a:columns>
<a:column name="agent_extra_name" align="center" prompt="代理店" width="120"/>
......@@ -122,7 +156,7 @@
<a:column name="is_buyout_n" align="center" prompt="是否买断机" width="100"/>
<a:column name="modelcd" align="center" prompt=" 机型" width="180"/>
<a:column name="machine_number" align="center" prompt="机器号码" width="80"/>
<a:column name="int_rate_display" align="center" prompt="利率" width="80"/>
<!--<a:column name="int_rate_display" align="center" prompt="利率" width="80"/>-->
<a:column name="times" align="center" prompt="回数" width="80"/>
<a:column name="due_date" align="center" prompt="支付预定日" width="80"/>
<a:column name="due_amount" align="center" prompt="应收款金额" renderer="Leaf.formatMoney" width="80"/>
......@@ -130,6 +164,30 @@
<a:column name="unreceived_amount" align="center" prompt="未收金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="overdue_days" align="center" prompt="逾期天数" width="80"/>
<a:column name="deposit_amount" align="center" prompt="保证金" renderer="Leaf.formatMoney" width="80"/>
<a:column name="rent_type" align="center" prompt="租金类型" width="100"/>
</a:columns>
</a:grid>
</a:tab>
<a:tab prompt="回收逾期明细表(保证金后)" width="180">
<a:grid id="con_contract_cashflow_rental_result_after_grid" bindTarget="con_contract_cashflow_rental_result_after_ds" marginHeight="115" navBar="true" marginWidth="30">
<a:columns>
<a:column name="agent_extra_name_af" align="center" prompt="代理店" width="120"/>
<a:column name="bp_tenant_name_af" align="center" prompt="客户名称" width="120"/>
<a:column name="contract_number_af" align="center" prompt="合同编号" width="100"/>
<a:column name="lease_start_date_af" align="center" prompt="租赁期开始日" width="80"/>
<a:column name="branch_code_af" align="center" prompt="分公司" width="100"/>
<a:column name="large_balance_af" align="center" prompt="大额尾款" width="100"/>
<a:column name="is_buyout_af" align="center" prompt="是否买断机" width="100"/>
<a:column name="modelcd_af" align="center" prompt=" 机型" width="180"/>
<a:column name="machine_number_af" align="center" prompt="机器号码" width="80"/>
<a:column name="times_af" align="center" prompt="回数" width="80"/>
<a:column name="due_date_af" align="center" prompt="支付预定日" width="80"/>
<a:column name="due_amount_af" align="center" prompt="应收款金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="received_amount_af" align="center" prompt="已收款金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="unreceived_amount_af" align="center" prompt="未收金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="overdue_days_af" align="center" prompt="逾期天数" width="80"/>
<a:column name="deposit_amount_af" align="center" prompt="保证金" renderer="Leaf.formatMoney" width="80"/>
<a:column name="rent_type" align="center" prompt="租金类型" width="100"/>
</a:columns>
</a:grid>
</a:tab>
......
......@@ -76,6 +76,7 @@
]]></script>
<a:dataSets>
<a:dataSet id="yes_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="sub_category_ds" lookupCode="ZJ_WFL_SUB_CATEGORY"/>
<a:dataSet id="para_workflowDs" autoCreate="true" model="zjwfl.zj_wfl_workflow">
<a:fields>
......
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