Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/warehouse/wareHouseForm.js =================================================================== diff -u -r28835 -r37669 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/warehouse/wareHouseForm.js (.../wareHouseForm.js) (revision 28835) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/warehouse/wareHouseForm.js (.../wareHouseForm.js) (revision 37669) @@ -180,10 +180,12 @@ thiz.enable(); return false; } + var id = top.Ext.getCmp('id').getValue(); + var name = top.Ext.getCmp('name').getValue(); //验证仓库名是否已经存在 Ext.Ajax.request( { url : WWWROOT + '/disinfectSystem/baseData/wareHouseAction!validateWareHouseNameExists.do', - params : {id : top.Ext.getCmp('id').getValue() , name : top.Ext.getCmp('name').getValue()}, + params : {id : id , name : name}, success : function(response, options) { var result = Ext.decode(response.responseText); var success = result.success; @@ -193,25 +195,39 @@ top.Ext.MessageBox.confirm("请确认","是否确定要保存仓库?", function(button, text) { if ("yes" == button){ - formObj.form.submit( { + var id = top.Ext.getCmp('id').getValue(); + var orgUnitId = top.Ext.getCmp('orgUnitId').getValue(); + var orgUnitCode = top.Ext.getCmp('orgUnitCode').getValue(); + var originalName = top.Ext.getCmp('originalName').getValue(); + var sequence = top.Ext.getCmp('sequence').getValue(); + var remark = top.Ext.getCmp('remark').getValue(); + + Ext.Ajax.request({ url : WWWROOT + '/disinfectSystem/baseData/wareHouseAction!saveWareHouse.do', - method : 'POST', - waitMsg : '正在保存数据,请稍候', - waitTitle : '提交表单', - success : function(form, action) { - if(action.result.success == true){ + params:{ + id:id, + name:name, + orgUnitId:orgUnitId, + orgUnitCode:orgUnitCode, + originalName:originalName, + sequence:sequence, + remark:remark + }, + success:function(response){ + var result = Ext.decode(response.responseText); + if(result.success){ wareHouseWin.close(); showResult('保存成功'); grid.dwrReload(); - }else{ + }else { showResult(action.result.message); } }, - failure : function(form, action) { - showResult(action.result.message); - top.Ext.getCmp('saveBtn').enable(); + failure : function(response, options) { + var result = Ext.decode(response.responseText); + showResult(result.message); } - }); + }) } }); }