Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js =================================================================== diff -u -r12606 -r12607 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 12606) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 12607) @@ -57,8 +57,8 @@ function updateDisinfectGoodsChildNodes(parentNode){ var depth = parentNode.getDepth(); var isLeaf = parentNode.get('leaf'); - var isCleanedEntirely = parentNode.get('isCleanedEntirely'); - if (depth == 1 && isLeaf == false && isCleanedEntirely == '是'){ + var isApplyEntireTousse = parentNode.get('isApplyEntireTousse'); + if (depth == 1 && isLeaf == false && isApplyEntireTousse == '是'){ var nodes = parentNode.childNodes; var c = parentNode.get('count'); //如果父节点的数量为空,则清空子节点的数量 @@ -84,7 +84,7 @@ return ""; } // 分支节点,并且不是整包清洗,则不显示金额 - if ( !record.get('leaf') && '是' != record.get('isCleanedEntirely')){ + if ( !record.get('leaf') && '是' != record.get('isApplyEntireTousse')){ return ""; } return Number(v).toFixed(2); @@ -218,7 +218,7 @@ {name : 'tousseDefinitionID'}, {name : 'type',mapping : 'type'}, {name : 'tousseType',mapping : 'tousseType'}, - {name : 'isCleanedEntirely',mapping : 'isCleanedEntirely'}, + {name : 'isApplyEntireTousse',mapping : 'isApplyEntireTousse'}, {name : 'displayName',mapping : 'displayName'}, {name : 'price',mapping : 'price'}, {name : 'packageSpec',mapping : 'packageSpec'}, @@ -355,7 +355,7 @@ {name : 'diposable'}, {name : 'tousseType'}, {name : 'groupNum'}, - {name : 'isCleanedEntirely'}, + {name : 'isApplyEntireTousse'}, {name : 'externalCode'}, {name : 'packageSpec'}, {name : 'price'}, @@ -545,7 +545,7 @@ // 该节点是否存在数量信息 if(!Ext4.isEmpty(node.get('count'))){ // 该节点为分支节点或者父节点为非整包清洗 - if (node.get('leaf') == false || node.parentNode.get('isCleanedEntirely') != '是'){ + if (node.get('leaf') == false || node.parentNode.get('isApplyEntireTousse') != '是'){ isInputed = true; } } @@ -601,7 +601,7 @@ var targetNode = foundNode; // 如果节点是消毒物品,并且不是整包清洗,则更新其子节点(材料)的数量 - if (!targetNode.get('leaf') && targetNode.get('isCleanedEntirely') != '是'){ + if (!targetNode.get('leaf') && targetNode.get('isApplyEntireTousse') != '是'){ var childNodes = targetNode.childNodes; if (childNodes != null && childNodes.length > 0){ targetNode = childNodes[0]; @@ -616,7 +616,7 @@ } //TODO 5 取消科室申请模板 -function addItems(tousseDefinitionID,name,count,diposable,isCleanedEntirely,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount){ +function addItems(tousseDefinitionID,name,count,diposable,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount){ var foundNode = null; foundNode = getExsistNodeByTousseDefinitionID(leftTemplateStore, tousseDefinitionID); @@ -667,7 +667,7 @@ var pacakgeCount = count; var packageTotalPrice = roundValue(price*count); // 如果不是整包清洗,则将第一种材料的数量填写为申请数量,将包的数量置为空 - if (isCleanedEntirely != '是'){ + if (isApplyEntireTousse != '是'){ childNodes[0].count = count; pacakgeCount = ""; packageTotalPrice = ""; @@ -680,7 +680,7 @@ count : pacakgeCount, diposable : diposable, tousseType : tousseType, - isCleanedEntirely : isCleanedEntirely, + isApplyEntireTousse : isApplyEntireTousse, externalCode : externalCode, storage : storageAmount, unit : unit, @@ -728,7 +728,7 @@ top.Ext4.getCmp('count1').setValue(""); top.Ext4.getCmp('count1').focus(); }else{//都不为空,我就让你加进来 - addItems(id,name,count,top.Ext4.getCmp('isDiposableGoods').getValue(),top.Ext4.getCmp('isCleanedEntirely').getValue(),top.Ext4.getCmp('price').getValue(),'','','',''); + addItems(id,name,count,top.Ext4.getCmp('isDiposableGoods').getValue(),top.Ext4.getCmp('isApplyEntireTousse').getValue(),top.Ext4.getCmp('price').getValue(),'','','',''); } } @@ -809,9 +809,9 @@ var externalCode = isDiposableGoods == '是' ?top.Ext4.getCmp('externalCode').getValue() : ''; var unit = top.Ext4.getCmp('unit').getValue(); var packageSpec = top.Ext4.getCmp('packageSpec').getValue(); - var isCleanedEntirely = top.Ext4.getCmp('isCleanedEntirely').getValue(); + var isApplyEntireTousse = top.Ext4.getCmp('isApplyEntireTousse').getValue(); - addItems(id,name,count,isDiposableGoods,isCleanedEntirely,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount); top.Ext4.getCmp('diposableGoodsAmount').setValue(''); top.Ext4.getCmp('minApplyAmount').setValue(''); top.Ext4.getCmp('isDiposableGoods').setValue(""); @@ -855,9 +855,9 @@ for (var i=0;i 0 ){ - var depth = record.getDepth(); + var depth = record.getDepth();//获取节点的深度 if (depth == 1){ if (record.get('tousseType') != tousseType_disinfectGoods){ return 'not-null-row'; } else{ - if (record.get('isCleanedEntirely') == '是'){ + if (record.get('isApplyEntireTousse') == '是'){ return 'not-null-row'; } } - } - else if (depth == 2){ + } else if (depth == 2){ var pNode = record.parentNode; // 非整包清洗 - if (pNode.get('isCleanedEntirely') != '是'){ + if (pNode.get('isApplyEntireTousse') != '是'){ return 'not-null-row'; } // 整包清洗 @@ -1385,7 +1387,7 @@ // 点击消毒物品包数量的单元格 else{ // 是整包清洗 - if (record.get('isCleanedEntirely') == "是"){ + if (record.get('isApplyEntireTousse') == "是"){ return true; } else{ @@ -1397,7 +1399,7 @@ else if (depth == 2){ // 是整包清洗 var parentNode = record.parentNode; - if (parentNode.get('isCleanedEntirely') == "是"){ + if (parentNode.get('isApplyEntireTousse') == "是"){ showResult(parentNode.get('name') + "只能按包申请,请填写包数量!"); return false; } @@ -1412,6 +1414,7 @@ var isDiposableGoods = record.get("diposable"); var minApplyAmount = record.get("minApplyAmount"); + if (isDiposableGoods == '是' && context.value != null && context.value != ''){ var storage = record.get("storage"); if(parseInt(context.value,10) > storage && !allowApplyDisposableGoodsWhenUnderstock){ @@ -1567,8 +1570,8 @@ id : 'tousseType' }, { xtype : 'hidden', - name : 'isCleanedEntirely', - id : 'isCleanedEntirely' + name : 'isApplyEntireTousse', + id : 'isApplyEntireTousse' }, { xtype : 'hidden', name : 'materials', @@ -1749,7 +1752,7 @@ if(tousseType != tousseType_diposableGoods){ top.Ext4.getCmp('isDiposableGoods').setValue('否'); top.Ext4.getCmp('tousseType').setValue(record.data.tousseType); - top.Ext4.getCmp('isCleanedEntirely').setValue(record.data.isCleanedEntirely); + top.Ext4.getCmp('isApplyEntireTousse').setValue(record.data.isApplyEntireTousse); var unit = record.data.unit; top.Ext4.getCmp('unit').setValue(unit); if(tousseType == tousseType_disinfectGoods){ @@ -1968,7 +1971,7 @@ unit = " ";//改为json传数据后不用赋值为空格 } // 如果是消毒物品,并且不是整包清洗,则将消毒物品的包的数量置为1 - if (tousseType == tousseType_disinfectGoods && n.get('isCleanedEntirely') != '是'){ + if (tousseType == tousseType_disinfectGoods && n.get('isApplyEntireTousse') != '是'){ applyAmount = 1; var materialNodes = n.childNodes; totalPrice = 0; @@ -2153,6 +2156,7 @@ } }; +//根据返回的结果重置表单数据 function setRecyclingApplicationForm(tempRecyclingApplication){ if(tempRecyclingApplication){ @@ -2410,7 +2414,7 @@ {header : "结算科室",width : 120,dataIndex : 'settleAccountsDepart',hidden:sstsConfig.hideSettleDepartColumn}, {header : "申请人",width : 60,dataIndex : 'applicant'}, {header : "申请时间",width : 120,dataIndex : 'applicationTime', renderer : myDateFormatByMinute}, - {header : "提交时间",width : 120,dataIndex : 'submitTime', renderer : myDateFormatByMinute}, + {header : "最后修改时间",width : 120,dataIndex : 'submitTime', renderer : myDateFormatByMinute}, {header : "打印时间",width : 120,dataIndex : 'printTime', renderer : myDateFormatByMinute}, {header : "类型",width : 105,dataIndex : 'type'}, {header : "已提交",width : 45,dataIndex : 'committedStatus', renderer : renderStatus},