Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js =================================================================== diff -u -r27263 -r27570 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 27263) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 27570) @@ -581,8 +581,55 @@ },500); } } - }]; - + }]; + var updateCount = function(data,field){ + var params = { + bindCount: data.count || '', + goodId: data.tousseDefinitionID, + goodName: data.name, + goodType: data.tousseType, + handleDepartCode: top.Ext4.getCmp('handleDepartCoding').getValue(), + settleAccountsDepartCoding: top.Ext4.getCmp('settleAccountsDepartCoding').getValue(), + urgentAmount:data.urgentAmount, + urgentLevel:data.urgentLevel, + urgentLevelId:data.urgentLevelId + } + if (params.bindCount && params.goodId) { + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getBindGoods.do', + params: params, + timeout: 600000, + method: 'POST', + success: function (response, options) { + try { + var result = Ext.decode(response.responseText); + if (!isUndefinedOrNullOrEmpty(result)) { + if (result.success) { + var records = result.data; + var storeData = leftTemplateStore.getRootNode().childNodes; + var length = storeData.length; + + for(var i=0;i 1){ + var storeData = leftTemplateStore.getRootNode().childNodes; + var newResultArray = []; + var k = 0; + var nameStr = ''; + for(var i=0;i 1){ + currentRecord.set('count',field.nowValue); + var msgBox = new top.Ext4.create('Ext.window.MessageBox', { + width : 500, + height : 200 + }); + msgBox.alert('提示信息', data.name+'同时被多个物品('+nameStr+')绑定,不允许修改'+data.name+'的数量!'); + }else { + setTimeout(function() { + updateCount(data,field); + }, 100); + } + }else { + setTimeout(function() { + updateCount(data,field); + }, 100); + } + } + } + }); + }, + focus:function(field, event, eOpts){ + var data = currentRecord.data; + var focusLastValue = field.lastValue || ''; + field.focusLastValue = focusLastValue; + + setTimeout(function() { + var params = { + bindCount: data.count || '', + goodId: data.tousseDefinitionID, + goodName: data.name, + goodType: data.tousseType, + handleDepartCode: top.Ext4.getCmp('handleDepartCoding').getValue(), + settleAccountsDepartCoding: top.Ext4.getCmp('settleAccountsDepartCoding').getValue(), + urgentAmount:data.urgentAmount, + urgentLevel:data.urgentLevel, + urgentLevelId:data.urgentLevelId + } + if (params.bindCount && params.goodId) { + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getBindGoods.do', + params: params, + timeout: 600000, + method: 'POST', + success: function (response, options) { + try { + var result = Ext.decode(response.responseText); + + if (!isUndefinedOrNullOrEmpty(result)) { + if (result.success) { + var records = result.data; + + if (records.length > 0) { + var storeData = leftTemplateStore.getRootNode().childNodes; + var length = storeData.length; + + for(var i=0;i