Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.js =================================================================== diff -u -r32829 -r33065 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.js (.../diposableGoodsView.js) (revision 32829) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.js (.../diposableGoodsView.js) (revision 33065) @@ -575,6 +575,22 @@ allowBlank : true, anchor : '95%' }] + }, { + columnWidth : 1, + layout : 'form', + labelWidth : 110, + hidden:!sstsConfig.enableDisposableGoodsFullCaseApplicationAmount, + items : [{ + xtype : 'numberfield', + fieldLabel : '整箱申请数量', + maxLength : '16', + id : 'fullCaseApplicationAmount', + name : 'fullCaseApplicationAmount', + allowBlank : true, + allowDecimals : false, + minValue:1, + anchor : '95%' + }] },{ columnWidth : 1, layout : 'form', @@ -1068,6 +1084,7 @@ return false; } } + if(maxApply !== ''){ if(parseInt(minApply) > parseInt(maxApply)){ showResult('最小申请数不能大于最大申请数'); Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js =================================================================== diff -u -r32418 -r33065 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 32418) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 33065) @@ -550,6 +550,7 @@ {name : 'urgentLevel',mapping : 'urgentLevel'}, {name : 'materials',mapping : 'materials'}, {name : 'minApplyAmount',mapping : 'minApplyAmount'}, + {name : 'fullCaseApplicationAmount',mapping : 'fullCaseApplicationAmount'}, {name : 'expressInvoice',mapping : 'expressInvoice'}, //是否快速发货 {name : 'maxApplyAmount',mapping : 'maxApplyAmount'} ]; @@ -625,6 +626,7 @@ {name : 'displayName',mapping : 'displayName'}, {name : 'minApplyAmount',mapping : 'minApplyAmount'}, {name : 'maxApplyAmount',mapping : 'maxApplyAmount'}, + {name : 'fullCaseApplicationAmount',mapping : 'fullCaseApplicationAmount'}, {name : 'urgentAmount',mapping : 'urgentAmount'}, {name : 'urgentLevel',mapping : 'urgentLevel'}, {name : 'unit',mapping : 'unit'}, @@ -643,6 +645,7 @@ {name : 'urgentLevel'}, {name : 'minApplyAmount'}, {name : 'maxApplyAmount'}, + {name : 'fullCaseApplicationAmount'}, {name : 'diposable'}, {name : 'tousseType'}, {name : 'externalCode'}, @@ -719,6 +722,7 @@ {name : 'countBackup'}, {name : 'minApplyAmount'}, //最小申请数量 {name : 'maxApplyAmount'}, //最大申请数量 + {name : 'fullCaseApplicationAmount'}, {name : 'diposable'}, //是否一次性物品 {name : 'tousseType'}, //物品类型,一次性物品或者器械包的类型 {name : 'recyclingAmount'}, @@ -956,7 +960,7 @@ * @param type 申请单类型 */ function addItems(tousseDefinitionID,name,count,diposable,isApplyEntireTousse,originalPrice,price,externalCode, - storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice,type){ + storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice,type,fullCaseApplicationAmount){ //1、处理从模板里面找到的(因为前面过滤已经添加的物品,所以剩下的只是模板的物品了) var foundNode = null; var needToCheckNode = {tousseDefinitionID : tousseDefinitionID,name : name,tousseType : tousseType}; @@ -1052,6 +1056,7 @@ urgentAmount : urgentAmount, urgentLevel : urgentLevel, urgentLevelId:urgentLevelId, + fullCaseApplicationAmount:fullCaseApplicationAmount, totalPrice: isUndefinedOrNullOrEmpty(transferScale) ? roundValue(price*count) : roundValue(price*count*transferScale), packageSpec:packageSpec }); @@ -1110,6 +1115,19 @@ top.Ext4.getCmp('count1').focus(); } +//GYEY-761:如果该一次性物品定义了整箱申请数量,而填写的申请数量是整箱申请数量的整数倍(包括1倍),则无论申请数量是否满足最小或最大申请数量,都允许申请该数量。 +function isValidAddDiposable(fullCaseApplicationAmount,count){ + if(fullCaseApplicationAmount == '' || parseInt(fullCaseApplicationAmount) == 0){ + return false; + }else { + if(count % parseInt(fullCaseApplicationAmount) == 0){ + return true; + }else { + return false; + } + } +} + /** * 添加物品(器械包和一次性物品)到物品申请列表中. * @returns {Boolean} @@ -1189,20 +1207,24 @@ var storageAmount = sstsConfig.storageUseStorageSubtractWaitDeliver ? findStorageByDisposeIdAndHandleDepartCode(id) : parseInt(top.Ext4.getCmp('diposableGoodsAmount').getValue() || 0,10); var minApplyAmount = top.Ext4.getCmp('minApplyAmount').getValue(); var maxApplyAmount = top.Ext4.getCmp('maxApplyAmount').getValue(); + var fullCaseApplicationAmount = top.Ext4.getCmp('fullCaseApplicationAmount').getValue() || 0; if(type == "物品预约单" && sstsConfig.notAllowReservationAmountGreaterThanStorageAmount){ storageAmount = parseInt(storage); } //如果是一次性物品 if(isDiposableGoods == '是'){ - //如果配置了中包装单位,这个数量的校验要用中包装的数量来校验 - var checkCount = getMiddleAmount(count); - if(!isValidDiposableAmount(minApplyAmount,count)){ - showResult("该一次性物品最小申请数量为"+minApplyAmount+",所填数量必须是"+minApplyAmount+"的倍数。"); - return false; - }else if(!isUndefinedOrNullOrEmpty(maxApplyAmount) && count > maxApplyAmount){ - showResult("该一次性物品最大申请数量为"+maxApplyAmount+",申请数量不能大于最大申请数量。"); - return false; - }else if(!isValidDiposableAmount(minApplyAmount,urgentAmount) && urgentAmount != null){ + //如果配置了中包装单位,这个数量的校验要用中包装的数量来校验 + var checkCount = getMiddleAmount(count); + if(!isValidAddDiposable(fullCaseApplicationAmount,count)){ + if(!isValidDiposableAmount(minApplyAmount,count)){ + showResult("该一次性物品最小申请数量为"+minApplyAmount+",所填数量必须是"+minApplyAmount+"的倍数。"); + return false; + }else if(!isUndefinedOrNullOrEmpty(maxApplyAmount) && count > maxApplyAmount){ + showResult("该一次性物品最大申请数量为"+maxApplyAmount+",申请数量不能大于最大申请数量。"); + return false; + } + } + if(!isValidDiposableAmount(minApplyAmount,urgentAmount) && urgentAmount != null){ showResult("该一次性物品最小申请数量为"+minApplyAmount+",所填加急数量必须是"+minApplyAmount+"的倍数。"); return false; }else if(parseInt(checkCount,10) > storageAmount){ @@ -1214,16 +1236,16 @@ if (btn != 'yes') { return false; }else{ - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice,type); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice,type,fullCaseApplicationAmount); afterAddItem(true,type); } }); }else{ - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice,type); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice,type,fullCaseApplicationAmount); afterAddItem(true,type); } }else{ - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice,type); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice,type,fullCaseApplicationAmount); afterAddItem(true,type); } } @@ -1256,6 +1278,7 @@ top.Ext4.getCmp('diposableGoodsAmount').setValue(''); top.Ext4.getCmp('minApplyAmount').setValue(''); top.Ext4.getCmp('maxApplyAmount').setValue(''); + top.Ext4.getCmp('fullCaseApplicationAmount').setValue(''); top.Ext4.getCmp('isDiposableGoods').setValue(""); top.Ext4.getCmp('package1').clearValue(); top.Ext4.getCmp('count1').setValue(""); @@ -1592,7 +1615,6 @@ var nodes = treeStore.getRootNode().childNodes; for (var i=0; i" + value + " "; + + if(item.dataIndex == 'goodsName' && sstsConfig.enableDisposableGoodsFullCaseApplicationAmount){ + if(row.goodsAmount%row.fullCaseApplicationAmount == 0){ + tableHtml += "" + value + " "; + }else { + tableHtml += "" + value + " "; + } + }else { + tableHtml += "" + value + " "; + } } tableHtml += ""; Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js =================================================================== diff -u -r32849 -r33065 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 32849) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 33065) @@ -717,18 +717,20 @@ var minApplyAmount = records[i].minApplyAmount || 0; var maxApplyAmount = records[i].maxApplyAmount || 0; + var fullCaseApplicationAmount = records[i].fullCaseApplicationAmount || 0; - if((records[i].count%minApplyAmount) !== 0){ - isMinApplyAmountTrue = true; - showName = records[i].name; - showMinApplyAmount = minApplyAmount; + if((records[i].count%fullCaseApplicationAmount) !== 0){ + if((records[i].count%minApplyAmount) !== 0){ + isMinApplyAmountTrue = true; + showName = records[i].name; + showMinApplyAmount = minApplyAmount; + } + if(records[i].count > maxApplyAmount){ + isMaxApplyAmountTrue = true; + showName = records[i].name; + showMaxApplyAmount = maxApplyAmount; + } } - - if(records[i].count > maxApplyAmount){ - isMaxApplyAmountTrue = true; - showName = records[i].name; - showMaxApplyAmount = maxApplyAmount; - } } if(isMinApplyAmountTrue && showMinApplyAmount > 0){ @@ -809,7 +811,7 @@ materials = (materials == '')?'':JSON.stringify(materials); //para对象,里面可以有多种属性,方便以后扩展用 var para = {behavior : 'add',transferScale: data.transferScale,middlePackageUnit: data.middlePackageUnit}; - addItems(data.id,data.name,data.count,diposable,data.isApplyEntireTousse,data.originalPrice,data.price,data.externalCode,data.amount,data.tousseType,materials,data.unit,data.packageSpec,data.minApplyAmount,data.maxApplyAmount,data.urgentAmount,data.urgentLevel,data.urgentLevelId,para,data.expressInvoice,type); + addItems(data.id,data.name,data.count,diposable,data.isApplyEntireTousse,data.originalPrice,data.price,data.externalCode,data.amount,data.tousseType,materials,data.unit,data.packageSpec,data.minApplyAmount,data.maxApplyAmount,data.urgentAmount,data.urgentLevel,data.urgentLevelId,para,data.expressInvoice,type,data.fullCaseApplicationAmount); } } } @@ -1506,6 +1508,7 @@ top.Ext4.getCmp('diposableGoodsAmount').setValue(record.data.amount); top.Ext4.getCmp('minApplyAmount').setValue(record.data.minApplyAmount); top.Ext4.getCmp('maxApplyAmount').setValue(record.data.maxApplyAmount); + top.Ext4.getCmp('fullCaseApplicationAmount').setValue(record.data.fullCaseApplicationAmount); var unit = record.data.unit; var packageSpec = record.data.packageSpec; top.Ext4.getCmp('unit').setValue(unit); @@ -1921,6 +1924,7 @@ {xtype : 'hidden',name : 'externalCode',id : 'externalCode'}, {xtype : 'hidden',name : 'minApplyAmount',id : 'minApplyAmount'}, {xtype : 'hidden',name : 'maxApplyAmount',id : 'maxApplyAmount'}, + {xtype : 'hidden',name : 'fullCaseApplicationAmount',id : 'fullCaseApplicationAmount'}, {xtype : 'hidden',name : 'returnedItemInfo',id : 'returnedItemInfo'}, {xtype : 'hidden',name : 'isUpateStatus',id : 'isUpateStatus'}, {xtype : 'hidden',name : 'departCoding',id : 'departCoding'}, //申请科室的科室编码 @@ -2968,6 +2972,7 @@ var record = context.record; var minApplyAmount = record.get("minApplyAmount"); var maxApplyAmount = record.get("maxApplyAmount"); + var fullCaseApplicationAmount = record.get("fullCaseApplicationAmount") || 0; var count = record.get('count'); if ("urgentAmount" != context.field || !count) { var tousseDefinitionID = record.get('tousseDefinitionID'); @@ -2996,23 +3001,25 @@ record.set("count", context.originalValue); return true; } - if (!isValidDiposableAmount(minApplyAmount, checkCount)) { - if(count != null && count != ""){ - showResult("该一次性物品最小申请数量为" + minApplyAmount + ",所填数量必须是" + minApplyAmount + "的倍数。"); + if(!isValidAddDiposable(fullCaseApplicationAmount,checkCount)){ + if (!isValidDiposableAmount(minApplyAmount, checkCount)) { + if(count != null && count != ""){ + showResult("该一次性物品最小申请数量为" + minApplyAmount + ",所填数量必须是" + minApplyAmount + "的倍数。"); + record.set("count", context.originalValue); + return true; + }else{ + showResult("申请数量不能为空!"); + record.set("urgentAmount",null); + record.set("urgentLevel",null); + return true; + } + } + if (!isUndefinedOrNullOrEmpty(maxApplyAmount) && maxApplyAmount < checkCount) { + showResult("申请数量大于最大可申请数量" + maxApplyAmount); record.set("count", context.originalValue); return true; - }else{ - showResult("申请数量不能为空!"); - record.set("urgentAmount",null); - record.set("urgentLevel",null); - return true; } - } - if (!isUndefinedOrNullOrEmpty(maxApplyAmount) && maxApplyAmount < checkCount) { - showResult("申请数量大于最大可申请数量" + maxApplyAmount); - record.set("count", context.originalValue); - return true; - } + } } return false; } Index: ssts-web/src/main/webapp/images/star.png =================================================================== diff -u Binary files differ Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js =================================================================== diff -u -r32881 -r33065 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 32881) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 33065) @@ -288,12 +288,22 @@ }else{ content = tousseAmount; } + }else if(name == '申请的物品'){ + if(sstsConfig.enableDisposableGoodsFullCaseApplicationAmount){ + if(record.get('count')%record.get('fullCaseApplicationAmount') == 0){ + content = "" + v || ''; + }else { + content = v || ''; + } + }else { + content = v || ''; + } }else { content = v || ''; } if(rowColor == ''){ - return '
'+content+'
'; + return '
'+content+'
'; }else { return '
'+content+'
'; } @@ -608,6 +618,7 @@ {name : 'appRecord'}, {name : 'tousseFixedBarcode'}, {name : 'showTousseName'}, + {name : 'fullCaseApplicationAmount'}, {name : 'count'}, {name : 'waitDeliveryCount'}, {name : 'diposable'}, @@ -793,6 +804,7 @@ ttsName : goods.ttsName, tousseFixedBarcode : goods.tousseFixedBarcode, showTousseName : goods.showTousseName, + fullCaseApplicationAmount:goods.fullCaseApplicationAmount, count : count, scanAmount : goods.scanAmount, waitDeliveryCount:waitDeliveryCount, @@ -1691,6 +1703,7 @@ {name : 'tousseItems'}, {name : 'scannedMaterialAmount'}, {name : 'showTousseName'}, + {name : 'fullCaseApplicationAmount'}, {name : 'count'},//待发数量 {name : 'middlePackageAmount'}, {name : 'diposable'}, Index: ssts-web/src/main/webapp/disinfectsystem/config/gyey/config.js =================================================================== diff -u -r33039 -r33065 --- ssts-web/src/main/webapp/disinfectsystem/config/gyey/config.js (.../config.js) (revision 33039) +++ ssts-web/src/main/webapp/disinfectsystem/config/gyey/config.js (.../config.js) (revision 33065) @@ -119,6 +119,8 @@ closeFormDefinition : false, //启用灭菌器运行前安全检查和灭菌器运行记录表登记功能 enableSterilizerSafetyCheckBeforeRunAndSterilizerRunLogSheetRegistrationFunction:true, + //启用一次性物品整箱申请数量功能 + enableDisposableGoodsFullCaseApplicationAmount:true, //在器械包信息模块显示预计灭菌完成时间 displayTheEstimatedSterilizationCompletionTimeInTheTousseInformationModule:true } \ No newline at end of file