Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r17436 -r17445 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 17436) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 17445) @@ -346,6 +346,7 @@ {name : 'haveIDCard'}, {name : 'uuid_vedioNames'}, {name : 'isTimeout'}, + {name : 'allowModifyPackageType'}, {name : 'idCardBarcode'} ]}); @@ -1194,7 +1195,7 @@ labelAlign:'right', id : 'sterileDate', name : 'sterileDate', - hidden : sstsConfig.printLabelWhenReviewing, + hidden : sstsConfig.printLabelWhenReviewing || sstsConfig.hideSterileDate, emptyText : '默认为今天', inputAttrTpl: " data-qtip='空白表示灭菌日期为今天' ", editable : false, @@ -1561,7 +1562,7 @@ function addTaskNode(taskId,td_id,videoNames,tousseName,amount,washTime,basketBarcode,basketName, taskStatus,department,tousseType, packageType, sterilingMethod,recyclingTime,isTraceable,isPrint,isReview,errors, - damages,replenishMaterils,taskType,supplierName,haveIDCard,urgentAmount,idCardBarcode){ + damages,replenishMaterils,taskType,supplierName,haveIDCard,urgentAmount,idCardBarcode,allowModifyPackageType){ var leaf = false; if(taskId != ''){ leaf = true; @@ -1593,6 +1594,7 @@ replenishMaterils : replenishMaterils, haveIDCard:haveIDCard, uuid_vedioNames : videoNames, + allowModifyPackageType : allowModifyPackageType, idCardBarcode : idCardBarcode }); if(!leaf){ @@ -1670,6 +1672,43 @@ hideScanIDCardBarcode();// 只要左边有选中的项,那么隐藏标识牌输入框 } } +// 设置包装类型只读 +function setPackageTypeReadOnlyByCondition(){ + var bRet = false; + var basketTree = Ext4.getCmp('basketTreeGrid'); + var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid'); + var selNodes = basketTree.getView().getChecked(); + var selLength = selNodes.length; + + //遍历器械包节点 + Ext4.each(selNodes, function(pNode){ + var allowModifyPackageType = pNode.get("allowModifyPackageType"); + if(allowModifyPackageType != '是'){ + bRet = true; + return false; + } + }); + if(!bRet){ + //选择统计的敷料包选项全打印 + var selNodes = waitPackingTreeGrid.getView().getChecked(); + var selLength = selNodes.length; + Ext4.each(selNodes, function(pNode) { + var allowModifyPackageType = pNode.get("allowModifyPackageType"); + if(allowModifyPackageType != '是'){ + bRet = true; + return false; + } + }); + + } + if(bRet){ + Ext4.getCmp('packageType').disable(); + }else{ + Ext4.getCmp('packageType').enable(); + } + return bRet; + +} function deselectCheckAll(){ var checkAllTaskNode = Ext4.getCmp('checkAllTaskNode'); checkAllTaskNode.setValue(false); @@ -2173,6 +2212,7 @@ } Ext4.getCmp('sterilingType').setValue(null); Ext4.getCmp('packageType').setValue(null); + Ext4.getCmp('packageType').enable(); lastSelectedTousseName = null; //如果装配界面的配包/审核人是否默认为上一次装配的配包/审核人配置为false,则装配完后需要重新清空 @@ -2515,7 +2555,7 @@ if(!isLeaf){ if(record.get('checked') == false){ record.set('checked', true); - waitPackingTreeGrid.getView().fireEvent('checkchange'); + basketColumnTreeGrid.getView().fireEvent('checkchange'); } }else{ return false; @@ -2524,6 +2564,7 @@ }, checkchange:function( node, checked, eOpts ){ resetScanIDCardBarcodeVisibility(node); + setPackageTypeReadOnlyByCondition(); if(!checked){ deselectCheckAll(); } @@ -2594,7 +2635,7 @@ if(parentNode == null){ parentNode = addTaskNode('',td_id,videoNames,tousseName,0,'','','', '','',tousseType, packageType, - sterilingMethod,'',isTraceable,isPrint,isReview,'','',rMaterils,'','',haveIDCard,urgentAmount,taskVO.idCardBarcode); + sterilingMethod,'',isTraceable,isPrint,isReview,'','',rMaterils,'','',haveIDCard,urgentAmount,taskVO.idCardBarcode,taskVO.allowModifyPackageType); newParentNode = true; } var cLength = taskVO.children.length; @@ -2633,7 +2674,7 @@ if(sigle){ var childNode = addTaskNode(taskId,td_id,videoNames,tousseName,amount,washTime,basketBarcode,basketName, taskStatus,department,tousseType, packageType,sterilingMethod,dateTime,isTraceable,isPrint,isReview, - errors,damages,replenishMaterils,taskType,supplierName,task.haveIDCard,childUrgentAmount,task.idCardBarcode); + errors,damages,replenishMaterils,taskType,supplierName,task.haveIDCard,childUrgentAmount,task.idCardBarcode,task.allowModifyPackageType); parentNode.appendChild(childNode); var pNewAmount = parentNode.get('amount') + amount; parentNode.set('amount',pNewAmount); @@ -2758,14 +2799,15 @@ if(!isLeaf){ if(record.get('checked') == false){ record.set('checked', true); - basketTreeGrid.getView().fireEvent('checkchange'); + waitPackColumnTreeGrid.getView().fireEvent('checkchange'); } }else{ return false; } }, checkchange:function( node, checked, eOpts ){ resetScanIDCardBarcodeVisibility(node); + setPackageTypeReadOnlyByCondition(); }, itemcontextmenu : taskItemMenu },