Index: ssts-web/src/main/webapp/disinfectsystem/config/szsdsrmyy/config.js =================================================================== diff -u -r27199 -r27230 --- ssts-web/src/main/webapp/disinfectsystem/config/szsdsrmyy/config.js (.../config.js) (revision 27199) +++ ssts-web/src/main/webapp/disinfectsystem/config/szsdsrmyy/config.js (.../config.js) (revision 27230) @@ -98,5 +98,7 @@ // 聚合包按大包发货 comboTousseSendByWrapperTousse: true, //是否允许回收数量减小的部分超过待装配数量 - allowDecreaseRecyclingAmountGreatUnPackingAmount : true + allowDecreaseRecyclingAmountGreatUnPackingAmount : true, + //手术间是下拉框还是文本框,true下拉框,false或者不配置文本框 + onlySelectExistedOperationRoom:true } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js =================================================================== diff -u -r27218 -r27230 --- ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 27218) +++ ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 27230) @@ -49,6 +49,22 @@ ] }); +//手术间的store +var operationRoomJsonStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/operationRoomAction!getOperationRoomByCurrentOrgUnitCode.do', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + root : 'data', + fields : [ + {name : 'id'}, + {name : 'operationRoomName'} + ] + }) +}); + + /** * 使用记录录入的物品信息(含录入的器械包、一次性物品(普通物品与高值耗材)、器械材料(仅类型为高值耗材)、高值耗材等) */ @@ -1618,23 +1634,51 @@ columnWidth : 0.33, hidden:fromDepartmentUseRecord, items : [{ - xtype : 'textfield', + xtype : sstsConfig.onlySelectExistedOperationRoom ? 'combo' :'textfield', fieldLabel : '手术间', id : 'operationRoom', name : 'operationRoom', maxLength:10, maxLengthText :'长度超过限制,不能保存!', allowBlank : fromDepartmentUseRecord || (sstsConfig.allowAllBlankExceptThreeSpecialFields ? true : useRecordOperationRoomAllowBlank), anchor : '96%', + valueField : 'operationRoomName', + displayField : 'operationRoomName', + listConfig: {width : 193}, + matchFieldWidth: false, + store : sstsConfig.onlySelectExistedOperationRoom ? operationRoomJsonStore : "", + lazyInit : true, + triggerAction : sstsConfig.onlySelectExistedOperationRoom ? 'all' : "", + hideTrigger : sstsConfig.onlySelectExistedOperationRoom ? false: true,//隐藏向下箭头 + typeAhead : false, + editable: sstsConfig.onlySelectExistedOperationRoom ? false : true, + forceSelection : sstsConfig.onlySelectExistedOperationRoom ? true: false, listeners:{ render : function(c) { c.getEl().on('keypress', function(e) { + if (e.getKey() == 13) { + top.Ext.getCmp("hospitalNum").focus(); + } + }); + } + } + /* xtype : 'textfield', + fieldLabel : '手术间', + id : 'operationRoom', + name : 'operationRoom', + maxLength:10, + maxLengthText :'长度超过限制,不能保存!', + allowBlank : fromDepartmentUseRecord || (sstsConfig.allowAllBlankExceptThreeSpecialFields ? true : useRecordOperationRoomAllowBlank), + anchor : '96%', + listeners:{ + render : function(c) { + c.getEl().on('keypress', function(e) { if (e.getKey() == 13) {// top.Ext.getCmp("hospitalNum").focus(); } }); } - } + } */ }] },{ layout : 'form', Index: ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js =================================================================== diff -u -r24994 -r27230 --- ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js (.../operationReservationView.js) (revision 24994) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js (.../operationReservationView.js) (revision 27230) @@ -202,6 +202,26 @@ Ext.apply(store.baseParams, new_params); }); + //手术间的store + var operationRoomJsonStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/operationRoomAction!getOperationRoomByOrgUnitCode.do', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + totalProperty : 'totalCount', + root : 'data' + },[ + {name : 'id',mapping : 'id'}, + {name : 'operationRoomName',mapping : 'operationRoomName'} + ] + ), + listeners: { + beforeload: function(s,options){ + s.baseParams.orgUnitCode = top.Ext.getCmp('departCoding').getValue(); + } + } + }); //添加明细 function addItems(itemId,tousseDefinitionId,name,amount){ if(name == null || name == ''){ @@ -338,8 +358,10 @@ top.Ext.getCmp('departCoding').setValue(record.data.id); top.Ext.getCmp('depart').setValue(record.data.name); operationNameStore.load(); - handleDepartStore.load(); + operationRoomJsonStore.baseParams.orgUnitCode = record.data.id; + operationRoomJsonStore.load(); + } } }] @@ -371,14 +393,35 @@ layout : 'form', labelWidth : 65, items : [{ - xtype : 'textfield', + xtype : sstsConfig.onlySelectExistedOperationRoom ? 'combo' :'textfield', fieldLabel : '手术间', id : 'operatingRoom', name : 'operatingRoom', + minChars : 0, maxLength:10, maxLengthText :'长度超过限制,不能保存!', allowBlank : useRecordOperationRoomAllowBlank, - anchor : '100%' + anchor : '100%', + valueField : 'operationRoomName', + displayField : 'operationRoomName', + listConfig: {width : 193}, + matchFieldWidth: false, + store : sstsConfig.onlySelectExistedOperationRoom ? operationRoomJsonStore : "", + lazyInit : true, + triggerAction : sstsConfig.onlySelectExistedOperationRoom ? 'all' : "", + hideTrigger : sstsConfig.onlySelectExistedOperationRoom ? false: true,//隐藏向下箭头 + typeAhead : false, + editable: sstsConfig.onlySelectExistedOperationRoom ? false : true, + forceSelection : sstsConfig.onlySelectExistedOperationRoom ? true: false + + /* xtype : 'textfield', + fieldLabel : '手术间', + id : 'operatingRoom', + name : 'operatingRoom', + maxLength:10, + maxLengthText :'长度超过限制,不能保存!', + allowBlank : useRecordOperationRoomAllowBlank, + anchor : '100%' */ }] },{ columnWidth : .33, Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js =================================================================== diff -u -r27225 -r27230 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 27225) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 27230) @@ -18,6 +18,7 @@ var oldSupplierName = null; //不是新建记录旧的供应商名称 //外来器械申请单id var foreignTousseApplicationId; +var orgUnitCodeOperationRoom= null; //外来器械材料种类颜色管理 var washClassifyTypeColor = sstsConfig.washClassifyTypeColorManager || { '平面类' : 'yellow-row', @@ -1060,6 +1061,27 @@ } } }); + + //手术间的store + var operationRoomJsonStore = new Ext4.data.Store({ + proxy : { + type : 'ajax', + url : WWWROOT + '/disinfectSystem/baseData/operationRoomAction!getOperationRoomByOrgUnitCode.do', + reader : { + type : 'json', + root : 'data' + } + }, + fields :[ + {name : 'id',mapping : 'id'}, + {name : 'operationRoomName',mapping : 'operationRoomName'} + ], + listeners : { + beforeload: function(store, operation, eOpts){ + store.proxy.extraParams.orgUnitCode = orgUnitCodeOperationRoom; + } + } + }); /** @@ -2054,6 +2076,9 @@ 'settleAccountsDepart' : 'name', 'settleAccountsDepartCoding' : 'id' } + orgUnitCodeOperationRoom = record[0].get('id'); + operationRoomJsonStore.proxy.extraParams.orgUnitCode = orgUnitCodeOperationRoom; + operationRoomJsonStore.load(); resetComboData({val: record[0].get('name'), property : 'name'}, settleDepartJsonStore, setObj); //simon-update:根据"申请科室"值,查询对应设置的"结算科室" DWREngine.setAsync(false); @@ -2349,13 +2374,28 @@ flex : 1, items : [ { - xtype : 'textfield', + xtype : 'combo', fieldLabel : '手术间', id : 'operationRoom', name : 'operationRoom', width : '33.3%', + flex : .33, + maxLength:10, + maxLengthText :'长度超过限制,不能保存!', + // queryParam : 'spell', + minChars : 0, + valueField : 'operationRoomName', + displayField : 'operationRoomName', + listConfig: {width : 193}, + matchFieldWidth: false, + store : sstsConfig.onlySelectExistedOperationRoom ? operationRoomJsonStore : "", + lazyInit : true, + triggerAction : 'all', + hideTrigger : sstsConfig.onlySelectExistedOperationRoom ? false: true,//隐藏向下箭头 + typeAhead : false, allowBlank : true, - flex : .33 + editable: sstsConfig.onlySelectExistedOperationRoom ? false : true, + forceSelection : sstsConfig.onlySelectExistedOperationRoom ? true: false },{ xtype : 'combo', fieldLabel : '供应商联系人', @@ -2671,6 +2711,7 @@ // 1、查找默认的“申请科室”和“结算科室”,首先取科室供应室配置的,再取config里面的配置,都没有取到才设置为当前登录科室的 var depart = $Id('depart').value; var departCoding = $Id('departCoding').value; + orgUnitCodeOperationRoom = departCoding; var appDepart = depart; var appDepartCode = departCoding; var settleAccountsDepart = depart; Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/operationRoom/operationRoomForm.js =================================================================== diff -u -r18164 -r27230 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/operationRoom/operationRoomForm.js (.../operationRoomForm.js) (revision 18164) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/operationRoom/operationRoomForm.js (.../operationRoomForm.js) (revision 27230) @@ -13,6 +13,12 @@ return false; } + if(top.Ext.getCmp('operationRoomName').getValue().length > 10){ + showResult('手术间名称最多只能是10个字符!'); + saveBtn.enable(); + return false; + } + top.Ext.getCmp('isInvoice').enable(); formObj.form.submit({ url : WWWROOT + '/disinfectSystem/baseData/operationRoomAction!saveOperationRoom.do',