Commit 96e95d33 authored by 高泉铭's avatar 高泉铭

[refactor]新增反冲

parent 28f7d50c
......@@ -87,7 +87,7 @@
</bm:primary-key>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.posted_flag=&apos;Y&apos;)"/>
<!-- <bm:data-filter name="query" expression="(t1.posted_flag=&apos;Y&apos;)"/>-->
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="receipt_type" queryOperator="="/>
......@@ -112,7 +112,7 @@
<bm:query-field name="bp_id_from" queryExpression="t1.bp_id&gt;=${@bp_id_from}"/>
<bm:query-field name="bp_id_to" queryExpression="t1.bp_id&lt;=${@bp_id_to}"/>
<bm:query-field field="write_off_flag" queryOperator="="/>
<bm:query-field field="posted_flag" queryOperator="="/>
<!-- <bm:query-field field="posted_flag" queryOperator="="/>-->
<bm:query-field field="returned_flag" queryOperator="="/>
<bm:query-field field="reversed_flag" queryOperator="="/>
<bm:query-field field="period_name" queryOperator="="/>
......
......@@ -48,7 +48,7 @@
<bm:field name="history_flag" expression="(SELECT ct.history_flag FROM csh_transaction ct WHERE ct.transaction_id = t1.csh_transaction_id)" forInsert="false" forUpdate="false"/>
<bm:field name="ref_bp_name" expression="(select cc.bp_name from con_contract_v cc where cc.contract_id = nvl(t1.contract_id,t1.ASSIGNS_CONTRACT_ID))" forInsert="false" forUpdate="false"/>
<bm:field name="ref_contract_number" expression="(select cc.contract_number from con_contract cc where cc.contract_id = nvl(t1.contract_id,t1.ASSIGNS_CONTRACT_ID))" forInsert="false" forUpdate="false"/>
<bm:field name="ref_agent_name" expression="(select cc.extra_nam from con_contract_v cc where cc.contract_id = nvl(t1.contract_id,t1.ASSIGNS_CONTRACT_ID))" forInsert="false" forUpdate="false"/>
<!-- <bm:field name="ref_agent_name" expression="(select cc.extra_nam from con_contract_v cc where cc.contract_id = nvl(t1.contract_id,t1.ASSIGNS_CONTRACT_ID))" forInsert="false" forUpdate="false"/>-->
</bm:fields>
<bm:features>
<f:standard-who/>
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
-- Call the procedure
csh_write_off_pkg.reverse_write_off_all(p_transaction_id => ${@transaction_id},
p_reversed_date => trunc(sysdate),
p_description => '反冲',
p_user_id => ${/session/@user_id});
end;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -22,6 +22,7 @@
<a:link id="csh_data_confirm_check_link" model="csh.CSH531N.csh_data_confirm_check" modelaction="execute"/>
<a:link id="csh_data_confirm_delete_link" model="csh.CSH531N.csh_data_confirm_check" modelaction="delete"/>
<a:link id="csh_auto_write_off_link" model="csh.CSH531N.csh_auto_write_off" modelaction="batch_update"/>
<a:link id="csh_reverse_write_off_link" model="csh.CSH531N.csh_reverse_write_off" modelaction="update"/>
<a:link id="csh_modify_info_window_link"
url="${/request/@context_path}/modules/csh/CSH531N/csh_modify_info.lview"/>
<a:link id="csh_write_off_upload_link"
......@@ -335,7 +336,7 @@
var record = ds.findById(id);
var bp_category = record.get('bp_category');
var depositDisplayFlag = 'N';
if(bp_category == 'AGENT'){
if (bp_category == 'AGENT') {
depositDisplayFlag = 'Y';
}
var win = new Leaf.Window({
......@@ -442,14 +443,34 @@
if (write_off_flag == 'NOT') {
readOnly = 'N';
}
csh531n_open_write_off_detail(record.id,readOnly);
csh531n_open_write_off_detail(record.id, readOnly);
} else {
Leaf.showErrorMessage('提示', '请先选择一条数据');
}
}
function csh531_new_reverse_write_off(){
function csh531_new_reverse_write_off() {
var record = $('csh531n_sap_bankflow_info_result_ds').getSelected()[0];
if (record && record.get('write_off_flag') == 'FULL') {
Leaf.showConfirm("提示", "您确定反冲现金事务<span style='color:red'>" + record.get('transaction_num') + "</span>吗", function () {
Leaf.request({
url: $('csh_reverse_write_off_link').getUrl(),
para: record.data,
success: function () {
csh531n_unlock_current_window();
$('csh531n_sap_bankflow_info_result_ds').query();
}, failure: function () {
csh531n_unlock_current_window();
},
error: function () {
csh531n_unlock_current_window();
},
scope: this
});
});
} else {
Leaf.showInfoMessage("提示", "只能反冲已经核销的现金事务");
}
}
]]></script>
......@@ -553,8 +574,8 @@
<a:box column="4">
<a:lov name="bp_name"
bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="商业伙伴"/>
<!-- <a:comboBox name="status" bindTarget="csh_transaction_receipt_write_off_query_ds"-->
<!-- prompt="单据状态"/>-->
<!-- <a:comboBox name="status" bindTarget="csh_transaction_receipt_write_off_query_ds"-->
<!-- prompt="单据状态"/>-->
<a:comboBox name="write_off_flag" bindTarget="csh_transaction_receipt_write_off_query_ds"
prompt="核销状态"/>
<a:comboBox name="collection_classes_desc"
......@@ -599,7 +620,7 @@
<!-- <a:column name="approving_return_amount" align="right" footerRenderer="summary_Renderer" renderer="Leaf.formatMoney" prompt="审批中退款金额"/>-->
<!-- <a:column name="unallocate_amount" align="right" footerRenderer="summary_Renderer"-->
<!-- renderer="Leaf.formatMoney" prompt="未分配金额"/>-->
<!-- <a:column name="status_desc" prompt="单据状态" width="120" align="center"/>-->
<!-- <a:column name="status_desc" prompt="单据状态" width="120" align="center"/>-->
<a:column name="write_off_flag_desc" prompt="核销状态" width="120" align="center"/>
<!-- <a:column name="review_status_desc" prompt="分配状态" width="80"/>-->
<!-- <a:column name="ref_v05" prompt="备注" width="100"/>-->
......
......@@ -10,7 +10,7 @@
<a:link id="transaction_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
var submit_flag = 'N';
function csh531n_detail_win_close() {
$('${/parameter/@winid}').close();
}
......@@ -280,10 +280,6 @@
function csh531n_write_off() {
if (checkAmount('WRITE_OFF')) {
$('csh_write_off_interface_ds').submit();
$('csh_transaction_deposit_ds').submit();
$('csh_transaction_advanced_ds').submit();
if(submit_flag == 'Y'){
var record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
......@@ -308,6 +304,8 @@
scope: this
});
}
}else{
Leaf.showInfoMessage("提示","请先保存");
}
}
......@@ -336,8 +334,6 @@
}
}
var submit_flag = 'N';
function csh531_submitsuccess(ds) {
submit_flag = 'Y';
ds.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