Commit 6a9c2afa authored by Spencer Chang's avatar Spencer Chang

Merge remote-tracking branch 'origin/develop' into develop

parents 9472f8ef 337b33c6
...@@ -18,6 +18,7 @@ sys_code_pkg.insert_sys_code_value('CONFIRMED_FLAG','MKTAUDITING','营业新增 ...@@ -18,6 +18,7 @@ sys_code_pkg.insert_sys_code_value('CONFIRMED_FLAG','MKTAUDITING','营业新增
sys_code_pkg.insert_sys_code_value('CONFIRMED_FLAG','ACCAUDITING','会计新增确认中','ZHS',''); sys_code_pkg.insert_sys_code_value('CONFIRMED_FLAG','ACCAUDITING','会计新增确认中','ZHS','');
sys_code_pkg.insert_sys_code_value('CONFIRMED_FLAG','CANCELLED','已作废','ZHS',''); sys_code_pkg.insert_sys_code_value('CONFIRMED_FLAG','CANCELLED','已作废','ZHS','');
sys_code_pkg.insert_sys_code_value('CONFIRMED_FLAG','RETURNED','已退款','ZHS',''); sys_code_pkg.insert_sys_code_value('CONFIRMED_FLAG','RETURNED','已退款','ZHS','');
sys_code_pkg.insert_sys_code_value('CONFIRMED_FLAG','DEBTAUDITING','债权新增确认中','ZHS','');
sys_code_pkg.delete_sys_code('PAID_BYOTHER_FLAG'); sys_code_pkg.delete_sys_code('PAID_BYOTHER_FLAG');
sys_code_pkg.insert_sys_code('PAID_BYOTHER_FLAG', '代付', '代付', '代付', 'ZHS', ''); sys_code_pkg.insert_sys_code('PAID_BYOTHER_FLAG', '代付', '代付', '代付', 'ZHS', '');
......
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool INITIALIZE_SYSCODE_CSH_TRANSACTION.log
set feedback off
set define off
<!--系统代码取值-->
BEGIN
sys_message_pkg.delete_message('E_SAME_RECODER');
sys_message_pkg.insert_message('E_SAME_RECODER',
'错误',
'制单人和确认人不能为同一人!','ZHS');
END;
commit;
set feedback on
set define on
spool off
exit
\ No newline at end of file
...@@ -12,6 +12,8 @@ begin ...@@ -12,6 +12,8 @@ begin
sys_function_assign_pkg.func_bm_load('CSH510','csh.CSH510N.csh_transaction_list_tmp'); sys_function_assign_pkg.func_bm_load('CSH510','csh.CSH510N.csh_transaction_list_tmp');
sys_function_assign_pkg.func_bm_load('CSH510','csh.CSH510.csh_transaction_for_lov'); sys_function_assign_pkg.func_bm_load('CSH510','csh.CSH510.csh_transaction_for_lov');
sys_function_assign_pkg.func_bm_load('CSH510','csh.CSH510.csh_transaction_update'); sys_function_assign_pkg.func_bm_load('CSH510','csh.CSH510.csh_transaction_update');
sys_function_assign_pkg.func_bm_load('CSH509','csh.CSH509.query_roles_info');
sys_function_assign_pkg.func_bm_load('CSH510','csh.CSH510.csh_transaction_update_bp_info');
end; end;
/ /
......
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool REGISTER_CON_REPO001.log
set feedback off
set define off
begin
--页面注册
sys_function_assign_pkg.service_load('modules/csh/CSH510/csh_transaction_hand_receipt_update.lview','收款维护',1,1,0);
sys_function_assign_pkg.func_service_load('CSH510','modules/csh/CSH510/csh_transaction_hand_receipt_update.lview');
end;
/
commit;
set feedback on
set define on
spool off
exit
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool REGISTER_CON_REPO001.log
set feedback off
set define off
begin
--页面注册
sys_function_assign_pkg.service_load('modules/hls/HLS361N/hls_bp_master_credit.lview','授信管理',1,1,0);
--功能定义 EXERCISES001 是功能号
SYS_LOAD_SYS_FUNCTION_PKG.SYS_FUNCTION_LOAD('HLS361N','授信管理','授信管理','30','','','modules/hls/HLS361N/hls_bp_master_credit.lview','ZHS',-1);
SYS_LOAD_SYS_FUNCTION_PKG.SYS_FUNCTION_LOAD('HLS361N','授信管理','授信管理','30','','','modules/hls/HLS361N/hls_bp_master_credit.lview','US',-1);
--分配页面 将页面分配给哪个功能号
sys_function_assign_pkg.func_service_load('HLS361N','modules/hls/HLS361N/hls_bp_master_credit.lview');
--分配菜单 p_function_group_code=>'DEMO1' 为功能EXERCISES001的菜单
sys_load_sys_function_grp_pkg.sys_function_group_item_load(p_function_group_code=>'CON_LEASE',p_function_code=>'HLS361N',p_enabled_flag=>'Y',P_USER_ID=>-1);
end;
/
commit;
set feedback on
set define on
spool off
exit
...@@ -23,7 +23,6 @@ alter table CSH_TRANSACTION add (PAID_BYOTHER_FLAG varchar2(10)); ...@@ -23,7 +23,6 @@ alter table CSH_TRANSACTION add (PAID_BYOTHER_FLAG varchar2(10));
alter table CON_CONTRACT add (LAST_RENT_DUE_DATE date); alter table CON_CONTRACT add (LAST_RENT_DUE_DATE date);
alter table CON_CONTRACT add (REPURCHASE_DATE date); alter table CON_CONTRACT add (REPURCHASE_DATE date);
alter table CON_CONTRACT add (PAYMENGT_DEADLINEDATE date); alter table CON_CONTRACT add (PAYMENGT_DEADLINEDATE date);
comment on column CSH_TRANSACTION.PAID_BYOTHER_FLAG is '代付'; comment on column CSH_TRANSACTION.PAID_BYOTHER_FLAG is '代付';
COMMENT ON column CSH_TRANSACTION.CONFIRMED_DATE COMMENT ON column CSH_TRANSACTION.CONFIRMED_DATE
IS '确认时间'; IS '确认时间';
...@@ -41,7 +40,6 @@ comment on column CON_CONTRACT.SUBJECT_MATTER_RESCISSIO ...@@ -41,7 +40,6 @@ comment on column CON_CONTRACT.SUBJECT_MATTER_RESCISSIO
is '解约事由'; is '解约事由';
comment on column CON_CONTRACT.REPURCHASE_TYPES comment on column CON_CONTRACT.REPURCHASE_TYPES
is '回购类型'; is '回购类型';
comment on column CON_CONTRACT.LAST_RENT_DUE_DATE is '前期租金支付约定日'; comment on column CON_CONTRACT.LAST_RENT_DUE_DATE is '前期租金支付约定日';
comment on column CON_CONTRACT.REPURCHASE_DATE is '解约回购日'; comment on column CON_CONTRACT.REPURCHASE_DATE is '解约回购日';
comment on column CON_CONTRACT.PAYMENGT_DEADLINEDATE is '支付预定期限(第1期)'; comment on column CON_CONTRACT.PAYMENGT_DEADLINEDATE is '支付预定期限(第1期)';
......
...@@ -26,6 +26,12 @@ comment on column csh_transaction.ACC_CONFIRMED_DATE is '会计确认时间'; ...@@ -26,6 +26,12 @@ comment on column csh_transaction.ACC_CONFIRMED_DATE is '会计确认时间';
comment on column csh_transaction.MKT_CONFIRMED_BY is '营业确认人'; comment on column csh_transaction.MKT_CONFIRMED_BY is '营业确认人';
comment on column csh_transaction.ACC_CONFIRMED_BY is '会计确认人 '; comment on column csh_transaction.ACC_CONFIRMED_BY is '会计确认人 ';
comment on column CSH_TRANSACTION.PAID_BYOTHER_FLAG is '代付'; comment on column CSH_TRANSACTION.PAID_BYOTHER_FLAG is '代付';
--将营业确认人改为债权确认人
ALTER TABLE csh_transaction RENAME COLUMN MKT_CONFIRMED_DATE TO DEBT_CONFIRMED_DATE;
ALTER TABLE csh_transaction RENAME COLUMN MKT_CONFIRMED_BY TO DEBT_CONFIRMED_BY;
comment on column csh_transaction.DEBT_CONFIRMED_DATE is '债权确认时间';
comment on column csh_transaction.DEBT_CONFIRMED_BY is '债权确认人';
COMMENT ON column CSH_TRANSACTION.CONFIRMED_DATE COMMENT ON column CSH_TRANSACTION.CONFIRMED_DATE
IS '确认时间'; IS '确认时间';
COMMENT ON column CSH_TRANSACTION.CONFIRMED_FLAG COMMENT ON column CSH_TRANSACTION.CONFIRMED_FLAG
......
CREATE OR REPLACE VIEW PRJ_PROJECT_LEASE_ITEM_HEAD_LV AS
select t.vehicle_class,
t.Lease_Item_Seq,
t.Brand_Id,
t.Series_Id,
t.Truck_Class,
t.Price,
t.Quantity,
t.Item_Engine_Number,
t.Horsepower,
t.NOTICE_NUMBER,
t.Gps_Flag,
(SELECT a.description value_name
FROM hls_car_brands_vl a
WHERE t.brand_id = a.brand_id
AND a.enabled_flag = 'Y') brand_id_n,
(SELECT a.description
FROM hls_car_series_vl a
WHERE a.series_id = t.series_id) series_id_n,
(select code_value_name
from sys_code_values_v scv
where scv.code = 'TRUCK_CLASS'
and scv.code_value = t.Truck_Class) Truck_Class_n,
(t.price * t.quantity) TOTAL_AMOUNT,
t.project_id,
t.project_lease_item_id,
t.lease_item_id,
(select i.full_name from hls_lease_item i where i.lease_item_id = t.lease_item_id) lease_item_id_n,
t.Vehicles_Number,
(select COUNT(1)
from CON_CONTRACT_LEASE_ITEM CI
where CI.PROJECT_LEASE_ITEM_ID = T.PROJECT_LEASE_ITEM_ID) CONFIRM_NUMBER,
t.insurance_price,
t.gps_amount,
t.Purchase_Tax,
t.model_id,
(SELECT a.description
FROM hls_car_model_vl a
WHERE a.model_id = t.model_id) model_id_n,
t.guide_price,
t.VEHICLE_TYPE,
(select a.code_value_name
from sys_code_values_v a
where a.code = 'HLS_VEHICLE_TYPE'
and a.code_value=t.vehicle_type) vehicle_type_n,
--add by chenlingfeng
t.ton_code,
t.short_name,
t.full_name,
t.pattern,
(select v.code_value_name as value_name
from sys_code_values_v v
where v.code = 'DS_TON_NAME'
and t.ton_code = v.code_value) ton_code_n,
t.ITEM_TYPE ,--物件类型
(select v.code_value_name as value_name
from sys_code_values_v v
where v.code = 'DS_ITEM_TYPE'
and t.ITEM_TYPE = v.code_value) ITEM_TYPE_n,
t.machine_number ,--机号
t.equipment_type,
(select v.code_value_name as value_name
from sys_code_values_v v
where v.code = 'EQUIPMENT_TYPE'
and t.EQUIPMENT_TYPE = v.code_value) EQUIPMENT_TYPE_n,
t.FACTORY_price,
t.DELIVERY_DATE,
t.sale_date,
--add by lijingjing
t.division,
t.machine_model,
t.equipments,
t.accessories,
t.origin_place,
t.machine_model_class,
(select v.code_value_name as value_name
from sys_code_values_v v
where v.code = 'MACHINE_MODEL_CLASS'
and t.machine_model_class = v.code_value) machine_model_class_n,
(select v.code_value_name as value_name
from sys_code_values_v v
where v.code = 'ORIGIN_PLACE'
and t.origin_place = v.code_value) origin_place_n,
(select v.code_value_name as value_name
from sys_code_values_v v
where v.code = 'DIVISION'
and t.division = v.code_value) division_n,
t.full_name full_name_n
--end
from prj_project_lease_item t;
\ No newline at end of file
...@@ -51,11 +51,30 @@ ...@@ -51,11 +51,30 @@
<bm:field name="exchange_rate_type_desc" databaseType="VARCHAR2" datatype="java.lang.String" <bm:field name="exchange_rate_type_desc" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="EXCHANGE_RATE_TYPE_DESC" prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/> physicalName="EXCHANGE_RATE_TYPE_DESC" prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
<bm:field name="invoice_bp_tax_registry_num" databaseType="VARCHAR2" datatype="java.lang.String"/> <bm:field name="invoice_bp_tax_registry_num" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="billing_method" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="billing_way_n" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="billing_frequency_n" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="billing_object_name" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="invoice_title" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="object_taxpayer_type" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="invoice_bp_address_phone_num" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="invoice_bp_bank_account" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields> </bm:fields>
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select t.cashflow_id, select t.cashflow_id,
t.bp_name,--承租人姓名
con.billing_method,--开票规则
con.billing_way_n,--开票方式
con.billing_frequency_n,--开票频率
aic.billing_object_name,--开票对象
t.invoice_title,--发票抬头
aic.object_taxpayer_type,--纳税人类型
t.invoice_bp_address_phone_num,--开票地址电话
t.invoice_bp_bank_account,--开户行及账号
t.record_id, t.record_id,
t.billing_object, t.billing_object,
(select c.code_value_name (select c.code_value_name
...@@ -141,10 +160,12 @@ ...@@ -141,10 +160,12 @@
t.invoice_bp_tax_registry_num t.invoice_bp_tax_registry_num
from acr_invoice_create_tmp t, from acr_invoice_create_tmp t,
con_contract_v con, con_contract_v con,
con_contract_cashflow_all_v cf con_contract_cashflow_all_v cf,
acr_invoice_contract_v aic
where t.session_id = ${/session/@session_id} where t.session_id = ${/session/@session_id}
and t.contract_id = con.contract_id and t.contract_id = con.contract_id
and t.cashflow_id = cf.cashflow_id and t.cashflow_id = cf.cashflow_id
and con.contract_id = aic.contract_id
order by con.contract_id,cf.times,t.cf_item order by con.contract_id,cf.times,t.cf_item
]]> ]]>
</bm:query-sql> </bm:query-sql>
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
and cc.bp_id_agent_level1 = h.bp_id), and cc.bp_id_agent_level1 = h.bp_id),
t2.tax_registry_num) OBJECT_TAX_REGISTRY_NUM, t2.tax_registry_num) OBJECT_TAX_REGISTRY_NUM,
nvl(t2.bill_object_bp_class,t1.BILL_OBJECT_BP_CLASS) BILL_OBJECT_BP_CLASS, nvl(t2.bill_object_bp_class,t1.BILL_OBJECT_BP_CLASS) BILL_OBJECT_BP_CLASS,
nvl(t2.bill_object_bp_class_DESC,t1.BILL_OBJECT_BP_CLASS_DESC) BILL_OBJECT_BP_CLASS_DESC, nvl(t2.bill_object_bp_class_desc,t1.BILL_OBJECT_BP_CLASS_DESC) BILL_OBJECT_BP_CLASS_DESC,
t1.TAX_TYPE_VAT, t1.TAX_TYPE_VAT,
t1.DESCRIPTION, t1.DESCRIPTION,
--t1.INVOICE_TITLE, --t1.INVOICE_TITLE,
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
t1.inv_billing_object_name, t1.inv_billing_object_name,
t1.small_scale_taxpayer t1.small_scale_taxpayer
FROM ACR_INVOICE_CONTRACT_V t1, ACR_INVOICE_CONTRACT_CF_V t2 FROM ACR_INVOICE_CONTRACT_V t1, ACR_INVOICE_CONTRACT_CF_V t2
#WHERE_CLAUSE# WHERE t2.due_date<sysdate
ORDER BY ORDER BY
t1.contract_id, t1.contract_id,
t2.times, t2.times,
...@@ -341,7 +341,6 @@ ...@@ -341,7 +341,6 @@
<bm:query-field name="bill_flag" <bm:query-field name="bill_flag"
queryExpression="(${@bill_flag} = 'Y' and t1.billing_frequency in (${@times_bill_flag},${@mid_bill_flag},${@final_bill_flag},${@et_bill_flag}) )"/> queryExpression="(${@bill_flag} = 'Y' and t1.billing_frequency in (${@times_bill_flag},${@mid_bill_flag},${@final_bill_flag},${@et_bill_flag}) )"/>
<bm:query-field name="all_contract_number" <bm:query-field name="all_contract_number"
queryExpression="(t1.contract_number in (Select regexp_substr( replace(replace(replace(${@all_contract_number},chr(32)),chr(10)),chr(13)), '[^,]+', 1, Level) From dual Connect By regexp_substr(replace(replace(replace(${@all_contract_number},chr(32)),chr(10)),chr(13)), '[^,]+', 1, Level) Is Not Null) )"/> queryExpression="(t1.contract_number in (Select regexp_substr( replace(replace(replace(${@all_contract_number},chr(32)),chr(10)),chr(13)), '[^,]+', 1, Level) From dual Connect By regexp_substr(replace(replace(replace(${@all_contract_number},chr(32)),chr(10)),chr(13)), '[^,]+', 1, Level) Is Not Null) )"/>
<bm:query-field name="notreceived_amount_from" <bm:query-field name="notreceived_amount_from"
...@@ -359,6 +358,7 @@ ...@@ -359,6 +358,7 @@
queryExpression="t1.bill_object_bp_class = ${@bill_object_bp_class}"/> queryExpression="t1.bill_object_bp_class = ${@bill_object_bp_class}"/>
<bm:query-field name="contract_status" <bm:query-field name="contract_status"
queryExpression="t1.contract_status = ${@contract_status}"/> queryExpression="t1.contract_status = ${@contract_status}"/>
<!-- <bm:query-field name="" queryExpression="t2.due_date &lt;= sysdate"/>-->
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" <bm:data-filter enforceOperations="query"
...@@ -366,10 +366,10 @@ ...@@ -366,10 +366,10 @@
<bm:data-filter enforceOperations="query" expression="t2.write_off_flag != &apos;NOT&apos;"/> <bm:data-filter enforceOperations="query" expression="t2.write_off_flag != &apos;NOT&apos;"/>
<bm:data-filter enforceOperations="query" <bm:data-filter enforceOperations="query"
expression="t2.billing_status != &apos;FULL&apos; and t2.cf_direction=&apos;INFLOW&apos;"/> expression="t2.billing_status != &apos;FULL&apos; and t2.cf_direction=&apos;INFLOW&apos;"/>
<!-- <bm:data-filter enforceOperations="query" <bm:data-filter enforceOperations="query"
expression="t2.contract_id = t1.contract_id AND t1.billing_status IN (&apos;NOT&apos;, &apos;PARTIAL&apos;) AND t1.contract_status not in (&apos;NEW&apos;,&apos;CANCEL&apos;) AND t2.cf_status = &apos;RELEASE&apos;"/> expression="t2.contract_id = t1.contract_id AND t1.billing_status IN (&apos;NOT&apos;, &apos;PARTIAL&apos;) AND t1.contract_status not in (&apos;NEW&apos;,&apos;CANCEL&apos;) AND t2.cf_status = &apos;RELEASE&apos;"/>
<bm:data-filter enforceOperations="query" expression="(t2.times != 0)"/>--> <bm:data-filter enforceOperations="query" expression="(t2.times != 0)"/>
<bm:data-filter enforceOperations="query" <bm:data-filter enforceOperations="query"
expression="not (t2.cf_item = 301 and nvl(direct_sales_agent_flag,'N') = 'Y')"/> expression="not (t2.cf_item = 301 and nvl(direct_sales_agent_flag,'N') = 'Y')"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sf
$Date: 2019-01-14 16:29:48
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
from exp_emp_assign_e_v t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
csh_transaction_pkg.update_muti_confirmed_flag(
p_transaction_id =>${@transaction_id},
p_wanted_confirmed_flag =>${@wanted_confirmed_flag},
p_wanted_written_off_flag=>${@wanted_written_off_flag},
p_confirmed_by =>${@confirmed_by},
p_user_id =>${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="user_id" queryOperator="="/>
</bm:query-fields>
</bm:model>
...@@ -93,6 +93,10 @@ ...@@ -93,6 +93,10 @@
<bm:field name="sus_belnr"/> <bm:field name="sus_belnr"/>
<bm:field name="bp_virtual_bank_account"/> <bm:field name="bp_virtual_bank_account"/>
<bm:field name="confirmed_flag" /> <bm:field name="confirmed_flag" />
<bm:field name="debt_confirmed_by"/>
<bm:field name="debt_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.debt_confirmed_by)" forInsert="false" forUpdate="false"/>
<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:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
......
...@@ -10,9 +10,8 @@ ...@@ -10,9 +10,8 @@
<bm:operation name="update"> <bm:operation name="update">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
csh_transaction_pkg.update_confirmed_flag( csh_transaction_pkg.update_confirmer_by_condition(
p_transaction_id =>${@transaction_id}, p_transaction_id =>${@transaction_id},
p_wanted_confirmed_flag =>${@wanted_confirmed_flag},
p_user_id =>${session/@user_id} p_user_id =>${session/@user_id}
); );
end; end;
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sf
$Date: 2019-9-12 下午07:57:46
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
update csh_transaction c
set bp_id=${@bp_id}
where transaction_id=${@transaction_id}
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -69,9 +69,73 @@ ...@@ -69,9 +69,73 @@
<bm:operation name="insert"> <bm:operation name="insert">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
DS_IMPORT_CORE_PKG.csh_trx_bank_import( csh_transaction_pkg.save_receipt_import(
p_header_id =>${/parameter/@header_id}, p_transaction_id =>${@transaction_id},
p_user_id =>${/session/@user_id}); p_transaction_num =>${@transaction_num},
p_transaction_category =>'BUSINESS',
p_transaction_type =>'RECEIPT',
p_transaction_date =>to_date(${@transaction_date},'yyyy-mm-dd'),
p_penalty_calc_date =>to_date(${@transaction_date},'yyyy-mm-dd'),
p_bank_slip_num =>${@bank_slip_num},
p_company_id =>${/session/@company_id},
p_internal_period_num =>${@internal_period_num},
p_period_name =>${@period_name},
p_payment_method_id =>${@payment_method_id},
p_distribution_set_id =>${@distribution_set_id},
p_cashflow_amount =>${@transaction_amount},
p_currency_code =>${@currency_code},
p_transaction_amount =>${@transaction_amount},
p_exchange_rate_type =>${@exchange_rate_type},
p_exchange_rate_quotation =>${@exchange_rate_quotation},
p_exchange_rate =>${@exchange_rate},
p_bank_account_id =>${@bank_account_id},
p_bp_category =>${@bp_category},
p_bp_id =>${@bp_id},
p_bp_bank_account_id =>${@bp_bank_account_id},
p_bp_bank_account_num =>${@bp_bank_account_num},
p_description =>${@description},
p_handling_charge =>${@handling_charge},
p_posted_flag =>nvl(${@posted_flag},'N'),
p_reversed_flag =>nvl(${@reversed_flag},'N'),
p_reversed_date =>to_date(${@reversed_date},'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag =>nvl(${@returned_flag},'NOT'),
p_returned_amount =>${@returned_amount},
p_write_off_flag =>nvl(${@write_off_flag},'NOT'),
p_write_off_amount =>${@write_off_amount},
p_full_write_off_date =>to_date(${@full_write_off_date},'yyyy-mm-dd 24hh:mi:ss'),
p_twin_csh_trx_id =>${@twin_csh_trx_id},
p_return_from_csh_trx_id =>${@return_from_csh_trx_id},
p_reversed_csh_trx_id =>${@reversed_csh_trx_id},
p_source_csh_trx_type =>${@source_csh_trx_type},
p_source_csh_trx_id =>${@source_csh_trx_id},
p_source_doc_category =>${@source_doc_category},
p_source_doc_type =>${@source_doc_type},
p_source_doc_id =>${@source_doc_id},
p_source_doc_line_id =>${@source_doc_line_id},
p_create_je_mothed =>${@create_je_mothed},
p_create_je_flag =>nvl(${@create_je_flag},'N'),
p_gld_interface_flag =>nvl(${@gld_interface_flag},'N'),
p_user_id =>${/session/@user_id},
p_ref_contract_id => ${@ref_contract_id},
p_receipt_type => ${@receipt_type},
p_csh_bp_name => ${@csh_bp_name},
p_ref_n01 =>${@ref_n01},
p_bp_bank_name =>${@bp_bank_name},
p_bp_bank_branch_name =>${@bp_bank_branch_name},
p_collection_classes =>${@collection_classes},
p_bp_bank_account_name =>${@bp_bank_account_name},
p_opposite_band_na =>${@opposite_band_na},
p_banka =>${@banka},
p_purpose =>${@purpose},
p_gsber =>${@gsber},
p_sus_belnr =>${@sus_belnr},
p_bp_virtual_bank_account =>${@bp_virtual_bank_account},
p_zuonr =>${@bank_slip_num},
p_paid_byother_flag =>${@paid_byother_flag},
p_ref_v05 =>${@ref_v05},
p_status =>${@status},
p_bank_account_num =>${@bank_account_num}
);
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
......
...@@ -73,7 +73,8 @@ ...@@ -73,7 +73,8 @@
p_bp_virtual_bank_account =>${@bp_virtual_bank_account}, p_bp_virtual_bank_account =>${@bp_virtual_bank_account},
p_zuonr=>${@bank_slip_num}, p_zuonr=>${@bank_slip_num},
p_paid_byother_flag =>${@paid_byother_flag}, p_paid_byother_flag =>${@paid_byother_flag},
p_ref_v05 =>${@ref_v05} p_ref_v05 =>${@ref_v05},
p_status =>${@status}
); );
end; end;
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2014-2-28 下午03:32:03
$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
prj_project_check_pkg.check_prj_record(
p_project_id =>${@project_id},
p_payment_deduction =>${@payment_deduction},
p_secondary_lease =>${@secondary_lease},
p_price_list =>${@price_list}
);
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="payment_deduction" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@payment_deduction"/>
<bm:parameter name="secondary_lease" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@secondary_lease"/>
<bm:parameter name="price_list" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@price_list"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: shenyamin
$Date: 2018-11_03 上午11:00:06
$Revision: 3.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
prj_project_pkg.project_submit(
p_project_id =>${@project_id},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -69,36 +69,36 @@ ...@@ -69,36 +69,36 @@
} }
function onLoad_cashflowDs(ds) { // function onLoad_cashflowDs(ds) {
var hd_ds = $('contractDs'), // var hd_ds = $('contractDs'),
r = hd_ds.getCurrentRecord(); // r = hd_ds.getCurrentRecord();
if (hd_ds.getSelected().indexOf(r) != -1) { // if (hd_ds.getSelected().indexOf(r) != -1) {
ds.selectAll.defer(5, ds); // ds.selectAll.defer(5, ds);
} // }
} // }
var isSelectFromLine = false; var isSelectFromLine = false;
function onSelect_contractDs(ds, record) { // function onSelect_contractDs(ds, record) {
ds.locate(ds.indexOf(record) + 1); // ds.locate(ds.indexOf(record) + 1);
if (!isSelectFromLine) { // if (!isSelectFromLine) {
$('cashflowDs').selectAll(); // $('cashflowDs').selectAll();
} // }
//
} // }
function unselect_contractDs(ds, record) { // function unselect_contractDs(ds, record) {
ds.locate(ds.indexOf(record) + 1); // ds.locate(ds.indexOf(record) + 1);
$('cashflowDs').unSelectAll(); // $('cashflowDs').unSelectAll();
} // }
function onSelect_invoiceLineDs(ds, record) { // function onSelect_invoiceLineDs(ds, record) {
record.dirty = true; // record.dirty = true;
isSelectFromLine = true; // isSelectFromLine = true;
$('contractDs').select($('contractDs').getCurrentRecord()); // $('contractDs').select($('contractDs').getCurrentRecord());
isSelectFromLine = false; // isSelectFromLine = false;
} // }
function unSelect_invoiceLineDs(ds, record) { // function unSelect_invoiceLineDs(ds, record) {
record.dirty = false; // record.dirty = false;
} // }
function render_contractDs_grid(value, record, name) { function render_contractDs_grid(value, record, name) {
if (name == 'billing_object_name') { if (name == 'billing_object_name') {
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="contractDs" autoQuery="true" fetchAll="true" model="acr.ACR510.acr_invoice_contract_v" <a:dataSet id="contractDs" autoQuery="false" fetchAll="false" model="acr.ACR510.acr_invoice_contract_v"
queryDataSet="conditionDs" queryDataSet="conditionDs"
queryUrl="${/request/@context_path}/autocrud/acr.ACR510.acr_invoice_contract_v/query?company_id=${/parameter/@company_id}" queryUrl="${/request/@context_path}/autocrud/acr.ACR510.acr_invoice_contract_v/query?company_id=${/parameter/@company_id}"
selectable="true"> selectable="true">
...@@ -129,21 +129,21 @@ ...@@ -129,21 +129,21 @@
</a:mapping> </a:mapping>
</a:field> </a:field>
</a:fields> </a:fields>
<a:events> <!-- <a:events>-->
<a:event name="select" handler="onSelect_contractDs"/> <!-- <a:event name="select" handler="onSelect_contractDs"/>-->
<a:event name="unselect" handler="unselect_contractDs"/> <!-- <a:event name="unselect" handler="unselect_contractDs"/>-->
</a:events> <!-- </a:events>-->
</a:dataSet> </a:dataSet>
<a:dataSet id="cashflowDs" bindName="line_info" bindTarget="contractDs" fetchAll="true" <a:dataSet id="cashflowDs" bindName="line_info" bindTarget="contractDs" fetchAll="true"
model="acr.ACR510.acr_invoice_contract_cf_v" selectable="true"> model="acr.ACR510.acr_invoice_contract_cf_v" selectable="true">
<a:fields> <a:fields>
<a:field name="last_received_date" datatype="date"/> <a:field name="last_received_date" datatype="date"/>
</a:fields> </a:fields>
<a:events> <!-- <a:events>-->
<a:event name="load" handler="onLoad_cashflowDs"/> <!-- <a:event name="load" handler="onLoad_cashflowDs"/>-->
<a:event name="select" handler="onSelect_invoiceLineDs"/> <!-- <a:event name="select" handler="onSelect_invoiceLineDs"/>-->
<a:event name="unselect" handler="unSelect_invoiceLineDs"/> <!-- <a:event name="unselect" handler="unSelect_invoiceLineDs"/>-->
</a:events> <!-- </a:events>-->
</a:dataSet> </a:dataSet>
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
......
...@@ -60,9 +60,9 @@ ...@@ -60,9 +60,9 @@
$('acr_invoice_select_cashflow').close(); $('acr_invoice_select_cashflow').close();
} }
function contractDs_grid_clear() { // function contractDs_grid_clear() {
$('contractDs_grid').clear(); // $('contractDs_grid').clear();
} // }
function allConditionDs_reset() { function allConditionDs_reset() {
$('allConditionDs').reset(); $('allConditionDs').reset();
...@@ -304,11 +304,13 @@ ...@@ -304,11 +304,13 @@
<a:field name="notbilling_amount_from" defaultValue="0.01"/> <a:field name="notbilling_amount_from" defaultValue="0.01"/>
<a:field name="__async__" defaultValue="Y" prompt="异步导出"/> <a:field name="__async__" defaultValue="Y" prompt="异步导出"/>
</a:fields> </a:fields>
<a:events> <!-- <a:events>-->
<a:event name="update" handler="acr510n_query_update"/> <!-- <a:event name="update" handler="acr510n_query_update"/>-->
</a:events> <!-- <a:event name="select" handler="onSelect_contractDs"/>-->
<!-- <a:event name="unselect" handler="unselect_contractDs"/>-->
<!-- </a:events>-->
</a:dataSet> </a:dataSet>
<a:dataSet id="ar510n_cashflow_ds" autoPageSize="true" autoQuery="true" <a:dataSet id="ar510n_cashflow_ds" autoPageSize="true" autoQuery="false"
model="acr.ACR510N.acr_inovice_cf_v_n" queryDataSet="allConditionDs" selectable="true"> model="acr.ACR510N.acr_inovice_cf_v_n" queryDataSet="allConditionDs" selectable="true">
<a:fields> <a:fields>
<a:field name="invoice_title" required="true" prompt="发票抬头"/> <a:field name="invoice_title" required="true" prompt="发票抬头"/>
...@@ -332,14 +334,19 @@ ...@@ -332,14 +334,19 @@
</a:field> </a:field>
<a:field name="__async__" defaultValue="Y" prompt="异步导出"/> <a:field name="__async__" defaultValue="Y" prompt="异步导出"/>
</a:fields> </a:fields>
<!-- <a:events>-->
<!-- <a:event name="load" handler="onLoad_cashflowDs"/>-->
<!-- <a:event name="select" handler="onSelect_invoiceLineDs"/>-->
<!-- <a:event name="unselect" handler="unSelect_invoiceLineDs"/>-->
<!-- </a:events>-->
</a:dataSet> </a:dataSet>
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
<a:screenTopToolbar> <a:screenTopToolbar>
<a:screenTitle/> <a:screenTitle/>
<a:gridButton click="contractDs_grid_query" text="HLS.QUERY"/> <a:gridButton click="contractDs_grid_query" text="HLS.QUERY"/>
<a:gridButton click="allConditionDs_reset" text="重置条件"/> <a:gridButton click="allConditionDs_reset" text="重置"/>
<a:gridButton click="contractDs_grid_clear" text="ACR510.BUTTON.CLEAR_CONTRACT"/> <!-- <a:gridButton click="contractDs_grid_clear" text="ACR510.BUTTON.CLEAR_CONTRACT"/>-->
<a:gridButton click="invoiceHd_confirm" text="ACR510.BUTTON.COMFIRM"/> <a:gridButton click="invoiceHd_confirm" text="ACR510.BUTTON.COMFIRM"/>
<!--<a:gridButton click="acr510n_excel" text="导出"/>--> <!--<a:gridButton click="acr510n_excel" text="导出"/>-->
</a:screenTopToolbar> </a:screenTopToolbar>
...@@ -354,6 +361,7 @@ ...@@ -354,6 +361,7 @@
<a:checkBox name="mid_bill_flag" bindTarget="allConditionDs" prompt="年中开票"/> <a:checkBox name="mid_bill_flag" bindTarget="allConditionDs" prompt="年中开票"/>
<a:checkBox name="final_bill_flag" bindTarget="allConditionDs" prompt="年末开票"/> <a:checkBox name="final_bill_flag" bindTarget="allConditionDs" prompt="年末开票"/>
<a:checkBox name="et_bill_flag" bindTarget="allConditionDs" prompt="结清开票"/> <a:checkBox name="et_bill_flag" bindTarget="allConditionDs" prompt="结清开票"/>
</a:formToolBar> </a:formToolBar>
<a:formBody> <a:formBody>
<a:hBox> <a:hBox>
...@@ -374,7 +382,6 @@ ...@@ -374,7 +382,6 @@
<a:lov name="cf_item_desc" bindTarget="allConditionDs" prompt="HLS.RECEIVE_PROJECT"/> <a:lov name="cf_item_desc" bindTarget="allConditionDs" prompt="HLS.RECEIVE_PROJECT"/>
<a:comboBox name="billing_way_n" bindTarget="allConditionDs" prompt="开票方式"/> <a:comboBox name="billing_way_n" bindTarget="allConditionDs" prompt="开票方式"/>
</a:hBox> </a:hBox>
<a:hBox> <a:hBox>
<a:numberField name="notreceived_amount_from" allowDecimals="true" decimalPrecision="2" bindTarget="allConditionDs" prompt="未收金额从"/> <a:numberField name="notreceived_amount_from" allowDecimals="true" decimalPrecision="2" bindTarget="allConditionDs" prompt="未收金额从"/>
...@@ -384,7 +391,6 @@ ...@@ -384,7 +391,6 @@
<a:numberField name="notbilling_amount_to" allowDecimals="true" decimalPrecision="2" bindTarget="allConditionDs" <a:numberField name="notbilling_amount_to" allowDecimals="true" decimalPrecision="2" bindTarget="allConditionDs"
prompt="未开金额到"/> prompt="未开金额到"/>
</a:hBox> </a:hBox>
<a:hBox> <a:hBox>
<a:textField name="inv_billing_object_name" bindTarget="allConditionDs" prompt="代理商"/> <a:textField name="inv_billing_object_name" bindTarget="allConditionDs" prompt="代理商"/>
...@@ -405,115 +411,85 @@ ...@@ -405,115 +411,85 @@
</a:queryForm> </a:queryForm>
<a:tabPanel id="acr510n_detail_tabpanel_id" marginHeight="140" marginWidth="30"> <a:tabPanel id="acr510n_detail_tabpanel_id" marginHeight="140" marginWidth="30">
<a:tabs> <a:tabs>
<a:tab prompt="明细信息" width="120"> <a:tab prompt="开票信息" width="120">
<a:grid id="acr510n_cashflowds_grid" bindTarget="ar510n_cashflow_ds" marginHeight="210" <a:grid id="contractDs_grid" bindTarget="ar510n_cashflow_ds" marginHeight="210" marginWidth="70" navBar="true">
marginWidth="70" navBar="true">
<a:toolBar> <a:toolBar>
<a:button type="excel"/> <a:button type="excel"/>
</a:toolBar> </a:toolBar>
<a:columns> <a:columns>
<!-- <a:column name="con_search_term_1" lock="true" prompt="合同号" width="150"/>-->
<a:column name="contract_number" lock="true" width="150" prompt="合同编号"/> <a:column name="contract_number" lock="true" width="150" prompt="合同编号"/>
<!-- <a:column name="lease_channel_desc" prompt="商业模式"/>--> <a:column name="contract_name" lock="true" width="150" prompt="合同名称"/>
<a:column name="inv_billing_object_name" prompt="代理"/> <a:column name="inv_billing_object_name" prompt="代理"/>
<a:column name="business_type_desc" prompt="业务类型"/> <a:column name="business_type_desc" prompt="业务类型"/>
<a:column name="lease_channel_desc" prompt="商业模式"/>
<a:column name="division_desc" prompt="产品线"/> <a:column name="division_desc" prompt="产品线"/>
<a:column name="times" align="center" width="40"/> <a:column name="times" align="right" lock="true" width="40" prompt="期数"/>
<a:column name="cf_item_desc"/> <a:column name="cf_item_desc" prompt="应收项目"/>
<a:column name="due_date" renderer="Leaf.formatDate"/> <a:column name="due_date" renderer="Leaf.formatDate" prompt="到期日"/>
<a:column name="last_received_date" renderer="Leaf.formatDate"/> <a:column name="last_received_date" renderer="Leaf.formatDate" prompt="收款日期"/>
<a:column name="due_amount" align="right" renderer="Leaf.formatMoney"/> <a:column name="due_amount" align="right" renderer="Leaf.formatMoney" prompt="应收金额"/>
<a:column name="principal" align="right" renderer="Leaf.formatMoney"/> <a:column name="principal" align="right" renderer="Leaf.formatMoney" prompt="本金"/>
<a:column name="interest" align="right" renderer="Leaf.formatMoney"/> <a:column name="interest" align="right" renderer="Leaf.formatMoney" prompt="利息"/>
<a:column name="received_amount" align="right" renderer="Leaf.formatMoney"/> <a:column name="received_amount" align="right" renderer="Leaf.formatMoney" prompt="已收金额"/>
<a:column name="received_principal" align="right" renderer="Leaf.formatMoney"/> <a:column name="received_principal" align="right" renderer="Leaf.formatMoney" prompt="已收本金"/>
<a:column name="received_interest" align="right" renderer="Leaf.formatMoney"/> <a:column name="received_interest" align="right" renderer="Leaf.formatMoney" prompt="已收利息"/>
<a:column name="notreceived_amount" align="right" prompt="未收金额" <a:column name="notreceived_amount" align="right" renderer="Leaf.formatMoney" prompt="未收金额"/>
<a:column name="notreceived_principal" align="right" renderer="Leaf.formatMoney" prompt="未收本金"/>
<a:column name="notreceived_interest" align="right" renderer="Leaf.formatMoney" prompt="未收利息"/>
<a:column name="billing_amount" align="right" prompt="已开票金额"
renderer="Leaf.formatMoney"/> renderer="Leaf.formatMoney"/>
<a:column name="notreceived_principal" align="right" prompt="未收本金" <a:column name="billing_principal" align="right" prompt="已开票本金"
renderer="Leaf.formatMoney"/> renderer="Leaf.formatMoney"/>
<a:column name="notreceived_interest" align="right" prompt="未收利息" <a:column name="billing_interest" align="right" prompt="已开票利息"
renderer="Leaf.formatMoney"/> renderer="Leaf.formatMoney"/>
<a:column name="billing_amount" align="right" renderer="Leaf.formatMoney"/> <a:column name="notbilling_amount" align="right" prompt="未开票金额"
<a:column name="billing_principal" align="right" renderer="Leaf.formatMoney"/>
<a:column name="billing_interest" align="right" renderer="Leaf.formatMoney"/>
<a:column name="notbilling_amount" align="right" prompt="未开金额"
renderer="Leaf.formatMoney"/> renderer="Leaf.formatMoney"/>
<a:column name="notbilling_principal" align="right" prompt="未开本金" <a:column name="notbilling_principal" align="right" prompt="未开本金"
renderer="Leaf.formatMoney"/> renderer="Leaf.formatMoney"/>
<a:column name="notbilling_interest" align="right" prompt="未开利息" <a:column name="notbilling_interest" align="right" prompt="未开利息"
renderer="Leaf.formatMoney"/> renderer="Leaf.formatMoney"/>
<a:column name="currency_desc" width="60"/> <a:column name="interest" align="right" renderer="Leaf.formatMoney" prompt="利息"/>
<a:column name="exchange_rate" align="right" width="80"/>
<a:column name="exchange_rate_type_desc" width="100"/>
</a:columns> </a:columns>
<a:editors>
<a:lov id="contractDs_grid_editor_lov"/>
<a:textField id="contractDs_grid_editor_tf"/>
</a:editors>
</a:grid> </a:grid>
</a:tab> </a:tab>
<a:tab prompt="开票信息" width="120">
<a:grid id="contractDs_grid" bindTarget="ar510n_cashflow_ds" marginHeight="210" <a:tab prompt="抬头信息" width="120">
marginWidth="70" <a:grid id="titleDs_grid" bindTarget="ar510n_cashflow_ds" marginHeight="210" marginWidth="70" navBar="true">
navBar="true">
<a:toolBar> <a:toolBar>
<a:button type="excel"/> <a:button type="excel"/>
</a:toolBar> </a:toolBar>
<a:columns> <a:columns>
<!-- <a:column name="con_search_term_1" lock="true" prompt="合同号" width="150"/>-->
<!-- <a:column name="project_name" autoAdjust="false" lock="true" showTitle="true" width="200"/> -->
<a:column name="contract_number" lock="true" width="150" prompt="合同编号"/> <a:column name="contract_number" lock="true" width="150" prompt="合同编号"/>
<a:column name="times" align="right" lock="true" width="40"/> <a:column name="contract_name" lock="true" width="150" prompt="合同名称"/>
<!-- <a:column name="serial_number" prompt="机编号" width="80"/>--> <a:column name="bp_name" prompt="承租人名称"/>
<a:column name="contract_status_desc" width="80"/> <a:column name="contract_status_desc" width="80" prompt="合同状态"/>
<a:column name="billing_method_desc" width="100"/> <a:column name="billing_method" prompt="开票规则"/>
<a:column name="billing_way_n" prompt="开票方式" width="80"/> <a:column name="billing_way_n" prompt="开票方式" width="80"/>
<a:column name="billing_frequency_n" prompt="开票频率" width="80"/> <a:column name="billing_frequency_n" prompt="开票频率" width="80"/>
<a:column name="billing_object_name" prompt="开票对象" autoAdjust="false" <a:column name="billing_object_name" prompt="开票对象" autoAdjust="false"
editor="contractDs_grid_editor_lov" renderer="render_contractDs_grid" editor="titleDs_grid_editor_lov" renderer="render_contractDs_grid"
showTitle="true" width="200"/> showTitle="true" width="200"/>
<a:column name="invoice_title" prompt="发票抬头" autoAdjust="false" editor="contractDs_grid_editor_tf" <a:column name="invoice_title" prompt="发票抬头" autoAdjust="false" editor="titleDs_grid_editor_tf"
showTitle="true" width="200"/> showTitle="true" width="200"/>
<a:column name="object_taxpayer_type" prompt="纳税人类型"/>
<a:column name="object_tax_registry_num" prompt="纳税人识别号" width="150" <a:column name="object_tax_registry_num" prompt="纳税人识别号" width="150"
editor="contractDs_grid_editor_tf"/> editor="titleDs_grid_editor_tf"/>
<a:column name="invoice_bp_address_phone_num" prompt="开票地址电话" autoAdjust="false" <a:column name="invoice_bp_address_phone_num" prompt="开票地址电话" autoAdjust="false"
editor="contractDs_grid_editor_tf" showTitle="true" width="200"/> editor="titleDs_grid_editor_tf" showTitle="true" width="200"/>
<a:column name="invoice_bp_bank_account" prompt="开户行及账号" autoAdjust="false" <a:column name="invoice_bp_bank_account" prompt="开户行及账号" autoAdjust="false"
editor="contractDs_grid_editor_tf" showTitle="true" width="150"/> editor="titleDs_grid_editor_tf" showTitle="true" width="150"/>
<a:column name="description" autoAdjust="false" editor="contractDs_grid_editor_tf" <a:column name="description" prompt="备注" autoAdjust="false" editor="titleDs_grid_editor_tf"
showTitle="true" width="200"/> showTitle="true" width="200"/>
<a:column name="object_taxpayer_type_desc"/>
<a:column name="contract_name" autoAdjust="false" showTitle="true" width="200"/>
<!-- <a:column name="inception_of_lease" renderer="Leaf.formatDate" width="80"/> -->
</a:columns> </a:columns>
<a:editors> <a:editors>
<a:lov id="contractDs_grid_editor_lov"/> <a:lov id="titleDs_grid_editor_lov"/>
<a:textField id="contractDs_grid_editor_tf"/> <a:textField id="titleDs_grid_editor_tf"/>
</a:editors> </a:editors>
</a:grid> </a:grid>
</a:tab> </a:tab>
<!--<a:tab prompt="导出" width="100">-->
<!--<a:grid id="contractDs_grid_forexport" bindTarget="ar510n_cashflow_ds" marginHeight="170"-->
<!--marginWidth="70" navBar="true">-->
<!--<a:toolBar>-->
<!--<a:button type="excel"/>-->
<!--</a:toolBar>-->
<!--<a:columns>-->
<!--<a:column name="contract_number" lock="true" prompt="合同编号" width="150"/>-->
<!--&lt;!&ndash; <a:column name="project_name" autoAdjust="false" lock="true" showTitle="true" width="200"/> &ndash;&gt;-->
<!--<a:column name="times" align="right" lock="true" width="40"/>-->
<!--&lt;!&ndash; <a:column name="serial_number" prompt="机编号" width="80"/>&ndash;&gt;-->
<!--<a:column name="cf_item_desc"/>-->
<!--<a:column name="due_amount"/>-->
<!--<a:column name="received_amount" align="right" renderer="Leaf.formatMoney"/>-->
<!--<a:column name="billing_amount" align="right" renderer="Leaf.formatMoney"/>-->
<!--<a:column name="need_bill_amount" align="right" prompt="应开票金额"-->
<!--renderer="Leaf.formatMoney"/>-->
<!--<a:column name="billing_object_name" autoAdjust="false" showTitle="true"-->
<!--width="200"/>-->
<!--<a:column name="invoice_title" autoAdjust="false" showTitle="true" width="200"/>-->
<!--<a:column name="object_tax_registry_num" width="150"/>-->
<!--</a:columns>-->
<!--</a:grid>-->
<!--</a:tab>-->
</a:tabs> </a:tabs>
</a:tabPanel> </a:tabPanel>
</a:screenBody> </a:screenBody>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sf
$Date: 2019-09-06 上午11:10:33
$Revision: 1.0
$Purpose: 会计收款确认
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
<a:model-query defaultWhereClause="t.code = &apos;CSH511_TRANSACTION_TYPE&apos; and t.code_value in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="transaction_type"/>
<a:model-query defaultWhereClause="t.code = &apos;CSH510_RETURN_SELECT&apos; and t.code_value not in (&apos;RETURN&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="returned_flag_rp"/>
<a:model-query defaultWhereClause="t.code = &apos;CSH510_REVERSE_SELECT&apos; and t.code_value not in (&apos;R&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="reversed_flag_rp"/>
</a:init-procedure>
<a:view>
<a:link id="csh_transaction_receipt_link" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
<a:link id="csh_transaction_receipt_update_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>
<a:link id="csh_transaction_receipt_maintain_post_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>
<!-- <a:link id="csh_transaction_receipt_maintain_post_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_post_query.lview"/> -->
<a:link id="csh510_csh_transaction_batch_update" model="csh.CSH510.csh_transaction_delete" modelaction="batch_update"/>
<a:link id="csh511_csh_transaction_batch_post_link" model="csh.CSH511.csh_transaction_post" modelaction="batch_update"/>
<!--更新收款单据的状态-->
<a:link id="csh510N_csh_transaction_batch_update_confirmed_flag" model="csh.CSH510.csh_transaction_update" modelaction="batch_update"/>
<!-- <a:link id="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_import.lview"/>-->
<a:link id="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510N/csh_transaction_import.lview"/>
<script type="text/javascript"><![CDATA[
//对函数进行封装
function alert_confirmed_flag(current_confirm_flag,want_confirmed_flag,write_off_flag){
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
if (datas.length == 0) {
$L.showMessage("提示", '请选择要作废的单据');
return;
}
var post_data=[];
for(var i=0;i<datas.length;i=i+1) {
var confirmed_flag= datas[i].get('confirmed_flag');
var current_confirm_flag_n;
//不是新增就报错
switch (current_confirm_flag) {
case 'MKTAUDITING' :
current_confirm_flag_n='营业新增确认中'; break;
case 'NEW' :
current_confirm_flag_n='未提交'; break;
case 'APPROVED' :
current_confirm_flag_n='新增确认'; break;
case 'REJECTED' :
current_confirm_flag_n='新增退回'; break;
case 'CANCELLED' :
current_confirm_flag_n='已作废'; break;
case 'ACCAUDITING' :
current_confirm_flag_n='会计新增确认中'; break;
case 'RETURNED' :
current_confirm_flag_n='已退款'; break;
}
if(confirmed_flag!=current_confirm_flag&&confirmed_flag!=undefined){
$L.showInfoMessage("提示", '请选择单据状态为'+current_confirm_flag_n+'的数据', null, null);
return;
}
//判断核销状态
//将对象封装到json对象数组
post_data.push({
'transaction_id': datas[i].get('transaction_id'),
//提交想改变之后的状态
'wanted_confirmed_flag': want_confirmed_flag,
'write_off_flag' : write_off_flag,
'_status' : 'update'
});
};
//弹出确认修改的提示框
$L.showConfirm("提示",'确认执行该操作?',function(){
//锁屏
lock_current_window();
//作废单据
Leaf.request({
url: $('csh510N_csh_transaction_batch_update_confirmed_flag').getUrl(),
para: post_data,
success: function () {
unlock_current_window();
$('csh_transaction_receipt_maintain_result_ds').query();
Leaf.showMessage('${l:PROMPT}', '修改成功!');
}, failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
})
}
//会计进行新增确认
function csh509_csh_trx_bank_account_confirm(){
var current_confirm_flag='ACCAUDITING';
var want_confirmed_flag='APPROVED';
var write_off_flag='NOT';
alert_confirmed_flag(current_confirm_flag,want_confirmed_flag,write_off_flag);
}
//会计进行驳回操作
function csh509_csh_trx_bank_account_refuse(){
var current_confirm_flag='ACCAUDITING';
var want_confirmed_flag='REJECTED';
var write_off_flag=null;
alert_confirmed_flag(current_confirm_flag,want_confirmed_flag,write_off_flag);
}
//作废单据
function csh509_csh_trx_bank_account_drop(){
var current_confirm_flag='ACCAUDITING';
var want_confirmed_flag='REJECTED';
var write_off_flag=null;
alert_confirmed_flag(current_confirm_flag,want_confirmed_flag,write_off_flag);
}
//锁表
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
//解锁
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
function dateValidator(record, name, value) { //日期校验方法
if (name == 'transaction_date_from' || name == 'transaction_date_to') {
var start_date = Leaf.formatDate(record.get('transaction_date_from'));
var end_date = Leaf.formatDate(record.get('transaction_date_to'));
if (!!end_date) { //由于结束日期非必填,只有在结束日期填了才进行比较
if (!compareDate(start_date, end_date)) {
return '${l:CSH510.CSH_RECEIPT_DATE_CHECK}'; //校验不通过返回字符串
}
}
return true; //校验通过返回true
}
}
function compareDate(start, end) {
if (start > end) {
return false;
}
return true;
}
function csh510_receipt_query() {
var record = $('csh_transaction_receipt_maintain_query_ds').getAt(0);
var dirty_flag = 'N';
for (var name in record.data) {
var value = record.get(name);
if (value != 'undefined' && value != null && value != '') {
dirty_flag = 'Y';
}
}
if (dirty_flag == 'N') {
Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}', function () {
return;
}, function () {
$('csh_transaction_receipt_maintain_result_ds').query();
}, null, null);
} else {
$('csh_transaction_receipt_maintain_result_ds').query();
}
}
function csh510_receipt_reset() {
$('csh_transaction_receipt_maintain_query_ds').reset();
}
function csh510_receipt_back() {
history.go(-1);
}
function csh510_receipt_forward() {
history.go(1);
}
function csh510_receipt_quit() {
location.href = $('sys_service_welcome_link').getUrl();
parent.shMenu('show');
}
function seedetail_transaction_num(value, record, name) {
if (record.get('transaction_id')) {
var url;
if (record.get('posted_flag') == 'N') {
url = $('csh_transaction_receipt_maintain_post_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
} /*else*/ else if (record.get('posted_flag') == 'Y') {
url = $('csh_transaction_receipt_update_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
} else {
return value;
}
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
}
}
function openWindow(url) {
new Leaf.Window({
id: 'csh_transaction_receipt_link_winid',
params: {
winId: 'csh_transaction_receipt_link_winid'
},
url: url,
title: '${l:CSH510.CSH_RECEIPT_UPDATE}',
fullScreen: true
});
}
function construct_from_to() {
var config = ['transaction_num', 'bank_slip_num', 'transaction_amount', 'currency_code', 'bank_account_code'];
var pattern = ['_from', '_to'];
var obj = {};
for (var i = 0,
j = config.length; i < j; i++) {
for (var m = 0,
n = pattern.length; m < n; m++) {
obj[config[i] + pattern[m]] = config[i] + pattern[n - 1 - m];
}
}
return obj;
}
function csh510_receipt_maintain_update(ds, record, name, value, oldvalue) {
var from_to = construct_from_to();
var opposite_name = from_to[name];
if (!Ext.isEmpty(opposite_name)) {
var opposite_value = record.get(opposite_name);
if (!Ext.isEmpty(value) && Ext.isEmpty(opposite_value)) {
record.set(opposite_name, value);
}
}
}
function csh510_receipt_remove() {
var records = $('csh_transaction_receipt_maintain_result_ds').getSelected();
if (!records.length) {
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.SELECT_RECORD}');
return;
}
var saveData = [];
for (var i = 0; i < records.length; i++) {
records[i].set('_status', 'delete');
saveData.push(records[i].data);
}
Leaf.showConfirm('${l:PROMPT}', '${l:HLS.DELETE_CONFIRM}', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.DELETING}');
Leaf.request({
url: '${/request/@context_path}/autocrud/csh.CSH510.csh_transaction_delete/batch_update',
para: saveData,
success: function () {
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
csh510_delete_remove(records);
Leaf.Masker.unmask(Ext.getBody());
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, function () {
return;
}, null, null);
}
function csh510_delete_remove(records) {
while (records[0]) {
$('csh_transaction_receipt_maintain_result_ds').removeLocal(records[0]);
}
}
function csh510_receipt() {
Leaf.showConfirm('${l:PROMPT}', '非财务人员请勿操作!', function () {
var records = $('csh_transaction_receipt_maintain_result_ds').getSelected();
if (records.length != 1) {
Leaf.showMessage('${l:PROMPT}', '请选择1条数据!');
return;
}
if (records[0].get('transaction_id')) {
var url;
if (records[0].get('posted_flag') == 'N') {
url = $('csh_transaction_receipt_maintain_post_link').getUrl() + '?transaction_id=' + records[0].get('transaction_id') + '&claim=F';
} else {
Leaf.showMessage('${l:PROMPT}', '该单据已经被认领,无需再次认领!');
return;
}
openWindow(url);
}
});
}
function csh510_batch_update() {
var ds_id = 'csh_transaction_receipt_maintain_result_ds';
var ds = $(ds_id)
var records = ds.getSelected();
if (records.length < 1) {
Leaf.showMessage('${l:PROMPT}', '请至少选择一条要处理的单据');
return;
}
var auto_write_record = $('csh510_collection_classes_batch_update_ds').getAt(0);
var collection_classes = auto_write_record.get('collection_classes');
if (collection_classes) {
lock_current_window();
var post_data = [];
for (var i = 0; i < records.length; i++) {
if (records[i].get('write_off_flag') == 'FULL') {
Leaf.showMessage('${l:PROMPT}', '选择数据中包含已完全核销的数据');
return;
}
post_data.push({
'transaction_id': records[i].get('transaction_id'),
'collection_classes': auto_write_record.get('collection_classes'),
'_status': 'update'
});
}
Leaf.request({
url: $('csh510_csh_transaction_batch_update').getUrl(),
para: post_data,
success: function () {
unlock_current_window();
ds.query(ds.currentpage);
Leaf.showMessage('${l:PROMPT}', '修改成功!');
}, failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
}
}
function csh510_csh_transaction_batch_update(){
//
var records = $('csh_transaction_receipt_maintain_result_ds').getSelected();
if (records.length == 0) {
Leaf.showMessage('${l:PROMPT}', '请选择一条记录!');
return;
}
var post_data = [];
for (var i = 0; i < records.length; i++) {
post_data.push({
'transaction_id': records[i].get('transaction_id'),
'_status': 'update'
});
}
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('csh511_csh_transaction_batch_post_link').getUrl(),
para: post_data,
success: function (res) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.SUBMIT_SUCCESS}');
csh510_receipt_query();
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
function csh510_csh_trx_bank_import(){
var url_l = $('csh510_csh_transaction_import_link').getUrl();
var win = new Leaf.Window({
id: 'csh510_csh_transaction_import_win',
url: url_l,
params: {
'winid': 'csh510_csh_transaction_import_win',
'session_id': '${/session/@session_id}',
'parent_ds_id': 'csh_transaction_receipt_maintain_result_ds'
},
title: '信息导入',
width: 430,
height: 390
});
win.on('close', function () {
$('csh_transaction_receipt_maintain_result_ds').query();
});
}
function csh510_export() {
$('csh_transaction_receipt_maintain_grid_ds')._export(null,'收款维护');
}
]]></script>
<a:dataSets>
<a:dataSet id="write_off_flag_ds" lookupCode="WRITE_OFF_FLAG"/>
<a:dataSet id="confirmed_flag_ds" lookupCode="CONFIRMED_FLAG">
</a:dataSet>
<a:dataSet id="payment_method_ds">
<a:datas dataSource="/model/payment_method_path"/>
</a:dataSet>
<a:dataSet id="receipt_type_ds" lookupCode="RECEIPT_TYPE"/>
<a:dataSet id="currency_ds">
<a:datas dataSource="/model/currency"/>
</a:dataSet>
<a:dataSet id="transaction_type_ds">
<a:datas dataSource="/model/transaction_type"/>
</a:dataSet>
<!-- <a:dataSet id="transaction_type_ds" lookupCode="CSH511_TRANSACTION_TYPE"/> -->
<a:dataSet id="posted_flag_ds" lookupCode="CSH510_POST_SELECT"/>
<!-- 去掉退款事务 -->
<a:dataSet id="returned_flag_ds">
<a:datas dataSource="/model/returned_flag_rp"/>
</a:dataSet>
<!-- 去掉反冲事务 -->
<a:dataSet id="reversed_flag_ds">
<a:datas dataSource="/model/reversed_flag_rp"/>
</a:dataSet>
<a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
<a:dataSet id="csh510_collection_classes_batch_update_ds">
<a:fields>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true">
<a:fields>
<a:field name="bank_account_name" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="bank_branch_name" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="bank_account_num" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="confirmed_flag_desc" options="confirmed_flag_ds" valueField="code_value" displayField="code_value_name" returnField="confirmed_flag"/>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
<a:field name="bp_name_from" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id_from"/>
<a:map from="bp_name" to="bp_name_from"/>
</a:mapping>
</a:field>
<a:field name="bp_id_from"/>
<a:field name="bp_name_to" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id_to"/>
<a:map from="bp_name" to="bp_name_to"/>
</a:mapping>
</a:field>
<a:field name="bp_id_to"/>
<a:field name="transaction_num_from"/>
<a:field name="transaction_num_to"/>
<a:field name="bank_slip_num_from"/>
<a:field name="bank_slip_num_to"/>
<a:field name="transaction_date_from" validator="dateValidator"/>
<a:field name="transaction_date_to" validator="dateValidator"/>
<a:field name="bank_account_code" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_code" to="bank_account_code"/>
</a:mapping>
</a:field>
<a:field name="bank_account_code_from" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_code" to="bank_account_code_from"/>
</a:mapping>
</a:field>
<a:field name="bank_account_from_id"/>
<a:field name="bank_account_code_to" autoComplete="true" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_code" to="bank_account_code_to"/>
</a:mapping>
</a:field>
<a:field name="transaction_amount_from"/>
<a:field name="transaction_amount_to"/>
<a:field name="posted_flag_display" displayField="code_value_name" options="posted_flag_ds" returnField="posted_flag" valueField="code_value"/>
<a:field name="posted_flag" defaultValue="N"/>
<a:field name="returned_flag_display" displayField="code_value_name" options="returned_flag_ds" returnField="returned_flag" valueField="code_value"/>
<a:field name="reversed_flag_display" displayField="code_value_name" options="reversed_flag_ds" returnField="reversed_flag" valueField="code_value"/>
<a:field name="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov" lovWidth="500" title="GLD_PERIODS.PERIOD_NAME">
<a:mapping>
<a:map from="period_name" to="period_name"/>
</a:mapping>
</a:field>
<a:field name="user_desc" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="basic.sys_user_for_lov" lovWidth="500" prompt="AUT_TRX_USER_AUTHORIZE.USER_ID" title="员工选择">
<a:mapping>
<a:map from="description" to="user_desc"/>
<a:map from="user_id" to="user_id"/>
</a:mapping>
</a:field>
<a:field name="transaction_type_display" displayField="code_value_name" options="transaction_type_ds" returnField="transaction_type" valueField="code_value"/>
<a:field name="currency_name_from_display" displayField="currency_name" options="currency_ds" returnField="currency_code_from" valueField="currency_code"/>
<a:field name="currency_code_from"/>
<a:field name="currency_name_to_display" displayField="currency_name" options="currency_ds" returnField="currency_code_to" valueField="currency_code"/>
<a:field name="currency_code_to"/>
<a:field name="transaction_type" defaultValue="RECEIPT"/>
<a:field name="transaction_category" defaultValue="BUSINESS"/>
<a:field name="write_off_flag_desc" displayField="code_value_name" options="write_off_flag_ds" returnField="write_off_flag" valueField="code_value"/>
<a:field name="not_reversed_flag_r" defaultValue="NOT"/>
<a:field name="receipt_type"/>
<a:field name="receipt_type_des" displayField="code_value_name" options="receipt_type_ds" returnField="receipt_type" valueField="code_value"/>
<a:field name="description"/>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
</a:mapping>
</a:field>
<a:field name="collection_classes_n" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<!--对方账户的-->
<a:field name="bp_bank_account_name" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
<a:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
<a:map from="opposite_band_na" to="opposite_band_na"/>
<a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
</a:mapping>
</a:field>
<a:field name="opposite_band_na" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
<a:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
<a:map from="opposite_band_na" to="opposite_band_na"/>
<a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
</a:mapping>
</a:field>
<a:field name="bp_bank_account_num" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
<a:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
<a:map from="opposite_band_na" to="opposite_band_na"/>
<a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
</a:mapping>
</a:field>
</a:fields>
<a:events>
<a:event name="update" handler="csh510_receipt_maintain_update"/>
</a:events>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_maintain_result_ds" autoPageSize="true" autoQuery="true" model="csh.CSH510.csh_transaction_miantain_query" queryDataSet="csh_transaction_receipt_maintain_query_ds" selectable="true"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<!-- <a:gridButton click="csh510_receipt_back" text="HLS.BACK"/>
<a:gridButton click="csh510_receipt_forward" text="HLS.FORWARD"/> -->
<!-- <a:gridButton click="csh510_receipt_quit" text="HLS.EXIT"/> -->
<a:gridButton click="csh509_csh_trx_bank_account_confirm" text="新增确认"/>
<a:gridButton click="csh509_csh_trx_bank_account_refuse" text="新增驳回"/>
<a:gridButton click="csh509_csh_trx_bank_return" text="退款"/>
<a:gridButton click="csh509_csh_trx_bank_account_drop" text="作废"/>
<a:gridButton click="csh510_receipt_query" text="查询"/>
<!--<a:gridButton click="csh510_receipt_remove" text="HLS.REMOVE"/>-->
<!-- <a:gridButton click="csh510_csh_trx_bank_apply_new" text="CSH510.CSH_TRANSACTION.APPLY_NEW_BTN"/>
<a:gridButton click="csh510_csh_trx_bank_drop" text="CSH510.CSH_TRANSACTION.DROP_BTN"/>-->
<a:gridButton click="csh510_receipt_reset" text="HLS.RESET"/>
<!-- <a:gridButton click="csh510_csh_transaction_batch_update" text="批量过账"/>-->
<!-- <a:gridButton click="csh510_receipt" text="财务认领"/> -->
</a:screenTopToolbar>
<a:form bindTarget="csh_transaction_receipt_write_off_query_ds" labelWidth="120" marginWidth="80"
title="收款核销" style="margin-left:20px">
<a:hBox>
<a:fieldSet column="4" labelWidth="150" title="HLS.QUERY_TITLE">
<a:datePicker name="transaction_date_from" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_FROM"/>
<a:datePicker name="transaction_date_to" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_TO"/>
<a:numberField name="transaction_amount_from" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_FROM" align="right"/>
<a:numberField name="transaction_amount_to" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_TO" align="right"/>
<!--我方账户户名-->
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME"/>
<a:lov name="bank_branch_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME"/>
<a:lov name="bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME"/>
<!--银行流水号-->
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE"/>
<!--对方账户户名-->
<a:lov name="bp_bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<!--对方银行名称-->
<a:lov name="opposite_band_na" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<!--对方账户账号-->
<a:lov name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:textField style="display:none"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BILL_STATUS"/>
<a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"/>
<a:comboBox name="collection_classes_n" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"/>
</a:fieldSet>
</a:hBox>
</a:form>
<a:fieldSet labelWidth="150" title="收款单" style="margin-left:20px">
<a:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="csh_transaction_receipt_maintain_result_ds" marginHeight="300" marginWidth="80" navBar="true" >
<!--<a:toolBar>
<a:button click="csh510_export" text="导出"/>
</a:toolBar>-->
<a:columns>
<a:column name="transaction_num" prompt="现金事务编号" renderer="seedetail_transaction_num" width="110"/>
<a:column name="receipt_type" align="center" prompt="收款类型" width="100"/>
<a:column name="transaction_amount" align="center" prompt="收款金额" width="100"/>
<a:column name="transaction_date" renderer="Leaf.formatDate"/>
<a:column name="returned_amount" prompt="退款金额" align="right" />
<a:column name="use_money_amount" prompt="可用金额" align="right"/>
<a:column name="collection_classes_desc" prompt="款项用途"/>
<a:column name="bp_name" prompt="商业伙伴"/>
<a:column name="bank_slip_num" prompt="银行流水号"/>
<a:column name="description" prompt="摘要"/>
<a:column name="confirmed_flag_desc" prompt="单据状态"/>
<a:column name="written_off_flag_desc" prompt="核销状态"/>
<a:column prompt="我方账户">
<a:column prompt="户名" name="bank_account_name"/>
<a:column prompt="银行" name="bank_branch_name"/>
<a:column prompt="账号" name="bank_account_num"/>
</a:column>
<a:column prompt="对方账户">
<a:column prompt="户名" name="bp_bank_account_name"/>
<a:column prompt="银行" name="opposite_band_na"/>
<a:column prompt="账号" name="bp_bank_account_num"/>
</a:column>
<a:column name="user_desc" prompt="HLS.DOCUMENT_CREATED_BY"/>
<a:column name="mkt_confirmed_by" prompt="营业确认人"/>
<a:column name="acc_confirmed_by" prompt="会计确认人"/>
</a:columns>
</a:grid>
</a:fieldSet>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
$Author: sf $Author: sf
$Date: 2019-09-09 上午11:10:33 $Date: 2019-09-06 上午11:10:33
$Revision: 1.0 $Revision: 1.0
$Purpose: 收款确认页面 $Purpose: 根据角色来确定用户是否可以进行操作
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure> <a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/> <a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/> <a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
<a:model-query defaultWhereClause="t.code = &apos;CSH511_TRANSACTION_TYPE&apos; and t.code_value in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="transaction_type"/> <a:model-query defaultWhereClause="t.code = &apos;CSH511_TRANSACTION_TYPE&apos; and t.code_value in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="transaction_type"/>
...@@ -21,29 +22,190 @@ ...@@ -21,29 +22,190 @@
<!-- <a:link id="csh_transaction_receipt_maintain_post_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_post_query.lview"/> --> <!-- <a:link id="csh_transaction_receipt_maintain_post_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_post_query.lview"/> -->
<a:link id="csh510_csh_transaction_batch_update" model="csh.CSH510.csh_transaction_delete" modelaction="batch_update"/> <a:link id="csh510_csh_transaction_batch_update" model="csh.CSH510.csh_transaction_delete" modelaction="batch_update"/>
<a:link id="csh511_csh_transaction_batch_post_link" model="csh.CSH511.csh_transaction_post" modelaction="batch_update"/> <a:link id="csh511_csh_transaction_batch_post_link" model="csh.CSH511.csh_transaction_post" modelaction="batch_update"/>
<!--更新收款单据的状态-->
<a:link id="csh510N_csh_transaction_batch_update_confirmed_flag" model="csh.CSH510.csh_transaction_update" modelaction="batch_update"/>
<a:link id="csh509_batch_update_confirmed_flag" model="csh.CSH509.query_roles_info" modelaction="batch_update"/>
<a:link id="csh_transaction_receipt_maintain_readonly_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_hand_receipt_update_readonly.lview"/>
<!-- <a:link id="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_import.lview"/>-->
<a:link id="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_import.lview"/> <a:link id="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510N/csh_transaction_import.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
//跳转到收款新增页面 //添加一个全局变量,该变量用于判断是债权内勤还是会计担当进行确认
function csh510_csh_trx_bank_hand_add(){ var confirmed_by='';
var url = $('csh_transaction_receipt_link').getUrl(); //判断是债权内勤还是会计担当
var win = new Leaf.Window({
url: url, function judgeRoles(position_code){
id: 'csh_trx_receipt_id',
fullScreen: true, var datas=$('position_code_ds').data;
draggable: true for(var i=0;i<datas.length;i++){
if(datas[i].data.position_code==position_code){
return true;
}
}
return false;
}
//对函数进行封装
function update_confirmed_flag(updateData){
//弹出确认修改的提示框
$L.showConfirm("提示",'确认执行该操作?',function(){
//锁屏
lock_current_window();
//作废单据
Leaf.request({
url: $('csh509_batch_update_confirmed_flag').getUrl(),
para: updateData,
success: function () {
unlock_current_window();
$('csh_transaction_receipt_maintain_result_ds').query();
Leaf.showMessage('${l:PROMPT}', '修改成功!');
}, failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
}); });
})
}
//营业人员确认
function csh509_csh_trx_bank_business_confirm(){
console.log('${/session/@user_id}');
//根据身份判断所选择的数据是否可以确认
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
var updateData=[];
for(var i=0;i<datas.length;i++){
var confirmed_flag= datas[i].get('confirmed_flag');
if(confirmed_flag!='ACCAUDITING'&&confirmed_flag!='DEBTAUDITING'){
$L.showInfoMessage("提示",'请选择新增确认中的收款单据');
return;
}
//
if(confirmed_flag=='ACCAUDITING'){
confirmed_by='00321';
if(!judgeRoles("00321")){
$L.showInfoMessage("提示",'需要会计担当确认单据');
return;
}
}else if(confirmed_flag=='DEBTAUDITING'){
confirmed_by='00217';
if(!judgeRoles("00217")){
$L.showInfoMessage("提示",'需要债权内勤确认单据');
return;
}
}else{
$L.showInfoMessage("提示",'该身份没有确认的权限');
return;
}
//保存要修改的数据
updateData.push({
transaction_id:datas[i].get('transaction_id'),
wanted_confirmed_flag: 'APPROVED',
wanted_written_off_flag: 'NOT',
confirmed_by :confirmed_by,
_status : 'update'
})
}
//更新数据
update_confirmed_flag(updateData);
}
//营业人员驳回单据
function csh509_csh_trx_bank_refuse(){
//驳回收款单
//根据身份判断所选择的数据是否可以确认
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
if(datas.length==0){
$L.showInfoMessage("提示",'请先选择数据');
return;
}
var updateData=[];
for(var i=0;i<datas.length;i++){
var confirmed_flag= datas[i].get('confirmed_flag');
if(confirmed_flag!='ACCAUDITING'&&confirmed_flag!='DEBTAUDITING'){
$L.showInfoMessage("提示",'请选择新增确认中的收款单据');
return;
}
//需要债权用户和会计担当才能驳回单据
if(confirmed_flag=='ACCAUDITING'){
if(!judgeRoles("00321")){
$L.showInfoMessage("提示",'需要会计担驳回单据');
return;
}
}
if(confirmed_flag=='DEBTAUDITING'){
if(!judgeRoles("00217")){
$L.showInfoMessage("提示",'需要债权内勤驳回单据');
return;
}
}
//保存要修改的数据
updateData.push({
transaction_id:datas[i].get('transaction_id'),
wanted_confirmed_flag: 'REJECTED',
_status : 'update'
})
}
//更新数据
update_confirmed_flag(updateData);
}
//新增单据的作废
function csh509_csh_trx_bank_drop(){
//驳回收款单
//根据身份判断所选择的数据是否可以确认
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
if(datas.length==0){
$L.showInfoMessage("提示",'请先选择数据');
return;
}
var updateData=[];
for(var i=0;i<datas.length;i++){
var confirmed_flag= datas[i].get('confirmed_flag');
if(confirmed_flag!='ACCAUDITING'&&confirmed_flag!='DEBTAUDITING'){
$L.showInfoMessage("提示",'请选择新增确认中的收款单据');
return;
}
//需要债权用户和会计担当才能驳回单据
if(confirmed_flag=='ACCAUDITING'){
if(!judgeRoles("00321")){
$L.showInfoMessage("提示",'需要会计担当作废单据');
return;
}
}
if(confirmed_flag=='DEBTAUDITING'){
if(!judgeRoles("00217")){
$L.showInfoMessage("提示",'需要债权内勤作废单据');
return;
}
}
//保存要修改的数据
updateData.push({
transaction_id:datas[i].get('transaction_id'),
wanted_confirmed_flag: 'CANCELLED',
_status : 'update'
})
}
//更新数据
update_confirmed_flag(updateData);
} }
//锁表
function lock_current_window() { function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}'); Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
} }
//解锁 //解锁
function unlock_current_window() { function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
} }
...@@ -108,15 +270,10 @@ ...@@ -108,15 +270,10 @@
function seedetail_transaction_num(value, record, name) { function seedetail_transaction_num(value, record, name) {
if (record.get('transaction_id')) { if (record.get('transaction_id')) {
var url; var url;
if (record.get('posted_flag') == 'N') { url = $('csh_transaction_receipt_maintain_readonly_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
url = $('csh_transaction_receipt_maintain_post_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
} /*else*/ else if (record.get('posted_flag') == 'Y') {
url = $('csh_transaction_receipt_update_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
} else {
return value;
} }
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>'; return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
}
} }
function openWindow(url) { function openWindow(url) {
...@@ -334,9 +491,13 @@ ...@@ -334,9 +491,13 @@
function csh510_export() { function csh510_export() {
$('csh_transaction_receipt_maintain_grid_ds')._export(null,'收款维护'); $('csh_transaction_receipt_maintain_grid_ds')._export(null,'收款维护');
} }
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="position_code_ds">
<a:datas dataSource="/model/position_code"/>
</a:dataSet>
<a:dataSet id="write_off_flag_ds" lookupCode="WRITE_OFF_FLAG"/>
<a:dataSet id="confirmed_flag_ds" lookupCode="CONFIRMED_FLAG"> <a:dataSet id="confirmed_flag_ds" lookupCode="CONFIRMED_FLAG">
</a:dataSet> </a:dataSet>
<a:dataSet id="payment_method_ds"> <a:dataSet id="payment_method_ds">
...@@ -368,8 +529,52 @@ ...@@ -368,8 +529,52 @@
</a:dataSet> </a:dataSet>
<a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true"> <a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="bank_account_name" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" title="CSH511.BANK_ACCOUNT_CODE">
<a:field name="confirmed_flag" options="confirmed_flag_ds" valueField="code_value" displayField="code_value_name" returnField="payment_method_id"/> <a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="bank_branch_name" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="bank_account_num" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="confirmed_flag_desc" options="confirmed_flag_ds" valueField="code_value" displayField="code_value_name" returnField="confirmed_flag"/>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/> <a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
<a:field name="bp_name_from" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE"> <a:field name="bp_name_from" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping> <a:mapping>
...@@ -431,7 +636,7 @@ ...@@ -431,7 +636,7 @@
<a:field name="currency_code_to"/> <a:field name="currency_code_to"/>
<a:field name="transaction_type" defaultValue="RECEIPT"/> <a:field name="transaction_type" defaultValue="RECEIPT"/>
<a:field name="transaction_category" defaultValue="BUSINESS"/> <a:field name="transaction_category" defaultValue="BUSINESS"/>
<a:field name="write_off_flag"/> <a:field name="write_off_flag_desc" displayField="code_value_name" options="write_off_flag_ds" returnField="write_off_flag" valueField="code_value"/>
<a:field name="not_reversed_flag_r" defaultValue="NOT"/> <a:field name="not_reversed_flag_r" defaultValue="NOT"/>
<a:field name="receipt_type"/> <a:field name="receipt_type"/>
<a:field name="receipt_type_des" displayField="code_value_name" options="receipt_type_ds" returnField="receipt_type" valueField="code_value"/> <a:field name="receipt_type_des" displayField="code_value_name" options="receipt_type_ds" returnField="receipt_type" valueField="code_value"/>
...@@ -442,7 +647,29 @@ ...@@ -442,7 +647,29 @@
<a:map from="bp_name" to="bp_name"/> <a:map from="bp_name" to="bp_name"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/> <a:field name="collection_classes_n" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<!--对方账户的-->
<a:field name="bp_bank_account_name" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
<a:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
<a:map from="opposite_band_na" to="opposite_band_na"/>
<a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
</a:mapping>
</a:field>
<a:field name="opposite_band_na" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
<a:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
<a:map from="opposite_band_na" to="opposite_band_na"/>
<a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
</a:mapping>
</a:field>
<a:field name="bp_bank_account_num" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
<a:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
<a:map from="opposite_band_na" to="opposite_band_na"/>
<a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
</a:mapping>
</a:field>
</a:fields> </a:fields>
<a:events> <a:events>
...@@ -454,11 +681,19 @@ ...@@ -454,11 +681,19 @@
<a:screenBody> <a:screenBody>
<a:screenTopToolbar> <a:screenTopToolbar>
<a:screenTitle/> <a:screenTitle/>
<a:gridButton click="csh510_receipt_query" text="新增确认"/> <!-- <a:gridButton click="csh510_receipt_back" text="HLS.BACK"/>
<a:gridButton click="csh510_csh_trx_bank_import" text="新增驳回"/> <a:gridButton click="csh510_receipt_forward" text="HLS.FORWARD"/> -->
<a:gridButton click="csh510_csh_trx_bank_hand_add" text="作废"/> <!-- <a:gridButton click="csh510_receipt_quit" text="HLS.EXIT"/> -->
<a:gridButton click="csh510_csh_trx_bank_apply_new" text="查询"/> <a:gridButton click="csh509_csh_trx_bank_business_confirm" text="新增确认"/>
<a:gridButton click="csh509_csh_trx_bank_refuse" text="新增驳回"/>
<a:gridButton click="csh509_csh_trx_bank_drop" text="作废"/>
<a:gridButton click="csh510_receipt_query" text="查询"/>
<!--<a:gridButton click="csh510_receipt_remove" text="HLS.REMOVE"/>-->
<!-- <a:gridButton click="csh510_csh_trx_bank_apply_new" text="CSH510.CSH_TRANSACTION.APPLY_NEW_BTN"/>
<a:gridButton click="csh510_csh_trx_bank_drop" text="CSH510.CSH_TRANSACTION.DROP_BTN"/>-->
<a:gridButton click="csh510_receipt_reset" text="HLS.RESET"/> <a:gridButton click="csh510_receipt_reset" text="HLS.RESET"/>
<!-- <a:gridButton click="csh510_csh_transaction_batch_update" text="批量过账"/>-->
<!-- <a:gridButton click="csh510_receipt" text="财务认领"/> -->
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form bindTarget="csh_transaction_receipt_write_off_query_ds" labelWidth="120" marginWidth="80" <a:form bindTarget="csh_transaction_receipt_write_off_query_ds" labelWidth="120" marginWidth="80"
title="收款核销" style="margin-left:20px"> title="收款核销" style="margin-left:20px">
...@@ -466,23 +701,25 @@ ...@@ -466,23 +701,25 @@
<a:fieldSet column="4" labelWidth="150" title="HLS.QUERY_TITLE"> <a:fieldSet column="4" labelWidth="150" title="HLS.QUERY_TITLE">
<a:datePicker name="transaction_date_from" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_FROM"/> <a:datePicker name="transaction_date_from" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_FROM"/>
<a:datePicker name="transaction_date_to" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_TO"/> <a:datePicker name="transaction_date_to" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_TO"/>
<a:numberField name="transaction_amount_from" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_FROM"/> <a:numberField name="transaction_amount_from" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_FROM" align="right"/>
<a:numberField name="transaction_amount_to" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_TO"/> <a:numberField name="transaction_amount_to" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_TO" align="right"/>
<!--new --> <!--我方账户户名-->
<a:comboBox name="my_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME"/> <a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME"/>
<a:comboBox name="my_bank_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME"/> <a:lov name="bank_branch_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME"/>
<a:comboBox name="my_account_username" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME"/> <a:lov name="bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME"/>
<a:textField name="bank_cash_code" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE"/> <!--银行流水号-->
<!--other line--> <a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE"/>
<a:lov name="your_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/> <!--对方账户户名-->
<a:lov name="your_bank_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/> <a:lov name="bp_bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<a:lov name="your_account_username" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/> <!--对方银行名称-->
<a:lov name="opposite_band_na" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<!--对方账户账号-->
<a:lov name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:textField style="display:none"/> <a:textField style="display:none"/>
<!--other line--> <a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:lov name="business_partner" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/> <a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BILL_STATUS"/>
<a:comboBox name="confirmed_flag" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BILL_STATUS"/> <a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"/>
<a:comboBox name="written_off_status" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"/> <a:comboBox name="collection_classes_n" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"/>
<a:comboBox name="purpose_of_funds" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"/>
</a:fieldSet> </a:fieldSet>
...@@ -497,29 +734,29 @@ ...@@ -497,29 +734,29 @@
<a:columns> <a:columns>
<a:column name="transaction_num" prompt="现金事务编号" renderer="seedetail_transaction_num" width="110"/> <a:column name="transaction_num" prompt="现金事务编号" renderer="seedetail_transaction_num" width="110"/>
<a:column name="receipt_type" align="center" prompt="收款类型" width="100"/> <a:column name="receipt_type" align="center" prompt="收款类型" width="100"/>
<a:column name="receipt_money_amount" align="center" prompt="收款金额" width="100"/> <a:column name="transaction_amount" align="center" prompt="收款金额" width="100"/>
<a:column name="transaction_date" renderer="Leaf.formatDate"/> <a:column name="transaction_date" renderer="Leaf.formatDate"/>
<a:column name="back_money_amount" prompt="退款金额" align="right"/> <a:column name="returned_amount" prompt="退款金额" align="right" />
<a:column name="use_money_amount" prompt="可用金额" align="right"/> <a:column name="use_money_amount" prompt="可用金额" align="right"/>
<a:column name="collection_classes" prompt="款项用途"/> <a:column name="collection_classes_desc" prompt="款项用途"/>
<a:column name="business_partner" prompt="商业伙伴"/> <a:column name="bp_name" prompt="商业伙伴"/>
<a:column name="bank_cash_code" prompt="银行流水号"/> <a:column name="bank_slip_num" prompt="银行流水号"/>
<a:column name="description" prompt="摘要"/> <a:column name="description" prompt="摘要"/>
<a:column name="confirmed_flag" prompt="单据状态"/> <a:column name="confirmed_flag_desc" prompt="单据状态"/>
<a:column name="written_off_status" prompt="核销状态"/> <a:column name="written_off_flag_desc" prompt="核销状态"/>
<a:column prompt="我方账户"> <a:column prompt="我方账户">
<a:column prompt="户名" name="my_account_name"/> <a:column prompt="户名" name="bank_account_name"/>
<a:column prompt="银行" name="my_bank_name"/> <a:column prompt="银行" name="bank_branch_name"/>
<a:column prompt="账号" name="my_account_username"/> <a:column prompt="账号" name="bank_account_num"/>
</a:column> </a:column>
<a:column prompt="对方账户"> <a:column prompt="对方账户">
<a:column prompt="户名" name="your_account_name"/> <a:column prompt="户名" name="bp_bank_account_name"/>
<a:column prompt="银行" name="your_bank_name"/> <a:column prompt="银行" name="opposite_band_na"/>
<a:column prompt="账号" name="your_account_username"/> <a:column prompt="账号" name="bp_bank_account_num"/>
</a:column> </a:column>
<a:column name="user_desc" prompt="HLS.DOCUMENT_CREATED_BY"/> <a:column name="user_desc" prompt="HLS.DOCUMENT_CREATED_BY"/>
<a:column name="confirmed_user" prompt="HLS.DOCUMENT_CONFIRMED_BY"/> <a:column name="debt_confirmed_by_desc" prompt="债权确认人"/>
<a:column name="acc_confirmed_by_desc" prompt="会计确认人"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:fieldSet> </a:fieldSet>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sf
$Date: 2019-9-16 下午03:19:57
$Revision: 1.0
$Purpose: 点击合同编号进行维护收款
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
<a:model-query fetchAll="true" model="gld.gld_exchangerate_type_lov" rootPath="exchangerate_type_path"/>
<a:model-query fetchAll="true" model="csh.CSH511.fnd_financial_option" rootPath="fnd_financial_option_path"/>
<a:model-query fetchAll="true" model="csh.CSH511.csh_transaction_default_exchange_rate_type" rootPath="default_exchange_rate_type_path"/>
</a:init-procedure>
<a:view>
<a:link id="hn2050_upload_win_link" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="csh_receipt_import_link" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt_impiort.lview"/>
<a:link id="csh_transaction_receipt_id" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="get_exchange_rate_link_id" model="csh.CSH511.csh_transaction_get_exchange_rate" modelaction="query"/>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<a:link id="csh510_update_bp_info_link" model="csh.CSH510.csh_transaction_update_bp_info" modelaction="update"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<script type="text/javascript"><![CDATA[
//附件上传
function upload_attachment_win() {
/* var record = $(ds_id).findById(record_id);
var mortgage_id = record.get('mortgage_id');*/
var win = new Leaf.Window({
id: 'hn2050_upload_win',
url: $('hn2050_upload_win_link').getUrl(),
params: {
winid: 'hn2050_upload_win',
table_name: 'hn_virtual_con_mortgage',
header_id: 1000
},
width: 900,
hight: 400
}).on('close', function() {
//record.ds.query();
});
}
var transaction_id;
<!--增加重置功能-->
function csh511_receipt_reset(){
$('csh_transaction_receipt_head_ds').reset();
}
function csh511_receipt_import_and_write_off() {
new Leaf.Window({
url: $('csh_receipt_import_link').getUrl(),
params: {
action_type: 'TRANSACTION_AND_WRITE_OFF'
},
title: '收款导入并核销',
id: 'csh_receipt_import_and_write_off_window',
fullScreen: true
});
}
function csh511_receipt_import() {
new Leaf.Window({
url: $('csh_receipt_import_link').getUrl(),
params: {
action_type: 'TRANSACTION'
},
title: '收款导入',
id: 'csh_receipt_import_window',
fullScreen: true
});
}
function csh511_receipt_save() {
var record=$('csh_transaction_receipt_head_ds').getAt(0);
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('csh510_update_bp_info_link').getUrl(),
para: {
transaction_id: record.get('transaction_id'),
bp_id : record.get('bp_id'),
},
success: function(){
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
$('csh510_update_bp_info_link').query();
},
scope: this
});
}
function csh511_receipt_posted() {
if ($('csh_transaction_receipt_head_ds').validate()) {
Leaf.Masker.mask(Ext.getBody(), '${l:CSH511.SAVE_AND_POST}');
csh511_receipt_save('Y');
}
}
function csh511_receipt_back() {
history.go(-1);
}
function onUpdate_csh511_receipt(ds, record, name, value, oldvalue) {
if (name == 'bp_id') {
if (value != oldvalue) {
record.set('bp_bank_account_id', '');
record.set('bp_bank_account_code', '');
record.set('bp_bank_account_name', '');
record.set('bp_bank_account_num', '');
record.set('opposite_band_na', '');
}
record.getField('bp_bank_account_code').setLovPara('bp_id', value);
} else if (name == 'currency_code') {
if (value != oldvalue) {
record.set('exchange_rate', '');
record.set('exchange_rate_type', '');
record.set('rate_method_code', '');
record.set('exchange_rate_type_display', '');
record.set('exchange_rate_quotation', '');
if (oldvalue != null && oldvalue != '') {
// record.set('transaction_amount', '');
record.set('transaction_functional_amount', '');
}
}
if (value == record.get('functional_currency_code')) {
record.getField('exchange_rate_type_display').setRequired(false);
record.getField('exchange_rate_type').setReadOnly(true);
record.getField('exchange_rate_type_display').setReadOnly(true);
record.getField('exchange_rate').setReadOnly(true);
record.set('exchange_rate', 1);
} else {
record.set('exchange_rate_type', '${/model/fnd_financial_option_path/record/@default_exchange_rate_type}');
record.set('rate_method_code', '${/model/fnd_financial_option_path/record/@rate_method_code}');
record.set('exchange_rate_type_display', '${/model/fnd_financial_option_path/record/@exchange_rate_type_display}');
record.getField('exchange_rate_type_display').setRequired(true);
record.getField('exchange_rate_type_display').setReadOnly(false);
}
} else if (name == 'rate_method_code' || name == 'period_name') {
if (record.get('currency_code') != record.get('functional_currency_code')) {
var rate_method_code = record.get('rate_method_code');
record.set('exchange_rate_quotation', '');
record.set('exchange_rate', '');
if (rate_method_code == 'PERIOD' || rate_method_code == 'DAILY' || rate_method_code == 'FIXED') {
record.getField('exchange_rate').setReadOnly(true);
record.set('exchange_rate', '');
getExchangeRate({
fromCur: record.get('functional_currency_code'),
toCur: record.get('currency_code'),
exchangeRateType: record.get('exchange_rate_type'),
exchangeDate: record.get('transaction_date'),
periodName: record.get('period_name')
});
} else {
record.set('exchange_rate_quotation', 'DIRECT QUOTATION');
record.getField('exchange_rate').setReadOnly(false);
record.set('exchange_rate', '');
}
}
} else if (name == 'exchange_rate') {
if (record.get('exchange_rate') != null && record.get('exchange_rate') != '') {
setfunctionamount(record);
} else {
record.set('transaction_functional_amount', '');
}
} else if (name == 'transaction_amount') {
if (value === 0 && record.get('zero_amounts_allowed') == 'N') {
Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
}
if (record.get('currency_code') == record.get('functional_currency_code')) {
record.set('transaction_functional_amount', value);
} else {
setfunctionamount(record);
}
} else if (name == 'transaction_date') {
showPeriod(record);
} else if (name == 'precision') {
record.getField('transaction_amount').setPropertity('decimalprecision', value);
record.getField('transaction_functional_amount').setPropertity('decimalprecision', value);
if (record.get('transaction_amount') || record.get('transaction_amount') == 0) {
setfunctionamount(record);
}
} else if (name == 'bank_account_id') {
if (record.get('zero_amounts_allowed') == 'N' && record.get('transaction_amount') === 0) {
Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
}
}
}
// function onAdd_csh511_receipt(ds, record) {
// record.set('precision',2);
// record.set('zero_amounts_allowed','N');
// record.set('bank_account_id',1531);
// record.set('bank_account_num','448165800609');
// record.set('bank_account_name','德融国际融资租赁有限公司');
// record.set('bank_account_code','0040101');
// record.set('currency_code','CNY');
// record.set('currency_name','人民币');
// }
function onAdd_csh511_receipt(ds, record) {
record.set('precision', 2);
record.set('zero_amounts_allowed', 'N');
record.set('bank_account_id', 1531);
// record.set('bank_account_num','448165800609');
// record.set('bank_account_name','德融国际融资租赁有限公司');
// record.set('bank_account_code','0040101');
record.set('currency_code', 'CNY');
record.set('currency_name', '人民币');
}
function setfunctionamount(record) {
var quotation = record.get('exchange_rate_quotation');
var a = record.get('transaction_amount');
var b = record.get('exchange_rate');
if (Ext.isDefined(a) && Ext.isDefined(b) && !Ext.isEmpty(a) && !Ext.isEmpty(b)) {
if (quotation == 'DIRECT QUOTATION') {
record.set('transaction_functional_amount', parseFloat(mul(a, b).toFixed(record.get('precision'))));
} else {
record.set('transaction_functional_amount', parseFloat(div(a, b).toFixed(record.get('precision'))));
}
}
}
function showPeriod(record) {
var r_date = record.get('transaction_date');
r_date = Leaf.formatDate(r_date);
Leaf.request({
url: $('get_period_name_id').getUrl(),
para: {
p_date: r_date
},
success: periodname,
scope: this
});
}
function periodname(res) {
var head_record = $('csh_transaction_receipt_head_ds').getAt(0);
if (res) {
var period_name = res.result.record.period_name,
internal_period_num = res.result.record.internal_period_num;
if (period_name) {
head_record.set('period_name', period_name);
head_record.set('internal_period_num', internal_period_num);
} else {
head_record.set('period_name', '');
head_record.set('internal_period_num', '');
if (head_record.get('transaction_date')) {
head_record.set('transaction_date', '');
Leaf.showMessage('${l:PROMPT}', '${l:CSH511.PERIOD_ERROR}');
}
}
}
}
function getExchangeRate(param) {
Leaf.request({
url: $('get_exchange_rate_link_id').getUrl(),
para: {
from_currency: param.fromCur,
to_currency: param.toCur,
exchange_date: param.exchangeDate,
exchange_period_name: param.periodName,
exchange_rate_type: param.exchangeRateType
},
success: setRateAndQuotation,
scope: this
});
}
function setRateAndQuotation(res) {
var record = $('csh_transaction_receipt_head_ds').getAt(0);
if (Ext.isDefined(res.result.record.exchange_rate_quotation)) {
record.set('exchange_rate_quotation', res.result.record.exchange_rate_quotation);
} else {
record.set('exchange_rate_quotation', 'DIRECT QUOTATION');
}
if (Ext.isDefined(res.result.record.exchange_rate)) {
record.set('exchange_rate', res.result.record.exchange_rate);
}
}
function attachment_upload() {
if (transaction_id) {
//
// ds = $('csh_transaction_receipt_head_ds');
// record = ds.getCurrentRecord();
// var header_id = record.get('transaction_id');
var header_id = transaction_id;
var url = $('transaction_uploadFile_id').getUrl() + '?table_name=CSH_TRANSACTION&header_id=' + header_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'transaction_uploadFile_winid',
width: 850,
height: 400
});
win.on('close', function () {
window.location.href = $('csh_transaction_receipt_id').getUrl();
// var url = $('csh_transaction_receipt_id').getUrl();
// Leaf.go(url);
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
return;
}
}
]]></script>
<a:dataSets>
<a:dataSet id="PAID_BYOTHER_FLAG_DS" lookupCode="PAID_BYOTHER_FLAG"/>
<!-- <a:dataSet id="payment_method_ds">
<a:datas dataSource="/model/payment_method_path"/>
</a:dataSet>-->
<!--<a:dataSet id="currency_ds">
<a:datas dataSource="/model/currency"/>
</a:dataSet>-->
<a:dataSet id="exchangerate_type_ds">
<a:datas dataSource="/model/exchangerate_type_path"/>
</a:dataSet>
<!-- <a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>-->
<a:dataSet id="csh_transaction_receipt_head_ds" autoCreate="true" loadData="true" model="csh.CSH511.csh_transaction">
<a:fields>
<a:field name="transaction_date" required="true"/>
<!--<a:field name="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov" lovWidth="500" readOnly="true" required="true" title="GLD_PERIODS.PERIOD_NAME">
<a:mapping>
<a:map from="period_name" to="period_name"/>
</a:mapping>
</a:field>-->
<!--<a:field name="internal_period_num"/>-->
<!--<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>-->
<a:field name="currency_name" displayField="currency_name" options="currency_ds" readOnly="true" required="true" returnField="currency_code" valueField="currency_code">
<a:mapping>
<a:map from="precision" to="precision"/>
</a:mapping>
</a:field>
<a:field name="currency_code"/>
<a:field name="precision"/>
<a:field name="functional_currency_code" defaultValue="${/model/default_exchange_rate_type_path/record/@functional_currency_code}"/>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovLabelWidth="90" lovService="basic.hls_bp_master_v_for_lov" lovWidth="550" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_name" to="csh_bp_name"/>
<a:map from="bp_category" to="bp_category"/>
<a:map from="bp_category_name" to="bp_category_display"/>
</a:mapping>
</a:field>
<!-- <a:field name="bank_slip_num" lovGridHeight="350" lovHeight="600" lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="1200" title="合同编号">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_category" to="bp_category"/>
<a:map from="bp_category_n" to="bp_category_display"/>
<a:map from="contract_number" to="bank_slip_num"/>
</a:mapping>
</a:field> -->
<a:field name="bp_category_display" readOnly="true"/>
<a:field name="transaction_num" readOnly="true"/>
<a:field name="exchange_rate_type_display" displayField="type_name" options="exchangerate_type_ds" readOnly="true" returnField="exchange_rate_type" valueField="type_code">
<a:mapping>
<a:map from="type_code" to="exchange_rate_type"/>
<a:map from="rate_method_code" to="rate_method_code"/>
</a:mapping>
</a:field>
<a:field name="exchange_rate_type"/>
<a:field name="exchange_rate" readOnly="true" required="true"/>
<a:field name="rate_method_code"/>
<a:field name="transaction_amount" required="true"/>
<a:field name="transaction_functional_amount" readOnly="true"/>
<a:field name="bank_account_name" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" required="true" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="zero_amounts_allowed"/>
<a:field name="bp_bank_account_code" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="basic.hls_bp_master_bank_account_v_for_lov?enabled_flag=Y" lovWidth="580" title="CSH511.BP_BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_id" to="bp_bank_account_id"/>
<a:map from="bank_account_num" to="bp_bank_account_num"/>
<a:map from="bank_account_name" to="bp_bank_account_name"/>
<a:map from="bank_account_code" to="bp_bank_account_code"/>
<a:map from="bank_branch_name" to="bp_bank_branch_name"/>
<a:map from="bank_full_name" to="bp_bank_name"/>
</a:mapping>
</a:field>
<!-- <a:field name="ref_contract_number" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH511.csh_con_contract_lov" lovWidth="580" title="CON301.CONTRACT_QUERY">
<a:mapping>
<a:map from="contract_number" to="ref_contract_number"/>
<a:map from="contract_id" to="ref_contract_id"/>
</a:mapping>
</a:field> -->
<a:field name="ref_contract_number" lovGridHeight="320" lovHeight="530" lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="800" title="合同编号">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_category" to="bp_category"/>
<a:map from="bp_category_n" to="bp_category_display"/>
<a:map from="contract_id" to="ref_contract_id"/>
<a:map from="contract_number" to="ref_contract_number"/>
<a:map from="bp_id_agent_level1_n" to="bp_id_agent_level1_n"/>
</a:mapping>
</a:field>
<a:field name="bp_bank_account_num"/>
<a:field name="bp_bank_account_name" required="true"/>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="paid_byother_flag_n" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value"/>
</a:fields>
<a:events>
<!--<a:event name="update" handler="onUpdate_csh511_receipt"/>
<a:event name="add" handler="onAdd_csh511_receipt"/>
<a:event name="load" handler="onAdd_csh511_receipt"/>-->
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton id="csh511_receipt_save_id" click="csh511_receipt_save" text="HLS.SAVE"/>
<a:gridButton id="csh511_receipt_reset_id" click="csh511_receipt_reset" text="HLS.RESET"/>
<!--<a:gridButton id="csh511_receipt_posted_id" click="csh511_receipt_posted" text="HLS.POST"/>-->
<!--<a:gridButton id="csh511_receipt_upload_id" click="attachment_upload" text="附件上传"/>-->
<!--<a:gridButton id="csh511_receipt_back_id" click="csh511_receipt_back" text="HLS.EXIT"/>-->
</a:screenTopToolbar>
<!--<a:form title="CSH511.CSH_RECEIPT">-->
<!--<a:box column="4">-->
<!--<a:datePicker name="transaction_date" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:lov name="period_name" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:comboBox name="currency_name" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--&lt;!&ndash; <a:comboBox name="exchange_rate_type_display" bindTarget="csh_transaction_receipt_head_ds"/> &ndash;&gt;-->
<!--</a:box>-->
<!--<a:box column="4">-->
<!--<a:lov name="ref_contract_num" bindTarget="csh_transaction_receipt_head_ds" prompt="合同编号"/>-->
<!--<a:comboBox name="payment_method_display" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="银行凭证号"/>-->
<!--<a:numberField name="exchange_rate" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds" decimalPrecision="-1"/>-->
<!--</a:box>-->
<!--<a:box column="4">-->
<!--<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:numberField name="ref_n01" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds" prompt="税额"/>-->
<!--&lt;!&ndash; <a:numberField name="transaction_functional_amount" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds"/> &ndash;&gt;-->
<!---->
<!--<a:lov name="bp_name" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:textField name="bp_category_display" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--</a:box>-->
<!--<a:box column="4">-->
<!--<a:lov name="bank_account_code" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:lov name="bp_bank_account_code" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--</a:box>-->
<!--<a:box column="2">-->
<!--<a:textField name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds" width="383"/>-->
<!--<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds" width="383"/>-->
<!--</a:box>-->
<!--<a:box column="4">-->
<!--<a:textArea name="description" bindTarget="csh_transaction_receipt_head_ds" width="383"/>-->
<!--</a:box>-->
<!--</a:form>-->
<!--#删除表格头,添加fieldSet-->
<!-- <a:form title="收款信息" width="1200">-->
<a:fieldSet title="收款手动新增">
<a:box column="3">
<a:datePicker name="transaction_date" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<!-- # 新增现金流字段,代付,商业伙伴,摘要字段-->
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" readOnly="true"/>
<a:comboBox name="paid_byother_flag_n" prompt="代付" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds" prompt="款项分类" readOnly="true"/>
</a:box>
<a:hBox style="width:800px">
<a:textField width="350" name="description" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
</a:hBox>
<!--#添加备注字段-->
<a:hBox style="width:800px">
<a:textField width="350" name="ref_v05" prompt="备注" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
</a:hBox>
</a:fieldSet>
<!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
<!-- <a:comboBox name="currency_name" bindTarget="csh_transaction_receipt_head_ds"/>
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
&lt;!&ndash;<a:textField name="banka" bindTarget="csh_transaction_receipt_head_ds" prompt="账户类型"/>&ndash;&gt;
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="分行名称"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:textField name="bank_account_type_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="账户类型"/>
&lt;!&ndash; <a:comboBox name="exchange_rate_type_display" bindTarget="csh_transaction_receipt_head_ds"/> &ndash;&gt;
</a:box>-->
<!--删除下面的两个box-->
<!-- <a:box column="4">
<a:textField name="description" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField name="purpose" bindTarget="csh_transaction_receipt_head_ds" prompt="用途"/>
</a:box>
<a:box column="4">
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="银行流水号"/>
<a:textField name="gsber" bindTarget="csh_transaction_receipt_head_ds" prompt="业务范围"/>
<a:textField name="sus_belnr" bindTarget="csh_transaction_receipt_head_ds" prompt="SAP凭证号"/>
</a:box>-->
<!-- </a:form>-->
<!--添加两方的账户信息和附件-->
<a:fieldSet title="账户信息">
<a:box column="3" labelWidth="100">
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME" readOnly="true"/>
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME" readOnly="true"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME" readOnly="true"/>
<!--对方账户-->
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME" readOnly="true"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME" readOnly="true"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME" readOnly="true"/>
</a:box>
</a:fieldSet>
<a:fieldSet title="附件">
<a:hBox>
<a>附件上传:</a><a href="javascript:upload_attachment_win()" style="color:red">上传</a>
</a:hBox>
</a:fieldSet>
<!-- <a:form title="对方账户信息" width="1200">
<a:box column="4">
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds" prompt="银行名称"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"/>
</a:box>
</a:form>-->
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sf
$Date: 2019-9-16 下午03:19:57
$Revision: 1.0
$Purpose: 点击合同编号进行维护收款
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
<a:model-query fetchAll="true" model="gld.gld_exchangerate_type_lov" rootPath="exchangerate_type_path"/>
<a:model-query fetchAll="true" model="csh.CSH511.fnd_financial_option" rootPath="fnd_financial_option_path"/>
<a:model-query fetchAll="true" model="csh.CSH511.csh_transaction_default_exchange_rate_type" rootPath="default_exchange_rate_type_path"/>
</a:init-procedure>
<a:view>
<a:link id="hn2050_upload_win_link" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="csh_receipt_import_link" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt_impiort.lview"/>
<a:link id="csh_transaction_receipt_id" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="get_exchange_rate_link_id" model="csh.CSH511.csh_transaction_get_exchange_rate" modelaction="query"/>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<a:link id="csh510_update_bp_info_link" model="csh.CSH510.csh_transaction_update_bp_info" modelaction="update"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<script type="text/javascript"><![CDATA[
//附件上传
function upload_attachment_win() {
/* var record = $(ds_id).findById(record_id);
var mortgage_id = record.get('mortgage_id');*/
var win = new Leaf.Window({
id: 'hn2050_upload_win',
url: $('hn2050_upload_win_link').getUrl(),
params: {
winid: 'hn2050_upload_win',
table_name: 'hn_virtual_con_mortgage',
header_id: 1000
},
width: 900,
hight: 400
}).on('close', function() {
//record.ds.query();
});
}
var transaction_id;
<!--增加重置功能-->
function csh511_receipt_reset(){
$('csh_transaction_receipt_head_ds').reset();
}
function csh511_receipt_import_and_write_off() {
new Leaf.Window({
url: $('csh_receipt_import_link').getUrl(),
params: {
action_type: 'TRANSACTION_AND_WRITE_OFF'
},
title: '收款导入并核销',
id: 'csh_receipt_import_and_write_off_window',
fullScreen: true
});
}
function csh511_receipt_import() {
new Leaf.Window({
url: $('csh_receipt_import_link').getUrl(),
params: {
action_type: 'TRANSACTION'
},
title: '收款导入',
id: 'csh_receipt_import_window',
fullScreen: true
});
}
function csh511_receipt_save() {
var record=$('csh_transaction_receipt_head_ds').getAt(0);
console.log(record.get('bp_id'));
console.log(record.get('transaction_id'));
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('csh510_update_bp_info_link').getUrl(),
para: {
transaction_id: record.get('transaction_id'),
bp_id : record.get('bp_id'),
},
success: function(){
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
$('csh510_update_bp_info_link').query();
},
scope: this
});
}
function csh511_receipt_posted() {
if ($('csh_transaction_receipt_head_ds').validate()) {
Leaf.Masker.mask(Ext.getBody(), '${l:CSH511.SAVE_AND_POST}');
csh511_receipt_save('Y');
}
}
function csh511_receipt_back() {
history.go(-1);
}
function onUpdate_csh511_receipt(ds, record, name, value, oldvalue) {
if (name == 'bp_id') {
if (value != oldvalue) {
record.set('bp_bank_account_id', '');
record.set('bp_bank_account_code', '');
record.set('bp_bank_account_name', '');
record.set('bp_bank_account_num', '');
record.set('opposite_band_na', '');
}
record.getField('bp_bank_account_code').setLovPara('bp_id', value);
} else if (name == 'currency_code') {
if (value != oldvalue) {
record.set('exchange_rate', '');
record.set('exchange_rate_type', '');
record.set('rate_method_code', '');
record.set('exchange_rate_type_display', '');
record.set('exchange_rate_quotation', '');
if (oldvalue != null && oldvalue != '') {
//record.set('transaction_amount', '');
record.set('transaction_functional_amount', '');
}
}
if (value == record.get('functional_currency_code')) {
record.getField('exchange_rate_type_display').setRequired(false);
record.getField('exchange_rate_type').setReadOnly(true);
record.getField('exchange_rate_type_display').setReadOnly(true);
record.getField('exchange_rate').setReadOnly(true);
record.set('exchange_rate', 1);
} else {
record.set('exchange_rate_type', '${/model/fnd_financial_option_path/record/@default_exchange_rate_type}');
record.set('rate_method_code', '${/model/fnd_financial_option_path/record/@rate_method_code}');
record.set('exchange_rate_type_display', '${/model/fnd_financial_option_path/record/@exchange_rate_type_display}');
record.getField('exchange_rate_type_display').setRequired(true);
record.getField('exchange_rate_type_display').setReadOnly(false);
}
} else if (name == 'rate_method_code' || name == 'period_name') {
if (record.get('currency_code') != record.get('functional_currency_code')) {
var rate_method_code = record.get('rate_method_code');
record.set('exchange_rate_quotation', '');
record.set('exchange_rate', '');
if (rate_method_code == 'PERIOD' || rate_method_code == 'DAILY' || rate_method_code == 'FIXED') {
record.getField('exchange_rate').setReadOnly(true);
record.set('exchange_rate', '');
getExchangeRate({
fromCur: record.get('functional_currency_code'),
toCur: record.get('currency_code'),
exchangeRateType: record.get('exchange_rate_type'),
exchangeDate: record.get('transaction_date'),
periodName: record.get('period_name')
});
} else {
record.set('exchange_rate_quotation', 'DIRECT QUOTATION');
record.getField('exchange_rate').setReadOnly(false);
record.set('exchange_rate', '');
}
}
} else if (name == 'exchange_rate') {
if (record.get('exchange_rate') != null && record.get('exchange_rate') != '') {
setfunctionamount(record);
} else {
record.set('transaction_functional_amount', '');
}
} else if (name == 'transaction_amount') {
if (value === 0 && record.get('zero_amounts_allowed') == 'N') {
Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
}
if (record.get('currency_code') == record.get('functional_currency_code')) {
record.set('transaction_functional_amount', value);
} else {
setfunctionamount(record);
}
} else if (name == 'transaction_date') {
showPeriod(record);
} else if (name == 'precision') {
record.getField('transaction_amount').setPropertity('decimalprecision', value);
record.getField('transaction_functional_amount').setPropertity('decimalprecision', value);
if (record.get('transaction_amount') || record.get('transaction_amount') == 0) {
setfunctionamount(record);
}
} else if (name == 'bank_account_id') {
if (record.get('zero_amounts_allowed') == 'N' && record.get('transaction_amount') === 0) {
Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
}
}
}
// function onAdd_csh511_receipt(ds, record) {
// record.set('precision',2);
// record.set('zero_amounts_allowed','N');
// record.set('bank_account_id',1531);
// record.set('bank_account_num','448165800609');
// record.set('bank_account_name','德融国际融资租赁有限公司');
// record.set('bank_account_code','0040101');
// record.set('currency_code','CNY');
// record.set('currency_name','人民币');
// }
function onAdd_csh511_receipt(ds, record) {
record.set('precision', 2);
record.set('zero_amounts_allowed', 'N');
record.set('bank_account_id', 1531);
// record.set('bank_account_num','448165800609');
// record.set('bank_account_name','德融国际融资租赁有限公司');
// record.set('bank_account_code','0040101');
record.set('currency_code', 'CNY');
record.set('currency_name', '人民币');
}
function setfunctionamount(record) {
var quotation = record.get('exchange_rate_quotation');
var a = record.get('transaction_amount');
var b = record.get('exchange_rate');
if (Ext.isDefined(a) && Ext.isDefined(b) && !Ext.isEmpty(a) && !Ext.isEmpty(b)) {
if (quotation == 'DIRECT QUOTATION') {
record.set('transaction_functional_amount', parseFloat(mul(a, b).toFixed(record.get('precision'))));
} else {
record.set('transaction_functional_amount', parseFloat(div(a, b).toFixed(record.get('precision'))));
}
}
}
function showPeriod(record) {
var r_date = record.get('transaction_date');
r_date = Leaf.formatDate(r_date);
Leaf.request({
url: $('get_period_name_id').getUrl(),
para: {
p_date: r_date
},
success: periodname,
scope: this
});
}
function periodname(res) {
var head_record = $('csh_transaction_receipt_head_ds').getAt(0);
if (res) {
var period_name = res.result.record.period_name,
internal_period_num = res.result.record.internal_period_num;
if (period_name) {
head_record.set('period_name', period_name);
head_record.set('internal_period_num', internal_period_num);
} else {
head_record.set('period_name', '');
head_record.set('internal_period_num', '');
if (head_record.get('transaction_date')) {
head_record.set('transaction_date', '');
Leaf.showMessage('${l:PROMPT}', '${l:CSH511.PERIOD_ERROR}');
}
}
}
}
function getExchangeRate(param) {
Leaf.request({
url: $('get_exchange_rate_link_id').getUrl(),
para: {
from_currency: param.fromCur,
to_currency: param.toCur,
exchange_date: param.exchangeDate,
exchange_period_name: param.periodName,
exchange_rate_type: param.exchangeRateType
},
success: setRateAndQuotation,
scope: this
});
}
function setRateAndQuotation(res) {
var record = $('csh_transaction_receipt_head_ds').getAt(0);
if (Ext.isDefined(res.result.record.exchange_rate_quotation)) {
record.set('exchange_rate_quotation', res.result.record.exchange_rate_quotation);
} else {
record.set('exchange_rate_quotation', 'DIRECT QUOTATION');
}
if (Ext.isDefined(res.result.record.exchange_rate)) {
record.set('exchange_rate', res.result.record.exchange_rate);
}
}
function attachment_upload() {
if (transaction_id) {
//
// ds = $('csh_transaction_receipt_head_ds');
// record = ds.getCurrentRecord();
// var header_id = record.get('transaction_id');
var header_id = transaction_id;
var url = $('transaction_uploadFile_id').getUrl() + '?table_name=CSH_TRANSACTION&header_id=' + header_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'transaction_uploadFile_winid',
width: 850,
height: 400
});
win.on('close', function () {
window.location.href = $('csh_transaction_receipt_id').getUrl();
// var url = $('csh_transaction_receipt_id').getUrl();
// Leaf.go(url);
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
return;
}
}
]]></script>
<a:dataSets>
<a:dataSet id="PAID_BYOTHER_FLAG_DS" lookupCode="PAID_BYOTHER_FLAG"/>
<!-- <a:dataSet id="payment_method_ds">
<a:datas dataSource="/model/payment_method_path"/>
</a:dataSet>-->
<!--<a:dataSet id="currency_ds">
<a:datas dataSource="/model/currency"/>
</a:dataSet>-->
<a:dataSet id="exchangerate_type_ds">
<a:datas dataSource="/model/exchangerate_type_path"/>
</a:dataSet>
<!-- <a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>-->
<a:dataSet id="csh_transaction_receipt_head_ds" autoCreate="true" loadData="true" model="csh.CSH511.csh_transaction">
<a:fields>
<a:field name="transaction_date" required="true"/>
<!--<a:field name="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov" lovWidth="500" readOnly="true" required="true" title="GLD_PERIODS.PERIOD_NAME">
<a:mapping>
<a:map from="period_name" to="period_name"/>
</a:mapping>
</a:field>-->
<!--<a:field name="internal_period_num"/>-->
<!--<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>-->
<a:field name="currency_name" displayField="currency_name" options="currency_ds" readOnly="true" required="true" returnField="currency_code" valueField="currency_code">
<a:mapping>
<a:map from="precision" to="precision"/>
</a:mapping>
</a:field>
<a:field name="currency_code"/>
<a:field name="precision"/>
<a:field name="functional_currency_code" defaultValue="${/model/default_exchange_rate_type_path/record/@functional_currency_code}"/>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovLabelWidth="90" lovService="basic.hls_bp_master_v_for_lov" lovWidth="550" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_name" to="csh_bp_name"/>
<a:map from="bp_category" to="bp_category"/>
<a:map from="bp_category_name" to="bp_category_display"/>
</a:mapping>
</a:field>
<!-- <a:field name="bank_slip_num" lovGridHeight="350" lovHeight="600" lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="1200" title="合同编号">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_category" to="bp_category"/>
<a:map from="bp_category_n" to="bp_category_display"/>
<a:map from="contract_number" to="bank_slip_num"/>
</a:mapping>
</a:field> -->
<a:field name="bp_category_display" readOnly="true"/>
<a:field name="transaction_num" readOnly="true"/>
<a:field name="exchange_rate_type_display" displayField="type_name" options="exchangerate_type_ds" readOnly="true" returnField="exchange_rate_type" valueField="type_code">
<a:mapping>
<a:map from="type_code" to="exchange_rate_type"/>
<a:map from="rate_method_code" to="rate_method_code"/>
</a:mapping>
</a:field>
<a:field name="exchange_rate_type"/>
<a:field name="exchange_rate" readOnly="true" required="true"/>
<a:field name="rate_method_code"/>
<a:field name="transaction_amount" required="true"/>
<a:field name="transaction_functional_amount" readOnly="true"/>
<a:field name="bank_account_name" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" required="true" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="zero_amounts_allowed"/>
<a:field name="bp_bank_account_code" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="basic.hls_bp_master_bank_account_v_for_lov?enabled_flag=Y" lovWidth="580" title="CSH511.BP_BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_id" to="bp_bank_account_id"/>
<a:map from="bank_account_num" to="bp_bank_account_num"/>
<a:map from="bank_account_name" to="bp_bank_account_name"/>
<a:map from="bank_account_code" to="bp_bank_account_code"/>
<a:map from="bank_branch_name" to="bp_bank_branch_name"/>
<a:map from="bank_full_name" to="bp_bank_name"/>
</a:mapping>
</a:field>
<!-- <a:field name="ref_contract_number" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH511.csh_con_contract_lov" lovWidth="580" title="CON301.CONTRACT_QUERY">
<a:mapping>
<a:map from="contract_number" to="ref_contract_number"/>
<a:map from="contract_id" to="ref_contract_id"/>
</a:mapping>
</a:field> -->
<a:field name="ref_contract_number" lovGridHeight="320" lovHeight="530" lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="800" title="合同编号">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_category" to="bp_category"/>
<a:map from="bp_category_n" to="bp_category_display"/>
<a:map from="contract_id" to="ref_contract_id"/>
<a:map from="contract_number" to="ref_contract_number"/>
<a:map from="bp_id_agent_level1_n" to="bp_id_agent_level1_n"/>
</a:mapping>
</a:field>
<a:field name="bp_bank_account_num"/>
<a:field name="bp_bank_account_name" required="true"/>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="paid_byother_flag_n" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value"/>
</a:fields>
<a:events>
<!--<a:event name="update" handler="onUpdate_csh511_receipt"/>
<a:event name="add" handler="onAdd_csh511_receipt"/>
<a:event name="load" handler="onAdd_csh511_receipt"/>-->
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<!-- <a:gridButton id="csh511_receipt_save_id" click="csh511_receipt_save" text="HLS.SAVE"/>
<a:gridButton id="csh511_receipt_reset_id" click="csh511_receipt_reset" text="HLS.RESET"/>-->
<!--<a:gridButton id="csh511_receipt_posted_id" click="csh511_receipt_posted" text="HLS.POST"/>-->
<!--<a:gridButton id="csh511_receipt_upload_id" click="attachment_upload" text="附件上传"/>-->
<!--<a:gridButton id="csh511_receipt_back_id" click="csh511_receipt_back" text="HLS.EXIT"/>-->
</a:screenTopToolbar>
<!--<a:form title="CSH511.CSH_RECEIPT">-->
<!--<a:box column="4">-->
<!--<a:datePicker name="transaction_date" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:lov name="period_name" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:comboBox name="currency_name" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--&lt;!&ndash; <a:comboBox name="exchange_rate_type_display" bindTarget="csh_transaction_receipt_head_ds"/> &ndash;&gt;-->
<!--</a:box>-->
<!--<a:box column="4">-->
<!--<a:lov name="ref_contract_num" bindTarget="csh_transaction_receipt_head_ds" prompt="合同编号"/>-->
<!--<a:comboBox name="payment_method_display" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="银行凭证号"/>-->
<!--<a:numberField name="exchange_rate" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds" decimalPrecision="-1"/>-->
<!--</a:box>-->
<!--<a:box column="4">-->
<!--<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:numberField name="ref_n01" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds" prompt="税额"/>-->
<!--&lt;!&ndash; <a:numberField name="transaction_functional_amount" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds"/> &ndash;&gt;-->
<!---->
<!--<a:lov name="bp_name" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:textField name="bp_category_display" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--</a:box>-->
<!--<a:box column="4">-->
<!--<a:lov name="bank_account_code" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:lov name="bp_bank_account_code" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"/>-->
<!--</a:box>-->
<!--<a:box column="2">-->
<!--<a:textField name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds" width="383"/>-->
<!--<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds" width="383"/>-->
<!--</a:box>-->
<!--<a:box column="4">-->
<!--<a:textArea name="description" bindTarget="csh_transaction_receipt_head_ds" width="383"/>-->
<!--</a:box>-->
<!--</a:form>-->
<!--#删除表格头,添加fieldSet-->
<!-- <a:form title="收款信息" width="1200">-->
<a:fieldSet title="收款手动新增">
<a:box column="3">
<a:datePicker name="transaction_date" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<!-- # 新增现金流字段,代付,商业伙伴,摘要字段-->
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" readOnly="true"/>
<a:comboBox name="paid_byother_flag_n" prompt="代付" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER" readOnly="true"/>
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds" prompt="款项分类" readOnly="true"/>
</a:box>
<a:hBox style="width:800px">
<a:textField width="350" name="description" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
</a:hBox>
<!--#添加备注字段-->
<a:hBox style="width:800px">
<a:textField width="350" name="ref_v05" prompt="备注" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
</a:hBox>
</a:fieldSet>
<!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
<!-- <a:comboBox name="currency_name" bindTarget="csh_transaction_receipt_head_ds"/>
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
&lt;!&ndash;<a:textField name="banka" bindTarget="csh_transaction_receipt_head_ds" prompt="账户类型"/>&ndash;&gt;
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="分行名称"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:textField name="bank_account_type_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="账户类型"/>
&lt;!&ndash; <a:comboBox name="exchange_rate_type_display" bindTarget="csh_transaction_receipt_head_ds"/> &ndash;&gt;
</a:box>-->
<!--删除下面的两个box-->
<!-- <a:box column="4">
<a:textField name="description" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField name="purpose" bindTarget="csh_transaction_receipt_head_ds" prompt="用途"/>
</a:box>
<a:box column="4">
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="银行流水号"/>
<a:textField name="gsber" bindTarget="csh_transaction_receipt_head_ds" prompt="业务范围"/>
<a:textField name="sus_belnr" bindTarget="csh_transaction_receipt_head_ds" prompt="SAP凭证号"/>
</a:box>-->
<!-- </a:form>-->
<!--添加两方的账户信息和附件-->
<a:fieldSet title="账户信息">
<a:box column="3" labelWidth="100">
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME" readOnly="true"/>
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME" readOnly="true"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME" readOnly="true"/>
<!--对方账户-->
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME" readOnly="true"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME" readOnly="true"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME" readOnly="true"/>
</a:box>
</a:fieldSet>
<a:fieldSet title="附件">
<a:hBox>
<a>附件上传:</a><a href="javascript:upload_attachment_win()" style="color:red">上传</a>
</a:hBox>
</a:fieldSet>
<!-- <a:form title="对方账户信息" width="1200">
<a:box column="4">
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds" prompt="银行名称"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"/>
</a:box>
</a:form>-->
</a:screenBody>
</a:view>
</a:screen>
...@@ -17,8 +17,10 @@ ...@@ -17,8 +17,10 @@
<a:link id="csh_transaction_receipt_link" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/> <a:link id="csh_transaction_receipt_link" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/> <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
<a:link id="csh_transaction_receipt_update_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/> <a:link id="csh_transaction_receipt_update_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>
<a:link id="csh_transaction_receipt_maintain_post_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/> <!-- <a:link id="csh_transaction_receipt_maintain_post_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>-->
<!-- <a:link id="csh_transaction_receipt_maintain_post_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_post_query.lview"/> --> <a:link id="csh_transaction_receipt_maintain_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_hand_receipt_update.lview"/>
<a:link id="csh_transaction_receipt_maintain_readonly_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_hand_receipt_update_readonly.lview"/>
<a:link id="csh510_csh_transaction_batch_update" model="csh.CSH510.csh_transaction_delete" modelaction="batch_update"/> <a:link id="csh510_csh_transaction_batch_update" model="csh.CSH510.csh_transaction_delete" modelaction="batch_update"/>
<a:link id="csh511_csh_transaction_batch_post_link" model="csh.CSH511.csh_transaction_post" modelaction="batch_update"/> <a:link id="csh511_csh_transaction_batch_post_link" model="csh.CSH511.csh_transaction_post" modelaction="batch_update"/>
<!--更新收款单据的状态--> <!--更新收款单据的状态-->
...@@ -28,39 +30,80 @@ ...@@ -28,39 +30,80 @@
<a:link id="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510N/csh_transaction_import.lview"/> <a:link id="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510N/csh_transaction_import.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
//新增单据的作废
function csh510_csh_trx_bank_drop(){
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
if (datas.length == 0) {
$L.showMessage("提示", '请选择要作废的单据');
return;
}
var post_data=[];
for(var i=0;i<datas.length;i=i+1) {
var confirmed_flag= datas[i].get('confirmed_flag');
//不是新增就报错
if(confirmed_flag!='NEW'&&confirmed_flag!=undefined){
$L.showInfoMessage("提示", '请选择单据为未提交的数据', null, null);
return;
}
//将对象封装到json对象数组
post_data.push({
'transaction_id': datas[i].get('transaction_id'),
//提交想改变之后的状态
'wanted_confirmed_flag': 'CANCELLED',
'_status': 'update'
});
};
//弹出确认修改的提示框
$L.showConfirm("提示",'确认执行该操作?',function(){
//锁屏
lock_current_window();
//作废单据
Leaf.request({
url: $('csh510N_csh_transaction_batch_update_confirmed_flag').getUrl(),
para: post_data,
success: function () {
unlock_current_window();
$('csh_transaction_receipt_maintain_result_ds').query();
Leaf.showMessage('${l:PROMPT}', '该单据已作废!');
}, failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
})
}
//新增申请按钮’ //新增申请按钮’
function csh510_csh_trx_bank_apply_new() { function csh510_csh_trx_bank_apply_new() {
var datas = $('csh_transaction_receipt_maintain_result_ds').selected; var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
//获得所选择的的未提交的单据,如果有不是未提交的数据,提示重新进行选择 //获得所选择的的未提交的单据,如果有不是未提交的数据,提示重新进行选择
if (datas.length == 0) { if (datas.length == 0) {
$L.showMessage("${l:prompt}", '请至少选择一条数据'); $L.showMessage("提示", '请至少选择一条数据');
return; return;
} }
var post_data=[]; var post_data=[];
for(var i=0;i<datas.length;i=i+1) { for(var i=0;i<datas.length;i=i+1) {
var confirmed_flag= datas[i].get('confirmed_flag'); var confirmed_flag = datas[i].get('confirmed_flag');
//不是新增就报错 //不是新增就报错
if(confirmed_flag!='NEW'&&confirmed_flag!=undefined){ if (confirmed_flag != 'NEW' && confirmed_flag != undefined) {
$L.showInfoMessage("提示", '请选择单据为未提交的数据', null, null); $L.showInfoMessage("提示", '请选择单据为未提交的数据', null, null);
return; return;
} }
//弹出确认修改的提示框
var execute_flag=$L.showConfirm("提示",'确认执行该操作?')
//用户取消操作
if(flag==false) return ;
//将对象封装到json对象数组 //将对象封装到json对象数组
post_data.push({ post_data.push({
'transaction_id': datas[i].get('transaction_id'), 'transaction_id': datas[i].get('transaction_id'),
//提交想改变之后的状态
'wanted_confirmed_flag': 'MKTAUDITING',
'_status': 'update' '_status': 'update'
}); });
}; }
console.log(post_data); //弹出确认修改的提示框
$L.showConfirm("提示", '确认执行该操作?', function () {
//锁屏 //锁屏
lock_current_window(); lock_current_window();
//改变未提交单据数据的状态 //改变未提交单据数据的状态
...@@ -79,9 +122,7 @@ ...@@ -79,9 +122,7 @@
}, },
scope: this scope: this
}); });
});
} }
//跳转到收款新增页面 //跳转到收款新增页面
...@@ -166,15 +207,24 @@ ...@@ -166,15 +207,24 @@
} }
function seedetail_transaction_num(value, record, name) { function seedetail_transaction_num(value, record, name) {
console.log(record.get('receipt_type'));
console.log( record.get('bp_name'));
console.log( record.get('confirmed_flag'));
if (record.get('transaction_id')) { if (record.get('transaction_id')) {
var url; var url;
if (record.get('posted_flag') == 'N') { /*if (record.get('posted_flag') == 'N') {
url = $('csh_transaction_receipt_maintain_post_link').getUrl() + '?transaction_id=' + record.get('transaction_id'); url = $('csh_transaction_receipt_maintain_post_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
} /*else*/ else if (record.get('posted_flag') == 'Y') { } /!*else*!/ else if (record.get('posted_flag') == 'Y') {
url = $('csh_transaction_receipt_update_link').getUrl() + '?transaction_id=' + record.get('transaction_id'); url = $('csh_transaction_receipt_update_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
} else { } else {
return value; return value;
}*/
if(record.get('receipt_type')=='IMPORT'&&record.get('bp_name')==null&&record.get('confirmed_flag')=='NEW'){
url = $('csh_transaction_receipt_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id')+'&update_flag=true';
}else{
url = $('csh_transaction_receipt_maintain_readonly_link').getUrl() + '?transaction_id=' + record.get('transaction_id')+'&update_flag=false';
} }
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>'; return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
} }
} }
...@@ -368,6 +418,7 @@ ...@@ -368,6 +418,7 @@
} }
function csh510_csh_trx_bank_import(){ function csh510_csh_trx_bank_import(){
//只有债权内勤才能
var url_l = $('csh510_csh_transaction_import_link').getUrl(); var url_l = $('csh510_csh_transaction_import_link').getUrl();
...@@ -655,8 +706,8 @@ ...@@ -655,8 +706,8 @@
<a:column prompt="账号" name="bp_bank_account_num"/> <a:column prompt="账号" name="bp_bank_account_num"/>
</a:column> </a:column>
<a:column name="user_desc" prompt="HLS.DOCUMENT_CREATED_BY"/> <a:column name="user_desc" prompt="HLS.DOCUMENT_CREATED_BY"/>
<a:column name="mkt_confirmed_by" prompt="营业确认人"/> <a:column name="debt_confirmed_by_desc" prompt="债权确认人"/>
<a:column name="acc_confirmed_by" prompt="会计确认人"/> <a:column name="acc_confirmed_by_desc" prompt="会计确认人"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:fieldSet> </a:fieldSet>
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="import_csh_transaction_receipt_data_link_id" model="csh.CSH510N.csh_transaction_list_tmp" modelaction="execute"/> <a:link id="import_csh_transaction_receipt_data_link_id" model="csh.CSH510N.csh_transaction_list_tmp" modelaction="execute"/>
<a:link id="save_import_csh_transaction_receipt_data_link_id" model="csh.CSH510N.csh_transaction_list_tmp" modelaction="batch_update"/>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/> <a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
...@@ -28,21 +29,29 @@ ...@@ -28,21 +29,29 @@
if(import_flag==0){ if(import_flag==0){
for (var i = 0;i < records.length;i++) { for (var i = 0;i < records.length;i++) {
var record=records[i]; var record=records[i];
if (record.get('status') == 'ERROR') {
/*if (record.get('status') == 'ERROR') {
//错误的行不导入,其他行正常导入,这里不再判断cuo,在插入数据的时候
Leaf.showMessage('${l:PROMPT}', '导入的数据存在错误,请查看错误信息!'); Leaf.showMessage('${l:PROMPT}', '导入的数据存在错误,请查看错误信息!');
return; //将该条数据从导入的ds中
} //return;
}*/
//获得周期时间 //获得周期时间
var r_date = record.get('attribute_3'); /* var r_date = record.get('attribute_3');
r_date = Leaf.formatDate(r_date); r_date = Leaf.formatDate(r_date);
Leaf.request({ Leaf.request({
url: $('get_period_name_id').getUrl(), url: $('get_period_name_id').getUrl(),
para: { para: {
p_date: r_date p_date: r_date,
date : new Date().getMilliseconds()
}, },
success: function(res){ success: function(res){
var period_name = res.result.record.period_name, var period_name = res.result.record.period_name,
internal_period_num = res.result.record.internal_period_num; internal_period_num = res.result.record.internal_period_num;
record.set('period_name', period_name);
record.set('internal_period_num', internal_period_num);
if (period_name) { if (period_name) {
record.set('period_name', period_name); record.set('period_name', period_name);
record.set('internal_period_num', internal_period_num); record.set('internal_period_num', internal_period_num);
...@@ -56,10 +65,11 @@ ...@@ -56,10 +65,11 @@
} }
}, },
scope: this scope: this
}); });*/
//否则的话添加必要的字段 //否则的话添加必要的字段
record.set('receipt_type','import'); record.set('receipt_type','IMPORT');
record.set('transaction_date',record.get('attribute_3')); record.set('bank_account_num',record.get('attribute_1'));
record.set('transaction_date', Leaf.formatDate(record.get('attribute_3')));
record.set('bank_slip_num',record.get('attribute_5')); record.set('bank_slip_num',record.get('attribute_5'));
record.set('currency_code', 'CNY'); record.set('currency_code', 'CNY');
record.set('transaction_amount',record.get('attribute_14')); record.set('transaction_amount',record.get('attribute_14'));
...@@ -69,35 +79,49 @@ ...@@ -69,35 +79,49 @@
record.set('opposite_band_na',record.get('attribute_10')); record.set('opposite_band_na',record.get('attribute_10'));
record.set('description',record.get('attribute_23')); record.set('description',record.get('attribute_23'));
record.set('ref_v05',record.get('attribute_24')); record.set('ref_v05',record.get('attribute_24'));
record.set('paid_byother_flag','F');
record.set('write_off_flag','DISABLED'); record.set('write_off_flag','DISABLED');
record.set('_status','insert');
//根据银行卡号设置我方的银行账号 //根据银行卡号设置我方的银行账号
Leaf.request({ /*Leaf.request({
url: $('import_csh_transaction_receipt_data_link_id').getUrl(), url: $('import_csh_transaction_receipt_data_link_id').getUrl(),
para: { para: {
bank_account_num:record.get('attribute_1'), bank_account_num:record.get('attribute_1'),
bp_bank_account_num:record.get('attribute_8') bp_bank_account_num:record.get('attribute_8')
}, },
success: function(res){ success: function(res){
record.set('bank_account_id',res.result.bank_account_id); record.set('bank_account_id',res.result.bank_account_id);
//根据对方的银行卡号获取商业伙伴信息 //根据对方的银行卡号获取商业伙伴信息
record.set('bp_category',res.result.bp_category); record.set('bp_category',res.result.bp_category);
record.set('bp_id',res.result.bp_id);
record.set('csh_bp_name',res.result.csh_bp_name); record.set('csh_bp_name',res.result.csh_bp_name);
//i. 若能找到唯一值且该商业伙伴类型为承租人,则代付字段为“否”、商业伙伴字段为匹配到的商业伙伴;
// ii. 若能找到唯一值且该商业伙伴类型为代理店,则代付字段为“是”、商业伙伴字段为匹配到的商业伙伴;
//iii. 若无法找到匹配项或匹配到多项,则代付字段为“是”、商业伙伴字段为空;
if(res.result.bp_id!=-1&&res.result.bp_category=='TENANT'){
record.set('paid_byother_flag','F');
record.set('bp_id',res.result.bp_id);
}else if(res.result.bp_id!=-1&&res.result.bp_category=='AGENCY'){
record.set('paid_byother_flag','T');
record.set('bp_id',res.result.bp_id);
}else{
record.set('paid_byother_flag','T');
record.set('bp_id',null);
}
}, },
scope: this scope: this
}); });*/
record.set('_status','insert');
saveData.push(record.data); saveData.push(record.data);
} }
//开始导入数据 //开始导入数据
Leaf.showConfirm('提示', '确定要导入信息吗?', function() {
Leaf.showConfirm('提示', '确定要导入信息吗,有错误信息的数据将不会被导入', function() {
Leaf.request({ Leaf.request({
url: '${/request/@context_path}/autocrud/csh.CSH511.csh_transaction_receipt_save/batch_update', url: $('save_import_csh_transaction_receipt_data_link_id').getUrl(),
para: saveData, para: saveData,
scope: this, scope: this,
success: function () { success: function () {
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<a:model-query fetchAll="true" model="csh.CSH511.csh_transaction_default_exchange_rate_type" rootPath="default_exchange_rate_type_path"/> <a:model-query fetchAll="true" model="csh.CSH511.csh_transaction_default_exchange_rate_type" rootPath="default_exchange_rate_type_path"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="hn2050_upload_win_link" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="csh_receipt_import_link" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt_impiort.lview"/> <a:link id="csh_receipt_import_link" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt_impiort.lview"/>
<a:link id="csh_transaction_receipt_id" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/> <a:link id="csh_transaction_receipt_id" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="get_exchange_rate_link_id" model="csh.CSH511.csh_transaction_get_exchange_rate" modelaction="query"/> <a:link id="get_exchange_rate_link_id" model="csh.CSH511.csh_transaction_get_exchange_rate" modelaction="query"/>
...@@ -21,6 +22,26 @@ ...@@ -21,6 +22,26 @@
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/> <script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/> <a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
//附件上传
function upload_attachment_win() {
/* var record = $(ds_id).findById(record_id);
var mortgage_id = record.get('mortgage_id');*/
console.log($('csh_transaction_receipt_head_ds').getAt(0).id);
var win = new Leaf.Window({
id: 'hn2050_upload_win',
url: $('hn2050_upload_win_link').getUrl(),
params: {
winid: 'hn2050_upload_win',
table_name: 'csh_transaction',
header_id: $('csh_transaction_receipt_head_ds').getAt(0).id
},
width: 900,
hight: 400
}).on('close', function() {
//record.ds.query();
});
}
var transaction_id; var transaction_id;
<!--增加重置功能--> <!--增加重置功能-->
function csh511_receipt_reset(){ function csh511_receipt_reset(){
...@@ -107,6 +128,7 @@ ...@@ -107,6 +128,7 @@
record.set('bp_bank_account_code', ''); record.set('bp_bank_account_code', '');
record.set('bp_bank_account_name', ''); record.set('bp_bank_account_name', '');
record.set('bp_bank_account_num', ''); record.set('bp_bank_account_num', '');
record.set('opposite_band_na', '');
} }
record.getField('bp_bank_account_code').setLovPara('bp_id', value); record.getField('bp_bank_account_code').setLovPara('bp_id', value);
} else if (name == 'currency_code') { } else if (name == 'currency_code') {
...@@ -117,7 +139,7 @@ ...@@ -117,7 +139,7 @@
record.set('exchange_rate_type_display', ''); record.set('exchange_rate_type_display', '');
record.set('exchange_rate_quotation', ''); record.set('exchange_rate_quotation', '');
if (oldvalue != null && oldvalue != '') { if (oldvalue != null && oldvalue != '') {
record.set('transaction_amount', ''); //record.set('transaction_amount', '');
record.set('transaction_functional_amount', ''); record.set('transaction_functional_amount', '');
} }
} }
...@@ -522,9 +544,13 @@ ...@@ -522,9 +544,13 @@
</a:box> </a:box>
</a:fieldSet> </a:fieldSet>
<a:fieldSet title="附件"> <a:fieldSet title="附件">
<input type="file" name="uploadFile"/> <a:hBox>
<input type="button" value="上传"/> <a>附件上传:</a><a href="javascript:upload_attachment_win()" style="color:red">上传</a>
</a:hBox>
</a:fieldSet> </a:fieldSet>
<!-- <a:form title="对方账户信息" width="1200"> <!-- <a:form title="对方账户信息" width="1200">
<a:box column="4"> <a:box column="4">
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/> <a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
......
...@@ -19,8 +19,13 @@ ...@@ -19,8 +19,13 @@
url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/> url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>
<a:link id="hls213_sap_eai_create_vender_link" <a:link id="hls213_sap_eai_create_vender_link"
url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/> url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>
<<<<<<< HEAD
<!-- <a:link id="Identity_ccx_link" <!-- <a:link id="Identity_ccx_link"
url="${/request/@context_path}/modules/interface/INTERFACE_CCX/hlcm_ccxIdentity_interface.lsc"/>--> url="${/request/@context_path}/modules/interface/INTERFACE_CCX/hlcm_ccxIdentity_interface.lsc"/>-->
=======
<!-- <a:link id="Identity_ccx_link"
url="${/request/@context_path}/modules/interface/INTERFACE_CCX/hlcm_ccxIdentity_interface.lsc"/>-->
>>>>>>> fc911afa6f82f272999782f0b1703081ee8d4607
<script src="${/request/@context_path}/javascripts/identity_card_info_query.js" type="text/javascript"/> <script src="${/request/@context_path}/javascripts/identity_card_info_query.js" type="text/javascript"/>
<a:link id="identity_query_link" model="interface.CCX_INTERFACE.identity_query" modelaction="update"/> <a:link id="identity_query_link" model="interface.CCX_INTERFACE.identity_query" modelaction="update"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
...@@ -85,41 +90,42 @@ ...@@ -85,41 +90,42 @@
var bp_record = $(bp_ds_id).getCurrentRecord(); var bp_record = $(bp_ds_id).getCurrentRecord();
var bp_id = bp_record.get('bp_id'); var bp_id = bp_record.get('bp_id');
Leaf.request({ // Leaf.request({
url: $('hls213_sap_eai_create_customer_link').getUrl(), // url: $('hls213_sap_eai_create_customer_link').getUrl(),
para: { // para: {
bp_id: bp_id // bp_id: bp_id
}, // },
scope: this, // scope: this,
success: function () { // success: function () {
Leaf.request({ // Leaf.request({
url: $('hls213_sap_eai_create_vender_link').getUrl(), // url: $('hls213_sap_eai_create_vender_link').getUrl(),
para: { // para: {
bp_id: bp_id // bp_id: bp_id
}, // },
scope: this, // scope: this,
success: function () { // success: function () {
$(bp_ds_id).setQueryParameter('bp_id', bp_id); // $(bp_ds_id).setQueryParameter('bp_id', bp_id);
$(bp_ds_id).query(); // $(bp_ds_id).query();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, // },
failure: function () { // failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, // },
error: function () { // error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, // },
sync: true // sync: true
}); // });
}, // },
failure: function () { // failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, // },
error: function () { // error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// sync: true
// });
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true
});
}; };
...@@ -157,6 +163,81 @@ ...@@ -157,6 +163,81 @@
//由于中诚信测试环境只能测试张三,所以这里限定身份证号为张三的123456199001011233 //由于中诚信测试环境只能测试张三,所以这里限定身份证号为张三的123456199001011233
// if(value=='123456199001011233'){ // if(value=='123456199001011233'){
// //
<<<<<<< HEAD
// var url1 = $('identity_query_link').getUrl();
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
/* Leaf.request({
url: url1,
para: {
id_card_no: value,//身份证号码
bp_name: bp_name
},
success: function (res) {
var resmsg_1 = res.result.resmsg_1;
if (resmsg_1 == '1') {
if (name == 'id_card_no') {
record.set('ccx_resmsg', '身份验证成功');
card_identity_flag = 'Y';
} else {
record.set('ccx_resmsg1', '身份验证成功');
sp_identity_flag = 'Y';
}
} else {
//个人身份验证
var url = $('Identity_ccx_link').getUrl();
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: url,
para: {
bp_name: bp_name,//姓名
id_card_no: value//身份证号码
},
success: function (res) {
var resmsg = res.result.resmsg;
if (name == 'id_card_no') {
record.set('ccx_resmsg', resmsg);
if (resmsg == '身份验证成功') {
card_identity_flag = 'Y';
}
} else {
record.set('ccx_resmsg1', resmsg);
if (resmsg == '身份验证成功') {
sp_identity_flag = 'Y';
}
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this,
sync: true
});
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this,
sync: true
});*/
=======
// var url1 = $('identity_query_link').getUrl(); // var url1 = $('identity_query_link').getUrl();
// window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
/* Leaf.request({ /* Leaf.request({
...@@ -230,6 +311,7 @@ ...@@ -230,6 +311,7 @@
scope: this, scope: this,
sync: true sync: true
});*/ });*/
>>>>>>> fc911afa6f82f272999782f0b1703081ee8d4607
} }
if (value.length == 18) { if (value.length == 18) {
...@@ -275,12 +357,13 @@ ...@@ -275,12 +357,13 @@
//保存前调用,生成商机编号 //保存前调用,生成商机编号
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) { window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
// //
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var head_record = $(ds_id).getCurrentRecord(); var head_record = $(ds_id).getCurrentRecord();
var bp_class = head_record.get('bp_class'); var bp_class = head_record.get('bp_class');
//alert('${/parameter/@unbrand}'); //alert('${/parameter/@unbrand}');
if (bp_class == 'NP') { if (bp_class == 'NP') {
if (card_identity_flag == 'Y' || sp_identity_flag == 'Y') { if (card_identity_flag == 'N' || sp_identity_flag == 'N') {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var check_flag = false; var check_flag = false;
if (head_record.get('bp_code')) { if (head_record.get('bp_code')) {
......
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true">
<a:init-procedure/>
<a:view>
<!-- <a:link id="BmLink_MainScreen_functionHit" model="sys.sys_page_function_visit" modelaction="update"/>-->
<script><![CDATA[
//退出按钮
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
$('hls_bp_master_billing').close();
}
Leaf.onReady(function () {
var billing_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'hls_bp_master');
// console.log($(billing_ds));
$(billing_ds).setQueryParameter("bp_id","${/parameter/@bp_id}");
$(billing_ds).query();
}
)
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
\ No newline at end of file
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
<a:link id="hls214N_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/> <a:link id="hls214N_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="hls214_bp_master_save_link_id" model="hls.HLS214.hls_bp_change_agent" modelaction="update"/> <a:link id="hls214_bp_master_save_link_id" model="hls.HLS214.hls_bp_change_agent" modelaction="update"/>
<a:link id="hls214_sap_eai_create_customer_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/> <!-- <a:link id="hls214_sap_eai_create_customer_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>-->
<a:link id="hls214_sap_eai_create_vender_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/> <!-- <a:link id="hls214_sap_eai_create_vender_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>-->
<script src="${/request/@context_path}/javascripts/identity_card_info_query.js" <script src="${/request/@context_path}/javascripts/identity_card_info_query.js"
type="text/javascript"></script> type="text/javascript"></script>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
...@@ -33,41 +33,41 @@ ...@@ -33,41 +33,41 @@
var bp_record = $(bp_ds_id).getCurrentRecord(); var bp_record = $(bp_ds_id).getCurrentRecord();
var bp_id = bp_record.get('bp_id'); var bp_id = bp_record.get('bp_id');
Leaf.request({ // Leaf.request({
url: $('hls214_sap_eai_create_customer_link').getUrl(), // url: $('hls214_sap_eai_create_customer_link').getUrl(),
para: { // para: {
bp_id: bp_id // bp_id: bp_id
}, // },
scope: this, // scope: this,
success: function () { // success: function () {
Leaf.request({ // Leaf.request({
url: $('hls214_sap_eai_create_vender_link').getUrl(), // url: $('hls214_sap_eai_create_vender_link').getUrl(),
para: { // para: {
bp_id: bp_id // bp_id: bp_id
}, // },
scope: this, // scope: this,
success: function () { // success: function () {
$(bp_ds_id).query(); // $(bp_ds_id).query();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, // },
failure: function () { // failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, // },
error: function () { // error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// sync: true
// });
// },
// failure: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// sync: true
// });
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true
});
}; };
function prj_check_bp_id(record) { function prj_check_bp_id(record) {
......
...@@ -23,10 +23,43 @@ ...@@ -23,10 +23,43 @@
url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_report.lview"/> url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_report.lview"/>
<a:link id="hls_bp_ccx_icinfo_link" <a:link id="hls_bp_ccx_icinfo_link"
url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_icinfo.lview"/> url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_icinfo.lview"/>
<a:link id="hls_bp_master_billing_link"
url="${/request/@context_path}/modules/hls/HLS214N/hls_bp_master_billing.lview"/>
<script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/> <script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master');
//信息变更
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'hls_bp_master');
var data=$(ds_id).selected[0];
var invoice_bp_bank_account = data.get('invoice_bp_bank_account');
var invoice_title = data.get('invoice_title');
var invoice_bp_address_phone_num = data.get('invoice_bp_address_phone_num');
var phone =data.get('phone');
var taxpayer_type =data.get('taxpayer_type');
var invoice_bp_bank =data.get('invoice_bp_bank');
var bp_id=data.get('bp_id');
new Leaf.Window({
id: 'hls_bp_master_billing',
url: $('hls_bp_master_billing_link').getUrl(),
params: {
function_code:'HLS214NS',
invoice_bp_bank_account:invoice_bp_bank_account,
invoice_title:invoice_title,
invoice_bp_address_phone_num:invoice_bp_address_phone_num,
phone:phone,
taxpayer_type:taxpayer_type,
invoice_bp_bank:invoice_bp_bank,
bp_id:bp_id
},
title: '开票信息',
fullScreen: true
});
}
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master');
function open_bp_modify_win(ds_id, record_id) { function open_bp_modify_win(ds_id, record_id) {
...@@ -34,7 +67,7 @@ ...@@ -34,7 +67,7 @@
var record = $(ds_id).findById(record_id); var record = $(ds_id).findById(record_id);
var param = record.data; var param = record.data;
param['function_code'] = 'HLS214D'; param['function_code'] = 'HLS214D';
debugger; // debugger;
if (record.get('bp_category') == 'AGENT') { if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS228DL'; param['function_code'] = 'HLS228DL';
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: chenlingfeng7543
$Date: 2018/12/20 21:19
$Revision: 1.0
$Purpose: 商业伙伴授信维护
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<!--<a:model-query fetchAll="true" model="basic.get_sys_default_time" rootPath="sys_default_time"/>-->
</a:init-procedure>
<a:view>
<!-- <a:link id="hls361_hls_bp_master_credit_assign_link" url="${/request/@context_path}/modules/hls/HLS361/hls_bp_master_credit_assign.lview"/>
<a:link id="hls361_hls_bp_master_credit_detail_link" url="${/request/@context_path}/modules/hls/HLS361/hls_bp_master_credit_detail.lview"/>-->
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<script type="text/javascript"><![CDATA[
/* function open_assign_win(id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
param['function_code'] = 'HLS361A';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
param['url_title'] = '信息维护';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls361_hls_bp_master_credit_assign_link', null);
}
function open_detail_win(id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
param['function_code'] = 'HLS361D';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
param['url_title'] = '信息维护';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls361_hls_bp_master_credit_detail_link', null);
}
//超链接渲染
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {
var link_function = '';
window['${/parameter/@bp_seq}${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'record_detail') {
link_function = 'open_detail_win';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
}
if (name == 'assign_record') {
link_function = 'open_assign_win';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
}
};*/
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
<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_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_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"/> <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"/>
<a:link id="prj_check_prj_record_link_id" model="hls.HLS500N.check_prj_record" modelaction="execute"/>
<style><![CDATA[ <style><![CDATA[
.finGrid td[dataindex=percent]{ .finGrid td[dataindex=percent]{
border-right-color:#FFF; border-right-color:#FFF;
...@@ -76,6 +78,61 @@ ...@@ -76,6 +78,61 @@
Leaf.Masker.mask(document.documentElement, '${l:HLS.LOADING}'); Leaf.Masker.mask(document.documentElement, '${l:HLS.LOADING}');
function hls_hls500_save(nextStep, source_procedure) { function hls_hls500_save(nextStep, source_procedure) {
Leaf.request({
url: $('prj_check_prj_record_link_id').getUrl(),
para: {
'project_id': '${/parameter/@document_id}'
},
success: function(res) {
var secondary_lease = res.result.secondary_lease;
var payment_deduction = res.result.payment_deduction;
var price_list = res.result.price_list;
if(price_list=='DS_PRICE_10' && secondary_lease=='NO'){
var count=0;
var denominator=0;
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0;i < temp_head_records.length;i++) {
if(temp_head_records[i].get('column_code')=='H16'||temp_head_records[i].get('column_code')=='H97'){
count=count+temp_head_records[i].get('column_value')||0
}else if(temp_head_records[i].get('column_code')=='H99'||temp_head_records[i].get('column_code')=='H102'){
denominator=denominator+temp_head_records[i].get('column_value')||0
}
}
if((count/denominator)<0.15){
Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于15%');
unlock_calc_current_window('${l:HLS.CALCULATING}');
return;
}
}
if(price_list=='DS_PRICE_10'){
if(payment_deduction!='TRADE_IN'){
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0;i < temp_head_records.length;i++) {
if(temp_head_records[i].get('column_code')=='H109') {
temp_head_records[i].set('column_value',0);
// temp_head_records[i].set('column_value_c',0);
}
}
}else{
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0;i < temp_head_records.length;i++) {
var H16;
if(temp_head_records[i].get('column_code')=='H16'){
H16=temp_head_records[i].get('column_value');
}
if(temp_head_records[i].get('column_code')=='H109') {
temp_head_records[i].set('column_value',H16);
// temp_head_records[i].set('column_value_c',0);
}
}
}
}
lock_calc_current_window('${l:HLS.SAVING}'); lock_calc_current_window('${l:HLS.SAVING}');
if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) { if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) {
unlock_calc_current_window(); unlock_calc_current_window();
...@@ -110,6 +167,16 @@ ...@@ -110,6 +167,16 @@
$('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess); $('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess);
Leaf.SideBar.enable = false; Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit(); $('hls_fin_cal_save_hd_ds').submit();
},
failure: function() {
},
error: function() {
},
scope: this
});
} }
...@@ -120,6 +187,7 @@ ...@@ -120,6 +187,7 @@
function hls_hls500_calc() { function hls_hls500_calc() {
lock_calc_current_window('${l:HLS.CALCULATING}'); lock_calc_current_window('${l:HLS.CALCULATING}');
hls_hls500_save(calc_execute, 'CALC'); hls_hls500_save(calc_execute, 'CALC');
} }
...@@ -561,6 +629,14 @@ ...@@ -561,6 +629,14 @@
} }
function do_hls500_head_update(ds, record, name, value, old_value) { function do_hls500_head_update(ds, record, name, value, old_value) {
if (record.get('column_code') == 'H54' ) {
var sum=record.get('column_value')-4.75
if(sum<0){
Leaf.showMessage('${l:PROMPT}', '利率最低值不能低于4.75');
return;
}
}
if (record.get('lov_return_vcode') == 'N' && (record.get('validation_type') == 'COMBOBOX' || record.get('validation_type') == 'LOV')) { if (record.get('lov_return_vcode') == 'N' && (record.get('validation_type') == 'COMBOBOX' || record.get('validation_type') == 'LOV')) {
value = record.get('column_value_c'); value = record.get('column_value_c');
} else { } else {
...@@ -598,6 +674,7 @@ ...@@ -598,6 +674,7 @@
recreate_L_formula = 'N'; recreate_L_formula = 'N';
} }
} }
onEditorupdate(ds, record, name, value, old_value); onEditorupdate(ds, record, name, value, old_value);
} }
...@@ -700,6 +777,7 @@ ...@@ -700,6 +777,7 @@
} }
function onEditorHdload(ds) { function onEditorHdload(ds) {
var headRecords = ds.getAll(); var headRecords = ds.getAll();
if (headRecords[0].get('show_column_code') == 'N') { if (headRecords[0].get('show_column_code') == 'N') {
$('hls_fin_calculator_hd_grid_id').hideColumn('column_code'); $('hls_fin_calculator_hd_grid_id').hideColumn('column_code');
......
...@@ -39,15 +39,14 @@ ...@@ -39,15 +39,14 @@
model="hls.HLS500.hls_fin_calc_get_base_rate" modelaction="update"/> model="hls.HLS500.hls_fin_calc_get_base_rate" modelaction="update"/>
<a:link id="get_if_self_definition" model="db.prj_project_pkg.get_if_self_definition" modelaction="execute"/> <a:link id="get_if_self_definition" model="db.prj_project_pkg.get_if_self_definition" modelaction="execute"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
//add by zhuxianfei //add by zhuxianfei
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
var url; var url;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation'); var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_CASHFLOW_NS', 'prj_quotation');
var record = $(quotation_ds_id).getCurrentRecord(); var record = $(quotation_ds_id).getCurrentRecord();
var head_record = $(ds_id).getAt(0); var head_record = $(ds_id).getAt(0);
if ('${/parameter/@calc_type}' == 'LITE_CALCULATOR') { if ('${/parameter/@calc_type}' == 'LITE_CALCULATOR') {
...@@ -64,10 +63,10 @@ ...@@ -64,10 +63,10 @@
return; return;
} }
if ($(quotation_ds_id).validate()) { if ($(quotation_ds_id).validate()) {
if (!record.get('price_list') || !record.get('currency') || !record.get('lease_times')) { /*if (!record.get('price_list') || !record.get('currency') || !record.get('lease_times')) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.QUOTATION_EXECUTE_AFTER_SAVE}'); Leaf.showMessage('${l:PROMPT}', '${l:HLS.QUOTATION_EXECUTE_AFTER_SAVE}');
return; return;
} }*/
var parent_pk_value = head_record.get('project_id'); var parent_pk_value = head_record.get('project_id');
record.set('function_code', 'PRJ505_QUOTATION'); record.set('function_code', 'PRJ505_QUOTATION');
...@@ -97,6 +96,7 @@ ...@@ -97,6 +96,7 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query();
var quotation_id = record.get('quotation_id') || res.result.record.quotation_id; var quotation_id = record.get('quotation_id') || res.result.record.quotation_id;
var win = new Leaf.Window({ var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid', id: 'hls_fin_calc_quotation_link_winid',
...@@ -119,6 +119,7 @@ ...@@ -119,6 +119,7 @@
}); });
win.on('close', function () { win.on('close', function () {
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query();
}); });
}, },
...@@ -158,6 +159,7 @@ ...@@ -158,6 +159,7 @@
}); });
win.on('close', function () { win.on('close', function () {
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query();
}); });
}else { }else {
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD'); record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
...@@ -202,6 +204,7 @@ ...@@ -202,6 +204,7 @@
}); });
win.on('close', function () { win.on('close', function () {
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query();
}); });
}, },
...@@ -286,7 +289,6 @@ ...@@ -286,7 +289,6 @@
ka_prj_id: prj_record.get('ka_prj_id') ka_prj_id: prj_record.get('ka_prj_id')
}, },
success: function (res) { success: function (res) {
debugger;
var document_number = res.result.document_number; var document_number = res.result.document_number;
prj_record.set('project_number', document_number); prj_record.set('project_number', document_number);
check_flag = true; check_flag = true;
...@@ -427,7 +429,7 @@ ...@@ -427,7 +429,7 @@
//加载时调用(grid,table,gridBox) //加载时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record, config_records, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record, config_records, bp_seq) {
debugger;
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_BP', 'prj_project_bp'); var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_BP', 'prj_project_bp');
if (bp_ds_id == ds.id && bp_ds_id) { if (bp_ds_id == ds.id && bp_ds_id) {
if (record.get('bp_category') == 'TENANT') { if (record.get('bp_category') == 'TENANT') {
...@@ -440,6 +442,109 @@ ...@@ -440,6 +442,109 @@
} }
} }
}; };
//序号自增 add by lijingjing
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
//租赁物序号
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
if (ds_id == ds.id && ds_id) {
//设置序号
var measure_records = ds.getAll(),
seq_num = 0;
if (measure_records.length) {
for (var j = 0;j < measure_records.length;j++) {
var measure_record = measure_records[j],
rk = measure_record.get('lease_item_seq');
if (seq_num <= rk) {
seq_num = rk;
}
}
}
var rk_value = seq_num + 1;
record.set('lease_item_seq', rk_value);
}
};
//客户评分
window['${/parameter/@layout_code}_user_button9_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var record = $(ds_id).getCurrentRecord();
var param = {};
if(record.get('project_id')){
if(record.get('project_status')=='NEW'||record.get('project_status')=='APPROVE_RETURN'||record.get('project_status')=='REJECT'){
param['function_code'] = 'PRJ501TENANT';
param['function_usage'] = 'UPDATE';
}else{
param['function_code'] = 'PRJ501TENANT';
param['function_usage'] = 'QUERY';
}
param['project_id'] = record.get('project_id');
param['winid'] = 'hl_tenant_score_rate_win_id';
param['url_title'] = '客户评分明细';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}tenant_rate_query_link', '${/parameter/@layout_code}');
}else{
Leaf.showMessage('${l:PROMPT}', '请先保存');
return;
}
}
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_bp');
var record = $(quotation_ds_id).getCurrentRecord();
var current_record = $(ds_id).getCurrentRecord();
var lease_item_record = $(lease_item_ds_id).getCurrentRecord();
var bp_record = $(bp_ds_id).getCurrentRecord();
var project_id = current_record.get('project_id');
if (current_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (lease_item_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (bp_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if($(ds_id).validate()){
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function() {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('prj_approval_link_id').getUrl(),
para: {
project_id: project_id
},
scope: this,
success: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
}
/* Leaf.onReady(function(){ /* Leaf.onReady(function(){
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master'); var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master');
var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}'; var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
......
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
record.set('document_category', 'PROJECT'); record.set('document_category', 'PROJECT');
record.set('default_value_dsid', ds_id); record.set('default_value_dsid', ds_id);
record.data['url_title'] = '租赁申请创建'; record.data['url_title'] = '租赁申请创建';
var division=record.get('division');
record.set('division',division);
var param = record.data; var param = record.data;
record.set('winid', 'prj_porject_create_win_id'); record.set('winid', 'prj_porject_create_win_id');
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zhangxing5129
$Date: 2014-8-3 上午10:57:29
$Revision: 1.0
$Purpose: 项目报告维护
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:view>
<script type="text/javascript"><![CDATA[
]]></script>
</a:view>
</a:screen>
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
<a:link id="${/parameter/@layout_code}contract_number_query_link" <a:link id="${/parameter/@layout_code}contract_number_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/> url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="${/parameter/@layout_code}tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_history_display.lview"/>
<a:link id="${/parameter/@layout_code}_hls_fin_calc_get_base_rate_link_id" <a:link id="${/parameter/@layout_code}_hls_fin_calc_get_base_rate_link_id"
model="hls.HLS500.hls_fin_calc_get_base_rate" modelaction="update"/> model="hls.HLS500.hls_fin_calc_get_base_rate" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" <a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
...@@ -47,6 +49,8 @@ ...@@ -47,6 +49,8 @@
<!-- <a:link id="prj_project_create_con_id" model="prj.PRJ513N.prj_peoject_create_con" modelaction="update"/> --> <!-- <a:link id="prj_project_create_con_id" model="prj.PRJ513N.prj_peoject_create_con" modelaction="update"/> -->
<a:link id="${/parameter/@layout_code}_prj_project_create_contract_link_id" <a:link id="${/parameter/@layout_code}_prj_project_create_contract_link_id"
model="prj.PRJ505.prj_project_create_contract" modelaction="update"/> model="prj.PRJ505.prj_project_create_contract" modelaction="update"/>
<a:link id="prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/>
<!--<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/> <!--<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/lightbox.js" type="text/javascript"/>-->
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
...@@ -103,6 +107,8 @@ ...@@ -103,6 +107,8 @@
var url; var url;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation'); var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_CASHFLOW_NS', 'prj_quotation');
var record = $(quotation_ds_id).getCurrentRecord(); var record = $(quotation_ds_id).getCurrentRecord();
var head_record = $(ds_id).getAt(0); var head_record = $(ds_id).getAt(0);
if ('${/parameter/@calc_type}' == 'LITE_CALCULATOR') { if ('${/parameter/@calc_type}' == 'LITE_CALCULATOR') {
...@@ -114,17 +120,23 @@ ...@@ -114,17 +120,23 @@
// Leaf.showMessage('${l:PROMPT}', '${l:HLS.CALC_TYPE_IS_NULL}'); // Leaf.showMessage('${l:PROMPT}', '${l:HLS.CALC_TYPE_IS_NULL}');
// return; // return;
} }
if (head_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (record.dirty == true) { if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}'); Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return; return;
} }
if ($(quotation_ds_id).validate()) { if ($(quotation_ds_id).validate()) {
if (!record.get('price_list') || !record.get('currency') || !record.get('lease_times')) { /* if (!record.get('price_list') || !record.get('currency') || !record.get('lease_times')) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.QUOTATION_EXECUTE_AFTER_SAVE}'); Leaf.showMessage('${l:PROMPT}', '${l:HLS.QUOTATION_EXECUTE_AFTER_SAVE}');
return; return;
} }*/
var parent_pk_value = head_record.get('project_id'); var parent_pk_value = head_record.get('project_id');
var secondary_lease = head_record.get('secondary_lease');
var payment_deduction = head_record.get('payment_deduction');
record.set('function_code', 'PRJ505_QUOTATION'); record.set('function_code', 'PRJ505_QUOTATION');
record.set('function_usage', 'UPDATE'); record.set('function_usage', 'UPDATE');
record.set('project_id', parent_pk_value); record.set('project_id', parent_pk_value);
...@@ -143,20 +155,24 @@ ...@@ -143,20 +155,24 @@
if (!'${/parameter/@document_id}') { if (!'${/parameter/@document_id}') {
record.set('document_id', parent_pk_value); record.set('document_id', parent_pk_value);
} }
var price_list= record.get('price_list');
var saveData = []; var saveData = [];
saveData.push(record.data); saveData.push(record.data);
Leaf.request({ Leaf.request({
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id').getUrl(), url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id').getUrl(),
para: saveData, para: saveData,
success: function (res) { success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query();
var quotation_id = record.get('quotation_id') || res.result.record.quotation_id; var quotation_id = record.get('quotation_id') || res.result.record.quotation_id;
var win = new Leaf.Window({ var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid', id: 'hls_fin_calc_quotation_link_winid',
params: { params: {
document_id: parent_pk_value, document_id: parent_pk_value,
price_list: price_list,
secondary_lease:secondary_lease,
payment_deduction:payment_deduction,
document_category: 'PORJECT', document_category: 'PORJECT',
maintain_type: 'MODIFY', maintain_type: 'MODIFY',
calc_session_id: res.result.record.calc_session_id, calc_session_id: res.result.record.calc_session_id,
...@@ -174,6 +190,7 @@ ...@@ -174,6 +190,7 @@
}); });
win.on('close', function () { win.on('close', function () {
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query();
}); });
}, },
...@@ -196,6 +213,9 @@ ...@@ -196,6 +213,9 @@
id: 'hls_fin_calc_quotation_update_link_winid', id: 'hls_fin_calc_quotation_update_link_winid',
params: { params: {
document_id: parent_pk_value, document_id: parent_pk_value,
price_list: price_list,
secondary_lease:secondary_lease,
payment_deduction:payment_deduction,
document_category: 'PORJECT', document_category: 'PORJECT',
maintain_type: 'MODIFY', maintain_type: 'MODIFY',
calc_session_id: record.get('calc_session_id'), calc_session_id: record.get('calc_session_id'),
...@@ -213,6 +233,7 @@ ...@@ -213,6 +233,7 @@
}); });
win.on('close', function () { win.on('close', function () {
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query();
}); });
}else { }else {
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD'); record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
...@@ -226,6 +247,7 @@ ...@@ -226,6 +247,7 @@
if (!'${/parameter/@document_id}') { if (!'${/parameter/@document_id}') {
record.set('document_id', parent_pk_value); record.set('document_id', parent_pk_value);
} }
var price_list= record.get('price_list');
var saveData = []; var saveData = [];
saveData.push(record.data); saveData.push(record.data);
Leaf.request({ Leaf.request({
...@@ -235,11 +257,15 @@ ...@@ -235,11 +257,15 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query();
var quotation_id = record.get('quotation_id') || res.result.record.quotation_id; var quotation_id = record.get('quotation_id') || res.result.record.quotation_id;
var win = new Leaf.Window({ var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid', id: 'hls_fin_calc_quotation_link_winid',
params: { params: {
document_id: parent_pk_value, document_id: parent_pk_value,
price_list: price_list,
secondary_lease:secondary_lease,
payment_deduction:payment_deduction,
document_category: 'PORJECT', document_category: 'PORJECT',
maintain_type: 'MODIFY', maintain_type: 'MODIFY',
calc_session_id: res.result.record.calc_session_id, calc_session_id: res.result.record.calc_session_id,
...@@ -257,6 +283,7 @@ ...@@ -257,6 +283,7 @@
}); });
win.on('close', function () { win.on('close', function () {
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query();
}); });
}, },
...@@ -518,9 +545,84 @@ function prj501n_contract_number_renderer(id, name, query_only){ ...@@ -518,9 +545,84 @@ function prj501n_contract_number_renderer(id, name, query_only){
//客户评分 //客户评分
window['${/parameter/@layout_code}_user_button9_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button9_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var record = $(ds_id).getCurrentRecord();
var param = {};
if(record.get('project_id')){
if(record.get('project_status')=='NEW'||record.get('project_status')=='APPROVE_RETURN'||record.get('project_status')=='REJECT'){
param['function_code'] = 'PRJ501TENANT';
param['function_usage'] = 'UPDATE';
}else{
param['function_code'] = 'PRJ501TENANT';
param['function_usage'] = 'QUERY';
}
param['project_id'] = record.get('project_id');
param['winid'] = 'hl_tenant_score_rate_win_id';
param['url_title'] = '客户评分明细';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}tenant_rate_query_link', '${/parameter/@layout_code}');
}else{
Leaf.showMessage('${l:PROMPT}', '请先保存');
return;
}
} }
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_bp');
var record = $(quotation_ds_id).getCurrentRecord();
var current_record = $(ds_id).getCurrentRecord();
var lease_item_record = $(lease_item_ds_id).getCurrentRecord();
var bp_record = $(bp_ds_id).getCurrentRecord();
var project_id = current_record.get('project_id');
if (current_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (lease_item_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (bp_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if($(ds_id).validate()){
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function() {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('prj_approval_link_id').getUrl(),
para: {
project_id: project_id
},
scope: this,
success: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
}
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: wangwei5743
$Date: 2014-10-8 下午3:16:19
$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>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="prj.PRJ500D.sys_user_lv"
rootPath="user_name_path"/>
<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:init-procedure>
<a:view>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}get_special_fields_link_id"
model="cont.CON500.con_contract_get_special_fields" modelaction="update"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calc_quotation_header_link_id"
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_quotation_header.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id"
url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_for_deron_link_id"
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_doc_quotation_for_deron.lsc"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id"
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_doc_quotation.lsc"/>
<a:link id="${/parameter/@layout_code}hls_bp_master_query_link"
url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/>
<a:link id="${/parameter/@layout_code}contract_number_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="${/parameter/@layout_code}tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_history_display.lview"/>
<a:link id="${/parameter/@layout_code}_hls_fin_calc_get_base_rate_link_id"
model="hls.HLS500.hls_fin_calc_get_base_rate" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<!-- <script src="${/request/@context_path}/modules/prj/PRJ500N/javascripts/check_org_code.js" type="text/javascript"/> -->
<!-- <a:link id="prj_project_create_con_id" model="prj.PRJ513N.prj_peoject_create_con" modelaction="update"/> -->
<a:link id="${/parameter/@layout_code}_prj_project_create_contract_link_id"
model="prj.PRJ505.prj_project_create_contract" modelaction="update"/>
<a:link id="prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/>
<!--<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 type="text/javascript"><![CDATA[
window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () {
Leaf.showConfirm('提示', '是否确认生成合同?', function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var quo_record = $(quotation_ds_id).getCurrentRecord();
var cal_hd_price_list= quo_record.get('cal_hd_price_list');
var price_list= quo_record.get('price_list');
if(cal_hd_price_list == price_list) {
var url = $('${/parameter/@layout_code}_prj_project_create_contract_link_id').getUrl();
var record = $(ds_id).getCurrentRecord();
if ($(ds_id).validate()) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request(
{
url: url,
para: {
project_id: record.get('project_id'),
contract_seq: 1,
bp_contract_seq: 1,
contract_type: 'CARCON',
contract_name: record.get('project_name'),
billing_method: record.get('billing_method'),
},
success: function (res) {
$('${/parameter/@winid}').close();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
}
);
}}else{
Leaf.showMessage('${l:PROMPT}', '报价有变动请重新计算!');
return;
}
});
};
//add by zhuxianfei
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
var url;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_CASHFLOW_NS', 'prj_quotation');
var record = $(quotation_ds_id).getCurrentRecord();
var head_record = $(ds_id).getAt(0);
if ('${/parameter/@calc_type}' == 'LITE_CALCULATOR') {
url = $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calc_quotation_header_link_id').getUrl();
} else if ('${/parameter/@calc_type}' == 'CLASSIC_CALCULATOR') {
url = $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl();
} else {
url = $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl();
// Leaf.showMessage('${l:PROMPT}', '${l:HLS.CALC_TYPE_IS_NULL}');
// return;
}
/* if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}*/
if ($(quotation_ds_id).validate()) {
/* if (!record.get('price_list') || !record.get('currency') || !record.get('lease_times')) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.QUOTATION_EXECUTE_AFTER_SAVE}');
return;
}*/
var parent_pk_value = head_record.get('project_id');
record.set('function_code', 'PRJ505_QUOTATION');
record.set('function_usage', 'UPDATE');
record.set('project_id', parent_pk_value);
//拆分合同可维护
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
//首次插入
if (!record.get('calc_session_id')) {
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y';
record.set('_status', 'update');
record.set('from_doc_table', 'PRJ_QUOTATION');
record.set('from_doc_pk', record.get('quotation_id'));
record.set('calculate_flag', 'N');
if (!'${/parameter/@document_id}') {
record.set('document_id', parent_pk_value);
}
var saveData = [];
saveData.push(record.data);
Leaf.request({
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id').getUrl(),
para: saveData,
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$(quotation_ds_id).query();
$(history_ds_id).query();
var quotation_id = record.get('quotation_id') || res.result.record.quotation_id;
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid',
params: {
document_id: parent_pk_value,
document_category: 'PORJECT',
maintain_type: 'MODIFY',
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
dsId: quotation_ds_id,
winId: 'hls_fin_calc_quotation_link_winid',
global_flag: 'Y',
id_num: 1,
calc_type: '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR',
recreate_L_formula: calc_recreate_L_formula
},
url: url,
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).query();
$(history_ds_id).query();
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
} else {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var cal_hd_price_list= record.get('cal_hd_price_list');
var price_list= record.get('price_list');
if(cal_hd_price_list == price_list) {
//直接进入报价页面
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_update_link_winid',
params: {
document_id: parent_pk_value,
document_category: 'PORJECT',
maintain_type: 'MODIFY',
calc_session_id: record.get('calc_session_id'),
quotation_id: record.get('quotation_id'),
dsId: quotation_ds_id,
winId: 'hls_fin_calc_quotation_update_link_winid',
global_flag: 'Y',
id_num: 1,
calc_type: '${/parameter/@calc_type}',
recreate_L_formula: 'N'
},
url: url,
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).query();
$(history_ds_id).query();
});
}else {
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y';
record.set('_status', 'update');
record.set('from_doc_table', 'PRJ_QUOTATION');
record.set('from_doc_pk', record.get('quotation_id'));
record.set('calculate_flag', 'N');
if (!'${/parameter/@document_id}') {
record.set('document_id', parent_pk_value);
}
var saveData = [];
saveData.push(record.data);
Leaf.request({
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id').getUrl(),
para: saveData,
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$(quotation_ds_id).query();
$(history_ds_id).query();
var quotation_id = record.get('quotation_id') || res.result.record.quotation_id;
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid',
params: {
document_id: parent_pk_value,
document_category: 'PORJECT',
maintain_type: 'MODIFY',
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
dsId: quotation_ds_id,
winId: 'hls_fin_calc_quotation_link_winid',
global_flag: 'Y',
id_num: 1,
calc_type: '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR',
recreate_L_formula: calc_recreate_L_formula
},
url: url,
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).query();
$(history_ds_id).query();
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}
}
}
};
function prj501n_upload_file(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) {
var url;
if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
} else {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
}
function prj501n_bp_code_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['bp_id'] = record.get('bp_id');
param['bp_class'] = record.get('bp_class');
param['function_code'] = 'HLS215D';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
param['winid'] = '${/parameter/@layout_code}_bp_win_id';
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
}
function prj501n_project_number_renderer(id, name, query_only){
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['bp_id'] = record.get('project_id');
param['bp_class'] = record.get('bp_class');
param['function_code'] = 'PRJ501D';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['prj_bp_id'] = record.get('prj_bp_id');
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}project_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
function prj501n_contract_number_renderer(id, name, query_only){
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['contract_id'] = record.get('contract_id');
param['function_code'] = 'CON301';
param['function_usage'] = 'QUERY';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}contract_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
//超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
link_function = 'prj501n_upload_file';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'attach_file_name') {
/* if (value != null) {
var link = '${/request/@context_path}/atm_download.lsc?attachment_id=';
var str = value.split(';;');
var url = '';
for (var i = 0; i < str.length; i++) {
//
var temp = str[i].split('--');
if (!Leaf.isEmpty(temp[0])) {
var file_name = temp[0].toUpperCase();
var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_name.indexOf('.PDF') >= 0) {
url = url + '<a href=javascript:view_pdf(\'' + temp[1] + '\')>' + temp[0] + '</a>' + ',';
} else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
url = url + '<a href=' + link + temp[1] + ' ref="img">' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}*/
if (value != null ) {
var link = '${/request/@context_path}/atm_download.lsc?attachment_id=';
var str = value.split(';;');
var url = '';
for (var i = 0;i < str.length;i++) {
//
var temp = str[i].split('--');
if (!Leaf.isEmpty(temp[0])) {
var file_name = temp[0].toUpperCase();
var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_name.indexOf('.PDF') >= 0) {
url = url + '<a href=javascript:view_pdf(\'' + temp[1] + '\')>' + temp[0] + '</a>' + ',';
} //else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
else if (file_name.indexOf('.BMP') >= 0 || file_name.indexOf('.JPG') >= 0 || file_name.indexOf('.JPEG') >= 0 || file_name.indexOf('.PNG') >= 0 || file_name.indexOf('.GIF') >= 0) {
url = url + '<a href=' + link + temp[1] + ' ref="img">' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
} else if (name == 'bp_link' && !record.isNew) {
link_function = 'prj501n_bp_code_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
}else if(name=='project_number'){
link_function = 'prj501n_project_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value+ '</a>';
}else if(name =='contract_number'){
link_function = 'prj501n_contract_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value+ '</a>';
}
};
//保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1','prj_project');
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP','prj_project_bp');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master');
var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var virtual_ds_id = '${/parameter/@layout_code}_virtual_ds';
if (ds_id==ds.id || virtual_ds_id==ds.id) {
$(cdd_item_ds_id).query();
$(bp_ds_id).query();
$(tenant_ds_id).query();
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
//选择事件(grid,attach,gridbox,table)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_select'] = function(ds, record, bp_seq) {
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_BP', 'prj_project_bp');
if (bp_ds_id == ds.id && bp_ds_id) {
if (record.get('bp_category') == 'TENANT') {
//实际为不选中
Leaf.showMessage('${l:HLS.PROMPT}', '无法删除主承租人!');
ds.unSelect(record);
ds.Select(record);
}
if (record.get('bp_category') == 'AGENT') {
//实际为不选中
Leaf.showMessage('${l:HLS.PROMPT}', '无法删除经销商!');
ds.unSelect(record);
ds.Select(record);
}
}
};
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
};
//加载时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record, config_records, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_BP', 'prj_project_bp');
/* var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_HISTORY_INFO_1', 'prj_project_bp');
$(bp_ds_ids).setQueryParameter('bp_id','${/parameter/@bp_id_tenant}');
$(bp_ds_ids).query();*/
if (bp_ds_id == ds.id && bp_ds_id) {
if (record.get('bp_category') == 'TENANT') {
record.getField('bp_category_n').setReadOnly(true);
record.getField('bp_id_n').setReadOnly(true);
}
if (record.get('bp_category') == 'AGENT') {
record.getField('bp_category_n').setReadOnly(true);
record.getField('bp_id_n').setReadOnly(true);
}
}
};
//pdf预览 add by zhuxianfei
function view_pdf(attachment_id) {
Leaf.request({
url: '${/request/@context_path}/autocrud/fnd.fnd_atm_attachment/query',
para: {
attachment_id: attachment_id
},
success: function(res) {
var path = res.result.record.file_path;
path = path.substr(path.indexOf('hls_attachment'));
var tomcat_source = '${/parameter/@tomcat_source}';
var source_path = 'http://' + window.location.host + '/' + tomcat_source + '/' + path;
var oWin = window.open(source_path);
},
scope: this
});
}
Leaf.onReady(function(){
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master');
var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
$(bp_ds_id).setQueryUrl(url);
$(bp_ds_id).query();
})
//序号自增 add by lijingjing
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
//租赁物序号
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
if (ds_id == ds.id && ds_id) {
//设置序号
var measure_records = ds.getAll(),
seq_num = 0;
if (measure_records.length) {
for (var j = 0;j < measure_records.length;j++) {
var measure_record = measure_records[j],
rk = measure_record.get('lease_item_seq');
if (seq_num <= rk) {
seq_num = rk;
}
}
}
var rk_value = seq_num + 1;
record.set('lease_item_seq', rk_value);
}
};
//客户评分
window['${/parameter/@layout_code}_user_button9_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var record = $(ds_id).getCurrentRecord();
var param = {};
if(record.get('project_status')=='NEW'||record.get('project_status')=='APPROVE_RETURN'||record.get('project_status')=='REJECT'){
param['function_code'] = 'PRJ501TENANT';
param['function_usage'] = 'UPDATE';
}else{
param['function_code'] = 'PRJ501TENANT';
param['function_usage'] = 'QUERY';
}
param['project_id'] = record.get('project_id');
param['winid'] = 'hl_tenant_score_rate_win_id';
param['url_title'] = '客户评分明细';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}tenant_rate_query_link', '${/parameter/@layout_code}');
}
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var current_record = $(ds_id).getCurrentRecord();
var project_id = current_record.get('project_id');
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function() {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('prj_approval_link_id').getUrl(),
para: {
project_id: project_id
},
scope: this,
success: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
...@@ -43,29 +43,30 @@ ...@@ -43,29 +43,30 @@
param['layout_debugger_flag'] = 'Y'; param['layout_debugger_flag'] = 'Y';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'prj_project_modify_link', ds_id); hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'prj_project_modify_link', ds_id);
} else if (record.get('document_type') == 'CARLS') { } else if (record.get('document_type') == 'CARLS') {
if (record.get('project_status') != 'PRE_APPROVING') {
maintain_type = 'UPDATE'; if (record.get('project_status') == 'APPROVED' ||record.get('project_status') == 'APPROVING') {
maintain_type = 'READONLY';
param = record.data; param = record.data;
param['bp_id_tenant'] = record.get('bp_id_tenant');
param['document_id'] = record.get('project_id'); param['document_id'] = record.get('project_id');
param['function_code'] = 'PRJ501D'; param['function_code'] = 'PRJ501_WFL';
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'QUERY';
param['bp_class'] = 'NP'; param['bp_class'] = 'NP';
param['maintain_type'] = maintain_type; param['maintain_type'] = maintain_type;
param['bp_id'] = record.get('bp_id');
param['prj_bp_id'] = record.get('prj_bp_id'); param['prj_bp_id'] = record.get('prj_bp_id');
param['bp_id_tenant'] = record.get('bp_id_tenant');
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}'; param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id); hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id);
} else { } else {
maintain_type = 'READONLY'; maintain_type = 'UPDATE';
param = record.data; param = record.data;
param['bp_id_tenant'] = record.get('bp_id_tenant');
param['document_id'] = record.get('project_id'); param['document_id'] = record.get('project_id');
param['function_code'] = 'PRJ501D'; param['function_code'] = 'PRJ501D';
param['function_usage'] = 'QUERY'; param['function_usage'] = 'MODIFY';
param['bp_class'] = 'NP'; param['bp_class'] = 'NP';
param['maintain_type'] = maintain_type; param['maintain_type'] = maintain_type;
param['bp_id'] = record.get('bp_id');
param['prj_bp_id'] = record.get('prj_bp_id'); param['prj_bp_id'] = record.get('prj_bp_id');
param['bp_id_tenant'] = record.get('bp_id_tenant');
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}'; param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id); hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id);
} }
......
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