Index: ssts-web/src/main/webapp/disinfectsystem/goodsBindingConfig/goodsBindHandler.js =================================================================== diff -u -r27591 -r28031 --- ssts-web/src/main/webapp/disinfectsystem/goodsBindingConfig/goodsBindHandler.js (.../goodsBindHandler.js) (revision 27591) +++ ssts-web/src/main/webapp/disinfectsystem/goodsBindingConfig/goodsBindHandler.js (.../goodsBindHandler.js) (revision 28031) @@ -27,9 +27,10 @@ /** * 添加捆绑物 * @param records 需要添加的捆绑物的对象 + * @param type 申请单类型 * @returns {boolean} */ -GoodsBindHandler.prototype.addBindGood = function (records) { +GoodsBindHandler.prototype.addBindGood = function (records,type) { top.Ext4.each(records, function (record) { var id = record.id; var name = record.name; @@ -84,16 +85,17 @@ top.Ext4.Msg.alert("提示消息", "申请数量大于最大可申请数量"); } addItems(id, name, count, isDisposableGoods, isApplyEntireTousse, originalPrice, price, externalCode, storageAmount, - tousseType, materials, unit, packageSpec, minApplyAmount, maxApplyAmount, urgentAmount,urgentLevel,urgentLevelId, para, expressInvoice); + tousseType, materials, unit, packageSpec, minApplyAmount, maxApplyAmount, urgentAmount,urgentLevel,urgentLevelId, para, expressInvoice,type); }); return true; } /** * 处理需要捆绑的物品,先得到对应选择的物品的名字和数量,然后从后台查询出该物品的所有绑定物和对应的捆绑数量,然后添加到表格上 * @param params 如果参数为空说明是点击添加时触发的绑定物品动作,curSelectedGoods前面已经判空了 + * @param type 申请单类型 */ -GoodsBindHandler.prototype.handleBindGood = function (params) { +GoodsBindHandler.prototype.handleBindGood = function (params,type) { var me = this; if (!params) { params = { @@ -179,7 +181,7 @@ return; } - me.addBindGood(records); + me.addBindGood(records,type); } } else { //绑定失败,不提示 Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js =================================================================== diff -u -r27780 -r28031 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 27780) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 28031) @@ -119,7 +119,7 @@ var tousseItemObject = result[i]; addItems(tousseItemObject.tousseDefinitionID,tousseItemObject.name,tousseItemObject.amount,tousseItemObject.diposable, tousseItemObject.isApplyEntireTousse,tousseItemObject.originalPrice,tousseItemObject.price,null, - null,tousseItemObject.tousseType,tousseItemObject.materials,tousseItemObject.unit,null,null,null,null,null,null,{},tousseItemObject.expressInvoice) + null,tousseItemObject.tousseType,tousseItemObject.materials,tousseItemObject.unit,null,null,null,null,null,null,{},tousseItemObject.expressInvoice,null) } //设置是否二次发货、申请单id等隐藏域赋值 top.Ext4.getCmp('gatherInvoicePlanIds').setValue(ids); @@ -893,9 +893,10 @@ * @param urgentLevelId 加急级别id * @param para 追加的参数,是一个对象,里面可以有多种属性,方便以后扩展用(目前只有{behavior:操作类型(添加或者提交或者绑定物品),transferScale:中包装单位装换单位系数,middlePackageUnit:申领单位(原来叫中包装单位)}) * @param expressInvoice 是否快速发货 + * @param type 申请单类型 */ function addItems(tousseDefinitionID,name,count,diposable,isApplyEntireTousse,originalPrice,price,externalCode, - storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice){ + storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice,type){ //1、处理从模板里面找到的(因为前面过滤已经添加的物品,所以剩下的只是模板的物品了) var foundNode = null; var needToCheckNode = {tousseDefinitionID : tousseDefinitionID,name : name,tousseType : tousseType}; @@ -1004,7 +1005,17 @@ var appendNode = null; var tempGrid = 'tousseTreeGrid'; if (sstsConfig.applicationFormType == 1 || tousseApplicationFormGridSplit) { - appendNode = leftTemplateStore.getRootNode().appendChild(tousseInstance); + if(sstsConfig.enableGoodsReservateion && type == reservateionApplicationForm ){//开启了物品预约申请单配置项并且打开的是物品预约申请单 + if(sstsConfig.applicationFormType == 2){//分开的申请单 + appendNode = leftTemplateStore.getRootNode().appendChild(tousseInstance); + }else{ + appendNode = rightTemplateStore.getRootNode().appendChild(tousseInstance); + tempGrid = 'diposableTreeGrid'; + } + }else{ + appendNode = leftTemplateStore.getRootNode().appendChild(tousseInstance); + } + } else { appendNode = rightTemplateStore.getRootNode().appendChild(tousseInstance); tempGrid = 'diposableTreeGrid'; @@ -1043,7 +1054,7 @@ * 添加物品(器械包和一次性物品)到物品申请列表中. * @returns {Boolean} */ -function addRecyclingApplicationItem(){ +function addRecyclingApplicationItem(type){ var comboGoods = top.Ext4.getCmp('package1'); var existRecord = comboGoods.findRecord('name', comboGoods.getRawValue()); if (!existRecord || !curSelectedGoods) { @@ -1133,17 +1144,17 @@ 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); - afterAddItem(true); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice,type); + 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); - afterAddItem(true); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice,type); + 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); - afterAddItem(true); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,originalPrice,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,urgentLevel,urgentLevelId,para,expressInvoice,type); + afterAddItem(true,type); } } } @@ -1162,12 +1173,13 @@ /** * 在点击了添加按钮后来进行判断是否有捆绑物品. * @param bindGood 是否需要进行物品的绑定 + * @param type 申请单类型 * @returns {boolean} */ -function afterAddItem(bindGood) { +function afterAddItem(bindGood,type) { if (bindGood) { var goodsBindHandler = new GoodsBindHandler(); - goodsBindHandler.handleBindGood(); + goodsBindHandler.handleBindGood("",type); } top.Ext4.getCmp('urgentAmount').setValue(''); top.Ext4.getCmp('urgentLevel').setValue(''); @@ -1726,7 +1738,7 @@ formPrinted = records[0].data['printed']; if (type == comboApplicationForm || type == recyclingCreateApplicationForm){ RecyclingApplicationTableManager.getRecyclingApplicationAndVerifyEdit(id,setRecyclingApplicationForm); - }else if(type == tousseApplicationForm || type == diposableGoodsApplicationForm){ + }else if(type == tousseApplicationForm || type == diposableGoodsApplicationForm || type ==reservateionApplicationForm){ RecyclingApplicationTableManager.getRecyclingApplicationAndVerifyEdit(id,setRecyclingApplicationForm); }else if(type == tousseLeaseApplicationForm){ addAndEditTousseLease(id); @@ -1812,7 +1824,8 @@ || type == comboApplicationForm || type == tousseApplicationForm || type == diposableGoodsApplicationForm - || type == disinfectGoodsApplicationForm){ + || type == disinfectGoodsApplicationForm + || type == reservateionApplicationForm){ comboApplication(recyclingApplication.id,recyclingApplication.departCoding,recyclingApplication.depart,hiddenCommitButton,hiddenSaveButton, hiddenReturnButton,type, '', specifyDisposableTypes,recyclingApplication.committedStatus, recyclingApplication.handleDepartCoding,recyclingApplication); @@ -3207,7 +3220,8 @@ if (type == comboApplicationForm || type == tousseApplicationForm || type == diposableGoodsApplicationForm - || type == disinfectGoodsApplicationForm){ + || type == disinfectGoodsApplicationForm + || type == reservateionApplicationForm){ isInterveneAmount = true; RecyclingApplicationTableManager.getRecyclingApplicationAndVerifyEdit(id, setRecyclingApplicationForm); } @@ -3428,7 +3442,8 @@ if ((type == comboApplicationForm || type == tousseApplicationForm || type == diposableGoodsApplicationForm - || type == disinfectGoodsApplicationForm) + || type == disinfectGoodsApplicationForm + || type == reservateionApplicationForm) && deliverStatus != statusArr[2] && (!recyclingStatus || recyclingStatus == recycled || (!recyclingStatus && deliverStatus == statusArr[1]))){ //发货状态!=已发货 &&(回收状态=已回收 || 发货状态=部分发货)--注意一次性物品的回收状态为空 return ""; @@ -3592,6 +3607,16 @@ handler : function() { gatherRecyclingApplication(); } + },{ + text : '物品预约单', + id : 'appointmentApplication', + iconCls : 'btn_ext_add_tousse', + tooltip : '物品预约单', + hidden : !sstsConfig.enableGoodsReservateion, + handler : function() { + formPrinted = 1; + openApplication(reservateionApplicationForm, '', ''); + } } ]; Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js =================================================================== diff -u -r27934 -r28031 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 27934) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 28031) @@ -1,20 +1,4 @@ - var actionType; -/** - * 添加申请单或者修改申请单(目前只有:“通用申请单”、“器械包申请单”、“敷料包申请单”、“消毒物品申请单”、“一次性物品申请单”、“专科器械申请单”这六种申请单会调用此方法). - * @param id 申请单id - * @param deptCoding 申请科室的科室编码(如果是添加则是登录用户的当前科室编码) - * @param depart 申请科室的科室名称(如果是添加则是登录用户的当前科室名称) - * @param hiddenCommitButton 是否隐藏提交按钮 - * @param hiddenSaveButton 是否隐藏暂存按钮 - * @param hiddenReturnEditButton 是否隐藏返回修改按钮 - * @param type 申请单类型 - * @param tousseGroups 器械包分组(需要显示的器械包分组,用分号分隔,为空则显示全部的器械包分组) - * @param specifyDisposableTypes 是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} - * @param originalCommittedStatus 原申请单提交状态 - * @param handleDepartCoding 处理科室的科室编码(修改才有值) - * @param recyclingApplication 申请单对象 - */ //加急级别store var urgentLevelStore = new Ext4.data.Store({ proxy : { @@ -32,12 +16,27 @@ ] }); urgentLevelStore.load(); +/** + * 添加申请单或者修改申请单(目前只有:“通用申请单”、“器械包申请单”、“敷料包申请单”、“消毒物品申请单”、“一次性物品申请单”、“专科器械申请单”这六种申请单会调用此方法). + * @param id 申请单id + * @param deptCoding 申请科室的科室编码(如果是添加则是登录用户的当前科室编码) + * @param depart 申请科室的科室名称(如果是添加则是登录用户的当前科室名称) + * @param hiddenCommitButton 是否隐藏提交按钮 + * @param hiddenSaveButton 是否隐藏暂存按钮 + * @param hiddenReturnEditButton 是否隐藏返回修改按钮 + * @param type 申请单类型 + * @param tousseGroups 器械包分组(需要显示的器械包分组,用分号分隔,为空则显示全部的器械包分组) + * @param specifyDisposableTypes 是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} + * @param originalCommittedStatus 原申请单提交状态 + * @param handleDepartCoding 处理科室的科室编码(修改才有值) + * @param recyclingApplication 申请单对象 + */ function comboApplication(id,deptCoding,depart,hiddenCommitButton,hiddenSaveButton,hiddenReturnEditButton,type,tousseGroups,specifyDisposableTypes, originalCommittedStatus,handleDepartCoding,recyclingApplication) { departJsonStore.load(); //先加载结算科室 //器械包申请单的物品视图是否分成两个grid tousseApplicationFormGridSplit = false; - if (sstsConfig.tousseApplicationFormGridSplit && type == tousseApplicationForm) { + if ((sstsConfig.tousseApplicationFormGridSplit && type == tousseApplicationForm) || (sstsConfig.tousseApplicationFormGridSplit && type == reservateionApplicationForm)) { tousseApplicationFormGridSplit = true; } //登录用户的当前科室编码 @@ -738,7 +737,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); + 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); } } } @@ -945,7 +944,7 @@ if (formType == tousseApplicationForm || formType == disinfectGoodsApplicationForm - || formType == recyclingCreateApplicationForm) { + || formType == recyclingCreateApplicationForm || formType == reservateionApplicationForm) { hiddenUnit2 = !sstsConfig.showTousseUnitColumn; hiddenPrice2 = sstsConfig.hideToussePriceColumn; hiddenTotalPrice2 = sstsConfig.hideToussePriceColumn; @@ -1469,7 +1468,7 @@ field.focus(); return false; } - addRecyclingApplicationItem(); + addRecyclingApplicationItem(type); } }, blur:function(thiz, e, eOpts){ @@ -1571,7 +1570,7 @@ listeners : { specialkey : function(field, ee) { if (ee.getKey() == Ext.EventObject.ENTER && !checkAdd()) { - addRecyclingApplicationItem(); + addRecyclingApplicationItem(type); } } } @@ -1640,19 +1639,19 @@ iconCls : 'btn_ext_add', handler : function() { if (!checkAdd()){ - addRecyclingApplicationItem(); + addRecyclingApplicationItem(type); } } },{ text : '选择模板:', - hidden:((type == comboApplicationForm || type == tousseApplicationForm ) ? true : (!isFirstSupplyRoomUser)) + hidden:((type == comboApplicationForm || type == tousseApplicationForm || type == reservateionApplicationForm) ? true : (!isFirstSupplyRoomUser)) },{ xtype : 'combo', valueField : 'id', displayField : 'title', store : departmentTemplateTitleStore, forceSelection : true, - hidden:((type == comboApplicationForm || type == tousseApplicationForm ) ? true:(!isFirstSupplyRoomUser)), + hidden:((type == comboApplicationForm || type == tousseApplicationForm || type == reservateionApplicationForm) ? true:(!isFirstSupplyRoomUser)), triggerAction : 'all', name : "departmentTemplate", id : "departmentTemplate", Index: ssts-web/src/main/webapp/disinfectsystem/config/dgszyy/config.js =================================================================== diff -u -r27538 -r28031 --- ssts-web/src/main/webapp/disinfectsystem/config/dgszyy/config.js (.../config.js) (revision 27538) +++ ssts-web/src/main/webapp/disinfectsystem/config/dgszyy/config.js (.../config.js) (revision 28031) @@ -178,5 +178,7 @@ //是否启用打印待发货物品功能,true启用,false或者未配置不启用 enablePrintToSendGoods:true, //禁用基数限制 - disableCardinalNumLimit:true + disableCardinalNumLimit:true, + //启用物品预约功能,值为true:启用物品预约功能,在科室申请模块的工具栏显示【预约物品】按钮;值为false或者没有配置:不启用物品预约功能,在科室申请模块的工具栏不显示【预约物品】按钮 + enableGoodsReservateion:true } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.jsp =================================================================== diff -u -r27864 -r28031 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.jsp (.../goodsApplicationView.jsp) (revision 27864) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.jsp (.../goodsApplicationView.jsp) (revision 28031) @@ -236,6 +236,7 @@ var expansionTousseForm = '<%=InvoicePlan.TYPE_TOUSSE_EXPANSION_FORM%>';//普通器械包扩充申请单 var expensiveGoodsForm = '<%=InvoicePlan.TYPE_EXPENSIVEGOODS_FORM%>';//高值耗材申请单 var tousseTypeDisinfect = '<%=TousseDefinition.PACKAGE_TYPE_DISINFECTION%>;<%=TousseDefinition.PACKAGE_TYPE_STERILIZATION%>';//消毒物品和灭菌物品 +var reservateionApplicationForm = '<%=InvoicePlan.TYPE_GOODS_RESERVATION_FORM%>';//物品预约单 var endCause = ${endCause}; var tousseType_diposableGoods = '一次性物品'; var foreignToussePriceOfSysParams = '<%=pageContext.getAttribute("foreignToussePriceOfSysParams")%>';