Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/customTousseDefinitionForm.js =================================================================== diff -u -r28765 -r29050 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/customTousseDefinitionForm.js (.../customTousseDefinitionForm.js) (revision 28765) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/customTousseDefinitionForm.js (.../customTousseDefinitionForm.js) (revision 29050) @@ -552,7 +552,6 @@ columnWidth : .33, layout : 'form', labelWidth : 120, - hidden : true, labelAlign:"right", items:[{ xtype : 'combo', Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/customTousseForm.js =================================================================== diff -u -r27319 -r29050 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/customTousseForm.js (.../customTousseForm.js) (revision 27319) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/customTousseForm.js (.../customTousseForm.js) (revision 29050) @@ -32,7 +32,8 @@ {name : 'spelling',mapping : 'spelling'}, {name : 'type',mapping : 'type'}, {name : 'name',mapping : 'name'}, - {name : 'isImplant',mapping : 'isImplant'} + {name : 'isImplant',mapping : 'isImplant'}, + {name : 'isRecycling',mapping : 'isRecycling'} ]) }); @@ -80,7 +81,19 @@ createChildNode(node, id, name, isImplant, count1, type); } +function changeisRecycling(id,value){ + var rootNode = top.Ext.getCmp('tousseLeaseColumnTree').getRootNode(); + + rootNode.eachChild(function(childNode){ + if(childNode.attributes.id == id){ + childNode.attributes.isRecycling = value; + return true; + } + }); + //record.data.urgentLevelIdForUseRecord = urgentLevelId; +} + /** * @param appId * @param tousseId @@ -105,6 +118,23 @@ width:170, dataIndex:'material' },{ + header:'是否回收', + width:80, + renderer:function(v,p,record){ + if(!record.leaf){ + var id = record.id; + var isRecyclingID = "select_"+id; + var str = "" + return str; + } + } + },{ header:'是否植入物', width:80, dataIndex:'isImplant' @@ -136,7 +166,7 @@ }], root: new top.Ext.tree.AsyncTreeNode({ text:'器械包' - }) + }) }); SupplyRoomConfigTableManager.getStartTimeObject(function(supplyRoomConfig){ @@ -463,6 +493,10 @@ name : 'isImplant', id : 'isImplant' },{ + xtype : 'hidden', + name : 'isRecycling', + id : 'isRecycling' + },{ columnWidth : .5, layout : 'form', labelWidth : 70, @@ -685,6 +719,10 @@ waitMsg : '正在加载数据,请稍候', success : function(form, action) { var InvoicePlan = action.result.data; + var recyclingStatus = InvoicePlan.recyclingStatus; + var deliverStatus = InvoicePlan.deliverStatus; + var printed = InvoicePlan.printed; + top.Ext.getCmp('applicant').setValue(InvoicePlan.applicant); top.Ext.getCmp('urgency').setValue(InvoicePlan.urgency); top.Ext.getCmp('applicationTime').setValue(InvoicePlan.applicationTimeStr); @@ -695,8 +733,13 @@ top.Ext.getCmp('remark').setValue(InvoicePlan.remark); top.Ext.getCmp('urgency').setValue(InvoicePlan.urgency); for(var i = 0; i < InvoicePlan.applicationItems.length; i++){ + var idDisabled = true; var tousseItem = InvoicePlan.applicationItems[i]; - var parentNode = createParentNode(tousseItem.id,tousseItem.tousseName, tousseItem.amount, tousseItem.type, tousseItem.isImplant, tousseItem.price); + var isPacked = tousseItem.isPacked; + if((recyclingStatus == '待回收' || recyclingStatus == '') && deliverStatus == '待发货' && printed == 1 && isPacked == false){ + idDisabled = false; + } + var parentNode = createParentNode(tousseItem.id,tousseItem.tousseName, tousseItem.amount, tousseItem.type, tousseItem.isImplant, tousseItem.price, tousseItem.isRecycling,idDisabled); var materials = tousseItem.materials; for(var j = 0; j < materials.length; j++){ var m = materials[j]; @@ -861,6 +904,7 @@ node.attributes.amount = count; node.attributes.type = "自定义器械包"; node.attributes.isImplant = "否"; + node.attributes.isRecycling = "是"; //加0为了解决改器械包列表包名页面正常显示,但其是改fromTousse的值,而tousseName其实不会被修改的问题fromTousse node.attributes.fromTousse = '0'+tousseName; //如果添加的器械包有材料就创建子节点 @@ -928,6 +972,7 @@ var tousseName = n.attributes.tousseName.trim(); var isImplant = n.attributes.isImplant.trim(); var amount = n.attributes.amount; + var isRecycling = n.attributes.isRecycling; var partToussePrice = n.attributes.toussePrice; if(!tousseName){ msg = "自定义器械包名称不能为空!"; @@ -971,6 +1016,7 @@ id : n.attributes.id, tousseName : tousseName, amount : amount, + isRecycling:isRecycling, isImplant : isImplant, materials : materialInfo, price : partToussePrice @@ -1060,7 +1106,7 @@ childNode.attributes.fromTousse = "0"+parentNode.attributes.tousseName; parentNode.insertBefore(childNode,parentNode.firstChild); } -function createParentNode(id, tousseName, count, type, isImplant, toussePrice){ +function createParentNode(id, tousseName, count, type, isImplant, toussePrice,isRecycling,idDisabled){ var rootNode = top.Ext.getCmp('tousseLeaseColumnTree').getRootNode(); //创建父节点 var node = new top.Ext.tree.TreeNode({ @@ -1077,7 +1123,9 @@ node.attributes.amount = count; node.attributes.type = type; node.attributes.isImplant = isImplant; + node.attributes.isRecycling = isRecycling; node.attributes.toussePrice = toussePrice; + node.attributes.idDisabled = idDisabled; //加0为了解决改器械包列表包名页面正常显示,但其是改fromTousse的值,而tousseName其实不会被修改的问题fromTousse node.attributes.fromTousse = '0'+tousseName; rootNode.appendChild(node);