Index: ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js =================================================================== diff -u -r23503 -r26370 --- ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js (.../config.js) (revision 23503) +++ ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js (.../config.js) (revision 26370) @@ -109,8 +109,8 @@ enablePDATousseSign:true, //自定义装配后是否保留灭菌日期 disinfectionDateProcessTypeInDirectPackingView : true, - //加急数量 - isHideUrgentAmount : false, + //启用加急功能,true显示,false和未定义隐藏 + enableUrgentFunction:true, //是否启用清洗交接记录视图列表 enableWashTransitionRecordView : true, //器械交接的版本.1为有已扫和未扫两列的格式,2则没有此两列,只有回收数量一列.中山一院提出只有一列,3为预回收模式,只修改数量,没有扫描功能 @@ -152,8 +152,8 @@ packingView_autoSelectTousseWhenScanBasket: true, //是否启用手术仪器追溯查询报表(true为启用,false或者不配置都不启用) enableTousseTraceabilityInquiry : true, - //是否显示加急等级,默认为不显示。如果为true则显示,false和未定义都不显示 - showUrgentLevel:true, + //启用加急功能,true显示,false和未定义隐藏 + enableUrgentFunction:true, //是否显示按照时间查询 showTimeSearch : true, //是否显示科室分组选择框 Index: ssts-web/src/test/resources/test/forgon/disinfectsystem/selenium/config/all/config.js =================================================================== diff -u -r18289 -r26370 --- ssts-web/src/test/resources/test/forgon/disinfectsystem/selenium/config/all/config.js (.../config.js) (revision 18289) +++ ssts-web/src/test/resources/test/forgon/disinfectsystem/selenium/config/all/config.js (.../config.js) (revision 26370) @@ -84,8 +84,6 @@ isOpenLoadTemplateByUnit : true, //是否隐藏住院号 isHideHospitalNumber: true, - //是否隐藏加急数量 - isHideUrgentAmount: true, // 科室申请版本:1或者没有配置沿用之前的版本,2:独立出科室申领的几个申请功能 recyclingApplicationVersion : 2, //隐藏外部代理灭菌的部分元素(页面属性),为true时部分隐藏,未配置或配置为其它值时与原来保持一致 Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/urgentLevel/urgentLevelView.js =================================================================== diff -u -r18491 -r26370 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/urgentLevel/urgentLevelView.js (.../urgentLevelView.js) (revision 18491) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/urgentLevel/urgentLevelView.js (.../urgentLevelView.js) (revision 26370) @@ -17,7 +17,9 @@ {name : 'name'}, {name : 'grade'}, {name : 'urgent'}, - {name : 'newGrade'} + {name : 'newGrade'}, + {name : 'colorCode'}, + {name : 'urgentDefaultValue'} ] }); @@ -76,10 +78,54 @@ function refreshData(){ urgentStore.reload(); } +//删除 +function deleteUrgentLevel(grid){ + var records = grid.getSelectionModel().getSelections(); + + if (records.length == 0) { + showResult("请选择要删除的容器!"); + return false; + } + var id = null; + for ( var i = 0, len = records.length; i < len; i++) { + if (id == null) { + id = records[i].data['id']; + } else { + //ids = ids + ';' + records[i].data['id']; + id = records[i].data['id']; + } + } + top.Ext.MessageBox + .confirm("请确认", + "是否确定要删除选中的容器信息?", + function(button, text) { + if ("yes" == button){ + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/baseData/urgentLevelAction!delUrgentLevel.do', + params : { + id : id + }, + success : function(response, options) { + var result = Ext.decode(response.responseText); + var success = result.success; + if(success){ + showResult(result.message); + refreshData(); + }else{ + showResult(result.message); + } + }, + failure : function(response, options) { + var result = Ext.decode(response.responseText); + showResult(result.message); + } + }) + } + }); +} Ext.onReady(function() { Ext.QuickTips.init(); - // 记录cookie(3步) - + // 记录cookie(3步) var sign = true; var tbar = [ { text : '添加', @@ -96,14 +142,25 @@ handler : function() { loadFormData(grid); } + },'-', { + text : '删除', + //hidden : SSTS_Container_Delete, + iconCls : 'btn_ext_application_del', + handler : function() { + deleteUrgentLevel(grid); + } }]; var dwrCallParams = null; Ext.ux.ForgonPageGrid.prototype.getGridParameterMap = function() { }; - - var cm = new Ext.grid.ColumnModel( [ { + var smCheckbox = new Ext.grid.CheckboxSelectionModel({ + singleSelect : false + }); + var cm = new Ext.grid.ColumnModel( [ + smCheckbox, + { id : 'id', dataIndex : 'id', hidden :true @@ -131,6 +188,46 @@ width : 200, hidden :false },{ + header : "是否默认", + id : 'urgentDefaultValue', + dataIndex :'urgentDefaultValue', + width : 150, + hidden :false + },{ + header : "加急颜色", + id : 'colorCode', + dataIndex : 'colorCode', + width : 70, + hidden :false, + renderer: function(v,p,record){ + var urgentColorVal = record.get("colorCode"); + if(urgentColorVal == "#ff0000"){ + p.css = 'urgent_red_color'; + }else if(urgentColorVal == "#ff3300"){ + p.css = 'urgent_orange_red_color'; + }else if(urgentColorVal == "#ff6600"){ + p.css = 'urgent_orange_color'; + }else if(urgentColorVal == "#ff9900"){ + p.css = 'urgent_orange_yellow_color'; + }else if(urgentColorVal == "#ffff00"){ + p.css = 'urgent_yellow_color'; + }else if(urgentColorVal == "#99ff00"){ + p.css = 'urgent_yellow_green_color'; + }else if(urgentColorVal == "#00ff00"){ + p.css = 'urgent_green_color'; + }else if(urgentColorVal == "#00ffff"){ + p.css = 'urgent_blue_green_color'; + }else if(urgentColorVal == "#0000ff"){ + p.css = 'urgent_blue_color'; + }else if(urgentColorVal == "#6600ff"){ + p.css = 'urgent_blue_purple_color'; + }else if(urgentColorVal == "#ff00ff"){ + p.css = 'urgent_purple_color'; + }else if(urgentColorVal == "#ff0066"){ + p.css = 'urgent_purple_red_color'; + } + } + },{ id : 'deleteItem3', header:'操作', width : 200, @@ -146,23 +243,17 @@ } ]); initUrgentStore(); - grid = new Ext.grid.EditorGridPanel({ + grid = new Ext.grid.EditorGridPanel({ id : 'grid', store : urgentStore, cm : cm, autoScroll:true, frame : false, -// viewConfig: { -// forceFit:true, -// getRowClass: function(record, rowIndex){ -// return record.get("isFind") ? "resultList" : ""; -// } -// }, width:document.body.offsetWidth-12, height:document.body.offsetHeight-94, bodyStyle : 'border:1px solid #9cbaef', clicksToEdit : 1, - selModel : new Ext.grid.RowSelectionModel({ + sm : new Ext.grid.RowSelectionModel({ singleSelect : false }), tbar : tbar Index: ssts-web/src/main/webapp/disinfectsystem/config/dgskhyy/config.js =================================================================== diff -u -r25824 -r26370 --- ssts-web/src/main/webapp/disinfectsystem/config/dgskhyy/config.js (.../config.js) (revision 25824) +++ ssts-web/src/main/webapp/disinfectsystem/config/dgskhyy/config.js (.../config.js) (revision 26370) @@ -81,8 +81,8 @@ "recycleClassifyBasketAfterPacked" : false, //条码腕带住院号前缀(PDA录使用记录时扫到的住院号前辍) "1,ZY01" "wristBandHospitalNumberPrefix":"R", - //是否隐藏加急数量,默认为隐藏,未配置或配置不为false时则隐藏,配置为false才不隐藏 true:隐藏 false:不隐藏 - "isHideUrgentAmount":false, + //启用加急功能,true显示,false和未定义隐藏 + "enableUrgentFunction":true, //回收一键入筐 true:不隐藏 false:隐藏 "recycleAllTousseIntoBasket":true, //自定义入筐界面,材料的一键入筐功能 true为显示一键入筐按钮,false为不显示,默认为false 广东省医设置为true Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js =================================================================== diff -u -r26343 -r26370 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 26343) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 26370) @@ -8,11 +8,7 @@ if(isHideHospitalNumber != false){ isHideHospitalNumber = true; } -//是否隐藏加急数量(只有config.js的配置为false时才不隐藏,否则都隐藏) -var isHideUrgentAmount = sstsConfig.isHideUrgentAmount; -if(isHideUrgentAmount != false){ - isHideUrgentAmount = true; -} + //器械包申请单的物品视图是否分成两个grid var tousseApplicationFormGridSplit = false; var grid; @@ -60,6 +56,7 @@ * @param specifyDisposableTypes是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} */ function openApplication(form, tousseGroups, specifyDisposableTypes) { + if (!isUndefinedOrNullOrEmpty(form)){ //1、限制同一个科室(供应室除外)只能申请一张申请单 if (sstsConfig.limitApply && form == comboApplicationForm && !isSupplyRoomUser) { @@ -470,6 +467,7 @@ {name : 'middlePackageAmount',mapping : 'middlePackageAmount'}, {name : 'transferScale',mapping : 'transferScale'}, {name : 'urgentAmount',mapping : 'urgentAmount'}, + {name : 'urgentLevel',mapping : 'urgentLevel'}, {name : 'materials',mapping : 'materials'}, {name : 'minApplyAmount',mapping : 'minApplyAmount'}, {name : 'expressInvoice',mapping : 'expressInvoice'}, //是否快速发货 @@ -547,6 +545,7 @@ {name : 'minApplyAmount',mapping : 'minApplyAmount'}, {name : 'maxApplyAmount',mapping : 'maxApplyAmount'}, {name : 'urgentAmount',mapping : 'urgentAmount'}, + {name : 'urgentLevel',mapping : 'urgentLevel'}, {name : 'unit',mapping : 'unit'}, {name : 'price',mapping : 'price'}, {name : 'amount',mapping : 'amount'}] @@ -560,6 +559,7 @@ {name : 'name'}, {name : 'count'}, {name : 'urgentAmount'}, + {name : 'urgentLevel'}, {name : 'minApplyAmount'}, {name : 'maxApplyAmount'}, {name : 'diposable'}, @@ -587,6 +587,7 @@ {name : 'name'}, {name : 'count'}, {name : 'urgentAmount'}, + {name : 'urgentLevel'}, {name : 'price'}, {name : 'status'}, {name : 'hasReturnedNum'}, @@ -653,6 +654,7 @@ {name : 'materials'}, //消毒物品的材料信息 {name : 'materialDefinitionId'},//材料id {name : 'urgentAmount'}, //加急数量 + {name : 'urgentLevel'}, //加急级别 {name : 'children'} //消毒物品的材料信息 ]}); @@ -785,12 +787,15 @@ * @param count 数量 * @param price 价格 * @param urgentAmount 加急数量 + * @param urgentLevel 加急级别 + * @param urgentLevelId 加急级别id * @param para 追加的参数,是一个对象,里面可以有多种属性,方便以后扩展用(目前只有{behavior:操作类型(添加或者提交或者绑定物品),transferScale:中包装单位装换单位系数,middlePackageUnit:申领单位(原来叫中包装单位)}) */ -function updateNode(treegrid, foundNode, count, price, urgentAmount, para){ +function updateNode(treegrid, foundNode, count, price, urgentAmount,urgentLevel,urgentLevelId,para){ var targetNode = foundNode; targetNode.set('urgentAmount', urgentAmount); - + targetNode.set('urgentLevel', urgentLevel); + targetNode.set('urgentLevelId', urgentLevelId); // 如果节点是消毒物品,并且不是整包清洗,则更新其子节点(材料)的数量 if (!targetNode.get('leaf') && targetNode.get('isApplyEntireTousse') != '是'){ //在父节点被子节点覆盖前先把urgentAmount清空 @@ -799,6 +804,8 @@ targetNode = childNodes[0]; //保留父节点的值,清空子节点的值 targetNode.set('urgentAmount', ''); + targetNode.set('urgentLevel', ''); + targetNode.set('urgentLevelId', ''); //传入的价格对拆包的消毒物品来说,是材料的平均价,而这里计算的是材料节点的总价,需要用材料节点的价格 price = targetNode.get('price'); } @@ -858,19 +865,21 @@ * @param minApplyAmount 最小申请数量(只用于一次性物品) * @param maxApplyAmount 最大申请数量(只用于一次性物品) * @param urgentAmount 加急数量 + * @param urgentLevel 加急级别 + * @param urgentLevelId 加急级别id * @param para 追加的参数,是一个对象,里面可以有多种属性,方便以后扩展用(目前只有{behavior:操作类型(添加或者提交或者绑定物品),transferScale:中包装单位装换单位系数,middlePackageUnit:申领单位(原来叫中包装单位)}) * @param expressInvoice 是否快速发货 */ function addItems(tousseDefinitionID,name,count,diposable,isApplyEntireTousse,originalPrice,price,externalCode, - storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,para,expressInvoice){ + storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice){ //1、处理从模板里面找到的(因为前面过滤已经添加的物品,所以剩下的只是模板的物品了) var foundNode = null; var needToCheckNode = {tousseDefinitionID : tousseDefinitionID,name : name,tousseType : tousseType}; var goodsAppDomObj = GoodsAppHelper.getGoodsAppDomObj(); if('是' == diposable){ foundNode = goodsAppDomObj.getExitsNodeByNode(rightTemplateStore, needToCheckNode); if (foundNode != null){ - updateNode('diposableTreeGrid', foundNode, count, price, urgentAmount, para); + updateNode('diposableTreeGrid', foundNode, count, price, urgentAmount,urgentLevel,urgentLevelId, para); } }else{ var tempGrid = 'tousseTreeGrid'; @@ -881,7 +890,7 @@ } if (foundNode != null){ - updateNode(tempGrid, foundNode, count, price,urgentAmount); + updateNode(tempGrid, foundNode, count, price,urgentAmount,urgentLevel,urgentLevelId); if(tousseType == tousseType_disinfectGoods){ updateDisinfectParentNode(foundNode, para); } @@ -909,6 +918,8 @@ name : name, count : pacakgeCount, urgentAmount : urgentAmount, + urgentLevel : urgentLevel, + urgentLevelId:urgentLevelId, diposable : diposable, tousseType : tousseType, isApplyEntireTousse : isApplyEntireTousse, @@ -954,6 +965,8 @@ minApplyAmount : minApplyAmount, maxApplyAmount : maxApplyAmount, urgentAmount : urgentAmount, + urgentLevel : urgentLevel, + urgentLevelId:urgentLevelId, totalPrice: isUndefinedOrNullOrEmpty(transferScale) ? roundValue(price*count) : roundValue(price*count*transferScale), packageSpec:packageSpec }); @@ -973,7 +986,7 @@ tempGrid = 'diposableTreeGrid'; } - updateNode(tempGrid, appendNode, count, price, urgentAmount); + updateNode(tempGrid, appendNode, count, price, urgentAmount,urgentLevel,urgentLevelId); if(tousseType == tousseType_disinfectGoods){ updateDisinfectParentNode(appendNode, para); } @@ -1020,6 +1033,8 @@ var tousseType = top.Ext4.getCmp('tousseType').getValue(); var materials = top.Ext4.getCmp('materials').getValue(); var urgentAmount = top.Ext4.getCmp('urgentAmount').getValue(); + var urgentLevel = top.Ext4.getCmp('urgentLevel').getRawValue(); + var urgentLevelId = top.Ext4.getCmp('urgentLevel').getValue(); var transferScale = top.Ext4.getCmp('transferScale').getValue(); var middlePackageUnit = top.Ext4.getCmp('middlePackageUnit').getValue(); @@ -1061,6 +1076,12 @@ top.Ext4.getCmp('count1').setValue(""); top.Ext4.getCmp('count1').focus(); return false; + }else if(sstsConfig.enableUrgentFunction && !Ext4.isEmpty(urgentAmount) && Ext4.isEmpty(urgentLevel)){ + showResult("加急级别不能为空!"); + return false; + }else if(sstsConfig.enableUrgentFunction && !Ext4.isEmpty(urgentLevel) && Ext4.isEmpty(urgentAmount)){ + showResult("加急数量不能为空!"); + return false; }else{ //库存数量(说明:如果storageUseStorageSubtractWaitDeliver配置成true则:库存=现有的库存-待发货数量) var storageAmount = sstsConfig.storageUseStorageSubtractWaitDeliver ? findStorageByDisposeIdAndHandleDepartCode(id) : parseInt(top.Ext4.getCmp('diposableGoodsAmount').getValue(),10); @@ -1085,16 +1106,16 @@ if (btn != 'yes') { return false; }else{ - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,para,expressInvoice); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice); afterAddItem(true); } }); }else{ - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,para,expressInvoice); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice); afterAddItem(true); } }else{ - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,para,expressInvoice); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice); afterAddItem(true); } } @@ -1122,6 +1143,7 @@ goodsBindHandler.handleBindGood(); } top.Ext4.getCmp('urgentAmount').setValue(''); + top.Ext4.getCmp('urgentLevel').setValue(''); top.Ext4.getCmp('diposableGoodsAmount').setValue(''); top.Ext4.getCmp('minApplyAmount').setValue(''); top.Ext4.getCmp('maxApplyAmount').setValue(''); @@ -1273,6 +1295,8 @@ obj.tousseType = node.get("tousseType"); obj.externalCode = node.get("externalCode"); obj.urgentAmount = node.get("urgentAmount"); + obj.urgentLevel = node.get("urgentLevel"); + obj.urgentLevelId = node.get("urgentLevelId"); obj.storage = node.get("storage"); obj.transferScale = node.get("transferScale"); obj.minUnit = node.get("minUnit"); @@ -1317,6 +1341,7 @@ tr += "名称"; tr += "数量"; tr += "加急数量"; + tr += "加急级别"; tr += "规格"; tr += "单位"; tr += ""; @@ -1330,6 +1355,9 @@ tr += ""; tr += isUndefinedOrNullOrEmpty(array[i].urgentAmount) ? 0 : array[i].urgentAmount; tr += ""; + tr += ""; + tr += isUndefinedOrNullOrEmpty(array[i].urgentLevel) ? "无" : array[i].urgentLevel; + tr += ""; tr += "" + array[i].spec + ""; tr += "" + array[i].unit + ""; tr += ""; @@ -1460,6 +1488,14 @@ var price = stringToFloat(n.get('price') + ""); var totalPrice = stringToFloat(n.get('totalPrice') + ""); var urgentAmount = n.get('urgentAmount'); + var urgentLevel = n.get('urgentLevel'); + var urgentLevelId = n.get('urgentLevelId'); + if(urgentLevel == ""){ + urgentLevel = null; + } + if(urgentLevelId == ""){ + urgentLevelId = null; + } var isApplyEntireTousse = n.get('isApplyEntireTousse'); //下面三个是一次物品配置了中包装单位,数量,比例才会有 var unitCount = n.get('unitCount'); @@ -1519,6 +1555,8 @@ price: price, rowPrice: totalPrice, urgentAmount: urgentAmount, + urgentLevel: urgentLevel, + urgentLevelId:urgentLevelId, isApplyEntireTousse: isApplyEntireTousse, expressInvoice: n.get('expressInvoice'), //是否快速发货 'diposable': n.get('diposable'), @@ -1769,7 +1807,14 @@ } else if(type == foreignPorxyApplicationForm){//外部代理灭菌单 cell = "" + v + ""; } else { - cell = "" + v + ""; + if(sstsConfig.enableUrgentFunction && record.json.urgentLevel != "" ){//有背景色,白色图标加急级别 + var colorCode = record.json.urgentLevel.colorCode; + cell = "
" + v + "
"; + }else if(sstsConfig.enableUrgentFunction && record.json.urgent =="是" && record.json.urgentLevel == ""){//无背景色,只有黑色加急图标 + cell = "" + v + ""; + }else{ + cell = "" + v + ""; + } } return cell; } @@ -3014,7 +3059,7 @@ top.Ext4.tip.QuickTipManager.init(); var columns = [ - {header : "流水号",width : 90 * fontSizeScale,dataIndex : 'serialNumber', renderer : renderModifyFun}, + {header : "流水号",width : 120 * fontSizeScale,dataIndex : 'serialNumber', renderer : renderModifyFun}, {header : "申请科室",width : 120 * fontSizeScale,dataIndex : 'depart',hidden:sstsConfig.hideApplyDepartColumn || isCssdUser != 'true'}, {header : "结算科室",width : 120 * fontSizeScale,dataIndex : 'settleAccountsDepart',hidden:sstsConfig.hideSettleDepartColumn}, {header : "申请人",width : 60 * fontSizeScale,dataIndex : 'applicant'}, @@ -3307,7 +3352,46 @@ new Ext.Toolbar({items: searchTbar4}).render(this.tbar); } } - } + }, + viewConfig: { + forceFit:true, + getRowClass : function(record,rowIndex,rowParams,store){ + /* if(sstsConfig.enableUrgentFunction){ + var urgentLevelData = record.json.urgentLevel; + if(urgentLevelData != ""){//有颜色急 + var rowColor; + var urgentColorVal = urgentLevelData.colorCode; + if(urgentColorVal == "#ff0000"){ + rowColor = 'urgent_red_color'; + }else if(urgentColorVal == "#ff3300"){ + rowColor = 'urgent_orange_red_color'; + }else if(urgentColorVal == "#ff6600"){ + rowColor = 'urgent_orange_color'; + }else if(urgentColorVal == "#ff9900"){ + rowColor = 'urgent_orange_yellow_color'; + }else if(urgentColorVal == "#ffff00"){ + rowColor = 'urgent_yellow_color'; + }else if(urgentColorVal == "#99ff00"){ + rowColor = 'urgent_yellow_green_color'; + }else if(urgentColorVal == "#00ff00"){ + rowColor = 'urgent_green_color'; + }else if(urgentColorVal == "#00ffff"){ + rowColor = 'urgent_blue_green_color'; + }else if(urgentColorVal == "#0000ff"){ + rowColor = 'urgent_blue_color'; + }else if(urgentColorVal == "#6600ff"){ + rowColor = 'urgent_blue_purple_color'; + }else if(urgentColorVal == "#ff00ff"){ + rowColor = 'urgent_purple_color'; + }else if(urgentColorVal == "#ff0066"){ + rowColor = 'urgent_purple_red_color'; + } + rowColor += " urgentRow"; + return rowColor; + } + } */ + } + } }, readerDetail, RecyclingApplicationTableManager.findRecyclingApplicationTableList, @@ -3359,6 +3443,9 @@ var PackAndSterileName = ''; var PackAndSterileContent = ''; + var urgentAmount = ""; + var urgentLevel = ""; + var isForeignTousseApplicationForm = record.data['type'] == '外来器械包申请单'; //是否外来器械包申请单 var isDiposableApplicationForm = (record.data['type']==diposableGoodsApplicationForm); //是否一次性物品申请单 tableContent = record.data['htmlContent'];// @@ -3372,8 +3459,9 @@ var packedAmount = voItems[i].packedAmount; var sterilizationAmount = voItems[i].sterilizationAmount; var invoiceAmount = voItems[i].invoiceAmount; + var urgentAmountData = voItems[i].urgentAmount; + var urgentLevelData = voItems[i].urgentLevel; - if(record.data['type'] == '借物单'){ BorrowName = "

已还数量

"; BorrowAmount = "" + voItems[i].alsoAmount+""; @@ -3397,15 +3485,34 @@ "" + packedAmount+"" + "" + sterilizationAmount+""; } - + + if(sstsConfig.enableUrgentFunction){//加急级别 + urgentAmount = + "

加急数量

" + + "

加急级别

"; + if(urgentAmountData !="" && urgentAmountData != null){ + urgentAmountData = urgentAmountData; + }else{ + urgentAmountData = 0; + } + + if(urgentLevelData !="" && urgentLevelData != null){ + urgentLevelData = urgentLevelData; + }else{ + urgentLevelData = "无"; + } + urgentLevel = + "" + urgentAmountData+"" + + "" + urgentLevelData+""; + } content += "" : ">"; //如果是未完全发货的话背景色显示为红色 content += ForeignContent + " " + tousseName +"" + "" + voItems[i].amountDisplay+"" + "" + recyclingAmount+"" + - PackAndSterileContent + + PackAndSterileContent + urgentLevel+ "" + invoiceAmount+"" + BorrowAmount; @@ -3439,7 +3546,7 @@ "

物品名称

" + "

申请数量

" + "

回收数量

" + - PackAndSterileName + + PackAndSterileName + urgentAmount + "

发货数量

" + BorrowName); if(isDiposableApplicationForm){ Index: ssts-web/src/main/webapp/disinfectsystem/config/gdsy/config.js =================================================================== diff -u -r26267 -r26370 --- ssts-web/src/main/webapp/disinfectsystem/config/gdsy/config.js (.../config.js) (revision 26267) +++ ssts-web/src/main/webapp/disinfectsystem/config/gdsy/config.js (.../config.js) (revision 26370) @@ -102,8 +102,6 @@ isOpenLoadTemplateByUnit : true, //是否隐藏住院号 isHideHospitalNumber: true, - //是否隐藏加急数量 - isHideUrgentAmount: true, // 科室申请版本:1或者没有配置沿用之前的版本,2:独立出科室申领的几个申请功能, 3:GDSRMYY-313省医的新版本,‘申领器械包’改为‘申领物品’。把‘申领消毒物品’、‘申领敷料包’与‘申领物品’按钮合并。 recyclingApplicationVersion : 3, //隐藏外部代理灭菌的部分元素(页面属性),为true时部分隐藏,未配置或配置为其它值时与原来保持一致 Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js =================================================================== diff -u -r26271 -r26370 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 26271) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 26370) @@ -15,6 +15,23 @@ * @param handleDepartCoding 处理科室的科室编码(修改才有值) * @param recyclingApplication 申请单对象 */ +//加急级别store +var urgentLevelStore = new Ext4.data.Store({ + proxy : { + type : 'ajax', + url : WWWROOT + '/disinfectSystem/baseData/urgentLevelAction!getUrgentsForSelect.do', + reader : { + type : 'json', + root : 'data' + } + }, + fields : [ + {name : 'id',mapping : 'id'}, + {name : 'urgentLevel',mapping : 'urgentLevel'}, + {name : 'urgentDefaultValue',mapping : 'urgentDefaultValue'} + ] +}); +urgentLevelStore.load(); function comboApplication(id,deptCoding,depart,hiddenCommitButton,hiddenSaveButton,hiddenReturnEditButton,type,tousseGroups,specifyDisposableTypes, originalCommittedStatus,handleDepartCoding,recyclingApplication) { departJsonStore.load(); //先加载结算科室 @@ -215,6 +232,44 @@ showResult(entityName + '物品列表不能为空'); return false; } + if(sstsConfig.enableUrgentFunction){ + var leftTemplateParentNodes = leftTemplateStore.getRootNode(); + var rightTemplateParentNodes = rightTemplateStore.getRootNode(); + var flag = ""; + function urgentLevelNotEmpty(parentNodes){ + flag = false; + for(var i = 0; i < parentNodes.childNodes.length;i++){ + var urgentAmount = parentNodes.childNodes[i].data.urgentAmount; + var urgentLevel = parentNodes.childNodes[i].data.urgentLevel; + var name = parentNodes.childNodes[i].data.name; + + //判断加急数量不为空的时候,加急级别不能为空 + if(urgentAmount != "" && urgentAmount != undefined && urgentAmount != null){ + if(urgentLevel == "" || urgentLevel == undefined){ + flag = true; + showResult(name+'加急级别不能为空!'); + break; + } + }else if(urgentLevel != "" && urgentLevel != undefined && urgentLevel != null){//判断加急级别不为空的时候,加急数量不能为空 + if(urgentAmount == "" || urgentAmount == undefined){ + flag = true; + showResult(name+'已经选择了加急级别,加急数量不能为空!'); + break; + } + } + } + return flag; + } + var leftTemplateUrgentLevel = urgentLevelNotEmpty(leftTemplateParentNodes); + var rightTemplateUrgentLevel = urgentLevelNotEmpty(rightTemplateParentNodes); + if(leftTemplateUrgentLevel){ + return false; + } + if(rightTemplateUrgentLevel){ + return false; + } + } + // 当直接点保存验证grid中是否填入数量,如果两个都没填写,不能提交 if(!validateData(leftTemplateStore) && !validateData(rightTemplateStore)){ showResult("请填写申请的物品数量"); @@ -538,15 +593,59 @@ } } },{ - header:"加急数量",dataIndex:'urgentAmount',width:62 * fontSizeScale,hidden:isHideUrgentAmount, + header:"加急数量",dataIndex:'urgentAmount',width:62 * fontSizeScale,hidden:!sstsConfig.enableUrgentFunction, editor:{ xtype:'numberfield', allowBlank:true, allowDecimals:false, minValue:0, - maxValue:9999 + maxValue:9999, + listeners : { + blur:function(thiz, e, eOpts){ + if(thiz.getValue() != null){//设置加急级别默认值 + var urgentLevelData = top.Ext4.getCmp('urgentLevel').getStore().data.items; + for(var i = 0;i + @@ -167,7 +204,7 @@ 申请数量 回收数量 加急数量 - 加急类型 + 加急级别 操作   Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/urgentLevel/urgentLevelView.jsp =================================================================== diff -u -r17849 -r26370 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/urgentLevel/urgentLevelView.jsp (.../urgentLevelView.jsp) (revision 17849) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/urgentLevel/urgentLevelView.jsp (.../urgentLevelView.jsp) (revision 26370) @@ -8,8 +8,8 @@ <%@ include file="/common/includeExtJsAndCss.jsp"%> - - + + @@ -18,6 +18,7 @@ + Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/urgentLevel/urgentLevelForm.js =================================================================== diff -u -r17897 -r26370 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/urgentLevel/urgentLevelForm.js (.../urgentLevelForm.js) (revision 17897) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/urgentLevel/urgentLevelForm.js (.../urgentLevelForm.js) (revision 26370) @@ -9,6 +9,14 @@ fields:['value'] }); + var urgentColorStore = new Ext.data.SimpleStore({ + fields:['text','value'] + }); + + var defaultUrgentLevelStore = new Ext.data.SimpleStore({ + data:[['是'],['否']], + fields:['value'] + }); formObj = new top.Ext.FormPanel({ id : 'urgentLevelForm', frame : true, @@ -23,6 +31,15 @@ id : 'id', name : 'id' },{ + xtype : 'hidden', + id : 'colorCode', + name : 'colorCode' + },{ + xtype : 'hidden', + id : 'isCheckColor', + name : 'isCheckColor', + value:true + },{ columnWidth : 0.33, layout : 'form', labelWidth:60, @@ -84,6 +101,94 @@ editable:false, width : 80 }] + },{ + columnWidth : 0.33, + layout : 'form', + labelWidth:60, + items : [{ + xtype : 'combo', + fieldLabel : "是否默认", + id : 'urgentDefaultValue', + name : 'urgentDefaultValue', + minChars : 0, + valueField : 'value', + displayField : 'value', + value:'是', + mode : 'local', + store : defaultUrgentLevelStore, + forceSelection : true, + lazyInit : false, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + selectOnFocus :true, + allowBlank : false, + editable:false, + width : 80 + }] + },{ + columnWidth : 0.6, + layout : 'form', + labelWidth:60, + items : [{ + xtype : 'combo', + fieldLabel : "加急颜色", + id : 'colorName', + name : 'colorName', + minChars : 0, + valueField : 'value', + displayField : 'text', + value:'', + mode : 'local', + store : urgentColorStore, + forceSelection : true, + lazyInit : false, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + selectOnFocus :true, + allowBlank : false, + editable:false, + width : 180, + listeners : { + 'select' : function(combo, records, eOpts) { + top.Ext.getCmp('colorCode').setValue(combo.getValue().split(",")[1]); + combo.setValue(combo.getValue().split(",")[0]); + var bkcolor=""; + var tempColorValue = combo.getValue().split(",")[0]; + if(tempColorValue == "红"){ + bkcolor= "#ff0000"; + }else if(tempColorValue == "橙红"){ + bkcolor = "#ff3300"; + }else if(tempColorValue == "橙"){ + bkcolor = "#ff6600"; + }else if(tempColorValue == "橙黄"){ + bkcolor = "#ff9900"; + }else if(tempColorValue == "黄"){ + bkcolor = "#ffff00"; + }else if(tempColorValue == "黄绿"){ + bkcolor = "#99ff00"; + }else if(tempColorValue == "绿"){ + bkcolor = "#00ff00"; + }else if(tempColorValue == "蓝绿"){ + bkcolor = "#00ffff"; + }else if(tempColorValue == "蓝"){ + bkcolor = "#0000ff"; + }else if(tempColorValue == "蓝紫"){ + bkcolor = "#6600ff"; + }else if(tempColorValue == "紫"){ + bkcolor = "#ff00ff"; + }else if(tempColorValue == "紫红"){ + bkcolor = "#ff0066"; + } + combo.el.dom.style.background = bkcolor; + }, + 'blur' : function(combo){ + combo.setRawValue(combo.getValue()); + return false; + } + } + }] }], buttons : [{ id : 'saveBtn', @@ -95,8 +200,7 @@ handler : cancel }] }); - - + urgentLevelWin = new top.Ext.Window({ id : 'urgentLevelWin', layout : 'fit', @@ -109,6 +213,21 @@ items : [ formObj ] }); urgentLevelWin.show(); + + urgentColorStore.add(new Ext.data.Record({"text":"
","value":"红,#ff0000"})); + urgentColorStore.add(new Ext.data.Record({"text":"
橙红
","value":"橙红,#ff3300"})); + urgentColorStore.add(new Ext.data.Record({"text":"
","value":"橙,#ff6600"})); + urgentColorStore.add(new Ext.data.Record({"text":"
橙黄
","value":"橙黄,#ff9900"})); + urgentColorStore.add(new Ext.data.Record({"text":"
","value":"黄,#ffff00"})); + urgentColorStore.add(new Ext.data.Record({"text":"
黄绿
","value":"黄绿,#99ff00"})); + urgentColorStore.add(new Ext.data.Record({"text":"
绿
","value":"绿,#00ff00"})); + urgentColorStore.add(new Ext.data.Record({"text":"
蓝绿
","value":"蓝绿,#00ffff"})); + urgentColorStore.add(new Ext.data.Record({"text":"
","value":"蓝,#0000ff"})); + urgentColorStore.add(new Ext.data.Record({"text":"
蓝紫
","value":"蓝紫,#6600ff"})); + urgentColorStore.add(new Ext.data.Record({"text":"
","value":"紫,#ff00ff"})); + urgentColorStore.add(new Ext.data.Record({"text":"
紫红
","value":"紫红,#ff0066"})); + + if(id != 0){ formObj.form.load({ url : WWWROOT + '/disinfectSystem/baseData/urgentLevelAction!loadUrgentLevel.do', @@ -118,6 +237,9 @@ top.Ext.getCmp('name').setValue(action.result.data.name); top.Ext.getCmp('enable').setValue(action.result.data.enable); top.Ext.getCmp('urgent').setValue(action.result.data.urgent); + top.Ext.getCmp('colorName').setValue(action.result.data.colorName); + top.Ext.getCmp('urgentDefaultValue').setValue(action.result.data.urgentDefaultValue); + top.Ext.getCmp('colorName').el.dom.style.background = action.result.data.colorCode; }, failure : function(form, action) { showResult("加载失败"); @@ -144,6 +266,35 @@ }, failure : function(form, action) { if(action.result && action.result.message){ + //判断所选颜色是否唯一 + if(action.result.message == "该颜色已经被使用"){ + top.Ext.MessageBox.confirm("请确认","该颜色已经被使用,是否继续?",function(button, text) { + if("yes" == button){ + top.Ext.getCmp('isCheckColor').setValue(false); + formObj.form.submit({ + url : WWWROOT + '/disinfectSystem/baseData/urgentLevelAction!saveUrgentLevel.do', + method : 'POST', + waitMsg : '正在保存数据,请稍候', + waitTitle : '提交表单', + success : function(form, action) { + if(action.result && action.result.message){ + showResult(action.result.message); + } + if(action.result.success){ + refreshData(); + cancel(); + } + }, + failure : function(form, action) { + showResult(action.result.message); + } + }) + }else{ + top.Ext.getCmp('saveBtn').enable(); + } + }); + return; + } showResult(action.result.message); } } Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r26337 -r26370 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 26337) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 26370) @@ -31,6 +31,7 @@ var onErrorDamageBtnClick = null; var curSelMaterialName = null; var curSelMaterialId = null; + //判断是否ie和ie7 var isIE6OrIE7 = top.Ext4.isIE6 || top.Ext4.isIE7; var appDepartJsonStore = new Ext4.data.Store({ @@ -700,7 +701,10 @@ {name : 'customSplitBasketAmount'}, {name : 'serialNumber'}, {name : 'cleaned'}, - {name : 'note'} + {name : 'note'}, + {name : 'urgentLevelObj'}, + {name : 'colorCode'}, + {name : "urgentLevelName"} ]}); function buildColumnTreeColumns(treeId){ @@ -781,24 +785,52 @@ align:'center', sortable: true, dataIndex: 'urgentAmount', + hidden:!sstsConfig.enableUrgentFunction, renderer: function(v,p,record,rowIndex, columnIndex, store,view){ if(v > 0){ - /*if(record.get("leaf")){ - return null ; - }else{ - return "

" + v + "

"; - }*/ - return "

" + v + "

"; + var urgentAmountColor = ""; + if(sstsConfig.enableUrgentFunction){ + if(record.get("leaf")){//子级 + var colorCode = record.get("urgentLevelObj").colorCode; + if(colorCode != ""){//有加急的 + urgentAmountColor = "

" + v + "

"; + } + }else{//父级 + var parentColor = record.get("colorCode"); + urgentAmountColor = "

" +v + "

"; + } + } + return urgentAmountColor; }else{ return null; } } },{ - header: '加急等级', + header: '加急级别', width: 60, align: 'center', sortable: true, - dataIndex: 'urgentLevel' + hidden:!sstsConfig.enableUrgentFunction, + dataIndex: 'urgentLevel', + renderer: function(v,p,record,rowIndex, columnIndex, store,view){ + if(sstsConfig.enableUrgentFunction){ + var urgentLevel = ""; + if(record.get("leaf")){ + var colorCode = record.get("urgentLevelObj").colorCode; + var name = record.get("urgentLevelObj").name; + if(colorCode != ""){ + urgentLevel = "

" +name + "

"; + } + }else{ + var parentColor = record.get("colorCode"); + var urgentLevelName = record.get("urgentLevelName"); + urgentLevel = "

" + urgentLevelName + "

"; + } + return urgentLevel; + }else{ + return null; + } + } },{ header: '清洗篮筐', width : 110, @@ -2392,7 +2424,7 @@ taskStatus,department,tousseType, packageType, packageSize, sterilingMethod,recyclingTime,isTraceable,isPrint,isReview,errors, damages,replenishMaterils,taskType,supplierName,haveIDCard,urgentAmount,idCardBarcode, - allowModifyPackageType,errorRemark,damageRemark,urgentLevel,serialNum,recyclingItemRemark,cleaned,note){ + allowModifyPackageType,errorRemark,damageRemark,urgentLevel,serialNum,recyclingItemRemark,cleaned,note,urgentLevelObj,colorCode,urgentLevelName){ var leaf = false; if(taskId != ''){ leaf = true; @@ -2434,7 +2466,10 @@ serialNumber:serialNum, recyclingItemRemark:recyclingItemRemark, cleaned: cleaned, - note: note + note: note, + urgentLevelObj:urgentLevelObj, + colorCode:colorCode, + urgentLevelName:urgentLevelName }); if(!leaf){ node.set("checked" ,false); @@ -3961,6 +3996,7 @@ showResult('该篮筐在'+taskGroup+'内无装配任务!' , null , sstsConfig.messagePauseTimeOnPackingPage); } var speakBasket = new SpeakBasket(); + for(var n = 0;n < nLength; n++){ var taskVO = taskList[n]; var td_id = taskVO.tousseID; @@ -3997,7 +4033,7 @@ parentNode = addTaskNode('',td_id,'',videoNames,tousseName,0,'','','', '','',tousseType, packageType, "", sterilingMethod,'',isTraceable,isPrint,isReview,'','',rMaterils,'','',haveIDCard,urgentAmount, - taskVO.idCardBarcode,taskVO.allowModifyPackageType,taskVO.errorRemark,taskVO.damageRemark,taskVO.urgentLevel,'','',taskVO.cleaned,taskVO.note); + taskVO.idCardBarcode,taskVO.allowModifyPackageType,taskVO.errorRemark,taskVO.damageRemark,taskVO.urgentLevel,'','',taskVO.cleaned,taskVO.note,'',taskVO.colorCode,taskVO.urgentLevelName); newParentNode = true; }else{ var uamountStr = parentNode.get('urgentAmount'); @@ -4070,7 +4106,7 @@ var childNode = addTaskNode(taskId,td_id,invoicePlanId,videoNames,tousseName,amount,washTime,basketBarcode,basketName, taskStatus,department,tousseType, packageType,packageSize,sterilingMethod,dateTime,isTraceable,isPrint,isReview, errors,damages,replenishMaterils,taskType,supplierName,task.haveIDCard,childUrgentAmount,task.idCardBarcode, - task.allowModifyPackageType,task.errorRemark,task.damageRemark,task.urgentLevel,task.serialNumber,task.recyclingItemRemark,task.cleaned,task.note); + task.allowModifyPackageType,task.errorRemark,task.damageRemark,task.urgentLevel,task.serialNumber,task.recyclingItemRemark,task.cleaned,task.note,task.urgentLevelObj,task.colorCode,task.urgentLevelName); parentNode.appendChild(childNode); var pNewAmount = parentNode.get('amount') + amount; parentNode.set('amount',pNewAmount);