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, '', ''); + } } ];