Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r27971 -r27986 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 27971) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 27986) @@ -1,6 +1,7 @@ Ext4.require('Ext4.tab.*'); Ext4.require(['Ext4.data.*', 'Ext4.grid.*']); - +var basketBarcodeArr2 = []; +var splitForeignTousseFlag = false;//拆包 //记住最后选择的器械包图片名称、类型、视频名称、包定义id;用于查看材料图片后再次查询器械包 var lastSelectTousseName; var lastSelectimageTypeTousse; @@ -314,6 +315,65 @@ } } + +function addTaskNode(taskId,td_id,invoicePlanId,videoNames,tousseName,amount,washTime,basketBarcode,basketName, + taskStatus,department,tousseType, packageType, packageSize, + sterilingMethod,recyclingTime,isTraceable,isPrint,isReview,errors, + damages,replenishMaterils,taskType,supplierName,haveIDCard,urgentAmount,idCardBarcode, + allowModifyPackageType,errorRemark,damageRemark,urgentLevel,serialNum,recyclingItemRemark,cleaned,note,urgentLevelObj,colorCode){ + var leaf = false; + if(taskId != ''){ + leaf = true; + } + var node = Ext4.create('cModel',{ + taskId : taskId, + tousseID : td_id, + invoicePlanId : invoicePlanId, + tousseName : tousseName, + amount : amount, + urgentAmount : urgentAmount, + urgentLevel : urgentLevel, + unPackingAmount:amount, + washTime : washTime, + basketBarcode : basketBarcode, + basketName : basketName, + status : taskStatus, + department : department, + tousseType : tousseType, + packageType : packageType, + packageSize : packageSize, + sterilingMethod : sterilingMethod, + dateTime : recyclingTime, + isTraceable : isTraceable, + isPrint : isPrint, + isReview : isReview, + errors : errors, + damages : damages, + taskType : taskType, + supplierName : supplierName, + leaf : leaf, + replenishMaterils : replenishMaterils, + haveIDCard:haveIDCard, + uuid_vedioNames : videoNames, + allowModifyPackageType : allowModifyPackageType, + idCardBarcode : idCardBarcode, + errorRemark:errorRemark, + damageRemark:damageRemark, + serialNumber:serialNum, + recyclingItemRemark:recyclingItemRemark, + cleaned: cleaned, + note: note, + urgentLevelObj:urgentLevelObj, + colorCode:colorCode + }); + if(!leaf){ + node.set("checked" ,false); + } + return node; +} + + + Ext4.onReady(function() { taskGroupObj = getTaskGroupObjByName(taskGroup); packingPageAutoSetSterilizationProgramAfterSelectTousse = getBoolValueFromJs('sstsConfig.packingPageAutoSetSterilizationProgramAfterSelectTousse',true); @@ -724,51 +784,51 @@ }); } - -Ext4.define('cModel',{ - extend : 'Ext4.data.Model', - idProperty: 'nodeId', - fields: [ - {name : 'taskId'}, - {name : 'tousseName'}, - {name : 'tousseID'}, - {name : 'invoicePlanId'}, - {name : 'unPackingAmount'}, - {name : 'amount'}, - {name : 'urgentAmount'}, - {name : 'tousseType'}, - {name : 'packageType'}, - {name : 'packageSize'}, - {name : 'sterilingMethod'}, - {name : 'washTime'}, - {name : 'basketName'}, - {name : 'basketBarcode'}, - {name : 'status'}, - {name : 'dateTime'}, - {name : 'errors'}, - {name : 'damages'}, - {name : 'supplierName'}, - {name : 'taskType'}, - {name : 'department'}, - {name : 'isTraceable'}, - {name : 'isPrint'}, - {name : 'isReview'}, - {name : 'replenishMaterils'}, - {name : 'haveIDCard'}, - {name : 'uuid_vedioNames'}, - {name : 'isTimeout'}, - {name : 'allowModifyPackageType'}, - {name : 'errorRemark'}, - {name : 'recyclingItemRemark'}, - {name : 'damageRemark'}, - {name : 'urgentLevel'}, - {name : 'idCardBarcode'}, - {name : 'customSplitBasketAmount'}, - {name : 'serialNumber'}, - {name : 'cleaned'}, - {name : 'note'}, - {name : 'urgentLevelObj'}, - {name : 'colorCode'} + +Ext4.define('cModel',{ + extend : 'Ext4.data.Model', + idProperty: 'nodeId', + fields: [ + {name : 'taskId'}, + {name : 'tousseName'}, + {name : 'tousseID'}, + {name : 'invoicePlanId'}, + {name : 'unPackingAmount'}, + {name : 'amount'}, + {name : 'urgentAmount'}, + {name : 'tousseType'}, + {name : 'packageType'}, + {name : 'packageSize'}, + {name : 'sterilingMethod'}, + {name : 'washTime'}, + {name : 'basketName'}, + {name : 'basketBarcode'}, + {name : 'status'}, + {name : 'dateTime'}, + {name : 'errors'}, + {name : 'damages'}, + {name : 'supplierName'}, + {name : 'taskType'}, + {name : 'department'}, + {name : 'isTraceable'}, + {name : 'isPrint'}, + {name : 'isReview'}, + {name : 'replenishMaterils'}, + {name : 'haveIDCard'}, + {name : 'uuid_vedioNames'}, + {name : 'isTimeout'}, + {name : 'allowModifyPackageType'}, + {name : 'errorRemark'}, + {name : 'recyclingItemRemark'}, + {name : 'damageRemark'}, + {name : 'urgentLevel'}, + {name : 'idCardBarcode'}, + {name : 'customSplitBasketAmount'}, + {name : 'serialNumber'}, + {name : 'cleaned'}, + {name : 'note'}, + {name : 'urgentLevelObj'}, + {name : 'colorCode'} ]}); function buildColumnTreeColumns(treeId){ @@ -2424,62 +2484,62 @@ } } */]; -var basketStore = new Ext4.data.TreeStore({ - model: cModel, - proxy: { - type: 'memory', - reader : { - type : 'json' - } - }, - listeners : { - beforeload : function(store, operation) { - var params = {//参数 - taskGroup : taskGroup - }; - Ext4.apply(store.proxy.extraParams, params); - } - }, - folderSort: true - }); -var waitPackingTaskStore = new Ext4.data.TreeStore({ - model: cModel, - proxy: { - type: 'ajax', - url: WWWROOT + '/disinfectSystem/packingAction!loadWaitPackingTaskJson.do' - }, - listeners : { - beforeload : function(store, operation) { - var params = {//参数 - taskGroup : taskGroup - }; - Ext4.apply(store.proxy.extraParams, params); - }, - load : function(treeStore, node, records, successful, eOpts){ - Ext4.Ajax.request({ - url : WWWROOT + '/system/timeoutAction!getTimeoutSetting.do', - params : {procedure : 'washToPacking'}, - success : function(response, options) { - var result = Ext4.decode(response.responseText); - if(result.success && result.showMessageBox){ - var timeoutCount = 0; - for(var i = 0; i < records.length;++i){ - for(var j = 0; j < records[i].data.children.length;++j){ - var task = records[i].data.children[j]; - if(task.isTimeout){ - timeoutCount++; - } - } - } - if(timeoutCount > 0){ - showResult('有'+timeoutCount+'个超时未装配的装配任务,请及时处理红色标注的装配任务' , null , sstsConfig.messagePauseTimeOnPackingPage); - } - } - } - }); - } - }, - folderSort: true +var basketStore = new Ext4.data.TreeStore({ + model: cModel, + proxy: { + type: 'memory', + reader : { + type : 'json' + } + }, + listeners : { + beforeload : function(store, operation) { + var params = {//参数 + taskGroup : taskGroup + }; + Ext4.apply(store.proxy.extraParams, params); + } + }, + folderSort: true + }); +var waitPackingTaskStore = new Ext4.data.TreeStore({ + model: cModel, + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/packingAction!loadWaitPackingTaskJson.do' + }, + listeners : { + beforeload : function(store, operation) { + var params = {//参数 + taskGroup : taskGroup + }; + Ext4.apply(store.proxy.extraParams, params); + }, + load : function(treeStore, node, records, successful, eOpts){ + Ext4.Ajax.request({ + url : WWWROOT + '/system/timeoutAction!getTimeoutSetting.do', + params : {procedure : 'washToPacking'}, + success : function(response, options) { + var result = Ext4.decode(response.responseText); + if(result.success && result.showMessageBox){ + var timeoutCount = 0; + for(var i = 0; i < records.length;++i){ + for(var j = 0; j < records[i].data.children.length;++j){ + var task = records[i].data.children[j]; + if(task.isTimeout){ + timeoutCount++; + } + } + } + if(timeoutCount > 0){ + showResult('有'+timeoutCount+'个超时未装配的装配任务,请及时处理红色标注的装配任务' , null , sstsConfig.messagePauseTimeOnPackingPage); + } + } + } + }); + } + }, + folderSort: true }) function getErrorOrDamageRemark(type,taskId){ function findNode(rootNode,taskId){ @@ -2521,61 +2581,6 @@ //赋值给全局变量 onErrorDamageBtnClick = errorDamageBtnClick; -function addTaskNode(taskId,td_id,invoicePlanId,videoNames,tousseName,amount,washTime,basketBarcode,basketName, - taskStatus,department,tousseType, packageType, packageSize, - sterilingMethod,recyclingTime,isTraceable,isPrint,isReview,errors, - damages,replenishMaterils,taskType,supplierName,haveIDCard,urgentAmount,idCardBarcode, - allowModifyPackageType,errorRemark,damageRemark,urgentLevel,serialNum,recyclingItemRemark,cleaned,note,urgentLevelObj,colorCode){ - var leaf = false; - if(taskId != ''){ - leaf = true; - } - var node = Ext4.create('cModel',{ - taskId : taskId, - tousseID : td_id, - invoicePlanId : invoicePlanId, - tousseName : tousseName, - amount : amount, - urgentAmount : urgentAmount, - urgentLevel : urgentLevel, - unPackingAmount:amount, - washTime : washTime, - basketBarcode : basketBarcode, - basketName : basketName, - status : taskStatus, - department : department, - tousseType : tousseType, - packageType : packageType, - packageSize : packageSize, - sterilingMethod : sterilingMethod, - dateTime : recyclingTime, - isTraceable : isTraceable, - isPrint : isPrint, - isReview : isReview, - errors : errors, - damages : damages, - taskType : taskType, - supplierName : supplierName, - leaf : leaf, - replenishMaterils : replenishMaterils, - haveIDCard:haveIDCard, - uuid_vedioNames : videoNames, - allowModifyPackageType : allowModifyPackageType, - idCardBarcode : idCardBarcode, - errorRemark:errorRemark, - damageRemark:damageRemark, - serialNumber:serialNum, - recyclingItemRemark:recyclingItemRemark, - cleaned: cleaned, - note: note, - urgentLevelObj:urgentLevelObj, - colorCode:colorCode - }); - if(!leaf){ - node.set("checked" ,false); - } - return node; -} function showPackButton(isPrint,isReview,tousseType){ var packButton = Ext4.getCmp('save_print'); @@ -4097,6 +4102,8 @@ showResult('篮筐条码为空' , null , sstsConfig.messagePauseTimeOnPackingPage); return; } + + basketBarcodeArr2.push(basketBarcode); var myMask = new Ext4.LoadMask({msg:"正在加载,请稍候...",target:Ext4.getCmp('basketTreeGrid')}); myMask.show(); Ext4.Ajax.request({ @@ -4893,6 +4900,171 @@ * websocket的业务回调函数(将需要处理的业务写在此函数中) */ function websocketCallBack(){ - //刷新待装配任务列表(须参考需求的预期结果进行前端业务的开发:ZSWY-110 多人同时进行装配和审核时界面上的待处理任务要自动实时刷新) - //grid.dwrReload(); + //刷新装配和待装配任务列表(须参考需求的预期结果进行前端业务的开发:ZSWY-110 多人同时进行装配和审核时界面上的待处理任务要自动实时刷新) + var basketBarcodeArrAll = basketBarcodeArr2; + if(basketBarcodeArrAll.length > 0){ + Ext4.getCmp('basketTreeGrid').getStore().reload(); + if(!splitForeignTousseFlag){ + Ext4.getCmp('waitPackingTreeGrid').getStore().reload(); + } + for(var i=0;i