Commit fbf86ac1 authored by 38823's avatar 38823

茂甲控制保证金打开关闭校验

parent fed5b746
......@@ -609,7 +609,7 @@
}
if ($(ds_id).validate()) {
debugger;
if('${/model/wfl_status/record/@mar_status}' != 'Y'){
if('${/model/wfl_status/record/@mar_status}' == 'Y'){
if(record.get('division')=='70'&&record.get('write_off_amount')<record.get('customer_margin')){
Leaf.showMessage('${l:PROMPT}', '铁甲业务需要保证金入账后才能起租');
return;
......
......@@ -38,9 +38,7 @@
// 提交审批
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
var ds_query_id = 'MARGIN_CHECK_F_QUERY_csh_margin_check_ds';
var record= $(ds_id).getSelected()[0];
var record_query = $(ds_query_id).getCurrentRecord();
var marginId=record.get('margin_check_id');
var wflStatus=record.get('wflStatus');
if(wflStatus == 'APPROVING'){
......@@ -80,10 +78,23 @@
//保存前调用
var check_flag=true;
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) {
var check_flag=true;
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id='MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
var ds_query_id = 'MARGIN_CHECK_F_QUERY_csh_margin_check_ds';
if(ds.id == ds_query_id){
var marAfterStatus= $(ds_query_id).getCurrentRecord().get('mar_after_status');
if(check_flag == true){
if(marAfterStatus == '${/model/wfl_status/record/@mar_status}'){
Leaf.showErrorMessage('提示','修改前的状态和修改后的状态不能一样');
check_flag = false;
return false;
}
}
}
if(ds.id == ds_id){
var record=$(ds_id).getAll();
if(check_flag == true){
......
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