Commit b6c1695b authored by Darming's avatar Darming

Merge branch 'feature/write_off_ref' into develop

parents d6a94bea ead7c2b8
......@@ -108,7 +108,7 @@
</bm:primary-key>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} and t1.posted_flag=&apos;Y&apos; and t1.reversed_flag=&apos;N&apos; and write_off_flag&lt;&gt; &apos;FULL&apos; and returned_flag not in ( &apos;FULL&apos;,&apos;RETURN&apos;) and t1.transaction_type in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;) and (nvl(t1.returned_amount, 0)+nvl(t1.write_off_amount, 0)&lt;t1.transaction_amount)) "/>
<bm:data-filter name="query" expression="(t1.confirmed_flag=&apos;APPROVED&apos; and t1.write_off_flag in(&apos;NOT&apos;,&apos;PARTIAL&apos;))"/>
<bm:data-filter name="query" expression="(t1.confirmed_flag=&apos;ACCAUDITED&apos; and t1.write_off_flag in(&apos;NOT&apos;,&apos;PARTIAL&apos;))"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
......
......@@ -16,7 +16,15 @@
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
update CSH_TRANSACTION set confirmed_flag = 'WF_APPROVING' where transaction_id = ${@transaction_id};
if ${@flag} = 'SUBMIT' then
update CSH_TRANSACTION
set confirmed_flag = 'WF_APPROVING'
where transaction_id = ${@transaction_id};
elsif ${@flag} = 'RETURN' then
update CSH_TRANSACTION
set confirmed_flag = 'WF_REJECTED'
where transaction_id = ${@transaction_id};
end if;
end;
]]></bm:update-sql>
</bm:operation>
......
......@@ -877,7 +877,7 @@
<a:column name="user_desc" prompt="HLS.DOCUMENT_CREATED_BY" align="center"/>
<!-- <a:column name="debt_confirmed_by_desc" prompt="CSH510.CSH_TRANSACTION.DEPT_CONFIRMER"-->
<!-- align="center"/>-->
<a:column name="acc_confirmed_by_desc" prompt="确认人"
<a:column name="acc_confirmed_by_desc" prompt="收款确认人"
align="center"/>
</a:columns>
</a:grid>
......
......@@ -33,39 +33,26 @@
if ('${/parameter/@advanceDisplayFlag}' == 'Y') {
document.getElementById('write_off_advance').style.display = 'block';
}
if ('${/parameter/@readOnly}' == 'Y') {
$('csh_grid_add_bt').setVisible(false);
$('csh_grid_delete_bt').setVisible(false);
// $('csh_grid_deposit_add_bt').setVisible(false);
// $('csh_grid_deposit_delete_bt').setVisible(false);
// $('csh_grid_advanced_add_bt').setVisible(false);
// $('csh_grid_advanced_delete_bt').setVisible(false);
$('csh_write_off_grid').hideColumn('left_amount');
$('csh_write_off_grid').hideColumn('left_principal');
$('csh_write_off_grid').hideColumn('left_interest');
$('csh_write_off_grid').hideColumn('unreceived_amount');
if ('${/parameter/@interfaceQueryFlag}' == 'N') {
$('csh_write_off_interface_ds').setQueryUrl('${/request/@context_path}/autocrud/csh.CSH531N.csh_write_off/query?transaction_id=${/parameter/@transaction_id}');
$('csh_write_off_interface_ds').query();
}else{
if ('${/parameter/@approval_flag}' == 'Y') {
$('csh531n_write_off_btn_id').setVisible(true);
} else {
$('csh531n_write_off_submit_btn_id').setVisible(true);
}
}
} else {
if ('${/parameter/@interfaceQueryFlag}' == 'N') {
if ('${/parameter/@approval_flag}' == 'Y') {
$('csh531n_write_off_btn_id').setVisible(true);
$('csh531n_write_off_return_btn_id').setVisible(true);
}
} else {
// $('csh511_save_all_id').setVisible(true);
$('csh531n_write_off_submit_btn_id').setVisible(true);
}
}
$('csh511_save_all_id').setVisible(true);
}
}
......@@ -363,11 +350,70 @@
}
}
function csh531n_write_off_return() {
$('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
$('csh531n_write_off_return_btn_id').disable();
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('csh531n_submit_link_id').getUrl(),
para: {
transaction_id: record.get('transaction_id'),
flag: 'RETURN'
},
success: function () {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
$('csh531n_write_off_return_btn_id').enable();
$('${/parameter/@winid}').close();
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
$('csh531n_write_off_return_btn_id').enable();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
$('csh531n_write_off_return_btn_id').enable();
},
scope: this
});
}
function csh531_submitsuccess(ds) {
ds.query();
$('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('csh531n_submit_link_id').getUrl(),
para: {
transaction_id: record.get('transaction_id'),
flag: 'SUBMIT'
},
success: function () {
// Leaf.SideBar.show({
// msg: '操作成功',
// duration: 2000
// });
Leaf.Masker.unmask(Ext.getBody());
$('csh531n_write_off_submit_btn_id').enable();
$('${/parameter/@winid}').close();
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
$('csh531n_write_off_submit_btn_id').enable();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
$('csh531n_write_off_submit_btn_id').enable();
},
scope: this
});
// ds.query();
}
function csh531_submitfailed(ds) {
}
function compareDate(start, end) {
......@@ -431,10 +477,11 @@
function csh511_save_all() {
if (checkAmount()) {
$('csh_write_off_interface_ds').submit();
$('csh_transaction_deposit_ds').submit();
$('csh_transaction_advanced_ds').submit();
$('csh_write_off_interface_ds').submit();
}
$('csh531n_write_off_submit_btn_id').enable();
}
function checkAmount(type) {
......@@ -526,17 +573,16 @@
var interfaceRs = $('csh_write_off_interface_ds').getAll();
var depositRs = $('csh_transaction_deposit_ds').getAll();
var advancedRs = $('csh_transaction_advanced_ds').getAll();
debugger;
var allRs = [...interfaceRs, ...depositRs, ...advancedRs];
var sum = 0;
for (var i = 0; i < allRs.length; i++) {
if (allRs[i].dirty) {
Leaf.showInfoMessage("提示", "存在未保存数据,请先保存再进行提交操作!");
return;
}
// if (allRs[i].dirty) {
// Leaf.showInfoMessage("提示", "存在未保存数据,请先保存再进行提交操作!");
// return;
// }
sum += allRs[i].get('write_off_amount') || 0;
}
......@@ -546,33 +592,8 @@
}
Leaf.showConfirm('提示', '确认提交复核吗', function () {
var record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
$('csh531n_write_off_submit_btn_id').disable();
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('csh531n_submit_link_id').getUrl(),
para: {
transaction_id: record.get('transaction_id')
},
success: function () {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
$('csh531n_write_off_submit_btn_id').enable();
$('${/parameter/@winid}').close();
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
$('csh531n_write_off_submit_btn_id').enable();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
$('csh531n_write_off_submit_btn_id').enable();
},
scope: this
});
csh511_save_all();
});
}
......@@ -724,10 +745,13 @@
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:gridButton id="csh511_save_all_id" click="csh511_save_all" style="margin-left:20px;display:none"
text="暂存"/>
<a:screenTitle/>
<!-- <a:gridButton id="csh511_save_all_id" click="csh511_save_all" style="margin-left:20px;display:none"-->
<!-- text="暂存"/>-->
<a:gridButton id="csh531n_write_off_btn_id" click="csh531n_write_off"
style="margin-left:10px;display:none" text="确认核销"/>
<a:gridButton id="csh531n_write_off_return_btn_id" click="csh531n_write_off_return"
style="margin-left:10px;display:none" text="核销退回"/>
<a:gridButton id="csh531n_write_off_submit_btn_id" click="csh531n_write_off_submit"
style="margin-left:10px;display:none" text="提交复核"/>
</a:screenTopToolbar>
......
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