Commit ba737a56 authored by 38823's avatar 38823

茂甲控制保证金测试问题修复

parent bcc2de2f
...@@ -48,12 +48,12 @@ ...@@ -48,12 +48,12 @@
// 提交审批 // 提交审批
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
var ds_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds'; var ds_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
var record= $(ds_id).getSelected()[0]; var record= $(ds_id).getSelected()[0];
var marginId=record.get('margin_check_id'); var marginId=record.get('margin_check_id');
var wflStatus=record.get('wflStatus'); var wflStatus=record.data.wfl_status;
if(wflStatus == 'APPROVING' || wflStatus == 'APPROVED'){ if(wflStatus == 'APPROVING' || wflStatus == 'APPROVED' || wflStatus == 'REJECT'){
Leaf.showErrorMessage('提示', '只有新建的单据才可以提交审批'); Leaf.showErrorMessage('提示', '只有新建的单据才可以提交审批');
return false; return false;
} }
...@@ -84,15 +84,20 @@ ...@@ -84,15 +84,20 @@
} }
//自定义保存 //自定义保存
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = 'MARGIN_CHECK_F_QUERY_csh_margin_check_ds'; var ds_id = 'MARGIN_CHECK_F_QUERY_csh_margin_check_ds';
var ds_result_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds'; var ds_result_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
var record=$(ds_id).getCurrentRecord(); var record=$(ds_id).getCurrentRecord();
var params = record.data; var params = record.data;
var marAfterStatus= params.mar_after_status; var marAfterStatus= params.mar_after_status;
if(Ext.isEmpty(marAfterStatus)){
Leaf.showErrorMessage('提示', '修改后茂甲保证金校验状态不能为空!');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if (marAfterStatus == '${/model/wfl_status/record/@mar_status}') { if (marAfterStatus == '${/model/wfl_status/record/@mar_status}') {
Leaf.showErrorMessage('提示', '修改前的状态和修改后的状态不能一样'); Leaf.showErrorMessage('提示', '请选择与修改前茂甲保证金校验不同的状态');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
} }
...@@ -101,7 +106,7 @@ ...@@ -101,7 +106,7 @@
if (record.length != 1) { if (record.length != 1) {
for (var i = 0; i < record.length; i++) { for (var i = 0; i < record.length; i++) {
if (record[i].get('wfl_status') == 'NEW' || record[i].get('wfl_status') == 'APPROVING') { if (record[i].get('wfl_status') == 'NEW' || record[i].get('wfl_status') == 'APPROVING') {
Leaf.showErrorMessage('提示', '必须审批通过后才可以新建'); Leaf.showErrorMessage('提示', '当前系统中已有新建/审批中单据,请审批结束后再新建');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
} }
......
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