Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js =================================================================== diff -u -r25476 -r25701 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 25476) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 25701) @@ -74,12 +74,20 @@ beforeedit: function(editor, context, eOpts){ var record = context.record; var isLeaf = record.get('leaf'); - var colIdx = context.colIdx; - if(!isLeaf && (colIdx == 3 || colIdx == 4 || colIdx == 6 || colIdx == 7)){ - return false; - }else if(isLeaf && (colIdx == 1 || colIdx == 5 || colIdx == 8|| colIdx == 9 || colIdx == 10)){ - return false; - } + var colIdx = context.colIdx; + if(sstsConfig.foreignTousseAddWeight){ + if(!isLeaf && (colIdx == 4 || colIdx == 5 || colIdx == 7 || colIdx == 8)){//根节点不能编辑 + return false; + }else if(isLeaf && (colIdx == 1 || colIdx == 6 || colIdx == 9|| colIdx == 10 || colIdx == 11 || colIdx == 3)){ + return false; + } + }else{ + if(!isLeaf && (colIdx == 3 || colIdx == 4 || colIdx == 6 || colIdx == 7)){ + return false; + }else if(isLeaf && (colIdx == 1 || colIdx == 5 || colIdx == 8|| colIdx == 9 || colIdx == 10)){ + return false; + } + } }, edit:function(editor, context, eOpts){ //如果是“工具”则把是否植入物的默认值设置成“否” var record = context.record; @@ -111,6 +119,7 @@ {name : 'tousseDefinitionId'}, {name : 'oldTousseName'}, {name : 'tousseName'}, + {name : 'weight'}, {name : 'supplierName'}, {name : 'oldSupplierName'}, {name : 'amount'}, @@ -208,6 +217,7 @@ 'implants':implants, 'materials':materials, 'splitNumber':n.get('splitNumber'), + 'weight':n.get('weight'), 'foreignToussePrintAmount':n.get('foreignToussePrintAmount') }; @@ -368,7 +378,6 @@ //第一次回收时间 summary.recyclingTime = recyclingTime; summary.printType = printType; - var myObj = printConfig[formTypeOfPrinted]; if(isUndefinedOrNullOrEmpty(myObj)){ var msg = '未找到('+formTypeOfPrinted+')的打印配置'; @@ -424,6 +433,13 @@ msg = "外来器械数量必须大于0!"; break; } + if(sstsConfig.foreignTousseAddWeight){ + if(n.get("weight") == "" || n.get("weight") == undefined ){ + msg = "请填写外来器械包的重量!"; + break; + } + } + var materialNodes = n.childNodes; var materials = []; @@ -471,6 +487,7 @@ tousseDefinitionId : n.get("tousseDefinitionId"), oldTousseName : n.get("oldTousseName"), tousseName : n.get("tousseName"), + weight : n.get("weight"), oldSupplierName : n.get("oldSupplierName"), supplierName : n.get("supplierName"), amount : n.get("amount"), @@ -1164,6 +1181,7 @@ tousseDefinitionId : tousseDefinitionId, oldTousseName: foreignTousseName, tousseName: foreignTousseName, + weight:"", oldSupplierName : suppler, supplierName : suppler, packageSize : (packageSize ? packageSize : defaultPackageSize), @@ -1563,8 +1581,29 @@ return btnHtml; } } - }]; - + }]; + //增加重量字段 + if(sstsConfig.foreignTousseAddWeight){ + foreignTousseColumns.splice(3, 0, { + header: '重量(公斤)', + width : 70, + align:'center', + sortable: true, + dataIndex: 'weight', + editor: { + xtype: 'numberfield', + allowBlank: false, + allowNegative: false, // 不允许负数 + allowDecimals: true, // 允许小数点 + minValue: 0, + listeners : { + 'focus':function(){ + this.selectText(); + } + } + } + }); + } //foreignTousseTreeGrid的store foreignTousseStore = new Ext4.data.TreeStore({ model: foreignTousseItemModel,