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){