Index: ssts-web/src/main/webapp/disinfectsystem/config/gzthzlyy/menu/menuconfigure.js =================================================================== diff -u -r31410 -r31987 --- ssts-web/src/main/webapp/disinfectsystem/config/gzthzlyy/menu/menuconfigure.js (.../menuconfigure.js) (revision 31410) +++ ssts-web/src/main/webapp/disinfectsystem/config/gzthzlyy/menu/menuconfigure.js (.../menuconfigure.js) (revision 31987) @@ -783,7 +783,8 @@ {hidden :SSTS_chargeRecordManage_MENU,text:"收费项目设置",href:encodeURI(WWWROOT+'/systemmanage/httpOption.mhtml?listId=chargeItem&optionName=收费项目设置'),hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_SupplyRoomType_manager,text:"供应室处理器械包配置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/cssdHandleToussesView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_SupplyRoomType_manager,text:"供应室服务临床科室配置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/cssdServiceDeptsView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, - {hidden :SSTS_SupplyRoomType_manager,text:"科室供应室设置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true} + {hidden :SSTS_SupplyRoomType_manager,text:"科室供应室设置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, + {hidden :!sstsConfig.enablePackingMaterialsCheckFunction,text:"配包需逐一检查材料的物品",href:WWWROOT+'/disinfectsystem/basedatamanager/packingMaterialsCheck/packingMaterialsCheckView.jsp',hrefTarget:linkTarget,leaf:true} ] },{ text:"个人设置", Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/packingMaterialsCheck/packingMaterialsCheckForm.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/packingMaterialsCheck/packingMaterialsCheckForm.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/packingMaterialsCheck/packingMaterialsCheckForm.js (revision 31987) @@ -0,0 +1,233 @@ +var tousseWin; +var tousseListStore; + +//删除选择的物品 +function removeTousseItem(id) { + for (var i = 0; i < tousseListStore.getCount(); i++) { + var item = tousseListStore.data.items[i]; + if (item.data.id == id) { + tousseListStore.remove(item) + } + } +} + +//检查物品是否存在 +function isTousseRepeat(name) { + if (name != null && name.length > 0) { + for (var i = 0; i < tousseListStore.getCount(); i++) { + var record = tousseListStore.getAt(i); + var tempName = record.get('name'); + if (name == tempName) { + return true; + } + } + } + return false; +} + +//添加物品 +function addTousseItem(id, name) { + if (name == null || name == '') { + showResult('请选择物品!'); + return false; + } + var b = isTousseRepeat(name); + if (b) { + showResult('物品:[' + name + '] 已存在!'); + top.Ext4.getCmp('tousseName').setValue(""); + return false; + } + var record = { + id: id, + name: name + }; + tousseListStore.add(record) + top.Ext4.getCmp("tousseName").setValue(""); +} + +//添加搜索结果的物品 +function addTousseItems(id, name) { + var b = isTousseRepeat(name); + if (b) { + return; + } + var record = { + id: id, + name: name + }; + tousseListStore.add(record) +} + +//保存选择的物品 +function saveTousseName() { + var idArr = []; + + for (var i = 0; i < tousseListStore.getCount(); i++) { + var record = tousseListStore.getAt(i); + idArr[i] = record.get('id'); + } + + if (idArr.length == 0) { + showResult('请选择一个物品'); + return + } + + var ids = idArr.join(','); + + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!updateTousseInspectMaterials.do', + async: false, + params: { + ids: ids, + operationType: 'add' + }, + success: function (response) { + var result = Ext4.decode(response.responseText); + if (result.success) { + showResult('添加成功'); + tousseWin.close(); + listStore.reload(); + } else { + showResult(result.msg); + } + } + }); +} + +//打开选择物品的窗口 +function openSelectTousse() { + var tousseJsonStore = new top.Ext4.data.Store({ + pageSize: 9999, + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!searchTousseByTypeArr.do', + reader: { + type: 'json', + totalProperty: 'totalCount', + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ] + }); + + tousseListStore = new top.Ext4.data.Store({ + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ] + }); + + var tbar = [{ + text: '选择物品:' + }, { + xtype: 'combo', + id: 'tousseName', + name: 'tousseName', + queryParam: 'spell', + fieldLabel: '', + minChars: 0, + valueField: 'id', + displayField: 'name', + width: 320, + store: tousseJsonStore, + listeners: { + select: function (combo, record, index) { + var id = record[0].data.id; + var name = record[0].data.name; + addTousseItem(id, name); + } + } + }, { + text: '添加所有', + iconCls: 'btn_ext_application_add', + handler: function () { + if (top.Ext4.getCmp("tousseName").getRawValue() == '') { + showResult('清先检索物品'); + return; + } + for (var i = 0; i < tousseJsonStore.getCount(); i++) { + var id = tousseJsonStore.getAt(i).get('id'); + var name = tousseJsonStore.getAt(i).get('name'); + addTousseItems(id, name) + } + top.Ext4.getCmp("tousseName").setValue(""); + } + }, { + text: '清空所有', + iconCls: 'btn_ext_application_del', + handler: function () { + tousseListStore.removeAll(); + } + }] + + var columns = [{ + header: "物品名称", + dataIndex: 'name', + width: 585, + menuDisabled: true + }, { + id: 'deleteItem', + header: '操作', + width: 100, + menuDisabled: true, + dataIndex: 'button', + renderer: function (v, p, record, index) { + return ""; + } + }] + + var grid = new top.Ext4.grid.GridPanel({ + title: '', + id: 'girdID', + columns: columns, + frame: false, + width: 710, + height: 400, + store: tousseListStore, + tbar: tbar, + viewConfig: { + autoFill: true + } + }); + + tousseWin = new top.Ext4.window.Window({ + id: 'tousseWin', + layout: 'border', + title: '添加物品', + width: 760, + height: 500, + border: 0, + modal: true, + defaults: { + bodyStyle: "background-color: none", + frame: true, + border: false + }, + style: 'padding:20px', + items: [{ + region: "west", + width: 720, + border: 0, + title: '', + items: [grid] + }], + buttonAlign: 'center', + buttons: [{ + id: 'confirmBtn', + text: '确定', + handler: function () { + saveTousseName(); + } + }, { + text: '取消', + handler: function () { + tousseWin.close(); + } + }] + }); + + tousseWin.show(); +} \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r31915 -r31987 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 31915) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 31987) @@ -40,6 +40,9 @@ reviewViewText = "审核"; } +//GZTHZL-1 获取需要检查的包的材料 +var getPackingMaterialsForCheck = new newMap(); + //SZSDSRMYY-54 var responsibilityPart = '清洗消毒' if(sstsConfig.defaultResponsibilityPartInPackingModule){ @@ -832,6 +835,7 @@ {name : 'colorCode'}, {name : 'classifiedItemAmountInfo'}, {name : 'patient'}, + {name : 'needInspectMaterials'}, {name : 'washRecordId'} ]}); @@ -937,8 +941,14 @@ allowDecimals :false, minValue: 0, listeners : { - 'focus':function(){ - this.selectText(); + focus:function(that){ + this.selectText(); + if(sstsConfig.enablePackingMaterialsCheckFunction){ + setTimeout(function(){ + var records = Ext4.getCmp(treeId).getSelectionModel().getSelection(); + getPackingMaterialsForCheckFun(records[0],that.value) + }, 1000); + } } } } @@ -2393,14 +2403,25 @@ var len = records.length; var materialTotalAmount = 0; var diposableGoodsTotalAmount = 0; + var tousseName = []; + var tousseDefinitionId = records[0].raw.tousseDefinitionId; for(var i = 0 ; i < len ; i++){ var type = records[i].data.type; + tousseName[i+2] = records[i].data.name; if(type == '一次性物品'){ diposableGoodsTotalAmount += records[i].data.count; }else{ materialTotalAmount += records[i].data.count; } } + if(sstsConfig.enablePackingMaterialsCheckFunction){ + if(getPackingMaterialsForCheck.get(tousseDefinitionId)){ + var arr = getPackingMaterialsForCheck.get(tousseDefinitionId); + tousseName[0] = arr[0]; + tousseName[1] = arr[1]; + getPackingMaterialsForCheck.set(tousseDefinitionId,tousseName); + } + } Ext4.getCmp('materialAmount').setText("器械总数:" + materialTotalAmount); Ext4.getCmp('diposableGoodsAmount').setText("一次性物品总数:" + diposableGoodsTotalAmount); } @@ -2518,10 +2539,20 @@ border:false, title:'材料清单', listeners: { - itemclick: function (dv, record, item, index, e) { - - }, cellclick: function(grid, td, cellIndex, record, tr, rowIndex, e, eOpts ){ + if(cellIndex !== 1){ + if(sstsConfig.enablePackingMaterialsCheckFunction){ + var tousseDefinitionId = record.raw.tousseDefinitionId; + if(getPackingMaterialsForCheck.size() == 1){ + var tousseDefinitionId = getPackingMaterialsForCheck.element(0).key; + materialsAddBgColor(tousseDefinitionId,rowIndex,td); + }else if(getPackingMaterialsForCheck.size() > 1){ + showResult('一次只能检查一种物品,请勿勾选多种物品!'); + return false + } + } + return false + } curSelMaterialName = record.get('name'); curSelMaterialId = record.get('materialDefinitionId'); var detachable = record.get('detachable'); @@ -3508,9 +3539,26 @@ } }); }else{ - packing = isPacking; - btn.disable(); - packingTousseBtnClick(); + if(sstsConfig.enablePackingMaterialsCheckFunction){ + var names = []; + getPackingMaterialsForCheck.forEach(function(item) { + for(var i=2;i 5){ + showResult('如下材料还未进行检查:'+names.splice(0,5).join('、')+'....!'); + }else { + showResult('如下材料还未进行检查:'+names.join('、')+'!'); + } + return + }else { + packing = isPacking; + btn.disable(); + packingTousseBtnClick(); + } } } // 装配按钮调用 @@ -4902,6 +4950,88 @@ } } +//GZTHZL-1:获取需要检查的包的材料 +function getPackingMaterialsForCheckFun(record,amount) { + var needInspectMaterials = false; + if(record.childNodes.length > 0){ + needInspectMaterials = record.data.needInspectMaterials; + }else { + needInspectMaterials = record.parentNode.data.needInspectMaterials; + } + if(needInspectMaterials){ + if(record.childNodes.length > 0){ + var tousseID = record.data.tousseID; + var tousseName = record.data.tousseName; + var resultAmount = amount || record.data.amount; + if(record.data.checked){ + var arr = getPackingMaterialsForCheck.get(tousseID) || []; + arr[0] = tousseName; + arr[1] = resultAmount; + getPackingMaterialsForCheck.set(tousseID,arr); + }else { + getPackingMaterialsForCheck.remove(tousseID); + } + }else { + var sumAmount = 0; + var tousseID = record.data.tousseID; + var tousseName = record.data.tousseName; + if(record.parentNode.data.checked){ + var resultAmount = amount || record.parentNode.data.amount; + var arr = getPackingMaterialsForCheck.get(tousseID) || []; + arr[0] = tousseName; + arr[1] = resultAmount; + getPackingMaterialsForCheck.set(tousseID,arr); + }else { + for(var i=0;i 0){ + var arr = getPackingMaterialsForCheck.get(tousseID) || []; + arr[0] = tousseName; + arr[1] = sumAmount; + getPackingMaterialsForCheck.set(tousseID,arr); + }else { + getPackingMaterialsForCheck.remove(tousseID); + } + } + } + } +} + +//GZTHZL-1:材料添加背景色 +function materialsAddBgColor(tousseDefinitionId,rowIndex,td) { + if(getPackingMaterialsForCheck.get(tousseDefinitionId)){ + var packingMaterialsArray = getPackingMaterialsForCheck.get(tousseDefinitionId); + var tousseName = packingMaterialsArray[0]; + var amount = packingMaterialsArray[1]; + if(amount > 1){ + showResult('一次只能检查一个物品,请先将【'+tousseName+'】的物品数量改成1后再进行检查并装配!') + return false + } + if(rowIndex == undefined){ + for(var i=2;i 1){ + showResult('一次只能检查一种物品,请勿勾选多种物品!'); + return false + } + } + } +} /** * 空闲时刷新(每空闲5分钟刷新一次) Index: ssts-web/src/main/webapp/ext/fontSize12/styles/common.css =================================================================== diff -u -r31150 -r31987 --- ssts-web/src/main/webapp/ext/fontSize12/styles/common.css (.../common.css) (revision 31150) +++ ssts-web/src/main/webapp/ext/fontSize12/styles/common.css (.../common.css) (revision 31987) @@ -460,4 +460,9 @@ .fieldset-element .x-fieldset-header .x-fieldset-header-text { width: 830px !important; +} + +/* GZTHZL-1:器械包背景颜色 */ +.tousseNameBgColor { + background: #8DCC6A !important; } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/config/gzthzlyy/config.js =================================================================== diff -u -r31410 -r31987 --- ssts-web/src/main/webapp/disinfectsystem/config/gzthzlyy/config.js (.../config.js) (revision 31410) +++ ssts-web/src/main/webapp/disinfectsystem/config/gzthzlyy/config.js (.../config.js) (revision 31987) @@ -143,5 +143,7 @@ //包装区工作量及不合格率月报,按包统计并显示消毒物品 showDisinfectionByPackage:true, //是否允许部分回收 - enablePartRecycle:true + enablePartRecycle:true, + //开启配包材料逐一检查功能 + enablePackingMaterialsCheckFunction:true } \ No newline at end of file Index: ssts-web/src/main/webapp/homepage/menuconfigure.js =================================================================== diff -u -r31728 -r31987 --- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 31728) +++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 31987) @@ -988,7 +988,8 @@ {hidden :SSTS_chargeRecordManage_MENU,text:"收费项目设置",href:encodeURI(WWWROOT+'/systemmanage/httpOption.mhtml?listId=chargeItem&optionName=收费项目设置'),hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_SupplyRoomType_manager,text:"供应室处理器械包配置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/cssdHandleToussesView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_SupplyRoomType_manager,text:"供应室服务临床科室配置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/cssdServiceDeptsView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, - {hidden :SSTS_SupplyRoomType_manager,text:"科室供应室设置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true} + {hidden :SSTS_SupplyRoomType_manager,text:"科室供应室设置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, + {hidden :!sstsConfig.enablePackingMaterialsCheckFunction,text:"配包需逐一检查材料的物品",href:WWWROOT+'/disinfectsystem/basedatamanager/packingMaterialsCheck/packingMaterialsCheckView.jsp',hrefTarget:linkTarget,leaf:true} ] },{ text:"个人设置", Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/packingMaterialsCheck/packingMaterialsCheckView.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/packingMaterialsCheck/packingMaterialsCheckView.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/packingMaterialsCheck/packingMaterialsCheckView.js (revision 31987) @@ -0,0 +1,206 @@ +var listStore; +var grid; + +//根据物品名称过滤 +function search(listStore) { + listStore.proxy.extraParams.tousseName = Ext4.getCmp('searchKeyWord').getValue(); + listStore.loadPage(1); + listStore.reload(); + Ext4.getCmp('searchKeyWord').setValue(''); +} + +//添加所有 +function addAllTousse() { + top.Ext4.Msg.confirm("请确认", "是否添加所有的器械包?", function (button) { + if ('yes' == button) { + top.Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!updateTousseInspectMaterials.do', + async: false, + params: { + operationType: 'addAll' + }, + success: function (response) { + var result = Ext4.decode(response.responseText); + if (result.success) { + showResult('添加成功'); + listStore.reload(); + } else { + showResult(result.msg); + } + } + }); + } + }); +} + +//清空列表 +function deleteAllTousse() { + top.Ext4.Msg.confirm("请确认", "是否删除所有的器械包?", function (button) { + if ('yes' == button) { + top.Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!updateTousseInspectMaterials.do', + async: false, + params: { + operationType: 'deleteAll' + }, + success: function (response) { + var result = Ext4.decode(response.responseText); + if (result.success) { + showResult('删除成功'); + listStore.reload(); + } else { + showResult(result.msg); + } + } + }); + } + }); +} + +function deleteTousse() { + var selectedRecords = grid.getSelectionModel().getSelection(); + if (selectedRecords.length == 0) { + showResult("请选择要删除的器械包"); + return + } + top.Ext4.Msg.confirm("请确认", "是否删除选择的器械包?", function (button) { + if ('yes' == button) { + var idsArr = []; + for (var i = 0; i < selectedRecords.length; i++) { + idsArr[i] = selectedRecords[i].data.id; + } + top.Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!updateTousseInspectMaterials.do', + async: false, + params: { + ids: idsArr.join(','), + operationType: 'delete' + }, + success: function (response) { + var result = Ext4.decode(response.responseText); + if (result.success) { + showResult('删除成功'); + listStore.reload(); + } else { + showResult(result.msg); + } + } + }); + } + }); +} + +Ext4.onReady(function () { + Ext4.QuickTips.init(); + var columns = [ + { header: "id", dataIndex: 'id', hidden: true }, + { header: "物品名称", dataIndex: 'tousseName', width: 300 } + ]; + var tbar = [{ + text: '添加', + iconCls: 'btn_ext_application_add', + handler: function () { + openSelectTousse(); + } + }, { + text: '添加所有', + iconCls: 'btn_ext_application_add', + handler: function () { + addAllTousse(); + } + }, '-', { + text: '删除', + iconCls: 'btn_ext_application_del', + handler: function () { + deleteTousse(); + } + }, '-', { + text: '清空所有', + iconCls: 'btn_ext_application_del', + handler: function () { + deleteAllTousse(); + } + }, '->', { + width: 70, + text: '搜索列', + id: 'searchButton', + menu: { + id: 'searchMenu', + items: [{ + xtype: 'menucheckitem', + name: 'tousseName', + checked: true, + text: '物品名称' + }] + }, + listeners: { + focus: function (thisButton, The, eOpts) { + Ext4.getCmp('searchKeyWord').focus(); + } + } + }, { + xtype: 'textfield', + name: 'searchKeyWord', + id: 'searchKeyWord', + enableKeyEvents: true, + listeners: { + keydown: function (thisTextfield, e, eOpts) { + if (e.keyCode == 13) { + search(listStore); + } + } + } + }, { + text: '搜索', + handler: function (thisButton) { + search(listStore); + } + }]; + + listStore = new Ext4.data.JsonStore({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!findTousseOfNeedInspectMaterials.do', + reader: { + root: 'rows', + totalProperty: 'total' + }, + extraParams: {} + }, + fields: [ + { name: 'id' }, + { name: 'tousseName' } + ] + }); + + listStore.loadPage(1); + + grid = new Ext4.grid.GridPanel({ + title: '配包需逐一检查材料的物品', + columns: columns, + frame: false, + autoScroll: false, + store: listStore, + tbar: tbar, + dockedItems: [{ + xtype: 'pagingtoolbar', + store: listStore, // same store GridPanel is using + dock: 'bottom', + displayInfo: true + }], + viewConfig: { + autoFill: true + }, + selModel: new Ext4.selection.CheckboxModel() + }); + + new Ext4.container.Viewport({ + layout: 'border', + items: [{ + region: 'center', + layout: 'fit', + items: [grid] + }] + }); + +}); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/packingMaterialsCheck/packingMaterialsCheckView.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/packingMaterialsCheck/packingMaterialsCheckView.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/packingMaterialsCheck/packingMaterialsCheckView.jsp (revision 31987) @@ -0,0 +1,20 @@ +<%@ page contentType="text/html; charset=UTF-8"%> +<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/includeExtJsAndCss.jsp"%> +<%@ include file="/common/includeExtJs4_2.jsp"%> + + + + 配包需逐一检查材料的物品 + + + + + + + + \ No newline at end of file