Commit b223dda6 authored by panhong18943's avatar panhong18943

日立返还金汇丰银企直连支付

parent a9881dd8
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
delete from hl_hsbc_doc_temp t where t.session_id = ${/session/@session_id}
]]></bm:update-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
hl_hsbc_interface_pkg.insert_doc_temp_return(
p_session_id=>${/session/@session_id},
p_return_id=>${@return_id},
p_return_transaction_id=>${@return_transaction_id},
p_tranamount =>${@this_return_amount},
p_user_id=>${/session/@user_id},
p_button_id => ${/parameter/@button_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hl_hsbc_interface_pkg.create_batch_return(p_session_id => ${/session/@session_id},
p_bank_account_id => ${@bank_account_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
var override_queryfields = [
{
name : 'payment_req_number',
queryexpression : "transaction_num = ${@payment_req_number}"
},
{
name : 'approval_date_from',
queryexpression : "trunc(t1.approval_date) >= to_date(${@approval_date_from},'yyyy-mm-dd')"
},
{
name : 'approval_date_to',
queryexpression : "trunc(t1.approval_date) <= to_date(${@approval_date_to},'yyyy-mm-dd')"
}
];
override();
......@@ -12,7 +12,7 @@
var add_datafilters = [
{
name : 'init_filter',
expression : "t1.status in ('NEW','ERROR','FINISHED','SEND_MID','CONFIRM1_ERROR','CONFIRM2_FULL_ERROR')"
expression : "t1.status in ('NEW','ERROR','FINISHED','SEND_MID','CONFIRM1_ERROR','CONFIRM2_FULL_ERROR') and t1.cf_item = '0'"
}
];
......
var override_queryfields = [
{
name : 'creationdate_from',
queryexpression : "trunc(t1.creationdate) >= to_date(${@creationdate_from},'yyyy-mm-dd')"
},
{
name : 'creationdate_to',
queryexpression : "trunc(t1.creationdate) <= to_date(${@creationdate_to},'yyyy-mm-dd')"
}
];
var add_datafilters = [
{
name : 'init_filter',
expression : "t1.status in ('NEW','ERROR','FINISHED','SEND_MID','CONFIRM1_ERROR','CONFIRM2_FULL_ERROR') and t1.collection_classes = 'REFUND'"
}
];
add_datafilter();
override();
......@@ -73,7 +73,7 @@
// return;
// }
$L.showConfirm("提示",'确认提交审批?',function(){
$L.showConfirm("提示",'确认提交审批?</br>【注意】“退款对方账户银行及分行”需填写完整的银行及分行全称,请检查填写是否正确!',function(){
var detail_mask = $('${/parameter/@winid}').wrap;
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
......
......@@ -2,14 +2,16 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:view>
<a:link id="hsbc_paying_batch_create_link_id" url="${/request/@context_path}/modules/hsbc/HSBC100/hsbc_paying_batch_create.lsc"/>
<a:link id="hsbc_paying_batch_create_return_link_id" url="${/request/@context_path}/modules/hsbc/HSBC100/hsbc_paying_batch_create_return.lsc"/>
<script><![CDATA[
function create_paying_batch() {
Leaf.Masker.mask(Ext.getBody(), '付款单生成中...');
var winId = '${/parameter/@winId}';
Leaf.Masker.mask($(winId).wrap, '付款单生成中...');
var account_ds = $('csh_bank_account');
var bank_account_id = account_ds.getAt(0).get('bank_account_id');
if (Ext.isEmpty(bank_account_id)) {
Leaf.showMessage('提示', '请先选择账户代码!');
Leaf.Masker.unmask(Ext.getBody());
Leaf.Masker.unmask($(winId).wrap);
} else {
var req_ln_ds = $('${/parameter/@ds_id}');
var button_id = '${/parameter/@button_id}';
......@@ -25,23 +27,32 @@
param['details'] = saveData;
param['bank_account_id'] = bank_account_id;
param['button_id'] = button_id;
var pay_type = '${/parameter/@pay_type}';
var url;
if (pay_type == 'TJ'){
url = $('hsbc_paying_batch_create_link_id').getUrl();
}else if(pay_type == 'RETURN'){
url = $('hsbc_paying_batch_create_return_link_id').getUrl();
}
Leaf.request({
url: $('hsbc_paying_batch_create_link_id').getUrl(),
url: url,
para: param,
success: function() {
Leaf.SideBar.show({
msg: '付款单生成成功!',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
Leaf.Masker.unmask($(winId).wrap);
$('${/parameter/@winId}').close();
req_ln_ds.query();
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
Leaf.Masker.unmask($(winId).wrap);
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
Leaf.Masker.unmask($(winId).wrap);
},
scope: this
});
......
......@@ -14,15 +14,23 @@
//创建代付单
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var req_ln_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var req_ln_ds = $(req_ln_ds_id);
var con_ds = $(con_ds_id);
var req_ln_records = req_ln_ds.getSelected();
var con_records = con_ds.getSelected();
if (req_ln_records.length == 0 || con_records.length > 0) {
Leaf.showMessage('${l:PROMPT}', '只能勾选铁甲付款单数据!');
return;
}
new Leaf.Window({
id: 'choose_acount_window',
url: $('pageLink_choose_acount').getUrl(),
params: {
winId: 'choose_acount_window',
ds_id: req_ln_ds_id,
button_id: 'create_with_sbo'
button_id: 'create_with_sbo',
pay_type: 'TJ'
},
title: '支付账号选择',
height: 260,
......@@ -33,15 +41,76 @@
//创建强制付款单生成
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
var req_ln_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var req_ln_ds = $(req_ln_ds_id);
var con_ds = $(con_ds_id);
var req_ln_records = req_ln_ds.getSelected();
var con_records = con_ds.getSelected();
if (req_ln_records.length == 0 || con_records.length > 0) {
Leaf.showMessage('${l:PROMPT}', '只能勾选铁甲付款单数据!');
return;
}
new Leaf.Window({
id: 'choose_acount_window',
url: $('pageLink_choose_acount').getUrl(),
params: {
winId: 'choose_acount_window',
ds_id: req_ln_ds_id,
button_id: 'create_without_sbo'
button_id: 'create_without_sbo',
pay_type: 'TJ'
},
title: '支付账号选择',
height: 260,
width: 680
});
};
//创建代付单
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
var req_ln_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var req_ln_ds = $(req_ln_ds_id);
var con_ds = $(con_ds_id);
var req_ln_records = req_ln_ds.getSelected();
var con_records = con_ds.getSelected();
if (con_records.length == 0 || req_ln_records.length > 0) {
Leaf.showMessage('${l:PROMPT}', '只能勾选退款付款单数据!');
return;
}
new Leaf.Window({
id: 'choose_acount_window',
url: $('pageLink_choose_acount').getUrl(),
params: {
winId: 'choose_acount_window',
ds_id: con_ds_id,
button_id: 'create_with_sbo',
pay_type: 'RETURN'
},
title: '支付账号选择',
height: 260,
width: 680
});
};
//创建强制付款单生成
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function() {
var req_ln_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var req_ln_ds = $(req_ln_ds_id);
var con_ds = $(con_ds_id);
var req_ln_records = req_ln_ds.getSelected();
var con_records = con_ds.getSelected();
if (con_records.length == 0 || req_ln_records.length > 0) {
Leaf.showMessage('${l:PROMPT}', '只能勾选退款付款单数据!');
return;
}
new Leaf.Window({
id: 'choose_acount_window',
url: $('pageLink_choose_acount').getUrl(),
params: {
winId: 'choose_acount_window',
ds_id: con_ds_id,
button_id: 'create_without_sbo',
pay_type: 'RETURN'
},
title: '支付账号选择',
height: 260,
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<a:model-delete model="hsbc.HSBC100.hsbc_paying_batch_create_return"/>
<batch-apply sourcePath="/parameter/details">
<a:model-insert model="hsbc.HSBC100.hsbc_paying_batch_create_return"/>
</batch-apply>
<a:model-update model="hsbc.HSBC100.hsbc_paying_batch_create_return"/>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
......@@ -36,10 +36,19 @@
//代付单发送
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_RESULT', 'hl_hsbc_paying_batch');
var r_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'R_RESULT', 'hl_hsbc_paying_batch');
var batch_ds = $(ds_id);
var records = batch_ds.getSelected();
if (records.length == 0) {
var r_batch_ds = $(r_ds_id);
var r_records = r_batch_ds.getSelected();
if (records.length != 0 && r_records.length != 0) {
Leaf.showMessage('${l:PROMPT}', '不能同时选择铁甲付款单和退款付款单!');
return;
}
if (records.length == 0 && r_records.length == 0) {
Leaf.showMessage('${l:PROMPT}', '请选择至少一条数据!');
return;
}
......@@ -49,13 +58,23 @@
var send_url;
var bank_note='汇丰银行';
for (var i = 0;i < records.length;i++) {
var rec;
rec = records[i];
rec.set('_status', 'insert');
saveData.push(rec.data);
if (records.length != 0){
for (var i = 0;i < records.length;i++) {
var rec;
rec = records[i];
rec.set('_status', 'insert');
saveData.push(rec.data);
}
length = records.length;
}else{
for (var i = 0;i < r_records.length;i++) {
var rec;
rec = r_records[i];
rec.set('_status', 'insert');
saveData.push(rec.data);
}
length = r_records.length;
}
length = records.length;
param['details'] = saveData;
send_url=$('batch_hsbc_send_link').getUrl();
......@@ -68,6 +87,7 @@
success: function(res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
batch_ds.query();
r_batch_ds.query();
},
failure: function(res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......@@ -85,31 +105,55 @@
//人工支付 --add by 24976
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_RESULT', 'hl_hsbc_paying_batch');
var r_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'R_RESULT', 'hl_hsbc_paying_batch');
var batch_ds = $(ds_id);
var records = batch_ds.getSelected();
var r_batch_ds = $(r_ds_id);
var r_records = r_batch_ds.getSelected();
var lease_channel;
var reqsn;
var batch_id;
var bank_item;
if (records.length != 1) {
if (records.length != 0 && r_records.length != 0) {
Leaf.showMessage('${l:PROMPT}', '不能同时选择铁甲付款单和退款付款单!');
return;
}
if (records.length != 1 && r_records.length == 0) {
Leaf.showMessage('${l:PROMPT}', '请选择一条数据!');
return;
}
if (records.length == 0 && r_records.length != 1) {
Leaf.showMessage('${l:PROMPT}', '请选择一条数据!');
return;
}
if (records.length != 0){
reqsn = records[0].get('reqsn');
batch_id = records[0].get('batch_id');
bank_item=records[0].get('bank_item');
}else {
reqsn = r_records[0].get('reqsn');
batch_id = r_records[0].get('batch_id');
bank_item=r_records[0].get('bank_item');
}
var win = new Leaf.showConfirm('${l:HLS.PROMPT}', '使用人工支付将不能再使用银企直连,确认进行人工支付?', function() {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('manual_modify_link').getUrl(),
para: {
batch_id : records[0].get('batch_id'),
reqsn : records[0].get('reqsn'),
bank_item : records[0].get('bank_item')
batch_id : batch_id,
reqsn : reqsn,
bank_item : bank_item
},
success: function(res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
batch_ds.query();
r_batch_ds.query();
},
failure: function(res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......@@ -125,26 +169,50 @@
//付款单取消
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_RESULT', 'hl_hsbc_paying_batch');
var r_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'R_RESULT', 'hl_hsbc_paying_batch');
var batch_ds = $(ds_id);
var records = batch_ds.getSelected();
if (records.length != 1 ) {
var r_batch_ds = $(r_ds_id);
var r_records = r_batch_ds.getSelected();
if (records.length != 0 && r_records.length != 0) {
Leaf.showMessage('${l:PROMPT}', '不能同时选择铁甲付款单和退款付款单!');
return;
}
if (records.length != 1 && r_records.length == 0) {
Leaf.showMessage('${l:PROMPT}', '请选择一条数据!');
return;
}
if (records.length == 0 && r_records.length != 1) {
Leaf.showMessage('${l:PROMPT}', '请选择一条数据!');
return;
}
if (records.length != 0){
reqsn = records[0].get('reqsn');
batch_id = records[0].get('batch_id');
bank_item=records[0].get('bank_item');
}else {
reqsn = r_records[0].get('reqsn');
batch_id = r_records[0].get('batch_id');
bank_item=r_records[0].get('bank_item');
}
Leaf.showConfirm('${l:HLS.PROMPT}', '确认取消?', function() {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('batch_cancel_link').getUrl(),
para: {
batch_id : records[0].get('batch_id'),
reqsn : records[0].get('reqsn'),
bank_item : records[0].get('bank_item')
batch_id : batch_id,
reqsn : reqsn,
bank_item : bank_item
},
success: function(res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
batch_ds.query();
r_batch_ds.query();
},
failure: function(res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......@@ -166,7 +234,7 @@
});
]]></script>
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
\ No newline at end of file
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