Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r38475 -r38490 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 38475) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 38490) @@ -747,6 +747,162 @@ win.show(); } +function updateUrgentLevelOfPackingTask(record){ + var urgentLevelItems = Ext.data.Record.create([ + { name: 'id', type: 'string' }, + { name: 'urgentLevel', type: 'string' } + ]); + var urgentLevelStore = new top.Ext.data.Store({ + proxy : new top.Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/urgentLevelAction!getUrgentsForSelect.do', + method : "POST" + }), + reader: new Ext.data.JsonReader({ + root: 'data' + },[ + {name: 'id'}, + {name: 'urgentLevel'} + ]), + listeners : { + load : function(thiz,records,options){ + urgentLevelStore.insert(0, new urgentLevelItems({ 'id': 0, 'urgentLevel': '空值' })); + } + } + }); + urgentLevelStore.load() + + var form = new top.Ext.FormPanel({ + id : 'taskRecordForm', + frame : true, + border : 0, + labelSeparator : ':', + bodyStyle : 'padding:5px 5px 0px 5px', + width : 600, + labelAlign:'right', + autoHeight : true, + autoScroll : true, + items : [{ + layout : 'column', + autoHeight:true, + items:[{ + layout : 'column', + items : [{ + xtype : 'hidden', + name : 'packingTaskId', + id : 'packingTaskId', + value:record.taskId + },{ + columnWidth : 1, + layout : 'form', + labelWidth : 80, + items : [{ + xtype : 'textfield', + fieldLabel : '物品名称', + maxLength : '16', + id : 'newTousseName', + name : 'newTousseName', + allowBlank : false, + anchor : '100%', + readOnly : true, + value:record.tousseName, + cls:'fieldReadOnlyNoRemove' + }] + },{ + columnWidth : 1, + layout : 'form', + labelWidth : 80, + items : [{ + xtype : 'combo', + fieldLabel : '加急等级', + id : 'urgentLevelId', + name : 'urgentLevelId', + store : urgentLevelStore, + valueField : 'id', + displayField : 'urgentLevel', + minChars : 0, + forceSelection : true, + lazyInit : true, + editable:false, + triggerAction : 'all', + anchor : '100%', + typeAhead : false + }] + },{ + columnWidth : 1, + layout : 'form', + labelWidth : 80, + items:[{ + xtype: 'numberfield', + fieldLabel: '加急数量', + allowDecimals: false, + allowNegative: false, + id: 'urgentAmount', + name: 'urgentAmount', + minValue: 1, + value:record.urgentAmount == 0 ? '' : record.urgentAmount, + anchor : '100%' + }] + }] + }] + }], + buttonAlign :'center', + buttons : [{ + text : '保存', + handler : function(){ + var packingTaskId = top.Ext.getCmp('packingTaskId').getValue(); + var urgentLevelId = top.Ext.getCmp('urgentLevelId').getValue(); + var urgentAmount = top.Ext.getCmp('urgentAmount').getValue(); + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/packingAction!updateUrgentLevelOfPackingTask.do', + params:{ + packingTaskId:packingTaskId, + urgentLevelId:urgentLevelId, + urgentAmount:urgentAmount + }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (result.success) { + showMultipleResult('设置成功'); + win.close(); + reflushWaitPackingTreeGrid(); + }else { + showMultipleResult(result.message); + } + }, + failure: function (response, options) { + var result = Ext.decode(response.responseText); + showMultipleResult(result.message); + } + }); + } + },{ + text : '取消', + handler : function() { + win.close(); + } + }] + }); + var win = new top.Ext.Window({ + id : 'updateUrgentLevelOfPackingTaskWin', + layout : 'fit', + title : '加急等级设置', + width : 380, + modal : true, + autoHeight : true, + closeAction:'close', + border : false, + height:180, + plain : true, + items : [ form ] + }); + win.show(); + + if(record.urgentLevelObj){ + top.Ext.getCmp('urgentLevelId').setValue(record.urgentLevelObj.id); + top.Ext.getCmp('urgentLevelId').setRawValue(record.urgentLevelObj.name); + } +} + //ZSWY-231:装配终止 function batchUpdatePackingTask(win){ var deleteCause = top.Ext.getCmp('deleteCause').getRawValue(); @@ -7484,6 +7640,35 @@ }); printTousseDefinitionMaterial(ids.join(';'), false, null, 1, 'packingView'); } + }, { + text: '加急', + hidden: !sstsConfig.enableSetUrgentOfPackin, + iconCls: 'btn_ext_application_edit', + handler: function () { + var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid'); + var selNodes = waitPackingTreeGrid.getView().getChecked(); + var arr = []; + Ext4.each(selNodes, function (pNode) { + if (pNode.childNodes.length == 0) { + var notLossReport = true; + var damages = pNode.data.damages; + var errors = pNode.data.errors; + if(damages.length > 0 || errors.length > 0){ + notLossReport = false; + } + arr.push(pNode.data) + } + }); + if (arr.length == 0) { + showMultipleResult('请选择需要加急的待装配物品。'); + return; + } + if (arr.length > 1) { + showMultipleResult('不支持多选操作,请修改后再操作。'); + return; + } + updateUrgentLevelOfPackingTask(arr[0]); + } } ] }, { Index: ssts-web/src/main/webapp/disinfectsystem/config/szsdsrmyy/config.js =================================================================== diff -u -r37927 -r38490 --- ssts-web/src/main/webapp/disinfectsystem/config/szsdsrmyy/config.js (.../config.js) (revision 37927) +++ ssts-web/src/main/webapp/disinfectsystem/config/szsdsrmyy/config.js (.../config.js) (revision 38490) @@ -316,6 +316,8 @@ enableDisplayRecyclingTimeOfrecyclingRecordList:true, //允许在回收申请单中修改外来器械包的价格 enableModifyThePriceOfForeignTousseInrecyclingRecord:true, +//是否启用装配管理的加急功能 +enableSetUrgentOfPackin:true, //回收是否修改申请单备注,true修改 modifyRemarkInRecycling:true } \ No newline at end of file