Index: ssts-web/src/main/webapp/disinfectsystem/equipmentInspection/forminstanceForm.js =================================================================== diff -u -r41067 -r41068 --- ssts-web/src/main/webapp/disinfectsystem/equipmentInspection/forminstanceForm.js (.../forminstanceForm.js) (revision 41067) +++ ssts-web/src/main/webapp/disinfectsystem/equipmentInspection/forminstanceForm.js (.../forminstanceForm.js) (revision 41068) @@ -285,36 +285,20 @@ * @param barcode 设备条码 */ function setDeviceSelected(barcode) { - deviceInfoStore = new Ext.data.Store({ - proxy: new Ext.data.HttpProxy({ - url: WWWROOT + '/disinfectSystem/equipmentInspectionDefAction!loadEquipmentInspectionDefDeviceInfo.do', - method: 'POST' - }), - baseParams: { - barcode: barcode - }, - reader: new Ext.data.JsonReader({ - totalProperty: 'totalCount', - root: 'data' - }, [ - { name: 'id', mapping: 'id' }, - { name: 'name', mapping: 'name' }, - { name: 'type', mapping: 'type' } - ]), - listeners: { - load: function (store, records) { - if (records.length && records.length >= 1) { - var record = records[0]; - Ext.getCmp("equipmentName").setValue(record.data.name); - Ext.getCmp("equipmentID").setValue(record.data.id); - Ext.getCmp("equipmentType").setValue(record.data.type); - setComboSelectedByValue(record.data.id, record.data.type); - } + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/equipmentInspectionDefAction!loadEquipmentInspectionDefDeviceInfo.do', + params: { barcode: barcode }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if(result.data && result.data.length >= 1){ + var record = result.data[0]; + Ext.getCmp("equipmentName").setValue(record.name); + Ext.getCmp("equipmentID").setValue(record.id); + Ext.getCmp("equipmentType").setValue(record.type); + setComboSelectedByValue(record.id, record.type); } } }); - - deviceInfoStore.load(); } Ext.onReady(function () {