Commit 4417c30b authored by 高泉铭's avatar 高泉铭

[refactor] 部分功能校验改造

parent 970285cd
......@@ -370,7 +370,7 @@
var status = record.get('status');
var write_off_flag = record.get('write_off_flag');
var readOnly = 'Y';
if ((status == 'NEW' || status == 'RETURN') && write_off_flag == 'NOT') {
if ((status == 'NEW' || status == 'RETURN') && write_off_flag != 'FULL') {
readOnly = 'N';
}
if (name == 'csh531n_detail') {
......@@ -451,25 +451,31 @@
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
});
});
var returned_amount = record.get('returned_amount') || 0;
if (returned_amount > 0) {
Leaf.showInfoMessage("提示", "该事务存在收款退款,不允许反冲");
} else {
Leaf.showInfoMessage("提示", "只能反冲已经核销的现金事务");
if (record && record.get('write_off_flag') != 'NOT') {
Leaf.showConfirm("提示", "您确定反冲现金事务<span style='color:red'>" + record.get('transaction_num') + "</span>吗", function () {
csh531n_lock_current_window();
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("提示", "只能反冲已经核销的现金事务");
}
}
}
......@@ -489,7 +495,7 @@
<a:dataSet id="receipt_type_ds" lookupCode="RECEIPT_TYPE"/>
<a:dataSet id="csh_transaction_receipt_write_off_query_ds" autoCreate="true">
<a:fields>
<a:field name="write_off_flag" />
<a:field name="write_off_flag"/>
<a:field name="write_off_flag_desc" displayField="code_value_name" options="con_write_off_flag_ds"
returnField="write_off_flag" valueField="code_value"/>
<a:field name="status" displayField="code_value_name" options="status_ds"
......
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