Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/tousseForm.js =================================================================== diff -u -r33749 -r33855 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/tousseForm.js (.../tousseForm.js) (revision 33749) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/tousseForm.js (.../tousseForm.js) (revision 33855) @@ -16,124 +16,124 @@ var beginBarcodeLabel = '扫描条码:'; var hiddenEndBarcode = true;//隐藏尾篮筐 var idCardBarcodePaperTypeStore = null; -if(sstsConfig.disableLoadToVirtualBasket == false){ +if (sstsConfig.disableLoadToVirtualBasket == false) { beginBarcodeLabel = '条码/篮筐(首):'; hiddenEndBarcode = false;//显示尾篮筐 } var reviewViewText; -if(sstsConfig.nameSchemeOfReviewModule == 2){ +if (sstsConfig.nameSchemeOfReviewModule == 2) { reviewViewText = "包装"; -}else{ +} else { reviewViewText = "审核"; } //大小属性的下拉选项 -var packageSizeArray = [[PACKAGE_SIZE_HUGE],[PACKAGE_SIZE_BIG],[PACKAGE_SIZE_CENTER],[PACKAGE_SIZE_SMALL]]; -if(sstsConfig.pageSizeArrayConfig && sstsConfig.pageSizeArrayConfig.length > 0){ +var packageSizeArray = [[PACKAGE_SIZE_HUGE], [PACKAGE_SIZE_BIG], [PACKAGE_SIZE_CENTER], [PACKAGE_SIZE_SMALL]]; +if (sstsConfig.pageSizeArrayConfig && sstsConfig.pageSizeArrayConfig.length > 0) { packageSizeArray = sstsConfig.pageSizeArrayConfig; } //过期告警提示类型的下拉选项 -var warningTypeArray = [[WARNING_TYPE_ALLWARN],[WARNING_TYPE_TOUSSE],[WARNING_TYPE_DISABLED_TOUSSE],[WARNING_TYPE_NEVERWARN]]; +var warningTypeArray = [[WARNING_TYPE_ALLWARN], [WARNING_TYPE_TOUSSE], [WARNING_TYPE_DISABLED_TOUSSE], [WARNING_TYPE_NEVERWARN]]; //默认的大小选项 var defaultPackageSize = PACKAGE_SIZE_BIG; -if(sstsConfig.defaultPackageSize){ +if (sstsConfig.defaultPackageSize) { defaultPackageSize = sstsConfig.defaultPackageSize; } //默认的标签纸类型 var defaultBarcodePaperType = '小标签'; -if(sstsConfig.canUseBarcodeTypes && sstsConfig.canUseBarcodeTypes.length > 0){ +if (sstsConfig.canUseBarcodeTypes && sstsConfig.canUseBarcodeTypes.length > 0) { defaultBarcodePaperType = sstsConfig.canUseBarcodeTypes[0]; } //标识牌标签类型 var defaultIdCardPaperType = '中标签'; var isLastRow = false;//记录当前编辑的行是否是最后一行 -function sortFun_sequence_asc(r1,r2){ +function sortFun_sequence_asc(r1, r2) { var sequence1Str = r1.get('sequence'); var sequence2Str = r2.get('sequence'); - if(isUndefinedOrNullOrEmpty(sequence1Str) && isUndefinedOrNullOrEmpty(sequence2Str)){ + if (isUndefinedOrNullOrEmpty(sequence1Str) && isUndefinedOrNullOrEmpty(sequence2Str)) { return 0; - }else if(isUndefinedOrNullOrEmpty(sequence1Str)){ + } else if (isUndefinedOrNullOrEmpty(sequence1Str)) { return -1; - }else if(isUndefinedOrNullOrEmpty(sequence2Str)){ + } else if (isUndefinedOrNullOrEmpty(sequence2Str)) { return 1; } var sequence1 = Number(sequence1Str); var sequence2 = Number(sequence2Str); - + return sequence1 - sequence2; } -function reorderMaterialGrid(){ +function reorderMaterialGrid() { var store = top.Ext.getCmp('configGrid').getStore(); var records = []; for (var i = 0; i < store.getCount(); i++) { - var record = store.getAt(i); - records.push(record); + var record = store.getAt(i); + records.push(record); } records.sort(sortFun_sequence_asc); store.removeAll(); store.add(records); } -function moveMaterial(){ - var rows = top.Ext.getCmp('configGrid').getSelectionModel().getSelections();// 返回值为 Record 数组 - if (rows.length != 1) { - showResult('请选择材料!'); - return false; - } - var record = rows[0]; - top.Ext.MessageBox.prompt("提示","请输入序号",function(bu, txt){ - if(bu == 'ok'){ - if(!isDigital(txt)){ - showResult('请输入大于0的数字!'); - return false; - } - var num = Number(txt); - if(num <= 0){ - showResult('请输入大于0的数字!'); - return false; - } - moveMaterialByLineNumber(num); - }else{ - return false; - } - }); +function moveMaterial() { + var rows = top.Ext.getCmp('configGrid').getSelectionModel().getSelections();// 返回值为 Record 数组 + if (rows.length != 1) { + showResult('请选择材料!'); + return false; + } + var record = rows[0]; + top.Ext.MessageBox.prompt("提示", "请输入序号", function (bu, txt) { + if (bu == 'ok') { + if (!isDigital(txt)) { + showResult('请输入大于0的数字!'); + return false; + } + var num = Number(txt); + if (num <= 0) { + showResult('请输入大于0的数字!'); + return false; + } + moveMaterialByLineNumber(num); + } else { + return false; + } + }); } -function newRow(){ +function newRow() { var n = top.Ext.getCmp('configGrid').getStore().getCount();// 获得总行数 - var p = new materialDefinitionConfig({ - id : 1, - name : '', - type : '', - cost:'', - count : 1, - countShow : 1, - isImplant:'' - }); - top.Ext.getCmp('configGrid').stopEditing();// 停止编辑 - configStore.add(p);// 插入到最后一行 - top.Ext.getCmp('configGrid').startEditing(n, 0);// 开始编辑0单元格 + var p = new materialDefinitionConfig({ + id: 1, + name: '', + type: '', + cost: '', + count: 1, + countShow: 1, + isImplant: '' + }); + top.Ext.getCmp('configGrid').stopEditing();// 停止编辑 + configStore.add(p);// 插入到最后一行 + top.Ext.getCmp('configGrid').startEditing(n, 0);// 开始编辑0单元格 } -function setMaterialSequence(){ +function setMaterialSequence() { var configStore = top.Ext.getCmp('configGrid').getStore(); - for(var i=0;i 0 && !id) { + fields: ['taskGroupName'], + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getTaskGroupName.do', + listeners: { + load: function (store, records) { + if (records.length > 0 && !id) { if (top.Ext.getCmp('taskGroup')) { top.Ext.getCmp('taskGroup').setValue(records[0].data.taskGroupName); } } } } }); - + //器械包分组combo的store var tousseGroupStore = new Ext.data.JsonStore({ - fields : [ 'tousseGroupName','id' ], - url : WWWROOT + '/disinfectSystem/baseData/tousseGroupAction!getAllTousseGroup.do', - listeners:{ - load:function(store,records) { - if(records.length>0 && id==0) { + fields: ['tousseGroupName', 'id'], + url: WWWROOT + '/disinfectSystem/baseData/tousseGroupAction!getAllTousseGroup.do', + listeners: { + load: function (store, records) { + if (records.length > 0 && id == 0) { if (top.Ext.getCmp('tousseGroupName') && top.Ext.getCmp('tousseGroupName').getValue() == '') { top.Ext.getCmp('tousseGroupName').setValue(records[0].data.id); } } } } }); - + //标签纸类型combo的store var barcodePaperTypeStore = new Ext.data.JsonStore({ - fields : [ 'name'], - url : WWWROOT + '/disinfectSystem/labelTemplateAction!getTousseBarcodePaperType.do', - listeners:{ - load:function(store,records) { + fields: ['name'], + url: WWWROOT + '/disinfectSystem/labelTemplateAction!getTousseBarcodePaperType.do', + listeners: { + load: function (store, records) { } } }); var assetsBelongStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getSettleAccountsDepartJson.do?showDisableOrgUnit=false', - method : 'POST' + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getSettleAccountsDepartJson.do?showDisableOrgUnit=false', + method: 'POST' }), - reader : new Ext.data.JsonReader({ - root : 'data' - },[ - {name : 'id',mapping : 'id'}, - {name : 'name',mapping : 'name'}, - {name : 'orgUnitName',mapping : 'orgUnitName'} - ] + reader: new Ext.data.JsonReader({ + root: 'data' + }, [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' }, + { name: 'orgUnitName', mapping: 'orgUnitName' } + ] ) }); - + //标签纸类型combo的store idCardBarcodePaperTypeStore = new Ext.data.JsonStore({ - fields : [ 'name'], - url : WWWROOT + '/disinfectSystem/labelTemplateAction!getAllIdCardLabelTemplate.do', - listeners:{ - load:function(store,records) { + fields: ['name'], + url: WWWROOT + '/disinfectSystem/labelTemplateAction!getAllIdCardLabelTemplate.do', + listeners: { + load: function (store, records) { } } }); - + //灭菌程序 var sterilisationStore = new Ext.data.SimpleStore({ - fields : ['id', 'value' ], - url : WWWROOT + '/disinfectSystem/baseData/sterilizerAction!getSterilizerType.do', - listeners:{ - load:function(store,records) { - if(records.length>0 && id==0) { + fields: ['id', 'value'], + url: WWWROOT + '/disinfectSystem/baseData/sterilizerAction!getSterilizerType.do', + listeners: { + load: function (store, records) { + if (records.length > 0 && id == 0) { if (top.Ext.getCmp('sterilingMethod') && top.Ext.getCmp('sterilingMethod').getValue() == '') { top.Ext.getCmp('sterilingMethod').setValue(records[0].data.taskGroupName); } } } } }); - + //清洗程序 var cleanMethodStore = new Ext.data.SimpleStore({ - fields : ['id','cleaningMethod'], - url : WWWROOT + '/disinfectSystem/baseData/cleanMethodAction!findCleanMethodArrClone.do', - listeners:{ - load:function(store,records) { - if(records.length>0 && id==0) { + fields: ['id', 'cleaningMethod'], + url: WWWROOT + '/disinfectSystem/baseData/cleanMethodAction!findCleanMethodArrClone.do', + listeners: { + load: function (store, records) { + if (records.length > 0 && id == 0) { if (top.Ext.getCmp('cleanMethod') && top.Ext.getCmp('cleanMethod').getValue() == '') { top.Ext.getCmp('cleanMethod').setValue(records[0].data.cleaningMethod); } } } } }); - + var packTypeStore = new Ext.data.SimpleStore({ - fields : [ 'typeName' ], - url : WWWROOT + '/disinfectSystem/baseData/expirationDateInfoAction!getPackageType.do', - listeners:{ - load:function(store,records) { - if(records.length>0 && id==0) { - if (top.Ext.getCmp('packageType') && top.Ext.getCmp('packageType').getValue() == ''){ + fields: ['typeName'], + url: WWWROOT + '/disinfectSystem/baseData/expirationDateInfoAction!getPackageType.do', + listeners: { + load: function (store, records) { + if (records.length > 0 && id == 0) { + if (top.Ext.getCmp('packageType') && top.Ext.getCmp('packageType').getValue() == '') { top.Ext.getCmp('packageType').setValue(records[0].data.typeName); } } } } }); - + configStore = new top.Ext.data.Store({ - proxy : new top.Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getMaterialDefinitionByTousseDefinitionId.do', - method : "POST" + proxy: new top.Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getMaterialDefinitionByTousseDefinitionId.do', + method: "POST" }), - reader : new top.Ext.data.JsonReader({ - fields : [ "id", "name", "type","cost","count", "price", "sequence"] + reader: new top.Ext.data.JsonReader({ + fields: ["id", "name", "type", "cost", "count", "price", "sequence"] }) }); - + var groupNumStore = new Ext.data.SimpleStore({ - fields : ['groupNum'], - data : [] + fields: ['groupNum'], + data: [] }); var materialCm = new top.Ext.grid.ColumnModel([{ - id : 'name', - header : "材料名称", - dataIndex : 'name', - width : 140, - editor : new top.Ext.form.ComboBox({ - xtype : 'combo', - id : 'package1', - name : 'package1', - queryParam : 'spell', - minChars : 0, - valueField : 'id', - displayField : 'name', - listWidth : 350, - store : new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/materialDefinitionAction!getMaterialDefinitionData.do', //不包括外来器械材料的 -// url : WWWROOT + '/disinfectSystem/baseData/materialDefinitionAction!searchMaterialDefinitionOrDisposableGoodsBySpell2.do', //包括外来器械材料的 - method : 'POST' + id: 'name', + header: "材料名称", + dataIndex: 'name', + width: 140, + editor: new top.Ext.form.ComboBox({ + xtype: 'combo', + id: 'package1', + name: 'package1', + queryParam: 'spell', + minChars: 0, + valueField: 'id', + displayField: 'name', + listWidth: 350, + store: new Ext.data.Store({ + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/materialDefinitionAction!getMaterialDefinitionData.do', //不包括外来器械材料的 + // url : WWWROOT + '/disinfectSystem/baseData/materialDefinitionAction!searchMaterialDefinitionOrDisposableGoodsBySpell2.do', //包括外来器械材料的 + method: 'POST' }), - reader : new Ext.data.JsonReader({ - totalProperty : 'totalCount', - root : 'data' + reader: new Ext.data.JsonReader({ + totalProperty: 'totalCount', + root: 'data' }, [ - {name : 'id',mapping : 'id'}, - {name : 'spelling',mapping : 'spelling'}, - {name : 'type',mapping : 'type'}, - {name : 'name',mapping : 'name'}, - {name : 'price',mapping : 'price'}, - {name : 'cost',mapping : 'cost'}, - {name:'isImplant',mapping:'isImplant'} + { name: 'id', mapping: 'id' }, + { name: 'spelling', mapping: 'spelling' }, + { name: 'type', mapping: 'type' }, + { name: 'name', mapping: 'name' }, + { name: 'price', mapping: 'price' }, + { name: 'cost', mapping: 'cost' }, + { name: 'isImplant', mapping: 'isImplant' } ]) }), - forceSelection : true, - lazyInit : true, - triggerAction : 'all', - hideTrigger : true, - typeAhead : false, - allowBlank : false, - anchor : '97%', - listeners : { - beforeselect : function(combo, record, index) { + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + hideTrigger: true, + typeAhead: false, + allowBlank: false, + anchor: '97%', + listeners: { + beforeselect: function (combo, record, index) { var rowIndex = top.Ext.getCmp('configGrid').getStore().getCount();//grid的行数 var configStore = top.Ext.getCmp('configGrid').getStore(); - var id = record.data.id; + var id = record.data.id; var type = record.data.type; - for(var i =0 ;i < rowIndex ; i++ ){ + for (var i = 0; i < rowIndex; i++) { var electRecord = configStore.getAt(i); //器械材料和一次性物品可能同ID,所以增加个类型对比 - if (type == electRecord.get('type') && id == electRecord.get('materialDefinitionId')) { - showResult('已包含材料:'+electRecord.get('name')+',不可重复添加!'); + if (type == electRecord.get('type') && id == electRecord.get('materialDefinitionId')) { + showResult('已包含材料:' + electRecord.get('name') + ',不可重复添加!'); return false; } } }, - select : function(combo, record, index) { + select: function (combo, record, index) { combo.setValue(record.data.name); - record.set("type",record.data.type); - if(eventEdit != null){ + record.set("type", record.data.type); + if (eventEdit != null) { var editRecord = top.Ext.getCmp('configGrid').getStore().getAt(eventEdit.row); editRecord.data.type = record.data.type; editRecord.data.isImplant = record.data.isImplant; editRecord.data.price = record.data.price; editRecord.data.cost = record.data.cost; editRecord.data.materialDefinitionId = record.data.id; - + } - if(top.Ext.getCmp('tousseType').getValue() == '消毒物品'){ - top.Ext.getCmp('price').setValue(recountDisinfectionGoodsPrice()); - } + if (top.Ext.getCmp('tousseType').getValue() == '消毒物品') { + top.Ext.getCmp('price').setValue(recountDisinfectionGoodsPrice()); + } setMaterialCostPrice(materialsPanel); }, - specialKey : function(field,event){ - if(event.getKey()==13 ){ - if(isLastRow){//是最后一行,新增空白行 + specialKey: function (field, event) { + if (event.getKey() == 13) { + if (isLastRow) {//是最后一行,新增空白行 newRow(); } } } } }) }, { - id : 'countShow', - header : "数量", - width : 30, - dataIndex : 'countShow', - editor : new top.Ext.form.NumberField( { - allowBlank : false, - minValue:1, - listeners:{ - specialKey : function(field,event){ - var eventKey = event.getKey(); - if(eventKey == 13){ + id: 'countShow', + header: "数量", + width: 30, + dataIndex: 'countShow', + editor: new top.Ext.form.NumberField({ + allowBlank: false, + minValue: 1, + listeners: { + specialKey: function (field, event) { + var eventKey = event.getKey(); + if (eventKey == 13) { var editRecord = top.Ext.getCmp('configGrid').getStore().getAt(lastEventEditRow); editRecord.data.count = field.getValue(); - if(top.Ext.getCmp('tousseType').getValue() == '消毒物品'){ + if (top.Ext.getCmp('tousseType').getValue() == '消毒物品') { top.Ext.getCmp('price').setValue(recountDisinfectionGoodsPrice()); } - if(isLastRow){//是最后一行,新增空白行 + if (isLastRow) {//是最后一行,新增空白行 newRow(); } } - }, - focus : function(field){ - lastEventEditRow = eventEdit.row; - field.focus(); - }, - change : function(field,newV,oldV){ - var ncount = parseInt(newV); - if(ncount > 0){ - field.setValue(newV); - }else{ - field.setValue(oldV); - } - setMaterialCostPrice(materialsPanel); - },blur : function (field){ - if(eventEdit != null){ - var editRecord = top.Ext.getCmp('configGrid').getStore().getAt(lastEventEditRow); - editRecord.data.count = field.getValue(); - if(top.Ext.getCmp('tousseType').getValue() == '消毒物品'){ - top.Ext.getCmp('price').setValue(recountDisinfectionGoodsPrice()); - } - } - setMaterialCostPrice(materialsPanel); - } + }, + focus: function (field) { + lastEventEditRow = eventEdit.row; + field.focus(); + }, + change: function (field, newV, oldV) { + var ncount = parseInt(newV); + if (ncount > 0) { + field.setValue(newV); + } else { + field.setValue(oldV); + } + setMaterialCostPrice(materialsPanel); + }, blur: function (field) { + if (eventEdit != null) { + var editRecord = top.Ext.getCmp('configGrid').getStore().getAt(lastEventEditRow); + editRecord.data.count = field.getValue(); + if (top.Ext.getCmp('tousseType').getValue() == '消毒物品') { + top.Ext.getCmp('price').setValue(recountDisinfectionGoodsPrice()); + } + } + setMaterialCostPrice(materialsPanel); + } } }) - },{id : 'count',xtype : 'hidden',dataIndex : 'count',hidden:true }, + }, { id: 'count', xtype: 'hidden', dataIndex: 'count', hidden: true }, { - id:'isImplant', - header:"是否植入物", - width : 50, - dataIndex:'isImplant' - },{ - id : 'sequence', - header : "排序", - width : 30, - dataIndex : 'sequence' - },{ - id : 'type', - header : "类型", - dataIndex : 'type', - hidden : true - },{ - id : 'moveItem', - header:'移动', - width : 80, - renderer: function(v,p,record){ + id: 'isImplant', + header: "是否植入物", + width: 50, + dataIndex: 'isImplant' + }, { + id: 'sequence', + header: "排序", + width: 30, + dataIndex: 'sequence' + }, { + id: 'type', + header: "类型", + dataIndex: 'type', + hidden: true + }, { + id: 'moveItem', + header: '移动', + width: 80, + renderer: function (v, p, record) { var str = "" - + "" - + "" - + ""; + + "" + + "" + + ""; return str; }, - menuDisabled : true, - dataIndex:'id' + menuDisabled: true, + dataIndex: 'id' }]); materialDefinitionConfig = Ext.data.Record.create([ - {name : 'id'}, - {name : 'materialDefinitionId'}, - {name : 'name'}, - {name : 'type'}, - {name : 'cost'}, - {name : 'count'}, - {name : 'countShow'}, - {name : 'price'}, - {name:'isImplant'} + { name: 'id' }, + { name: 'materialDefinitionId' }, + { name: 'name' }, + { name: 'type' }, + { name: 'cost' }, + { name: 'count' }, + { name: 'countShow' }, + { name: 'price' }, + { name: 'isImplant' } ]); - + materialConfig = Ext.data.Record.create([ - {name : 'id'}, - {name : 'count'}, - {name : 'price'}, - {name : 'materileName'}, - {name : 'name'}, - {name : 'specification'}, - {name : 'snumber'} - + { name: 'id' }, + { name: 'count' }, + { name: 'price' }, + { name: 'materileName' }, + { name: 'name' }, + { name: 'specification' }, + { name: 'snumber' } + ]); - + var groupNumRecord = Ext.data.Record.create([ - {name : 'groupNum'} + { name: 'groupNum' } ]); - + materialsPanel = new top.Ext.grid.EditorGridPanel({ - id : 'configGrid', - name : 'configGrid', - store : configStore, - cm : materialCm, - height:440, - frame : false, - bodyStyle : 'border:1px solid #afd7af', - autoExpandColumn : 'count', + id: 'configGrid', + name: 'configGrid', + store: configStore, + cm: materialCm, + height: 440, + frame: false, + bodyStyle: 'border:1px solid #afd7af', + autoExpandColumn: 'count', viewConfig: { - forceFit:true, - getRowClass : function(record,rowIndex,rowParams,store){ + forceFit: true, + getRowClass: function (record, rowIndex, rowParams, store) { return 'materialsPanelClass'; } }, - clicksToEdit : 1,//设置点击几次才可编辑 - enableDragDrop:true,//激活行拖动 + clicksToEdit: 1,//设置点击几次才可编辑 + enableDragDrop: true,//激活行拖动 ddGroup: 'gridDD', - dropConfig: {appendOnly:false}, - selModel : new top.Ext.grid.RowSelectionModel({ - singleSelect : false + dropConfig: { appendOnly: false }, + selModel: new top.Ext.grid.RowSelectionModel({ + singleSelect: false }), - tbar : [{ - text : '新增材料', - iconCls : 'btn_ext_add', - handler : function() { - newRow(); - } - }, { - text : '删除材料', - iconCls : 'btn_remove', - handler : function() { - var rows = top.Ext.getCmp('configGrid').getSelectionModel().getSelections();// 返回值为 Record 数组 - if (rows.length == 0) { - showResult('最少选择一条信息,进行删除!'); - } else { - top.Ext.MessageBox.confirm('提示框', '您确定要进行该操作?', function(btn) { - if (btn == 'yes') { - if (rows) { - for ( var i = 0; i < rows.length; i++) { - configStore.remove(rows[i]); - setMaterialCostPrice(materialsPanel); - } - //如果是消毒物品,则重新计算材料消毒价格及一次性物品参考价之和 - if(top.Ext.getCmp('tousseType').getValue() == '消毒物品'){ - top.Ext.getCmp('price').setValue(recountDisinfectionGoodsPrice()); - } - } - } - }); - } - } - },{ - text : '材料总件数:', - id : 'materialCount' - // style : 'margin-top:1px' - },{ - text : '材料种类:', - id : 'materialType' - // style : 'margin-top:1px' - },{ - text : '刷新', -// hidden: true, - iconCls : 'btn_ext_refresh', - handler : function() { -// reorderMaterialGrid(); - } - },{ - text : '设置序号', - iconCls : 'icon_systemset', - handler : function() { - moveMaterial(); - } - }], + tbar: [{ + text: '新增材料', + iconCls: 'btn_ext_add', + handler: function () { + newRow(); + } + }, { + text: '删除材料', + iconCls: 'btn_remove', + handler: function () { + var rows = top.Ext.getCmp('configGrid').getSelectionModel().getSelections();// 返回值为 Record 数组 + if (rows.length == 0) { + showResult('最少选择一条信息,进行删除!'); + } else { + top.Ext.MessageBox.confirm('提示框', '您确定要进行该操作?', function (btn) { + if (btn == 'yes') { + if (rows) { + for (var i = 0; i < rows.length; i++) { + configStore.remove(rows[i]); + setMaterialCostPrice(materialsPanel); + } + //如果是消毒物品,则重新计算材料消毒价格及一次性物品参考价之和 + if (top.Ext.getCmp('tousseType').getValue() == '消毒物品') { + top.Ext.getCmp('price').setValue(recountDisinfectionGoodsPrice()); + } + } + } + }); + } + } + }, { + text: '材料总件数:', + id: 'materialCount' + // style : 'margin-top:1px' + }, { + text: '材料种类:', + id: 'materialType' + // style : 'margin-top:1px' + }, { + text: '刷新', + // hidden: true, + iconCls: 'btn_ext_refresh', + handler: function () { + // reorderMaterialGrid(); + } + }, { + text: '设置序号', + iconCls: 'icon_systemset', + handler: function () { + moveMaterial(); + } + }], listeners: { - beforeedit: function(obj){ - eventEdit = obj; - }, - afteredit:function(grid){ -// if(isLastRow){//是最后一行,新增空白行 -// newRow(); -// } - eventEdit = null; - } - } + beforeedit: function (obj) { + eventEdit = obj; + }, + afteredit: function (grid) { + // if(isLastRow){//是最后一行,新增空白行 + // newRow(); + // } + eventEdit = null; + } + } }); top.Ext4.tip.QuickTipManager.init(); - materialsPanel.on('mouseover', function(e) { + materialsPanel.on('mouseover', function (e) { var index = materialsPanel.getView().findRowIndex(e.getTarget()); var cell = materialsPanel.getView().findCellIndex(e.getTarget()); - if(index !== false){ + if (index !== false) { var columnItem = materialCm.config[cell] || {}; var headerName = columnItem.header || ''; - if(headerName == '' || headerName == '是否植入物' || headerName == '排序' || headerName == '移动'){ + if (headerName == '' || headerName == '是否植入物' || headerName == '排序' || headerName == '移动') { return; } e.getTarget().setAttribute('data-qtip', '点击开始编辑'); } - }); + }); var colWidth = 0.33; formObj = new top.Ext.FormPanel({ - id : 'tousseDefinitionForm', - frame : true, - labelSeparator : ':', - labelAlign:'right', - fileUpload : true, - bodyStyle : 'padding:5px 5px 0px 5px;', + id: 'tousseDefinitionForm', + frame: true, + labelSeparator: ':', + labelAlign: 'right', + fileUpload: true, + bodyStyle: 'padding:5px 5px 0px 5px;', width: 900, columnWidth: 0.6, - labelWidth : 90, - autoScroll : true, - height : top.screen.height > 800 ? 610 : 450, - items : [{ - xtype : 'hidden', - name : 'id', - id : 'id' - },{ - xtype : 'hidden', - name : 'priceHidden', - id : 'priceHidden' - },{ - xtype : 'hidden', - name : 'discountPriceHidden', - id : 'discountPriceHidden' - },{ - xtype : 'hidden', - name : 'borrowPriceHidden', - id : 'borrowPriceHidden' - },{ - xtype : 'hidden', - name : 'proxyPriceHidden', - id : 'proxyPriceHidden' - },{ - xtype : 'hidden', - name : 'handlerDepartCode', - id : 'handlerDepartCode' - },{ - xtype : 'hidden', - name : 'uuid_vedioNames', - id : 'uuid_vedioNames' - },{ - xtype : 'hidden', - name : 'tousseGroupID', - id : 'tousseGroupID' - },{ - xtype : 'hidden', - name : 'orginalName', - id : 'orginalName' - },{ - xtype : 'hidden', - name : 'maintainIntervalTimeHidden', - id : 'maintainIntervalTimeHidden' - },{ - xtype : 'hidden', - name : 'maintainIntervalCountHidden', - id : 'maintainIntervalCountHidden' - },{ - xtype : 'hidden', - name : 'orginalSpelling', - id : 'orginalSpelling' - },{ - xtype : 'hidden', - name : 'isCommonTousse', - id : 'isCommonTousse' - },{ - layout : 'column', - labelWidth : 90, - items : [{ - columnWidth : 1, - xtype : "fieldset", + labelWidth: 90, + autoScroll: true, + height: top.screen.height > 800 ? 610 : 450, + items: [{ + xtype: 'hidden', + name: 'id', + id: 'id' + }, { + xtype: 'hidden', + name: 'priceHidden', + id: 'priceHidden' + }, { + xtype: 'hidden', + name: 'discountPriceHidden', + id: 'discountPriceHidden' + }, { + xtype: 'hidden', + name: 'borrowPriceHidden', + id: 'borrowPriceHidden' + }, { + xtype: 'hidden', + name: 'proxyPriceHidden', + id: 'proxyPriceHidden' + }, { + xtype: 'hidden', + name: 'handlerDepartCode', + id: 'handlerDepartCode' + }, { + xtype: 'hidden', + name: 'uuid_vedioNames', + id: 'uuid_vedioNames' + }, { + xtype: 'hidden', + name: 'tousseGroupID', + id: 'tousseGroupID' + }, { + xtype: 'hidden', + name: 'orginalName', + id: 'orginalName' + }, { + xtype: 'hidden', + name: 'maintainIntervalTimeHidden', + id: 'maintainIntervalTimeHidden' + }, { + xtype: 'hidden', + name: 'maintainIntervalCountHidden', + id: 'maintainIntervalCountHidden' + }, { + xtype: 'hidden', + name: 'orginalSpelling', + id: 'orginalSpelling' + }, { + xtype: 'hidden', + name: 'isCommonTousse', + id: 'isCommonTousse' + }, { + layout: 'column', + labelWidth: 90, + items: [{ + columnWidth: 1, + xtype: "fieldset", title: '器械包基础数据定义', - bodyStyle:'padding:1px;', - layout : 'column', - autoHeight : true, - items : [{ - columnWidth : .99, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'textfield', - fieldLabel : "器械包名称", - allowBlank : false, - blankText : '请输入名称!', - name : "name", - id : "name", - anchor : '100%', - listeners:{ - change:function(field,nV,oV){ - var value = nV.trim(); - field.setValue(value); - } - } - }] - },{ - columnWidth : colWidth, - layout : 'form', - items:[{ - xtype : 'combo', - fieldLabel : '器械包类型', - listWidth:200, - id : 'tousseType', - name : 'tousseType', - valueField : 'value', - displayField : 'value', - allowBlank : false, - editable : false, - store : new Ext.data.SimpleStore({ - fields : [ 'value' ], - data : [['器械包'],[ '敷料包'],['消毒物品'],['外部代理灭菌']] + bodyStyle: 'padding:1px;', + layout: 'column', + autoHeight: true, + items: [{ + columnWidth: .99, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'textfield', + fieldLabel: "器械包名称", + allowBlank: false, + blankText: '请输入名称!', + name: "name", + id: "name", + anchor: '100%', + listeners: { + change: function (field, nV, oV) { + var value = nV.trim(); + field.setValue(value); } + } + }] + }, { + columnWidth: colWidth, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '器械包类型', + listWidth: 200, + id: 'tousseType', + name: 'tousseType', + valueField: 'value', + displayField: 'value', + allowBlank: false, + editable: false, + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['器械包'], ['敷料包'], ['消毒物品'], ['外部代理灭菌']] + } ), - value : '器械包', - forceSelection : true, - mode : 'local', - triggerAction : 'all', - listeners : { - select : function(combo, record, index){ + value: '器械包', + forceSelection: true, + mode: 'local', + triggerAction: 'all', + listeners: { + select: function (combo, record, index) { top.Ext.getCmp('isApplyEntireTousse').disable(); //禁用“是否整包申请”下拉框,并默认赋值为“是” top.Ext.getCmp('isApplyEntireTousse').setValue('是'); - + top.Ext.getCmp('isSterile').disable(); //禁用“是否灭菌”下拉框,并默认赋值为“是” top.Ext.getCmp('isSterile').setValue('是'); - + top.Ext.getCmp('isRecycling').enable(); //启用“是否回收”下拉框,并默认赋值为“是” top.Ext.getCmp('isInvoice').enable(); //启用“是否发货”下拉框,并默认赋值为“是” top.Ext.getCmp('autoOutStockForPacking').enable(); //启用“自动扣包内材料”下拉框 - + //设置价格为可编辑 - top.Ext.getCmp('price').el.dom.removeAttribute("readOnly"); - + top.Ext.getCmp('price').el.dom.removeAttribute("readOnly"); + var tousseType = record.data.value; - if(tousseType == '器械包'){ - if(top.Ext.getCmp('isConvertApplyGoods').getValue() == '是'){ + if (tousseType == '器械包') { + if (top.Ext.getCmp('isConvertApplyGoods').getValue() == '是') { //启用是否优先转换 top.Ext.getCmp('isPriorConvertApplyGoods').enable(); } - }else{ + } else { //禁用优先转换并设值为"否" top.Ext.getCmp('isPriorConvertApplyGoods').disable(); top.Ext.getCmp('isPriorConvertApplyGoods').setValue('否'); - if(tousseType == '敷料包'){ //敷料包 + if (tousseType == '敷料包') { //敷料包 top.Ext.getCmp('isRecycling').disable(); //禁用“是否回收”下拉框,并默认赋值为“否” top.Ext.getCmp('isRecycling').setValue('否'); - }else if(tousseType == '消毒物品'){ //消毒物品 + } else if (tousseType == '消毒物品') { //消毒物品 top.Ext.getCmp('isApplyEntireTousse').enable(); //启用“是否整包申请”下拉框,并默认赋值为“否” top.Ext.getCmp('isApplyEntireTousse').setValue('否'); - - // top.Ext.getCmp('packageType').setValue('胶袋'); //默认包装类型改为“胶袋” - + + // top.Ext.getCmp('packageType').setValue('胶袋'); //默认包装类型改为“胶袋” + top.Ext.getCmp('isSterile').enable(); //启用“是否灭菌”下拉框,并默认赋值为“否” top.Ext.getCmp('isSterile').setValue('否'); - + top.Ext.getCmp('sterilingMethod').setValue('无'); //默认灭菌程序设为“无” - + top.Ext.getCmp('isInvoice').disable(); //禁用“是否发货”下拉框,并默认赋值为“是” top.Ext.getCmp('isInvoice').setValue('是'); - + //设置价格为只读,不可编辑 - top.Ext.getCmp('price').el.dom.setAttribute("readOnly",true); + top.Ext.getCmp('price').el.dom.setAttribute("readOnly", true); top.Ext.getCmp('price').setValue(recountDisinfectionGoodsPrice()); - }else if(tousseType == '外部代理灭菌'){ //外部代理灭菌 + } else if (tousseType == '外部代理灭菌') { //外部代理灭菌 top.Ext.getCmp('autoOutStockForPacking').disable(); //禁用“自动扣包内材料”下拉框,并默认赋值为“否” top.Ext.getCmp('autoOutStockForPacking').setValue('否'); top.Ext.getCmp('isInvoice').disable(); //禁用“是否发货”下拉框,并默认赋值为“是” top.Ext.getCmp('isInvoice').setValue('是'); - + top.Ext.getCmp('isRecycling').disable(); //禁用“是否回收”下拉框,并默认赋值为“否” top.Ext.getCmp('isRecycling').setValue('否'); } } } }, - anchor : '100%' - }] - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '是否整包申请', - id : 'isApplyEntireTousse', - name : 'isApplyEntireTousse', - editable:false, - valueField : 'value', - displayField : 'value', - allowBlank : true, - store : new Ext.data.SimpleStore({ - fields : [ 'value' ], - data : [['是'],[ '否']] + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '是否整包申请', + id: 'isApplyEntireTousse', + name: 'isApplyEntireTousse', + editable: false, + valueField: 'value', + displayField: 'value', + allowBlank: true, + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] }), - forceSelection : true, - mode : 'local', - triggerAction : 'all', - anchor : '100%' + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' }] - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '是否整包清洗', - id : 'isCleanedEntirely', - name : 'isCleanedEntirely', - editable:false, - valueField : 'value', - displayField : 'value', - allowBlank : false, - store : new Ext.data.SimpleStore({ - fields : [ 'value' ], - data : [['是'],[ '否']] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '是否整包清洗', + id: 'isCleanedEntirely', + name: 'isCleanedEntirely', + editable: false, + valueField: 'value', + displayField: 'value', + allowBlank: false, + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] }), - value : '是', - forceSelection : true, - mode : 'local', - triggerAction : 'all', - anchor : '100%' + value: '是', + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '优先处理科室', - id : 'handlerDepartName', - name : 'handlerDepartName', - editable:false, - valueField : 'departName', - displayField : 'departName', - store : new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getHandlerDeparts.do', - method : 'POST' + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '优先处理科室', + id: 'handlerDepartName', + name: 'handlerDepartName', + editable: false, + valueField: 'departName', + displayField: 'departName', + store: new Ext.data.Store({ + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getHandlerDeparts.do', + method: 'POST' }), - reader : new Ext.data.JsonReader({ - totalProperty : 'totalCount', - root : 'data' + reader: new Ext.data.JsonReader({ + totalProperty: 'totalCount', + root: 'data' }, [ - {name : 'departCode',mapping : 'departCode'}, - {name : 'departName',mapping : 'departName'} + { name: 'departCode', mapping: 'departCode' }, + { name: 'departName', mapping: 'departName' } ]) }), - forceSelection : true, - allowBlank : false, - triggerAction : 'all', - anchor : '100%', - listeners:{ - select:function(combo, record, index){ + forceSelection: true, + allowBlank: false, + triggerAction: 'all', + anchor: '100%', + listeners: { + select: function (combo, record, index) { combo.setValue(record.data.departName); top.Ext.getCmp("handlerDepartCode").setValue(record.data.departCode); taskGroupJsonStore.baseParams["handlerDepartCode"] = record.data.departCode; @@ -1108,388 +1108,388 @@ } } }] - },{ - columnWidth : colWidth, - layout : 'form', - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '任务组', - id : 'taskGroup', - name : 'taskGroup', - disabled:(id == 0 ? true : false), - editable:false, - valueField : 'taskGroupName', - displayField : 'taskGroupName', - store : taskGroupJsonStore, - forceSelection : true, - allowBlank : false, - triggerAction : 'all', - anchor : '100%', - listeners : { - beforequery : function (){ + }, { + columnWidth: colWidth, + layout: 'form', + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '任务组', + id: 'taskGroup', + name: 'taskGroup', + disabled: (id == 0 ? true : false), + editable: false, + valueField: 'taskGroupName', + displayField: 'taskGroupName', + store: taskGroupJsonStore, + forceSelection: true, + allowBlank: false, + triggerAction: 'all', + anchor: '100%', + listeners: { + beforequery: function () { taskGroupJsonStore.baseParams["handlerDepartCode"] = top.Ext.getCmp("handlerDepartCode").getValue(); taskGroupJsonStore.load(); } } }] - }, { - columnWidth : colWidth, - layout : 'form', - labelAlign:"right", - labelWidth : fontSize == 12 ? 90 : 100, - items:[{ - xtype : 'combo', - fieldLabel : '默认包装类型', - id : 'packageType', - name : 'packageType', - valueField : 'typeName', - displayField : 'typeName', - store : packTypeStore, - forceSelection : true, - editable : false, - triggerAction : 'all', - anchor : '100%', - allowBlank : false - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '允许改包装类型', - id : 'allowModifyPackageType', - name : 'allowModifyPackageType', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - triggerAction : 'all', - anchor : '100%' - - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '工作量统计方式', - id : 'workLoadStatisticalMethod', - name : 'workLoadStatisticalMethod', - editable:false, - valueField : 'value', - displayField : 'value', - allowBlank : false, - store : new Ext.data.SimpleStore({ - fields : [ 'value' ], - data : [['按包'],[ '按材料'],[ '材料加耗材']] - } + }, { + columnWidth: colWidth, + layout: 'form', + labelAlign: "right", + labelWidth: fontSize == 12 ? 90 : 100, + items: [{ + xtype: 'combo', + fieldLabel: '默认包装类型', + id: 'packageType', + name: 'packageType', + valueField: 'typeName', + displayField: 'typeName', + store: packTypeStore, + forceSelection: true, + editable: false, + triggerAction: 'all', + anchor: '100%', + allowBlank: false + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '允许改包装类型', + id: 'allowModifyPackageType', + name: 'allowModifyPackageType', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' + + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '工作量统计方式', + id: 'workLoadStatisticalMethod', + name: 'workLoadStatisticalMethod', + editable: false, + valueField: 'value', + displayField: 'value', + allowBlank: false, + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['按包'], ['按材料'], ['材料加耗材']] + } ), - value : '按包', - forceSelection : true, - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'textfield', - fieldLabel : "拼音码", - allowBlank : true, - blankText : '请输入拼音简码!', - name : "spelling", - id : "spelling", - anchor : '100%' - }] - }, { - columnWidth : colWidth, - layout : 'form', - items:[{ - xtype : 'textfield', - fieldLabel : "五笔码", - allowBlank : true, - blankText : '请输入五笔简码!', - name : "wbCode", - id : "wbCode", - readOnly : true, - anchor : '100%' - }] - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'numberfield', - fieldLabel : "成本价格", - allowBlank : false, - allowNegative:false, - readOnly : true, - name : 'costPrice', - id : 'costPrice', - anchor : '100%' - }] - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'numberfield', - fieldLabel : "价格", - allowBlank : false, - allowNegative:false, - disabled : isPriceReadOnly, - name : 'price', - id : 'price', - anchor : '100%', - listeners:{ - change:function(field,nV,oV){ - var priceHidden = top.Ext.getCmp('priceHidden').getValue(); - if(priceHidden==null || priceHidden==""){ - top.Ext.getCmp('priceHidden').setValue(oV); - } - } - } - }] - },{ - columnWidth : colWidth, - layout : 'form', - hidden : !sstsConfig.enableDiscountPrice, - items:[{ - xtype : 'numberfield', - fieldLabel : "折扣价", - allowBlank : sstsConfig.enableDiscountPrice ? false : true, - allowNegative:false, - disabled : isPriceReadOnly, - name : 'discountPrice', - id : 'discountPrice', - anchor : '100%', - listeners:{ - change:function(field,nV,oV){ - var discountPriceHidden = top.Ext.getCmp('discountPriceHidden').getValue(); - if(discountPriceHidden==null || discountPriceHidden==""){ - top.Ext.getCmp('discountPriceHidden').setValue(oV); - } - } - } - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'numberfield', - fieldLabel : "借出价格", - allowBlank : true, - allowNegative:false, - name : 'borrowPrice', - id : 'borrowPrice', - anchor : '100%', - listeners:{ - change:function(field,nV,oV){ - var borrowPriceHidden = top.Ext.getCmp('borrowPriceHidden').getValue(); - if(borrowPriceHidden==null || borrowPriceHidden==""){ - top.Ext.getCmp('borrowPriceHidden').setValue(oV); - } - } - } - }] - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'numberfield', - fieldLabel : "代理灭菌价格", - allowBlank : false, - allowNegative:false, - name : 'proxyDisinfectionPrice', - id : 'proxyDisinfectionPrice', - anchor : '100%', - listeners:{ - change:function(field,nV,oV){ - var proxyPriceHidden = top.Ext.getCmp('proxyPriceHidden').getValue(); - if(proxyPriceHidden==null || proxyPriceHidden==""){ - top.Ext.getCmp('proxyPriceHidden').setValue(oV); - } - } - } - }] - }, { - columnWidth : colWidth, - layout : 'form', - items:[{ - xtype : 'combo', - fieldLabel : '大小', - id : 'packageSize', - name : 'packageSize', - editable:false, - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : packageSizeArray - }), - value : defaultPackageSize, - forceSelection : true, - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '默认灭菌程序', - id : 'sterilingMethod', - name : 'sterilingMethod', - valueField : 'value', - displayField : 'value', - editable:false, - store : sterilisationStore, - forceSelection : true, - allowBlank : false, - triggerAction : 'all', - anchor : '100%' - }] - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '默认清洗程序', - id : 'cleanMethod', - name : 'cleanMethod', - listWidth:200, - editable:false, - valueField : 'cleaningMethod', - displayField : 'cleaningMethod', - store : cleanMethodStore, - forceSelection : true, - allowBlank : true, - triggerAction : 'all', - anchor : '100%' - }] - },{ - xtype : 'hidden', - id : 'assetsBelongCode', - name : 'assetsBelongCode' - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '资产归属', - id : 'assetsBelong', - name : 'assetsBelong', - store : assetsBelongStore, - queryParam : 'spell', - minChars : 0, - valueField : 'id', - displayField : 'name', - forceSelection : true, - lazyInit : true, - triggerAction : 'all', - typeAhead : false, - allowBlank : true, - anchor : '100%', - listeners : { - select : function (combo, record, index ){ + value: '按包', + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'textfield', + fieldLabel: "拼音码", + allowBlank: true, + blankText: '请输入拼音简码!', + name: "spelling", + id: "spelling", + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + items: [{ + xtype: 'textfield', + fieldLabel: "五笔码", + allowBlank: true, + blankText: '请输入五笔简码!', + name: "wbCode", + id: "wbCode", + readOnly: true, + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'numberfield', + fieldLabel: "成本价格", + allowBlank: false, + allowNegative: false, + readOnly: true, + name: 'costPrice', + id: 'costPrice', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'numberfield', + fieldLabel: "价格", + allowBlank: false, + allowNegative: false, + disabled: isPriceReadOnly, + name: 'price', + id: 'price', + anchor: '100%', + listeners: { + change: function (field, nV, oV) { + var priceHidden = top.Ext.getCmp('priceHidden').getValue(); + if (priceHidden == null || priceHidden == "") { + top.Ext.getCmp('priceHidden').setValue(oV); + } + } + } + }] + }, { + columnWidth: colWidth, + layout: 'form', + hidden: !sstsConfig.enableDiscountPrice, + items: [{ + xtype: 'numberfield', + fieldLabel: "折扣价", + allowBlank: sstsConfig.enableDiscountPrice ? false : true, + allowNegative: false, + disabled: isPriceReadOnly, + name: 'discountPrice', + id: 'discountPrice', + anchor: '100%', + listeners: { + change: function (field, nV, oV) { + var discountPriceHidden = top.Ext.getCmp('discountPriceHidden').getValue(); + if (discountPriceHidden == null || discountPriceHidden == "") { + top.Ext.getCmp('discountPriceHidden').setValue(oV); + } + } + } + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'numberfield', + fieldLabel: "借出价格", + allowBlank: true, + allowNegative: false, + name: 'borrowPrice', + id: 'borrowPrice', + anchor: '100%', + listeners: { + change: function (field, nV, oV) { + var borrowPriceHidden = top.Ext.getCmp('borrowPriceHidden').getValue(); + if (borrowPriceHidden == null || borrowPriceHidden == "") { + top.Ext.getCmp('borrowPriceHidden').setValue(oV); + } + } + } + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'numberfield', + fieldLabel: "代理灭菌价格", + allowBlank: false, + allowNegative: false, + name: 'proxyDisinfectionPrice', + id: 'proxyDisinfectionPrice', + anchor: '100%', + listeners: { + change: function (field, nV, oV) { + var proxyPriceHidden = top.Ext.getCmp('proxyPriceHidden').getValue(); + if (proxyPriceHidden == null || proxyPriceHidden == "") { + top.Ext.getCmp('proxyPriceHidden').setValue(oV); + } + } + } + }] + }, { + columnWidth: colWidth, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '大小', + id: 'packageSize', + name: 'packageSize', + editable: false, + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: packageSizeArray + }), + value: defaultPackageSize, + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '默认灭菌程序', + id: 'sterilingMethod', + name: 'sterilingMethod', + valueField: 'value', + displayField: 'value', + editable: false, + store: sterilisationStore, + forceSelection: true, + allowBlank: false, + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '默认清洗程序', + id: 'cleanMethod', + name: 'cleanMethod', + listWidth: 200, + editable: false, + valueField: 'cleaningMethod', + displayField: 'cleaningMethod', + store: cleanMethodStore, + forceSelection: true, + allowBlank: true, + triggerAction: 'all', + anchor: '100%' + }] + }, { + xtype: 'hidden', + id: 'assetsBelongCode', + name: 'assetsBelongCode' + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '资产归属', + id: 'assetsBelong', + name: 'assetsBelong', + store: assetsBelongStore, + queryParam: 'spell', + minChars: 0, + valueField: 'id', + displayField: 'name', + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + typeAhead: false, + allowBlank: true, + anchor: '100%', + listeners: { + select: function (combo, record, index) { top.Ext.getCmp('assetsBelongCode').setValue(record.data.id); } } - }] - },{ - columnWidth : colWidth, - layout : 'form', - items:[{ - xtype : 'combo', - fieldLabel : '标签纸类型', - id : 'barcodePaperType', - name : 'barcodePaperType', - editable:false, - valueField : 'name', - displayField : 'name', - store : barcodePaperTypeStore, - value : defaultBarcodePaperType, - allowBlank : false, - forceSelection : true, - triggerAction : 'all', - anchor : '100%' - }] - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '是否回收', - id : 'isRecycling', - name : 'isRecycling', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - allowBlank : false, - value : '是', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '是否装配', - id : 'isPacking', - name : 'isPacking', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - allowBlank : false, - value : '是', - mode : 'local', - triggerAction : 'all', - anchor : '100%', - listeners : { - select : function (combo, record, index ){ - if(combo.getRawValue() == '否'){ + }] + }, { + columnWidth: colWidth, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '标签纸类型', + id: 'barcodePaperType', + name: 'barcodePaperType', + editable: false, + valueField: 'name', + displayField: 'name', + store: barcodePaperTypeStore, + value: defaultBarcodePaperType, + allowBlank: false, + forceSelection: true, + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '是否回收', + id: 'isRecycling', + name: 'isRecycling', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + allowBlank: false, + value: '是', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '是否装配', + id: 'isPacking', + name: 'isPacking', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + allowBlank: false, + value: '是', + mode: 'local', + triggerAction: 'all', + anchor: '100%', + listeners: { + select: function (combo, record, index) { + if (combo.getRawValue() == '否') { top.Ext.getCmp('isPrint').setValue("否"); top.Ext.getCmp('isPrint').disable(); top.Ext.getCmp('isTraceable').setValue("否"); @@ -1498,7 +1498,7 @@ top.Ext.getCmp('isReview').disable(); top.Ext.getCmp('autoOutStockForPacking').setValue("否"); top.Ext.getCmp('autoOutStockForPacking').disable(); - }else{ + } else { top.Ext.getCmp('isPrint').enable(); top.Ext.getCmp('isTraceable').enable(); top.Ext.getCmp('isReview').enable(); @@ -1507,44 +1507,44 @@ setStatisticsReviewWorkload(); } } - }] - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '是否打印标签', - id : 'isPrint', - name : 'isPrint', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - allowBlank : false, - value : '是', - mode : 'local', - triggerAction : 'all', - anchor : '100%', - listeners : { - select : function (combo, record, index ){ - if(combo.getRawValue() == '否'){ + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '是否打印标签', + id: 'isPrint', + name: 'isPrint', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + allowBlank: false, + value: '是', + mode: 'local', + triggerAction: 'all', + anchor: '100%', + listeners: { + select: function (combo, record, index) { + if (combo.getRawValue() == '否') { top.Ext.getCmp('isTraceable').setValue("否"); top.Ext.getCmp('isTraceable').disable(); top.Ext.getCmp('isReview').setValue("否"); top.Ext.getCmp('isReview').disable(); - + top.Ext.getCmp('isPrintOrg').disable(); top.Ext.getCmp('isPrintOrg').setValue("否"); - + top.Ext.getCmp('printOrgSource').disable(); top.Ext.getCmp('printOrgSource').setValue("无"); - }else{ + } else { top.Ext.getCmp('isTraceable').enable(); top.Ext.getCmp('isReview').enable(); top.Ext.getCmp('isPrintOrg').enable(); @@ -1553,1405 +1553,1405 @@ setStatisticsReviewWorkload(); } } - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 120 : 160, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '自定义装配打印标签', - id : 'isPrintOnDirectPacking', - name : 'isPrintOnDirectPacking', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - allowBlank : false, - value : '否', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '限制发货科室', - id : 'limitInvoiceDepart', - name : 'limitInvoiceDepart', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - allowBlank : false, - value : '否', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'numberfield', - fieldLabel : "打印份数", - allowBlank : false, - allowNegative:false, - minValue: 1, - name : 'printAmount', - id : 'printAmount', - anchor : '100%' - }] - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '是否追溯', - id : 'isTraceable', - name : 'isTraceable', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - value : '是', - allowBlank : false, - triggerAction : 'all', - anchor : '100%', - listeners : { - select : function (combo, record, index ){ - if(combo.getRawValue() == '是'){ + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 120 : 160, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '自定义装配打印标签', + id: 'isPrintOnDirectPacking', + name: 'isPrintOnDirectPacking', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + allowBlank: false, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '限制发货科室', + id: 'limitInvoiceDepart', + name: 'limitInvoiceDepart', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + allowBlank: false, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'numberfield', + fieldLabel: "打印份数", + allowBlank: false, + allowNegative: false, + minValue: 1, + name: 'printAmount', + id: 'printAmount', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '是否追溯', + id: 'isTraceable', + name: 'isTraceable', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + value: '是', + allowBlank: false, + triggerAction: 'all', + anchor: '100%', + listeners: { + select: function (combo, record, index) { + if (combo.getRawValue() == '是') { setFieldsHide(true); top.Ext.getCmp('isReview').enable(); - }else{ + } else { setFieldsHide(false); top.Ext.getCmp('isReview').setValue("否"); top.Ext.getCmp('isReview').disable(); } setStatisticsReviewWorkload(); } } - - }] - }, { - columnWidth : colWidth, - layout : 'form', - items:[{ - xtype : 'combo', - fieldLabel : '是否'+reviewViewText+'', - id : 'isReview', - name : 'isReview', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - value : '是', - allowBlank : false, - triggerAction : 'all', - anchor : '100%', - listeners : { - select : function (combo, record, index ){ - if(combo.getRawValue() == '是'){ + + }] + }, { + columnWidth: colWidth, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '是否' + reviewViewText + '', + id: 'isReview', + name: 'isReview', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + value: '是', + allowBlank: false, + triggerAction: 'all', + anchor: '100%', + listeners: { + select: function (combo, record, index) { + if (combo.getRawValue() == '是') { setFieldsHide(true); - }else{ + } else { setFieldsHide(false); } setStatisticsReviewWorkload(); } } - - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 120 : 160, - items:[{ - xtype : 'combo', - fieldLabel : ''+reviewViewText+'是否算工作量', - id : 'statisticsReviewWorkload', - name : 'statisticsReviewWorkload', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore({ - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - value : '是', - allowBlank : false, - triggerAction : 'all', - anchor : '100%' - - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '是否灭菌', - id : 'isSterile', - name : 'isSterile', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - triggerAction : 'all', - anchor : '100%' - - }] - },{ - columnWidth : colWidth, - layout : 'form', - hidden : !sstsConfig.enableIsInvoice, - items:[{ - xtype : 'combo', - fieldLabel : '是否发货', - id : 'isInvoice', - name : 'isInvoice', - valueField : 'value', - displayField : 'value', - value : '是', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - triggerAction : 'all', - anchor : '100%' - - }] - },{ - columnWidth : colWidth, - layout : 'form', - hidden : !sstsConfig.showAuxiliaryInvoiceBtn, - items:[{ - xtype : 'combo', - fieldLabel : '隐藏辅助发货', - id : 'hideAuxiliaryInvoice', - name : 'hideAuxiliaryInvoice', - valueField : 'value', - displayField : 'value', - value : '否', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - triggerAction : 'all', - anchor : '100%' - - }] - }, { - columnWidth : colWidth, - layout : 'form', - hidden : sstsConfig && sstsConfig.enableTousseDefinitionIsPecPackConfig ? false : true, - items:[{ - xtype : 'combo', - fieldLabel : '是否特殊器械包', - id : 'isPecPack', - name : 'isPecPack', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - id:"scanAmount", - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'numberfield', - fieldLabel : "每次扫描数量", - id : 'scanAmountID', - name : 'scanAmount', - valueField : 'value', - displayField : 'value', - editable : false, - forceSelection : true, - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '自定义装配', - id : 'isCustomPacking', - name : 'isCustomPacking', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - allowBlank : false, - triggerAction : 'all', - anchor : '100%' - }] - - },{ + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 120 : 160, + items: [{ + xtype: 'combo', + fieldLabel: '' + reviewViewText + '是否算工作量', + id: 'statisticsReviewWorkload', + name: 'statisticsReviewWorkload', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + value: '是', + allowBlank: false, + triggerAction: 'all', + anchor: '100%' - columnWidth : colWidth, - layout : 'form', - items:[{ - xtype : 'combo', - fieldLabel : '快速回收', - id : 'expressRecycling', - name : 'expressRecycling', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - allowBlank : true, - triggerAction : 'all', - anchor : '100%' - - }] - - },{ - columnWidth : colWidth, - layout : 'form', - items:[{ - xtype : 'combo', - fieldLabel : '快速发货', - id : 'expressInvoice', - name : 'expressInvoice', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - allowBlank : true, - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - items:[{ - xtype : 'combo', - fieldLabel : '发货数量模式', - id : 'invoiceAmountMode', - name : 'invoiceAmountMode', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['0'],['1'],['2'],['3'],['4']] - }), - editable : false, - forceSelection : true, - mode : 'local', - allowBlank : true, - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - id:"unitField", - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'textfield', - fieldLabel : "单位", - id : 'unit', - name : 'unit', - allowBlank : true, - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - hidden : hiddenEndBarcode, - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'numberfield', - fieldLabel : "装配自动入筐数", - labelWidth:160, - id : 'packingAmountPerVirtualBasket', - name : 'packingAmountPerVirtualBasket', - allowBlank : true, - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '禁用标识牌', - id : 'isDisableIDCard', - name : 'isDisableIDCard', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - allowBlank : true, - triggerAction : 'all', - anchor : '100%', - listeners : { - select : function (combo, record, index ){ - if(combo.getRawValue() == '否'){ + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '是否灭菌', + id: 'isSterile', + name: 'isSterile', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' + + }] + }, { + columnWidth: colWidth, + layout: 'form', + hidden: !sstsConfig.enableIsInvoice, + items: [{ + xtype: 'combo', + fieldLabel: '是否发货', + id: 'isInvoice', + name: 'isInvoice', + valueField: 'value', + displayField: 'value', + value: '是', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' + + }] + }, { + columnWidth: colWidth, + layout: 'form', + hidden: !sstsConfig.showAuxiliaryInvoiceBtn, + items: [{ + xtype: 'combo', + fieldLabel: '隐藏辅助发货', + id: 'hideAuxiliaryInvoice', + name: 'hideAuxiliaryInvoice', + valueField: 'value', + displayField: 'value', + value: '否', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' + + }] + }, { + columnWidth: colWidth, + layout: 'form', + hidden: sstsConfig && sstsConfig.enableTousseDefinitionIsPecPackConfig ? false : true, + items: [{ + xtype: 'combo', + fieldLabel: '是否特殊器械包', + id: 'isPecPack', + name: 'isPecPack', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + id: "scanAmount", + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'numberfield', + fieldLabel: "每次扫描数量", + id: 'scanAmountID', + name: 'scanAmount', + valueField: 'value', + displayField: 'value', + editable: false, + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '自定义装配', + id: 'isCustomPacking', + name: 'isCustomPacking', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + allowBlank: false, + triggerAction: 'all', + anchor: '100%' + }] + + }, { + + columnWidth: colWidth, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '快速回收', + id: 'expressRecycling', + name: 'expressRecycling', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + allowBlank: true, + triggerAction: 'all', + anchor: '100%' + + }] + + }, { + columnWidth: colWidth, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '快速发货', + id: 'expressInvoice', + name: 'expressInvoice', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + allowBlank: true, + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '发货数量模式', + id: 'invoiceAmountMode', + name: 'invoiceAmountMode', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['0'], ['1'], ['2'], ['3'], ['4']] + }), + editable: false, + forceSelection: true, + mode: 'local', + allowBlank: true, + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + id: "unitField", + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'textfield', + fieldLabel: "单位", + id: 'unit', + name: 'unit', + allowBlank: true, + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + hidden: hiddenEndBarcode, + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'numberfield', + fieldLabel: "装配自动入筐数", + labelWidth: 160, + id: 'packingAmountPerVirtualBasket', + name: 'packingAmountPerVirtualBasket', + allowBlank: true, + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '禁用标识牌', + id: 'isDisableIDCard', + name: 'isDisableIDCard', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + allowBlank: true, + triggerAction: 'all', + anchor: '100%', + listeners: { + select: function (combo, record, index) { + if (combo.getRawValue() == '否') { top.Ext.getCmp('idCardPaperType').enable(); - }else{ + } else { top.Ext.getCmp('idCardPaperType').disable(); } } } - }] - },{ - columnWidth : colWidth, - layout : 'form', - items:[{ - xtype : 'combo', - fieldLabel : '标识牌标签', - id : 'idCardPaperType', - name : 'idCardPaperType', - editable:false, - valueField : 'name', - displayField : 'name', - store : idCardBarcodePaperTypeStore, - value : defaultIdCardPaperType, - forceSelection : true, - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 120 : 160, - labelAlign:"right", - items:[{ - xtype : 'numberfield', - fieldLabel : "标识牌最大使用次数", - allowBlank : false, - allowNegative:false, - name : 'autoDiscardCount', - id : 'autoDiscardCount', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'numberfield', - fieldLabel : '清洗筐装载上限', - id : 'intoBasketMaxAmount', - name : 'intoBasketMaxAmount', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '是否停用', - id : 'isDisable', - name : 'isDisable', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - allowBlank : false, - triggerAction : 'all', - anchor : '100%' - - }] - - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '转换申请物品', - id : 'isConvertApplyGoods', - name : 'isConvertApplyGoods', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - allowBlank : false, - triggerAction : 'all', - anchor : '100%', - listeners : { - select : function (combo, record, index ){ - if(combo.getRawValue() == '否'){ - //禁用优先转换并设值为"否" - top.Ext.getCmp('isPriorConvertApplyGoods').disable(); - top.Ext.getCmp('isPriorConvertApplyGoods').setValue('否'); - }else if(top.Ext.getCmp('tousseType').getValue() == '器械包'){ - //启用优先转换 - top.Ext.getCmp('isPriorConvertApplyGoods').enable(); - } + }] + }, { + columnWidth: colWidth, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '标识牌标签', + id: 'idCardPaperType', + name: 'idCardPaperType', + editable: false, + valueField: 'name', + displayField: 'name', + store: idCardBarcodePaperTypeStore, + value: defaultIdCardPaperType, + forceSelection: true, + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 120 : 160, + labelAlign: "right", + items: [{ + xtype: 'numberfield', + fieldLabel: "标识牌最大使用次数", + allowBlank: false, + allowNegative: false, + name: 'autoDiscardCount', + id: 'autoDiscardCount', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'numberfield', + fieldLabel: '清洗筐装载上限', + id: 'intoBasketMaxAmount', + name: 'intoBasketMaxAmount', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '是否停用', + id: 'isDisable', + name: 'isDisable', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + allowBlank: false, + triggerAction: 'all', + anchor: '100%' + + }] + + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '转换申请物品', + id: 'isConvertApplyGoods', + name: 'isConvertApplyGoods', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + allowBlank: false, + triggerAction: 'all', + anchor: '100%', + listeners: { + select: function (combo, record, index) { + if (combo.getRawValue() == '否') { + //禁用优先转换并设值为"否" + top.Ext.getCmp('isPriorConvertApplyGoods').disable(); + top.Ext.getCmp('isPriorConvertApplyGoods').setValue('否'); + } else if (top.Ext.getCmp('tousseType').getValue() == '器械包') { + //启用优先转换 + top.Ext.getCmp('isPriorConvertApplyGoods').enable(); } } - }] - }, { - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - hidden : !sstsConfig.enablePriorConvertApplyGoods, - items:[{ - xtype : 'combo', - fieldLabel : '是否优先转换', - id : 'isPriorConvertApplyGoods', - name : 'isPriorConvertApplyGoods', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - allowBlank : sstsConfig.enablePriorConvertApplyGoods ? false : true, - value : '否', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - }, { - columnWidth : colWidth, - hidden : true,//由于新增了打印科室来源属性,所以该属性隐藏 - layout : 'form', - items:[{ - xtype : 'combo', - fieldLabel : '是否打印科室', - id : 'isPrintOrg', - name : 'isPrintOrg', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - allowBlank : true, - value : '否', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '打印科室来源', - id : 'printOrgSource', - name : 'printOrgSource', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['资产归属'],['回收科室'],['无']] - }), - editable : false, - forceSelection : true, - allowBlank : false, - value : '无', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - hidden : !sstsConfig.isShowTousseDefinitionPrintMaterials, - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '是否打印材料', - id : 'isPrintMaterialForPacking', - name : 'isPrintMaterialForPacking', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - //allowBlank : false, - value : '否', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '器械包分组', - id : 'tousseGroupName', - name : 'tousseGroupName', - editable:false, - valueField : 'id', - displayField : 'tousseGroupName', - store : tousseGroupStore, - forceSelection : true, - allowBlank : true, - triggerAction : 'all', - anchor : '100%', - listeners:{ - select:function(combo, record, index){ - top.Ext.getCmp("tousseGroupID").setValue(record.data.id); - } - } - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'numberfield', - fieldLabel : "保养间隔天数", - allowBlank : true, - allowNegative:false, - name : 'maintainIntervalTime', - id : 'maintainIntervalTime', - anchor : '100%', - listeners:{ - change:function(field,nV,oV){ - var maintainIntervalTimeHidden = top.Ext.getCmp('maintainIntervalTimeHidden').getValue(); - if(maintainIntervalTimeHidden==null || maintainIntervalTimeHidden==""){ - top.Ext.getCmp('maintainIntervalTimeHidden').setValue(oV); - } - } - } - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'numberfield', - fieldLabel : "保养间隔次数", - allowBlank : true, - allowNegative:false, - name : 'maintainIntervalCount', - id : 'maintainIntervalCount', - anchor : '100%', - listeners:{ - change:function(field,nV,oV){ - var maintainIntervalCountHidden = top.Ext.getCmp('maintainIntervalCountHidden').getValue(); - if(maintainIntervalCountHidden==null || maintainIntervalCountHidden==""){ - top.Ext.getCmp('maintainIntervalCountHidden').setValue(oV); - } - } - } - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'textfield', - fieldLabel : "外部编码", - allowBlank : true, - allowNegative:false, - name : 'externalCode', - id : 'externalCode', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '自动扣包内材料', - id : 'autoOutStockForPacking', - name : 'autoOutStockForPacking', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - value : '否', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '是否多层盒装', - id : 'moreBoxPacked', - name : 'moreBoxPacked', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - //allowBlank : false, - value : '否', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '是否外来器械包', - id : 'isForeignTousse', - name : 'isForeignTousse', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - value : '否', - mode : 'local', - triggerAction : 'all', - anchor : '100%', - listeners : { - select : function (combo, record, index ){ - if(combo.getRawValue() == '是'){ - setFieldsHide(true); - top.Ext.getCmp('isPacking').setValue("是"); - top.Ext.getCmp('isPacking').disable(); - top.Ext.getCmp('isTraceable').setValue("是"); - top.Ext.getCmp('isTraceable').disable(); - - top.Ext.getCmp('isPrint').enable(); //启用"是否打印标签" - top.Ext.getCmp('autoOutStockForPacking').enable(); //启用"自动扣包内材料" - top.Ext.getCmp('isReview').enable(); //启用"是否审核" - }else{ - top.Ext.getCmp('isPacking').enable(); - top.Ext.getCmp('isTraceable').enable(); - setFieldsHide(false); - } - setStatisticsReviewWorkload(); + } + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + hidden: !sstsConfig.enablePriorConvertApplyGoods, + items: [{ + xtype: 'combo', + fieldLabel: '是否优先转换', + id: 'isPriorConvertApplyGoods', + name: 'isPriorConvertApplyGoods', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + allowBlank: sstsConfig.enablePriorConvertApplyGoods ? false : true, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + hidden: true,//由于新增了打印科室来源属性,所以该属性隐藏 + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '是否打印科室', + id: 'isPrintOrg', + name: 'isPrintOrg', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + allowBlank: true, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '打印科室来源', + id: 'printOrgSource', + name: 'printOrgSource', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['资产归属'], ['回收科室'], ['无']] + }), + editable: false, + forceSelection: true, + allowBlank: false, + value: '无', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + hidden: !sstsConfig.isShowTousseDefinitionPrintMaterials, + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '是否打印材料', + id: 'isPrintMaterialForPacking', + name: 'isPrintMaterialForPacking', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + //allowBlank : false, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '器械包分组', + id: 'tousseGroupName', + name: 'tousseGroupName', + editable: false, + valueField: 'id', + displayField: 'tousseGroupName', + store: tousseGroupStore, + forceSelection: true, + allowBlank: true, + triggerAction: 'all', + anchor: '100%', + listeners: { + select: function (combo, record, index) { + top.Ext.getCmp("tousseGroupID").setValue(record.data.id); + } + } + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'numberfield', + fieldLabel: "保养间隔天数", + allowBlank: true, + allowNegative: false, + name: 'maintainIntervalTime', + id: 'maintainIntervalTime', + anchor: '100%', + listeners: { + change: function (field, nV, oV) { + var maintainIntervalTimeHidden = top.Ext.getCmp('maintainIntervalTimeHidden').getValue(); + if (maintainIntervalTimeHidden == null || maintainIntervalTimeHidden == "") { + top.Ext.getCmp('maintainIntervalTimeHidden').setValue(oV); } } - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '隐藏装配任务', - id : 'hidePackingTask', - name : 'hidePackingTask', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - value : '否', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '隐藏回收项', - id : 'hideRecycling', - name : 'hideRecycling', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - value : '否', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 120, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '不生成包实例', - id : 'noGenerateTousse', - name : 'noGenerateTousse', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - value : '否', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - hidden : !sstsConfig.enableTousseVoluntarilyUrgent, - items:[{ - xtype : 'numberfield', - allowNegative : false, //不允许负数 - allowDecimals : false, - fieldLabel : '加急预警值', - id : 'urgentWarningValue', - name : 'urgentWarningValue', - anchor : '100%' - }] - },{ + } + }] + }, { columnWidth: colWidth, layout: 'form', labelWidth: fontSize == 12 ? 90 : 100, labelAlign: "right", - hidden:sstsConfig.disableIdCard, items: [{ xtype: 'numberfield', + fieldLabel: "保养间隔次数", + allowBlank: true, + allowNegative: false, + name: 'maintainIntervalCount', + id: 'maintainIntervalCount', + anchor: '100%', + listeners: { + change: function (field, nV, oV) { + var maintainIntervalCountHidden = top.Ext.getCmp('maintainIntervalCountHidden').getValue(); + if (maintainIntervalCountHidden == null || maintainIntervalCountHidden == "") { + top.Ext.getCmp('maintainIntervalCountHidden').setValue(oV); + } + } + } + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'textfield', + fieldLabel: "外部编码", + allowBlank: true, + allowNegative: false, + name: 'externalCode', + id: 'externalCode', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '自动扣包内材料', + id: 'autoOutStockForPacking', + name: 'autoOutStockForPacking', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '是否多层盒装', + id: 'moreBoxPacked', + name: 'moreBoxPacked', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + //allowBlank : false, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '是否外来器械包', + id: 'isForeignTousse', + name: 'isForeignTousse', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%', + listeners: { + select: function (combo, record, index) { + if (combo.getRawValue() == '是') { + setFieldsHide(true); + top.Ext.getCmp('isPacking').setValue("是"); + top.Ext.getCmp('isPacking').disable(); + top.Ext.getCmp('isTraceable').setValue("是"); + top.Ext.getCmp('isTraceable').disable(); + + top.Ext.getCmp('isPrint').enable(); //启用"是否打印标签" + top.Ext.getCmp('autoOutStockForPacking').enable(); //启用"自动扣包内材料" + top.Ext.getCmp('isReview').enable(); //启用"是否审核" + } else { + top.Ext.getCmp('isPacking').enable(); + top.Ext.getCmp('isTraceable').enable(); + setFieldsHide(false); + } + setStatisticsReviewWorkload(); + } + } + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '隐藏装配任务', + id: 'hidePackingTask', + name: 'hidePackingTask', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '隐藏回收项', + id: 'hideRecycling', + name: 'hideRecycling', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 120, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '不生成包实例', + id: 'noGenerateTousse', + name: 'noGenerateTousse', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + hidden: !sstsConfig.enableTousseVoluntarilyUrgent, + items: [{ + xtype: 'numberfield', + allowNegative: false, //不允许负数 + allowDecimals: false, + fieldLabel: '加急预警值', + id: 'urgentWarningValue', + name: 'urgentWarningValue', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + hidden: sstsConfig.disableIdCard, + items: [{ + xtype: 'numberfield', allowNegative: false, //不允许负数 allowDecimals: false, fieldLabel: '最大标识牌数量', id: 'maxIDCardNum', name: 'maxIDCardNum', anchor: '100%' }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - hidden:!sstsConfig.enableToussePointsStatistics, - items:[{ - xtype : 'numberfield', - fieldLabel : "积分系数", - allowBlank : true, - allowNegative:true, - name : 'integral', - id : 'integral', - anchor : '100%' - }] - }, { - columnWidth : 1, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - hidden : !sstsConfig.enableTousseDefinitionBelongDepart, - items:[{ + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + hidden: !sstsConfig.enableToussePointsStatistics, + items: [{ + xtype: 'numberfield', + fieldLabel: "积分系数", + allowBlank: true, + allowNegative: true, + name: 'integral', + id: 'integral', + anchor: '100%' + }] + }, { + columnWidth: 1, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + hidden: !sstsConfig.enableTousseDefinitionBelongDepart, + items: [{ //用于保存时:传递所属科室编码 - xtype : 'hidden', - id : 'belongDepartCodes', - name : 'belongDepartCodes' - },{ + xtype: 'hidden', + id: 'belongDepartCodes', + name: 'belongDepartCodes' + }, { //传递所属科室属性 - xtype : 'hidden', - id : 'hiddenTableDataStr', - name : 'hiddenTableDataStr' - },{ - xtype : 'trigger', - fieldLabel : "所属科室", - allowBlank : true, - name : "belongDepartNames", - id : "belongDepartNames", - msgTarget:'side', - readOnly:true, - style:"cursor: pointer;", - onTriggerClick : function(){ - setDepartOrgUnit2('belongDepartCodes' , 'belongDepartNames' ,'hiddenTableDataStr'); + xtype: 'hidden', + id: 'hiddenTableDataStr', + name: 'hiddenTableDataStr' + }, { + xtype: 'trigger', + fieldLabel: "所属科室", + allowBlank: true, + name: "belongDepartNames", + id: "belongDepartNames", + msgTarget: 'side', + readOnly: true, + style: "cursor: pointer;", + onTriggerClick: function () { + setDepartOrgUnit2('belongDepartCodes', 'belongDepartNames', 'hiddenTableDataStr'); }, - listeners:{ - render:function(item){ - item.getEl().on('click', function(p){ - setDepartOrgUnit2('belongDepartCodes' , 'belongDepartNames' ,'hiddenTableDataStr'); - }); + listeners: { + render: function (item) { + item.getEl().on('click', function (p) { + setDepartOrgUnit2('belongDepartCodes', 'belongDepartNames', 'hiddenTableDataStr'); + }); } }, - triggerClass : 'x-form-search-trigger', - anchor : '100%' + triggerClass: 'x-form-search-trigger', + anchor: '100%' }] - }, { - columnWidth : 1, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - hidden : SSTS_TousseInstanceType_list, - items:[{ + }, { + columnWidth: 1, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + hidden: SSTS_TousseInstanceType_list, + items: [{ //用于保存时:传递所属种类id - xtype : 'hidden', - id : 'instrumentSetType', - name : 'instrumentSetType' - },{ - xtype : 'trigger', - fieldLabel : "所属种类", - allowBlank : true, - name : "instrumentSetTypeName", - id : "instrumentSetTypeName", - msgTarget:'side', - readOnly:true, - onTriggerClick : function(){ + xtype: 'hidden', + id: 'instrumentSetType', + name: 'instrumentSetType' + }, { + xtype: 'trigger', + fieldLabel: "所属种类", + allowBlank: true, + name: "instrumentSetTypeName", + id: "instrumentSetTypeName", + msgTarget: 'side', + readOnly: true, + onTriggerClick: function () { var ids = top.Ext.getCmp('instrumentSetType').getValue(); var names = top.Ext.getCmp('instrumentSetTypeName').getValue(); - setInstrumentSetType('instrumentSetType' , 'instrumentSetTypeName' , ids, names); + setInstrumentSetType('instrumentSetType', 'instrumentSetTypeName', ids, names); }, - triggerClass : 'x-form-search-trigger', - anchor : '100%' + triggerClass: 'x-form-search-trigger', + anchor: '100%' }] }, { - columnWidth : 1, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - hidden : !sstsConfig.enableInstrumentSetTypeSetting, - items:[{ + columnWidth: 1, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + hidden: !sstsConfig.enableInstrumentSetTypeSetting, + items: [{ //用于保存时:传递器械包种类id - xtype : 'hidden', - id : 'tousseSetType', - name : 'tousseSetType' - },{ - xtype : 'trigger', - fieldLabel : "器械包种类", - allowBlank : true, - name : "tousseSetTypeName", - id : "tousseSetTypeName", - msgTarget:'side', - readOnly:true, - onTriggerClick : function(){ + xtype: 'hidden', + id: 'tousseSetType', + name: 'tousseSetType' + }, { + xtype: 'trigger', + fieldLabel: "器械包种类", + allowBlank: true, + name: "tousseSetTypeName", + id: "tousseSetTypeName", + msgTarget: 'side', + readOnly: true, + onTriggerClick: function () { var ids = top.Ext.getCmp('tousseSetType').getValue(); var names = top.Ext.getCmp('tousseSetTypeName').getValue(); - setInstrumentSetType('tousseSetType' , 'tousseSetTypeName' , ids, names); + setInstrumentSetType('tousseSetType', 'tousseSetTypeName', ids, names); }, - triggerClass : 'x-form-search-trigger', - anchor : '100%' + triggerClass: 'x-form-search-trigger', + anchor: '100%' }] - },{ - columnWidth : colWidth, - layout : 'form', - labelAlign:"right", - labelWidth : fontSize == 12 ? 90 : 100, - items:[{ - xtype : 'combo', - fieldLabel : '过期告警提示', - id : 'warningType', - name : 'warningType', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore({ - fields : ['value'], - data : warningTypeArray + }, { + columnWidth: colWidth, + layout: 'form', + labelAlign: "right", + labelWidth: fontSize == 12 ? 90 : 100, + items: [{ + xtype: 'combo', + fieldLabel: '过期告警提示', + id: 'warningType', + name: 'warningType', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: warningTypeArray }), - value : WARNING_TYPE_ALLWARN, - forceSelection : true, - mode : 'local', - editable : false, - triggerAction : 'all', - anchor : '100%', - allowBlank : true - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '是否通用包', - id : 'isCommonTousseStr', - name : 'isCommonTousseStr', - displayField : 'name', - valueField : 'id', - store : new Ext.data.SimpleStore( { - fields : ['name','id'], - data : [['否',0],['是',1]] - }), - editable : false, - forceSelection : true, - mode : 'local', - value : 0, - allowBlank : false, - triggerAction : 'all', - anchor : '100%', - listeners:{ - select:function(combo, record, index){ + value: WARNING_TYPE_ALLWARN, + forceSelection: true, + mode: 'local', + editable: false, + triggerAction: 'all', + anchor: '100%', + allowBlank: true + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '是否通用包', + id: 'isCommonTousseStr', + name: 'isCommonTousseStr', + displayField: 'name', + valueField: 'id', + store: new Ext.data.SimpleStore({ + fields: ['name', 'id'], + data: [['否', 0], ['是', 1]] + }), + editable: false, + forceSelection: true, + mode: 'local', + value: 0, + allowBlank: false, + triggerAction: 'all', + anchor: '100%', + listeners: { + select: function (combo, record, index) { top.Ext.getCmp("isCommonTousse").setValue(record.data.id); } } - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 120 : 160, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '签收后录入使用记录', - id : 'registUseRecordAfterSigned', - name : 'registUseRecordAfterSigned', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - allowBlank : false, - value : '否', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - hidden:!sstsConfig.enableRiskLevelOfTousseDefinition, - items:[{ - xtype : 'combo', - fieldLabel : '风险级别', - id : 'riskLevel', - name : 'riskLevel', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [[1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12],[13],[14],[15],[16],[17],[18],[19],[20]] - }), - editable : false, - forceSelection : true, - allowBlank : true, - mode : 'local', - triggerAction : 'all', - anchor : '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 120 : 160, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '签收后录入使用记录', + id: 'registUseRecordAfterSigned', + name: 'registUseRecordAfterSigned', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + allowBlank: false, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + hidden: !sstsConfig.enableRiskLevelOfTousseDefinition, + items: [{ + xtype: 'combo', + fieldLabel: '风险级别', + id: 'riskLevel', + name: 'riskLevel', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20]] + }), + editable: false, + forceSelection: true, + allowBlank: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: 160, + hidden: !sstsConfig.printBOMwhenPrintLabel, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '打印标签同时打印包内清单', + id: 'printBOMwhenPrintLabel', + name: 'printBOMwhenPrintLabel', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + allowBlank: false, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { + columnWidth: 1, + layout: 'form', + labelWidth: fontSize == 12 ? 90 : 100, + labelAlign: "right", + items: [{ + xtype: 'textarea', + fieldLabel: "配包注意事项", + allowBlank: true, + height: 35, + name: "note", + id: "note", + anchor: '100%' + }] }] - },{ - columnWidth : colWidth, - layout : 'form', - labelWidth : 160, - hidden:!sstsConfig.printBOMwhenPrintLabel, - labelAlign:"right", - items:[{ - xtype : 'combo', - fieldLabel : '打印标签同时打印包内清单', - id : 'printBOMwhenPrintLabel', - name : 'printBOMwhenPrintLabel', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - allowBlank : false, - value : '否', - mode : 'local', - triggerAction : 'all', - anchor : '100%' - }] - },{ - columnWidth : 1, - layout : 'form', - labelWidth : fontSize == 12 ? 90 : 100, - labelAlign:"right", - items:[{ - xtype : 'textarea', - fieldLabel : "配包注意事项", - allowBlank : true, - height :35, - name : "note", - id : "note", - anchor : '100%' - }] - }] - }, { - columnWidth : 0.9, - layout : 'form', - bodyStyle : 'border:1px solid #afd7af', - height:300, - labelWidth : 60, - items : [ - showImagePanel(id) - ] - }] - }], - buttons : [{ - id : 'saveBtn', - text : '保存', - handler : function(){ - save2(null,this,false); - } - }, { - xtype:'button', - text:"另存为", - id:"saveAsTousse", - listeners:{ - click:function(thiz){ + }, { + columnWidth: 0.9, + layout: 'form', + bodyStyle: 'border:1px solid #afd7af', + height: 300, + labelWidth: 60, + items: [ + showImagePanel(id) + ] + }] + }], + buttons: [{ + id: 'saveBtn', + text: '保存', + handler: function () { + save2(null, this, false); + } + }, { + xtype: 'button', + text: "另存为", + id: "saveAsTousse", + listeners: { + click: function (thiz) { newSave(); - /* top.Ext.MessageBox.prompt("提示","请输入器械包名称",function(bu, txt){ - if(bu == 'ok'){ - save2(txt,thiz); - }else{ - return false; - } - }); */ - } - } - }, { - text : '打印条码', - id : 'printTDBarcode', - handler : function(){ - printTDBarcode(id); - } - }, { - text : '器械包图片', - id : 'uploadFile', - hidden:id == 0?true:false, - handler : function(){ - var tousseName = top.Ext.getCmp('name').getValue(); - uploadToussePackingImageFile(imageTypeTousse,id,tousseName); - } - }, { - text : '说明书', - id : 'uploadFile', - hidden:id == 0?true:false, - handler : function(){ - var tousseName = top.Ext.getCmp('name').getValue(); - uploadToussePackingImageFile(imageTypeSpecification,id,tousseName); - } - },{ - text : '清洗操作指引图片', - id : 'washGuideImageFile', - hidden:id == 0?true:false, - handler : function(){ - var tousseName = top.Ext.getCmp('name').getValue(); - uploadToussePackingImageFile(imageTypeWashGuide,id,tousseName); - } - },{ - text : '装配教学图片', - id : 'uploadToussePackingImageFile', - hidden:id == 0?true:false, - handler : function(){ - var tousseName = top.Ext.getCmp('name').getValue(); - uploadToussePackingImageFile(imageTypeToussePacking,id,tousseName); - } - }, { - text : '配包教学视频', - id : 'uploadVedio', - handler : function(){ + /* top.Ext.MessageBox.prompt("提示","请输入器械包名称",function(bu, txt){ + if(bu == 'ok'){ + save2(txt,thiz); + }else{ + return false; + } + }); */ + } + } + }, { + text: '打印条码', + id: 'printTDBarcode', + handler: function () { + printTDBarcode(id); + } + }, { + text: '器械包图片', + id: 'uploadFile', + hidden: id == 0 ? true : false, + handler: function () { var tousseName = top.Ext.getCmp('name').getValue(); - uploadToussePackingVideoFile(videoType,id,tousseName); - } - }, { - text : '取消', - id : 'saveAndNewBtn', - handler : function(){ - tousseWin.close(); - grid.dwrReload(); - } - }] + uploadToussePackingImageFile(imageTypeTousse, id, tousseName); + } + }, { + text: '说明书', + id: 'uploadFile', + hidden: id == 0 ? true : false, + handler: function () { + var tousseName = top.Ext.getCmp('name').getValue(); + uploadToussePackingImageFile(imageTypeSpecification, id, tousseName); + } + }, { + text: '清洗操作指引图片', + id: 'washGuideImageFile', + hidden: id == 0 ? true : false, + handler: function () { + var tousseName = top.Ext.getCmp('name').getValue(); + uploadToussePackingImageFile(imageTypeWashGuide, id, tousseName); + } + }, { + text: '装配教学图片', + id: 'uploadToussePackingImageFile', + hidden: id == 0 ? true : false, + handler: function () { + var tousseName = top.Ext.getCmp('name').getValue(); + uploadToussePackingImageFile(imageTypeToussePacking, id, tousseName); + } + }, { + text: '配包教学视频', + id: 'uploadVedio', + handler: function () { + var tousseName = top.Ext.getCmp('name').getValue(); + uploadToussePackingVideoFile(videoType, id, tousseName); + } + }, { + text: '取消', + id: 'saveAndNewBtn', + handler: function () { + tousseWin.close(); + grid.dwrReload(); + } + }] }); - + var tabs; - if(id != 0 && !sstsConfig.disableIdCard){ //修改,并且启用标识牌功能 + if (id != 0 && !sstsConfig.disableIdCard) { //修改,并且启用标识牌功能 showIDCardListView(); //创建标识牌信息页面 var modifyRecordGrid = showModifyRecordGrid(id); tabs = new top.Ext.TabPanel({ - activeTab : 0, - plain : false, - bufferResize : true, - deferredRender :false, - items:[{ - id : 'abc', - layout : 'column', - title: '基本信息', -// autoScroll : true, - items:[formObj,{ - columnWidth: 0.4, - layout : 'fit', - items:[materialsPanel] - }] - },{ - id : 'signBoardID', - layout : 'fit', - title: '标识牌', - items:[signBoardForm] - },{ - id : 'modifyRecord', - layout : 'fit', - title: '改动记录', - items:[modifyRecordGrid] + activeTab: 0, + plain: false, + bufferResize: true, + deferredRender: false, + items: [{ + id: 'abc', + layout: 'column', + title: '基本信息', + // autoScroll : true, + items: [formObj, { + columnWidth: 0.4, + layout: 'fit', + items: [materialsPanel] + }] + }, { + id: 'signBoardID', + layout: 'fit', + title: '标识牌', + items: [signBoardForm] + }, { + id: 'modifyRecord', + layout: 'fit', + title: '改动记录', + items: [modifyRecordGrid] }] }); } - + tousseWin = new top.Ext.Window({ - id : 'tousseWin', - layout : 'fit', - title : '器械包信息', - width : fontSize == 12 ? 1200 : 1300, - border : false, - modal : true, - height : top.screen.height > 800 ? 660 : 500, - plain : true, - items : [tabs ? tabs : { - id : 'abc', - layout : 'column', - title: '基本信息', - items:[formObj,{ - columnWidth: 0.4, - layout : 'fit', - items:[materialsPanel] + id: 'tousseWin', + layout: 'fit', + title: '器械包信息', + width: fontSize == 12 ? 1200 : 1300, + border: false, + modal: true, + height: top.screen.height > 800 ? 660 : 500, + plain: true, + items: [tabs ? tabs : { + id: 'abc', + layout: 'column', + title: '基本信息', + items: [formObj, { + columnWidth: 0.4, + layout: 'fit', + items: [materialsPanel] }] }] }); tousseWin.show(); //ZSRY-16:拖动排序 new top.Ext.dd.DropTarget(materialsPanel.getEl(), { - ddGroup: 'gridDD', - copy : false, + ddGroup: 'gridDD', + copy: false, notifyDrop: function (dd, e, data) { //选择行 - var rows = materialsPanel.getSelectionModel().getSelections(); + var rows = materialsPanel.getSelectionModel().getSelections(); //选择行数 var count = rows.length; //拖动到几行 - var dropIndex = dd.getDragData(e).rowIndex; - var array=[]; - if(dropIndex == undefined){ + var dropIndex = dd.getDragData(e).rowIndex; + var array = []; + if (dropIndex == undefined) { return; } - if(data.rowIndex < dropIndex){ - for(var i=0;i 0){ - for(var i=0;i 0) { + for (var i = 0; i < tousseDefinition.instrumentSetTypeJSONArray.length; i++) { ids[i] = tousseDefinition.instrumentSetTypeJSONArray[i].id; names[i] = tousseDefinition.instrumentSetTypeJSONArray[i].name; } top.Ext.getCmp('instrumentSetType').setValue(ids.join(';')); top.Ext.getCmp('instrumentSetTypeName').setValue(names.join(';')); - }else { + } else { top.Ext.getCmp('instrumentSetType').setValue(''); top.Ext.getCmp('instrumentSetTypeName').setValue(''); } - if(tousseDefinition.tousseSetTypeJSONArray &&tousseDefinition.tousseSetTypeJSONArray.length > 0){ - for(var i=0;i 0) { + for (var i = 0; i < tousseDefinition.tousseSetTypeJSONArray.length; i++) { ids[i] = tousseDefinition.tousseSetTypeJSONArray[i].id; names[i] = tousseDefinition.tousseSetTypeJSONArray[i].name; } top.Ext.getCmp('tousseSetType').setValue(ids.join(';')); top.Ext.getCmp('tousseSetTypeName').setValue(names.join(';')); - }else { + } else { top.Ext.getCmp('tousseSetType').setValue(''); top.Ext.getCmp('tousseSetTypeName').setValue(''); } - if(tousseDefinition.printBOMwhenPrintLabel == ''){ + if (tousseDefinition.printBOMwhenPrintLabel == '') { top.Ext.getCmp('printBOMwhenPrintLabel').setValue('否'); } } @@ -3049,7 +3049,7 @@ var materialType = 0; mStore.each(function (record) { // 只统计机械类型的数量和种类 - if ("器械" == record.get('type')){ + if ("器械" == record.get('type')) { materialCount += record.get('count'); materialType++; } @@ -3062,19 +3062,19 @@ * 计算材料的成本价格 * @param panel 材料的panel */ -function setMaterialCostPrice(panel){ +function setMaterialCostPrice(panel) { var mStore = panel.getStore(); var totalMoney = 0; mStore.each(function (record) { var amount = record.get('count'); - var cost = record.get('cost'); - if(cost == undefined || cost == null || cost == ""){ + var cost = record.get('cost'); + if (cost == undefined || cost == null || cost == "") { cost = 0; - } - - var muls = mul(amount,cost);//相乘 - totalMoney = add(totalMoney,muls);//相加 - + } + + var muls = mul(amount, cost);//相乘 + totalMoney = add(totalMoney, muls);//相加 + }); top.Ext.getCmp('costPrice').setValue(totalMoney); } @@ -3087,35 +3087,35 @@ * 4.材料清单有材料被删除时 * @returns */ -function recountDisinfectionGoodsPrice(){ +function recountDisinfectionGoodsPrice() { var disinfectionPrice = 0; var configStore = top.Ext.getCmp('configGrid').getStore(); - if(configStore.data && configStore.data.items && configStore.data.items.length > 0){ - for(var i = 0;i < configStore.data.items.length;i++){ - if(configStore.data.items[i] && configStore.data.items[i].data && configStore.data.items[i].data.price && configStore.data.items[i].data.count){ + if (configStore.data && configStore.data.items && configStore.data.items.length > 0) { + for (var i = 0; i < configStore.data.items.length; i++) { + if (configStore.data.items[i] && configStore.data.items[i].data && configStore.data.items[i].data.price && configStore.data.items[i].data.count) { var priceMul = configStore.data.items[i].data.price; priceMul = !priceMul ? 0 : priceMul; var countMul = configStore.data.items[i].data.count; countMul = !countMul ? 0 : countMul; - disinfectionPrice = add(disinfectionPrice , (mul(priceMul , countMul))); + disinfectionPrice = add(disinfectionPrice, (mul(priceMul, countMul))); } } } return disinfectionPrice; } -function validateAndSubmit2(TousseName,isExpend){ +function validateAndSubmit2(TousseName, isExpend) { var orginalName = top.Ext.getCmp('orginalName').getValue(); //原器械包名称 var orginalSpelling = top.Ext.getCmp('orginalSpelling').getValue(); //原拼音码 var name = top.Ext.getCmp('name').getValue(); var spelling = top.Ext.getCmp('spelling').getValue(); var assetsBelong = top.Ext.getCmp('assetsBelong').getRawValue(); - if(assetsBelong == ''){ + if (assetsBelong == '') { top.Ext.getCmp('assetsBelong').setValue(''); top.Ext.getCmp('assetsBelongCode').setValue(''); } if ((orginalName && orginalName != name && orginalSpelling == spelling) - || TousseName) { //(修改操作,并且修改了名字,并且没有手动修改过拼音码)或者(另存为新的器械包操作),则清空让后台自动生成 + || TousseName) { //(修改操作,并且修改了名字,并且没有手动修改过拼音码)或者(另存为新的器械包操作),则清空让后台自动生成 top.Ext.getCmp('spelling').setValue(''); } var configGridStore = top.Ext.getCmp('configGrid').getStore(); @@ -3129,49 +3129,49 @@ var materials = []; // 设置序号 setMaterialSequence(); - for(var i =0 ;i < rowIndex ; i++ ){ + for (var i = 0; i < rowIndex; i++) { var record = configGridStore.getAt(i); var id = record.data.id; var name = record.get('name'); var count = record.get('count'); var type = record.get('type'); var sequence = record.get('sequence'); var material = { - name: name, - tousseType: type, - count: count, - sequence: sequence + name: name, + tousseType: type, + count: count, + sequence: sequence } materials.push(material); } - var validateId = (TousseName ==null? top.Ext.getCmp('id').getValue():null); - var validateName = (TousseName ==null? top.Ext.getCmp('name').getValue():TousseName); + var validateId = (TousseName == null ? top.Ext.getCmp('id').getValue() : null); + var validateName = (TousseName == null ? top.Ext.getCmp('name').getValue() : TousseName); var tousseType = top.Ext.getCmp('tousseType').getValue(); - + var expendTousseImg = ""; var expendInstructionBook = ""; var expendWashOperationImg = ""; var expendPackingviewImg = ""; var expendPackingviewVideo = ""; var originTousseId = ""; - - if(isExpend){//如果是另存为的话,就把沿用的那几项的选择传过去 + + if (isExpend) {//如果是另存为的话,就把沿用的那几项的选择传过去 originTousseId = top.Ext.getCmp('id').getValue(); expendTousseImg = top.Ext.getCmp('expendTousseImg').getValue(); expendInstructionBook = top.Ext.getCmp('expendInstructionBook').getValue(); expendWashOperationImg = top.Ext.getCmp('expendWashOperationImg').getValue(); expendPackingviewImg = top.Ext.getCmp('expendPackingviewImg').getValue(); expendPackingviewVideo = top.Ext.getCmp('expendPackingviewVideo').getValue(); - } - + } + Ext.Ajax.request({ - url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!validate.do', - params : {validateId :validateId,valifateName:validateName,tousseType: tousseType}, - success : function(response, options) { + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!validate.do', + params: { validateId: validateId, valifateName: validateName, tousseType: tousseType }, + success: function (response, options) { var result = Ext.decode(response.responseText); - - if(result.stauts==1){ - if(TousseName != null){ + + if (result.stauts == 1) { + if (TousseName != null) { top.Ext.getCmp('id').setValue(null); top.Ext.getCmp('name').setValue(TousseName); } @@ -3189,54 +3189,54 @@ top.Ext.getCmp('autoOutStockForPacking').enable(); //启用“自动扣包内材料”下拉框 var isCommonTousseStr = top.Ext.getCmp('isCommonTousseStr').getRawValue(); var isCommonTousse = top.Ext.getCmp('isCommonTousse').getValue(); - if(isCommonTousseStr == '' || isCommonTousse == '' || isCommonTousse == 0){ + if (isCommonTousseStr == '' || isCommonTousse == '' || isCommonTousse == 0) { top.Ext.getCmp('isCommonTousse').setValue(null); } - formObj.form.submit( { - url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!saveTousseDefinition.do', - method : 'POST', - waitMsg : '正在保存数据,请稍候', - waitTitle : '提交表单', - params : { - materialDefinitionConfigResult : JSON.stringify(materials), - belongOrgUnitCodes : belongOrgUnitCodes, - instrumentSetTypeIds:instrumentSetType, - tousseSetTypeIds:tousseSetType, - belongOrgUnit : JSON.stringify(belongOrgUnit), - expendTousseImg:expendTousseImg, - expendInstructionBook:expendInstructionBook, - expendWashOperationImg:expendWashOperationImg, - expendPackingviewImg:expendPackingviewImg, - expendPackingviewVideo:expendPackingviewVideo, - originTousseId:originTousseId + formObj.form.submit({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!saveTousseDefinition.do', + method: 'POST', + waitMsg: '正在保存数据,请稍候', + waitTitle: '提交表单', + params: { + materialDefinitionConfigResult: JSON.stringify(materials), + belongOrgUnitCodes: belongOrgUnitCodes, + instrumentSetTypeIds: instrumentSetType, + tousseSetTypeIds: tousseSetType, + belongOrgUnit: JSON.stringify(belongOrgUnit), + expendTousseImg: expendTousseImg, + expendInstructionBook: expendInstructionBook, + expendWashOperationImg: expendWashOperationImg, + expendPackingviewImg: expendPackingviewImg, + expendPackingviewVideo: expendPackingviewVideo, + originTousseId: originTousseId }, - success : function(form, action) { - if(isExpend){//如果是另存为的话,就还要关闭另存信息弹窗 + success: function (form, action) { + if (isExpend) {//如果是另存为的话,就还要关闭另存信息弹窗 newSaveMsgWin.close(); } tousseWin.close(); showResult('保存成功'); grid.dwrReload(); }, - failure : function(form, action) { + failure: function (form, action) { showResult(action.result.message); top.Ext.getCmp('saveBtn').enable(); } }); - }else{ + } else { showResult(result.message); top.Ext.getCmp('saveBtn').enable(); } }, - failure : function(response, options) { + failure: function (response, options) { var result = Ext.decode(response.responseText); showResult(result.cause); } }); - + } -function save2(TousseName,thiz,isExpend) { +function save2(TousseName, thiz, isExpend) { var isExpend = isExpend; thiz.disable(); if (!formObj.form.isValid()) { @@ -3246,82 +3246,82 @@ } var name = top.Ext.getCmp('name').getValue(); var regex = /[\?\&\'\"]+/; - if(regex.test(name)){ + if (regex.test(name)) { showResult('名称不能包含?&\'"'); thiz.enable(); return false; } - + var materialsCount = configStore.getCount(); - if (materialsCount <= 0 ){ + if (materialsCount <= 0) { showResult('材料不能为空!'); thiz.enable(); return false; } - - for(var i = 0 ;i < materialsCount;i++){ - var materialName = top.Ext.getCmp('configGrid').getView().getCell(i,0).firstChild.innerText; - if(materialName == '' || materialName == null || materialName == ' '){ + + for (var i = 0; i < materialsCount; i++) { + var materialName = top.Ext.getCmp('configGrid').getView().getCell(i, 0).firstChild.innerText; + if (materialName == '' || materialName == null || materialName == ' ') { showResult('请填写材料名称!'); thiz.enable(); return false; } } - + var intoBasketMaxAmount = top.Ext.getCmp('intoBasketMaxAmount').getValue(); - if(intoBasketMaxAmount != ""){ - var re = /^[0-9]*[1-9][0-9]*$/ ; - if(!re.test(intoBasketMaxAmount)){ + if (intoBasketMaxAmount != "") { + var re = /^[0-9]*[1-9][0-9]*$/; + if (!re.test(intoBasketMaxAmount)) { showResult("清洗筐装载数量上限必须是正整数!"); return; } } var integral = top.Ext.getCmp('integral').getValue(); - if(integral != null && integral != ''){ - if(integral > 10000 || integral < -10000 ){ + if (integral != null && integral != '') { + if (integral > 10000 || integral < -10000) { showResult("积分只能是-10000.00至10000.00的数值"); return; } } - if(isExpend){ - validateAndSubmit2(TousseName,isExpend); - }else{ - top.Ext.MessageBox.confirm("请确认","是否确定要保存器械包?", - function(button, text) { - if ("yes" == button){ - validateAndSubmit2(TousseName,isExpend); - }else{ + if (isExpend) { + validateAndSubmit2(TousseName, isExpend); + } else { + top.Ext.MessageBox.confirm("请确认", "是否确定要保存器械包?", + function (button, text) { + if ("yes" == button) { + validateAndSubmit2(TousseName, isExpend); + } else { thiz.enable(); } - }); + }); } - + } -function printTDBarcode(id){ - if(id != null && id > 0){ +function printTDBarcode(id) { + if (id != null && id > 0) { var records = grid.getSelectionModel().getSelections(); var tousseType = records[0].data['tousseType']; Ext.Ajax.request({ - url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!printTDBarcode.do', - params : {toussedefinitionID : id}, - success : function(response, options) { + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!printTDBarcode.do', + params: { toussedefinitionID: id }, + success: function (response, options) { var result = Ext.decode(response.responseText); var barcode = result.barcode; - if(barcode){ + if (barcode) { var name = top.Ext.getCmp("name").getValue(); var unitName2 = ""; DWREngine.setAsync(false); - SupplyRoomConfigTableManager.getUnitName(function(unitName){ - if(unitName != null && unitName != ""){ + SupplyRoomConfigTableManager.getUnitName(function (unitName) { + if (unitName != null && unitName != "") { unitName2 = unitName; } }); DWREngine.setAsync(true); - preview_fixedBarcode(barcode,name,unitName2); + preview_fixedBarcode(barcode, name, unitName2); } }, - failure : function(response, options) { + failure: function (response, options) { var result = Ext.decode(response.responseText); showResult(result.cause); } @@ -3330,17 +3330,17 @@ } // 打印预览 -function preview_fixedBarcode(barcode,name,unitName) { +function preview_fixedBarcode(barcode, name, unitName) { var obj = { - barcode:barcode, - name:name, - unitName:unitName, - defaultPrintFun: function(){ - preview(barcode,name,unitName); - }, - dataSourceName: '固定条码', - styleName: '默认', - _printType: 'preview' + barcode: barcode, + name: name, + unitName: unitName, + defaultPrintFun: function () { + preview(barcode, name, unitName); + }, + dataSourceName: '固定条码', + styleName: '默认', + _printType: 'preview' } printObjWithdefaultPrintFun(obj); }; @@ -3352,16 +3352,16 @@ function loadTousseBelongOrgUnitByTDId(id) { Ext.Ajax.request({ url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!loadTousseBelongOrgUnitByTDId.do', - params: {tousseDefinitionId: id}, + params: { tousseDefinitionId: id }, success: function (response, options) { var result = Ext.decode(response.responseText); var data = result.data; if (result.success) { - if(!isUndefinedOrNullOrEmpty(data)){ + if (!isUndefinedOrNullOrEmpty(data)) { var belongDepartCodes = []; var belongDepartNames = []; var hiddenTableData = []; - for(var i = 0; i < data.length ; i++){ + for (var i = 0; i < data.length; i++) { var orgUnit = data[i]; belongDepartCodes.push(orgUnit.departCode); belongDepartNames.push(orgUnit.departName); @@ -3370,8 +3370,8 @@ context: orgUnit.departName, nodeId: orgUnit.id, parentId: orgUnit.parentId, - basicData:{ - departCode:orgUnit.departCode + basicData: { + departCode: orgUnit.departCode } } } @@ -3382,12 +3382,12 @@ //所属科室属性 top.Ext.getCmp('hiddenTableDataStr').setValue(JSON.stringify(hiddenTableData)); } - }else{ - showResult("加载器械包定义所属科室报错"+result.message) + } else { + showResult("加载器械包定义所属科室报错" + result.message) } }, failure: function (response, options) { - showResult("加载器械包定义所属科室报错"); + showResult("加载器械包定义所属科室报错"); } }); } \ No newline at end of file