Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r40302 -r40597 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 40302) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 40597) @@ -9,6 +9,7 @@ var lastSelectVedioName; var lastSelectTdId; var lastSelectTaskId; +var lastPackingTaskInfo; var sterilizerTypeStore; var waitPackingJsonObj; var packingTousseBtnClick_mask = null; @@ -864,162 +865,6 @@ 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(); @@ -1903,6 +1748,7 @@ lastSelectimageTypeTousse = imageType_tousse; lastSelectVedioName = vedioName; lastSelectTdId = td_id; + lastPackingTaskInfo = taskList[0]; var tousseType = idCardTaskNode.data.tousseType; var isPrint = idCardTaskNode.data.isPrint; var isReview = idCardTaskNode.data.isReview; @@ -3078,6 +2924,169 @@ }); } } + //更新加急 + function updateUrgentLevelOfPackingTask(record, treeGridId){ + 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(); + if(treeGridId == 'basketTreeGrid'){ + reloadBasketTreeGrid(true); + }else if(treeGridId == 'idCard'){ + var idCardBarcode = record.idCardBarcode; + loadIdCardByBarcode(idCardBarcode, true, true, 'scan'); + }else { + 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); + } + } // 校验材料是否有丢失和报损还未补充 function validateSupplement(cNode) { var tousseName = cNode.data.tousseName; @@ -3821,7 +3830,36 @@ }, items: [{ xtype: 'button', + id: "urgentOfPackin", + hidden: !sstsConfig.enableSetUrgentOfPackin, + text: '加急', + handler: function () { + if(lastPackingTaskInfo){ + updateUrgentLevelOfPackingTask(lastPackingTaskInfo, 'idCard'); + }else { + var basketTreeGrid = Ext4.getCmp('basketTreeGrid'); + var selNodes = basketTreeGrid.getView().getChecked(); + var arr = []; + Ext4.each(selNodes, function (pNode) { + if (pNode.childNodes.length == 0) { + arr.push(pNode.data) + } + }); + if (arr.length == 0) { + showMultipleResult('请选择需要加急的待装配物品。'); + return; + } + if (arr.length > 1) { + showMultipleResult('不支持多选操作,请修改后再操作。'); + return; + } + updateUrgentLevelOfPackingTask(arr[0], 'basketTreeGrid'); + } + } + },{ + xtype: 'button', id: "save_print", + margin: '0 0 0 10', text: '' + packingBtnText + '', handler: function () { packingForCode = false; @@ -7570,7 +7608,7 @@ }, failure: function () { myMask.hide(); } }); - } + } // BJ309YY-9:提示标识牌的使用次数 function noticeIdCardUseAmount(tousseName,barcode,idCardUseAmount) { @@ -7601,6 +7639,9 @@ if (storeId == 'basketTreeGrid') { td_id = (record.get('tousseID') == '') ? record.raw.td_id : record.get('tousseID'); showPackButton(isPrint, isReview, tousseType); + if(sstsConfig.enableSetUrgentOfPackin){ + Ext4.getCmp('urgentOfPackin').show(); + } } else { td_id = record.get('tousseID'); lastSelectTaskId = record.get('taskId'); @@ -7612,6 +7653,7 @@ Ext4.getCmp('save_print2').hide(); Ext4.getCmp('packingLableBtn').hide(); } + Ext4.getCmp('urgentOfPackin').hide(); } var taskId = ''; var packedPhotographed = ''; Index: ssts-web/src/main/webapp/disinfectsystem/packing/directPacking.js =================================================================== diff -u -r40302 -r40597 --- ssts-web/src/main/webapp/disinfectsystem/packing/directPacking.js (.../directPacking.js) (revision 40302) +++ ssts-web/src/main/webapp/disinfectsystem/packing/directPacking.js (.../directPacking.js) (revision 40597) @@ -787,6 +787,31 @@ var packingRecordId = record.get('id'); rePrintBarcodeWinForPacking(packingRecordId,SSTS_HistoryPacking_Update,SSTS_HistoryPacking_Change_Patient); }); + + 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 formObj = new Ext.form.FormPanel({ labelAlign : 'right', buttonAlign : 'center', @@ -1437,6 +1462,37 @@ } } }] + },{ + columnWidth : .33, + layout : 'form', + cls:'edit-5char-labelwidth', + hidden : !sstsConfig.enableSetUrgentOfPackin, + items : [{ + xtype:'hidden', + id : 'urgentLevelId', + name : 'urgentLevelId' + },{ + xtype : 'combo', + fieldLabel : '加急等级', + id : 'urgentLevelName', + name : 'urgentLevelName', + store : urgentLevelStore, + valueField : 'urgentLevel', + displayField : 'urgentLevel', + minChars : 0, + forceSelection : true, + lazyInit : true, + editable:false, + triggerAction : 'all', + anchor : '100%', + typeAhead : false, + listeners:{ + select : function(combo, record, index){ + //首尾条码全部清空,且让首条码得到焦点 + Ext.getCmp('urgentLevelId').setValue(record.data.id); + } + } + }] }], buttons : [{ text : '装配并打印标签',