Commit 6ceb9f8e authored by stone's avatar stone

[fix]修改付款查询页面,修改付款申请页面

parent fb0dd2f1
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool CON_CONTRACT.log
PROMPT
PROMPT CREATING TABLE TRAIN_CONFIG
PROMPT ============================
PROMPT
WHENEVER SQLERROR CONTINUE
DROP TABLE CON_CONTRACT;
WHENEVER SQLERROR EXIT FAILURE ROLLBACK
BEGIN
alter table csh_payment_req_ln add (amount_vender number);
alter table csh_payment_req_ln add (amount_agent number);
alter table csh_payment_req_ln add (down_payment_rushoff number);
comment on column csh_payment_req_ln.amount_vender is '应付厂商金额';
comment on column csh_payment_req_ln.amount_agent is '应付代理店金额';
comment on column csh_payment_req_ln.down_payment_rushoff is '首付款抵冲金额';
end;
SPOOL OFF
EXIT
\ No newline at end of file
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
SELECT v.contract_id, SELECT v.contract_id,
v.vender_name,
v.vender_bank_account_id,
v.vender_bank_account_number,
v.other_payment2,
'NEW' approval_status,
v.invoice_uploaded_flag, v.invoice_uploaded_flag,
v.invoice_uploaded_flag_n, v.invoice_uploaded_flag_n,
v.times, v.times,
...@@ -35,7 +40,8 @@ ...@@ -35,7 +40,8 @@
v.bp_name, v.bp_name,
v.bp_code, v.bp_code,
v.applied_pay_amount, v.applied_pay_amount,
v.residual_amount AS amount, --v.residual_amount AS amount,
0.00 AS amount,
--v.due_amount- NVL(v.applied_pay_amount,0) AS amount, --v.due_amount- NVL(v.applied_pay_amount,0) AS amount,
v.bp_category_desc, v.bp_category_desc,
v.search_term_1, v.search_term_1,
...@@ -192,11 +198,9 @@ ...@@ -192,11 +198,9 @@
WHERE gc.currency_code = t.currency) currency_name, WHERE gc.currency_code = t.currency) currency_name,
TO_CHAR(f.due_date, 'yyyy-mm-dd') due_date, TO_CHAR(f.due_date, 'yyyy-mm-dd') due_date,
NVL(f.due_amount, 0) - NVL(f.received_amount, 0) residual_amount, NVL(f.due_amount, 0) - NVL(f.received_amount, 0) residual_amount,
DECODE(f.cf_item, (select c.bp_id_tenant
'62', from con_contract c
NULL, where c.contract_id=t.contract_id ) bp_id,
NVL(${@payment_bp_id},
csh_payment_req_pkg.get_bp_id(t.contract_id))) bp_id,
DECODE(f.cf_item, DECODE(f.cf_item,
'62', '62',
NULL, NULL,
...@@ -266,6 +270,46 @@ ...@@ -266,6 +270,46 @@
-- )price -- )price
i.price, i.price,
i.factory_price, i.factory_price,
--获得厂商的相关信息
(select bp_name
from hls_bp_master hbm
where hbm.bp_id =
(select hli.vender_id
from hls_lease_item hli
where hli.lease_item_id =
(select lease_item_id
from con_contract_lease_item c
where c.contract_id = t.contract_id))) vender_name,
(select bp_name
from hls_bp_master hbm
where hbm.bp_id =
(select hli.vender_id
from hls_lease_item hli
where hli.lease_item_id =
(select lease_item_id
from con_contract_lease_item c
where c.contract_id = t.contract_id))) vender_bank_account_id,
(select hbba.bank_account_num
from hls_bp_master_bank_account hbba
where hbba.bp_id =
(select hli.vender_id
from hls_lease_item hli
where hli.lease_item_id =
(select lease_item_id
from con_contract_lease_item c
where c.contract_id = t.contract_id)))vender_bank_account_number,
--首付款抵充金
(select nvl(hd.other_payment2,0)
from hls_fin_calculator_hd hd
where hd.calc_session_id =
(select PQ.CALC_SESSION_ID
from prj_quotation pq
where pq.document_id = (select cc.project_id
from con_contract cc
where cc.contract_id =f.contract_id)
and pq.document_category = 'PROJECT')) other_payment2,
DECODE(t.division, '10', 'CNYA', '00', 'CNYA', '01', 'CNYB') sap_bvtyp, DECODE(t.division, '10', 'CNYA', '00', 'CNYA', '01', 'CNYB') sap_bvtyp,
(SELECT v.code_value_name (SELECT v.code_value_name
FROM sys_code_values_v v FROM sys_code_values_v v
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: qwm
$Date: 2013-5-24 下午03:50:31
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1"
baseTable="CSH_PAYMENT_REQ_LN" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
from (select c.contract_number,
c.contract_name,
hbm.bp_name,
(select times
from con_contract_cashflow ccc
where ccc.cashflow_id = cpr.ref_doc_line_id) times,
(select ccc.due_amount
from con_contract_cashflow ccc
where ccc.cashflow_id = cpr.ref_doc_line_id) due_amount,
(select description
from hls_cashflow_item hci, con_contract_cashflow ccc
where hci.cf_item = ccc.cf_item
and hci.cf_type = ccc.cf_type
and ccc.cashflow_id = cpr.ref_doc_line_id) CF_DESCRIPTION,
(select bp_name
from hls_bp_master hbm
where hbm.bp_id = c.bp_id_agent_level1) BP_ID_AGENT_N,
(select hbm.bank_account_name
from hls_bp_master_bank_account hbm
where hbm.bp_id = c.bp_id_agent_level1) BP_BANK_ACCOUNT_ID,
(select hbm.bank_account_num
from hls_bp_master_bank_account hbm
where hbm.bp_id = c.bp_id_agent_level1) BP_BANK_ACCOUNT_NUM,
--应付我司金额
cpr.amount_agent,
cpr.amount_vender,
(select bp_name
from hls_bp_master hbm
where hbm.bp_id =
(select ccli.vender_id
from con_contract_lease_item ccli,
hls_lease_item hli
where ccli.lease_item_id = hli.lease_item_id
and ccli.contract_id = c.contract_id)) vender_name,
(select hbm.bank_account_name
from hls_bp_master_bank_account hbm
where hbm.bp_id =
(select ccli.vender_id
from con_contract_lease_item ccli,
hls_lease_item hli
where ccli.lease_item_id = hli.lease_item_id
and ccli.contract_id = c.contract_id)) VENDER_BANK_ACCOUNT_ID,
(select hbm.bank_account_num
from hls_bp_master_bank_account hbm
where hbm.bp_id =
(select ccli.vender_id
from con_contract_lease_item ccli,
hls_lease_item hli
where ccli.lease_item_id = hli.lease_item_id
and ccli.contract_id = c.contract_id)) VENDER_BANK_ACCOUNT_number,
cpr.amount,
--首付款抵充金额
(select nvl(hd.other_payment2, 0)
from hls_fin_calculator_hd hd
where hd.calc_session_id =
(select PQ.CALC_SESSION_ID
from prj_quotation pq
where pq.document_id =
(select cc.project_id
from con_contract cc
where cc.contract_id = c.contract_id)
and pq.document_category = 'PROJECT')) other_payment2,
(SELECT gc.currency_name
FROM gld_currency_v gc
WHERE gc.currency_code = cpr.currency_code) currency_name,
cpr.payment_req_ln_id,
cpr.payment_req_id,
cpr.payment_req_ln_type,
cpr.ref_doc_id,
cpr.ref_doc_line_id,
cpr.ref_doc_category
from csh_payment_req_ln cpr, con_contract c, hls_bp_master hbm
where cpr.ref_doc_category = 'CONTRACT'
and c.contract_id = cpr.ref_doc_id
and hbm.bp_id = c.bp_id_tenant )v
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -10,205 +10,195 @@ ...@@ -10,205 +10,195 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
SELECT t1.*,(select v.code_value_name from sys_code_values_v v where v.code = 'CON_WRITE_OFF_FLAG' and v.code_value = t1.cf_61_write_off_flag) cf_61_write_off_flag_n SELECT t1.*,
FROM (SELECT t.contract_id, (select v.code_value_name
t.contract_name, from sys_code_values_v v
f.cashflow_id, where v.code = 'CON_WRITE_OFF_FLAG'
t.search_term_1, and v.code_value = t1.cf_61_write_off_flag) cf_61_write_off_flag_n,
f.times, (select v.code_value_name
t.contract_number, from sys_code_values_v v
t.bp_id_tenant, where v.code = 'VENDER_NAME'
hbm.bp_class, and v.code_value = t1.vender_name) vender_name_n
hbm.bp_code bp_id_tenant_c, FROM (SELECT hli.vender_name,
hbm.bp_name bp_id_tenant_n, t.contract_id,
hbm.bp_id tenant_bp_id, t.contract_name,
hbm.bp_name bp_name, f.cashflow_id,
hbm.bp_code bp_code, t.search_term_1,
h.description cf_item_desc, f.times,
h.cf_item, t.contract_number,
f.due_amount, t.bp_id_tenant,
t.currency, hbm.bp_class,
/* (SELECT dbms_lob.substr(wmsys.wm_concat(ci.serial_number)) hbm.bp_code bp_id_tenant_c,
FROM con_contract_lease_item ci hbm.bp_name bp_id_tenant_n,
WHERE ci.contract_id = t.contract_id hbm.bp_id tenant_bp_id,
AND ci.serial_number IS NOT NULL) serial_number,*/ hbm.bp_name bp_name,
to_char(f.due_date, 'yyyy-mm-dd') due_date, hbm.bp_code bp_code,
nvl(f.received_amount, 0) received_amount, h.description cf_item_desc,
nvl(f.due_amount, 0) - nvl(f.received_amount, 0) residual_amount, h.cf_item,
(nvl((SELECT SUM(l.amount_paid) f.due_amount,
FROM csh_payment_req_ln l, csh_payment_req_hd h t.currency,
WHERE l.ref_doc_line_id = f.cashflow_id /* (SELECT dbms_lob.substr(wmsys.wm_concat(ci.serial_number))
AND l.payment_req_id = h.payment_req_id FROM con_contract_lease_item ci
AND h.submitted_flag = 'Y' WHERE ci.contract_id = t.contract_id
AND h.approval_status = 'APPROVED' AND ci.serial_number IS NOT NULL) serial_number,*/
AND nvl(h.closed_flag, 'N') = 'Y'), to_char(f.due_date, 'yyyy-mm-dd') due_date,
0) + nvl(f.received_amount, 0) received_amount,
nvl((SELECT SUM(l.amount) nvl(f.due_amount, 0) - nvl(f.received_amount, 0) residual_amount,
FROM csh_payment_req_ln l, csh_payment_req_hd h (nvl((SELECT SUM(l.amount_paid)
WHERE l.ref_doc_line_id = f.cashflow_id FROM csh_payment_req_ln l, csh_payment_req_hd h
AND l.payment_req_id = h.payment_req_id WHERE l.ref_doc_line_id = f.cashflow_id
AND h.submitted_flag = 'Y' AND l.payment_req_id = h.payment_req_id
AND h.approval_status = 'APPROVED' AND h.submitted_flag = 'Y'
AND nvl(h.closed_flag, 'N') <> 'Y'), AND h.approval_status = 'APPROVED'
0) + AND nvl(h.closed_flag, 'N') = 'Y'),
nvl((SELECT SUM(l.amount) 0) +
FROM csh_payment_req_ln l, csh_payment_req_hd h nvl((SELECT SUM(l.amount)
WHERE l.ref_doc_line_id = f.cashflow_id FROM csh_payment_req_ln l, csh_payment_req_hd h
AND l.payment_req_id = h.payment_req_id WHERE l.ref_doc_line_id = f.cashflow_id
AND h.submitted_flag = 'Y' AND l.payment_req_id = h.payment_req_id
AND h.approval_status = 'APPROVING'), AND h.submitted_flag = 'Y'
0)) applied_pay_amount, AND h.approval_status = 'APPROVED'
t.vat_flag, AND nvl(h.closed_flag, 'N') <> 'Y'),
(SELECT fc.company_short_name 0) +
FROM fnd_companies fc nvl((SELECT SUM(l.amount)
WHERE fc.company_id = t.company_id) lessor_name, FROM csh_payment_req_ln l, csh_payment_req_hd h
t.business_type con_business_type, WHERE l.ref_doc_line_id = f.cashflow_id
(SELECT hbt.description AND l.payment_req_id = h.payment_req_id
FROM hls_business_type hbt AND h.submitted_flag = 'Y'
WHERE t.business_type = hbt.business_type AND h.approval_status = 'APPROVING'),
AND rownum = 1) con_business_type_n, 0)) applied_pay_amount,
/*(SELECT m.taxpayer_type t.vat_flag,
FROM hls_bp_master_lv m (SELECT fc.company_short_name
WHERE m.bp_id = csh_payment_req_pkg.get_bp_id(t.contract_id)) taxpayer_type, FROM fnd_companies fc
(SELECT v.code_value_name AS value_name WHERE fc.company_id = t.company_id) lessor_name,
FROM sys_code_values_v v t.business_type con_business_type,
WHERE v.code = 'HLS211_TAXPAYER_TYPE' (SELECT hbt.description
AND v.code_enabled_flag = 'Y' FROM hls_business_type hbt
AND v.code_value_enabled_flag = 'Y' WHERE t.business_type = hbt.business_type
AND v.code_value = AND rownum = 1) con_business_type_n,
(SELECT m.taxpayer_type t.cdd_list_id,
FROM hls_bp_master_lv m t.division,
WHERE m.bp_id = (SELECT h8.description
csh_payment_req_pkg.get_bp_id(t.contract_id))) taxpayer_type_n,*/ FROM hls_division h8
/* (SELECT v.code_value_name WHERE h8.enabled_flag = 'Y'
FROM hls_product_plan_definition hls, AND t.division = h8.division) division_n,
con_contract_lease_item ccl, (con_contract_pkg.get_first_contract_day(t.contract_id)) first_contract_day,
con_contract cc, (SELECT decode(COUNT(1), 0, 'N', 'Y')
sys_code_values_v v FROM acp_invoice_ln ai
WHERE ccl.contract_id = t.contract_id WHERE ai.contract_id = t.contract_id) invoice_uploaded_flag,
AND cc.contract_id = ccl.contract_id
AND ccl.product_plan_id = hls.product_plan_id
AND cc.data_class = 'NORMAL'
AND v.code = 'PRODUCT_CATEGORY'
AND v.code_value = hls.product_type) product_type_n,
(SELECT hls.product_name_write
FROM hls_product_plan_definition hls,
con_contract cc,
con_contract_lease_item ccl
WHERE ccl.contract_id = t.contract_id
AND cc.contract_id = ccl.contract_id
AND ccl.product_plan_id = hls.product_plan_id
AND cc.data_class = 'NORMAL') product_name_write,*/
t.cdd_list_id,
t.division,
(SELECT h8.description
FROM hls_division h8
WHERE h8.enabled_flag = 'Y'
AND t.division = h8.division) division_n,
(con_contract_pkg.get_first_contract_day(t.contract_id)) first_contract_day,
(SELECT decode(COUNT(1), 0, 'N', 'Y')
FROM acp_invoice_ln ai
WHERE ai.contract_id = t.contract_id) invoice_uploaded_flag,
(SELECT v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code = 'YES_NO'
AND v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code_value =
(SELECT decode(COUNT(1), 0, 'N', 'Y')
FROM acp_invoice_ln ai
WHERE ai.contract_id = t.contract_id)) invoice_uploaded_flag_n,
i.pattern,
i.machine_number,
(SELECT to_char(substr(wm_concat(cccr.interface_name), 1, 1000))
FROM con_contract_case_record cccr
WHERE cccr.document_id = t.contract_id
AND cccr.document_table = 'CON_CONTRACT') interface_name,
(SELECT to_char(substr(wm_concat(cccr.status_n), 1, 1000))
FROM con_contract_case_record_lv cccr
WHERE cccr.document_id = t.contract_id
AND cccr.document_table = 'CON_CONTRACT') status_n,
i.price,
i.factory_price,
nvl(t.first_delay_flag,'N') first_delay_flag,
(SELECT v.code_value_name AS value_name (SELECT v.code_value_name AS value_name
FROM sys_code_values_v v FROM sys_code_values_v v
WHERE v.code = 'YES_NO' WHERE v.code = 'YES_NO'
AND v.code_enabled_flag = 'Y' AND v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y' AND v.code_value_enabled_flag = 'Y'
AND v.code_value = nvl(t.first_delay_flag,'N')) first_delay_flag_n, AND v.code_value =
(SELECT decode(COUNT(1), 0, 'N', 'Y')
FROM acp_invoice_ln ai
WHERE ai.contract_id = t.contract_id)) invoice_uploaded_flag_n,
i.pattern,
i.machine_number,
(SELECT to_char(substr(wm_concat(cccr.interface_name),
1,
1000))
FROM con_contract_case_record cccr
WHERE cccr.document_id = t.contract_id
AND cccr.document_table = 'CON_CONTRACT') interface_name,
(SELECT to_char(substr(wm_concat(cccr.status_n), 1, 1000))
FROM con_contract_case_record_lv cccr
WHERE cccr.document_id = t.contract_id
AND cccr.document_table = 'CON_CONTRACT') status_n,
i.price,
i.factory_price,
nvl(t.first_delay_flag, 'N') first_delay_flag,
(SELECT v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code = 'YES_NO'
AND v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code_value = nvl(t.first_delay_flag, 'N')) first_delay_flag_n,
t.bp_id_agent_level1, t.bp_id_agent_level1,
(SELECT bp.bp_name (SELECT bp.bp_name
FROM hls_bp_master bp FROM hls_bp_master bp
WHERE bp.bp_id = t.bp_id_agent_level1) bp_id_agent_level1_n, WHERE bp.bp_id = t.bp_id_agent_level1) bp_id_agent_level1_n,
(SELECT bp.extra_nam (SELECT bp.extra_nam
FROM hls_bp_master bp FROM hls_bp_master bp
WHERE bp.bp_id = t.bp_id_agent_level1) agent_extra_nam, WHERE bp.bp_id = t.bp_id_agent_level1) agent_extra_nam,
nvl((select nvl((select (case
(case when sum(ccc.due_amount) =
when sum(ccc.due_amount) = sum(ccc.received_amount) then sum(ccc.received_amount) then
'FULL' 'FULL'
when sum(ccc.received_amount) = 0 then when sum(ccc.received_amount) = 0 then
'NOT' 'NOT'
when sum(ccc.received_amount) > 0 and when sum(ccc.received_amount) > 0 and
sum(ccc.due_amount) > sum(ccc.received_amount) then sum(ccc.due_amount) >
'PARTIAL' sum(ccc.received_amount) then
else 'PARTIAL'
'NOT' else
end) write_off_flag 'NOT'
from con_contract_cashflow ccc end) write_off_flag
where ccc.cf_item = 61 from con_contract_cashflow ccc
and ccc.cf_status = 'RELEASE' where ccc.cf_item = 61
and ccc.cf_direction = 'INFLOW' and ccc.cf_status = 'RELEASE'
and ccc.contract_id = t.contract_id and ccc.cf_direction = 'INFLOW'
group by ccc.contract_id),'FULL') cf_61_write_off_flag and ccc.contract_id = t.contract_id
FROM con_contract_cashflow f, group by ccc.contract_id),
hls_cashflow_item h, 'FULL') cf_61_write_off_flag,
con_contract_lease_item i, --add by shen
hls_bp_master hbm, (select bp_name
con_contract t from hls_bp_master
WHERE i.contract_id = t.contract_id where hls_bp_master.bp_id = t.bp_id_agent_level1) bp_id_agent_n
AND i.enabled_flag = 'Y'
AND i.equipment_type = 'MAIN' FROM con_contract_cashflow f,
AND t.contract_id = f.contract_id hls_cashflow_item h,
and t.bp_id_tenant = hbm.bp_id(+) con_contract_lease_item i,
AND f.cf_item = h.cf_item(+) hls_lease_item hli,
AND h.cf_direction(+) = 'OUTFLOW' hls_bp_master hbm,
AND f.write_off_flag <> 'FULL' con_contract t
AND f.cf_status IN ('RELEASE', 'BLOCK') WHERE i.contract_id = t.contract_id
AND f.cf_direction = 'OUTFLOW' AND i.lease_item_id = hli.lease_item_id
AND (nvl(f.due_amount, 0) - AND i.enabled_flag = 'Y'
nvl((SELECT SUM(l.amount_paid) AND i.equipment_type = 'MAIN'
FROM csh_payment_req_ln l, csh_payment_req_hd h AND t.contract_id = f.contract_id
WHERE l.ref_doc_line_id = f.cashflow_id and t.bp_id_tenant = hbm.bp_id(+)
AND l.payment_req_id = h.payment_req_id AND f.cf_item = h.cf_item(+)
-- AND AND h.cf_direction(+) = 'OUTFLOW'
--h.submitted_flag = 'Y' AND AND f.write_off_flag <> 'FULL'
-- h.approval_status = 'APPROVED' AND f.cf_status IN ('RELEASE', 'BLOCK')
AND nvl(h.closed_flag, 'N') = 'Y'), AND f.cf_direction = 'OUTFLOW'
0) - AND (nvl(f.due_amount, 0) -
nvl((SELECT SUM(l.amount) nvl((SELECT SUM(l.amount_paid)
FROM csh_payment_req_ln l, csh_payment_req_hd h FROM csh_payment_req_ln l, csh_payment_req_hd h
WHERE l.ref_doc_line_id = f.cashflow_id WHERE l.ref_doc_line_id = f.cashflow_id
AND l.payment_req_id = h.payment_req_id AND l.payment_req_id = h.payment_req_id
--AND -- AND
-- h.submitted_flag = 'Y' AND --h.submitted_flag = 'Y' AND
--h.approval_status = 'APPROVED' -- h.approval_status = 'APPROVED'
AND nvl(h.closed_flag, 'N') <> 'Y'), AND nvl(h.closed_flag, 'N') = 'Y'),
0) - 0) -
nvl((SELECT SUM(l.amount) nvl((SELECT SUM(l.amount)
FROM csh_payment_req_ln l, csh_payment_req_hd h FROM csh_payment_req_ln l, csh_payment_req_hd h
WHERE l.ref_doc_line_id = f.cashflow_id WHERE l.ref_doc_line_id = f.cashflow_id
AND l.payment_req_id = h.payment_req_id AND l.payment_req_id = h.payment_req_id
AND h.approval_status = 'APPROVING' --AND
--AND -- h.submitted_flag = 'Y' AND
--h.submitted_flag = 'Y' AND --h.approval_status = 'APPROVED'
--h.approval_status = 'APPROVING' AND nvl(h.closed_flag, 'N') <> 'Y'),
), 0) -
0)) > 0 nvl((SELECT SUM(l.amount)
AND t.data_class = 'NORMAL' FROM csh_payment_req_ln l, csh_payment_req_hd h
AND t.contract_status NOT IN ('NEW','SIGN','CANCEL', 'PENDING', 'CLOSED') WHERE l.ref_doc_line_id = f.cashflow_id
AND f.cf_item <> 0) t1 AND l.payment_req_id = h.payment_req_id
AND h.approval_status = 'APPROVING'
--AND
--h.submitted_flag = 'Y' AND
--h.approval_status = 'APPROVING'
),
0)) > 0
AND t.data_class = 'NORMAL'
AND t.contract_status NOT IN
('NEW', 'SIGN', 'CANCEL', 'PENDING', 'CLOSED')
AND f.cf_item <> 0) t1
#WHERE_CLAUSE# #WHERE_CLAUSE#
#ORDER_BY_CLAUSE# #ORDER_BY_CLAUSE#
...@@ -251,11 +241,10 @@ ...@@ -251,11 +241,10 @@
<bm:field name="lessor_name"/> <bm:field name="lessor_name"/>
<bm:field name="con_business_type"/> <bm:field name="con_business_type"/>
<bm:field name="con_business_type_n"/> <bm:field name="con_business_type_n"/>
<!--<bm:field name="taxpayer_type"/>-->
<!--<bm:field name="taxpayer_type_n"/>-->
<!--<bm:field name="product_type_n"/>-->
<!--<bm:field name="product_name_write"/>-->
<bm:field name="cdd_list_id"/> <bm:field name="cdd_list_id"/>
<bm:field name="bp_id_agent_n"/>
<bm:field name="vender_name"/>
<bm:field name="vender_name_n"/>
<bm:field name="division"/> <bm:field name="division"/>
<bm:field name="division_n"/> <bm:field name="division_n"/>
<bm:field name="first_contract_day"/> <bm:field name="first_contract_day"/>
...@@ -272,7 +261,6 @@ ...@@ -272,7 +261,6 @@
<bm:field name="bp_id_agent_level1_n"/> <bm:field name="bp_id_agent_level1_n"/>
<bm:field name="agent_extra_nam"/> <bm:field name="agent_extra_nam"/>
<bm:field name="cf_61_write_off_flag"/> <bm:field name="cf_61_write_off_flag"/>
<bm:field name="cf_61_write_off_flag_n"/> <bm:field name="cf_61_write_off_flag_n"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
...@@ -281,41 +269,45 @@ ...@@ -281,41 +269,45 @@
Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js"); Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");
]]></s:bm-script> ]]></s:bm-script>
</bm:features> </bm:features>
<!--只查找该代理店-->
<bm:data-filters>
<!-- <bm:data-filter name="enabled_flag" enforceOperations="query" expression="(t1.enabled_flag=&apos;Y&apos;)"/>-->
</bm:data-filters>
<bm:query-fields> <bm:query-fields>
<!--<bm:query-field name="pay_contract_from" datatype="java.lang.String" queryExpression="t1.contract_number&gt;=${@pay_contract_from}"/>--> <!--<bm:query-field name="pay_contract_from" datatype="java.lang.String" queryExpression="t1.contract_number&gt;=${@pay_contract_from}"/>-->
<!--<bm:query-field name="pay_contract_to" datatype="java.lang.String" queryExpression="t1.contract_number&lt;=${@pay_contract_to}"/>--> <!--<bm:query-field name="pay_contract_to" datatype="java.lang.String" queryExpression="t1.contract_number&lt;=${@pay_contract_to}"/>-->
<bm:query-field name="contract_number" datatype="java.lang.String" <bm:query-field name="contract_number"
queryExpression="t1.contract_number like ${@contract_number}"/> queryExpression="t1.contract_number like ${@contract_number}"/>
<bm:query-field name="due_date_from" datatype="java.lang.String" <bm:query-field name="due_date_from"
queryexpression="t1.due_date &gt;= ${@due_date_from}"/> queryExpression="t1.due_date &gt;= ${@due_date_from}"/>
<bm:query-field name="due_date_to" datatype="java.lang.String" <bm:query-field name="due_date_to"
queryexpression="((t1.due_date &lt;= ${@due_date_to}) or (${@outflow_id} is not null)) "/> queryExpression="((t1.due_date &lt;= ${@due_date_to}) or (${@outflow_id} is not null)) "/>
<bm:query-field name="due_amount_from" datatype="java.lang.String" <bm:query-field name="due_amount_from"
queryExpression="t1.due_amount&gt;=${@due_amount_from}"/> queryExpression="t1.due_amount&gt;=${@due_amount_from}"/>
<bm:query-field name="due_amount_to" datatype="java.lang.String" <bm:query-field name="due_amount_to"
queryExpression="t1.due_amount&lt;=${@due_amount_to}"/> queryExpression="t1.due_amount&lt;=${@due_amount_to}"/>
<bm:query-field name="project_name" datatype="java.lang.String" <bm:query-field name="project_name"
queryExpression="t1.project_name LIKE ${@project_name}"/> queryExpression="t1.project_name LIKE ${@project_name}"/>
<bm:query-field name="bp_code_tenant_from" datatype="java.lang.String" <bm:query-field name="bp_code_tenant_from"
queryExpression="t1.bp_code&gt;=${@bp_code_tenant_from}"/> queryExpression="t1.bp_code&gt;=${@bp_code_tenant_from}"/>
<bm:query-field name="bp_code_tenant_to" datatype="java.lang.String" <bm:query-field name="bp_code_tenant_to"
queryExpression="t1.bp_code&lt;=${@bp_code_tenant_to}"/> queryExpression="t1.bp_code&lt;=${@bp_code_tenant_to}"/>
<bm:query-field name="bp_code_tenant" datatype="java.lang.String" <bm:query-field name="bp_code_tenant"
queryExpression="t1.bp_id_tenant_c= ${@bp_code_tenant}"/> queryExpression="t1.bp_id_tenant_c= ${@bp_code_tenant}"/>
<bm:query-field name="bp_name_tenant" datatype="java.lang.String" <bm:query-field name="bp_name_tenant"
queryExpression="t1.bp_id_tenant_n= ${@bp_name_tenant}"/> queryExpression="t1.bp_id_tenant_n= ${@bp_name_tenant}"/>
<bm:query-field name="bp_id_agent_level1" datatype="java.lang.String" <bm:query-field name="bp_id_agent_level1"
queryExpression="t1.bp_id_agent_level1= ${@bp_id_agent_level1}"/> queryExpression="t1.bp_id_agent_level1= ${@bp_id_agent_level1}"/>
<bm:query-field name="bp_id_agent_level1_n" datatype="java.lang.String" <bm:query-field name="bp_id_agent_level1_n"
queryExpression="t1.bp_id_agent_level1_n= ${@bp_id_agent_level1_n}"/> queryExpression="t1.bp_id_agent_level1_n= ${@bp_id_agent_level1_n}"/>
<bm:query-field name="bp_id_tenant" datatype="java.lang.String" <bm:query-field name="bp_id_tenant"
queryExpression="t1.bp_id_tenant= ${@bp_id_tenant}"/> queryExpression="t1.bp_id_tenant= ${@bp_id_tenant}"/>
<bm:query-field name="currency" datatype="java.lang.String" queryExpression="t1.currency = ${@currency}"/> <bm:query-field name="currency" queryExpression="t1.currency = ${@currency}"/>
<bm:query-field name="cf_item" datatype="java.lang.String" queryExpression="t1.cf_item = ${@cf_item}"/> <bm:query-field name="cf_item" queryExpression="t1.cf_item = ${@cf_item}"/>
<bm:query-field name="serial_number" queryExpression="t1.serial_number like ${@serial_number}"/> <bm:query-field name="serial_number" queryExpression="t1.serial_number like ${@serial_number}"/>
<bm:query-field name="project_number_from" datatype="java.lang.String" <bm:query-field name="project_number_from"
queryExpression="t1.project_number&gt;=${@project_number_from}"/> queryExpression="t1.project_number&gt;=${@project_number_from}"/>
<bm:query-field name="project_number_to" datatype="java.lang.String" <bm:query-field name="project_number_to"
queryExpression="t1.project_number&lt;=${@project_number_to}"/> queryExpression="t1.project_number&lt;=${@project_number_to}"/>
<bm:query-field name="bp_id" <bm:query-field name="bp_id"
queryExpression="exists(select 1 from con_contract_bp ccb where ccb.contract_id=t1.contract_id and ccb.bp_id=${@bp_id})"/> queryExpression="exists(select 1 from con_contract_bp ccb where ccb.contract_id=t1.contract_id and ccb.bp_id=${@bp_id})"/>
...@@ -323,11 +315,12 @@ ...@@ -323,11 +315,12 @@
<bm:query-field name="lessor_name" queryExpression="t1.lessor_name = ${@lessor_name}"/> <bm:query-field name="lessor_name" queryExpression="t1.lessor_name = ${@lessor_name}"/>
<bm:query-field name="division" queryExpression="t1.division = ${@division}"/> <bm:query-field name="division" queryExpression="t1.division = ${@division}"/>
<bm:query-field name="times" queryExpression="t1.times = ${@times}"/> <bm:query-field name="times" queryExpression="t1.times = ${@times}"/>
<bm:query-field name="times_from" datatype="java.lang.String" queryExpression="t1.times&gt;=${@times_from}"/> <bm:query-field name="times_from" queryExpression="t1.times&gt;=${@times_from}"/>
<bm:query-field name="times_to" datatype="java.lang.String" queryExpression="t1.times&lt;=${@times_to}"/> <bm:query-field name="times_to" queryExpression="t1.times&lt;=${@times_to}"/>
<bm:query-field name="outflow_id" queryExpression="t1.cashflow_id = ${@outflow_id}"/> <bm:query-field name="outflow_id" queryExpression="t1.cashflow_id = ${@outflow_id}"/>
<bm:query-field name="invoice_uploaded_flag_n" queryExpression="t1.invoice_uploaded_flag_n = ${@invoice_uploaded_flag_n}"/> <bm:query-field name="invoice_uploaded_flag_n" queryExpression="t1.invoice_uploaded_flag_n = ${@invoice_uploaded_flag_n}"/>
<bm:query-field name="first_delay_flag_n" queryExpression="t1.first_delay_flag_n = ${@first_delay_flag_n}"/> <bm:query-field name="first_delay_flag_n" queryExpression="t1.first_delay_flag_n = ${@first_delay_flag_n}"/>
<bm:query-field name="cf_61_write_off_flag" queryExpression="t1.cf_61_write_off_flag = ${@cf_61_write_off_flag}"/> <bm:query-field name="cf_61_write_off_flag" queryExpression="t1.cf_61_write_off_flag = ${@cf_61_write_off_flag}"/>
<bm:query-field name="vender_name" queryExpression="t1.vender_name=${@vender_name}"/>
</bm:query-fields> </bm:query-fields>
</bm:model> </bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: qwm
$Date: 2013-5-24 上午11:25:41
$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
distinct vender_name
from hls_lease_item
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="vender_name" databaseType="varchar" datatype="java.lang.String" physicalName="vender_name" forDisplay="true" forQuery="true" prompt="厂商名称"/>
</bm:fields>
<bm:query-fields>
<bm:query-field field="vender_name" queryOperator="like"/>
</bm:query-fields>
</bm:model>
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
modelaction="update"/> 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 src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id" <a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
url="${/request/@context_path}/uploadFile.lview"/> url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id" <a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id"
...@@ -82,6 +83,7 @@ ...@@ -82,6 +83,7 @@
var dirty_flag = 'N'; var dirty_flag = 'N';
window['${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var dirty_flag = 'Y'; var dirty_flag = 'Y';
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln'); var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
...@@ -662,42 +664,93 @@ ...@@ -662,42 +664,93 @@
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var check_flag = false; var check_flag = false;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var hd_record = $(ds_id).getCurrentRecord(); var ds_line_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var payment_req_id = hd_record.get('payment_req_id');
var total_amount_agent=0;
var total_amount_vender=0;
var total_apply_amount=0;
//检验输入的数据是否符合要求
var check_due_amount_flag=true;
var line_datas=$(ds_line_id).data;
for(var i=0;i<line_datas.length;i++){
var line_data=line_datas[i];
//应付我司金额
var amount_agent=line_data.get('amount_agent');
var amount_vender= line_data.get('amount_vender');
var due_amount= line_data.get('due_amount');
//首付款抵充金额
var other_payment2=line_data.get('other_payment2');
if(amount_agent<0||amount_vender<0){
$L.showErrorMessage("提示",'应付我司金额和首付款抵充金额不能为负数!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if((amount_agent+amount_vender+other_payment2)!=due_amount){
check_due_amount_flag=false;
}
//本次申请金额等于委托加我司
var this_apply_amount=plus(amount_agent,amount_vender);
total_apply_amount=plus(total_apply_amount,this_apply_amount);
line_data.set('amount',this_apply_amount);
total_amount_agent=plus(total_amount_agent,amount_agent);
total_amount_vender=plus(total_amount_vender,amount_vender);
}
if(!check_due_amount_flag){
$L.showInfoMessage("提示",'应付金额应等于应付我司金额,委托付款金额和首付款抵充金额之和!');
}
//给头表赋值
$(ds_id).getAt(0).set('amount_agent_total',total_amount_agent);
$(ds_id).getAt(0).set('amount_vender_total',total_amount_vender);
$(ds_id).getAt(0).set('amount',total_apply_amount);
$(ds_id).getAt(0).set('company_id','${/session/@company_id}');
$(ds_id).getAt(0).set('transaction_category','BUSINESS');
$(ds_id).getAt(0).set('submitted_flag','N');
$(ds_id).getAt(0).set('printed_flag','N');
$(ds_id).getAt(0).set('document_category','PAYMENT_REQ');
//确认保存
var hd_record = $(ds_id).getCurrentRecord();
var payment_req_id = hd_record.get('payment_req_id');
console.log( $(ds_id));
console.log( $(ds_line_id));
if(payment_req_id){ if (payment_req_id) {
Leaf.request({ Leaf.request({
url: $('${/parameter/@layout_code}csh511_csh_payment_req_hd_query').getUrl(), url: $('${/parameter/@layout_code}csh511_csh_payment_req_hd_query').getUrl(),
para: { para: {
payment_req_id: payment_req_id, payment_req_id: payment_req_id,
}, },
success: function(res) { success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if (res.result.record.submitted_flag == 'Y') {
Leaf.showMessage('${l:PROMPT}', '该单据已经提交');
check_flag = false;
} else {
check_flag = true;
}
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
check_flag = false;
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
check_flag = false;
},
sync: true,
scope: this
});
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if (res.result.record.submitted_flag =='Y'){ } else {
Leaf.showMessage('${l:PROMPT}', '该单据已经提交'); check_flag = true;
check_flag = false; }
}else{
check_flag = true;
}
}, return check_flag||false;
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
check_flag = false;
},
failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
check_flag = false;
},
sync: true,
scope: this
});
}else{
check_flag = true;
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return check_flag;
}; };
//调用合同后督 //调用合同后督
...@@ -848,20 +901,30 @@ ...@@ -848,20 +901,30 @@
//保存submitsuccess调用 //保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res, bp_seq) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
dirty_flag = 'N'; dirty_flag = 'N';
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var hd_record = $(hdds_id).getCurrentRecord(); var hd_record = $(hdds_id).getCurrentRecord();
var payment_req_id = hd_record.get('payment_req_id'); var payment_req_id = hd_record.get('payment_req_id');
//获得相应的行信息
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
$(lnds_id).setQueryUrl('${/request/@context_path}/autocrud/csh.CSH501.csh_payment_req_ln_query_after_save/query?payment_req_id=' + payment_req_id);
var contract_id = '${/parameter/@contract_id}'; var contract_id = '${/parameter/@contract_id}';
if (payment_req_id) { if (payment_req_id) {
$(hdds_id).setQueryParameter('payment_req_id', payment_req_id); $(hdds_id).setQueryParameter('payment_req_id', payment_req_id);
$(hdds_id).query(); $(hdds_id).query();
$(lnds_id).query();
} else { } else {
Leaf.showMessage('${l:PROMPT}', '请先保存数据'); Leaf.showMessage('${l:PROMPT}', '请先保存数据');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
} }
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}; };
function csh504_prepayment_dk_link(record_id, name) { function csh504_prepayment_dk_link(record_id, name) {
...@@ -1061,6 +1124,7 @@ ...@@ -1061,6 +1124,7 @@
function on_csh_payment_req_temp_ln_ds_query(ds, qpara) { function on_csh_payment_req_temp_ln_ds_query(ds, qpara) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
qpara['payment_bp_id'] = '${/parameter/@payment_bp_id}'; qpara['payment_bp_id'] = '${/parameter/@payment_bp_id}';
} }
...@@ -1087,6 +1151,7 @@ ...@@ -1087,6 +1151,7 @@
window['${/parameter/@layout_code}_on_layout_dynamic_grid_unselect'] = function (ds, record, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_grid_unselect'] = function (ds, record, bp_seq) {
record.set('pay_amount', ''); record.set('pay_amount', '');
}; };
// window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function() { // window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function() {
// Leaf.showConfirm('${l:HLS.PROMPT}', '是否确定提起银行付款', function() { // Leaf.showConfirm('${l:HLS.PROMPT}', '是否确定提起银行付款', function() {
// var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); // var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
...@@ -1113,6 +1178,8 @@ ...@@ -1113,6 +1178,8 @@
// }; // };
window['${/parameter/@layout_code}_upload_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_upload_layout_dynamic_click'] = function () {
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var hd_record = $(hdds_id).getCurrentRecord(); var hd_record = $(hdds_id).getCurrentRecord();
...@@ -1141,12 +1208,12 @@ ...@@ -1141,12 +1208,12 @@
<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"/>
<a:dataSets> <a:dataSets>
<a:dataSet id="csh_payment_req_temp_ln_ds" autoQuery="true" fetchAll="true" <a:dataSet id="csh_payment_req_temp_ln_ds" autoQuery="true" fetchAll="true"
model="csh.CSH501.csh_payment_req_ln_query"> model="csh.CSH501.csh_payment_req_ln_query">
<a:events> <a:events>
<a:event name="load" handler="on_csh_payment_req_temp_ln_ds_load"/> <a:event name="load" handler="on_csh_payment_req_temp_ln_ds_load"/>
<a:event name="query" handler="on_csh_payment_req_temp_ln_ds_query"/> <a:event name="query" handler="on_csh_payment_req_temp_ln_ds_query"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
</a:dataSets> </a:dataSets>
</a:view> </a:view>
</a:screen> </a:screen>
...@@ -19,6 +19,11 @@ ...@@ -19,6 +19,11 @@
<div/> <div/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
Leaf.request(function(){
console.log('${/session}');
})
var cashflow_id = ''; var cashflow_id = '';
function csh501_payment_return() { function csh501_payment_return() {
...@@ -28,17 +33,27 @@ ...@@ -28,17 +33,27 @@
function confirmFun() { function confirmFun() {
var a = $('csh_payment_req_selectedDs').getSelected(); var a = $('csh_payment_req_selectedDs').getSelected();
var record = a[0]; var record = a[0];
var cashflow_id_list = []; var cashflow_id_list = [];
var param = {}; var param = {};
var contract_id_list = []; var contract_id_list = [];
if (record == undefined) { if (record == undefined) {
Leaf.showMessage('${l:PROMPT_MESSAGE}', '至少选择一条现金流!', null, 250, 100); Leaf.showMessage('${l:PROMPT_MESSAGE}', '至少选择一条现金流!', null, 250, 100);
} else { return;
for (i = 0; i < a.length; i++) { }
//对是否为同一个厂商进行检查
var vender_name=record.get('vender_name');
var vender_flag=true;
for (i = 0; i < a.length; i++) {
//检验厂商
if(a[i].get('vender_name')!=vender_name){
vender_flag=false;
$L.showErrorMessage("提示",'请选择厂商相同的现金流信息!');
return;
}
cashflow_id = a[i].get('cashflow_id'); cashflow_id = a[i].get('cashflow_id');
var arr = {}; var arr = {};
var arrcon = {};
contract_id_list[i] = a[i].get('contract_id'); contract_id_list[i] = a[i].get('contract_id');
arr['_status'] = 'insert'; arr['_status'] = 'insert';
arr['cashflow_id'] = cashflow_id; arr['cashflow_id'] = cashflow_id;
...@@ -60,10 +75,9 @@ ...@@ -60,10 +75,9 @@
} }
param['details'] = cashflow_id_list; param['details'] = cashflow_id_list;
param['contract_id'] = record.get('contract_id'); param['contract_id'] = record.get('contract_id');
// if (max != min) {
// Leaf.showMessage('${l:PROMPT_MESSAGE}', '请选择合同号相同的单据!', null, 250, 100);
// } else {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}'); Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
console.log(param);
Leaf.request({ Leaf.request({
url: $('csh_payment_req_cashflow_id_link').getUrl(), url: $('csh_payment_req_cashflow_id_link').getUrl(),
para: param, para: param,
...@@ -90,6 +104,7 @@ ...@@ -90,6 +104,7 @@
param['cdd_list_id'] = record.get('cdd_list_id'); param['cdd_list_id'] = record.get('cdd_list_id');
param['division'] = record.get('division'); param['division'] = record.get('division');
param['first_contract_day'] = record.get('first_contract_day'); param['first_contract_day'] = record.get('first_contract_day');
//add by 9188 //add by 9188
if (a.length == 1) { if (a.length == 1) {
param['contract_number'] = record.get('contract_number'); param['contract_number'] = record.get('contract_number');
...@@ -113,7 +128,6 @@ ...@@ -113,7 +128,6 @@
}); });
// } // }
}
} }
function csh511_prepayment_create() { function csh511_prepayment_create() {
...@@ -186,6 +200,7 @@ ...@@ -186,6 +200,7 @@
<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"/>
<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CSH501"/> <a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CSH501"/>
<a:dataSets> <a:dataSets>
<a:dataSet id="vender_name_ds" lookupCode="VENDER_NAME"/>
<a:dataSet id="yes_no_ds" lookupCode="YES_NO"/> <a:dataSet id="yes_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="vat_flag_ds"> <a:dataSet id="vat_flag_ds">
<a:datas> <a:datas>
...@@ -200,7 +215,7 @@ ...@@ -200,7 +215,7 @@
<a:dataSet id="division_ds" loadData="true" model="basic.hls_division_for_lov"/> <a:dataSet id="division_ds" loadData="true" model="basic.hls_division_for_lov"/>
<a:dataSet id="csh_payment_req_query_ds" autoCreate="true"> <a:dataSet id="csh_payment_req_query_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="vender_name_n" returnField="vender_name" displayField="code_value_name" valueField="code_value" options="vender_name_ds"/>
<a:field name="times"/> <a:field name="times"/>
<a:field name="due_date_to" defaultValue="${/model/sys_time_default_value_list/record/@now_time}"/> <a:field name="due_date_to" defaultValue="${/model/sys_time_default_value_list/record/@now_time}"/>
<a:field name="project_number_from" lovGridHeight="300" lovHeight="450" lovService="prj.PRJ501.prj_project_for_lov" lovWidth="500" title="ACR510.FIELD.PROJECT_NUMBER_FROM"> <a:field name="project_number_from" lovGridHeight="300" lovHeight="450" lovService="prj.PRJ501.prj_project_for_lov" lovWidth="500" title="ACR510.FIELD.PROJECT_NUMBER_FROM">
...@@ -289,7 +304,7 @@ ...@@ -289,7 +304,7 @@
<a:form column="4" labelWidth="100" marginWidth="40" title="CSH501.CSH_REQ_CREATE"> <a:form column="4" labelWidth="100" marginWidth="40" title="CSH501.CSH_REQ_CREATE">
<!--<a:textField name="pay_contract_from" bindTarget="csh_payment_req_query_ds" prompt="支付表编号从" width="150"/>--> <!--<a:textField name="pay_contract_from" bindTarget="csh_payment_req_query_ds" prompt="支付表编号从" width="150"/>-->
<!--<a:textField name="pay_contract_to" bindTarget="csh_payment_req_query_ds" prompt="支付表编号从" width="150"/>--> <!--<a:textField name="pay_contract_to" bindTarget="csh_payment_req_query_ds" prompt="支付表编号从" width="150"/>-->
<a:textField name="contract_number" bindTarget="csh_payment_req_query_ds" prompt="合同号"/> <a:textField name="contract_number" bindTarget="csh_payment_req_query_ds" prompt="合同号"/>
<!-- <a:lov name="project_number_from" bindTarget="csh_payment_req_query_ds" prompt="HLS.PROJECT_NUMBER_FROM"> <!-- <a:lov name="project_number_from" bindTarget="csh_payment_req_query_ds" prompt="HLS.PROJECT_NUMBER_FROM">
<a:events> <a:events>
<a:event name="focus" handler="function(object){on_std_focus(object,&apos;PROJECT&apos;)}"/> <a:event name="focus" handler="function(object){on_std_focus(object,&apos;PROJECT&apos;)}"/>
...@@ -300,7 +315,7 @@ ...@@ -300,7 +315,7 @@
<a:event name="focus" handler="function(object){on_std_focus(object,&apos;PROJECT&apos;)}"/> <a:event name="focus" handler="function(object){on_std_focus(object,&apos;PROJECT&apos;)}"/>
</a:events> </a:events>
</a:lov> --> </a:lov> -->
<a:lov name="bp_name_tenant" bindTarget="csh_payment_req_query_ds" prompt="承租人"> <a:lov name="bp_name_tenant" bindTarget="csh_payment_req_query_ds" prompt="商业伙伴名称">
<a:events> <a:events>
<a:event name="focus" handler="function(object){on_std_focus(object,&apos;BP&apos;)}"/> <a:event name="focus" handler="function(object){on_std_focus(object,&apos;BP&apos;)}"/>
</a:events> </a:events>
...@@ -327,20 +342,21 @@ ...@@ -327,20 +342,21 @@
<!--</a:events>--> <!--</a:events>-->
<!--</a:lov>--> <!--</a:lov>-->
<!--<a:textField name="bp_name" bindTarget="csh_payment_req_query_ds" prompt="付款对象"/>--> <!--<a:textField name="bp_name" bindTarget="csh_payment_req_query_ds" prompt="付款对象"/>-->
<a:textField name="times_from" bindTarget="csh_payment_req_query_ds" prompt="期次从"/> <!-- <a:textField name="times_from" bindTarget="csh_payment_req_query_ds" prompt="期次从"/>-->
<a:lov name="cf_item_desc" bindTarget="csh_payment_req_query_ds" prompt="现金流类型"/> <a:lov name="cf_item_desc" bindTarget="csh_payment_req_query_ds" prompt="现金流类型"/>
<a:numberField name="due_amount_from" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_query_ds" prompt="应付金额从"/>
<a:datePicker name="due_date_from" bindTarget="csh_payment_req_query_ds" prompt="应付日期从"/> <a:datePicker name="due_date_from" bindTarget="csh_payment_req_query_ds" prompt="应付日期从"/>
<a:datePicker name="due_date_to" bindTarget="csh_payment_req_query_ds" prompt="应付日期到"/>
<a:comboBox name="vender_name_n" bindTarget="csh_payment_req_query_ds" prompt="厂商"/>
<a:numberField name="due_amount_from" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_query_ds" prompt="应付金额从"/>
<a:numberField name="due_amount_to" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_query_ds" prompt="应付金额到"/>
<!--<a:comboBox name="currency_name" bindTarget="csh_payment_req_query_ds" prompt="HLS.CURRENCY" width="150"/>--> <!--<a:comboBox name="currency_name" bindTarget="csh_payment_req_query_ds" prompt="HLS.CURRENCY" width="150"/>-->
<!-- <a:comboBox name="vat_flag" bindTarget="csh_payment_req_query_ds" prompt="增值税标志"/> --> <!-- <a:comboBox name="vat_flag" bindTarget="csh_payment_req_qu ery_ds" prompt="增值税标志"/> -->
<!--<a:comboBox name="division_n" bindTarget="csh_payment_req_query_ds" prompt="产品线"/>--> <!--<a:comboBox name="division_n" bindTarget="csh_payment_req_query_ds" prompt="产品线"/>-->
<a:textField name="times_to" bindTarget="csh_payment_req_query_ds" prompt="期次到"/> <!--<a:textField name="times_to" bindTarget="csh_payment_req_query_ds" prompt="期次到"/>-->
<a:comboBox name="invoice_uploaded_flag_n" bindTarget="csh_payment_req_query_ds" prompt="发票上传标志"/> <!--<a:comboBox name="invoice_uploaded_flag_n" bindTarget="csh_payment_req_query_ds" prompt="发票上传标志"/>
<a:numberField name="due_amount_to" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_query_ds" prompt="应付金额到"/>
<a:datePicker name="due_date_to" bindTarget="csh_payment_req_query_ds" prompt="应付日期到"/>
<a:lov name="bp_id_agent_level1_n" bindTarget="csh_payment_req_query_ds" prompt="代理商名称"/> <a:lov name="bp_id_agent_level1_n" bindTarget="csh_payment_req_query_ds" prompt="代理商名称"/>
<a:comboBox name="first_delay_flag_n" bindTarget="csh_payment_req_query_ds" prompt="是否首付延期"/> <a:comboBox name="first_delay_flag_n" bindTarget="csh_payment_req_query_ds" prompt="是否首付延期"/>
<a:comboBox name="cf_61_write_off_flag_n" bindTarget="csh_payment_req_query_ds" prompt="应收保费付款情况"/> <a:comboBox name="cf_61_write_off_flag_n" bindTarget="csh_payment_req_query_ds" prompt="应收保费付款情况"/>-->
</a:form> </a:form>
<a:grid id="csh_payment_req_maintain_grid_ds" bindTarget="csh_payment_req_selectedDs" marginHeight="260" marginWidth="40" navBar="true"> <a:grid id="csh_payment_req_maintain_grid_ds" bindTarget="csh_payment_req_selectedDs" marginHeight="260" marginWidth="40" navBar="true">
<a:toolBar> <a:toolBar>
...@@ -350,24 +366,26 @@ ...@@ -350,24 +366,26 @@
<a:column name="contract_number" prompt="合同号" width="120"/> <a:column name="contract_number" prompt="合同号" width="120"/>
<a:column name="contract_name" width="150"/> <a:column name="contract_name" width="150"/>
<!-- <a:column name="search_term_1" prompt="合同号" width="120"/> --> <!-- <a:column name="search_term_1" prompt="合同号" width="120"/> -->
<a:column name="bp_id_tenant_n" prompt="承租人" width="120"/> <a:column name="bp_id_tenant_n" prompt="商业伙伴名称" width="120"/>
<a:column name="bp_id_agent_level1_n" prompt="代理商" width="120"/> <!-- <a:column name="bp_id_agent_level1_n" prompt="代理商" width="120"/>
<a:column name="agent_extra_nam" prompt="代理商简称" width="120"/> <a:column name="agent_extra_nam" prompt="代理商简称" width="120"/>
<a:column name="first_delay_flag_n" align="center" prompt="是否首付延期"/> <a:column name="first_delay_flag_n" align="center" prompt="是否首付延期"/>-->
<a:column name="cf_item_desc" prompt="现金流类型" width="80"/> <a:column name="cf_item_desc" prompt="现金流类型" width="80"/>
<a:column name="times" align="center" prompt="期数" width="40"/> <a:column name="times" align="center" prompt="期数" width="40"/>
<a:column name="due_date" prompt="应付日期"/>
<a:column name="due_amount" align="right" prompt="应付金额" renderer="Leaf.formatMoney" width="110"/> <a:column name="due_amount" align="right" prompt="应付金额" renderer="Leaf.formatMoney" width="110"/>
<a:column name="received_amount" align="right" prompt="实际支付金额" renderer="Leaf.formatMoney"/> <a:column name="due_date" prompt="应付日期"/>
<a:column name="bp_id_agent_n" prompt="代理店"/>
<a:column name="vender_name_n" prompt="厂商"/>
<!-- <a:column name="received_amount" align="right" prompt="实际支付金额" renderer="Leaf.formatMoney"/>
<a:column name="residual_amount" align="right" prompt="剩余未支付金额" renderer="Leaf.formatMoney" width="110"/> <a:column name="residual_amount" align="right" prompt="剩余未支付金额" renderer="Leaf.formatMoney" width="110"/>
<a:column name="invoice_uploaded_flag_n" align="center" prompt="发票上传标志"/> <a:column name="invoice_uploaded_flag_n" align="center" prompt="发票上传标志"/>
<a:column name="interface_name" prompt="企案类型"/> <a:column name="interface_name" prompt="企案类型"/>
<a:column name="status_n" prompt="企案结果"/> <a:column name="status_n" prompt="企案结果"/>
<a:column name="pattern" prompt="机型"/> <a:column name="pattern" prompt="机型"/>-->
<!--<a:column name="price" align="right" renderer="Leaf.formatMoney" prompt="销售价格"/>--> <!--<a:column name="price" align="right" renderer="Leaf.formatMoney" prompt="销售价格"/>-->
<!--<a:column name="factory_price" align="right" renderer="Leaf.formatMoney" prompt="设备出厂价"/>--> <!--<a:column name="factory_price" align="right" renderer="Leaf.formatMoney" prompt="设备出厂价"/>-->
<a:column name="machine_number" prompt="机号"/> <!-- <a:column name="machine_number" prompt="机号"/>
<a:column name="cf_61_write_off_flag_n" prompt="应收保费收款情况"/> <a:column name="cf_61_write_off_flag_n" prompt="应收保费收款情况"/>-->
<!--<a:column name="applied_pay_amount" align="right" prompt="CSH501.CSH_APPLIED_PAYMENT_AMOUNT" renderer="Leaf.formatMoney" width="110"/>--> <!--<a:column name="applied_pay_amount" align="right" prompt="CSH501.CSH_APPLIED_PAYMENT_AMOUNT" renderer="Leaf.formatMoney" width="110"/>-->
<!-- <a:column name="serial_number" prompt="机编号" width="120"/> --> <!-- <a:column name="serial_number" prompt="机编号" width="120"/> -->
<!--<a:column name="division_n" prompt="产品线" width="150"/>--> <!--<a:column name="division_n" prompt="产品线" width="150"/>-->
......
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