Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/sterilizer/sterilizerForm.js =================================================================== diff -u -r32837 -r32952 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/sterilizer/sterilizerForm.js (.../sterilizerForm.js) (revision 32837) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/sterilizer/sterilizerForm.js (.../sterilizerForm.js) (revision 32952) @@ -2,89 +2,89 @@ var formObj; var sterilizerWin; var enableBioreaderInterface = false; -if(sstsConfig.hasOwnProperty('enableBioreaderInterface') && sstsConfig.enableBioreaderInterface){ +if (sstsConfig.hasOwnProperty('enableBioreaderInterface') && sstsConfig.enableBioreaderInterface) { enableBioreaderInterface = true; } -function removeGridItem(gridName){ +function removeGridItem(gridName) { var configGrid = top.Ext.getCmp(gridName); var rows = configGrid.getSelectionModel().getSelections();// 返回值为 Record 数组 if (rows) { - for ( var i = 0; i < rows.length; i++) { + for (var i = 0; i < rows.length; i++) { configGrid.getStore().remove(rows[i]); } } } -function setSterilisationIds(){ +function setSterilisationIds() { var sterilisationIds = ''; top.Ext.getCmp('configGrid').stopEditing();// 停止编辑 var sterilisationIdsStore = top.Ext.getCmp('configGrid').getStore(); - for(var i= 0 ;i0 && id==0) { + fields: ['companyID', 'companyName'], + url: WWWROOT + '/disinfectSystem/baseData/supplierAction!getCompanyInfo.do?fields=companyID,companyName', + listeners: { + load: function (store, records) { + if (records.length > 0 && id == 0) { top.Ext.getCmp('supplierName').setRawValue(records[0].data.companyName); top.Ext.getCmp('supplierName').setValue(records[0].data.companyID); top.Ext.getCmp('supplierID').setValue((records[0].data.companyID)); } } } }); - + var deviceInterfaceJsonStore = new Ext.data.Store({ - proxy : new top.Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/deviceInterfaceAction!getInterfacesInfo.do', - method : "POST" + proxy: new top.Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/deviceInterfaceAction!getInterfacesInfo.do', + method: "POST" }), - reader : new top.Ext.data.JsonReader({ - fields : [ 'name', 'id'] + reader: new top.Ext.data.JsonReader({ + fields: ['name', 'id'] }), - listeners:{ - load:function(store,records) { - if(records.length>0 && id==0) { + listeners: { + load: function (store, records) { + if (records.length > 0 && id == 0) { top.Ext.getCmp('deviceInterfaceName').setRawValue(records[0].data.name); top.Ext.getCmp('deviceInterfaceName').setValue(records[0].data.id); top.Ext.getCmp('deviceInterfaceId').setValue((records[0].data.id)); @@ -149,1282 +149,1282 @@ } }); var bioreaderStore = new Ext.data.Store({ - proxy : new top.Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/sterilization/bioreaderAction!getBioreaderNameAndIdList.do?', - method : "POST" + proxy: new top.Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/sterilization/bioreaderAction!getBioreaderNameAndIdList.do?', + method: "POST" }), - reader : new top.Ext.data.JsonReader({ - fields : [ 'bioreaderId', 'bioreaderName'] + reader: new top.Ext.data.JsonReader({ + fields: ['bioreaderId', 'bioreaderName'] }), - listeners:{ - load:function(store,records) { - if(records.length>0 && id==0) { + listeners: { + load: function (store, records) { + if (records.length > 0 && id == 0) { top.Ext.getCmp('bioreaderName').setRawValue(records[0].data.bioreaderName); top.Ext.getCmp('bioreaderName').setValue(records[0].data.bioreaderId); top.Ext.getCmp('bioreaderId').setValue((records[0].data.bioreaderId)); } } } }); - + var departmentJsonStore = new Ext.data.Store({ - proxy : new top.Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/sterilizerAction!getDepartmentInfo.do', - method : "POST" + proxy: new top.Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/sterilizerAction!getDepartmentInfo.do', + method: "POST" }), - reader : new top.Ext.data.JsonReader({ - fields : [ "orgUnitCoding", "orgUnitName"] + reader: new top.Ext.data.JsonReader({ + fields: ["orgUnitCoding", "orgUnitName"] }) }); - + //灭菌程序 var needNoticeSterilisationStore = new Ext.data.SimpleStore({ - fields : [ 'id','needNoticeSterilisation' ], - url : WWWROOT + '/disinfectSystem/baseData/sterilizerAction!getSterilizerType.do', - listeners : { - load : function(store,records){ + fields: ['id', 'needNoticeSterilisation'], + url: WWWROOT + '/disinfectSystem/baseData/sterilizerAction!getSterilizerType.do', + listeners: { + load: function (store, records) { records[0].data.needNoticeSterilisation = ""; } } }); - + var configStore = new Ext.data.SimpleStore({ - fields : [ - {name: 'id'}, - {name: 'sterilisation'} + fields: [ + { name: 'id' }, + { name: 'sterilisation' } ] }); var configStore1 = new Ext.data.SimpleStore({ - fields : [ - {name: 'frequency'}, - {name: 'sterilisation'}, - {name: 'sterilisation_id'}, - {name: 'remindMode'} + fields: [ + { name: 'frequency' }, + { name: 'sterilisation' }, + { name: 'sterilisation_id' }, + { name: 'remindMode' } ] - }); - + }); + var consumableStore = new Ext.data.SimpleStore({ - fields : [ - {name: 'id'}, - {name: 'consumable'} + fields: [ + { name: 'id' }, + { name: 'consumable' } ] }); - + var testItemStore = new Ext.data.SimpleStore({ - fields : [ - {name: 'id'}, - {name: 'testItem'} + fields: [ + { name: 'id' }, + { name: 'testItem' } ] }); - + var cm = new top.Ext.grid.ColumnModel([{ - id:'id', - name:'id', - hidden :true, - dataIndex : 'id' - },{ - id : 'cleaningMethodModel', - header : "灭菌程序", - width:240, - dataIndex : 'sterilisation', - editor : new top.Ext.form.ComboBox({ - xtype : 'combo', - id : 'cleaningMethod', - name : 'cleaningMethod', - fieldLabel : '灭菌程序', - minChars : 0, - valueField : 'id', - displayField : 'cleaningMethod', - store : foldersJsonStore, - forceSelection : true, - lazyInit : true, - triggerAction : 'all', - hideTrigger : false, - typeAhead : false, - allowBlank : false, - anchor : '97%', - listeners : { - select : function(combo, record, index) { + id: 'id', + name: 'id', + hidden: true, + dataIndex: 'id' + }, { + id: 'cleaningMethodModel', + header: "灭菌程序", + width: 240, + dataIndex: 'sterilisation', + editor: new top.Ext.form.ComboBox({ + xtype: 'combo', + id: 'cleaningMethod', + name: 'cleaningMethod', + fieldLabel: '灭菌程序', + minChars: 0, + valueField: 'id', + displayField: 'cleaningMethod', + store: foldersJsonStore, + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + hideTrigger: false, + typeAhead: false, + allowBlank: false, + anchor: '97%', + listeners: { + select: function (combo, record, index) { var rows = top.Ext.getCmp('configGrid').getSelectionModel().getSelections();// 返回值为 Record 数组 var id = record.data.id; var totalCount = configStore.getCount(); - for(var i=0;i"; return str; }, - dataIndex:'button' + dataIndex: 'button' }]); var cm1 = new top.Ext.grid.ColumnModel([{ - id:'sterilisation_id', - name:'sterilisation_id', - dataIndex : 'sterilisation_id', - hidden:true - },{ - id:'frequency', - name:'frequency', - dataIndex : 'frequency', - header : "炉次", - editor : new top.Ext.form.NumberField({ - allowDecimals:false, - allowNegative:false, - maxValue:10000, - minValue:1 + id: 'sterilisation_id', + name: 'sterilisation_id', + dataIndex: 'sterilisation_id', + hidden: true + }, { + id: 'frequency', + name: 'frequency', + dataIndex: 'frequency', + header: "炉次", + editor: new top.Ext.form.NumberField({ + allowDecimals: false, + allowNegative: false, + maxValue: 10000, + minValue: 1 }) - },{ - id : 'sterilisation', - header : "灭菌程序", - width:240, - dataIndex : 'sterilisation', - editor : new top.Ext.form.ComboBox({ - xtype : 'combo', - id : 'sterilisation_name', - name : 'sterilisation_name', - fieldLabel : '灭菌程序', - minChars : 0, - valueField : 'id', - displayField : 'cleaningMethod', - store : foldersJsonStore1, - forceSelection : true, - lazyInit : true, - triggerAction : 'all', - hideTrigger : false, - typeAhead : false, - allowBlank : false, - anchor : '97%', - listeners : { - select : function(combo, record, index) { + }, { + id: 'sterilisation', + header: "灭菌程序", + width: 240, + dataIndex: 'sterilisation', + editor: new top.Ext.form.ComboBox({ + xtype: 'combo', + id: 'sterilisation_name', + name: 'sterilisation_name', + fieldLabel: '灭菌程序', + minChars: 0, + valueField: 'id', + displayField: 'cleaningMethod', + store: foldersJsonStore1, + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + hideTrigger: false, + typeAhead: false, + allowBlank: false, + anchor: '97%', + listeners: { + select: function (combo, record, index) { var rows = top.Ext.getCmp('configGrid1').getSelectionModel().getSelections();// 返回值为 Record 数组 var id = record.data.id; var totalCount = configStore1.getCount(); - for(var i=0;i"; return str; }, - dataIndex:'button' + dataIndex: 'button' }]); - + var consumableCm = new top.Ext.grid.ColumnModel([{ - id:'id', - name:'id', - hidden :true, - dataIndex : 'id' - },{ - id : 'consumable', - header : "耗材名称", - dataIndex : 'consumable', - width:240, - editor : new top.Ext.form.TextField({ - id : 'consumableName', - name : 'consumableName', - allowBlank : false, - anchor : '97%' + id: 'id', + name: 'id', + hidden: true, + dataIndex: 'id' + }, { + id: 'consumable', + header: "耗材名称", + dataIndex: 'consumable', + width: 240, + editor: new top.Ext.form.TextField({ + id: 'consumableName', + name: 'consumableName', + allowBlank: false, + anchor: '97%' }) - },{ - id : 'deleteItem', - header:'删除操作', - renderer: function(v,p,record){ + }, { + id: 'deleteItem', + header: '删除操作', + renderer: function (v, p, record) { var str = ""; return str; }, - dataIndex:'button' + dataIndex: 'button' }]); - + var testItemCm = new top.Ext.grid.ColumnModel([{ - id:'id', - name:'id', - hidden :true, - dataIndex : 'id' - },{ - id : 'testItem', - header : "检测项名称", - dataIndex : 'testItem', - width:240, - editor : new top.Ext.form.TextField({ - id : 'testTtemsName', - name : 'testTtemsName', - allowBlank : false, - anchor : '97%' + id: 'id', + name: 'id', + hidden: true, + dataIndex: 'id' + }, { + id: 'testItem', + header: "检测项名称", + dataIndex: 'testItem', + width: 240, + editor: new top.Ext.form.TextField({ + id: 'testTtemsName', + name: 'testTtemsName', + allowBlank: false, + anchor: '97%' }) - },{ - id : 'deleteItem', - header:'删除操作', - renderer: function(v,p,record){ + }, { + id: 'deleteItem', + header: '删除操作', + renderer: function (v, p, record) { var str = ""; return str; }, - dataIndex:'button' + dataIndex: 'button' }]); - + var sterilisationConfig = Ext.data.Record.create([{ - name : 'id', - name : 'sterilisation' + name: 'id', + name: 'sterilisation' }]); var consumablesConfig = Ext.data.Record.create([{ - name : 'id', - name : 'consumable' + name: 'id', + name: 'consumable' }]); - + var testItemsConfig = Ext.data.Record.create([{ - name : 'id', - name : 'testItem' + name: 'id', + name: 'testItem' }]); - - var isResetStore = new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] + + var isResetStore = new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] }); - + formObj = new top.Ext.FormPanel({ - id : 'sterilizerForm', - frame : true, - labelSeparator : ':', - bodyStyle : 'padding:5px 5px 0px 5px', - labelAlign:'right', - labelWidth : 100, - autoScroll : true, - height : top.screen.height > 800 ? 720 : 600, - items : [{ - xtype : 'hidden', - name : 'id', - id : 'id' - },{ - xtype : 'hidden', - name : 'supplierID', - id : 'supplierID' - },{ - xtype : 'hidden', - name : 'sterilisationID', - id : 'sterilisationID' - },{ - xtype : 'hidden', - name : 'deviceInterfaceId', - id : 'deviceInterfaceId' - },{ - xtype : 'hidden', - name : 'bioreaderId', - id : 'bioreaderId' - },{ - xtype : 'hidden', - name : 'orgUnitCoding', - id : 'orgUnitCoding' - },{ - xtype : 'hidden', - name : 'biologicalMonitoringDisplay', - id : 'biologicalMonitoringDisplay' - },{ - xtype : 'hidden', - name : 'monitorTousseDisplay', - id : 'monitorTousseDisplay' - },{ - xtype : 'hidden', - name : 'sterilizationFrequecyReminds', - id : 'sterilizationFrequecyReminds' - },{ - layout : 'column', - items : [{ - columnWidth : 0.6, - layout : 'column', - items : [{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items : [{ - xtype : 'textfield', - fieldLabel : "条码", - allowBlank : true, - name : "barcode", - id : "barcode", - readOnly:true, - cls : 'fieldReadOnlyNoRemove', - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items : [{ - xtype : 'textfield', - fieldLabel : "名称", - allowBlank : false, - blankText : '请输入名称!', - name : "name", - id : "name", - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items : [{ - xtype : 'combo', - fieldLabel : "所属科室", - valueField : 'orgUnitCoding', - displayField : 'orgUnitName', - store : departmentJsonStore, - forceSelection : true, - allowBlank : false, - triggerAction : 'all', - name : "department", - id : "department", - anchor : '95%', - listeners : { - select : function(combo, record, index) { - top.Ext.getCmp('orgUnitCoding').setValue((record.data.orgUnitCoding)); - } - } - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'combo', - fieldLabel : '隔天重置炉次', - allowBlank : false, - name : 'isEveryDayReset', - id : 'isEveryDayReset', - valueField : 'value', - displayField : 'value', - forceSelection : true, - store : isResetStore, - mode : 'local', - triggerAction : 'all', - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'combo', - fieldLabel : '校验灭菌时间', - allowBlank : false, - name : 'isCheckSterilizationTime', - id : 'isCheckSterilizationTime', - valueField : 'value', - displayField : 'value', - forceSelection : true, - store : isResetStore, - mode : 'local', - triggerAction : 'all', - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'combo', - fieldLabel : '自动完成灭菌', - allowBlank : true, - name : 'isAutoCompleteSterilization', - id : 'isAutoCompleteSterilization', - valueField : 'value', - displayField : 'value', - forceSelection : true, - store : isResetStore, - mode : 'local', - triggerAction : 'all', - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'combo', - fieldLabel : '是否定期监测', - allowBlank : true, - name : 'isRoutineMonitoring', - id : 'isRoutineMonitoring', - valueField : 'value', - displayField : 'value', - value : '否', - forceSelection : true, - store : isResetStore, - mode : 'local', - triggerAction : 'all', - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'dateextensiablefield', - width : 150, - fieldLabel : '购买日期', - id : 'purchaseDateStr', - name : 'purchaseDateStr', - format : 'Y-m-d', - readOnly : true, - minWidth : 177, - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'combo', - fieldLabel : '是否快速炉', - name : 'rapidFurnace', - id : 'rapidFurnace', - valueField : 'value', - displayField : 'value', - readOnly : true, - store : isResetStore, - mode : 'local', - value : '否', - triggerAction : 'all', - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'numberfield', - fieldLabel : "价格", - allowBlank : true, - allowNegative : false, - name : 'price', - id : 'price', - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'numberfield', - fieldLabel : "灭菌成本", - allowBlank : true, - allowNegative : false, - name : "cost", - id : "cost", - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'combo', - fieldLabel : '所属分组', - valueField : 'ownGroup', - displayField : 'ownGroup', - id : 'ownGroup', - name : 'ownGroup', - mode : 'local', - triggerAction : 'all', - forceSelection : true, - editable : true, - anchor : '95%', - store : new Ext.data.SimpleStore({ - fields : [ 'ownGroup' ], - autoLoad : false, - data :sterilerGroupList - }) - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'combo', - fieldLabel : '待灭菌提示', - valueField : 'value', - displayField : 'value', - id : 'waitSterilizedPrompt', - name : 'waitSterilizedPrompt', - mode : 'local', - triggerAction : 'all', - forceSelection : true, - editable : true, - anchor : '95%', - store : isResetStore - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - columnWidth : 0.5, - xtype : 'combo', - fieldLabel : '设备接口', - valueField : 'id', - displayField : 'name', - submitValue : false, - id : 'deviceInterfaceName', - name : 'deviceInterfaceName', - queryMode: 'remote', - triggerAction : 'all', - forceSelection : true, - editable : true, - anchor : '95%', - store : deviceInterfaceJsonStore, - listeners : { - select : function(combo, - record, index) { - top.Ext.getCmp('deviceInterfaceId') - .setValue(record.data.id); - } - } - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - hidden : !enableBioreaderInterface, - items:[{ - xtype : 'combo', - fieldLabel : '生物阅读器', - valueField : 'bioreaderId', - displayField : 'bioreaderName', - submitValue : false, - id : 'bioreaderName', - name : 'bioreaderName', - queryMode: 'remote', - triggerAction : 'all', - allowBlank : true, - forceSelection : true, - editable : true, - anchor : '95%', - store : bioreaderStore, - listeners : { - select : function(combo, - record, index) { - top.Ext.getCmp('bioreaderId') - .setValue(record.data.bioreaderId); - } - } - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'textfield', - fieldLabel : "机器号", - allowBlank : true, - name : 'machineNumber', - id : 'machineNumber', - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'combo', - fieldLabel : "供应商", - valueField : 'companyID', - displayField : 'companyName', - store : foldersCompanyJsonStore, - forceSelection : true, - triggerAction : 'all', - name : "supplierName", - id : "supplierName", - anchor : '95%', - listeners : { - select : function(combo, - record, index) { - top.Ext.getCmp('supplierID') - .setValue(record.data.companyID); - } - } - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'textfield', - fieldLabel : "联系人", - allowBlank : true, - name : 'contact', - id : 'contact', - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'textfield', - fieldLabel : "联系电话", - allowBlank : true, - regex: /^[0-9]{1}([0-9]|[-]){1,19}$/, - name : "phone", - id : "phone", - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'textfield', - fieldLabel : "电子邮件", - allowBlank : true, - name : "email", - id : "email", - anchor : '95%' - }] - },{ - columnWidth : 0.5, - layout : 'form', - labelWidth : 100, - items:[{ - xtype : 'combo', - fieldLabel : '定时完成灭菌', - allowBlank : true, - name : 'timingCompleteSterilization', - id : 'timingCompleteSterilization', - valueField : 'value', - displayField : 'value', - forceSelection : true, - store : isResetStore, - mode : 'local', - triggerAction : 'all', - anchor : '95%' - }] - },{ - layout:'form', - labelWidth : 100, - columnWidth: 0.5, - height:38, - items:[{ - xtype : 'numberfield', - allowNegative : false, //不允许负数 - allowDecimals : false, - fieldLabel : '生物监测持续时间(分钟)', - id : 'biologicalMonitoringTime', - name : 'biologicalMonitoringTime', - anchor : '95%' - }] - },{ - layout:'form', - labelWidth : 100, - columnWidth: 0.5, - height:38, - items:[{ - xtype : 'numberfield', - allowNegative : false, //不允许负数 - allowDecimals : false, - fieldLabel : '灭菌与生物监测间隔时间(分钟)', - id : 'lagTime', - name : 'lagTime', - anchor : '95%' - }] - },{ - layout:'form', - labelWidth : 100, - columnWidth: 0.5, - height:38, - items:[{ - xtype : 'numberfield', - allowNegative : false, //不允许负数 - allowDecimals : false, - fieldLabel : '序号', - id : 'sequence', - name : 'sequence', - anchor : '95%' - }] - },{ - layout:'form', - labelWidth : 100, - columnWidth: 0.5, - height:38, - items:[{ - xtype : 'combo', - fieldLabel : '是否允许手动选择生物监测结果', - allowBlank : true, - name : 'allowSelectBiologicalResult', - id : 'allowSelectBiologicalResult', - valueField : 'value', - displayField : 'value', - forceSelection : true, - store : isResetStore, - mode : 'local', - triggerAction : 'all', - anchor : '95%' - }] - },{ - layout:'form', - labelWidth : 100, - columnWidth: 0.5, - height:38, - hidden:!sstsConfig.enableSterilizerBioMonitoringIntervalReminder, - items:[{ - xtype : 'numberfield', - allowNegative : false, //不允许负数 - allowDecimals : false, - fieldLabel : '生物监测间隔时间(天)', - id : 'bioMonitoringInterval', - name : 'bioMonitoringInterval', - anchor : '95%' - }] - },{ - layout:'form', - labelWidth : 100, - columnWidth: 0.5, - height:38, - hidden:!sstsConfig.enablePromptUploadDeviceParameterPicture, - items:[{ - columnWidth : 0.5, - xtype : 'combo', - fieldLabel : "提示上传设备物理参数图片", - store : new Ext.data.SimpleStore({ - fields : ['value'], - data : [['是'],['否']] - }), - valueField : 'value', - displayField : 'value', - mode : 'local', - value:'否', - forceSelection : true, - allowBlank : true, - triggerAction : 'all', - name : "promptUploadDevParamPic", - id : "promptUploadDevParamPic", - anchor : '95%' - }] - },{ - layout:'form', - labelWidth : 100, - columnWidth: 0.5, - height:38, - items:[{ - columnWidth : 0.5, - xtype : 'combo', - fieldLabel : '使用状态', - name : 'useStatus', - id : 'useStatus', - valueField : 'value', - displayField : 'value', - forceSelection : true, - editable : false, - store : new Ext.data.SimpleStore({ - fields : ['value'], - data : [['未启用'],['在用'],['停用'],['报废']] - }), - value:'在用', - mode : 'local', - triggerAction : 'all', - anchor : '95%' - }] - }] - }, { - columnWidth : 0.4, - layout : 'form', - labelWidth : 70, - items : [new top.Ext.grid.EditorGridPanel({ - id : 'configGrid', - store : configStore, - cm : cm, - width : 350, - height: 200, - frame : false, - viewConfig: { - forceFit:true - }, - bodyStyle : 'border:1px solid #afd7af;margin-bottom:10px', - autoExpandColumn : 'cleaningMethodModel', - anchor : '95%', - clicksToEdit : 1,//设置点击几次才可编辑 - selModel : new top.Ext.grid.RowSelectionModel({ - singleSelect : false - }), - tbar : [{ - text : '添加灭菌程序', - iconCls : 'btn_ext_add', - handler : function() { - var n = top.Ext.getCmp('configGrid').getStore().getCount();// 获得总行数 - var p = new sterilisationConfig({ - id : -1, - sterilisation : '' - }); - top.Ext.getCmp('configGrid').stopEditing();// 停止编辑 - configStore.add(p);// 插入到最后一行 - top.Ext.getCmp('configGrid').startEditing(n, 0);// 开始编辑0单元格 - } - }] - }),new top.Ext.grid.EditorGridPanel({ - id : 'configGrid1', - store : configStore1, - cm : cm1, - width : 350, - height:140, - frame : false, - viewConfig: { - forceFit:true - }, - bodyStyle : 'border:1px solid #afd7af;margin-bottom:10px', - autoExpandColumn : 'cleaningMethodModel', - anchor : '95%', - clicksToEdit : 1,//设置点击几次才可编辑 - selModel : new top.Ext.grid.RowSelectionModel({ - singleSelect : false - }), - tbar : [{ - text : '按炉次提醒的灭菌程序', - iconCls : 'btn_ext_add', - handler : function() { - var n = top.Ext.getCmp('configGrid1').getStore().getCount();// 获得总行数 - var p = new sterilisationConfig({ - frequency : '', - sterilisation : '', - sterilisation_id:'', - remindMode:'非强制提醒' - }); - if(n >= 3){ - showResult('最多允许添加三个炉次提醒的灭菌程序!'); - return; - } - top.Ext.getCmp('configGrid1').stopEditing();// 停止编辑 - configStore1.add(p);// 插入到最后一行 - top.Ext.getCmp('configGrid1').startEditing(n, 0);// 开始编辑0单元格 - } - }] - })] - },{ - columnWidth: 0.5, - layout : 'column', - xtype:'fieldset', - title:'生物监测的结果默认值', - height:38, - autoHeight:true, - items:[{ - layout : 'form', - columnWidth : .5, - labelWidth : 170, - items : [{ - id : 'qualified', - name : 'qualified', - fieldLabel : BIOLOGICALMONITORINGDISPLAY_QUALIFIED, - xtype : 'checkbox', - inputValue : BIOLOGICALMONITORINGDISPLAY_QUALIFIED, - listeners:{ - check:function( thiz, checked ){ - if (checked) { - top.Ext.getCmp('firstQualified').setValue(false); - top.Ext.getCmp('firstQualified').disable(); - top.Ext.getCmp('implantQualified').setValue(false); - top.Ext.getCmp('implantQualified').disable(); - top.Ext.getCmp('foreignTousseQualified').setValue(false); - top.Ext.getCmp('foreignTousseQualified').disable(); - } else { - top.Ext.getCmp('firstQualified').enable(); - top.Ext.getCmp('implantQualified').enable(); - top.Ext.getCmp('foreignTousseQualified').enable(); - } - } - } - }] - },{ - layout : 'form', - labelWidth : 170, - columnWidth : .5, - items : [{ - id : 'firstQualified', - name : 'firstQualified', - fieldLabel : BIOLOGICALMONITORINGDISPLAY_FIRSTQUALIFIED, - xtype : 'checkbox', - inputValue : BIOLOGICALMONITORINGDISPLAY_FIRSTQUALIFIED - }] - },{ - layout : 'form', - columnWidth : .5, - labelWidth : 170, - items : [{ - id : 'implantQualified', - name : 'implantQualified', - fieldLabel : BIOLOGICALMONITORINGDISPLAY_IMPLANT_QUALIFIED, - xtype : 'checkbox', - inputValue : BIOLOGICALMONITORINGDISPLAY_IMPLANT_QUALIFIED, - listeners:{ - check:function( thiz, checked ){ - if (checked) { - top.Ext.getCmp('qualified').setValue(false); - top.Ext.getCmp('qualified').disable(); - } else if (!top.Ext.getCmp('foreignTousseQualified').getValue()) { - top.Ext.getCmp('qualified').enable(); - } - } - } - }] - },{ - layout : 'form', - columnWidth : .5, - labelWidth : 170, - items : [{ - id : 'foreignTousseQualified', - name : 'foreignTousseQualified', - fieldLabel : BIOLOGICALMONITORINGDISPLAY_FOREIGN_TOUSSE_QUALIFIED, - xtype : 'checkbox', - inputValue : BIOLOGICALMONITORINGDISPLAY_FOREIGN_TOUSSE_QUALIFIED, - listeners:{ - check:function( thiz, checked ){ - if (checked) { - top.Ext.getCmp('qualified').setValue(false); - top.Ext.getCmp('qualified').disable(); - } else if (!top.Ext.getCmp('implantQualified').getValue()) { - top.Ext.getCmp('qualified').enable(); - } - } - } - }] - }] - },{ - columnWidth: 0.5, - layout : 'column', - xtype:'fieldset', - title:'监测包扫描提示默认值', - height:38, - autoHeight:true, - bodyStyle : 'margin:10px 0 !important', - hidden : (sstsConfig.enableScanSterilizationMonitoringPackage)?false:true, - items:[{ - layout:'column', - columnWidth: 0.45, - items:[{ - layout : 'form', - labelWidth:70, - labelAlign:'right', - items : [{ - xtype : 'textfield', - disable:true, - fieldLabel:MONITORTOUSSEDISPLAY_FIRST, - labelSeparator:'', - cls : 'fieldReadOnlyNoRemove', - width:0 - }] - },{ - layout : 'form', - labelWidth:30, - items : [{ - id : 'biological_1_1', - name : 'biological_1_1', - fieldLabel : '化学', - xtype : 'checkbox', - inputValue : '化学', - labelSeparator:'' - }] - },{ - layout : 'form', - labelWidth:30, - items : [{ - id : 'biological_1_2', - name : 'biological_1_2', - fieldLabel : '生物', - xtype : 'checkbox', - inputValue : '生物', - labelSeparator:'' - }] - }] - },{ - layout:'column', - columnWidth: 0.55, - items:[{ - layout : 'form', - labelWidth:100, - items : [{ - xtype : 'textfield', - disable:true, - fieldLabel:MONITORTOUSSEDISPLAY_EVERYTHING, - labelSeparator:'', - cls : 'fieldReadOnlyNoRemove', - width:0 - }] - },{ - layout : 'form', - labelWidth:30, - items : [{ - id : 'biological_2_1', - name : 'biological_2_1', - fieldLabel : '化学', - xtype : 'checkbox', - inputValue : '化学', - labelSeparator:'' - }] - },{ - layout : 'form', - labelWidth:30, - items : [{ - id : 'biological_2_2', - name : 'biological_2_2', - fieldLabel : '生物', - xtype : 'checkbox', - inputValue : '生物', - labelSeparator:'' - }] - }] - },{ - layout:'column', - columnWidth: 0.45, - items:[{ - layout : 'form', - labelWidth:70, - items : [{ - xtype : 'textfield', - disable:true, - fieldLabel:MONITORTOUSSEDISPLAY_IMPLANT, - labelSeparator:'', - cls : 'fieldReadOnlyNoRemove', - width:0 - }] - },{ - layout : 'form', - labelWidth:30, - items : [{ - id : 'biological_3_1', - name : 'biological_3_1', - fieldLabel : '化学', - xtype : 'checkbox', - inputValue : '化学', - labelSeparator:'' - }] - },{ - layout : 'form', - labelWidth:30, - items : [{ - id : 'biological_3_2', - name : 'biological_3_2', - fieldLabel : '生物', - xtype : 'checkbox', - inputValue : '生物', - labelSeparator:'' - }] - }] - },{ - layout:'column', - columnWidth: 0.55, - items:[{ - layout : 'form', - labelWidth:100, - items : [{ - xtype : 'textfield', - disable:true, - fieldLabel:MONITORTOUSSEDISPLAY_FOREIGN_TOUSSE, - labelSeparator:'', - cls : 'fieldReadOnlyNoRemove', - width:0 - }] - },{ - layout : 'form', - labelWidth:30, - items : [{ - id : 'biological_4_1', - name : 'biological_4_1', - fieldLabel : '化学', - xtype : 'checkbox', - inputValue : '化学', - labelSeparator:'' - }] - },{ - layout : 'form', - labelWidth:30, - items : [{ - id : 'biological_4_2', - name : 'biological_4_2', - fieldLabel : '生物', - xtype : 'checkbox', - inputValue : '生物', - labelSeparator:'' - }] - }] - }] - }, { - columnWidth : 0.6, - layout : 'form', - labelWidth : 70, - items : [new top.Ext.grid.EditorGridPanel({ - id : 'configGrid2', - store : consumableStore, - cm : consumableCm, - width : 200, - height: 215, - frame : false, - viewConfig: { - forceFit:true - }, - bodyStyle : 'border:1px solid #afd7af;', - autoExpandColumn : 'cleaningMethodModel', - anchor : '95%', - clicksToEdit : 1,//设置点击几次才可编辑 - selModel : new top.Ext.grid.RowSelectionModel({ - singleSelect : false - }), - tbar : [{ - text : '添加耗材', - iconCls : 'btn_ext_add', - handler : function() { - var n = top.Ext.getCmp('configGrid2').getStore().getCount();// 获得总行数 - var p = new consumablesConfig({ - id : -1, - consumable : '' - }); - top.Ext.getCmp('configGrid2').stopEditing();// 停止编辑 - consumableStore.add(p);// 插入到最后一行 - top.Ext.getCmp('configGrid2').startEditing(n, 0);// 开始编辑0单元格 - } - }] - })] - }, { - columnWidth : 0.4, - layout : 'form', - labelWidth : 70, - items : [new top.Ext.grid.EditorGridPanel({ - id : 'configGrid3', - store : testItemStore, - cm : testItemCm, - width : 200, - height: 215, - frame : false, - viewConfig: { - forceFit:true - }, - bodyStyle : 'border:1px solid #afd7af;', - autoExpandColumn : 'cleaningMethodModel', - anchor : '95%', - clicksToEdit : 1,//设置点击几次才可编辑 - selModel : new top.Ext.grid.RowSelectionModel({ - singleSelect : false - }), - tbar : [{ - text : '添加检测项', - iconCls : 'btn_ext_add', - handler : function() { - var n = top.Ext.getCmp('configGrid3').getStore().getCount();// 获得总行数 - var p = new testItemsConfig({ - id : -1, - testItem : '' - }); - top.Ext.getCmp('configGrid3').stopEditing();// 停止编辑 - testItemStore.add(p);// 插入到最后一行 - top.Ext.getCmp('configGrid3').startEditing(n, 0);// 开始编辑0单元格 - } - }] - })] - }] - } ], - buttons : [ { - id : 'preview', - hidden : SSTS_SterilizerBarcode_Print, - text : '打印预览', - handler : printBarcode + id: 'sterilizerForm', + frame: true, + labelSeparator: ':', + bodyStyle: 'padding:5px 5px 0px 5px', + labelAlign: 'right', + labelWidth: 100, + autoScroll: true, + height: top.screen.height > 800 ? 720 : 600, + items: [{ + xtype: 'hidden', + name: 'id', + id: 'id' + }, { + xtype: 'hidden', + name: 'supplierID', + id: 'supplierID' + }, { + xtype: 'hidden', + name: 'sterilisationID', + id: 'sterilisationID' + }, { + xtype: 'hidden', + name: 'deviceInterfaceId', + id: 'deviceInterfaceId' + }, { + xtype: 'hidden', + name: 'bioreaderId', + id: 'bioreaderId' + }, { + xtype: 'hidden', + name: 'orgUnitCoding', + id: 'orgUnitCoding' + }, { + xtype: 'hidden', + name: 'biologicalMonitoringDisplay', + id: 'biologicalMonitoringDisplay' + }, { + xtype: 'hidden', + name: 'monitorTousseDisplay', + id: 'monitorTousseDisplay' + }, { + xtype: 'hidden', + name: 'sterilizationFrequecyReminds', + id: 'sterilizationFrequecyReminds' + }, { + layout: 'column', + items: [{ + columnWidth: 0.6, + layout: 'column', + items: [{ + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'textfield', + fieldLabel: "条码", + allowBlank: true, + name: "barcode", + id: "barcode", + readOnly: true, + cls: 'fieldReadOnlyNoRemove', + anchor: '95%' + }] }, { - id : 'saveAndPrint', - hidden : SSTS_SterilizerBarcode_Print, - text : '保存并打印', - handler : saveAndPrint + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'textfield', + fieldLabel: "名称", + allowBlank: false, + blankText: '请输入名称!', + name: "name", + id: "name", + anchor: '95%' + }] }, { - id : 'saveBtn', - text : '保存', - handler : save + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'combo', + fieldLabel: "所属科室", + valueField: 'orgUnitCoding', + displayField: 'orgUnitName', + store: departmentJsonStore, + forceSelection: true, + allowBlank: false, + triggerAction: 'all', + name: "department", + id: "department", + anchor: '95%', + listeners: { + select: function (combo, record, index) { + top.Ext.getCmp('orgUnitCoding').setValue((record.data.orgUnitCoding)); + } + } + }] }, { - text : '取消', - id : 'saveAndNewBtn', - handler : cancel - } ] - }); - - sterilizerWin = new top.Ext.Window( { - id : 'sterilizerWin', - layout : 'fit', - title : '灭菌炉信息', - width : 900, - border : false, - modal : true, - plain : true, - items : [ formObj ] + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'combo', + fieldLabel: '隔天重置炉次', + allowBlank: false, + name: 'isEveryDayReset', + id: 'isEveryDayReset', + valueField: 'value', + displayField: 'value', + forceSelection: true, + store: isResetStore, + mode: 'local', + triggerAction: 'all', + anchor: '95%' + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'combo', + fieldLabel: '校验灭菌时间', + allowBlank: false, + name: 'isCheckSterilizationTime', + id: 'isCheckSterilizationTime', + valueField: 'value', + displayField: 'value', + forceSelection: true, + store: isResetStore, + mode: 'local', + triggerAction: 'all', + anchor: '95%' + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'combo', + fieldLabel: '自动完成灭菌', + allowBlank: true, + name: 'isAutoCompleteSterilization', + id: 'isAutoCompleteSterilization', + valueField: 'value', + displayField: 'value', + forceSelection: true, + store: isResetStore, + mode: 'local', + triggerAction: 'all', + anchor: '95%' + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'combo', + fieldLabel: '是否定期监测', + allowBlank: true, + name: 'isRoutineMonitoring', + id: 'isRoutineMonitoring', + valueField: 'value', + displayField: 'value', + value: '否', + forceSelection: true, + store: isResetStore, + mode: 'local', + triggerAction: 'all', + anchor: '95%' + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'dateextensiablefield', + width: 150, + fieldLabel: '购买日期', + id: 'purchaseDateStr', + name: 'purchaseDateStr', + format: 'Y-m-d', + readOnly: true, + minWidth: 177, + anchor: '95%' + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'combo', + fieldLabel: '是否快速炉', + name: 'rapidFurnace', + id: 'rapidFurnace', + valueField: 'value', + displayField: 'value', + readOnly: true, + store: isResetStore, + mode: 'local', + value: '否', + triggerAction: 'all', + anchor: '95%' + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'numberfield', + fieldLabel: "价格", + allowBlank: true, + allowNegative: false, + name: 'price', + id: 'price', + anchor: '95%' + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'numberfield', + fieldLabel: "灭菌成本", + allowBlank: true, + allowNegative: false, + name: "cost", + id: "cost", + anchor: '95%' + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'combo', + fieldLabel: '所属分组', + valueField: 'ownGroup', + displayField: 'ownGroup', + id: 'ownGroup', + name: 'ownGroup', + mode: 'local', + triggerAction: 'all', + forceSelection: true, + editable: true, + anchor: '95%', + store: new Ext.data.SimpleStore({ + fields: ['ownGroup'], + autoLoad: false, + data: sterilerGroupList + }) + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'combo', + fieldLabel: '待灭菌提示', + valueField: 'value', + displayField: 'value', + id: 'waitSterilizedPrompt', + name: 'waitSterilizedPrompt', + mode: 'local', + triggerAction: 'all', + forceSelection: true, + editable: true, + anchor: '95%', + store: isResetStore + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + columnWidth: 0.5, + xtype: 'combo', + fieldLabel: '设备接口', + valueField: 'id', + displayField: 'name', + submitValue: false, + id: 'deviceInterfaceName', + name: 'deviceInterfaceName', + queryMode: 'remote', + triggerAction: 'all', + forceSelection: true, + editable: true, + anchor: '95%', + store: deviceInterfaceJsonStore, + listeners: { + select: function (combo, + record, index) { + top.Ext.getCmp('deviceInterfaceId') + .setValue(record.data.id); + } + } + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + hidden: !enableBioreaderInterface, + items: [{ + xtype: 'combo', + fieldLabel: '生物阅读器', + valueField: 'bioreaderId', + displayField: 'bioreaderName', + submitValue: false, + id: 'bioreaderName', + name: 'bioreaderName', + queryMode: 'remote', + triggerAction: 'all', + allowBlank: true, + forceSelection: true, + editable: true, + anchor: '95%', + store: bioreaderStore, + listeners: { + select: function (combo, + record, index) { + top.Ext.getCmp('bioreaderId') + .setValue(record.data.bioreaderId); + } + } + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'textfield', + fieldLabel: "机器号", + allowBlank: true, + name: 'machineNumber', + id: 'machineNumber', + anchor: '95%' + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'combo', + fieldLabel: "供应商", + valueField: 'companyID', + displayField: 'companyName', + store: foldersCompanyJsonStore, + forceSelection: true, + triggerAction: 'all', + name: "supplierName", + id: "supplierName", + anchor: '95%', + listeners: { + select: function (combo, + record, index) { + top.Ext.getCmp('supplierID') + .setValue(record.data.companyID); + } + } + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'textfield', + fieldLabel: "联系人", + allowBlank: true, + name: 'contact', + id: 'contact', + anchor: '95%' + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'textfield', + fieldLabel: "联系电话", + allowBlank: true, + regex: /^[0-9]{1}([0-9]|[-]){1,19}$/, + name: "phone", + id: "phone", + anchor: '95%' + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'textfield', + fieldLabel: "电子邮件", + allowBlank: true, + name: "email", + id: "email", + anchor: '95%' + }] + }, { + columnWidth: 0.5, + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'combo', + fieldLabel: '定时完成灭菌', + allowBlank: true, + name: 'timingCompleteSterilization', + id: 'timingCompleteSterilization', + valueField: 'value', + displayField: 'value', + forceSelection: true, + store: isResetStore, + mode: 'local', + triggerAction: 'all', + anchor: '95%' + }] + }, { + layout: 'form', + labelWidth: 100, + columnWidth: 0.5, + height: 38, + items: [{ + xtype: 'numberfield', + allowNegative: false, //不允许负数 + allowDecimals: false, + fieldLabel: '生物监测持续时间(分钟)', + id: 'biologicalMonitoringTime', + name: 'biologicalMonitoringTime', + anchor: '95%' + }] + }, { + layout: 'form', + labelWidth: 100, + columnWidth: 0.5, + height: 38, + items: [{ + xtype: 'numberfield', + allowNegative: false, //不允许负数 + allowDecimals: false, + fieldLabel: '灭菌与生物监测间隔时间(分钟)', + id: 'lagTime', + name: 'lagTime', + anchor: '95%' + }] + }, { + layout: 'form', + labelWidth: 100, + columnWidth: 0.5, + height: 38, + items: [{ + xtype: 'numberfield', + allowNegative: false, //不允许负数 + allowDecimals: false, + fieldLabel: '序号', + id: 'sequence', + name: 'sequence', + anchor: '95%' + }] + }, { + layout: 'form', + labelWidth: 100, + columnWidth: 0.5, + height: 38, + items: [{ + xtype: 'combo', + fieldLabel: '是否允许手动选择生物监测结果', + allowBlank: true, + name: 'allowSelectBiologicalResult', + id: 'allowSelectBiologicalResult', + valueField: 'value', + displayField: 'value', + forceSelection: true, + store: isResetStore, + mode: 'local', + triggerAction: 'all', + anchor: '95%' + }] + }, { + layout: 'form', + labelWidth: 100, + columnWidth: 0.5, + height: 38, + hidden: !sstsConfig.enableSterilizerBioMonitoringIntervalReminder, + items: [{ + xtype: 'numberfield', + allowNegative: false, //不允许负数 + allowDecimals: false, + fieldLabel: '生物监测间隔时间(天)', + id: 'bioMonitoringInterval', + name: 'bioMonitoringInterval', + anchor: '95%' + }] + }, { + layout: 'form', + labelWidth: 100, + columnWidth: 0.5, + height: 38, + hidden: !sstsConfig.enablePromptUploadDeviceParameterPicture, + items: [{ + columnWidth: 0.5, + xtype: 'combo', + fieldLabel: "提示上传设备物理参数图片", + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + valueField: 'value', + displayField: 'value', + mode: 'local', + value: '否', + forceSelection: true, + allowBlank: true, + triggerAction: 'all', + name: "promptUploadDevParamPic", + id: "promptUploadDevParamPic", + anchor: '95%' + }] + }, { + layout: 'form', + labelWidth: 100, + columnWidth: 0.5, + height: 38, + items: [{ + columnWidth: 0.5, + xtype: 'combo', + fieldLabel: '使用状态', + name: 'useStatus', + id: 'useStatus', + valueField: 'value', + displayField: 'value', + forceSelection: true, + editable: false, + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['未启用'], ['在用'], ['停用'], ['报废']] + }), + value: '在用', + mode: 'local', + triggerAction: 'all', + anchor: '95%' + }] + }] + }, { + columnWidth: 0.4, + layout: 'form', + labelWidth: 70, + items: [new top.Ext.grid.EditorGridPanel({ + id: 'configGrid', + store: configStore, + cm: cm, + width: 350, + height: 200, + frame: false, + viewConfig: { + forceFit: true + }, + bodyStyle: 'border:1px solid #afd7af;margin-bottom:10px', + autoExpandColumn: 'cleaningMethodModel', + anchor: '95%', + clicksToEdit: 1,//设置点击几次才可编辑 + selModel: new top.Ext.grid.RowSelectionModel({ + singleSelect: false + }), + tbar: [{ + text: '添加灭菌程序', + iconCls: 'btn_ext_add', + handler: function () { + var n = top.Ext.getCmp('configGrid').getStore().getCount();// 获得总行数 + var p = new sterilisationConfig({ + id: -1, + sterilisation: '' + }); + top.Ext.getCmp('configGrid').stopEditing();// 停止编辑 + configStore.add(p);// 插入到最后一行 + top.Ext.getCmp('configGrid').startEditing(n, 0);// 开始编辑0单元格 + } + }] + }), new top.Ext.grid.EditorGridPanel({ + id: 'configGrid1', + store: configStore1, + cm: cm1, + width: 350, + height: 140, + frame: false, + viewConfig: { + forceFit: true + }, + bodyStyle: 'border:1px solid #afd7af;margin-bottom:10px', + autoExpandColumn: 'cleaningMethodModel', + anchor: '95%', + clicksToEdit: 1,//设置点击几次才可编辑 + selModel: new top.Ext.grid.RowSelectionModel({ + singleSelect: false + }), + tbar: [{ + text: '按炉次提醒的灭菌程序', + iconCls: 'btn_ext_add', + handler: function () { + var n = top.Ext.getCmp('configGrid1').getStore().getCount();// 获得总行数 + var p = new sterilisationConfig({ + frequency: '', + sterilisation: '', + sterilisation_id: '', + remindMode: '非强制提醒' + }); + if (n >= 3) { + showResult('最多允许添加三个炉次提醒的灭菌程序!'); + return; + } + top.Ext.getCmp('configGrid1').stopEditing();// 停止编辑 + configStore1.add(p);// 插入到最后一行 + top.Ext.getCmp('configGrid1').startEditing(n, 0);// 开始编辑0单元格 + } + }] + })] + }, { + columnWidth: 0.5, + layout: 'column', + xtype: 'fieldset', + title: '生物监测的结果默认值', + height: 38, + autoHeight: true, + items: [{ + layout: 'form', + columnWidth: .5, + labelWidth: 170, + items: [{ + id: 'qualified', + name: 'qualified', + fieldLabel: BIOLOGICALMONITORINGDISPLAY_QUALIFIED, + xtype: 'checkbox', + inputValue: BIOLOGICALMONITORINGDISPLAY_QUALIFIED, + listeners: { + check: function (thiz, checked) { + if (checked) { + top.Ext.getCmp('firstQualified').setValue(false); + top.Ext.getCmp('firstQualified').disable(); + top.Ext.getCmp('implantQualified').setValue(false); + top.Ext.getCmp('implantQualified').disable(); + top.Ext.getCmp('foreignTousseQualified').setValue(false); + top.Ext.getCmp('foreignTousseQualified').disable(); + } else { + top.Ext.getCmp('firstQualified').enable(); + top.Ext.getCmp('implantQualified').enable(); + top.Ext.getCmp('foreignTousseQualified').enable(); + } + } + } + }] + }, { + layout: 'form', + labelWidth: 170, + columnWidth: .5, + items: [{ + id: 'firstQualified', + name: 'firstQualified', + fieldLabel: BIOLOGICALMONITORINGDISPLAY_FIRSTQUALIFIED, + xtype: 'checkbox', + inputValue: BIOLOGICALMONITORINGDISPLAY_FIRSTQUALIFIED + }] + }, { + layout: 'form', + columnWidth: .5, + labelWidth: 170, + items: [{ + id: 'implantQualified', + name: 'implantQualified', + fieldLabel: BIOLOGICALMONITORINGDISPLAY_IMPLANT_QUALIFIED, + xtype: 'checkbox', + inputValue: BIOLOGICALMONITORINGDISPLAY_IMPLANT_QUALIFIED, + listeners: { + check: function (thiz, checked) { + if (checked) { + top.Ext.getCmp('qualified').setValue(false); + top.Ext.getCmp('qualified').disable(); + } else if (!top.Ext.getCmp('foreignTousseQualified').getValue()) { + top.Ext.getCmp('qualified').enable(); + } + } + } + }] + }, { + layout: 'form', + columnWidth: .5, + labelWidth: 170, + items: [{ + id: 'foreignTousseQualified', + name: 'foreignTousseQualified', + fieldLabel: BIOLOGICALMONITORINGDISPLAY_FOREIGN_TOUSSE_QUALIFIED, + xtype: 'checkbox', + inputValue: BIOLOGICALMONITORINGDISPLAY_FOREIGN_TOUSSE_QUALIFIED, + listeners: { + check: function (thiz, checked) { + if (checked) { + top.Ext.getCmp('qualified').setValue(false); + top.Ext.getCmp('qualified').disable(); + } else if (!top.Ext.getCmp('implantQualified').getValue()) { + top.Ext.getCmp('qualified').enable(); + } + } + } + }] + }] + }, { + columnWidth: 0.5, + layout: 'column', + xtype: 'fieldset', + title: '监测包扫描提示默认值', + height: 38, + autoHeight: true, + bodyStyle: 'margin:10px 0 !important', + hidden: (sstsConfig.enableScanSterilizationMonitoringPackage) ? false : true, + items: [{ + layout: 'column', + columnWidth: 0.45, + items: [{ + layout: 'form', + labelWidth: 70, + labelAlign: 'right', + items: [{ + xtype: 'textfield', + disable: true, + fieldLabel: MONITORTOUSSEDISPLAY_FIRST, + labelSeparator: '', + cls: 'fieldReadOnlyNoRemove', + width: 0 + }] + }, { + layout: 'form', + labelWidth: 30, + items: [{ + id: 'biological_1_1', + name: 'biological_1_1', + fieldLabel: '化学', + xtype: 'checkbox', + inputValue: '化学', + labelSeparator: '' + }] + }, { + layout: 'form', + labelWidth: 30, + items: [{ + id: 'biological_1_2', + name: 'biological_1_2', + fieldLabel: '生物', + xtype: 'checkbox', + inputValue: '生物', + labelSeparator: '' + }] + }] + }, { + layout: 'column', + columnWidth: 0.55, + items: [{ + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'textfield', + disable: true, + fieldLabel: MONITORTOUSSEDISPLAY_EVERYTHING, + labelSeparator: '', + cls: 'fieldReadOnlyNoRemove', + width: 0 + }] + }, { + layout: 'form', + labelWidth: 30, + items: [{ + id: 'biological_2_1', + name: 'biological_2_1', + fieldLabel: '化学', + xtype: 'checkbox', + inputValue: '化学', + labelSeparator: '' + }] + }, { + layout: 'form', + labelWidth: 30, + items: [{ + id: 'biological_2_2', + name: 'biological_2_2', + fieldLabel: '生物', + xtype: 'checkbox', + inputValue: '生物', + labelSeparator: '' + }] + }] + }, { + layout: 'column', + columnWidth: 0.45, + items: [{ + layout: 'form', + labelWidth: 70, + items: [{ + xtype: 'textfield', + disable: true, + fieldLabel: MONITORTOUSSEDISPLAY_IMPLANT, + labelSeparator: '', + cls: 'fieldReadOnlyNoRemove', + width: 0 + }] + }, { + layout: 'form', + labelWidth: 30, + items: [{ + id: 'biological_3_1', + name: 'biological_3_1', + fieldLabel: '化学', + xtype: 'checkbox', + inputValue: '化学', + labelSeparator: '' + }] + }, { + layout: 'form', + labelWidth: 30, + items: [{ + id: 'biological_3_2', + name: 'biological_3_2', + fieldLabel: '生物', + xtype: 'checkbox', + inputValue: '生物', + labelSeparator: '' + }] + }] + }, { + layout: 'column', + columnWidth: 0.55, + items: [{ + layout: 'form', + labelWidth: 100, + items: [{ + xtype: 'textfield', + disable: true, + fieldLabel: MONITORTOUSSEDISPLAY_FOREIGN_TOUSSE, + labelSeparator: '', + cls: 'fieldReadOnlyNoRemove', + width: 0 + }] + }, { + layout: 'form', + labelWidth: 30, + items: [{ + id: 'biological_4_1', + name: 'biological_4_1', + fieldLabel: '化学', + xtype: 'checkbox', + inputValue: '化学', + labelSeparator: '' + }] + }, { + layout: 'form', + labelWidth: 30, + items: [{ + id: 'biological_4_2', + name: 'biological_4_2', + fieldLabel: '生物', + xtype: 'checkbox', + inputValue: '生物', + labelSeparator: '' + }] + }] + }] + }, { + columnWidth: 0.6, + layout: 'form', + labelWidth: 70, + items: [new top.Ext.grid.EditorGridPanel({ + id: 'configGrid2', + store: consumableStore, + cm: consumableCm, + width: 200, + height: 215, + frame: false, + viewConfig: { + forceFit: true + }, + bodyStyle: 'border:1px solid #afd7af;', + autoExpandColumn: 'cleaningMethodModel', + anchor: '95%', + clicksToEdit: 1,//设置点击几次才可编辑 + selModel: new top.Ext.grid.RowSelectionModel({ + singleSelect: false + }), + tbar: [{ + text: '添加耗材', + iconCls: 'btn_ext_add', + handler: function () { + var n = top.Ext.getCmp('configGrid2').getStore().getCount();// 获得总行数 + var p = new consumablesConfig({ + id: -1, + consumable: '' + }); + top.Ext.getCmp('configGrid2').stopEditing();// 停止编辑 + consumableStore.add(p);// 插入到最后一行 + top.Ext.getCmp('configGrid2').startEditing(n, 0);// 开始编辑0单元格 + } + }] + })] + }, { + columnWidth: 0.4, + layout: 'form', + labelWidth: 70, + items: [new top.Ext.grid.EditorGridPanel({ + id: 'configGrid3', + store: testItemStore, + cm: testItemCm, + width: 200, + height: 215, + frame: false, + viewConfig: { + forceFit: true + }, + bodyStyle: 'border:1px solid #afd7af;', + autoExpandColumn: 'cleaningMethodModel', + anchor: '95%', + clicksToEdit: 1,//设置点击几次才可编辑 + selModel: new top.Ext.grid.RowSelectionModel({ + singleSelect: false + }), + tbar: [{ + text: '添加检测项', + iconCls: 'btn_ext_add', + handler: function () { + var n = top.Ext.getCmp('configGrid3').getStore().getCount();// 获得总行数 + var p = new testItemsConfig({ + id: -1, + testItem: '' + }); + top.Ext.getCmp('configGrid3').stopEditing();// 停止编辑 + testItemStore.add(p);// 插入到最后一行 + top.Ext.getCmp('configGrid3').startEditing(n, 0);// 开始编辑0单元格 + } + }] + })] + }] + }], + buttons: [{ + id: 'preview', + hidden: SSTS_SterilizerBarcode_Print, + text: '打印预览', + handler: printBarcode + }, { + id: 'saveAndPrint', + hidden: SSTS_SterilizerBarcode_Print, + text: '保存并打印', + handler: saveAndPrint + }, { + id: 'saveBtn', + text: '保存', + handler: save + }, { + text: '取消', + id: 'saveAndNewBtn', + handler: cancel + }] }); + + sterilizerWin = new top.Ext.Window({ + id: 'sterilizerWin', + layout: 'fit', + title: '灭菌炉信息', + width: 900, + border: false, + modal: true, + plain: true, + items: [formObj] + }); sterilizerWin.show(); - - if(id != 0){ - formObj.form.load( { - url : WWWROOT + '/disinfectSystem/baseData/sterilizerAction!loadSterilizer.do', - method : 'GET', - waitMsg : '正在加载数据,请稍候', - success : function(form, action) { + + if (id != 0) { + formObj.form.load({ + url: WWWROOT + '/disinfectSystem/baseData/sterilizerAction!loadSterilizer.do', + method: 'GET', + waitMsg: '正在加载数据,请稍候', + success: function (form, action) { var sterilizer = action.result.data; //灭菌炉对象 var biologicalMonitoringDisplay = sterilizer.biologicalMonitoringDisplay; var biologicalMonitoringDisplayArray = biologicalMonitoringDisplay.split(';'); var monitorTousseDisplay = sterilizer.monitorTousseDisplay; var monitorTousseDisplayArray = monitorTousseDisplay.split(';'); top.Ext.getCmp('isRoutineMonitoring').setValue(sterilizer.isRoutineMonitoring); top.Ext.getCmp('waitSterilizedPrompt').setValue(sterilizer.waitSterilizedPrompt); - if(sterilizer.bioreader != null){ + if (sterilizer.bioreader != null) { top.Ext.getCmp('bioreaderId').setValue(sterilizer.bioreader.id); } top.Ext.getCmp('waitSterilizedPrompt').setValue(sterilizer.waitSterilizedPrompt); var length = biologicalMonitoringDisplayArray.length; - for (var i = 0; i < length; i ++) { + for (var i = 0; i < length; i++) { if (biologicalMonitoringDisplayArray[i] == BIOLOGICALMONITORINGDISPLAY_QUALIFIED) { top.Ext.getCmp('qualified').setValue(true); top.Ext.getCmp('firstQualified').setValue(false); @@ -1445,82 +1445,82 @@ top.Ext.getCmp('qualified').disable(); } } - for (var i = 0; i < monitorTousseDisplayArray.length; i ++) { + for (var i = 0; i < monitorTousseDisplayArray.length; i++) { var names = monitorTousseDisplayArray[i].split('_'); - if(names[0] == MONITORTOUSSEDISPLAY_FIRST){ - if(names[1] == '化学' || names[2] == '化学'){ + if (names[0] == MONITORTOUSSEDISPLAY_FIRST) { + if (names[1] == '化学' || names[2] == '化学') { top.Ext.getCmp('biological_1_1').setValue(true); } - if(names[1] == '生物' || names[2] == '生物'){ + if (names[1] == '生物' || names[2] == '生物') { top.Ext.getCmp('biological_1_2').setValue(true); } - if(names[1] == undefined){ + if (names[1] == undefined) { top.Ext.getCmp('biological_1_2').setValue(true); } - }else if(names[0] == MONITORTOUSSEDISPLAY_EVERYTHING){ - if(names[1] == '化学' || names[2] == '化学'){ + } else if (names[0] == MONITORTOUSSEDISPLAY_EVERYTHING) { + if (names[1] == '化学' || names[2] == '化学') { top.Ext.getCmp('biological_2_1').setValue(true); } - if(names[1] == '生物' || names[2] == '生物'){ + if (names[1] == '生物' || names[2] == '生物') { top.Ext.getCmp('biological_2_2').setValue(true); } - if(names[1] == undefined){ + if (names[1] == undefined) { top.Ext.getCmp('biological_2_2').setValue(true); } - }else if(names[0] == MONITORTOUSSEDISPLAY_IMPLANT){ - if(names[1] == '化学' || names[2] == '化学'){ + } else if (names[0] == MONITORTOUSSEDISPLAY_IMPLANT) { + if (names[1] == '化学' || names[2] == '化学') { top.Ext.getCmp('biological_3_1').setValue(true); } - if(names[1] == '生物' || names[2] == '生物'){ + if (names[1] == '生物' || names[2] == '生物') { top.Ext.getCmp('biological_3_2').setValue(true); } - if(names[1] == undefined){ + if (names[1] == undefined) { top.Ext.getCmp('biological_3_2').setValue(true); } - }else { - if(names[1] == '化学' || names[2] == '化学'){ + } else { + if (names[1] == '化学' || names[2] == '化学') { top.Ext.getCmp('biological_4_1').setValue(true); } - if(names[1] == '生物' || names[2] == '生物'){ + if (names[1] == '生物' || names[2] == '生物') { top.Ext.getCmp('biological_4_2').setValue(true); } - if(names[1] == undefined){ + if (names[1] == undefined) { top.Ext.getCmp('biological_4_2').setValue(true); } } } - - if(id != 0){ + + if (id != 0) { configStore.loadData(Ext.util.JSON.decode(action.result.sterilisationJsonData)); consumableStore.loadData(Ext.util.JSON.decode(action.result.consumptiveJsonData)); testItemStore.loadData(Ext.util.JSON.decode(action.result.detectionJsonData)); - if(action.result.data.sterilizationFrequecyReminds.length > 0){ - for(var i=0;i 0) { + for (var i = 0; i < action.result.data.sterilizationFrequecyReminds.length; i++) { var data = action.result.data.sterilizationFrequecyReminds[i]; var p = new sterilisationConfig({ - frequency : (data.frequency == 0)?'':data.frequency, - sterilisation : data.sterilisation?data.sterilisation.sterilisation:'', - sterilisation_id:data.sterilisation?data.sterilisation.id:'', - remindMode:data.remindMode + frequency: (data.frequency == 0) ? '' : data.frequency, + sterilisation: data.sterilisation ? data.sterilisation.sterilisation : '', + sterilisation_id: data.sterilisation ? data.sterilisation.id : '', + remindMode: data.remindMode }); configStore1.add(p); } } - }else{ + } else { foldersCompanyJsonStore.load(); foldersJsonStore.load(); foldersJsonStore1.load(); deviceInterfaceJsonStore.load(); bioreaderStore.load(); } }, - failure : function(form, action) { + failure: function (form, action) { }, - params : { - id : id + params: { + id: id } }); - }else{ //添加新的记录 + } else { //添加新的记录 top.Ext.getCmp('isEveryDayReset').setValue('是'); top.Ext.getCmp('isCheckSterilizationTime').setValue('否'); top.Ext.getCmp('isAutoCompleteSterilization').setValue('是'); @@ -1530,29 +1530,29 @@ } -function printBarcode(barcodeStr,type){ - +function printBarcode(barcodeStr, type) { + var name = top.Ext.getCmp('name').getValue(); var unit = ""; DWREngine.setAsync(false); - SupplyRoomConfigTableManager.getUnitName(function(unitName){ - if(unitName != null && unitName != ""){ + SupplyRoomConfigTableManager.getUnitName(function (unitName) { + if (unitName != null && unitName != "") { unit = unitName; } }); DWREngine.setAsync(true); - if(type == 0){//直接打印 - print_commonFun(barcodeStr,name,unit,'print','灭菌炉'); - }else{//打印预览 + if (type == 0) {//直接打印 + print_commonFun(barcodeStr, name, unit, 'print', '灭菌炉'); + } else {//打印预览 var barcode = top.Ext.getCmp('barcode').getValue(); - print_commonFun(barcode,name,unit,'preview','灭菌炉'); + print_commonFun(barcode, name, unit, 'preview', '灭菌炉'); } } function checkBiologicalMonitoringParameter() { var biologicalMonitoringTime = top.Ext.getCmp('biologicalMonitoringTime').getValue(); var lagTime = top.Ext.getCmp('lagTime').getValue(); - + if (biologicalMonitoringTime === 0) { if (lagTime || lagTime === 0) { return true; @@ -1581,18 +1581,18 @@ var firstQualified = top.Ext.getCmp('firstQualified').getValue(); var implantQualified = top.Ext.getCmp('implantQualified').getValue(); var foreignTousseQualified = top.Ext.getCmp('foreignTousseQualified').getValue(); - + var biologicalMonitoringDisplay = ''; - + biologicalMonitoringDisplay += (qualified ? top.Ext.getCmp('qualified').inputValue + ';' : ''); biologicalMonitoringDisplay += (firstQualified ? top.Ext.getCmp('firstQualified').inputValue + ';' : ''); biologicalMonitoringDisplay += (implantQualified ? top.Ext.getCmp('implantQualified').inputValue + ';' : ''); biologicalMonitoringDisplay += (foreignTousseQualified ? top.Ext.getCmp('foreignTousseQualified').inputValue + ';' : ''); - + if (biologicalMonitoringDisplay) { biologicalMonitoringDisplay = biologicalMonitoringDisplay.substring(0, biologicalMonitoringDisplay.length - 1); - } - + } + top.Ext.getCmp('biologicalMonitoringDisplay').setValue(biologicalMonitoringDisplay); } @@ -1609,45 +1609,45 @@ //有外来器械时:化学和生物 var biological_4_1 = top.Ext.getCmp('biological_4_1').getValue(); var biological_4_2 = top.Ext.getCmp('biological_4_2').getValue(); - + var monitorTousseDisplay = ''; - if(biological_1_1 || biological_1_2){ + if (biological_1_1 || biological_1_2) { monitorTousseDisplay += MONITORTOUSSEDISPLAY_FIRST; monitorTousseDisplay += (biological_1_1 ? '_' + top.Ext.getCmp('biological_1_1').inputValue : ''); monitorTousseDisplay += (biological_1_2 ? '_' + top.Ext.getCmp('biological_1_2').inputValue : ''); monitorTousseDisplay += ';'; } - if(biological_2_1 || biological_2_2){ + if (biological_2_1 || biological_2_2) { monitorTousseDisplay += MONITORTOUSSEDISPLAY_EVERYTHING; monitorTousseDisplay += (biological_2_1 ? '_' + top.Ext.getCmp('biological_2_1').inputValue : ''); monitorTousseDisplay += (biological_2_2 ? '_' + top.Ext.getCmp('biological_2_2').inputValue : ''); monitorTousseDisplay += ';'; } - if(biological_3_1 || biological_3_2){ + if (biological_3_1 || biological_3_2) { monitorTousseDisplay += MONITORTOUSSEDISPLAY_IMPLANT; monitorTousseDisplay += (biological_3_1 ? '_' + top.Ext.getCmp('biological_3_1').inputValue : ''); monitorTousseDisplay += (biological_3_2 ? '_' + top.Ext.getCmp('biological_3_2').inputValue : ''); monitorTousseDisplay += ';'; } - if(biological_4_1 || biological_4_2){ + if (biological_4_1 || biological_4_2) { monitorTousseDisplay += MONITORTOUSSEDISPLAY_FOREIGN_TOUSSE; monitorTousseDisplay += (biological_4_1 ? '_' + top.Ext.getCmp('biological_4_1').inputValue : ''); monitorTousseDisplay += (biological_4_2 ? '_' + top.Ext.getCmp('biological_4_2').inputValue : ''); monitorTousseDisplay += ';'; } - + if (monitorTousseDisplay) { monitorTousseDisplay = monitorTousseDisplay.substring(0, monitorTousseDisplay.length - 1); } top.Ext.getCmp('monitorTousseDisplay').setValue(monitorTousseDisplay); } -function validateAndSubmit(print){ +function validateAndSubmit(print) { var rapidFurnace = top.Ext.getCmp('rapidFurnace').getValue(); var price = top.Ext.getCmp('price').getValue(); //如果是快速炉,需要填写价格 @@ -1657,49 +1657,49 @@ top.Ext.getCmp('saveAndPrint').enable(); return false; } - if(!setSterilizationFrequecyReminds()){ + if (!setSterilizationFrequecyReminds()) { top.Ext.getCmp('saveBtn').enable(); top.Ext.getCmp('saveAndPrint').enable(); return false; } setBiologicalMonitoringDisplay(); setMonitortousseDisplay(); Ext.Ajax.request({ - url : WWWROOT + '/disinfectSystem/baseData/sterilizerAction!validate.do', - params : {validateId : top.Ext.getCmp('id').getValue(),valifateName:top.Ext.getCmp('name').getValue()}, - success : function(response, options) { + url: WWWROOT + '/disinfectSystem/baseData/sterilizerAction!validate.do', + params: { validateId: top.Ext.getCmp('id').getValue(), valifateName: top.Ext.getCmp('name').getValue() }, + success: function (response, options) { var result = Ext.decode(response.responseText); - if(result.stauts==1){ + if (result.stauts == 1) { setSterilisationIds();//设置灭菌程序IDS var consumables = getConsumableStoreData(); var testItems = getTestItemsStoreData(); - formObj.form.submit( { - url : WWWROOT + '/disinfectSystem/baseData/sterilizerAction!saveSterilizer.do', - params : {consumables :consumables,testItems:testItems, bioreaderId: top.Ext.getCmp('bioreaderId').getValue()}, - method : 'POST', - waitMsg : '正在保存数据,请稍候', - waitTitle : '提交表单', - success : function(form, action) { - if(print){ + formObj.form.submit({ + url: WWWROOT + '/disinfectSystem/baseData/sterilizerAction!saveSterilizer.do', + params: { consumables: consumables, testItems: testItems, bioreaderId: top.Ext.getCmp('bioreaderId').getValue() }, + method: 'POST', + waitMsg: '正在保存数据,请稍候', + waitTitle: '提交表单', + success: function (form, action) { + if (print) { var barcodeStr = action.result.barcode; - printBarcode(barcodeStr,0); + printBarcode(barcodeStr, 0); } sterilizerWin.close(); showResult('保存成功'); grid.dwrReload(); - },failure : function(form, action) { + }, failure: function (form, action) { showResult(action.result.message); top.Ext.getCmp('saveBtn').enable(); top.Ext.getCmp('saveAndPrint').enable(); } }); - }else{ + } else { showResult(result.message); top.Ext.getCmp('saveBtn').enable(); top.Ext.getCmp('saveAndPrint').enable(); } }, - failure : function(response, options) { + failure: function (response, options) { var result = Ext.decode(response.responseText); showResult(result.cause); } @@ -1718,11 +1718,11 @@ this.enable(); return false; } - + var print = false; validateAndSubmit(print); } -function saveAndPrint(){ +function saveAndPrint() { this.disable(); if (!isFormValid(formObj)) { showResult('请正确填写表单各值');