Index: ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js =================================================================== diff -u -r28919 -r28921 --- ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js (.../sterilizationRecordForm.js) (revision 28919) +++ ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js (.../sterilizationRecordForm.js) (revision 28921) @@ -1994,40 +1994,35 @@ var node; delTousseInsAmount(delAmount,fixedBarcode)//从全局数组中删除 myFixedBarcodes.removeByValue(fixedBarcode);//在全局条码中移除该固定条码 - var childNode = pendingSterilizationColumnTree.getRootNode().childNode || []; - if(childNode.length > 0){ - pendingSterilizationColumnTree.getRootNode().eachChild(function(pNode){ - if (pNode != null && pNode.attributes && pNode.attributes.objBarcode) { - if(pNode.attributes.objBarcode == fixedBarcode &&i<1 ){ - i++ - var name2 = pNode.attributes.objName; - var type2 = pNode.attributes.type; - var depart2 = pNode.attributes.depart; - var reviewTime2 = pNode.attributes.reviewTime; - var amountRight = parseInt(pNode.attributes.objAmount);//右边的数量 - var rootNode2 = sterilizationColumnTree.getRootNode(); - removePendingSterilizationGoods(fixedBarcode)//删除右边的数据 - node = createPendingSterilizationGoodsNode(fixedBarcode,objName,amount+amountRight,'TOUSSE','',reviewTime,sterilingMode) - }else{ - if(stockAmount<0 || isNaN(stockAmount)){ - stockAmount = 0; - } - node = createPendingSterilizationGoodsNode(fixedBarcode,objName,parseInt(stockAmount)+parseInt(amount),'TOUSSE','',reviewTime,sterilingMode) + pendingSterilizationColumnTree.getRootNode().eachChild(function(pNode){ + //移除某一个节点后,再遍历其他节点得到的是undefined + if (pNode != null && pNode.attributes && pNode.attributes.objBarcode) { + if(pNode.attributes.objBarcode == fixedBarcode &&i<1 ){ + i++ + var name2 = pNode.attributes.objName; + var type2 = pNode.attributes.type; + var depart2 = pNode.attributes.depart; + var reviewTime2 = pNode.attributes.reviewTime; + var amountRight = parseInt(pNode.attributes.objAmount);//右边的数量 + var rootNode2 = sterilizationColumnTree.getRootNode(); + removePendingSterilizationGoods(fixedBarcode)//删除右边的数据 + node = createPendingSterilizationGoodsNode(fixedBarcode,objName,amount+amountRight,'TOUSSE','',reviewTime,sterilingMode) + }else{ + if(stockAmount<0 || isNaN(stockAmount)){ + stockAmount = 0; } + node = createPendingSterilizationGoodsNode(fixedBarcode,objName,parseInt(stockAmount)+parseInt(amount),'TOUSSE','',reviewTime,sterilingMode) } - }); + } + }); + if(pendingSterilizationColumnTree.getRootNode().childNode){ pendingSterilizationColumnTree.getRootNode().appendChild(node); }else { pendingSterilizationColumnTree.getRootNode().childNode = []; - if(stockAmount<0 || isNaN(stockAmount)){ - stockAmount = 0; - } - node = createPendingSterilizationGoodsNode(fixedBarcode,objName,parseInt(stockAmount)+parseInt(amount),'TOUSSE','',reviewTime,sterilingMode); pendingSterilizationColumnTree.getRootNode().appendChild(node); } clickNode.remove();//将当前节点移除 - statisticsTousseAndBasket(); - top.Ext.getCmp('btnBatchAddTousse').enable(); + statisticsTousseAndBasket(); } /** @@ -2656,10 +2651,6 @@ id : 'sterilizationGoods' },{ xtype : 'hidden', - name : 'status', - id : 'status' - },{ - xtype : 'hidden', name : 'delTousseJson', id : 'delTousseJson' },{ @@ -4043,7 +4034,6 @@ if(scanUser == true){ top.Ext.getCmp('sterilizationUser').setValue(''); } - top.Ext.getCmp('frequency').enable(); bioreaderStore.load(); } else { //优先显示生物监测数据来源的生物阅读器,其次显示灭菌炉绑定的生物阅读器 @@ -4062,12 +4052,6 @@ top.Ext.getCmp('biologicalMonitoring').setValue("已扫描"); top.Ext.getCmp('monitorPackageBarcode').setValue(monitorPackageBarcode); } - - if(sstsConfig.enableSterilizationDraftStatus && sr.status == '暂存'){ - top.Ext.getCmp('frequency').enable(); - }else { - top.Ext.getCmp('frequency').disable(); - } //加载条码放至全局数组中 var fixedBarcodes = action.result.fixedBarcodes @@ -4120,15 +4104,15 @@ top.Ext.getCmp('monitorAuditor').disable(); if(sr.status == statusFailure && reSterilization == false){ - top.Ext.getCmp('monitorBtn').show(); - top.Ext.getCmp('saveBtn').hide(); + top.Ext.getCmp('monitorBtn').hide(); + top.Ext.getCmp('saveBtn').show(); top.Ext.getCmp('inputBarcode').setDisabled(true); top.Ext.getCmp('biologicalMonitoringStartDate').setDisabled(true); disableItems(); } if(sr.status == statusInterrupt && reSterilization == false){ - top.Ext.getCmp('monitorBtn').show(); - top.Ext.getCmp('saveBtn').hide(); + top.Ext.getCmp('monitorBtn').hide(); + top.Ext.getCmp('saveBtn').show(); top.Ext.getCmp('inputBarcode').setDisabled(true); disableItems(); } @@ -4339,7 +4323,6 @@ var nexFn = function(){ var result = getItemTreeData(); top.Ext.getCmp("sterilizationGoods").setValue(result); - top.Ext.getCmp("status").setValue(''); top.Ext.getCmp("delTousseJson").setValue(JSON.stringify(delTousseJson)); var barcodePostionInfo = getBarcodePositionData(); top.Ext.getCmp("barcodePositionInfo").setValue(barcodePostionInfo); @@ -4467,14 +4450,13 @@ var nexFn = function(){ var result = getItemTreeData(); top.Ext.getCmp("sterilizationGoods").setValue(result); - top.Ext.getCmp("status").setValue(statusDraft); top.Ext.getCmp("delTousseJson").setValue(JSON.stringify(delTousseJson)); var barcodePostionInfo = getBarcodePositionData(); top.Ext.getCmp("barcodePositionInfo").setValue(barcodePostionInfo); Ext.getCmp("formSubmitResult").setValue(0); formObj.form .submit( { - url : WWWROOT + '/disinfectSystem/sterilization/sterilizationRecordAction!savesterilizationRecord.do', + url : WWWROOT + '/disinfectSystem/sterilization/sterilizationRecordAction!savesterilizationRecord.do?status='+statusDraft, method : 'POST', waitMsg : '正在保存数据,请稍候', waitTitle : '提交表单',