Commit 69ea79a9 authored by panhong18943's avatar panhong18943

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

parents 31bf50ad ef3b1a59
......@@ -13,6 +13,7 @@
<bm:parameter name="sum_unreceived_principal" dataType="java.lang.Double" input="false" output="true" outputPath="@sum_unreceived_principal"/>
<bm:parameter name="fund_possession_rate" dataType="java.lang.Double" input="false" output="true" outputPath="@fund_possession_rate"/>
<bm:parameter name="last_rent_due_date" dataType="date" input="false" output="true" outputPath="@last_rent_due_date"/>
<bm:parameter name="asset_possession_cost" dataType="java.lang.Double" input="false" output="true" outputPath="@asset_possession_cost"/>
</bm:parameters>
<bm:update-sql><![CDATA[
BEGIN
......@@ -30,6 +31,7 @@
p_sum_unreceived_principal => ${@sum_unreceived_principal},
p_fund_possession_rate=>${@fund_possession_rate},
p_last_rent_due_date=>${@last_rent_due_date},
p_asset_possession_cost => ${@asset_possession_cost},
p_residual_value=>${@residual_value},
p_deposit_deduction=>${@deposit_deduction},
p_user_id => ${/session/@user_id});
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select nvl(hd.hd_user_col_v06, 'N') hd_user_col_v06
from con_contract cc, hls_fin_calculator_hd hd
where cc.calc_session_id = hd.calc_session_id
and cc.contract_id =${/parameter/@contract_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-4-17 下午02:12:40
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[select t.column_code,
lower(t.column_name) column_name,
t.prompt,
t.price_list,
hls_fin_calculator_save_pkg.calc_hls_fin_value(nvl(${@calc_session_id},-999),
${@price_list},
t.column_name,
t.percent,
t.validation_type) column_value_c,
hls_fin_calculator_save_pkg.get_default_value_name(${@calc_session_id},t.price_list,t.column_name,t.layout_area_seq,${/session/@user_id},${/session/@session_id}) column_value,
t.percent,
t.validation_type,
t.validation_sql,
t.layout_area_seq,
t.input_mode,
decode(t.input_mode, 'REQUIRED', 'TRUE', 'FALSE') required_input_mode,
(case when ${@maintain_type}='READONLY' then
'TRUE'
else
decode(t.input_mode, 'READONLY', 'TRUE', 'FALSE')
end) readonly_input_mode,
nvl(t.allow_format,'FALSE') allow_format,
nvl(t.allow_decimal,'FALSE') allow_decimal,
nvl(t.zero_fill,'FALSE') zero_fill,
nvl(t.precision,2) precision,
t.alignment,
nvl(p.show_column_code,'N') show_column_code,
decode(p.show_column_code,'N',258,298) grid_left_width,
decode(p.show_column_code,'N',280,345) grid_margin_width,
decode(${/parameter/@calc_type},'CLASSIC_CALCULATOR',110,60) margin_height,
nvl(t.display_flag,'N') display_flag,
nvl(t.enabled_flag,'N') enabled_flag,
nvl(p.field_width,120) field_width,
nvl(p.margin_top,3) margin_top,
nvl(t.lov_return_vcode,'N') lov_return_vcode,
decode(${/session/@lov_search_rule},'AUTOCOMPLETE','true','false') autocomplete,
decode(${/session/@lov_search_rule},'FETCHSINGLE','true','false') fetchsingle,
(case when t.validation_type in ('TEXTFIELD','TEXTAREA') then
decode(sys_parameter_pkg.value('SYS_GRID_SHOW_TITLE',${/session/@user_id},${/session/@role_id},${/session/@company_id}),'Y','true','false')
else 'false'
end) sys_grid_show_title,
p.description price_list_name,
p.calc_method,
(select sv.code_value_name from sys_code_values_v sv where sv.code='HLS050.HLS_PRICE_LIST.CALC_METHOD' and sv.code_value=p.calc_method) calc_method_name,
lower(t.lov_cascade_para1) lov_cascade_para1,
lower(t.lov_cascade_para2) lov_cascade_para2,
lower(t.lov_cascade_para3) lov_cascade_para3,
t.lower_limit,
t.upper_limit,
(select h.source_doc_category from hls_fin_calculator_hd h where h.calc_session_id = ${@calc_session_id} )source_doc_category
from hls_fin_calc_config t,hls_price_list p
#WHERE_CLAUSE#
order by t.display_order,t.column_name
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="source_doc_category" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="column_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_CODE"/>
<bm:field name="column_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_NAME"/>
<bm:field name="prompt" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROMPT"/>
<bm:field name="price_list" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRICE_LIST"/>
<bm:field name="column_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_VALUE"/>
<bm:field name="column_value_c" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_VALUE_C"/>
<bm:field name="percent" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PERCENT"/>
<bm:field name="validation_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VALIDATION_TYPE"/>
<bm:field name="validation_sql" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VALIDATION_SQL"/>
<bm:field name="layout_area_seq" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LAYOUT_AREA_SEQ"/>
<bm:field name="input_mode" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INPUT_MODE"/>
<bm:field name="required_input_mode" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REQUIRED_INPUT_MODE"/>
<bm:field name="readonly_input_mode" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="READONLY_INPUT_MODE"/>
<bm:field name="allow_format" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ALLOW_FORMAT"/>
<bm:field name="allow_decimal" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ALLOW_DECIMAL"/>
<bm:field name="zero_fill" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ZERO_FILL"/>
<bm:field name="precision" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRECISION"/>
<bm:field name="alignment" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ALIGNMENT"/>
<bm:field name="show_column_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SHOW_COLUMN_CODE"/>
<bm:field name="display_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DISPLAY_FLAG"/>
<bm:field name="field_width" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FIELD_WIDTH"/>
<bm:field name="margin_top" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MARGIN_TOP"/>
<bm:field name="lov_return_vcode" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOV_RETURN_VCODE"/>
<bm:field name="grid_left_width" databaseType="NUMBER" datatype="java.lang.Long" physicalName="GRID_LEFT_WIDTH"/>
<bm:field name="grid_margin_width" databaseType="NUMBER" datatype="java.lang.Long" physicalName="GRID_MARGIN_WIDTH"/>
<bm:field name="margin_height" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MARGIN_HEIGHT"/>
<bm:field name="autocomplete" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="AUTOCOMPLETE"/>
<bm:field name="fetchsingle" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FETCHSINGLE"/>
<bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG"/>
<bm:field name="sys_grid_show_title" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SYS_GRID_SHOW_TITLE"/>
<bm:field name="price_list_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRICE_LIST_NAME"/>
<bm:field name="calc_method" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CALC_METHOD"/>
<bm:field name="calc_method_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CALC_METHOD_NAME"/>
<bm:field name="lov_cascade_para1" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOV_CASCADE_PARA1"/>
<bm:field name="lov_cascade_para2" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOV_CASCADE_PARA2"/>
<bm:field name="lov_cascade_para3" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOV_CASCADE_PARA3"/>
<bm:field name="lower_limit" databaseType="NUMBER" datatype="java.lang.Double" physicalName="LOWER_LIMIT"/>
<bm:field name="upper_limit" databaseType="NUMBER" datatype="java.lang.Double" physicalName="UPPER_LIMIT"/>
</bm:fields>
<bm:query-fields>
<bm:query-field field="enabled_flag" queryExpression="t.enabled_flag=${@enabled_flag}"/>
<bm:query-field field="display_flag" queryExpression="(t.display_flag=${@display_flag} or (t.display_flag=&apos;C&apos; and exists(select 1 from hls_fin_calc_config_quote q where q.calc_session_id=${@calc_session_id} and q.layout_area_seq=t.layout_area_seq and q.column_name=t.column_name and q.display_flag=&apos;Y&apos;)))"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="(t.layout_area_seq = &apos;H&apos; and t.price_list=p.price_list and t.price_list = nvl(${@price_list},(select h.price_list from hls_fin_calculator_hd h where h.calc_session_id=${@calc_session_id})))"/>
<bm:data-filter enforceOperations="query" expression=" (t.column_name not in('BTB_INT_RATE') )"></bm:data-filter>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-4-18 下午05:30:04
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[select d.column_code,
lower(d.column_name) column_name,
d.column_name upper_column_name,
d.prompt,
d.data_type,
d.validation_type,
d.validation_sql,
d.input_mode,
d.display_order,
decode(sign(d.display_order), '-1', 'true', '1', 'false', 'false') lock_column,
d.price_list,
d.layout_area_seq,
d.precision,
d.allow_format,
d.allow_decimal,
d.zero_fill,
d.default_value,
d.alignment,
d.lov_return_vcode,
nvl(d.width,100) width,
nvl(p.show_column_code,'N') show_column_code,
(case when d.validation_type in ('TEXTFIELD','TEXTAREA') then
decode(sys_parameter_pkg.value('SYS_GRID_SHOW_TITLE',${/session/@user_id},${/session/@role_id},${/session/@company_id}),'Y','true','false')
else 'false'
end) sys_grid_show_title,
sys_parameter_pkg.value('SYS_GRID_COL_UNDERLINE',${/session/@user_id},${/session/@role_id},${/session/@company_id}) sys_grid_col_underline,
d.enabled_flag,
nvl((select q.display_flag from hls_fin_calc_config_quote q
where q.calc_session_id=${@calc_session_id} and q.layout_area_seq='L' and q.column_name=d.column_name),d.display_flag) display_flag,
d.lower_limit,
d.upper_limit
from hls_fin_calc_config d,hls_price_list p
#WHERE_CLAUSE#
order by d.display_order,d.column_name
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="column_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_CODE" required="true"/>
<bm:field name="column_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_NAME" required="true"/>
<bm:field name="upper_column_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="UPPER_COLUMN_NAME" required="true"/>
<bm:field name="prompt" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROMPT"/>
<bm:field name="data_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DATA_TYPE"/>
<bm:field name="validation_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VALIDATION_TYPE"/>
<bm:field name="validation_sql" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VALIDATION_SQL"/>
<bm:field name="input_mode" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INPUT_MODE"/>
<bm:field name="display_order" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DISPLAY_ORDER"/>
<bm:field name="lock_column" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOCK_COLUMN"/>
<bm:field name="price_list" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRICE_LIST" required="true"/>
<bm:field name="layout_area_seq" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LAYOUT_AREA_SEQ" required="true"/>
<bm:field name="precision" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRECISION"/>
<bm:field name="allow_format" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ALLOW_FORMAT"/>
<bm:field name="allow_decimal" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ALLOW_DECIMAL"/>
<bm:field name="default_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DEFAULT_VALUE"/>
<bm:field name="alignment" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ALIGNMENT"/>
<bm:field name="width" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WIDTH"/>
<bm:field name="show_column_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="show_column_code"/>
<bm:field name="zero_fill" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ZERO_FILL"/>
<bm:field name="lov_return_vcode" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOV_RETURN_VCODE"/>
<bm:field name="sys_grid_show_title" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SYS_GRID_SHOW_TITLE"/>
<bm:field name="sys_grid_col_underline" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SYS_GRID_COL_UNDERLINE"/>
<bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG"/>
<bm:field name="display_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DISPLAY_FLAG"/>
<bm:field name="lower_limit" databaseType="NUMBER" datatype="java.lang.Double" physicalName="LOWER_LIMIT"/>
<bm:field name="upper_limit" databaseType="NUMBER" datatype="java.lang.Double" physicalName="UPPER_LIMIT"/>
</bm:fields>
<bm:query-fields>
<bm:query-field field="enabled_flag" queryExpression="d.enabled_flag=${@enabled_flag}"/>
<bm:query-field field="display_flag" queryExpression="d.display_flag=${@display_flag}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="query" expression="(d.price_list =nvl(${@price_list},(select h.price_list from hls_fin_calculator_hd h where h.calc_session_id=${@calc_session_id})) and d.layout_area_seq = &apos;L&apos; and lower(d.column_name)=nvl(${@column_name},lower(d.column_name)) and d.price_list=p.price_list)"/>
<bm:data-filter enforceOperations="query" expression=" (d.column_name not in('BTB_INTEREST','BTB_FEE') )"></bm:data-filter>
</bm:data-filters>
</bm:model>
......@@ -188,6 +188,7 @@
AND f.write_off_flag <> 'FULL'
AND f.cf_status IN ('RELEASE', 'BLOCK')
AND f.cf_direction = 'OUTFLOW'
and t.business_type<>'LEASEOPERAT'
AND NOT EXISTS (
SELECT 1
FROM csh_payment_req_ln l,csh_payment_req_hd hd
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zhuxianfei
$Date: 2018/7/26 14:11
$Revision: 1.0
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
csh_payment_asset_req_pkg.req_acp_import(p_invoice_type => ${@invoice_type},
p_invoice_code => ${@invoice_code},
p_invoice_number=> ${@invoice_number},
p_net_amount => ${@net_amount},
p_invoice_date => ${@invoice_date},
p_payment_req_id => ${@payment_req_id},
p_user_id => ${/session/@user_id}
);
end;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2024/1/26 14:11
$Revision: 1.0
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
csh_payment_asset_req_pkg.req_acp_import_total(
p_invoice_type => ${@invoice_type},
p_invoice_code => ${@invoice_code},
p_invoice_number => ${@invoice_number},
p_total_amount => ${@total_amount},
p_invoice_date => ${@invoice_date},
p_payment_req_id => ${@payment_req_id},
p_user_id => ${/session/@user_id}
end;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2024-1-19 上午11:15:04
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
csh_payment_asset_req_pkg.payment_asset_submit
(
p_payment_req_id=>${@payment_req_id},
p_user_id=>${/session/@user_id}
);
end;]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -46,6 +46,10 @@
WHERE cc.contract_id = h.contract_id
AND cc.data_class = 'NORMAL'
AND cc.contract_status = 'CLOSED')
AND NOT EXISTS (SELECT 1
FROM con_contract cc
WHERE cc.contract_id = h.contract_id
AND cc.division = '95')
AND t.returned_flag = 'NOT'
AND EXISTS
(SELECT 1
......@@ -55,9 +59,14 @@
FROM csh_payment_req_ln l
WHERE l.payment_req_id = h.payment_req_id
AND rownum = 1)
--AND
--cc.cf_item = '52'
)) v #WHERE_CLAUSE#
)
and not exists(select 1
from csh_payment_req_ln l,con_contract cc,con_contract_cashflow cf
where l.payment_req_id = h.payment_req_id
and l.ref_doc_category = 'CONTRACT'
and l.ref_doc_id = cc.contract_id
and l.ref_doc_line_id = cf.cashflow_id
and cf.cf_item in ('40'))) v #WHERE_CLAUSE#
ORDER BY transaction_date DESC, transaction_num
]]></bm:query-sql>
......
......@@ -101,6 +101,7 @@
<bm:field name="paid_byother_flag" />
<bm:field name="guarantor_name_duty_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t1.guarantor_name_duty)" forInsert="false" forUpdate="false" prompt="担保人履行担保义务" />
<bm:field name="guarantor_name_duty" />
<bm:field name="operat_flag" />
</bm:fields>
......
......@@ -180,6 +180,6 @@
<bm:data-filter name="query" expression="(t1.returned_flag = 'NOT')"/>
<bm:data-filter name="query" expression="(t1.write_off_flag = 'NOT')"/>
<bm:data-filter name="query" expression="(t1.confirmed_flag in ('ACCAUDITED','APPROVED','WF_REJECTED'))"/>
<bm:data-filter name="query" expression="((t1.transaction_type = 'DEPOSIT' and t1.ref_contract_id is null) or (t1.collection_classes = 'REFUND' and t1.ref_contract_id is null and t1.source_csh_trx_id is null ) or (t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and nvl(t1.collection_classes,'NON') != 'REFUND'))"/>
<bm:data-filter name="query" expression="((t1.transaction_type = 'DEPOSIT' and t1.ref_contract_id is null) or (t1.collection_classes = 'REFUND' and t1.ref_contract_id is null and t1.source_csh_trx_id is null ) or (t1.transaction_type in ('RECEIPT') and nvl(t1.collection_classes,'NON') != 'REFUND'))"/>
</bm:data-filters>
</bm:model>
\ No newline at end of file
......@@ -108,16 +108,63 @@
<bm:field name="acc_confirmed_by"/>
<bm:field name="acc_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.acc_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type"/>
<bm:field name="deposit_trans_type_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type" expression="decode(t1.ref_contract_id,
null,
decode(t1.collection_classes,
'OPERAT_DEPOSIT',
'vender_deposit',
t1.deposit_trans_type),
t1.deposit_trans_type)" forInsert="false" forUpdate="false" />
<bm:field name="deposit_trans_type_desc" expression="decode(t1.ref_contract_id,
null,
decode(t1.collection_classes,
'OPERAT_DEPOSIT',
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'DEPOSIT_TRANS_TYPE'
and v.code_value = 'vender_deposit'),
(select v.code_value_name
from sys_code_values_v v
where v.code = 'DEPOSIT_TRANS_TYPE'
and v.code_value = t1.deposit_trans_type)),
(select v.code_value_name
from sys_code_values_v v
where v.code = 'DEPOSIT_TRANS_TYPE'
and v.code_value = t1.deposit_trans_type))" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_telnet_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_tenant)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/>
<bm:field name="source_type"/>
<bm:field name="approve_status" expression=" nvl(( hlcm_cux_deposit_pkg.get_transaction_status_new(p_transaction_id=>t1.transaction_id,p_user_id=>1) ),'正常')" forInsert="false" forUpdate="false"/>
<bm:field name="vender_contract_number" expression="(select cc.search_term_1 vender_contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="vender_project_number" expression="(select p.project_number vender_project_number from prj_project_lease_item pi, prj_project p, con_contract_lease_item ci where pi.source_project_id = p.project_id and pi.project_lease_item_id = ci.project_lease_item_id and ci.contract_id=t1.ref_contract_id)"/>
<bm:field name="business_type" expression="(select cc.business_type from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="business_type_desc" expression="(select hb.description from con_contract cc,hls_business_type_v hb where cc.business_type= hb.business_type and hb.enabled_flag = 'Y' and cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="business_type" expression=" decode(t1.ref_contract_id,
null,
decode(t1.collection_classes,
'OPERAT_DEPOSIT',
'LEASEOPERAT',
(select cc.business_type
from con_contract cc
where cc.contract_id = t1.ref_contract_id)),
(select cc.business_type
from con_contract cc
where cc.contract_id = t1.ref_contract_id))"/>
<bm:field name="business_type_desc" expression="decode(t1.ref_contract_id,
null,
decode(t1.collection_classes,
'OPERAT_DEPOSIT',
(select ht.description
from hls_business_type ht
where ht.business_type = 'LEASEOPERAT'),
(select hb.description
from con_contract cc, hls_business_type_v hb
where cc.business_type = hb.business_type
and hb.enabled_flag = 'Y'
and cc.contract_id = t1.ref_contract_id)),
(select hb.description
from con_contract cc, hls_business_type_v hb
where cc.business_type = hb.business_type
and hb.enabled_flag = 'Y'
and cc.contract_id = t1.ref_contract_id))"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-12-21 14:30:34
$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
hls_bp_master_credit_pkg.saved_credit_status(
p_bp_credit_hd_id =>${@bp_credit_hd_id},
p_user_id =>${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -61,7 +61,7 @@
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
hls_monthend_new_pkg.csh_check_acr(p_user_id => ${/session/@user_id},p_err_msg=> ${@p_err_msg});
hls_monthend_new_pkg.csh_check_acr(p_csh_date => ${@csh_date},p_user_id => ${/session/@user_id},p_err_msg=> ${@p_err_msg});
end;
]]></bm:update-sql>
<bm:parameters>
......
......@@ -18,6 +18,8 @@
'NO',
(Select decode(t.role_code,
'0009',
'NO',
'0038',
'NO',
'0014',
'YES',
......
......@@ -28,7 +28,9 @@
(SELECT ccli.modelcd
FROM con_contract_lease_item ccli
WHERE ccli.contract_id =
ct.contract_id) modelcd,
ct.contract_id
AND ccli.equipment_type ='MAIN') modelcd,
--机型
(SELECT nvl(i.machine_number,i.machine_number_70)
FROM con_contract_lease_item i
......@@ -785,6 +787,7 @@
FROM con_contract ct
WHERE ct.contract_status NOT IN ('CANCEL')
AND ct.data_class = 'NORMAL'
and ct.document_type not in('PUR_ORDER')
ORDER BY ct.bp_id_agent_level1
]]></bm:query-sql>
</bm:operation>
......
......@@ -270,10 +270,10 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023','2221001024')
and ga.account_code in('2221001020','2221001023','2221001024','2221001026')
and h.reversed_flag='N'
and h.internal_period_num=to_number(${@base_period})
And (h.je_transaction_code ='HL_SALES_TAX_ACT_NEW' )
And (h.je_transaction_code in ('HL_SALES_TAX_ACT_NEW','FIN_INCOME_RECOGNITION_OP') )
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
union
SELECT h.period_year,
......@@ -329,7 +329,7 @@ SELECT h.period_year,
(select 1
from gld_accounts g
where g.account_id = d.account_id
and g.account_code in ('1122000001', '1122000002'))
and g.account_code in ('1122000001', '1122000002','1122000005'))
and rownum = 1)
end due_amount,
null principal,
......@@ -353,7 +353,7 @@ SELECT h.period_year,
(select 1
from gld_accounts g
where g.account_id = d.account_id
and g.account_code in ('1122000001', '1122000002'))
and g.account_code in ('1122000001', '1122000002','1122000005'))
and rownum = 1)
end interest,
round(l.amount_cr -
......@@ -380,7 +380,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr != 0
and ga.account_id = l.account_id
and ga.account_code in ('2221001020', '2221001023','2221001024')
and ga.account_code in ('2221001020', '2221001023','2221001024','2221001026')
and h.reversed_flag = 'N'
and h.internal_period_num = to_number(${@base_period})
And (h.je_transaction_code =
......
......@@ -163,10 +163,10 @@ SELECT to_char(add_months(trunc(t1.journal_date, 'Q'), 2), 'yyyymm') tax_month,
and h.sbo_num is not null
and h.total_amount_dr != 0
and ga.account_id = l.account_id
and ga.account_code in ('2221001020', '2221001023', '2221001024')
and ga.account_code in ('2221001020', '2221001023', '2221001024','2221001026')
and h.reversed_flag = 'N' and h.post_gl_status = 'Y'
and h.internal_period_num <= to_number(${@base_period})
AND (h.je_transaction_code = 'HL_SALES_TAX_ACT_NEW')
AND (h.je_transaction_code in ('HL_SALES_TAX_ACT_NEW','FIN_INCOME_RECOGNITION_OP'))
and ((trunc(h.journal_date) <=
trunc(to_date('2020-01-31', 'yyyy-mm-dd')) and
h.description = 'MANUAL_IMPORT') or
......@@ -240,7 +240,7 @@ SELECT to_char(add_months(trunc(t1.journal_date, 'Q'), 2), 'yyyymm') tax_month,
(select 1
from gld_accounts g
where g.account_id = d.account_id
and g.account_code in ('1122000001', '1122000002'))
and g.account_code in ('1122000001', '1122000002','1122000005'))
and rownum = 1)
end due_amount,
null principal,
......@@ -283,7 +283,7 @@ SELECT to_char(add_months(trunc(t1.journal_date, 'Q'), 2), 'yyyymm') tax_month,
(select 1
from gld_accounts g
where g.account_id = d.account_id
and g.account_code in ('1122000001', '1122000002'))
and g.account_code in ('1122000001', '1122000002','1122000005'))
and rownum = 1)
end interest,
round(l.amount_cr,
......@@ -309,7 +309,7 @@ SELECT to_char(add_months(trunc(t1.journal_date, 'Q'), 2), 'yyyymm') tax_month,
and h.sbo_num is not null
and h.total_amount_dr != 0
and ga.account_id = l.account_id
and ga.account_code in ('2221001020', '2221001023', '2221001024')
and ga.account_code in ('2221001020', '2221001023', '2221001024','2221001026')
and h.reversed_flag = 'N' and h.post_gl_status = 'Y'
and h.internal_period_num <= to_number(${@base_period})
And (h.je_transaction_code = 'HL_CSH_CONSOLIDATION_DALAY' or
......@@ -735,7 +735,7 @@ SELECT h.period_year,
--and h.total_amount_dr != 0
and ga.account_id = l.account_id
--and l.line_description like '%留购金%'
and ga.account_code in ('2221001020', '2221001023', '2221001024')
and ga.account_code in ('2221001020', '2221001023', '2221001024','2221001026')
and h.reversed_flag = 'N' and h.post_gl_status = 'Y'
and h.internal_period_num <= to_number(${@base_period})
And exists
......@@ -1030,7 +1030,7 @@ select tax_month,
</bm:operation>
</bm:operations>
<bm:data-filters>
<!-- <bm:data-filter enforceOperations="query" expression="(t1.amount_tax > 0 or t1.fixed_data_flag='Y')"/>-->
<!-- <bm:data-filter enforceOperations="query" expression="(t1.amount_tax > 0 or t1.fixed_data_flag='Y')"/>-->
<bm:data-filter enforceOperations="query" expression="(exists(select 1 from con_contract cc where cc.contract_number=t1.contract_number and cc.contract_status!='CANCEL' and cc.data_class='NORMAL') or t1.fixed_data_flag='Y')"/>
</bm:data-filters>
<bm:query-fields>
......
......@@ -279,10 +279,10 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023','2221001024')
and ga.account_code in('2221001020','2221001023','2221001024','2221001026')
and h.reversed_flag='N'
and h.internal_period_num<to_number(${@base_period})
AND (h.je_transaction_code= 'HL_SALES_TAX_ACT_NEW')
AND (h.je_transaction_code in( 'HL_SALES_TAX_ACT_NEW','FIN_INCOME_RECOGNITION_OP'))
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
AND ( not EXISTS (SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
......@@ -357,7 +357,7 @@ SELECT h.period_year,
(select 1
from gld_accounts g
where g.account_id = d.account_id
and g.account_code in ('1122000001', '1122000002'))
and g.account_code in ('1122000001', '1122000002','1122000005'))
and rownum = 1)
end due_amount,
null principal,
......@@ -381,7 +381,7 @@ SELECT h.period_year,
(select 1
from gld_accounts g
where g.account_id = d.account_id
and g.account_code in ('1122000001', '1122000002'))
and g.account_code in ('1122000001', '1122000002','1122000005'))
and rownum = 1)
end interest,
round(l.amount_cr -
......@@ -409,7 +409,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr != 0
and ga.account_id = l.account_id
and ga.account_code in ('2221001020', '2221001023','2221001024')
and ga.account_code in ('2221001020', '2221001023','2221001024','2221001026')
and h.reversed_flag = 'N'
and h.internal_period_num < to_number(${@base_period})
And (h.je_transaction_code =
......
......@@ -13,6 +13,7 @@
SELECT t.contract_id,
t.invoice_hd_id,
t.invoice_line_id,
t.invoice_kind,
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'ACR510_INVOICE_KIND'
......
......@@ -271,11 +271,11 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023','2221001024')
and ga.account_code in('2221001020','2221001023','2221001024','2221001026')
and h.reversed_flag='N'
and h.internal_period_num<=to_number(${@end_period})
and h.internal_period_num>=to_number(${@start_period})
And (h.je_transaction_code ='HL_SALES_TAX_ACT_NEW' )
And (h.je_transaction_code in ('HL_SALES_TAX_ACT_NEW','FIN_INCOME_RECOGNITION_OP') )
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
union
SELECT h.period_year,
......@@ -336,7 +336,7 @@ SELECT h.period_year,
(select 1
from gld_accounts g
where g.account_id = d.account_id
and g.account_code in ('1122000001', '1122000002'))
and g.account_code in ('1122000001', '1122000002','1122000005'))
and rownum = 1)
end due_amount,
null principal,
......@@ -365,7 +365,7 @@ SELECT h.period_year,
(select 1
from gld_accounts g
where g.account_id = d.account_id
and g.account_code in ('1122000001', '1122000002'))
and g.account_code in ('1122000001', '1122000002','1122000005'))
and rownum = 1)
end interest,
round(l.amount_cr -
......@@ -392,7 +392,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr != 0
and ga.account_id = l.account_id
and ga.account_code in ('2221001020', '2221001023','2221001024')
and ga.account_code in ('2221001020', '2221001023','2221001024','2221001026')
and h.reversed_flag = 'N'
and h.internal_period_num<=to_number(${@end_period})
and h.internal_period_num>=to_number(${@start_period})
......
......@@ -279,10 +279,10 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023','2221001024')
and ga.account_code in('2221001020','2221001023','2221001024','2221001026')
and h.reversed_flag='N'
and h.internal_period_num<to_number(${@start_period})
AND (h.je_transaction_code= 'HL_SALES_TAX_ACT_NEW')
AND (h.je_transaction_code in ('HL_SALES_TAX_ACT_NEW','FIN_INCOME_RECOGNITION_OP') )
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
AND ( not EXISTS (SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
......@@ -363,7 +363,7 @@ SELECT h.period_year,
(select 1
from gld_accounts g
where g.account_id = d.account_id
and g.account_code in ('1122000001', '1122000002'))
and g.account_code in ('1122000001', '1122000002','1122000005'))
and rownum = 1)
end due_amount,
null principal,
......@@ -392,7 +392,7 @@ SELECT h.period_year,
(select 1
from gld_accounts g
where g.account_id = d.account_id
and g.account_code in ('1122000001', '1122000002'))
and g.account_code in ('1122000001', '1122000002','1122000005'))
and rownum = 1)
end interest,
round(l.amount_cr -
......@@ -424,7 +424,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr != 0
and ga.account_id = l.account_id
and ga.account_code in ('2221001020', '2221001023','2221001024')
and ga.account_code in ('2221001020', '2221001023','2221001024','2221001026')
and h.reversed_flag = 'N'
and h.internal_period_num < to_number(${@start_period})
And (h.je_transaction_code =
......
......@@ -13,6 +13,7 @@
SELECT t.contract_id,
t.invoice_hd_id,
t.invoice_line_id,
t.invoice_kind,
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'ACR510_INVOICE_KIND'
......
......@@ -11,7 +11,9 @@
From prj_project pp, hls_bp_master hm
Where pp.invoice_agent_id = hm.bp_id
And pp.wfl_instance_id = t1.instance_id),
'N') as is_constru_unit
'N') as is_constru_unit,
(select pp.division from prj_project pp where pp.wfl_instance_id=t1.instance_id) as division,
(select cc.division from csh_payment_req_hd crh,con_contract cc where crh.contract_id=cc.contract_id and crh.wfl_instance_id=t1.instance_id) payment_division
From zj_wfl_instance_node_rcpt_ht t1
#WHERE_CLAUSE#
]]></bm:query-sql>
......
......@@ -10,7 +10,9 @@
From prj_project pp, hls_bp_master hm
Where pp.invoice_agent_id = hm.bp_id
And pp.wfl_instance_id = t1.instance_id),
'N') as is_constru_unit
'N') as is_constru_unit,
(select pp.division from prj_project pp where pp.wfl_instance_id=t1.instance_id) as division,
(select cc.division from csh_payment_req_hd crh,con_contract cc where crh.contract_id=cc.contract_id and crh.wfl_instance_id=t1.instance_id) payment_division
From zj_wfl_workflow_instance t1
#WHERE_CLAUSE#
]]></bm:query-sql>
......
......@@ -11,7 +11,9 @@
From prj_project pp, hls_bp_master hm
Where pp.invoice_agent_id = hm.bp_id
And pp.wfl_instance_id = t1.instance_id),
'N') as is_constru_unit
'N') as is_constru_unit,
(select pp.division from prj_project pp where pp.wfl_instance_id=t1.instance_id) division,
(select cc.division from csh_payment_req_hd crh,con_contract cc where crh.contract_id=cc.contract_id and crh.wfl_instance_id=t1.instance_id) payment_division
From zj_wfl_instance_node_recipient t1
#WHERE_CLAUSE#
]]></bm:query-sql>
......
......@@ -5,7 +5,13 @@
<bm:query-sql><![CDATA[
Select t1.*,replace(t1.service_url,
'modules/prj/PRJ501N/prj_project_maintain_wfl_new.lview',
'modules/prj/PRJ501N/prj_project_maintain_constru_wfl.lview') as service_url_constru
'modules/prj/PRJ501N/prj_project_maintain_constru_wfl.lview') as service_url_constru,
replace(t1.service_url,
'modules/prj/PRJ501N/prj_project_maintain_wfl_new.lview',
'modules/prj/PRJ501N/prj_project_maintain_operat_wfl.lview') as service_url_operat,
replace(t1.service_url,
'modules/csh/CSH501/csh_payment_req.lview',
'modules/csh/CSH501/csh_payment_op_req.lview') as service_url_operat_payment
From (select zj_wfl_core_pkg.get_node_service_url(tt.record_id,
${/parameter/@url_type},
${/session/@user_id}) as service_url,tt.*
......
......@@ -5,7 +5,13 @@
<bm:query-sql><![CDATA[
Select t1.*,replace(t1.service_url,
'modules/prj/PRJ501N/prj_project_maintain_wfl_new.lview',
'modules/prj/PRJ501N/prj_project_maintain_constru_wfl.lview') as service_url_constru
'modules/prj/PRJ501N/prj_project_maintain_constru_wfl.lview') as service_url_constru,
replace(t1.service_url,
'modules/prj/PRJ501N/prj_project_maintain_wfl_new.lview',
'modules/prj/PRJ501N/prj_project_maintain_operat_wfl.lview') as service_url_operat,
replace(t1.service_url,
'modules/csh/CSH501/csh_payment_req.lview',
'modules/csh/CSH501/csh_payment_op_req.lview') as service_url_operat_payment
From (select zj_wfl_core_pkg.get_node_service_url(tt.record_id,
${/parameter/@url_type},
${/session/@user_id}) as service_url,tt.*
......
......@@ -5,7 +5,15 @@
<bm:query-sql><![CDATA[
Select t1.*,replace(t1.service_url,
'modules/prj/PRJ501N/prj_project_maintain_wfl_new.lview',
'modules/prj/PRJ501N/prj_project_maintain_constru_wfl.lview') as service_url_constru
'modules/prj/PRJ501N/prj_project_maintain_constru_wfl.lview') as service_url_constru,
replace(t1.service_url,
'modules/prj/PRJ501N/prj_project_maintain_wfl_new.lview',
'modules/prj/PRJ501N/prj_project_maintain_operat_wfl.lview') as service_url_operat,
replace(t1.service_url,
'modules/csh/CSH501/csh_payment_req.lview',
'modules/csh/CSH501/csh_payment_op_req.lview') as service_url_operat_payment,
replace(t1.service_url,
'modules/prj/PRJ2000/purchase_order_deteail.lview') as service_url_purchase
From (select zj_wfl_core_pkg.get_wfl_service_url(tt.instance_id,
${/session/@user_id}) as service_url,tt.*
from zj_wfl_workflow_instance tt) t1
......
var override_queryfields = [
{
name : 'amount_from',
queryexpression : "T1.amount>=${@amount_from}"
},
{
name : 'amount_to',
queryexpression : "T1.amount<=${@amount_to}"
},
{
name : 'req_date_from',
queryexpression : "T1.req_date>=trunc(to_date(${@req_date_from},'yyyy-mm-dd'))"
},
{
name : 'req_date_to',
queryexpression : "trunc(T1.req_date)<=to_date(${@req_date_to},'yyyy-mm-dd')"
},
{
name:'payment_req_number',
queryexpression:"t1.payment_req_number like '%'||${@payment_req_number}||'%'"
}
];
var add_datafilters = [
{
name : '',
expression : "exists(select 1\n" +
" from csh_payment_req_ln l,con_contract cc,con_contract_cashflow cf\n" +
" where l.payment_req_id = t1.payment_req_id\n" +
" and l.ref_doc_category = 'CONTRACT'\n" +
" and l.ref_doc_id = cc.contract_id\n" +
" and l.ref_doc_line_id = cf.cashflow_id\n" +
" and cf.cf_item in ('40'))"
} ];
add_datafilter();
override();
......@@ -25,6 +25,17 @@ var add_datafilters = [
name : 'approval_status',
expression : "(t1.approval_status in ('NEW','RETURN','REJECT'))"
} ];
},
{
name : '',
expression : "exists(select 1\n" +
" from csh_payment_req_ln l,con_contract cc,con_contract_cashflow cf\n" +
" where l.payment_req_id = t1.payment_req_id\n" +
" and l.ref_doc_category = 'CONTRACT'\n" +
" and l.ref_doc_id = cc.contract_id\n" +
" and l.ref_doc_line_id = cf.cashflow_id\n" +
" and cf.cf_item in ('0'))"
}
];
add_datafilter();
override();
......@@ -25,6 +25,17 @@ var add_datafilters = [
name : 'approval_status',
expression : "(t1.approval_status NOT in ('NEW','RETURN','REJECT','CANCEL'))"
} ];
},
{
name : '',
expression : "exists(select 1\n" +
" from csh_payment_req_ln l,con_contract cc,con_contract_cashflow cf\n" +
" where l.payment_req_id = t1.payment_req_id\n" +
" and l.ref_doc_category = 'CONTRACT'\n" +
" and l.ref_doc_id = cc.contract_id\n" +
" and l.ref_doc_line_id = cf.cashflow_id\n" +
" and cf.cf_item in ('0'))"
}
];
add_datafilter();
override();
......@@ -347,5 +347,7 @@ var enableLayoutConfig = {
'modules/inv/INV100/inv_payment_detail.lview':true,
'modules/inv/INV100/inv_payment_wfl_detail.lview':true,
'modules/hls/HLS303/bp_asset_create.lview':true,
'modules/csh/CSH1500/csh_asset_reconciliation.lview':true
'modules/csh/CSH1500/csh_asset_reconciliation.lview':true,
'modules/csh/CSH501C/csh_payment_asset_create_entrance.lview': true,
'modules/csh/CSH501C/csh_payment_asset_req.lview': true
};
\ No newline at end of file
var override_queryfields = [
{
{
field : 'project_id',
queryoperator : "="
},
},
//{
// field : 'project_name',
// queryoperator : "like"
//},
{
{
name : 'create_date_from',
queryexpression : "t1.create_date between to_date(${@create_date_from},'yyyy-mm-dd') and nvl(to_date(${@create_date_to},'yyyy-mm-dd'),t1.create_date)"
},
{
},
{
name : 'create_date_to',
queryexpression : "t1.create_date between nvl(to_date(${@create_date_from},'yyyy-mm-dd'),t1.create_date) and to_date(${@create_date_to},'yyyy-mm-dd')"
},
{
},
{
name : 'bp_id',
queryexpression : "exists (select 1 from prj_project_bp b where b.project_id=t1.project_id and b.bp_id=${@bp_id})"
},
},
{
name : 'bp_name',
queryexpression : "exists (select 1 from prj_project_bp_v b where b.project_id=t1.project_id and b.bp_name like '%'||${@bp_name}||'%')"
},
//{
// field : 'employee_id',
// queryoperator : "="
......@@ -60,12 +63,22 @@ var override_queryfields = [
// field : 'search_term_2',
// queryoperator : "="
//},
{
{
name:'project_status',
queryexpression : "t1.project_status in ('NEW','APPROVING','APPROVED_RETURN','REJECT','APPROVED','CONTRACT_CREATED','CLOSED')"
}
}
];
var add_datafilters = [{
name: 'document_type',
expression: "t1.document_type not in('PUR_ORDER') "
},
{
name: 'business_type',
expression: "t1.business_type not in('OTHERS') "
}
];
add_datafilter();
override();
......@@ -123,6 +123,7 @@
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_D_ESWJ' ||record_data.templet_code =='BUSINESS_CONTRACT_D_ESWJ_OEC'||record_data.templet_code =='BUSINESS_CONTRACT_D_ESWJ'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_FR_TJ' //update by xsh35973 添加法人铁甲保证函
//addby xsh35973 20221017 神钢建机
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_SG'||record_data.templet_code =='FINANCE_LEASE_CON_SG'||record_data.templet_code =='BUSINESS_CONTRACT_SG'||record_data.templet_code =='CON_CONTRACT_LEASE_BACK_SG'
||record_data.templet_code =='FINANCE_LEASE_BACK_CON_SG'||record_data.templet_code =='FINANCE_LEASE_BACK_CON_GUA_SG1'||record_data.templet_code =='CON_CONTRACT_MORTGAGE_SG'||record_data.templet_code =='LEASE_ORDER_SG'||record_data.templet_code =='PROOF_RECEIPT_SG'
//add by gzj 2022-12-23 北京卡家
||record_data.templet_code =='CON_COLLECTION_PAYMENT_KJ'||record_data.templet_code =='LEASE_CONTRACT_PAR_KJ_1'||record_data.templet_code =='CSH_PAYMENT_REQ_KJ'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_KJ_SURE'
||record_data.templet_code =='CSH_PAYMENT_REQ_KJ_1'||record_data.templet_code =='CON_CONTRACT_MORTGAGE_KJ'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_KJ_FR'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_FR_KJ'
......
......@@ -5,6 +5,7 @@
<a:model-query defaultWhereClause="t1.change_req_id = ${/parameter/@change_req_id}"
model="cus_deposit.CUS_DEPOSIT106.get_contract_wfl_status" rootPath="default_value_path"/>
<a:model-query defaultWhereClause="t1.contract_id=${/parameter/@contract_id}" fetchAll="true" model="cont.CON_ET001.create_change_req" rootPath="get_contract_division"/>
<a:model-query fetchAll="true" model="cont.CON_ET001.con_asset_fee_calc" rootPath="asset_flag_path" ></a:model-query>
</a:init-procedure>
<a:view>
<!-- <a:link id="con731_calc_ccr_fee_link" model="cont.CON731.calc_ccr_fee" modelaction="execute"/>-->
......@@ -52,10 +53,12 @@
}
//让历史信息查询
var history_con_id=get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
if($(history_con_id)){
var url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?bp_id=${/parameter/@bp_id}';
$(history_con_id).setQueryUrl(url);
$(history_con_id).query();
}
//铁甲业务合同展示保证金字段 18083 2023/5/11
if('${/model/get_contract_division/record/@division}' !='70' && '${/model/get_contract_division/record/@division}' != ''){
if(document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_BALANCE")){
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_BALANCE_prompt").style.display = "none";
......@@ -65,6 +68,13 @@
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_DEDUCTION_prompt").style.display = "none";
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_DEDUCTION").style.display = "none";
}
}
//报价中资管费字段为否时,不展示资产管理费字段 18083 2024/1/29
if('${/model/asset_flag_path/record/@hd_user_col_v06}' !='Y'){
if(document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_ASSET_POSSESSION_COST")){
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_ASSET_POSSESSION_COST_prompt").style.display = "none";
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_ASSET_POSSESSION_COST").style.display = "none";
}
}
});
......@@ -901,15 +911,14 @@
var lease_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_10', 'con_contract_lease_item');
if(ds.id == lease_ds_id&&lease_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
var division =$(project_ds_id).getAt(0).get('division');
if(division=='70' || division=='92'){
if(record.data.division=='70' || record.data.division=='92'){
$(gridId).hideColumn('full_name');
$(gridId).hideColumn('machine_number');
}else {
$(gridId).hideColumn('lease_name');
$(gridId).hideColumn('machine_number_70');
}
};
}
};
//选择事件(grid,attach,gridbox,table)
/*window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_before_select'] = function(ds, record, bp_seq) {
......
......@@ -7,7 +7,7 @@
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" fetchAll="true" model="wx.WX100.sys_pilot_run_user" rootPath="pilot_run_user"/>
<a:model-query defaultWhereClause="t1.contract_id=${/parameter/@contract_id}" fetchAll="true" model="cont.CON_ET001.con_get_contract_status" rootPath="get_contract_status"/>
<a:model-query defaultWhereClause="t1.contract_id=${/parameter/@contract_id}" fetchAll="true" model="cont.CON_ET001.create_change_req" rootPath="get_contract_division"/>
<a:model-query fetchAll="true" model="cont.CON_ET001.con_asset_fee_calc" rootPath="asset_flag_path" ></a:model-query>
</a:init-procedure>
<a:view>
<a:link id="con_contract_repo_detail_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
......@@ -69,6 +69,13 @@
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_DEDUCTION").style.display = "none";
}
}
//报价中资管费字段为否时,不展示资产管理费字段 18083 2024/1/29
if('${/model/asset_flag_path/record/@hd_user_col_v06}' !='Y'){
if(document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_ASSET_POSSESSION_COST")){
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_ASSET_POSSESSION_COST_prompt").style.display = "none";
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_ASSET_POSSESSION_COST").style.display = "none";
}
}
});
var calc_flag='N';
//新增和加载时调用form
......@@ -186,6 +193,7 @@
record.set('fund_possession_rate', res.result.fund_possession_rate);
record.set('last_rent_due_date',res.result.last_rent_due_date);
record.set('sum_unreceived_principal',res.result.sum_unreceived_principal);
record.set('asset_possession_cost', res.result.asset_possession_cost);
clc_flag = 'N';
},
failure: function () {
......@@ -200,6 +208,7 @@
//record.set('fund_possession_rate','');
record.set('last_rent_due_date','');
record.set('sum_unreceived_principal','');
record.set('asset_possession_cost','');
},
error: function () {
record.set('termination_date','');
......@@ -213,6 +222,7 @@
//record.set('fund_possession_rate','');
record.set('last_rent_due_date','');
record.set('sum_unreceived_principal','');
record.set('asset_possession_cost','');
},
scope: this
});
......@@ -231,6 +241,15 @@
if(sum_unreceived_principal !=0) {
var et_due_amount_result = plus(sum_unreceived_principal, value);
record.set('et_due_amount', et_due_amount_result);
}
//调整资金占用费 18083 2023/2/6
var fund_possession_time = record.get('fund_possession_time')||0;
var btb_int_rate = record.get('btb_int_rate')||0;
var asset_possession_cost_result =value-sum_unreceived_principal*fund_possession_time*btb_int_rate/360;
if(asset_possession_cost_result<0|| asset_possession_cost_result == NaN || asset_possession_cost_result == undefined) {
record.set('asset_possession_cost', 0);
}else{
record.set('asset_possession_cost', asset_possession_cost_result);
}
}
if(name == 'residual_value'&& clc_flag =='N'){
......@@ -693,7 +712,7 @@
$(gridId).hideColumn('lease_name');
$(gridId).hideColumn('machine_number_70');
}
};
}
}
//图片渲染
......
......@@ -7,11 +7,11 @@
-->
<a:screen xmlns:c="leaf.application.action" xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" customizationEnabled="true" trace="true">
<a:init-procedure participants="leaf.service.exception.ExceptionHandler">
<a:model-query defaultWhereClause="d.enabled_flag=&apos;Y&apos; and nvl(d.display_flag,&apos;N&apos;)!=&apos;N&apos;" fetchAll="true" model="hls.HLS500.hls_fin_calc_config_ln" rootPath="calc_config_ln_path"/>
<a:model-query defaultWhereClause="d.enabled_flag=&apos;Y&apos;" fetchAll="true" model="hls.HLS500.hls_fin_calc_config_ln" rootPath="calc_config_ln_all_path"/>
<a:model-query defaultWhereClause="d.enabled_flag=&apos;Y&apos; and nvl(d.display_flag,&apos;N&apos;)!=&apos;N&apos;" fetchAll="true" model="cont.CON_REPO001.hls_fin_calc_config_ln" rootPath="calc_config_ln_path"/>
<a:model-query defaultWhereClause="d.enabled_flag=&apos;Y&apos;" fetchAll="true" model="cont.CON_REPO001.hls_fin_calc_config_ln" rootPath="calc_config_ln_all_path"/>
<a:model-query fetchAll="true" model="hls.HLS500.hls_fin_calc_button" rootPath="calc_button_path"/>
<a:model-query defaultWhereClause="t.enabled_flag=&apos;Y&apos; and (t.display_flag=&apos;Y&apos; or (t.display_flag=&apos;C&apos; and exists(select 1 from hls_fin_calc_config_quote q where q.calc_session_id=${/parameter/@calc_session_id} and q.layout_area_seq=&apos;H&apos; and q.column_name=t.column_name and q.display_flag=&apos;Y&apos;)))" fetchAll="true" model="hls.HLS500N.hls_fin_calc_config_hd_n" rootPath="calc_config_hd_path"/>
<a:model-query defaultWhereClause="t.enabled_flag=&apos;Y&apos; and (t.display_flag=&apos;N&apos; or (t.display_flag=&apos;C&apos; and not exists(select 1 from hls_fin_calc_config_quote q where q.calc_session_id=${/parameter/@calc_session_id} and q.layout_area_seq=&apos;H&apos; and q.column_name=t.column_name and q.display_flag=&apos;Y&apos;)))" fetchAll="true" model="hls.HLS500N.hls_fin_calc_config_hd_n" rootPath="temp_config_hd_path"/>
<a:model-query defaultWhereClause="t.enabled_flag=&apos;Y&apos; and (t.display_flag=&apos;Y&apos; or (t.display_flag=&apos;C&apos; and exists(select 1 from hls_fin_calc_config_quote q where q.calc_session_id=${/parameter/@calc_session_id} and q.layout_area_seq=&apos;H&apos; and q.column_name=t.column_name and q.display_flag=&apos;Y&apos;)))" fetchAll="true" model="cont.CON_REPO001.hls_fin_calc_config_hd_n" rootPath="calc_config_hd_path"/>
<a:model-query defaultWhereClause="t.enabled_flag=&apos;Y&apos; and (t.display_flag=&apos;N&apos; or (t.display_flag=&apos;C&apos; and not exists(select 1 from hls_fin_calc_config_quote q where q.calc_session_id=${/parameter/@calc_session_id} and q.layout_area_seq=&apos;H&apos; and q.column_name=t.column_name and q.display_flag=&apos;Y&apos;)))" fetchAll="true" model="cont.CON_REPO001.hls_fin_calc_config_hd_n" rootPath="temp_config_hd_path"/>
<p:set field="/parameter/@dynamic_base_table" value="HLS_FIN_CALCULATOR_LN_FORMULA"/>
<a:model-query fetchAll="true" model="hls.HLS500N.hls_fin_calculator_common" rootPath="ln_formula_path"/>
<p:set field="/parameter/@dynamic_base_table" value="HLS_FIN_CALCULATOR_HD_FORMULA"/>
......@@ -635,7 +635,7 @@
}, null, null);
} else {
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calc_config_ln/query',
url: '${/request/@context_path}/autocrud/cont.CON_REPO001.hls_fin_calc_config_ln/query',
para: {
calc_session_id: '${/parameter/@calc_session_id}',
column_name: formula_column_name
......@@ -1408,7 +1408,7 @@ debugger;
<a:dataSet id="calc_button_ds">
<a:datas dataSource="/model/calc_button_path"/>
</a:dataSet>
<a:dataSet id="hls_fin_calculator_hd_ds" autoQuery="true" fetchAll="true" model="hls.HLS500N.hls_fin_calc_config_hd_n" processfunction="hls500_hd_process" queryUrl="${/request/@context_path}/autocrud/hls.HLS500N.hls_fin_calc_config_hd_n/query?calc_session_id=${/parameter/@calc_session_id}&amp;enabled_flag=Y&amp;display_flag=Y">
<a:dataSet id="hls_fin_calculator_hd_ds" autoQuery="true" fetchAll="true" model="cont.CON_REPO001.hls_fin_calc_config_hd_n" processfunction="hls500_hd_process" queryUrl="${/request/@context_path}/autocrud/cont.CON_REPO001.hls_fin_calc_config_hd_n/query?calc_session_id=${/parameter/@calc_session_id}&amp;enabled_flag=Y&amp;display_flag=Y">
<a:fields>
<a:field name="column_value" lovGridHeight="350" lovHeight="500" lovWidth="500"/>
<a:field name="column_value_c"/>
......
......@@ -101,7 +101,6 @@
and t.business_type = 'OTHERS'
and t.document_type = 'PUR_ORDER'
and t.division='95'
AND nvl(t.contract_status,'NEW') = 'INCEPT'
AND NOT EXISTS(SELECT 1
FROM csh_payment_req_ln l, csh_payment_req_hd hd
WHERE l.ref_doc_line_id = f.cashflow_id
......@@ -138,9 +137,13 @@
queryExpression="t1.plan_order_date &lt;= ${@plan_order_date_to}"/>
<bm:query-field name="lease_item_amount"
queryExpression="t1.due_amount&gt;=${@lease_item_amount}"/>
<bm:query-field name="vender_con_number" queryExpression="t1.vender_con_number=${@vender_con_number}"/>
<bm:query-field name="bp_id_agent_n" queryExpression="t1.vender_name_n=${@bp_id_agent_n}"/>
<bm:query-field name="vender_name_n" queryExpression="t1.vender_name_n=${@vender_name_n}"/>
<bm:query-field name="invoice_status_n"
queryExpression="t1.invoice_status_n like &apos;%&apos;||${@invoice_status_n}||&apos;%&apos;"/>
<bm:query-field name="contract_number" queryExpression="t1.contract_number=${@contract_number}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="contract_status" expression="(nvl(t1.contract_status,'NEW') = 'INCEPT')"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true">
<a:init-procedure>
</a:init-procedure>
<a:view>
<a:link id="get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="csh501_csh_asset_req_link_id"
url="${/request/@context_path}/modules/csh/CSH501C/csh_payment_asset_req.lview"/>
<script type="text/javascript"><![CDATA[
function detail_link(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var param = {};
param['payment_req_id'] = record.get('payment_req_id');
param['business_type'] = record.get('business_type');
param['approval_status'] = record.get('approval_status');
param['bp_id'] = record.get('bp_id_agent_level1');
if (record.get('approval_status') == 'NEW' || record.get('approval_status') == 'RETURN' || record.get('approval_status') == 'REJECT') {
param['function_usage'] = 'UPDATE';
param['function_code'] = 'CSH501D_ASSET';
} else if(record.get('approval_status') == 'APPROVED'){
param['function_usage'] = 'QUERY';
param['function_code'] = 'CSH501D_ASSET';
param['download'] = 'Y';
} else {
param['function_usage'] = 'QUERY';
param['function_code'] = 'ASSET_SAVE';
param['download'] = 'Y';
}
param['winid'] = 'csh_payment_asset_update_window';
param['url_title'] = '付款申请';
hls_doc_get_layout_code('get_layout_code_link_id', param, 'csh501_csh_asset_req_link_id', ds_id, '${/parameter/@layout_code}');
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'payment_req_number' && value) {
link_function = 'detail_link';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>';
}
return value;
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
aut_authority_list_validate_query(ds, qpara);
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:screen-include
screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=PAYMENT_REQ&amp;function_code=CSH501C"/>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<a:model-update model="hls.HLS811.hls_doc_file_templet_get_atm"/>
<s:server-script import="contract_print_path.js"><![CDATA[
importPackage(java.io);
importPackage(Packages.hls.plugin.docx4j);
importPackage(Packages.leaf.plugin.word2pdf);
importPackage(Packages.org.apache.commons.io);
//删除文件
function deleteFile(filePath) {
var file = new File(filePath);
if (file.exists()) {
file.delete();
}
}
//生成pdf
function wordToPdf(word_file_path,pdf_file_path) {
// word转pdf
var pdf_file_path_new = pdf_file_path + '.pdf';
var wordToPdf = new WordToPdf($instance('uncertain.ocm.IObjectRegistry'), "jacob-1.19-x64.dll");
wordToPdf.word2pdf(word_file_path, pdf_file_path_new);
//删除word文件
//deleteFile(word_file_path);
return pdf_file_path_new;
}
function copyFile(fOld, fNew) {
var fis = new java.io.FileInputStream(fOld);
var fos = new java.io.FileOutputStream(fNew);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 4);
var len = -1;
while ((len = fis.read(b)) != -1) {
fos.write(b, 0, len);
}
fis.close();
fos.close();
}
function transfer(file_path, os) {
println(file_path);
var fis = new FileInputStream(file_path);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function write_os_to_file(file, os) {
var fis = new FileInputStream(file);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function download_file(file_name, file_path) {
$ctx["__request_type__"] = 'file'; //to indicate this request is not a JSON_REQUEST
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(file_name, 'UTF-8'));
var os = resp.getOutputStream();
//transfer(file_path, os);
write_os_to_file(file_path, os);
os.flush();
}
//按日期创建目录
function getDatePath() {
set_parameter_file_path();
var file_path = $ctx.parameter.pdf_path; //file_path = c:/hls_test_files/content_files/
var now = new Date()
y = now.getFullYear()
m = now.getMonth() + 1
m = m < 10 ? "0" + m : m
var datePath = file_path + y + "/" + m + "/";
return datePath; //datePath = d:/hls_test_files/fileupload/2018/04/
}
function collection_create_content() {
try {
var datePath = getDatePath();
FileUtils.forceMkdir(new File(datePath)); //根据日期创建目录
var attachment_batch_dl = $bm('hls.HLS811.hls_doc_file_templet_get_atm');
var result = attachment_batch_dl.queryAsMap({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table,
batch_flag: $ctx.parameter.batch_flag,
content_id: $ctx.parameter.content_id
});
var from_file_data = result.getChildren();
for (var i = 0;i < from_file_data.length;i++) {
if (!$ctx.parameter.file_path) {
set_parameter_file_path();
}
var to_file_path = $ctx.parameter.file_path;
var record_data = from_file_data[i];
//if (record_data.file_exists_flag != 'Y') {
var to_file_name = record_data.to_file_name;
var from_file_path = record_data.file_path;
var guid_file_name_path = $bm('cont.CON500.con_contract_get_guid_file_name').queryAsMap();
var guid_file_name_tables = guid_file_name_path.getChildren();
to_file_path = datePath + guid_file_name_tables[0].guid_file_name + 'doc' + record_data.content_id;
copyFile(from_file_path, to_file_path);
try {
$bm('csh.CSH501.csh_transaction_return_print').update({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table
});
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id.toString(), 'COMMON');
} catch (e) {
raise_app_error(e);
}
// word转pdf
var pdf_file_path=to_file_path;
var outputfilepath = wordToPdf(to_file_path,pdf_file_path);
//var outputfilename= record_data.to_file_name +'.pdf';
var filename_str = record_data.to_file_name;
var outputfilename= filename_str.substr(0, filename_str.length - 5) +'.pdf';
var pdf_file = new File(outputfilepath);
var file_size = 0;
if (pdf_file.exists()) {
file_size = pdf_file.length();
}
$bm('hls.HLS811.hls_file_content_copy_update').update({
table_name: 'HLS_DOC_FILE_CONTENT',
content_id: record_data.content_id,
file_name: outputfilename.toString(),
file_path: outputfilepath.toString(),
source_type: $ctx.parameter.source_type
});
//var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
//HlsFileUtil.downloadFile(encodeURI(to_file_path,'utf-8'),encodeURI(to_file_name,'utf-8'),resp);
//print(outputfilepath.toString());
//print(outputfilename.toString());
download_file(outputfilename.toString(),outputfilepath.toString());
}
$ctx.parameter.return_status = 'S';
$ctx.parameter.return_message = '执行成功';
} catch (e) {
$ctx.success = "true";
$ctx.parameter.return_status = 'E';
$ctx.parameter.return_message = $ctx.get('/error/@message') || String(e);
raise_app_error(e);
}
var result = {
result: $ctx.parameter.return_status,
message: $ctx.parameter.return_message
};
$ctx.parameter.json = JSON.stringify(result);
}
if ($ctx.parameter.return_status != 'E' && $ctx.parameter.return_status != 'TIMEOUT') {
collection_create_content();
}
]]></s:server-script>
</a:init-procedure>
<a:service-output/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2024-1-18 上午09:27:36
$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:init-procedure>
<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'];
]]>
</s:server-script>
<a:model-query fetchAll="true" model="csh.CSH501.get_loan_flag" rootPath="loan_flag_path"/>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="basic.sys_session_info"
rootPath="user_name_path"/>
</a:init-procedure>
<a:view>
<a:link id="csh_payment_req_word_print_link_id"
url="${/request/@context_path}/modules/csh/CSH501C/csh_payment_asset_pdf.lsc"/>
<a:link id="csh501d_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="con_rd_wfl_link" url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<script src="${/request/@context_path}/javascripts/jquery-1.6.4.min.js" type="text/javascript"/>
<a:link id="csh_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="csh_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="csh_invoice_inf_import_link" model="csh.CSH501C.req_acp_inf_import" modelaction="update"/>
<a:link id="csh_invoice_inf_import_total_link" model="csh.CSH501C.req_acp_inf_import_total" modelaction="update"/>
<script type="text/javascript"><![CDATA[
jQuery.noConflict();
//var con_business_type='${/parameter/@con_business_type}'||'${/model/loan_flag_path/record/@business_type}'||'LEASE';
function get_current_amount(amt) {
if (!Ext.isEmpty(amt)) {
return parseFloat(amt).toFixed(2);
} else {
return 0;
}
}
Leaf.onReady(function () {
if ('${/parameter/@source_type}' == 'WFL'||'${/parameter/@source_type}' == 'WFL_N'||'${/parameter/@source_type}' == 'WFL_ACCT') {
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
if('${/parameter/@approval_status}' == 'APPROVED'){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
if(document.getElementById('${/parameter/@layout_code}_exit')){
document.getElementById('${/parameter/@layout_code}_exit').style.display = "none";
}
if(document.getElementById('${/parameter/@layout_code}_submit_approval')){
document.getElementById('${/parameter/@layout_code}_submit_approval').style.display = "none";
}
}
if('${/parameter/@function_usage}' == 'QUERY'){
if($jq('#${/parameter/@layout_code}_AP_INVOICE_DETAIL_G_ADD_layout_dynamic_button_id')){
$jq('#${/parameter/@layout_code}_AP_INVOICE_DETAIL_G_ADD_layout_dynamic_button_id').hide();
}
if($jq('#${/parameter/@layout_code}_AP_INVOICE_DETAIL_G_DELETE_layout_dynamic_button_id')){
$jq('#${/parameter/@layout_code}_AP_INVOICE_DETAIL_G_DELETE_layout_dynamic_button_id').hide();
}
}
//进项发票信息
var first = document.getElementsByClassName("item-input-wrap");
var second = first[5].getElementsByClassName('item-textField');
var third = second[0];
third.setAttribute('placeholder', '注:扫描时请将鼠标光标放在此处。。。');
third.style.backgroundColor = '#FF7744';
});
//form加载
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'], 'csh_payment_req_hd');
if (ds_id == ds.id && ds_id) {
if ('${/parameter/@source_type}' == 'WFL_N') {
record.getField('bp_bank_account_num').setReadOnly(true);
record.getField('bp_bank_account_num_n').setReadOnly(true);
record.getField('req_date').setReadOnly(true);
}
}
}
//grid加载
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
var lnds_id_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
if(lnds_id_ds_id == ds.id &&lnds_id_ds_id){
//代理店节点只能上传附件,不能编辑
if ('${/parameter/@source_type}' == 'WFL_N') {
record.getField('apply_pay_date').setReadOnly(true);
}
if ('${/parameter/@source_type}' != 'WFL_ACCT') {
var gridId= ds.bindname+'_layout_grid_id';
$(gridId).hideColumn('sbo_num');
$(gridId).hideColumn('journal_date');
}
}
}
var dirty_flag = 'N';
window['${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
dirty_flag = 'Y';
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
hd_ds = $(hdds_id);
var hdrecord = hd_ds.getCurrentRecord();
var bp_bank_account_name = hdrecord.get('bp_bank_account_name');
var bp_bank_account_id = hdrecord.get('bp_bank_account_id');
var bp_bank_account_num = hdrecord.get('bp_bank_account_num');
var bp_bank_full_name = hdrecord.get('bp_bank_full_name')
var hd_ds, ln_ds, lineRecords, currency_code, currency_name;
if (hdds_id) {
if((name == 'bp_bank_account_num'||name == 'bp_bank_account_name') && !Ext.isEmpty(hdrecord.get('bp_bank_account_num')) && !Ext.isEmpty(hdrecord.get('bp_bank_account_name'))){
var records = $(lnds_id).getAll();
for (var i = 0; i < records.length; i++) {
records[i].set('bp_bank_account_num', bp_bank_account_num);
records[i].set('bp_bank_full_name', bp_bank_full_name);
records[i].set('bp_bank_account_name', bp_bank_account_name);
records[i].set('bp_bank_account_id', bp_bank_account_id);
}
}
//进项票
var acp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hl_req_payment_acp');
if (name == 'invoice' && value) {
var payment_req_id = hdrecord.get('payment_req_id');
var strs = value.split(',');
var invoice_type = strs[1];
var invoice_code = strs[2];
var invoice_number = strs[3];
var net_amount = strs[4];
var invoice_date = strs[5];
var total_amount =strs[4];
if (strs.length == 9) {
//校验重复发票号码 add by 26887cz 2021-09-07
var acr_records = $(acp_ds_id).getAll();
for (var i = 0; i < acr_records.length; i++) {
if (acr_records[i].get("invoice_number") == invoice_number) {
Leaf.showMessage('提示', '发票号码重复,请重新扫描!');
setTimeout(function () {
record.set('invoice', '');
}, 50);
return;
}
}
Leaf.request({
url: $('csh_invoice_inf_import_link').getUrl(),
para: {
invoice_type: invoice_type,
invoice_code: invoice_code,
invoice_number: invoice_number,
net_amount: net_amount,
invoice_date: invoice_date,
payment_req_id:payment_req_id
},
success: function () {
Leaf.SideBar.show({
msg: '导入成功',
duration: 2000
}
);
setTimeout(function () {
record.set('invoice', '');
}, 50);
$(acp_ds_id).query();
}, failure: function () {
setTimeout(function () {
record.set('invoice', '');
}, 50);
},
error: function () {
setTimeout(function () {
record.set('invoice', '');
}, 50);
},
scope: this
});
} else if (strs.length == 8) {
//校验重复发票号码 add by 26887cz 2021-09-07
var acr_records = $(acp_ds_id).getAll();
for (var i = 0; i < acr_records.length; i++) {
if (acr_records[i].get("invoice_number") == invoice_number) {
Leaf.showMessage('提示', '发票号码重复,请重新扫描!');
setTimeout(function () {
record.set('invoice', '');
}, 50);
return;
}
}
Leaf.request({
url: $('csh_invoice_inf_import_total_link').getUrl(),
para: {
invoice_type: invoice_type,
invoice_code: invoice_code,
invoice_number: invoice_number,
total_amount: total_amount,
invoice_date: invoice_date,
payment_req_id:payment_req_id
},
success: function () {
Leaf.SideBar.show({
msg: '导入成功',
duration: 2000
}
);
setTimeout(function () {
record.set('invoice', '');
}, 50);
$(acp_ds_id).query();
}, failure: function () {
setTimeout(function () {
record.set('invoice', '');
}, 50);
},
error: function () {
setTimeout(function () {
record.set('invoice', '');
}, 50);
},
scope: this
});
} else if (strs.length == 7) {
//校验重复发票号码 add by 26887cz 2021-09-07
var acr_records = $(acp_ds_id).getAll();
for (var i = 0; i < acr_records.length; i++) {
if (acr_records[i].get("invoice_number") == invoice_number) {
Leaf.showMessage('提示', '发票号码重复,请重新扫描!');
setTimeout(function () {
record.set('invoice', '');
}, 50);
return;
}
}
Leaf.request({
url: $('csh_invoice_inf_import_link').getUrl(),
para: {
invoice_type: invoice_type,
invoice_code: invoice_code,
invoice_number: invoice_number,
net_amount: net_amount,
invoice_date: invoice_date,
payment_req_id:payment_req_id
},
success: function () {
Leaf.SideBar.show({
msg: '导入成功',
duration: 2000
}
);
setTimeout(function () {
record.set('invoice', '');
}, 50);
$(acp_ds_id).query();
}, failure: function () {
setTimeout(function () {
record.set('invoice', '');
}, 50);
},
error: function () {
setTimeout(function () {
record.set('invoice', '');
}, 50);
},
scope: this
});
}else {
Leaf.showMessage('提示', '发票信息有错误,请重新扫描!');
setTimeout(function () {
record.set('invoice', '');
}, 50);
}
}
}
};
//新增时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function (ds, record, config_records, bp_seq) {
record.set("created_by_n", '${/model/user_name_path/record/@user_desc}');
record.set("created_by", '${/session/@user_id}');
record.set("update_date", new Date());
};
function csh_payment_req_submit_finally() {
Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS.ARE_YOU_SURE_TO_SUBMIT}', function okFun() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var hd_record = $(ds_id).getCurrentRecord();
var payment_req_id = hd_record.get('payment_req_id');
var line_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var line_record = $(line_ds_id).getAt(0);
Leaf.request({
url: '${/request/@context_path}/autocrud/csh.CSH501C.upd_csh_payment_asset_flag/execute',
para: {
payment_req_id: payment_req_id,
_status: 'execute'
},
success: function (res) {
Leaf.SideBar.enable = true;
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function () {
Leaf.SideBar.enable = true;
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
Leaf.SideBar.enable = true;
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}, function cancelFun() {
Leaf.SideBar.enable = true;
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
});
}
//打印
function csh501_print() {
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var hd_record = $(hdds_id).getCurrentRecord();
var url_l = $('csh_payment_req_word_print_link_id').getUrl() + '?document_id=' + hd_record.get('payment_req_id') + '&document_table=CSH_PAYMENT_REQ_ASSET_HD&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON';
window.open(href = url_l, target = "_self");
}
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () {
Leaf.SideBar.enable = false;
window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](csh_payment_req_submit_finally);
};
window['${/parameter/@layout_code}_print_layout_dynamic_click'] = function () {
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var hd_ds = $(hdds_id),
ln_ds = $(lnds_id);
var hd_record = hd_ds.getCurrentRecord(),
ln_records = ln_ds.getAll();
if (ln_records.length > 0 && !ln_records[0].get('payment_req_ln_id')) {
Leaf.showMessage('${HLS.PROMPT}', '请先保存!');
} else {
csh501_print();
}
};
//保存前调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var check_flag = false;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var ds_line_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
if ($(ds_line_id).data.length <= 0) {
$L.showErrorMessage("错误", '无付款记录,不可提交审批!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
check_flag = false;
return;
}
//确认保存
var hd_record = $(ds_id).getCurrentRecord();
var payment_req_id = hd_record.get('payment_req_id');
if (payment_req_id) {
Leaf.request({
url: $('${/parameter/@layout_code}csh511_csh_payment_req_hd_query').getUrl(),
para: {
payment_req_id: payment_req_id,
},
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if (res.result.record.submitted_flag == 'Y' && '${/parameter/@source_type}' != 'WFL_Y') {
Leaf.showMessage('${l:PROMPT}', '该单据已经提交');
check_flag = false;
} else {
check_flag = true;
}
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
check_flag = false;
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
check_flag = false;
},
sync: true,
scope: this
});
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
} else {
check_flag = true;
}
return check_flag || false;
};
//合同编号超链接
function open_con_contract_readonly_win(record_id, ds_id) {
//创建明细页面根据条件表TBL_LA11字段 function_code、bp_class匹配布局代码layout_code BCML_CONTRACT_NP_MAINTAIN、BCML_CONTRACT_ORG_MAINTAIN
var record = $(ds_id).findById(record_id);
var division = record.get('division');
if (!division) {
division = '${/parameter/@division}';
}
var param = record.data;
param.function_code = 'CON3200Q';
param.division = division;
param.function_usage = 'QUERY';
param.maintain_type = 'QUERY';
param.url_title = '${l:CON301.CONTRACT_DETAIL}';
param.winid = 'con_rd_wfl_link_winid';
hls_doc_get_layout_code('csh501d_get_layout_code_link_id', param, 'con_rd_wfl_link', '', '${/parameter/@layout_code}');
}
//上传附件
function upload_csh_file(id,name,record_id,query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY'){
var url = $('csh_downloadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_ASSET_HD&header_id=' + record_id;
}else{
var url = $('csh_uploadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_ASSET_HD&header_id=' + record_id;
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'csh_attachment_uploadFile_id',
width: 850,
height: 400
});
win.on('close', function () {
//record.ds.query();
});
}
//上传发票附件:用于电子档案
function upload_invoice_file(id,name,record_id,query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY'){
var url = $('csh_downloadFile_id').getUrl() + '?table_name=HL_REQ_PAYMENT_ACP&header_id=' + record_id;
}else{
var url = $('csh_uploadFile_id').getUrl() + '?table_name=HL_REQ_PAYMENT_ACP&header_id=' + record_id;
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'invoice_attachment_uploadFile_id',
width: 850,
height: 400
});
win.on('close', function () {
//record.ds.query();
});
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'contract_number'&& value) {
return '<a href="javascript:open_con_contract_readonly_win(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
}else if (name == 'attach_link'){
return '<a href=javascript:upload_csh_file(\''+record.id+'\',\''+ name + '\',\'' +record.get('payment_req_id')+'\',\'' + config_record.get('query_only')+'\')>附件上传</a>';
}else if (name == 'invoice_link'){
return '<a href=javascript:upload_invoice_file(\''+record.id+'\',\''+ name + '\',\'' +record.get('payment_req_id')+'\',\'' + config_record.get('query_only')+'\')>发票附件上传</a>';
}
};
]]></script>
<a:link id="${/parameter/@layout_code}csh511_csh_payment_req_hd_query" model="csh.CSH511.csh_payment_req_hd"
modelaction="query"/>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: wangwei
$Date: 2023-8-31 上午09:26:12
$Revision: 1.0
$Purpose: 恢复页面至最初用于经营性租赁使用
-->
<a:screen xmlns:c="leaf.application.action" xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" customizationEnabled="true" trace="true">
<a:init-procedure participants="leaf.service.exception.ExceptionHandler">
<a:model-query defaultWhereClause="d.enabled_flag=&apos;Y&apos; and nvl(d.display_flag,&apos;N&apos;)!=&apos;N&apos;" fetchAll="true" model="hls.HLS500.hls_fin_calc_config_ln" rootPath="calc_config_ln_path"/>
<a:model-query defaultWhereClause="d.enabled_flag=&apos;Y&apos;" fetchAll="true" model="hls.HLS500.hls_fin_calc_config_ln" rootPath="calc_config_ln_all_path"/>
<a:model-query fetchAll="true" model="hls.HLS500.hls_fin_calc_button" rootPath="calc_button_path"/>
<a:model-query defaultWhereClause="t.enabled_flag=&apos;Y&apos; and (t.display_flag=&apos;Y&apos; or (t.display_flag=&apos;C&apos; and exists(select 1 from hls_fin_calc_config_quote q where q.calc_session_id=${/parameter/@calc_session_id} and q.layout_area_seq=&apos;H&apos; and q.column_name=t.column_name and q.display_flag=&apos;Y&apos;)))" fetchAll="true" model="hls.HLS500N.hls_fin_calc_config_hd_n" rootPath="calc_config_hd_path"/>
<a:model-query defaultWhereClause="t.enabled_flag=&apos;Y&apos; and (t.display_flag=&apos;N&apos; or (t.display_flag=&apos;C&apos; and not exists(select 1 from hls_fin_calc_config_quote q where q.calc_session_id=${/parameter/@calc_session_id} and q.layout_area_seq=&apos;H&apos; and q.column_name=t.column_name and q.display_flag=&apos;Y&apos;)))" fetchAll="true" model="hls.HLS500N.hls_fin_calc_config_hd_n" rootPath="temp_config_hd_path"/>
<p:set field="/parameter/@dynamic_base_table" value="HLS_FIN_CALCULATOR_LN_FORMULA"/>
<a:model-query fetchAll="true" model="hls.HLS500N.hls_fin_calculator_common" rootPath="ln_formula_path"/>
<p:set field="/parameter/@dynamic_base_table" value="HLS_FIN_CALCULATOR_HD_FORMULA"/>
<a:model-query fetchAll="true" model="hls.HLS500N.hls_fin_calculator_common" rootPath="hd_formula_path"/>
<p:set field="/parameter/@dynamic_base_table" value="null"/>
<a:model-query defaultwhereclause="(d.layout_area_seq = &apos;H&apos;)" fetchAll="true" model="hls.HLS500N.hls_parameter_value_lov_load_n" rootPath="hd_parameter_sql_value"/>
<a:model-query defaultwhereclause="(d.layout_area_seq = &apos;L&apos;)" fetchAll="true" model="hls.HLS500N.hls_parameter_value_lov_load_n" rootPath="ln_parameter_sql_value"/>
<p:exception-handles>
<p:catch Exception="*">
<p:action name="HandleException"/>
<p:action name="CreateErrorResponse"/>
</p:catch>
</p:exception-handles>
</a:init-procedure>
<a:view>
<!-- <a:link id="hls_parameter_value_lov_link" url="${/request/@context_path}/modules/hls/HLS500/hls_parameter_value_lov.lview"/> -->
<a:link id="hls_fin_calculator_price_list" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_price_list_n.lview"/>
<a:link id="hls_fin_calc_update" url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_update.lsc"/>
<a:link id="hls_fin_calculator_update" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_operat_update_n.lview"/>
<a:link id="hls_fin_calc_formula_update" url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_formula_update.lview"/>
<a:link id="hls_fin_calc_quotation_choose_id" url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_quotation_choose.lview"/>
<a:link id="hls_fin_calc_import_line_link_id" url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_import_line.lview"/>
<a:link id="hls_fin_calc_show_display_line_link_id" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calc_show_display_line_n.lview"/>
<style><![CDATA[
.finGrid td[dataindex=percent]{
border-right-color:#FFF;
background-color:#FFF;
border-bottom-color:#FFF;
}
.item-options{
background:#ffffff;
}
.cell-editor{
border:none;
margin-left:3px;
}
]]></style>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<a:screen-include screen="modules/hls/HLS500/hls_fin_calculator_dynamic.lview?calc_session_id=${/parameter/@calc_session_id}&amp;calc_type=CLASSIC_CALCULATOR&amp;document_category=${/parameter/@document_category}&amp;winId=${/parameter/@winId}"/>
<script type="text/javascript"><![CDATA[
var formula_column_name = '';
var formula_column_code = '';
var formula_prompt = '';
var formula_row = '';
var formula_calc_line_id = '';
var recreate_L_formula_value = [];
var recreate_L_formula = '${/parameter/@recreate_L_formula}' || 'N';
var recreate_H_formula = '${/parameter/@recreate_H_formula}' || 'N';
var global_button_code = '';
var global_save_data_first = '';
var global_action_after_button = '';
var global_javascript = '';
var quotation_update_flag = 'N';
var errorColor = {
ERROR: 'FFFF00'
};
var hd_calc_formula_orign_value = [],
hd_calc_orign_value = [],
ln_calc_formula_orign_value = [],
ln_calc_orign_value = [];
Leaf.Masker.mask(document.documentElement, '${l:HLS.LOADING}');
function hls_hls500_save(nextStep, source_procedure) {
lock_calc_current_window('${l:HLS.SAVING}');
if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) {
unlock_calc_current_window();
return;
}
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 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(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);
Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit();
}
function on_hls_fin_cal_save_hd_submitfailed(ds, res) {
unlock_calc_current_window();
}
function hls_hls500_calc() {
lock_calc_current_window('${l:HLS.CALCULATING}');
hls_hls500_save(calc_execute, 'CALC');
}
function hls_hls500_re_calc() {
lock_calc_current_window('${l:HLS.CALCULATING}');
hls_hls500_save(calc_execute, 'RE_CALC');
}
function open_after_save_execute() {
if ('${/parameter/@global_flag}' == 'Y') {
var url = $('hls_fin_calculator_update').getUrl();
var id_num = '${/parameter/@id_num}' * 1 + 1;
var winId = 'global_hls_fin_calculator_update_id' + id_num;
current_win_close();
unlock_calc_current_window();
new Leaf.Window({
id: winId,
params: {
calc_session_id: '${/parameter/@calc_session_id}',
document_id: '${/parameter/@document_id}',
quotation_id: '${/parameter/@quotation_id}',
document_category: '${/parameter/@document_category}',
calc_type: '${/parameter/@calc_type}',
dsId: '${/parameter/@dsId}',
dsId1: '${/parameter/@dsId1}',
winId: winId,
winId1: '${/parameter/@winId1}',
global_flag: 'Y',
id_num: id_num,
recreate_H_formula: recreate_H_formula,
recreate_L_formula: recreate_L_formula
},
url: url,
title: '${l:HLS.FIN_CALCULATOR}',
fullScreen: true
});
} else {
window.location.href = $('hls_fin_calculator_update').getUrl() + '?calc_session_id=' + '${/parameter/@calc_session_id}';
}
}
function calc_execute(source_procedure) {
var final_recreate_H_formula, final_recreate_L_formula;
if (source_procedure == 'RE_CALC') {
final_recreate_H_formula = 'Y';
final_recreate_L_formula = 'Y';
} else {
final_recreate_H_formula = recreate_H_formula;
final_recreate_L_formula = recreate_L_formula;
}
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calculator_calc/update',
para: {
calc_session_id: '${/parameter/@calc_session_id}',
document_id: '${/parameter/@document_id}',
document_category: '${/parameter/@document_category}',
recreate_H_formula: final_recreate_H_formula,
recreate_L_formula: final_recreate_L_formula,
quotation_id: '${/parameter/@quotation_id}'
},
success: function(res) {
on_calc_success_query('${/parameter/@dsId}', '${/parameter/@document_category}');
get_warning_message(res.result.warning_message);
recreate_H_formula = 'N';
recreate_L_formula = 'N';
open_after_save_execute();
},
failure: function() {
unlock_calc_current_window();
},
error: function() {
unlock_calc_current_window();
},
scope: this
});
}
function hls_formatMoney(v, p) {
return Leaf.formatNumber(v, p);
}
function hls_formatMoney_zero_fill(v, p) {
return Leaf.formatNumber(v, p).replace(/0*$/g, '').replace(/\.$/, '');
}
function is_false_return(value) {
if (isNaN(value) && Ext.isDefined(value)) {
if (value.substring(0, 1) == '#') {
return false;
}
} else {
return true;
}
}
function setGridCellStyle(record, name, cls) {
var id = 'hls_fin_calculator_hd_grid_id_' + name + '_' + record.id,
intervalId = setInterval(function() {
var div = Ext.get(id);
if (div) {
if (!div.getBorderWidth('t r b l')) {
div = div.parent();
}
clearInterval(intervalId);
div.dom.className = '';
div.addClass(cls);
}
}, 10);
}
function seedetail_column_hd(value, record, name) {
var field = record.getField(name);
if (field.isRequired()) {
setGridCellStyle(record, name, 'item-notBlank');
} else if (!field.isRequired() && !field.isReadOnly()) {
setGridCellStyle(record, name, 'item-options');
}
if (is_false_return(value) == false) {
return "<div style='background-color:#" + errorColor['ERROR'] + "'>" + value + "</div>";
}
if (record.get('validation_type') == 'NUMBERFIELD' && (value || value === 0)) {
if (record.get('allow_format') == 'TRUE') {
if (record.get('precision')) {
if (record.get('zero_fill') == 'TRUE') {
return hls_formatMoney(value, record.get('precision'));
} else {
return hls_formatMoney_zero_fill(value, record.get('precision'));
}
} else {
return hls_formatMoney(value);
}
} else {
if (record.get('precision') && record.get('allow_decimal') == 'TRUE') {
if (record.get('zero_fill') == 'TRUE') {
return parseFloat(value).toFixed(record.get('precision'));
} else {
return parseFloat(value).toFixed(record.get('precision')).replace(/0*$/g, '').replace(/\.$/, '');
}
} else {
if (record.get('allow_decimal') == 'TRUE') {
return value;
} else {
return parseFloat(parseFloat(value).toFixed(0));
}
}
}
} else if (record.get('validation_type') == 'DATEPICKER') {
return Leaf.formatDate(value);
} else {
return value;
}
}
function wrap_render(value, record, name) {
var editor_record = $('line_attribute_ds').find('column_name', name);
if (editor_record.get('validation_type') == 'NUMBERFIELD' && editor_record.get('input_mode') != 'READONLY' && name != 'times' && editor_record.get('sys_grid_col_underline') == 'Y' && !Ext.isEmpty(value)) {
return '<u>' + seedetail_column_ln(value, record, name) + '</u>';
} else {
return seedetail_column_ln(value, record, name);
}
}
function seedetail_column_ln(value, record, name) {
if (is_false_return(value) == false) {
return "<div style='background-color:#" + errorColor['ERROR'] + "'>" + value + "</div>";
}
var editor_record = $('line_attribute_ds').find('column_name', name);
if (editor_record.get('validation_type') == 'NUMBERFIELD' && (value || value === 0)) {
if (editor_record.get('allow_format') == 'TRUE') {
if (editor_record.get('precision')) {
if (editor_record.get('zero_fill') == 'TRUE') {
return hls_formatMoney(value, editor_record.get('precision'));
} else {
return hls_formatMoney_zero_fill(value, editor_record.get('precision'));
}
} else {
return hls_formatMoney(value);
}
} else {
if (editor_record.get('precision') && editor_record.get('allow_decimal') == 'TRUE') {
if (editor_record.get('zero_fill') == 'TRUE') {
return parseFloat(value).toFixed(editor_record.get('precision'));
} else {
return parseFloat(value).toFixed(editor_record.get('precision')).replace(/0*$/g, '').replace(/\.$/, '');
}
} else {
if (editor_record.get('allow_decimal') == 'TRUE') {
return value;
} else {
return parseFloat(parseFloat(value).toFixed(0));
}
}
}
} else if (editor_record.get('validation_type') == 'DATEPICKER') {
return Leaf.formatDate(value);
} else {
return value;
}
}
function parameter_function(record, name) {
var field = record.getField(name),
ds = $('hls_fin_calculator_hd_ds'),
input_mode = record.get('input_mode');
set_field_input_mode(record, field, name, input_mode);
special_editor_function(ds, record, name);
if (record.get('alignment')) {
Ext.each($('hls_fin_calculator_hd_grid_id').columns, function(c) {
if (c.name == name) {
c.align = record.get('alignment');
}
});
}
if (record.get('validation_type') == 'NUMBERFIELD') {
if (record.get('allow_decimal') == 'TRUE') {
field.setPropertity('allowdecimals', true);
} else {
field.setPropertity('allowdecimals', false);
}
if (record.get('precision') || record.get('precision') == 0) {
field.setPropertity('decimalprecision', record.get('precision'));
}
if (record.get('zero_fill') == 'TRUE') {
field.setPropertity('allowpad', true);
} else {
field.setPropertity('allowpad', false);
}
set_field_limit(record, field);
if (field.get('readonly')) {
return '';
} else {
return 'hls500_hd_numberfield_id';
}
} else if (record.get('validation_type') == 'LOV') {
var documentMapping;
if (record.get('lov_return_vcode') == 'Y') {
documentMapping = [{
from: 'value_code',
to: name
}];
} else {
documentMapping = [{
from: 'value_name',
to: name
}, {
from: 'value_code',
to: name + '_c'
}];
}
var hd_parameter_sql_value_record = $('hd_parameter_sql_value_ds').find('column_code', record.get('column_code'));
field.setLovPara('validation_sql', hd_parameter_sql_value_record.get('validation_sql'));
field.setTitle(record.get('prompt'));
field.setMapping(documentMapping);
field.setLovModel('hls.HLS500.hls_parameters_lov');
if (field.get('readonly')) {
return '';
} else {
return 'hls500_hd_lov_id';
}
} else if (record.get('validation_type') == 'COMBOBOX') {
var combobox_ds = record.get('layout_area_seq') + '_' + record.get('column_name') + '_combobox_ds';
combobox_ds = $(combobox_ds);
field.setOptions(combobox_ds);
combobox_ds.setQueryParameter('validation_sql', record.get('validation_sql'));
var comboBoxMapping;
field.setPropertity('valuefield', 'value_code');
if (record.get('lov_return_vcode') == 'Y') {
field.setPropertity('displayfield', 'value_code');
comboBoxMapping = [{
from: 'value_code',
to: name
}];
} else {
field.setPropertity('displayfield', 'value_name');
comboBoxMapping = [{
from: 'value_code',
to: name + '_c'
}];
}
field.setMapping(comboBoxMapping);
if (field.get('readonly')) {
return '';
} else {
return 'hls500_hd_combobox_id';
}
} else if (record.get('validation_type') == 'TEXTFIELD') {
if (field.get('readonly')) {
return '';
} else {
return 'hls500_hd_textfield_id';
}
} else if (record.get('validation_type') == 'DATEPICKER') {
return 'hls500_hd_datepicker_id';
} else if (record.get('validation_type') == 'CHECKBOX') {
field.setPropertity('checkedvalue', 'Y');
field.setPropertity('uncheckedvalue', 'N');
if (field.get('readonly')) {
return '';
} else {
return 'hls500_hd_checkbox_id';
}
} else if (record.get('validation_type') == 'BOOLEAN_CHECKBOX') {
field.setPropertity('checkedvalue', '1');
field.setPropertity('uncheckedvalue', '0');
if (field.get('readonly')) {
return '';
} else {
return 'hls500_hd_checkbox_id';
}
} else {
return '';
}
}
function do_hls500_column_name(record, name) {
var editor_record = $('line_attribute_ds').find('column_name', name),
field = record.getField(name),
input_mode = editor_record.get('input_mode');
set_field_input_mode(record, field, name, input_mode);
if (editor_record.get('validation_type') == 'NUMBERFIELD') {
if (editor_record.get('allow_decimal') == 'TRUE') {
field.setPropertity('allowdecimals', true);
} else {
field.setPropertity('allowdecimals', false);
}
if (editor_record.get('precision') || editor_record.get('precision') == 0) {
field.setPropertity('decimalprecision', editor_record.get('precision'));
}
if (editor_record.get('zero_fill') == 'TRUE') {
field.setPropertity('allowpad', true);
} else {
field.setPropertity('allowpad', false);
}
set_field_limit(editor_record, field);
if (field.get('readonly')) {
return '';
} else {
if (name == 'times' && (!record.isNew)) {
return '';
}
return 'hls500_ln_numberfield_id';
}
} else if (editor_record.get('validation_type') == 'LOV') {
var documentMapping = [{
from: 'value_code',
to: name
}];
var ln_parameter_sql_value_record = $('ln_parameter_sql_value_ds').find('column_code', editor_record.get('column_code'));
field.setLovPara('validation_sql', ln_parameter_sql_value_record.get('validation_sql'));
field.setTitle(editor_record.get('prompt'));
field.setMapping(documentMapping);
field.setLovModel('hls.HLS500.hls_parameters_lov');
if (field.get('readonly')) {
return '';
} else {
return 'hls500_ln_lov_id';
}
} else if (editor_record.get('validation_type') == 'TEXTFIELD') {
if (field.get('readonly')) {
return '';
} else {
return 'hls500_ln_textfield_id';
}
} else if (editor_record.get('validation_type') == 'DATEPICKER') {
return 'hls500_ln_datepicker_id';
} else if (editor_record.get('validation_type') == 'CHECKBOX') {
field.setPropertity('checkedvalue', 'Y');
field.setPropertity('uncheckedvalue', 'N');
if (field.get('readonly')) {
return '';
} else {
return 'hls500_ln_checkbox_id';
}
} else if (editor_record.get('validation_type') == 'BOOLEAN_CHECKBOX') {
field.setPropertity('checkedvalue', '1');
field.setPropertity('uncheckedvalue', '0');
if (field.get('readonly')) {
return '';
} else {
return 'hls500_ln_checkbox_id';
}
} else {
return '';
}
}
function hls_hls500_add() {
$('hls_fin_calculator_ln_grid_id').showEditorByRecord($('hls_fin_calculator_ln_ds').create(0));
}
function hls_hls500_return() {
if ('${/parameter/@global_flag}' == 'Y') {
current_win_close();
} else {
var url = $('hls_fin_calculator_price_list').getUrl();
window.location.href = url;
}
}
function do_hls500_line_load(ds) {
var lineRecords = ds.getAll();
var attribute_records = $('line_attribute_ds').getAll();
if (!lineRecords) {
return;
}
if ('${/model/calc_config_hd_path/record/@show_column_code}' == 'Y') {
for (var i = 0;i < lineRecords.length;i++) {
var ln_formula_record = $('ln_formula_ds').find('calc_line_id', lineRecords[i].get('calc_line_id'));
for (var j = 0;j < attribute_records.length;j++) {
var column_name = attribute_records[j].get('column_name');
var tooltip_ln_formula = escapeHtml(appendBr(ln_formula_record.get(column_name), 60));
lineRecords[i].getField(column_name).setPropertity('tooltip', tooltip_ln_formula);
}
}
}
}
function do_hls500_line_update(ds, record, name, value, old_value) {
if (quotation_update_flag == 'N') {
quotation_update_flag = 'Y';
}
if (Ext.isEmpty(ln_calc_orign_value[name])) {
ln_calc_orign_value[name] = old_value;
}
var formula_record = $('ln_formula_ds').find('calc_line_id', record.get('calc_line_id'));
if (formula_record) {
if (Ext.isEmpty(ln_calc_formula_orign_value[name])) {
ln_calc_formula_orign_value[name] = formula_record.get(name);
}
if (value == ln_calc_orign_value[name]) {
formula_record.set(name, ln_calc_formula_orign_value[name]);
} else {
formula_record.set(name, value);
}
}
onLineupdate_setEmpty(ds, record, name, value, old_value);
}
function do_hls500_head_update(ds, record, name, value, old_value) {
if (record.get('lov_return_vcode') == 'N' && (record.get('validation_type') == 'COMBOBOX' || record.get('validation_type') == 'LOV')) {
value = record.get('column_value_c');
} else {
if (name == 'column_value') {
record.set('column_value_c', value);
}
}
var column_name = record.get('column_name');
if (Ext.isEmpty(hd_calc_orign_value[column_name])) {
hd_calc_orign_value[column_name] = old_value;
}
if (quotation_update_flag == 'N') {
quotation_update_flag = 'Y';
}
var formula_record = $('hd_formula_ds').getAt(0);
if (Ext.isEmpty(hd_calc_formula_orign_value[column_name])) {
hd_calc_formula_orign_value[column_name] = formula_record.get(column_name);
}
if (value == hd_calc_orign_value[column_name]) {
formula_record.set(column_name, hd_calc_formula_orign_value[column_name]);
} else {
if (record.get('percent') == '%' && !Ext.isEmpty(value)) {
formula_record.set(column_name, div(value, 100));
} else {
formula_record.set(column_name, value);
}
}
if (column_name == 'lease_times' || column_name == 'ccr_outstanding_times') {
if (!recreate_L_formula_value[column_name]) {
recreate_L_formula_value[column_name] = old_value;
}
if (value != recreate_L_formula_value[column_name]) {
recreate_L_formula = 'Y';
} else {
recreate_L_formula = 'N';
}
}
onEditorupdate(ds, record, name, value, old_value);
}
function hls_hls500_formula_change() {
if (!formula_column_name) {
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS500.CHANGE_FORMULA_FIELD}');
return;
}
if (!formula_calc_line_id) {
Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS500.CHANGE_HD_FIELD}' + formula_prompt, function() {
openWindow();
}, function() {
return;
}, null, null);
} else {
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calc_config_ln/query',
para: {
calc_session_id: '${/parameter/@calc_session_id}',
column_name: formula_column_name
},
success: function(res) {
formula_column_code = res.result.record.column_code;
Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS500.CHANGE_LN_FIELD}' + formula_row + '${l:HLS500.LN_FIELD}' + formula_prompt, function() {
openWindow();
}, function() {
return;
}, null, null);
},
scope: this
});
}
}
function hls500_hd_cellcick(grid, row, name, record) {
formula_column_name = record.get('column_name');
formula_column_code = record.get('column_code');
formula_prompt = record.get('prompt');
formula_calc_line_id = '';
formula_row = row;
}
function hls500_ln_cellcick(grid, row, name, record) {
var ln_formula_record = $('line_attribute_ds').find('column_name', name);
formula_column_name = name;
formula_column_code = '';
formula_prompt = ln_formula_record.get('prompt');
formula_calc_line_id = record.get('calc_line_id');
formula_row = row;
}
function openWindow() {
var url = $('hls_fin_calc_formula_update').getUrl();
new Leaf.Window({
id: 'hd_formula_update_winid',
url: url,
params: {
calc_session_id: '${/parameter/@calc_session_id}',
document_id: '${/parameter/@document_id}',
document_category: '${/parameter/@document_category}',
column_name: formula_column_name,
column_code: formula_column_code,
prompt: formula_prompt,
calc_line_id: formula_calc_line_id,
winid: 'hd_formula_update_winid'
},
title: '${l:HLS500.FORMULA_UPDATE}',
height: 300,
width: 400
});
}
function escapeHtml(str) {
if (Ext.isEmpty(str) || !Ext.isString(str)) {
return str;
}
return $L.escapeHtml(str).replace(/&lt;br\/&gt;/gm, '<br/>');
}
function appendBr(s, max) {
if (s) {
for (var i = max || 10;i < s.length;i += max + 5) {
s = s.substr(0, i) + '<br/>' + s.substr(i);
}
return s;
} else {
return '';
}
}
function on_hd_load_last_deal(ds, each_record) {
var value;
if (each_record.get('lov_return_vcode') == 'N' && (each_record.get('validation_type') == 'COMBOBOX' || each_record.get('validation_type') == 'LOV')) {
value = each_record.get('column_value_c');
} else {
value = each_record.get('column_value');
}
onEditor_load_fire(ds, each_record, each_record.get('column_name'), value, null);
}
function onEditorHdload(ds) {
var headRecords = ds.getAll();
if (headRecords[0].get('show_column_code') == 'N') {
$('hls_fin_calculator_hd_grid_id').hideColumn('column_code');
$('hls_fin_calculator_export_grid_id').hideColumn('column_code');
} else {
var hd_formula_record = $('hd_formula_ds').getAt(0);
for (var i = 0;i < headRecords.length;i++) {
var column_name = headRecords[i].get('column_name');
var tooltip_hd_formula = escapeHtml(appendBr(hd_formula_record.get(column_name), 60));
headRecords[i].getField('column_code').setPropertity('tooltip', tooltip_hd_formula);
headRecords[i].getField('prompt').setPropertity('tooltip', tooltip_hd_formula);
headRecords[i].getField('column_value').setPropertity('tooltip', tooltip_hd_formula);
}
}
Ext.each(ds.getAll(), function(each_record) {
each_record.isNew = true;
Ext.iterate(ds.fields, function(key) {
key == 'column_value' && parameter_function(each_record, key);
})
});
Ext.each(ds.getAll(), function(each_record) {
on_hd_load_last_deal(ds, each_record);
});
Ext.each($('temp_hd_attribute_ds').getAll(), function(each_record) {
on_hd_load_last_deal($('temp_hd_attribute_ds'), each_record);
});
Leaf.Masker.unmask(document.documentElement);
}
function hls500_define_button(btn) {
lock_calc_current_window();
global_button_code = btn.id.substring(7);
var button_record = $('calc_button_ds').find('button_code', global_button_code);
global_save_data_first = button_record.get('save_data_first');
global_action_after_button = button_record.get('action_after_button');
global_javascript = button_record.get('javascript');
if (Ext.isDefined(global_javascript)) {
if (global_save_data_first == 'Y') {
hls_hls500_save(hls500_define_button_js);
} else {
hls500_define_button_js();
}
} else {
if (global_save_data_first == 'Y') {
hls_hls500_save(hls500_define_button_execute);
} else {
hls500_define_button_execute();
}
}
}
function hls500_action_after_button() {
if (global_action_after_button == 'EXIT') {
hls_hls500_return();
} else if (global_action_after_button == 'QUERY') {
open_after_save_execute();
}
}
function hls500_define_button_js() {
// if (window.execScript) {
// window.execScript(global_javascript);
// } else {
eval(global_javascript);
// }
unlock_calc_current_window();
hls500_action_after_button();
}
function hls500_define_button_execute() {
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calc_user_define_btn/update',
para: {
calc_session_id: '${/parameter/@calc_session_id}',
button_code: global_button_code,
document_id: '${/parameter/@document_id}',
document_category: '${/parameter/@document_category}'
},
success: function(res) {
parent.Leaf.SideBar.show({
html: '<div style="background-color:#ccfbd5;position:absolute;padding:3px;border:1px solid #009900">' + res.result.return_value + '</div>',
duration: 5000
});
unlock_calc_current_window();
hls500_action_after_button();
},
failure: function() {
unlock_calc_current_window();
},
error: function() {
unlock_calc_current_window();
},
scope: this
});
}
function hls500_hd_process(datas) {
for (var i = 0;i < datas.length;i++) {
var temp = datas[i];
if (temp.data['validation_type'] == 'NUMBERFIELD') {
temp.data['column_value'] = isNaN(temp.data['column_value']) == true ? temp.data['column_value'] : parseFloat(parseFloat(temp.data['column_value']).toFixed(temp.data['precision']));
}
}
return datas;
}
function hls500_hd_formula_process(datas) {
for (var i = 0;i < datas.length;i++) {
var temp = datas[i];
if (Ext.isDefined(temp.data)) {
temp = temp.data;
}
for (var name in temp) {
var temp_record = $('hd_attribute_ds').find('column_name', name);
if (temp_record) {
if (temp_record.get('validation_type') == 'NUMBERFIELD') {
temp[name] = isNaN(temp[name]) == true ? temp[name] : parseFloat(parseFloat(temp[name]).toFixed(temp_record.get('precision')));
}
}
}
}
return datas;
}
function hls500_ln_process(datas) {
for (var i = 0;i < datas.length;i++) {
var temp = datas[i];
for (var name in temp.data) {
var temp_record = $('line_attribute_ds').find('column_name', name);
if (temp_record) {
if (temp_record.get('validation_type') == 'NUMBERFIELD') {
temp.data[name] = isNaN(temp.data[name]) == true ? temp.data[name] : parseFloat(parseFloat(temp.data[name]).toFixed(temp_record.get('precision')));
}
}
}
}
return datas;
}
function hls500_ln_formula_process(datas) {
for (var i = 0;i < datas.length;i++) {
var temp = datas[i];
if (Ext.isDefined(temp.data)) {
temp = temp.data;
}
for (var name in temp) {
var temp_record = $('line_attribute_ds').find('column_name', name);
if (temp_record) {
if (temp_record.get('validation_type') == 'NUMBERFIELD') {
temp[name] = isNaN(temp[name]) == true ? temp[name] : parseFloat(parseFloat(temp[name]).toFixed(temp_record.get('precision')));
}
}
}
}
return datas;
}
function hls_hls500_delete() {
$('hls_hls500_delete_id').disable();
var records = $('hls_fin_calculator_ln_ds').getSelected();
if (!records.length) {
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.SELECT_RECORD}');
$('hls_hls500_delete_id').enable();
return;
}
var saveData = [];
for (var i = 0;i < records.length;i++) {
records[i].set('_status', 'delete');
records[i].set('document_id', '${/parameter/@document_id}');
records[i].set('document_category', '${/parameter/@document_category}');
saveData.push(records[i].data);
}
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calc_delete_ln/batch_update',
para: saveData,
success: function() {
success_sidebar_show();
$('hls_fin_calculator_ln_grid_id').clear();
$('hls_hls500_delete_id').enable();
},
failure: function() {
$('hls_hls500_delete_id').enable();
},
error: function() {
$('hls_hls500_delete_id').enable();
},
scope: this
});
}
function hls_hls500_quotation() {
if (quotation_update_flag == 'Y') {
Leaf.showMessage('${l:PROMPT}', '${l:HLS500.QUOTATION_CALC_FIRST}');
return;
}
if ('${/parameter/@global_flag}' == 'Y') {
lock_calc_current_window('${l:HLS.SAVING}');
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_quotation_save/insert',
para: {
calc_session_id: '${/parameter/@calc_session_id}',
document_id: '${/parameter/@document_id}',
document_category: '${/parameter/@document_category}'
},
success: function() {
$('${/parameter/@dsId}').query();
if ('${/parameter/@quotation_id}') {
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_choose_winid',
params: {
quotation_id: '${/parameter/@quotation_id}',
document_id: '${/parameter/@document_id}',
document_category: '${/parameter/@document_category}',
dsId: '${/parameter/@dsId}',
dsId1: '${/parameter/@dsId1}',
winId: '${/parameter/@winId}',
winId1: '${/parameter/@winId1}'
},
url: $('hls_fin_calc_quotation_choose_id').getUrl(),
title: '${l:PROMPT}',
height: 200,
width: 400
});
win.on('close', function() {
unlock_calc_current_window();
});
} else {
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
}
unlock_calc_current_window();
},
failure: function() {
unlock_calc_current_window();
},
error: function() {
unlock_calc_current_window();
},
scope: this
});
}
}
function hls_hls500_export() {
$('hls_fin_calculator_export_ds').query();
function on_hls_fin_calculator_export_load() {
$('hls_fin_calculator_export_grid_id')._export();
$('hls_fin_calculator_export_ds').un('load', on_hls_fin_calculator_export_load);
}
$('hls_fin_calculator_export_ds').on('load', on_hls_fin_calculator_export_load);
}
function hd_grid_rowrenderer() {
return 'background-color:#f3f3f3';
}
function do_hls500_line_remove(ds, record, index) {
var formula_record = $('ln_formula_ds').find('calc_line_id', record.get('calc_line_id'));
$('ln_formula_ds').remove(formula_record);
}
function hls_hls500_restructure() {
lock_calc_current_window('${l:HLS.CALCULATING}');
var win = Leaf.showConfirm('${l:PROMPT}', '${l:HLS.SAVE_FIRST}', function() {
hls_hls500_save(hls_hls500_restructure_execute);
}, function() {
hls_hls500_restructure_execute()
}, null, null);
win.on('close', function() {
unlock_calc_current_window();
});
}
function hls_hls500_restructure_execute() {
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calc_structure_execute/update',
para: {
calc_session_id: '${/parameter/@calc_session_id}'
},
success: function() {
open_after_save_execute();
},
failure: function() {
unlock_calc_current_window();
},
error: function() {
unlock_calc_current_window();
},
scope: this
});
}
Leaf.onReady(function() {
Ext.fly('hls_fin_calculator_export_grid_id_wrap').setStyle({
display: 'none'
});
});
function hls_hls500_import() {
$('hls_hls500_import_id').disable();
hls_hls500_save(hls_hls500_import_detail);
}
function hls_hls500_import_detail() {
$('hls_hls500_import_id').disable();
unlock_calc_current_window();
var win = new Leaf.Window({
id: 'upload_handle_window',
params: {
calc_session_id: '${/parameter/@calc_session_id}',
parent_winId: '${/parameter/@winId}',
winId: 'upload_handle_window',
document_id: '${/parameter/@document_id}',
document_category: '${/parameter/@document_category}',
calc_type: '${/parameter/@calc_type}',
global_flag: '${/parameter/@global_flag}'
},
url: $('hls_fin_calc_import_line_link_id').getUrl(),
title: '${l:HLS.IMPORT}',
width: 420,
height: 275
});
win.on('close', function() {
$('hls_hls500_import_id').enable();
});
}
function hls_hls500_show_col(btn) {
$('hls_hls500_show_col_id').disable();
var win = new Leaf.Window({
id: 'show_col_window_id',
params: {
calc_session_id: '${/parameter/@calc_session_id}',
calc_grid_id: 'hls_fin_calculator_ln_grid_id',
calc_export_grid_id: 'hls_fin_calculator_export_grid_id',
winid: 'show_col_window_id'
},
url: $('hls_fin_calc_show_display_line_link_id').getUrl(),
title: btn.el.dom['innerText'],
width: 530,
height: 500
});
win.on('close', function() {
$('hls_hls500_show_col_id').enable();
});
}
function sum_name_in(name) {
var config = ['rental', 'principal', 'interest', 'vat_interest', 'ln_user_col_n03', 'btb_repayment', 'btb_principal', 'btb_interest', 'ln_user_col_n05', 'btb_vat_interest', 'btb_fee', 'btb_fee_pv', 'ln_user_col_n06', 'other_payment', 'other_payment2'];
for (var i = 0;i < config.length;i++) {
if (config[i] == name) {
return true;
}
}
return false;
}
function sum_zero_time_in(name) {
var config = ['ln_user_col_n03', 'ln_user_col_n06', 'other_payment', 'other_payment2'];
for (var i = 0;i < config.length;i++) {
if (config[i] == name) {
return true;
}
}
return false;
}
function calc_sumfunction(datas, name) {
if (sum_name_in(name)) {
var sum = 0;
for (var i = 0;i < datas.length;i++) {
var r = datas[i];
var d = r.get(name);
if (r.get('times') === 0 && !sum_zero_time_in(name)) {
d = 0;
}
var n = parseFloat(d);
if (!isNaN(n)) {
sum = plus(sum, n);
}
}
var total = (typeof(sum) == 'undefined' ? '' : parseFloat(sum));
return '<font>' + Leaf.formatNumber(total) + '</font>';
} else {
return '';
}
}
]]></script>
<a:dataSets>
<a:placeHolder id="dynamicDataSet_left_id"/>
<a:dataSet id="hls_dynamiclinefields_ds" autoCreate="true">
<a:fields>
<a:placeHolder id="dynamicLineFields"/>
</a:fields>
</a:dataSet>
<a:dataSet id="line_attribute_ds">
<a:datas dataSource="/model/calc_config_ln_path"/>
</a:dataSet>
<a:dataSet id="line_field_ds">
<a:datas dataSource="/model/calc_config_ln_all_path"/>
</a:dataSet>
<a:dataSet id="temp_hd_attribute_ds">
<a:datas dataSource="/model/temp_config_hd_path"/>
<a:events>
<a:event name="update" handler="do_hls500_head_update"/>
</a:events>
</a:dataSet>
<a:dataSet id="hd_parameter_sql_value_ds">
<a:datas dataSource="/model/hd_parameter_sql_value"/>
</a:dataSet>
<a:dataSet id="ln_parameter_sql_value_ds">
<a:datas dataSource="/model/ln_parameter_sql_value"/>
</a:dataSet>
<a:dataSet id="hd_attribute_ds">
<a:datas dataSource="/model/calc_config_hd_path"/>
</a:dataSet>
<a:dataSet id="hls_fin_cal_save_hd_ds" autoCreate="true" submitUrl="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calc_save_n.lsc?base_table=HLS_FIN_CALCULATOR_HD&amp;calc_session_id=${/parameter/@calc_session_id}">
<a:fields>
<a:field name="calc_session_id" defaultValue="${/parameter/@calc_session_id}"/>
</a:fields>
</a:dataSet>
<a:dataSet id="ln_formula_ds" bindName="ln_calc_formula_bind_name" bindTarget="hls_fin_cal_save_hd_ds" processfunction="hls500_ln_formula_process" queryUrl="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_base_query.lsc?calc_session_id=${/parameter/@calc_session_id}&amp;ln_formula_table_flag=Y">
<a:datas dataSource="/model/ln_formula_path"/>
</a:dataSet>
<a:dataSet id="hd_formula_ds" bindName="hd_calc_formula_bind_name" bindTarget="hls_fin_cal_save_hd_ds" processfunction="hls500_hd_formula_process">
<a:datas dataSource="/model/hd_formula_path"/>
</a:dataSet>
<a:dataSet id="calc_button_ds">
<a:datas dataSource="/model/calc_button_path"/>
</a:dataSet>
<a:dataSet id="hls_fin_calculator_hd_ds" autoQuery="true" fetchAll="true" model="hls.HLS500N.hls_fin_calc_config_hd_n" processfunction="hls500_hd_process" queryUrl="${/request/@context_path}/autocrud/hls.HLS500N.hls_fin_calc_config_hd_n/query?calc_session_id=${/parameter/@calc_session_id}&amp;enabled_flag=Y&amp;display_flag=Y">
<a:fields>
<a:field name="column_value" lovGridHeight="350" lovHeight="500" lovWidth="500"/>
<a:field name="column_value_c"/>
</a:fields>
<a:events>
<a:event name="update" handler="do_hls500_head_update"/>
<a:event name="load" handler="onEditorHdload"/>
</a:events>
</a:dataSet>
<a:dataSet id="hls_fin_calculator_ln_ds" autoQuery="true" bindName="ln_calc_bind_name" bindTarget="hls_fin_cal_save_hd_ds" fetchAll="true" processfunction="hls500_ln_process" queryUrl="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_base_query.lsc?calc_session_id=${/parameter/@calc_session_id}&amp;ln_table_flag=Y" selectable="true">
<a:events>
<a:event name="load" handler="do_hls500_line_load"/>
<a:event name="update" handler="do_hls500_line_update"/>
<a:event name="remove" handler="do_hls500_line_remove"/>
</a:events>
</a:dataSet>
<a:dataSet id="hls_fin_calculator_export_ds" fetchAll="true" queryUrl="${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calculator_export/query?calc_session_id=${/parameter/@calc_session_id}"/>
</a:dataSets>
<a:screenBody padding="0" style="margin:3px">
<a:vBox padding="0" style="border:1px solid #ccc;">
<a:screenTopToolbar style="height:40px;padding:0;border-bottom-color:#000;">
<div style="font-size:15px;margin:10px 5px 0 5px"><![CDATA[${l:HLS.FIN_CALCULATOR}]]></div>
<a:placeHolder id="hls500_button_ds"/>
</a:screenTopToolbar>
<a:hBox padding="0" style="padding:3px">
<a:grid id="hls_fin_calculator_hd_grid_id" bindTarget="hls_fin_calculator_hd_ds" marginHeight="140" rowRenderer="hd_grid_rowrenderer" style="margin-right:3px" width="${/model/calc_config_hd_path/record/@grid_left_width}">
<a:columns>
<a:column name="column_code" align="left" autoAdjust="false" prompt="HLS050.HLS_FIN_CALC_CONFIG.COLUMN_CODE" width="40"/>
<a:column name="prompt" align="right" autoAdjust="false" prompt="HLS500.PROMPT" width="110"/>
<a:column name="column_value" autoAdjust="false" editorFunction="parameter_function" prompt="HLS500.PROMPT_VALUE" renderer="seedetail_column_hd" showtitle="${/model/calc_config_hd_path/record/@sys_grid_show_title}" width="110"/>
<a:column name="percent" autoAdjust="false" width="19"/>
</a:columns>
<a:editors>
<a:numberField id="hls500_hd_numberfield_id"/>
<a:lov id="hls500_hd_lov_id">
<a:events>
<a:event name="beforecommit" handler="on_object_hd_calc_beforecommit"/>
<a:event name="focus" handler="on_object_hd_calc_focus"/>
</a:events>
</a:lov>
<a:textField id="hls500_hd_textfield_id"/>
<a:datePicker id="hls500_hd_datepicker_id"/>
<a:checkBox id="hls500_hd_checkbox_id"/>
<a:comboBox id="hls500_hd_combobox_id">
<a:events>
<a:event name="focus" handler="on_object_hd_calc_focus"/>
</a:events>
</a:comboBox>
</a:editors>
<a:events>
<a:event name="cellclick" handler="hls500_hd_cellcick"/>
</a:events>
</a:grid>
<a:grid id="hls_fin_calculator_ln_grid_id" bindTarget="hls_fin_calculator_ln_ds" marginHeight="140" marginWidth="${/model/calc_config_hd_path/record/@grid_margin_width}">
<a:columns>
<a:placeHolder id="dynamicLineColumn_id"/>
</a:columns>
<a:editors>
<a:numberField id="hls500_ln_numberfield_id"/>
<a:lov id="hls500_ln_lov_id">
<a:events>
<a:event name="beforecommit" handler="on_object_ln_calc_beforecommit"/>
<a:event name="focus" handler="on_object_ln_calc_focus"/>
</a:events>
</a:lov>
<a:textField id="hls500_ln_textfield_id"/>
<a:datePicker id="hls500_ln_datepicker_id"/>
<a:checkBox id="hls500_ln_checkbox_id"/>
</a:editors>
<a:events>
<a:event name="cellclick" handler="hls500_ln_cellcick"/>
</a:events>
</a:grid>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function(){
var records=$('line_field_ds').getAll();
if(records.length){
for(var i=0;i<records.length;i++){
var record=records[i],column_name=record.get('column_name');
if(record.get('display_flag')=='C'){
$('hls_fin_calculator_ln_grid_id').hideColumn(column_name);
$('hls_fin_calculator_export_grid_id').hideColumn(column_name);
}
}
}
});
]]></script>
</a:hBox>
</a:vBox>
<a:grid id="hls_fin_calculator_export_grid_id" bindTarget="hls_fin_calculator_export_ds" height="350" width="900">
<a:columns>
<a:column name="prompt" align="right" autoAdjust="false" lock="true" prompt="HLS500.PROMPT" width="100"/>
<a:column name="column_value" autoAdjust="false" editorFunction="parameter_function" lock="true" prompt="HLS500.PROMPT_VALUE" renderer="seedetail_column_hd" showtitle="true"/>
<a:column name="percent" autoAdjust="false" lock="true" prompt=" " width="19"/>
<a:placeHolder id="dynamicLineColumn_export_id"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
<a:view-config>
<c:create-config targetId="dynamicDataSet_left_id">
<p:loop source="/model/calc_config_hd_path">
<p:switch test="@validation_type">
<p:case value="COMBOBOX">
<c:process-config>
<a:dataSet id="${@layout_area_seq}_${@column_name}_combobox_ds" queryUrl="${/request/@context_path}/autocrud/hls.HLS500.hls_parameters_lov/query"/>
</c:process-config>
</p:case>
</p:switch>
</p:loop>
</c:create-config>
<c:create-config targetId="hls500_button_ds">
<p:loop source="/model/calc_button_path">
<p:switch test="@button_code">
<p:case value="EXIT">
<c:process-config>
<a:gridButton click="hls_hls500_return" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="ADD_LN">
<c:process-config>
<a:gridButton id="hls_hls500_add_id" click="hls_hls500_add" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="DEL_LN">
<c:process-config>
<a:gridButton id="hls_hls500_delete_id" click="hls_hls500_delete" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="SAVE">
<c:process-config>
<a:gridButton id="hls_hls500_save_id" click="hls_hls500_save" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="MODF_FORMULA">
<c:process-config>
<a:gridButton id="hls_hls500_formula_id" click="hls_hls500_formula_change" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="CALC">
<c:process-config>
<a:gridButton id="hls_hls500_calc_id" click="hls_hls500_calc" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="RE_CALC">
<c:process-config>
<a:gridButton id="hls_hls500_re_calc_id" click="hls_hls500_re_calc" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="SAVE_QUOTATION">
<c:process-config>
<a:gridButton id="hls_hls500_quotation_id" click="hls_hls500_quotation" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="EXPORT">
<c:process-config>
<a:gridButton id="hls_hls500_export_id" click="hls_hls500_export" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="IMPORT">
<c:process-config>
<a:gridButton id="hls_hls500_import_id" click="hls_hls500_import" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="RESTRUCTURE">
<c:process-config>
<a:gridButton id="hls_hls500_restructure_id" click="hls_hls500_restructure" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="SHOW_COL">
<c:process-config>
<a:gridButton id="hls_hls500_show_col_id" click="hls_hls500_show_col" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="*">
<c:process-config>
<a:gridButton id="hls500_${@button_code}" click="hls500_define_button" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
</p:switch>
</p:loop>
</c:create-config>
<c:create-config targetId="dynamicLineColumn_id">
<p:loop source="/model/calc_config_ln_path">
<p:switch test="@show_column_code">
<p:case value="Y">
<c:process-config>
<a:column lock="${@lock_column}" prompt="${@column_code}" width="${@width}">
<a:column name="${@column_name}" align="${@alignment}" editorFunction="do_hls500_column_name" exportDatatype="${@data_type}" footerRenderer="calc_sumfunction" lock="${@lock_column}" prompt="${@prompt}" renderer="wrap_render" showtitle="${@sys_grid_show_title}" width="${@width}"/>
</a:column>
</c:process-config>
</p:case>
<p:case value="N">
<c:process-config>
<a:column name="${@column_name}" align="${@alignment}" editorFunction="do_hls500_column_name" exportDatatype="${@data_type}" footerRenderer="calc_sumfunction" lock="${@lock_column}" prompt="${@prompt}" renderer="wrap_render" showtitle="${@sys_grid_show_title}" width="${@width}"/>
</c:process-config>
</p:case>
</p:switch>
</p:loop>
</c:create-config>
<c:create-config targetId="dynamicLineColumn_export_id">
<p:loop source="/model/calc_config_ln_path">
<c:process-config>
<a:column lock="${@lock_column}" prompt="${@upper_column_name}" width="${@width}">
<a:column name="${@column_name}" align="${@alignment}" editorFunction="do_hls500_column_name" exportDatatype="${@data_type}" lock="${@lock_column}" prompt="${@prompt}" renderer="wrap_render" showtitle="${@sys_grid_show_title}" sortable="true" width="${@width}"/>
</a:column>
</c:process-config>
</p:loop>
</c:create-config>
<c:create-config targetId="dynamicLineFields">
<p:loop source="/model/calc_config_ln_all_path">
<c:process-config>
<a:field name="${@column_name}" defaultValue="${@default_value}" lovGridHeight="350" lovHeight="500" lovWidth="500"/>
</c:process-config>
</p:loop>
</c:create-config>
</a:view-config>
</a:screen>
......@@ -899,7 +899,9 @@
$L.Masker.mask(Ext.getBody(), '正在执行......');
$L.request({
url: $('csh_check_acr_link').getUrl(),
para: {},
para: {
csh_date: record.get('csh_date')
},
success: function (args) {
$L.Masker.unmask(Ext.getBody());
if (args.result.p_err_msg) {
......
......@@ -184,7 +184,7 @@
//add by chenlingfeng 在没有传document_category和document_id的情况下
if( !check_document_category){
if(dynamic_source_table == 'PRJ_PROJECT'||dynamic_source_table == 'prj_project'){
if(!check_document_category){
if(!check_document_category && $ctx.parameter.layout_code!='PUR_ORDER_DETEAIL'){
check_document_category ='PROJECT';
}
}
......
......@@ -821,7 +821,7 @@
$(prj_quotation_ds_id).getAt(0).set('deposit', data.result.record['deposit']);
$(prj_quotation_ds_id).getAt(0).set('lease_term_month', data.result.record['lease_term_month']);
$(prj_quotation_ds_id).getAt(0).set('total_rental', data.result.record['total_rental']);
$(prj_quotation_ds_id).getAt(0).set('lease_times', data.result.record['lease_times']);
//$(prj_quotation_ds_id).getAt(0).set('lease_times', data.result.record['lease_times']);
}
......
......@@ -736,7 +736,7 @@
$(prj_quotation_ds_id).getAt(0).set('deposit', data.result.record['deposit']);
$(prj_quotation_ds_id).getAt(0).set('lease_term_month', data.result.record['lease_term_month']);
$(prj_quotation_ds_id).getAt(0).set('total_rental', data.result.record['total_rental']);
$(prj_quotation_ds_id).getAt(0).set('lease_times', data.result.record['lease_times']);
//$(prj_quotation_ds_id).getAt(0).set('lease_times', data.result.record['lease_times']);
}
......
......@@ -721,7 +721,7 @@
$(prj_quotation_ds_id).getAt(0).set('deposit', data.result.record['deposit']);
$(prj_quotation_ds_id).getAt(0).set('lease_term_month', data.result.record['lease_term_month']);
$(prj_quotation_ds_id).getAt(0).set('total_rental', data.result.record['total_rental']);
$(prj_quotation_ds_id).getAt(0).set('lease_times', data.result.record['lease_times']);
//$(prj_quotation_ds_id).getAt(0).set('lease_times', data.result.record['lease_times']);
}
......
......@@ -23,6 +23,23 @@
<a:case value="Y">
<a:screen-include screen="${/model/workflow_service_record/record/@service_url_constru}"/>
</a:case>
<a:case value="N">
<a:switch test="/model/node_service_record/record/@division">
<a:case value="95">
<a:screen-include screen="${/model/workflow_service_record/record/@service_url_operat}"/>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/workflow_service_record/record/@service_url}"/>
</a:case>
</a:switch>
</a:case>
</a:switch>
</a:case>
<a:case value="DCFL_CSH_PAYMENT_REQ">
<a:switch test="/model/node_service_record/record/@payment_division">
<a:case value="95">
<a:screen-include screen="${/model/workflow_service_record/record/@service_url_operat_payment}"/>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/workflow_service_record/record/@service_url}"/>
</a:case>
......
......@@ -23,6 +23,23 @@
<a:case value="Y">
<a:screen-include screen="${/model/submiter_ht_wfl_service/record/@service_url_constru}"/>
</a:case>
<a:case value="N">
<a:switch test="/model/node_service_info/record/@division">
<a:case value="95">
<a:screen-include screen="${/model/submiter_ht_wfl_service/record/@service_url_operat}"/>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/submiter_ht_wfl_service/record/@service_url}"/>
</a:case>
</a:switch>
</a:case>
</a:switch>
</a:case>
<a:case value="DCFL_CSH_PAYMENT_REQ">
<a:switch test="/model/node_service_info/record/@payment_division">
<a:case value="95">
<a:screen-include screen="${/model/submiter_ht_wfl_service/record/@service_url_operat_payment}"/>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/submiter_ht_wfl_service/record/@service_url}"/>
</a:case>
......@@ -31,6 +48,9 @@
<a:case value="*">
<a:screen-include screen="${/model/submiter_ht_wfl_service/record/@service_url}"/>
</a:case>
<a:case value="OL_PROCURE_WFL">
<a:screen-include screen="${/model/submiter_ht_wfl_service/record/@service_url_purchase}"/>
</a:case>
</a:switch>
</a:case>
</a:switch>
......
......@@ -45,6 +45,23 @@
<a:switch test="/model/node_service_info/record/@is_constru_unit">
<a:case value="Y">
<a:screen-include screen="${/model/approver_ht_node_service/record/@service_url_constru}"/>
</a:case>
<a:case value="N">
<a:switch test="/model/node_service_info/record/@division">
<a:case value="95">
<a:screen-include screen="${/model/approver_ht_node_service/record/@service_url_constru}"/>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/approver_ht_node_service/record/@service_url}"/>
</a:case>
</a:switch>
</a:case>
</a:switch>
</a:case>
<a:case value="DCFL_CSH_PAYMENT_REQ">
<a:switch test="/model/node_service_info/record/@payment_division">
<a:case value="95">
<a:screen-include screen="${/model/approver_ht_node_service/record/@service_url_operat_payment}"/>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/approver_ht_node_service/record/@service_url}"/>
......
......@@ -343,6 +343,23 @@
<a:case value="Y">
<a:screen-include screen="${/model/node_service_record/record/@service_url_constru}&amp;winid=zj_wfl_approve_win&amp;instance_id=${/parameter/@instance_id}"/>
</a:case>
<a:case value="N">
<a:switch test="/model/node_info_record/record/@division">
<a:case value="95">
<a:screen-include screen="${/model/node_service_record/record/@service_url_operat}&amp;winid=zj_wfl_approve_win&amp;instance_id=${/parameter/@instance_id}"/>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/node_service_record/record/@service_url}&amp;winid=zj_wfl_approve_win&amp;instance_id=${/parameter/@instance_id}"/>
</a:case>
</a:switch>
</a:case>
</a:switch>
</a:case>
<a:case value="DCFL_CSH_PAYMENT_REQ">
<a:switch test="/model/node_info_record/record/@payment_division">
<a:case value="95">
<a:screen-include screen="${/model/node_service_record/record/@service_url_operat_payment}&amp;winid=zj_wfl_approve_win&amp;instance_id=${/parameter/@instance_id}"/>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/node_service_record/record/@service_url}&amp;winid=zj_wfl_approve_win&amp;instance_id=${/parameter/@instance_id}"/>
</a:case>
......
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