Commit 6af01832 authored by Darming's avatar Darming

Merge branch 'feature/write_off_ref' into develop

parents c6c46a0d b0d7cb87
......@@ -21,7 +21,7 @@
<bm:field name="distribution_set_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DISTRIBUTION_SET_ID" prompt="CSH511.CSH_TRANSACTION.DISTRIBUTION_SET_ID"/>
<bm:field name="cashflow_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="CASHFLOW_AMOUNT" prompt="CSH511.CSH_TRANSACTION.CASHFLOW_AMOUNT"/>
<bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_CODE" prompt="HLS.CURRENCY"/>
<bm:field name="transaction_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TRANSACTION_AMOUNT" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_AMOUNT" expression="(select to_char(transaction_amount,'99999999.99') from dual)"/>
<bm:field name="transaction_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TRANSACTION_AMOUNT" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_AMOUNT"/>
<bm:field name="exchange_rate_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXCHANGE_RATE_TYPE" prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
<bm:field name="exchange_rate_quotation" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXCHANGE_RATE_QUOTATION" prompt="CSH511.CSH_TRANSACTION.EXCHANGE_RATE_QUOTATION"/>
<bm:field name="exchange_rate" databaseType="NUMBER" datatype="java.lang.Double" physicalName="EXCHANGE_RATE" prompt="HLS.EXCHANGE_RATE"/>
......
......@@ -170,7 +170,7 @@
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(not exists(select 1 from csh_transaction t where t.transaction_type = 'RECEIPT' and t.paid_byother_flag = 'T' and t.write_off_flag = 'FULL' and t.transaction_id = t1.transaction_id))"/>
<!-- <bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and t1.reversed_flag = 'N' and nvl(t1.deposit_flag,'N')='N' "/>-->
<bm:data-filter name="query" expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(t1.source_type,NULL,'DEPOSIT',NULL)) and t1.returned_flag != 'FULL' and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED')) "/>
<bm:data-filter name="query" expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(t1.source_type,NULL,NULL,'DEPOSIT')) and t1.returned_flag != 'FULL' and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED')) "/>
<bm:data-filter name="position_code" expression="(((${@position_code} = '009' and t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'N') or (${@position_code} = '014' and t1.bp_category != 'TENANT') or (${@position_code} = '014' and t1.paid_byother_flag != 'N') and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1))" />
</bm:data-filters>
</bm:model>
\ No newline at end of file
......@@ -63,11 +63,11 @@
<!--<a:column name="bp_name" prompt="CSH513.BP_TENANT" width="180"/>-->
<a:column name="ref_contract_number" prompt="HLS.CONTRACT_NUMBER" width="110"/>
<a:column name="ref_bp_name" prompt="CSH513.BP_TENANT" width="180"/>
<a:column name="ref_agent_name" prompt="代理商名称" width="180"/>
<a:column name="write_off_classification_desc" prompt="核销分类" width="120"/>
<!-- <a:column name="ref_agent_name" prompt="代理商名称" width="180"/>-->
<!-- <a:column name="write_off_classification_desc" prompt="核销分类" width="120"/>-->
<a:column name="journal_num" prompt="凭证编号" width="120"/>
<a:column name="journal_user" prompt="制单人" width="120"/>
<!-- <a:column name="journal_num" prompt="凭证编号" width="120"/>-->
<!-- <a:column name="journal_user" prompt="制单人" width="120"/>-->
</a:columns>
</a:grid>
......
......@@ -285,19 +285,28 @@
}
function csh531n_write_off() {
$('csh531n_write_off_btn_id').disable();
var returning_amount = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('returning_amount') || 0;
if (returning_amount > 0) {
Leaf.showInfoMessage("提示", "该收款单存在审批中的退款流程,无法进行核销操作!");
$('csh531n_write_off_btn_id').enable();
return;
}
var interfaceRs = $('csh_write_off_interface_ds').getAll();
var depositRs = $('csh_transaction_deposit_ds').getAll();
var advancedRs = $('csh_transaction_advanced_ds').getAll();
var allRs = [...interfaceRs, ...depositRs, ...advancedRs];
//IE浏览器不支持ES6语法
// var allRs = [...interfaceRs, ...depositRs, ...advancedRs];
var allRs = [];
allRs = interfaceRs.concat(depositRs).concat(advancedRs);
for (var i = 0; i < allRs.length; i++) {
if (allRs[i].dirty) {
Leaf.showInfoMessage("提示", "存在未保存数据,请先保存再进行核销操作!");
$('csh531n_write_off_btn_id').enable();
return;
}
}
......@@ -315,12 +324,15 @@
},
success: function () {
csh531d_unlock_current_window();
$('csh531n_write_off_btn_id').enable();
csh531n_detail_win_close();
}, failure: function () {
csh531d_unlock_current_window();
$('csh531n_write_off_btn_id').enable();
},
error: function () {
csh531d_unlock_current_window();
$('csh531n_write_off_btn_id').enable();
},
scope: this
});
......@@ -506,6 +518,7 @@
var header_rec = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
if (sum > header_rec.get('unwrite_off_amount')) {
Leaf.showInfoMessage('提示', '核销总金额不能大于剩余可核销金额');
$('csh531n_write_off_submit_btn_id').enable();
return false;
}
var receipt_type = header_rec.get('receipt_type');
......@@ -522,6 +535,7 @@
}
if (check_flag == 'Y' && sum != header_rec.get('unwrite_off_amount')) {
Leaf.showInfoMessage('提示', '核销总金额不等于可核销金额,该现金事务不支持部分核销!');
$('csh531n_write_off_submit_btn_id').enable();
return false;
}
}
......@@ -565,12 +579,18 @@
var returning_amount = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('returning_amount') || 0;
if (returning_amount > 0) {
Leaf.showInfoMessage("提示", "该收款单存在审批中的退款流程,无法进行提交操作!");
return;
}
var interfaceRs = $('csh_write_off_interface_ds').getAll();
var depositRs = $('csh_transaction_deposit_ds').getAll();
var advancedRs = $('csh_transaction_advanced_ds').getAll();
var allRs = [...interfaceRs, ...depositRs, ...advancedRs];
//IE浏览器不支持ES6语法
// var allRs = [...interfaceRs, ...depositRs, ...advancedRs];
var allRs = [];
allRs = interfaceRs.concat(depositRs).concat(advancedRs);
var sum = 0;
......@@ -593,6 +613,14 @@
});
}
function csh531_add_fun(ds, record, index) {
var ds = $('csh_transaction_receipt_write_off_detail_ds');
var r = ds.getCurrentRecord();
if(r.get('transaction_type') == 'DEPOSIT'){
record.set('write_off_type', 'DEPOSIT_CREDIT');
}
}
]]></script>
<a:dataSets>
<a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
......@@ -656,7 +684,7 @@
<a:field name="contract_id"/>
<a:field name="trx_interface_id" defaultValue="${/parameter/@transaction_id}"/>
<a:field name="contract_number" prompt="合同编号" autoComplete="true" lovAutoQuery="true"
lovHeight="850"
lovHeight="850" required="true"
lovUrl="${/request/@context_path}/modules/csh/CSH531N/csh_write_off_ref_contract.lview?bp_id=${/model/csh_transaction_path/record/@bp_id}"
lovWidth="1350" title="合同号选择">
<a:mapping>
......
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