Commit 5201868c authored by Spencer Chang's avatar Spencer Chang

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

parents 2d361b47 b2617dba
alter table csh_payment_req_ln add (vender_bank_account_id number);
comment on column csh_payment_req_ln.vender_bank_account_id is '厂商银行账户id';
\ No newline at end of file
comment on column csh_payment_req_ln.vender_bank_account_id is '厂商银行账户id';
alter table csh_payment_req_ln add (amount_agent_paid number);
comment on column csh_payment_req_ln.amount_agent_paid is '已付我司金额';
alter table csh_payment_req_ln add (amount_vender_paid number);
comment on column csh_payment_req_ln.amount_vender_paid is '已付厂商金额';
\ No newline at end of file
......@@ -16,6 +16,7 @@
'NEW' approval_status,
v.invoice_uploaded_flag,
v.invoice_uploaded_flag_n,
v.bp_id_agent_level1,
v.times,
v.cashflow_id,
v.cashflow_id ref_doc_line_id,
......@@ -95,6 +96,7 @@
t.contract_name,
t.document_category,
t.search_term_1,
t.bp_id_agent_level1,
p.project_name,
t.bp_id_tenant tenant_bp_id,
h.description cf_description,
......
......@@ -9,11 +9,16 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
from (select c.contract_number,
select *
from (select c.contract_number,
c.contract_name,
hbm.bp_name,
cpr.apply_pay_date,
cpr.bp_bank_account_id,
(select cph.payment_req_number
from csh_payment_req_hd cph
where cpr.payment_req_id = cph.payment_req_id) payment_req_number,
cpr.ref_doc_line_id cashflow_id,
(select times
from con_contract_cashflow ccc
where ccc.cashflow_id = cpr.ref_doc_line_id) times,
......@@ -25,7 +30,17 @@
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,
--bp_id 存的是哪个字段
/* (select c.transaction_num
from csh_transaction c
where c.source_doc_line_id = cpr.payment_req_ln_id
and c.source_doc_id = cpr.payment_req_id) transaction_num,
(select c.bank_slip_num
from csh_transaction c
where c.source_doc_line_id = cpr.payment_req_ln_id
and c.source_doc_id = cpr.payment_req_id
and c.transaction_type = 'PAYMENT') bank_slip_num,*/
(select bp_name
from hls_bp_master hbm
where hbm.bp_id = cpr.bp_id) BP_ID_AGENT_N,
......@@ -41,6 +56,10 @@
--应付我司金额
cpr.amount_agent,
cpr.amount_vender,
--未付金额
(cpr.amount_agent - nvl(cpr.amount_agent_paid, 0)) residual_agent_amount,
(cpr.amount_vender - nvl(cpr.amount_vender_paid, 0)) residual_vender_amount,
(select bp_name
from hls_bp_master hbm
where hbm.bp_id =
......
......@@ -155,7 +155,7 @@
hls_bp_master hbm,
con_contract t
WHERE i.contract_id = t.contract_id
AND i.lease_item_id = hli.lease_item_id
AND i.lease_item_id = hli.lease_item_id(+)
AND i.enabled_flag = 'Y'
AND i.equipment_type = 'MAIN'
AND t.contract_id = f.contract_id
......@@ -197,7 +197,8 @@
AND t.data_class = 'NORMAL'
AND t.contract_status NOT IN
('NEW', 'SIGN', 'CANCEL', 'PENDING', 'CLOSED')
AND f.cf_item <> 0) t1
--测试用,cf_itme应当为0
AND f.cf_item in (0,21)) t1
#WHERE_CLAUSE#
#ORDER_BY_CLAUSE#
......
......@@ -17,7 +17,7 @@
p_payment_req_id=>${@payment_req_id},
p_session_id=>${/session/@session_id},
p_pay_date=>to_date(${@transaction_date},'yyyy-mm-dd'),
p_pay_amount=>${@transaction_amount},
p_pay_amount=>${@amt},
p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num},
p_period_name=>${@period_name},
......@@ -35,6 +35,8 @@
p_handling_charge=>nvl(${@handling_charge},0),
p_payment_method_id =>${@payment_method_id},
p_payment_status =>${@payment_status},
p_this_pay_agent_amount=>nvl(${@this_pay_agent_amount},0),
p_this_pay_vender_amount=>nvl(${@this_pay_vender_amount},0),
p_merge_flag =>nvl(${@merge_flag},'N'),
p_due_amount =>nvl(${@due_amount},0));
end;]]></bm:update-sql>
......
......@@ -9,167 +9,159 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT
*
FROM
(SELECT
h.payment_req_number,
h.document_type,
(SELECT
d.document_type_desc
FROM
hls_document_type_v d
WHERE
d.document_type = h.document_type
) document_type_dis,
TO_CHAR(h.req_date, 'yyyy-mm-dd') req_date,
h.bp_id,
b.bp_code,
b.bp_name,
b.bp_category,
(SELECT
b.description
FROM
hls_bp_category b
WHERE
b.bp_category = h.bp_category
) bp_category_dis,
(SELECT
ct.description
FROM
hls_bp_category ct
WHERE
ct.bp_category = b.bp_category
) AS bp_category_desc,
h.amount apply_amount,
h.currency_code,
(SELECT
t.currency_name
FROM
gld_currency_vl t
WHERE
h.currency_code =t.currency_code
) currency_name,
h.created_by,
(SELECT
e.name
FROM
sys_user u,
exp_employees e
WHERE
h.owner_user_id = u.user_id AND
u.employee_id = e.employee_id
) user_name2,
(SELECT
e.name
FROM
sys_user u,
exp_employees e
WHERE
h.owner_user_id = u.user_id AND
u.employee_id = e.employee_id
) user_name,
h.submitted_flag,
h.approval_status,
(SELECT
t.code_value_name
FROM
sys_code_values_v t
WHERE
h.approval_status =t.code_value AND
t.code ='CSH_PAYMENT_REQ_APPROVAL_STATUS'
) approval_status_desc,
TO_CHAR(h.approval_date, 'yyyy-mm-dd') approval_date,
h.approval_note,
h.payment_req_id,
h.closed_flag,
h.payment_flag,
h.print_flag,
h.owner_user_id,
h.description payment_description,
TO_CHAR(h.apply_pay_date, 'yyyy-mm-dd') apply_pay_date,
yonda_individual_pkg.string_combination(p_sql =>'select t1.contract_number from con_contract t1,csh_payment_req_ln t2 where t1.contract_id = t2.ref_doc_id and t2.payment_req_id=' ,p_compare_column_val => h.payment_req_id,p_division_symbol => ',') contract_number,
yonda_individual_pkg.string_combination(p_sql =>'select hm.bp_name from con_contract t1,csh_payment_req_ln t2,hls_bp_master hm where hm.bp_id = t1.bp_id_tenant and t1.contract_id = t2.ref_doc_id and t2.payment_req_id=' ,p_compare_column_val => h.payment_req_id,p_division_symbol => ',') bp_id_tenant_n,
yonda_individual_pkg.string_combination(p_sql => 'SELECT t4.bank_branch_name || ''-'' || t4.bank_account_num banknum FROM con_contract t1, csh_payment_req_ln t2, fnd_companies t3, csh_bank_account_v t4 WHERE t1.contract_id = t2.ref_doc_id AND t1.spv_company_id = t3.company_id AND t3.bank_account_id = t4.bank_account_id and t2.payment_req_id=', p_compare_column_val => h.payment_req_id, p_division_symbol => ',') bank_account_num,
yonda_individual_pkg.string_combination(p_sql => 'SELECT t4.bank_account_name FROM con_contract t1, csh_payment_req_ln t2, fnd_companies t3, csh_bank_account_v t4 WHERE t1.contract_id = t2.ref_doc_id AND t1.spv_company_id = t3.company_id AND t3.bank_account_id = t4.bank_account_id and t2.payment_req_id=', p_compare_column_val => h.payment_req_id, p_division_symbol => ',') bank_account_name,
h.bp_bank_account_name,
h.bp_bank_account_num,
(SELECT
SUM(NVL(rl.amount, 0) - NVL(
(SELECT
SUM(amount)
FROM
csh_payment_req_ln_ddct ld
WHERE
ld.payment_req_ln_id = rl.payment_req_ln_id
), 0) - NVL(
(SELECT
SUM(lp.write_off_amt)
FROM
csh_payment_req_ln_prepay lp
WHERE
lp.payment_req_ln_id = rl.payment_req_ln_id
), 0))
FROM
csh_payment_req_ln rl
WHERE
rl.payment_req_id = h.payment_req_id
) sum_act_amount,
-- (SELECT
-- vl.price
-- FROM
-- hls_lease_products_vl vl
-- WHERE
-- vl.lease_products_code =
-- (SELECT
-- l.item_frame_number
-- FROM
-- con_contract_lease_item l
-- WHERE
-- l.contract_id=
-- (SELECT
-- ln.ref_doc_id
-- FROM
-- csh_payment_req_ln ln
-- WHERE
-- ln.payment_req_id = h.payment_req_id AND
-- rownum =1
-- )
-- )
-- )price,
(select sv.code_value_name
from hls_bpm_interface hi,sys_code_values_v sv
where hi.payment_req_id=h.payment_req_id
and sv.code='CSH508'
and sv.code_value=hi.status) status_n
FROM
csh_payment_req_hd h,
hls_bp_master b
WHERE
h.bp_id = b.bp_id(+) AND
h.closed_flag ='N' AND
h.submitted_flag = 'Y' AND
h.approval_status = 'APPROVED' AND
EXISTS
(SELECT
1
FROM
csh_payment_req_ln a
WHERE
a.payment_req_id =h.payment_req_id AND
a.payment_status<>'FULL'
) AND
h.company_id IN
(SELECT
company_id
FROM
fnd_companies START
WITH company_id =${/session/@company_id} CONNECT BY prior company_id = parent_biz_company_id
)
) v #WHERE_CLAUSE#
ORDER BY
v.req_date DESC,
v.payment_req_number DESC
SELECT *
FROM (SELECT h.payment_req_number,
h.document_type,
--应付金额
h.amount,
h.amount_agent_total,
h.amount_vender_total,
--统计所有的已未付我司金额
(select sum(cprl.amount_agent -
nvl(cprl.amount_agent_paid, 0))
from csh_payment_req_ln cprl
where cprl.payment_req_id = h.payment_req_id) residual_agent_amount,
--统计所有的未付厂商金额
(select sum(cprl.amount_vender -
nvl(cprl.amount_vender_paid, 0))
from csh_payment_req_ln cprl
where cprl.payment_req_id = h.payment_req_id) residual_vender_amount,
--获取厂商字段
(select bp_name
from hls_bp_master hbm
where hbm.bp_id =
(select hbmba.bp_id
from hls_bp_master_bank_account hbmba
where hbmba.bank_account_id =
(select cprl.vender_bank_account_id
from csh_payment_req_ln cprl
where cprl.payment_req_id =
h.payment_req_id
and rownum <= 1))) vender_name,
(SELECT d.document_type_desc
FROM hls_document_type_v d
WHERE d.document_type = h.document_type) document_type_dis,
TO_CHAR(h.req_date, 'yyyy-mm-dd') req_date,
h.bp_id,
b.bp_code,
b.bp_name,
b.bp_category,
(SELECT b.description
FROM hls_bp_category b
WHERE b.bp_category = h.bp_category) bp_category_dis,
(SELECT ct.description
FROM hls_bp_category ct
WHERE ct.bp_category = b.bp_category) AS bp_category_desc,
h.amount apply_amount,
h.currency_code,
(SELECT t.currency_name
FROM gld_currency_vl t
WHERE h.currency_code = t.currency_code) currency_name,
h.created_by,
(SELECT e.name
FROM sys_user u, exp_employees e
WHERE h.owner_user_id = u.user_id
AND u.employee_id = e.employee_id) user_name2,
(SELECT e.name
FROM sys_user u, exp_employees e
WHERE h.owner_user_id = u.user_id
AND u.employee_id = e.employee_id) user_name,
h.submitted_flag,
h.approval_status,
(SELECT t.code_value_name
FROM sys_code_values_v t
WHERE h.approval_status = t.code_value
AND t.code = 'CSH_PAYMENT_REQ_APPROVAL_STATUS') approval_status_desc,
TO_CHAR(h.approval_date, 'yyyy-mm-dd') approval_date,
h.approval_note,
h.payment_req_id,
h.closed_flag,
h.payment_flag,
h.print_flag,
h.owner_user_id,
h.description payment_description,
TO_CHAR(h.apply_pay_date, 'yyyy-mm-dd') apply_pay_date,
yonda_individual_pkg.string_combination(p_sql => 'select t1.contract_number from con_contract t1,csh_payment_req_ln t2 where t1.contract_id = t2.ref_doc_id and t2.payment_req_id=',
p_compare_column_val => h.payment_req_id,
p_division_symbol => ',') contract_number,
yonda_individual_pkg.string_combination(p_sql => 'select hm.bp_name from con_contract t1,csh_payment_req_ln t2,hls_bp_master hm where hm.bp_id = t1.bp_id_tenant and t1.contract_id = t2.ref_doc_id and t2.payment_req_id=',
p_compare_column_val => h.payment_req_id,
p_division_symbol => ',') bp_id_tenant_n,
yonda_individual_pkg.string_combination(p_sql => 'SELECT t4.bank_branch_name || ''-'' || t4.bank_account_num banknum FROM con_contract t1, csh_payment_req_ln t2, fnd_companies t3, csh_bank_account_v t4 WHERE t1.contract_id = t2.ref_doc_id AND t1.spv_company_id = t3.company_id AND t3.bank_account_id = t4.bank_account_id and t2.payment_req_id=',
p_compare_column_val => h.payment_req_id,
p_division_symbol => ',') bank_account_num,
yonda_individual_pkg.string_combination(p_sql => 'SELECT t4.bank_account_name FROM con_contract t1, csh_payment_req_ln t2, fnd_companies t3, csh_bank_account_v t4 WHERE t1.contract_id = t2.ref_doc_id AND t1.spv_company_id = t3.company_id AND t3.bank_account_id = t4.bank_account_id and t2.payment_req_id=',
p_compare_column_val => h.payment_req_id,
p_division_symbol => ',') bank_account_name,
h.bp_bank_account_name,
h.bp_bank_account_num,
(SELECT SUM(NVL(rl.amount, 0) - NVL((SELECT SUM(amount)
FROM csh_payment_req_ln_ddct ld
WHERE ld.payment_req_ln_id =
rl.payment_req_ln_id),
0) -
NVL((SELECT SUM(lp.write_off_amt)
FROM csh_payment_req_ln_prepay lp
WHERE lp.payment_req_ln_id =
rl.payment_req_ln_id),
0))
FROM csh_payment_req_ln rl
WHERE rl.payment_req_id = h.payment_req_id) sum_act_amount,
-- (SELECT
-- vl.price
-- FROM
-- hls_lease_products_vl vl
-- WHERE
-- vl.lease_products_code =
-- (SELECT
-- l.item_frame_number
-- FROM
-- con_contract_lease_item l
-- WHERE
-- l.contract_id=
-- (SELECT
-- ln.ref_doc_id
-- FROM
-- csh_payment_req_ln ln
-- WHERE
-- ln.payment_req_id = h.payment_req_id AND
-- rownum =1
-- )
-- )
-- )price,
( select bp_name
from hls_bp_master hbm
where hbm.bp_id = (
select hbmba.bp_id
from csh_payment_req_ln cprl , hls_bp_master_bank_account hbmba
where cprl.bp_bank_account_id=hbmba.bank_account_id
and cprl.payment_req_id=h.payment_req_id
and rownum <= 1
)) bp_id_agent_n,
(select sv.code_value_name
from hls_bpm_interface hi, sys_code_values_v sv
where hi.payment_req_id = h.payment_req_id
and sv.code = 'CSH508'
and sv.code_value = hi.status) status_n
FROM csh_payment_req_hd h, hls_bp_master b
WHERE h.bp_id = b.bp_id(+)
AND
-- h.closed_flag ='N' AND
h.submitted_flag = 'Y'
AND h.approval_status = 'APPROVED'
AND EXISTS
(SELECT 1
FROM csh_payment_req_ln a
WHERE a.payment_req_id = h.payment_req_id
AND a.payment_status <> 'FULL')
AND h.company_id IN
(SELECT company_id
FROM fnd_companies
START WITH company_id = 1
CONNECT BY prior company_id = parent_biz_company_id)) v
ORDER BY v.req_date DESC, v.payment_req_number DESC
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-4-24 上午10:17:59
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
aux_single_variable_calc_pkg.calc_real_rate(p_calc_session_id =>${@calc_session_id},
p_user_id => ${/session/@user_id},
p_msg => ${@msg});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="msg" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@msg"/>
</bm:parameters>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
aux_single_variable_calc_pkg.manual_trial_after_calc(p_calc_session_id =>${@calc_session_id},
p_user_id => ${/session/@user_id},
p_msg => ${@msg});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="msg" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@msg"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -15,7 +15,8 @@
p_document_category=>${@document_category},
p_user_id =>${/session/@user_id}
);
hls_fin_calculator_itfc_pkg.calculate(
hls_fin_calculator_itfc_pkg.calculate(
p_calc_session_id=>${@calc_session_id},
p_recreate_H_formula=>${@recreate_H_formula},
p_recreate_L_formula=>${@recreate_L_formula},
......
......@@ -36,6 +36,8 @@
<a:link id="con_approval_link_id" model="cont.CON505.contract_approval" modelaction="execute"/>
<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>
<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"/>
<script type="text/javascript"><![CDATA[
Ext.ux.Lightbox.register('a[ref=img]', true);
function lock_current_window() {
......@@ -470,6 +472,50 @@
}
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var cashflow_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_cashflow');
var record = $(ds_id).getCurrentRecord();
var price_list = record.get('price_list');
var calc_session_id = record.get('calc_session_id');
var parent_pk_value = record.get('contract_id');
var calc_type = '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR';
var maintain_type='QUERY'
if (calc_session_id) {
//直接进入报价页面
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_update_link_winid',
params: {
document_id: parent_pk_value,
price_list: price_list,
document_category: 'CONTRACT',
contract_status:record.get('contract_status'),
maintain_type: 'MODIFY',
calc_session_id: record.get('calc_session_id'),
quotation_id: record.get('quotation_id'),
dsId: cashflow_ds_id,
winId: 'hls_fin_calc_quotation_update_link_winid',
global_flag: 'Y',
id_num: 1,
calc_type: calc_type,
recreate_L_formula: 'N'
},
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl(),
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(cashflow_ds_id).query();
$(ds_id).query();
});
}
}
;
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
......@@ -55,6 +55,7 @@
<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<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"
......@@ -74,9 +75,19 @@
<a:link id="${/parameter/@layout_code}csh511_csh_payment_req_hd_query" model="csh.CSH511.csh_payment_req_hd" modelaction="query" />
<script type="text/javascript"><![CDATA[
jQuery.noConflict();
//如果头id 不为空,就使用自在定义的ds进行查询
Leaf.onReady(function(){
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
console.log($(lnds_id));
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var payment_req_id='${/parameter/@payment_req_id}';
if(payment_req_id){
$(lnds_id).setQueryUrl('${/request/@context_path}/autocrud/csh.CSH501.csh_payment_req_ln_query_after_save/query');
$(lnds_id).setQueryParameter("payment_req_id",payment_req_id);
$(lnds_id).query();
$(hdds_id).setQueryParameter("payment_req_id",payment_req_id);
$(hdds_id).query();
}
})
Ext.ux.Lightbox.register('a[ref=img]', true);
......@@ -274,7 +285,7 @@
var hd_record = $(ds_id).getCurrentRecord();
var payment_req_id = hd_record.get('payment_req_id');
var line_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var line_record = $(line_ds_id).getAll()[0];
var line_record = $(line_ds_id).getAt(0);
if (line_record.get('cf_item') == '52' || line_record.get('cf_item') == '509') {
//保证金退还Doodream审批接口 CFL-FE5D96CF-694C-4290-A22E-241FC3F6DEF0
var case_type = 'CFL-FE5D96CF-694C-4290-A22E-241FC3F6DEF0';
......@@ -401,6 +412,14 @@
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () {
Leaf.SideBar.enable = false;
//提交之前必须要保存
/* var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var hd_record = $(hdds_id).getCurrentRecord();
var payment_req_id = hd_record.get('payment_req_id');
if(payment_req_id){
$L.showInfoMessage("提示",'请先保存数据!');
return;
}*/
window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](csh_payment_req_submit_finally);
};
......@@ -592,10 +611,16 @@
line_records = ln_ds.getSelected();
var payment_req_id = hd_record.get('payment_req_id');
if (line_records.length == 0) {
Leaf.showMessage('${l:PROMPT}', '请选择一条单据进行确认!');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}', '请先选择要支付的行明细!');
return;
}
if(line_records.length>1){
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}', '一次只能选择一条数据进行操作!');
return;
}
var current_bp_id;
var bp_bank_account_code;
var bp_bank_account_num;
......@@ -616,7 +641,10 @@
return;
} */
if (Ext.isEmpty(line_record.get('pay_amount'))) {
//支付金额为应付代理店
var this_pay_amount=plus(line_record.get('residual_agent_amount'),line_record.get('residual_vender_amount'));
if (this_pay_amount <=0) {
Leaf.showMessage('${l:PROMPT}', '本次支付金额为空!');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
......@@ -635,10 +663,18 @@
bp_bank_account_code_n = line_record.get('bp_bank_account_code_n');
bp_bank_account_id = line_record.get('bp_bank_account_id');
contract_id = line_record.get('contract_id');
line_record.set('loan_date',hd_record.get('loan_date'));
line_record.set('hdds_id',hdds_id);
line_record.set('lnds_id',lnds_id);
line_record.set('winid','csh_payment_req_pay_win');
var data=[];
data.push(line_record);
var win = new Leaf.Window({
id: 'csh_payment_req_pay_win',
url: $('csh_payment_req_pay_win_link').getUrl(),
params: {
params:line_record.data,
/* {
payment_req_id: payment_req_id,
winid: 'csh_payment_req_pay_win',
hdds_id: hdds_id,
......@@ -652,7 +688,7 @@
loan_date: hd_record.get('loan_date')
//first_contract_day: hd_record.get('first_contract_day')
// ,first_repayment_flag: first_repayment_flag
},
},*/
title: '${l:CSH502.CSH_PAYMENT_REQ_PAY}',
fullScreen: true
});
......@@ -688,8 +724,14 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if((amount_agent+amount_vender+other_payment2)!=due_amount){
check_due_amount_flag=false;
console.log(amount_agent);
console.log(amount_vender);
console.log(other_payment2);
console.log(due_amount);
if(plus(plus(amount_agent,amount_vender),other_payment2)!=due_amount){
$L.showErrorMessage("提示",'应付我司金额,委托付款金额和首付款抵充金额之后应等于应付金额!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
//本次申请金额等于委托加我司
var this_apply_amount=plus(amount_agent,amount_vender);
......@@ -1117,9 +1159,10 @@
// };
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
/* debugger
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var hd_record = $(hdds_id).getCurrentRecord();
qpara['payment_req_id'] = hd_record.get('payment_req_id');
var hd_record = $(hdds_id).getAt(0);
qpara['payment_req_id'] = hd_record.get('payment_req_id');*/
/*if (hd_record.get('bp_id_vender_n')) {
qpara['bp_id_vender_n'] = hd_record.get('bp_id_vender_n');
}*/
......
......@@ -30,7 +30,9 @@
<a:link id="con_doc_batch_create_link_id" url="${/request/@context_path}/modules/cont/CON500/con_doc_batch_create.lsc"/>
<a:link id="con_doc_batch_create_job_link_id" url="${/request/@context_path}/modules/csh/CSH502/csh_atm_batch_download_pdf_job.lsc"/>
<a:link id="csh_atm_batch_download_pdf_link_id" url="${/request/@context_path}/modules/csh/CSH502/csh_atm_batch_download_pdf.lsc"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
function csh502_pay_lock_window() {
Leaf.Masker.mask($('${/parameter/@winid}').wrap, '${l:HLS.EXECUTING}');
}
......@@ -41,7 +43,21 @@
function csh502_payment_pay_submit() {
var record = $('csh_payment_req_pay_ds').getCurrentRecord();
if (record.validateRecord(true)) {
var check_flag=true;
var this_pay_agent_amount=record.get('this_pay_agent_amount');
var this_pay_vender_amount=record.get('this_pay_vender_amount');
var residual_agent_amount=record.get('residual_agent_amount');
var residual_vender_amount=record.get('residual_vender_amount');
var pay_amount=plus(this_pay_agent_amount,this_pay_vender_amount);
record.set('transaction_amount', pay_amount);
//检验手动输入的金额必须小于应付金额
if((this_pay_agent_amount>residual_agent_amount)||(this_pay_vender_amount>residual_vender_amount)){
$L.showErrorMessage("提示",'本次付代理店金额,厂商金额不能超过未付金额!');
check_flag=false;
}
if (record.validateRecord(true)&&check_flag){
console.log('${/parameter/@lnds_id}');
ajax_flag = 'Y';
csh502_pay_lock_window();
var param = record.data;
......@@ -52,13 +68,27 @@
pre_line_record.set('_status', 'insert');
pre_line_record.set('type', 'PAYMENT_REQ_PAYMENT');
pre_line_record.set('id', pre_line_record.get('payment_req_ln_id'));
pre_line_record.set('amt', pre_line_record.get('pay_amount') || 0);
pre_line_record.set('amt', pay_amount);
pre_line_record.set('transaction_date', record.get('transaction_date'));
pre_line_record.set('internal_period_num', record.get('internal_period_num'));
pre_line_record.set('period_name', record.get('period_name'));
pre_line_record.set('exchange_rate', record.get('exchange_rate'));
pre_line_record.set('payment_description', record.get('payment_description'));
pre_line_record.set('cashflow_id', record.get('cashflow_id'));
pre_line_record.set('bank_slip_num', record.get('bank_slip_num'));
pre_line_record.set('payment_method_id', record.get('payment_method_id'));
pre_line_record.set('merge_flag', record.get('merge_flag'));
pre_line_record.set('this_pay_agent_amount',this_pay_agent_amount );
pre_line_record.set('this_pay_vender_amount',this_pay_vender_amount );
pre_line_record.set('bank_flag','Y' );
//付款行临时表
saveData.push(pre_line_record.data);
}
param['payment_req_id'] = pre_line_records[0].get('payment_req_id');
param['payment_req_ln_id'] = pre_line_records[0].get('payment_req_ln_id');
param['merge_flag'] = 'N';
param['details'] = saveData;
console.log(param);
Leaf.showConfirm('${l:PROMPT_MESSAGE}', '确定提交?', function okFun() {
Leaf.request({
url: $('csh_payment_req_pay_link_id').getUrl(),
......@@ -334,6 +364,7 @@
function on_csh_payment_req_pay_ds_update(ds, record, name, value, oldvalue) {
var handling_charge = record.get('handling_charge');
/* console.log(record);*/
if (Ext.isEmpty(handling_charge)) {
handling_charge = 0;
}
......@@ -365,7 +396,7 @@
}
} else if (name == 'rate_method_code') {
record.set('exchange_rate_quotation', '');
record.set('exchange_rate', '');
record.set('exchange_rate', '1');
if (value == 'PERIOD' || value == 'DAILY' || value == 'FIXED') {
record.getField('exchange_rate').setReadOnly(true);
......@@ -396,7 +427,7 @@
} else {
setfunctionamount(record);
}
} else if (name == 'transaction_amount') {
} /*else if (name == 'transaction_amount') {
if (value === 0 && record.get('zero_amounts_allowed') == 'N') {
Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
}
......@@ -405,9 +436,22 @@
} else {
setfunctionamount(record);
}
} else if (name == 'transaction_date') {
} */else if (name == 'transaction_date') {
showPeriod(record);
} else if (name == 'precision') {
}/*else if(name='this_pay_agent_amount'&&value){
if(record.get('this_pay_vender_amount')){
}
}*//*else if(name='this_pay_vender_amount'){
var agent_amount=record.get('this_pay_agent_amount');
alert(agent_amount);
if(agent_amount){
alert(value+agent_amount)
record.set('transaction_amount',value+agent_amount);
}
}*/ else if (name == 'precision') {
record.getField('transaction_amount').setPropertity('decimalprecision', value);
record.getField('transaction_functional_amount').setPropertity('decimalprecision', value);
record.getField('handling_charge').setPropertity('decimalprecision', value);
......@@ -507,6 +551,8 @@
// } else {
// ds.getField('first_payment_date').setRequired(false);
// }
/*console.log('${/parameter}');*/
// var lnds='${/parameter/@lnds_id}';
var date = new Date();
if ('${/parameter/@loan_date}') {
r_date = (('${/parameter/@loan_date}').match(/\d{4}.\d{1,2}.\d{1,2}/mg).toString()).replace(/[^0-9]/mg, '-');
......@@ -590,6 +636,9 @@
<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="this_pay_agent_amount">
</a:field>
<a:field name="transaction_date" defaultValue="${/parameter/@loan_date}" required="true"/>
<a:field name="exchange_rate_type"/>
......@@ -603,8 +652,7 @@
<a:field name="currency_name" defaultValue="人民币"/>
<a:field name="bank_account_id" defaultValue="1531"/>
<a:field name="bank_account_name"/>
<a:field name="bank_account_num"/>
<a:field name="bank_account_code" autoComplete="true" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" required="true" title="CSH511.BANK_ACCOUNT_CODE">
<a:field name="bank_account_num" autoComplete="true" autoCompleteField="bank_account_num" 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"/>
......@@ -614,6 +662,7 @@
<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_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="bp_bank_account_code" autoComplete="true" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="basic.hls_bp_master_bank_account_v_for_lov?enabled_flag=Y&amp;bp_enabled_flag=Y" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
......@@ -622,7 +671,6 @@
<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="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="payment_method_display" defaultValue="银行转账" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
......@@ -649,9 +697,37 @@
<a:gridButton click="csh502_create_pdf3" text="pdf测试3"/> -->
<!-- <a:gridButton click="csh502_payment_pay_reset" text="HLS.RESET"/> -->
</a:screenTopToolbar>
<a:form labelWidth="100" title="CSH502.CSH_PAYMENT_REQ_PAY">
<a:form labelWidth="180" title="CSH502.CSH_PAYMENT_REQ_PAY">
<a:box column="4">
<a:textField name="bp_name" bindTarget="csh_payment_req_pay_ds" prompt="CSH501.CSH_PAYMENT_OBJ_NAME" readOnly="true" width="150"/>
<!-- <a:textField name="bp_name" bindTarget="csh_payment_req_pay_ds" prompt="CSH501.CSH_PAYMENT_OBJ_NAME" readOnly="true" width="150"/>-->
<a:textField name="bp_bank_account_name" bindTarget="csh_payment_req_pay_ds" prompt="付款代理商对象" readOnly="true" width="150"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_payment_req_pay_ds" prompt="付款代理商账号" readOnly="true" width="150"/>
<a:textField name="vender_bank_account_id" bindTarget="csh_payment_req_pay_ds" prompt="付款厂商对象" readOnly="true" width="150"/>
<a:textField name="vender_bank_account_num" bindTarget="csh_payment_req_pay_ds" prompt="付款厂商账号" readOnly="true" width="150"/>
</a:box>
<a:box column="4">
<a:textField name="contract_number" bindTarget="csh_payment_req_pay_ds" prompt="合同编号" readOnly="true" width="150"/>
<a:textField name="cf_description" bindTarget="csh_payment_req_pay_ds" prompt="应付项目" readOnly="true" width="150"/>
<a:numberField name="residual_agent_amount" bindTarget="csh_payment_req_pay_ds" prompt="未付代理店金额" readOnly="true" width="150" renderer="Leaf.formatMoney"/>
<a:numberField name="residual_vender_amount" bindTarget="csh_payment_req_pay_ds" prompt="未付厂商金额" readOnly="true" width="150" renderer="Leaf.formatMoney"/>
<!-- <a:numberField name="amount_paid" bindTarget="csh_payment_req_pay_ds" prompt="本次付款金额" readOnly="true" width="150" renderer="Leaf.formatMoney"/>-->
</a:box>
<a:box column="2">
<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="本次付款金额" width="150"/>
<a:textField name="period_name" bindTarget="csh_payment_req_pay_ds" prompt="HLS.ACCOUNT_PERIOD_NAME" readOnly="true"/>
<a:datePicker name="transaction_date" bindTarget="csh_payment_req_pay_ds" prompt="CSH502.CSH_PAY_DATE" width="150"/>
</a:box>
<!-- <a:box column="4">
<a:lov name="bp_bank_account_code" bindTarget="csh_payment_req_pay_ds" prompt="对方账户"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_payment_req_pay_ds" prompt="对方账号" readOnly="true"/>
&lt;!&ndash; <a:lov name="bank_account_code" bindTarget="csh_payment_req_pay_ds" prompt="付款账户" width="150"/>
<a:textField name="bank_account_num" bindTarget="csh_payment_req_pay_ds" prompt="HLS.BANK_ACCOUNT_NUM" readOnly="true" width="150"/>&ndash;&gt;
&lt;!&ndash; <a:textField name="bank_account_name" bindTarget="csh_payment_req_pay_ds" prompt="HLS.BANK_ACCOUNT_NAME" readOnly="true" width="428"/> &ndash;&gt;
</a:box>-->
<a:box column="1">
<a:textField name="payment_description" bindTarget="csh_payment_req_pay_ds" prompt="HLS.COMMENT" width="849"/>
</a:box>
<!-- <a:textField name="cf_description" bindTarget="csh_payment_req_pay_ds" prompt="CSH501.CSH_PAYMENT_PRJ" readOnly="true" width="150"/> -->
<!-- <a:numberField name="residual_amount" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="CSH501.CSH_RESIDUAL_AMOUNT" readOnly="true" width="150"/>-->
<!-- <a:textField name="currency_name" bindTarget="csh_payment_req_pay_ds" prompt="HLS.CURRENCY" readOnly="true" width="150"/> -->
......@@ -659,19 +735,13 @@
<!-- <a:comboBox name="exchange_rate_type_display" bindTarget="csh_payment_req_pay_ds" prompt="HLS.EXCHANGE_RATE_TYPE_DESC" width="150"/> -->
<!-- <a:numberField name="due_amount" bindTarget="csh_payment_req_pay_ds" prompt="CSH502.CSH_PAYMENT_AMOUNT" readOnly="true" width="150"/>
<a:datePicker name="due_date" bindTarget="csh_payment_req_pay_ds" prompt="CSH501.CSH_DUE_DATE" readOnly="true" width="150"/> -->
<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="CSH502.CSH_PAYMENT_AMOUNT" width="150"/>
<!-- <a:numberField name="handling_charge" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="HLS.HANDLING_CHARGE" width="150"/> -->
<a:numberField name="transaction_functional_amount" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="HLS.FUNCTIONAL_AMOUNT" readOnly="true" width="150"/>
<!-- <a:comboBox name="exchange_rate_type_display" bindTarget="csh_payment_req_pay_ds" prompt="HLS.EXCHANGE_RATE_TYPE_DESC" width="150"/> -->
<!-- <a:numberField name="handling_charge" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="HLS.HANDLING_CHARGE" width="150"/> -->
<!-- <a:numberField name="transaction_functional_amount" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="HLS.FUNCTIONAL_AMOUNT" readOnly="true" width="150"/>
&lt;!&ndash; <a:comboBox name="exchange_rate_type_display" bindTarget="csh_payment_req_pay_ds" prompt="HLS.EXCHANGE_RATE_TYPE_DESC" width="150"/> &ndash;&gt;
<a:textField name="bank_slip_num" bindTarget="csh_payment_req_pay_ds" prompt="CSH511.CSH_TRANSACTION.BANK_SLIP_NUM"/>
</a:box>
<a:box column="4">
<a:lov name="bp_bank_account_code" bindTarget="csh_payment_req_pay_ds" prompt="对方账户"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_payment_req_pay_ds" prompt="对方账号" readOnly="true"/>
<a:lov name="bank_account_code" bindTarget="csh_payment_req_pay_ds" prompt="付款账户" width="150"/>
<a:textField name="bank_account_num" bindTarget="csh_payment_req_pay_ds" prompt="HLS.BANK_ACCOUNT_NUM" readOnly="true" width="150"/>
<!-- <a:textField name="bank_account_name" bindTarget="csh_payment_req_pay_ds" prompt="HLS.BANK_ACCOUNT_NAME" readOnly="true" width="428"/> -->
</a:box>
<a:box column="4">
<a:textField name="bp_bank_account_name" bindTarget="csh_payment_req_pay_ds" prompt="对方账户名" readOnly="true" width="382"/>
<a:textField name="bank_account_name" bindTarget="csh_payment_req_pay_ds" prompt="HLS.BANK_ACCOUNT_NAME" readOnly="true" width="382"/>
......@@ -682,11 +752,9 @@
<a:numberField name="exchange_rate" allowNegative="false" bindTarget="csh_payment_req_pay_ds" decimalPrecision="-1" prompt="HLS.EXCHANGE_RATE" readOnly="true" width="150"/>
</a:box>
<a:box column="4">
<a:datePicker name="transaction_date" bindTarget="csh_payment_req_pay_ds" prompt="CSH502.CSH_PAY_DATE" width="150"/>
<!-- <a:textField name="first_contract_day" bindTarget="csh_payment_req_pay_ds" prompt="首次支付表日期末位" readOnly="true"/> -->
<!-- <a:datePicker name="first_payment_date" bindTarget="csh_payment_req_pay_ds" dayRenderer="rendererDay" prompt="首期还款日" width="150"/> -->
<a:textField name="period_name" bindTarget="csh_payment_req_pay_ds" prompt="HLS.ACCOUNT_PERIOD_NAME" readOnly="true"/>
</a:box>
&lt;!&ndash; <a:textField name="first_contract_day" bindTarget="csh_payment_req_pay_ds" prompt="首次支付表日期末位" readOnly="true"/> &ndash;&gt;
&lt;!&ndash; <a:datePicker name="first_payment_date" bindTarget="csh_payment_req_pay_ds" dayRenderer="rendererDay" prompt="首期还款日" width="150"/> &ndash;&gt;
</a:box>-->
<!-- <a:box column="4">
<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="CSH502.CSH_PAYMENT_AMOUNT" width="150"/>
<a:numberField name="handling_charge" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="HLS.HANDLING_CHARGE" width="150"/>
......@@ -695,15 +763,36 @@
<a:textField name="bank_slip_num" bindTarget="csh_payment_req_pay_ds" prompt="CSH511.CSH_TRANSACTION.BANK_SLIP_NUM"/>
<div/>
</a:box> -->
<a:box column="1">
<a:textField name="payment_description" bindTarget="csh_payment_req_pay_ds" prompt="HLS.COMMENT" width="849"/>
</a:box>
</a:form>
<a:grid id="bank_account_ds" bindTarget="csh_payment_req_pay_ds" height="200">
<a:columns>
<a:column name="bank_account_num" prompt="银行账号" editor="lov_editor" width="150"/>
<a:column name="bank_branch_name" prompt="银行名称" width="150"/>
<a:column name="bank_account_name" prompt="账户名" width="150"/>
<a:column name="this_pay_agent_amount" prompt="本次付代理店金额" editor="number_editor" width="150" renderer="Leaf.formatMoney" align="right"/>
<a:column name="this_pay_vender_amount" prompt="本次付厂商金额" editor="number_editor" width="150" renderer="Leaf.formatMoney" align="right"/>
</a:columns>
<a:editors>
<a:lov id="lov_editor"/>
<a:numberField id="number_editor"/>
</a:editors>
</a:grid>
<script type="text/javascript"><![CDATA[
$('csh_payment_req_pay_ds').getAt(0).set('bp_bank_account_num','${/parameter/@bp_bank_account_num}');
$('csh_payment_req_pay_ds').getAt(0).set('bp_bank_account_code','${/parameter/@bp_bank_account_code}');
$('csh_payment_req_pay_ds').getAt(0).set('bp_bank_account_name','${/parameter/@bp_bank_account_name}');
$('csh_payment_req_pay_ds').getAt(0).set('bp_bank_account_id','${/parameter/@bp_bank_account_id}');
$('csh_payment_req_pay_ds').getAt(0).set('bp_bank_account_id','${/parameter/@bp_bank_account_id}');
$('csh_payment_req_pay_ds').getAt(0).set('vender_bank_account_id','${/parameter/@vender_bank_account_id}');
$('csh_payment_req_pay_ds').getAt(0).set('vender_bank_account_num','${/parameter/@vender_bank_account_num}');
$('csh_payment_req_pay_ds').getAt(0).set('contract_number','${/parameter/@contract_number}');
$('csh_payment_req_pay_ds').getAt(0).set('cf_description','${/parameter/@cf_description}');
$('csh_payment_req_pay_ds').getAt(0).set('residual_agent_amount','${/parameter/@residual_agent_amount}');
$('csh_payment_req_pay_ds').getAt(0).set('residual_vender_amount','${/parameter/@residual_vender_amount}');
$('csh_payment_req_pay_ds').getAt(0).set('this_pay_agent_amount',0);
$('csh_payment_req_pay_ds').getAt(0).set('this_pay_vender_amount',0);
]]></script>
</a:screenBody>
</a:view>
......
......@@ -343,26 +343,26 @@
<!-- <a:gridButton click="csh502_payment_close" text="HLS.CLOSE"/> -->
<!-- <a:gridButton click="csh502_payment_save" text="HLS.SAVE"/> -->
<!-- <a:gridButton click="csh502_payment_doc_print" text="汇签单打印"/> -->
<a:gridButton click="csh502_payment_doc_print_d" text="汇签单"/>
<div style="margin-left:30px;margin-top:13px"><![CDATA[注:汇签单打印之后请重新点击查询按钮以获取最新数据后进行其它操作]]></div>
<!-- <a:gridButton click="csh502_payment_doc_print_d" text="汇签单"/>-->
<!-- <div style="margin-left:30px;margin-top:13px"><![CDATA[注:汇签单打印之后请重新点击查询按钮以获取最新数据后进行其它操作]]></div>-->
</a:screenTopToolbar>
<a:form column="3" labelWidth="130" marginWidth="35" title="CSH502.CSH_PAYMENT_REQ_PAY">
<a:textField name="payment_req_number" bindTarget="csh_payment_req_query_ds" prompt="申请单号"/>
<a:textField name="bp_id_tenant_n" bindTarget="csh_payment_req_query_ds" prompt="商业伙伴名称"/>
<a:datePicker name="approval_date_from" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_DATE_FROM" width="150"/>
<a:datePicker name="approval_date_to" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_DATE_TO" width="150"/>
<a:textField name="contract_number" bindTarget="csh_payment_req_query_ds" prompt="支付表编号"/>
<!-- <a:textField name="bp_id_tenant_n" bindTarget="csh_payment_req_query_ds" prompt="商业伙伴名称"/>-->
<!-- <a:datePicker name="approval_date_from" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_DATE_FROM" width="150"/>-->
<!-- <a:datePicker name="approval_date_to" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_DATE_TO" width="150"/>-->
<a:textField name="contract_number" bindTarget="csh_payment_req_query_ds" prompt="合同编号"/>
<a:datePicker name="req_date_from" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_REQ_DATE_FROM" width="150"/>
<a:datePicker name="req_date_to" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_REQ_DATE_TO" width="150"/>
<!-- <a:lov name="user_name" bindTarget="csh_payment_req_query_ds" prompt="提交人帐号" width="150"/> -->
<!-- <a:textField name="employee_name" bindTarget="csh_payment_req_query_ds" prompt="提交人姓名" readOnly="true" width="150"/> -->
<a:textField name="user_name" bindTarget="csh_payment_req_query_ds" prompt="申请人" width="150"/>
<a:comboBox name="print_flag_des" bindTarget="csh_payment_req_query_ds" prompt="汇签单" width="150"/>
<!-- <a:comboBox name="print_flag_des" bindTarget="csh_payment_req_query_ds" prompt="汇签单" width="150"/>-->
<!-- <a:comboBox name="approval_status_desc" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_STATE" width="150"/> -->
<!-- <a:textField name="submitted_flag" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_SUBMIT_STATE" width="150"/> -->
<!-- <a:checkBox name="closed_flag" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_CLOSED_FLAG" width="70"/> -->
<!-- <a:comboBox name="payment_bank_des" bindTarget="csh_payment_req_query_ds" prompt="付款银行" width="150"/> -->
<a:comboBox name="bp_category_n" bindTarget="csh_payment_req_query_ds" prompt="对象类型" width="150"/>
<!-- <a:comboBox name="bp_category_n" bindTarget="csh_payment_req_query_ds" prompt="对象类型" width="150"/>-->
</a:form>
<a:grid id="csh_payment_req_grid_ds" bindTarget="csh_payment_req_queryDs" marginHeight="240" marginWidth="35" navBar="true">
<a:toolBar>
......@@ -370,29 +370,37 @@
</a:toolBar>
<a:columns>
<a:column name="payment_req_number" lock="true" prompt="CSH502.CSH_REQ_NO" renderer="render_objectDs_grid" width="130"/>
<a:column name="contract_number" prompt="支付表编号" showTitle="true" width="120"/>
<a:column name="print_flag" align="center" prompt="汇签单" renderer="render_objectDs_grid" width="80"/>
<a:column name="contract_number" prompt="合同编号" showTitle="true" width="120"/>
<!-- <a:column name="print_flag" align="center" prompt="汇签单" renderer="render_objectDs_grid" width="80"/>-->
<!-- <a:column name="status_n" align="center" prompt="BPM状态" width="80"/> -->
<a:column name="user_name" prompt="CSH502.CSH_PROPOSER"/>
<a:column name="req_date" align="center" prompt="CSH502.CSH_REQ_DATE" width="80"/>
<a:column name="bp_id_tenant_n" align="center" prompt="承租人"/>
<a:column name="apply_amount" align="right" prompt="CSH501.CSH_APPLIED_TOTAL_AMOUNT" renderer="Leaf.formatMoney"/>
<a:column name="sum_act_amount" align="right" prompt="实际申请金额" renderer="Leaf.formatMoney"/>
<!-- <a:column name="user_name" prompt="CSH502.CSH_PROPOSER" width="120"/>-->
<a:column name="req_date" align="center" prompt="CSH502.CSH_REQ_DATE" width="120"/>
<a:column name="amount" align="center" prompt="应付金额" width="120" renderer="Leaf.formatMoney"/>
<a:column name="bp_id_agent_n" align="center" prompt="代理店" width="120"/>
<a:column name="amount_agent_total" align="center" prompt="应付代理店金额" width="120" renderer="Leaf.formatMoney"/>
<a:column name="residual_agent_amount" align="center" prompt="未付代理店金额" width="120" renderer="Leaf.formatMoney"/>
<a:column name="vender_name" align="center" prompt="厂商" width="120"/>
<a:column name="amount_vender_total" align="center" prompt="应付厂商金额" width="120" renderer="Leaf.formatMoney"/>
<a:column name="residual_vender_amount" align="center" prompt="未付厂商金额" width="120" renderer="Leaf.formatMoney"/>
<!-- <a:column name="bp_id_tenant_n" align="center" prompt="承租人"/>-->
<!-- <a:column name="apply_amount" align="right" prompt="CSH501.CSH_APPLIED_TOTAL_AMOUNT" renderer="Leaf.formatMoney"/>-->
<!-- <a:column name="sum_act_amount" align="right" prompt="实际申请金额" renderer="Leaf.formatMoney"/>-->
<!-- <a:column name="print_flag" align="center" prompt="汇签单" renderer="render_objectDs_grid" width="60"/> -->
<!-- <a:column name="document_type_dis" prompt="CSH502.CSH_REQ_TYPE"/> -->
<!-- <a:column name="price" align="right" prompt="指导价" renderer="Leaf.formatMoney"/> -->
<a:column name="bp_category_desc" prompt="对象类别"/>
<!-- <a:column name="bp_category_desc" prompt="对象类别"/>-->
<!-- <a:column name="bp_code" prompt="CSH501.CSH_PAYMENT_OBJ"/> -->
<a:column name="bp_name" prompt="CSH501.CSH_PAYMENT_OBJ_NAME" showTitle="true" width="180"/>
<a:column name="bp_bank_account_name" prompt="对象账户"/>
<a:column name="bp_bank_account_num" prompt="对象账号" width="150"/>
<!-- <a:column name="bp_name" prompt="CSH501.CSH_PAYMENT_OBJ_NAME" showTitle="true" width="180"/>-->
<!-- <a:column name="bp_bank_account_name" prompt="对象账户"/>-->
<!-- <a:column name="bp_bank_account_num" prompt="对象账号" width="150"/>-->
<!-- <a:column name="bank_account_num" prompt="出租方账户" showTitle="true" width="200"/>
<a:column name="bank_account_name" prompt="出租方账户名称" showTitle="true" width="200"/> -->
<!-- <a:column name="bp_category_dis" prompt="CSH502.CSH_OBJ_CATEGORY"/> -->
<!-- <a:column name="currency_name" align="center" prompt="HLS.CURRENCY" width="60"/> -->
<!-- <a:column name="submitted_flag" editor="grid_checkbox" prompt="CSH502.CSH_SUBMIT_STATE"/> -->
<a:column name="approval_status_desc" align="center" prompt="CSH502.CSH_APR_STATE" width="80"/>
<a:column name="approval_date" align="center" prompt="CSH502.CSH_APR_DATE" width="80"/>
<!-- <a:column name="approval_status_desc" align="center" prompt="CSH502.CSH_APR_STATE" width="80"/>-->
<!-- <a:column name="approval_date" align="center" prompt="CSH502.CSH_APR_DATE" width="80"/>-->
<!-- <a:column name="closed_flag" editor="grid_checkbox" prompt="CSH502.CSH_CLOSED_FLAG"/> -->
</a:columns>
<a:editors>
......
......@@ -36,7 +36,8 @@
<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="prj_check_prj_record_link_id" model="hls.HLS500N.check_prj_record" modelaction="execute"/>
<a:link id="hls_fin_calc_single_variable_calc_link_id" model="hls.HLS500.hls_fin_calc_single_variable_calc" modelaction="update"/>
<a:link id="hls_fin_calc_single_variable_manual_link_id" model="hls.HLS500.hls_fin_calc_single_variable_calc" modelaction="execute"/>
<style><![CDATA[
.finGrid td[dataindex=percent]{
border-right-color:#FFF;
......@@ -76,110 +77,115 @@
ln_calc_orign_value = [];
Leaf.Masker.mask(document.documentElement, '${l:HLS.LOADING}');
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 record = $('hls_fin_calculator_hd_ds').getAll();
function hls_hls500_save(nextStep, source_procedure) {
lock_calc_current_window('${l:HLS.SAVING}');
if('${/parameter/@document_category}'=='PROJECT'){
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(record[i].get('column_code')=='H109') {
record[i].set('column_value',0);
record[i].set('column_value_c',0);
var a= document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id);
console.log(a);
document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).innerHTML=0;
document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).title=0;
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
}
}
}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((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 record = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0;i < temp_head_records.length;i++) {
if(record[i].get('column_code')=='H109') {
record[i].set('column_value',0);
record[i].set('column_value_c',0);
var a= document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id);console.log(a);
document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).innerHTML=0;
document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).title=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') {
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);
temp_head_records[i].set('column_value',H16);
// temp_head_records[i].set('column_value_c',0);
}
}
}
}
}
lock_calc_current_window('${l:HLS.SAVING}');
if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) {
unlock_calc_current_window();
return;
}
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0;i < temp_head_records.length;i++) {
if (!$('temp_hd_attribute_ds').find('column_code', temp_head_records[i].get('column_code'))) {
$('temp_hd_attribute_ds').create(temp_head_records[i].data);
}
}
var all_records = $('temp_hd_attribute_ds').getAll();
var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
headRecord.isNew = false;
headRecord.dirty = true;
create_record_column(all_records, headRecord);
},
failure: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
function hls_fin_cal_save_hd_submitsuccess(ds, res) {
if (typeof(nextStep) == 'function') {
nextStep(source_procedure);
} else {
function on_ln_formula_load(ds) {
Leaf.SideBar.enable = true;
success_sidebar_show();
unlock_calc_current_window();
$('ln_formula_ds').un('load', on_ln_formula_load);
}
$('ln_formula_ds').on('load', on_ln_formula_load);
$('ln_formula_ds').query();
}
}
$('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess);
Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit();
},
failure: function() {
},
error: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
error: function() {
},
scope: this
});
}
if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) {
unlock_calc_current_window();
return;
}
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0;i < temp_head_records.length;i++) {
if (!$('temp_hd_attribute_ds').find('column_code', temp_head_records[i].get('column_code'))) {
$('temp_hd_attribute_ds').create(temp_head_records[i].data);
}
}
var all_records = $('temp_hd_attribute_ds').getAll();
var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
headRecord.isNew = false;
headRecord.dirty = true;
create_record_column(all_records, headRecord);
function hls_fin_cal_save_hd_submitsuccess(ds, res) {
if (typeof(nextStep) == 'function') {
nextStep(source_procedure);
} else {
function on_ln_formula_load(ds) {
Leaf.SideBar.enable = true;
success_sidebar_show();
unlock_calc_current_window();
$('ln_formula_ds').un('load', on_ln_formula_load);
}
$('ln_formula_ds').on('load', on_ln_formula_load);
$('ln_formula_ds').query();
}
}
$('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess);
Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit();
},
scope: this
});
}
......@@ -783,6 +789,27 @@
function onEditorHdload(ds) {
var headRecords = ds.getAll();
if('${/parameter/@document_category}'=='CONTRACT'&&'${/parameter/@contract_status}'=='SIGN'){
for (var i = 0;i < headRecords.length;i++) {
var column_name = headRecords[i].get('column_name')
if(column_name !="lease_start_date"&&column_name !="contract_inception_date"){
headRecords[i].set('input_mode','READONLY');
headRecords[i].set('readonly_input_mode','TRUE');
headRecords[i].getField('column_value').setReadOnly(true);
headRecords[i].getField('column_value_c').setReadOnly(true);
}
}
}else if('${/parameter/@document_category}'=='CONTRACT'&&'${/parameter/@contract_status}'!='SIGN'){
for (var i = 0;i < headRecords.length;i++) {
var column_name = headRecords[i].get('column_name')
headRecords[i].set('input_mode','READONLY');
headRecords[i].set('readonly_input_mode','TRUE');
headRecords[i].getField('column_value').setReadOnly(true);
headRecords[i].getField('column_value_c').setReadOnly(true);
}
}
if (headRecords[0].get('show_column_code') == 'N') {
$('hls_fin_calculator_hd_grid_id').hideColumn('column_code');
$('hls_fin_calculator_export_grid_id').hideColumn('column_code');
......@@ -1171,6 +1198,54 @@
return '';
}
}
//add by syj 单变量求解
function hls_hls500_user_button1() {
flag = 'Y';
lock_calc_current_window();
Leaf.request({
url: $('hls_fin_calc_single_variable_calc_link_id').getUrl(),
para: {
calc_session_id: '${/parameter/@calc_session_id}'
},
success: function() {
open_after_save_execute();
},
failure: function() {
unlock_calc_current_window();
},
error: function() {
unlock_calc_current_window();
},
scope: this
});
}
function hls_hls500_user_button2() {
flag = 'Y';
lock_calc_current_window();
Leaf.request({
url: $('hls_fin_calc_single_variable_manual_link_id').getUrl(),
para: {
calc_session_id: '${/parameter/@calc_session_id}'
},
success: function() {
open_after_save_execute();
},
failure: function() {
unlock_calc_current_window();
},
error: function() {
unlock_calc_current_window();
},
scope: this
});
}
]]></script>
<a:dataSets>
<a:placeHolder id="dynamicDataSet_left_id"/>
......@@ -1389,6 +1464,16 @@
<a:gridButton id="hls_hls500_show_col_id" click="hls_hls500_show_col" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="USER_BUTTON1">
<c:process-config>
<a:gridButton id="hls_hls500_user_button1_col_id" click="hls_hls500_user_button1" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="USER_BUTTON2">
<c:process-config>
<a:gridButton id="hls_hls500_user_button2_col_id" click="hls_hls500_user_button2" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="*">
<c:process-config>
<a:gridButton id="hls500_${@button_code}" click="hls500_define_button" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
......
......@@ -234,7 +234,6 @@
draggable: true
});
win.on('close', function () {
debugger;
$(quotation_ds_id).query();
$(history_ds_id).query();
});
......@@ -285,7 +284,6 @@
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).query();
$(history_ds_id).query();
......
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