Commit 4069b188 authored by 25484's avatar 25484

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

parents d7185365 e8d445d0
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -38,6 +38,7 @@
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_bp_category =>${@bp_category},
p_due_amount =>nvl(${@due_amount},0));
end;]]></bm:update-sql>
</bm:operation>
......
......@@ -9,83 +9,57 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT
*
FROM
(SELECT
t.transaction_id,
t.transaction_num,
TO_CHAR(t.transaction_date,'yyyy-mm-dd') transaction_date,
t.transaction_amount,
t.currency_code,
(SELECT
g.currency_name
FROM
gld_currency_v g
WHERE
g.currency_code = t.currency_code
) currency_name,
t.bp_bank_account_id,
t.bp_bank_account_num,
(SELECT
b.bank_account_name
FROM
csh_bank_account b
WHERE
b.bank_account_id = t.bank_account_id
) bank_account_name,
(SELECT
b.bank_account_code
FROM
csh_bank_account b
WHERE
b.bank_account_id = t.bank_account_id
) bank_account_code,
t.bp_id,
(SELECT m.bp_name FROM hls_bp_master m WHERE m.bp_id = t.bp_id
) bp_name,
h.payment_req_number
FROM
csh_transaction t,
csh_payment_req_hd h
WHERE
t.transaction_type = 'PAYMENT' AND
t.source_doc_id = h.payment_req_id AND
t.posted_flag = 'Y' AND
t.reversed_flag = 'N' AND
t.write_off_flag = 'FULL' AND
NOT EXISTS
(SELECT
1
FROM
con_contract cc
WHERE
cc.contract_id = h.contract_id AND
cc.data_class = 'NORMAL' AND
cc.contract_status = 'CLOSED'
) AND t.returned_flag = 'NOT' AND
EXISTS
(SELECT
1
FROM
con_contract_cashflow cc
WHERE
cc.cashflow_id =
(SELECT
l.ref_doc_line_id
FROM
csh_payment_req_ln l
WHERE
l.payment_req_id = h.payment_req_id AND
rownum = 1
)
--AND
--cc.cf_item = '52'
)
) v #WHERE_CLAUSE#
ORDER BY
transaction_date DESC,
transaction_num
SELECT *
FROM (SELECT t.transaction_id,
t.transaction_num,
TO_CHAR(t.transaction_date, 'yyyy-mm-dd') transaction_date,
t.transaction_amount,
t.currency_code,
(SELECT g.currency_name
FROM gld_currency_v g
WHERE g.currency_code = t.currency_code) currency_name,
t.bp_bank_account_id,
t.bp_bank_account_num,
(SELECT b.bank_branch_name
FROM csh_bank_account_v b
WHERE b.bank_account_id = t.bank_account_id) bank_account_name,
(SELECT b.bank_account_num
FROM csh_bank_account_v b
WHERE b.bank_account_id = t.bank_account_id) bank_account_num,
t.bp_id,
(SELECT hbbc.bank_account_name
FROM hls_bp_master_bank_account hbbc
WHERE hbbc.bank_account_id=t.bp_bank_account_id) bp_name,
t.bp_category,
(select description
from hls_bp_category h
where h.bp_category=t.bp_category ) bp_category_n,
h.payment_req_number
FROM csh_transaction t, csh_payment_req_hd h
WHERE t.transaction_type = 'PAYMENT'
AND t.source_doc_id = h.payment_req_id
AND t.posted_flag = 'Y'
AND t.reversed_flag = 'N'
AND t.write_off_flag = 'FULL'
AND NOT EXISTS (SELECT 1
FROM con_contract cc
WHERE cc.contract_id = h.contract_id
AND cc.data_class = 'NORMAL'
AND cc.contract_status = 'CLOSED')
AND t.returned_flag = 'NOT'
AND EXISTS
(SELECT 1
FROM con_contract_cashflow cc
WHERE cc.cashflow_id =
(SELECT l.ref_doc_line_id
FROM csh_payment_req_ln l
WHERE l.payment_req_id = h.payment_req_id
AND rownum = 1)
--AND
--cc.cf_item = '52'
)) v #WHERE_CLAUSE#
ORDER BY transaction_date DESC, transaction_num
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......
......@@ -724,10 +724,7 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return 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']();
......
......@@ -49,6 +49,16 @@
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);
var identify_category='';
if(this_pay_agent_amount!=0&&this_pay_vender_amount!=0){
$L.showErrorMessage("提示",'每个只能选择代理店,厂商中的其中一个进行支付');
return;
}
if(this_pay_agent_amount==0&&this_pay_vender_amount==0){
$L.showErrorMessage("提示",'付款金额不能为空!');
return;
}
record.set('transaction_amount', pay_amount);
//检验手动输入的金额必须小于应付金额
if((this_pay_agent_amount>residual_agent_amount)||(this_pay_vender_amount>residual_vender_amount)){
......@@ -57,14 +67,26 @@
}
if (record.validateRecord(true)&&check_flag){
console.log('${/parameter/@lnds_id}');
ajax_flag = 'Y';
//锁屏
csh502_pay_lock_window();
var param = record.data;
var saveData = [];
var pre_line_records = $('${/parameter/@lnds_id}').getSelected();
for (var i = 0;i < pre_line_records.length;i++) {
var pre_line_record = pre_line_records[i];
//由于每次只有代理店或者厂商进行付款,进行判断,银行账号取金额不为0的付款对象,默认为代理店
if(this_pay_vender_amount>0) {
var agent_bank_account=pre_line_record.get('vender_bank_account_id');
pre_line_record.set('bp_bank_account_id',agent_bank_account);
identify_category='VENDER';
}else{
pre_line_record.set('bp_category','AGENT');
identify_category='AGENT';
}
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'));
......@@ -87,8 +109,9 @@
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['bp_category'] =identify_category;
param['details'] = saveData;
console.log(param);
Leaf.showConfirm('${l:PROMPT_MESSAGE}', '确定提交?', function okFun() {
Leaf.request({
url: $('csh_payment_req_pay_link_id').getUrl(),
......@@ -553,6 +576,21 @@
// }
/*console.log('${/parameter}');*/
// var lnds='${/parameter/@lnds_id}';
//根据前面的是代理店还是厂商,来判断此次可以手动输入的是代理店还是厂商
var pre_line_records = $('${/parameter/@lnds_id}').getSelected();
var pre_line_record=pre_line_records[0];
//代理店不为空
if(pre_line_record.get('bp_bank_account_id')==undefined){
$('agent_num').hide();
$('agent_id').hide();
$('bank_account_ds').hideColumn('this_pay_agent_amount');
}
if(pre_line_record.get('vender_bank_account_id')==undefined){
$('vender_id').hide();
$('vender_num').hide();
$('bank_account_ds').hideColumn('this_pay_vender_amount');
}
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, '-');
......@@ -665,14 +703,14 @@
<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">
<!-- <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">
<a:mapping>
<a:map from="bank_account_id" to="bp_bank_account_id"/>
<a:map from="bank_account_num" to="bp_bank_account_num"/>
<a:map from="bank_account_name" to="bp_bank_account_name"/>
<a:map from="bank_account_code" to="bp_bank_account_code"/>
</a:mapping>
</a:field>
</a:field>-->
<a:field name="payment_method_display" defaultValue="银行转账" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
<a:field name="payment_method_id" defaultValue="10"/>
<a:field name="payment_req_id" defaultValue="${/parameter/@payment_req_id}"/>
......@@ -700,10 +738,10 @@
<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_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:textField id="agent_num" name="bp_bank_account_name" bindTarget="csh_payment_req_pay_ds" prompt="付款代理商对象" readOnly="true" width="150"/>
<a:textField id="agent_id" name="bp_bank_account_num" bindTarget="csh_payment_req_pay_ds" prompt="付款代理商账号" readOnly="true" width="150"/>
<a:textField id="vender_id" name="vender_bank_account_id" bindTarget="csh_payment_req_pay_ds" prompt="付款厂商对象" readOnly="true" width="150"/>
<a:textField id="vender_num" 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"/>
......
......@@ -240,12 +240,13 @@
<a:columns>
<a:column name="transaction_num" prompt="CSH502.CSH_TRANSACTION.TRANSACTION_NUM" width="140"/>
<a:column name="transaction_date" prompt="CSH502.CSH_PAY_DATE"/>
<a:column name="transaction_amount" align="right" prompt="CSH502.CSH_PAYMENT_AMOUNT" renderer="Leaf.formatMoney"/>
<a:column name="currency_name" prompt="HLS.CURRENCY"/>
<a:column name="bank_account_code" prompt="CSH502.BANK_ACCOUNT_CODE"/>
<a:column name="bank_account_name" prompt="CSH502.BANK_ACCOUNT_NAME" width="200"/>
<a:column name="transaction_amount" align="right" prompt="本次付款总额" renderer="Leaf.formatMoney"/>
<a:column name="bank_account_name" prompt="付款账户" width="200"/>
<a:column name="bank_account_num" prompt="付款账号"/>
<a:column name="bp_category_n" prompt="商业伙伴类别"/>
<a:column name="bp_name" prompt="CSH502.CSH_PAYMENT_OBJ" width="200"/>
<a:column name="payment_req_number" prompt="CSH502.CSH_PAYMENT_REQ_HD.PAYMENT_REQ_NUMBER" width="200"/>
<a:column name="currency_name" prompt="HLS.CURRENCY"/>
</a:columns>
<a:editors>
<a:checkBox id="grid_checkbox"/>
......
......@@ -72,11 +72,11 @@
<script type="text/javascript"><![CDATA[
Leaf.onReady(init);
function init() {
//var a = $('csh_payment_reverse_ds').getSelected();
//var record = a[0];
var a = $('csh_payment_reverse_ds').getSelected();
var record = a[0];
//var record = $('csh_payment_reverse_ds').getAt(0);
//record.set('bp_name');
var record = $('csh_payment_reverse_ds').getCurrentRecord();
//var record = $('csh_payment_reverse_ds').getCurrentRecord();
record.getField('bp_name').setReadOnly(true);
record.getField('amount').setReadOnly(true);
record.getField('currency_code').setReadOnly(true);
......
......@@ -235,9 +235,9 @@
}
function seedetail_transaction_num(value, record, name) {
console.log(record.get('receipt_type'));
/* console.log(record.get('receipt_type'));
console.log( record.get('bp_name'));
console.log( record.get('confirmed_flag'));
console.log( record.get('confirmed_flag'));*/
if (record.get('transaction_id')) {
var url;
/*if (record.get('posted_flag') == 'N') {
......
......@@ -25,7 +25,7 @@
var transaction_id='';
//附件上传
function upload_attachment_win() {
console.log(transaction_id)
/* console.log(transaction_id)*/
var flag=true;
if(transaction_id==''){
$L.showInfoMessage("提示",'请先保存数据',null,null);
......
......@@ -32,7 +32,7 @@
//提交按钮
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
console.log($(ds_id).getAt(0));
/* console.log($(ds_id).getAt(0));*/
var return_id = $(ds_id).getAt(0).get('return_id');
var transaction_amount = $(ds_id).getAt(0).get('transaction_amount');
......
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