Commit a913c671 authored by stone's avatar stone

Merge branch 'feature/payment_feature' into develop

parents 05d9f8f2 6ec786c2
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
...@@ -11,9 +11,7 @@ ...@@ -11,9 +11,7 @@
<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_id,
v.vender_bank_account_id,
v.vender_bank_account_number,
v.other_payment2, v.other_payment2,
'NEW' approval_status, 'NEW' approval_status,
v.invoice_uploaded_flag, v.invoice_uploaded_flag,
...@@ -271,34 +269,12 @@ ...@@ -271,34 +269,12 @@
i.price, i.price,
i.factory_price, i.factory_price,
--获得厂商的相关信息 --获得厂商的相关信息
(select bp_name (select hli.vender_id
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 from hls_lease_item hli
where hli.lease_item_id = where hli.lease_item_id =
(select lease_item_id (select lease_item_id
from con_contract_lease_item c from con_contract_lease_item c
where c.contract_id = t.contract_id)))vender_bank_account_number, where c.contract_id = t.contract_id)) vender_id,
--首付款抵充金 --首付款抵充金
(select nvl(hd.other_payment2,0) (select nvl(hd.other_payment2,0)
from hls_fin_calculator_hd hd from hls_fin_calculator_hd hd
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
$Revision: 1.0 $Revision: 1.0
$Purpose: $Purpose:
--> -->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" <bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
baseTable="CSH_PAYMENT_REQ_LN" needAccessControl="false">
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select * select *
from (select c.contract_number, from (select c.contract_number,
c.contract_name, c.contract_name,
hbm.bp_name, hbm.bp_name,
cpr.bp_bank_account_id,
(select times (select times
from con_contract_cashflow ccc from con_contract_cashflow ccc
where ccc.cashflow_id = cpr.ref_doc_line_id) times, where ccc.cashflow_id = cpr.ref_doc_line_id) times,
...@@ -25,18 +25,18 @@ ...@@ -25,18 +25,18 @@
where hci.cf_item = ccc.cf_item where hci.cf_item = ccc.cf_item
and hci.cf_type = ccc.cf_type and hci.cf_type = ccc.cf_type
and ccc.cashflow_id = cpr.ref_doc_line_id) CF_DESCRIPTION, and ccc.cashflow_id = cpr.ref_doc_line_id) CF_DESCRIPTION,
--bp_id 存的是哪个字段
(select bp_name (select bp_name
from hls_bp_master hbm from hls_bp_master hbm
where hbm.bp_id = c.bp_id_agent_level1) BP_ID_AGENT_N, where hbm.bp_id = cpr.bp_id) BP_ID_AGENT_N,
(select hbm.bank_account_name (select hbm.bank_account_num
from hls_bp_master_bank_account hbm from hls_bp_master_bank_account hbm
where hbm.bp_id = c.bp_id_agent_level1) BP_BANK_ACCOUNT_ID, where hbm.bank_account_id = cpr.bp_bank_account_id) BP_BANK_ACCOUNT_NUM,
(select hbm.bank_account_num (select hbm.bank_account_name
from hls_bp_master_bank_account hbm from hls_bp_master_bank_account hbm
where hbm.bp_id = c.bp_id_agent_level1) BP_BANK_ACCOUNT_NUM, where hbm.bank_account_id = cpr.bp_bank_account_id) BP_BANK_ACCOUNT_NAME,
--应付我司金额 --应付我司金额
cpr.amount_agent, cpr.amount_agent,
...@@ -51,20 +51,10 @@ ...@@ -51,20 +51,10 @@
and ccli.contract_id = c.contract_id)) vender_name, and ccli.contract_id = c.contract_id)) vender_name,
(select hbm.bank_account_name (select hbm.bank_account_name
from hls_bp_master_bank_account hbm from hls_bp_master_bank_account hbm
where hbm.bp_id = where hbm.bank_account_id = cpr.vender_bank_account_id) VENDER_BANK_ACCOUNT_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 (select hbm.bank_account_num
from hls_bp_master_bank_account hbm from hls_bp_master_bank_account hbm
where hbm.bp_id = where hbm.bank_account_id = cpr.vender_bank_account_id) VENDER_BANK_ACCOUNT_number,
(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, cpr.amount,
--首付款抵充金额 --首付款抵充金额
(select nvl(hd.other_payment2, 0) (select nvl(hd.other_payment2, 0)
...@@ -90,9 +80,16 @@ ...@@ -90,9 +80,16 @@
from csh_payment_req_ln cpr, con_contract c, hls_bp_master hbm from csh_payment_req_ln cpr, con_contract c, hls_bp_master hbm
where cpr.ref_doc_category = 'CONTRACT' where cpr.ref_doc_category = 'CONTRACT'
and c.contract_id = cpr.ref_doc_id and c.contract_id = cpr.ref_doc_id
and hbm.bp_id = c.bp_id_tenant )v and hbm.bp_id = c.bp_id_tenant) v
#WHERE_CLAUSE# #WHERE_CLAUSE#
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="v.payment_req_id =${@payment_req_id}"/>
</bm:data-filters>
<!-- <bm:query-fields>
<bm:query-field name="payment_req_id" queryOperator="="/>
</bm:query-fields>-->
</bm:model> </bm:model>
...@@ -74,7 +74,10 @@ ...@@ -74,7 +74,10 @@
<a:link id="${/parameter/@layout_code}csh511_csh_payment_req_hd_query" model="csh.CSH511.csh_payment_req_hd" modelaction="query" /> <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[ <script type="text/javascript"><![CDATA[
jQuery.noConflict(); jQuery.noConflict();
Leaf.onReady(function(){
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
console.log($(lnds_id));
})
Ext.ux.Lightbox.register('a[ref=img]', true); Ext.ux.Lightbox.register('a[ref=img]', true);
if ('${/parameter/@payment_req_id}') { if ('${/parameter/@payment_req_id}') {
...@@ -83,7 +86,7 @@ ...@@ -83,7 +86,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');
...@@ -696,9 +699,10 @@ ...@@ -696,9 +699,10 @@
total_amount_vender=plus(total_amount_vender,amount_vender); total_amount_vender=plus(total_amount_vender,amount_vender);
} }
if(!check_due_amount_flag){ //取消提示
/* if(!check_due_amount_flag){
$L.showInfoMessage("提示",'应付金额应等于应付我司金额,委托付款金额和首付款抵充金额之和!'); $L.showInfoMessage("提示",'应付金额应等于应付我司金额,委托付款金额和首付款抵充金额之和!');
} }*/
//给头表赋值 //给头表赋值
$(ds_id).getAt(0).set('amount_agent_total',total_amount_agent); $(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_vender_total',total_amount_vender);
...@@ -713,8 +717,8 @@ ...@@ -713,8 +717,8 @@
//确认保存 //确认保存
var hd_record = $(ds_id).getCurrentRecord(); var hd_record = $(ds_id).getCurrentRecord();
var payment_req_id = hd_record.get('payment_req_id'); var payment_req_id = hd_record.get('payment_req_id');
console.log( $(ds_id)); //console.log( $(ds_id));
console.log( $(ds_line_id)); // console.log( $(ds_line_id));
if (payment_req_id) { if (payment_req_id) {
Leaf.request({ Leaf.request({
...@@ -793,17 +797,17 @@ ...@@ -793,17 +797,17 @@
}; };
window['${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
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');
if (!record.get('contract_number')) { // if (!record.get('contract_number')) {
record.set('contract_number', '${/parameter/@contract_number}'); // record.set('contract_number', '${/parameter/@contract_number}');
} // }
//
if (!record.get('first_contract_day')) { // if (!record.get('first_contract_day')) {
record.set('first_contract_day', '${/parameter/@first_contract_day}'); // record.set('first_contract_day', '${/parameter/@first_contract_day}');
} // }
//record.set('contract_number', '${/parameter/@contract_number}'); // //record.set('contract_number', '${/parameter/@contract_number}');
record.set('contract_name', '${/parameter/@contract_name}'); // record.set('contract_name', '${/parameter/@contract_name}');
record.set('division', '${/parameter/@division}'); // record.set('division', '${/parameter/@division}');
record.set('division_n', '${/parameter/@division_n}'); // record.set('division_n', '${/parameter/@division_n}');
if (hdds_id == ds.id && record.isNew) { if (hdds_id == ds.id && record.isNew) {
...@@ -909,13 +913,14 @@ ...@@ -909,13 +913,14 @@
//获得相应的行信息 //获得相应的行信息
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');
$(lnds_id).setQueryUrl('${/request/@context_path}/autocrud/csh.CSH501.csh_payment_req_ln_query_after_save/query?payment_req_id=' + payment_req_id); $(lnds_id).setQueryUrl('${/request/@context_path}/autocrud/csh.CSH501.csh_payment_req_ln_query_after_save/query');
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).setQueryParameter('payment_req_id', payment_req_id);
$(lnds_id).query(); $(lnds_id).query();
} else { } else {
...@@ -1115,9 +1120,9 @@ ...@@ -1115,9 +1120,9 @@
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();
qpara['payment_req_id'] = hd_record.get('payment_req_id'); qpara['payment_req_id'] = hd_record.get('payment_req_id');
if (hd_record.get('bp_id_vender_n')) { /*if (hd_record.get('bp_id_vender_n')) {
qpara['bp_id_vender_n'] = hd_record.get('bp_id_vender_n'); qpara['bp_id_vender_n'] = hd_record.get('bp_id_vender_n');
} }*/
}; };
......
...@@ -20,10 +20,6 @@ ...@@ -20,10 +20,6 @@
<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() {
...@@ -77,7 +73,6 @@ ...@@ -77,7 +73,6 @@
param['contract_id'] = record.get('contract_id'); param['contract_id'] = record.get('contract_id');
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,
......
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