Index: ssts-web/src/main/webapp/disinfectsystem/toussemanager/position/changePosition.js =================================================================== diff -u -r35537 -r37491 --- ssts-web/src/main/webapp/disinfectsystem/toussemanager/position/changePosition.js (.../changePosition.js) (revision 35537) +++ ssts-web/src/main/webapp/disinfectsystem/toussemanager/position/changePosition.js (.../changePosition.js) (revision 37491) @@ -728,7 +728,12 @@ showResult(action.result.message); if(action.result.success){ window.close(); - document.location.href = WWWROOT+'/disinfectsystem/toussemanager/instrumentGoodsManagement/instrumentRoomGoodsManagement.jsp?editMode=true'; + if(sstsConfig.displayModeOfInstrumentRoomGoodsManagement && sstsConfig.displayModeOfInstrumentRoomGoodsManagement == 1){ + document.location.href = WWWROOT+'/disinfectsystem/toussemanager/instrumentGoodsManagement/instrumentRoomGoodsManagementForMode1.jsp?editMode=true'; + }else { + document.location.href = WWWROOT+'/disinfectsystem/toussemanager/instrumentGoodsManagement/instrumentRoomGoodsManagement.jsp?editMode=true'; + } + } }, failure : function(form, action) { @@ -737,7 +742,11 @@ }else{ showResult("提交超时!"); window.close(); - document.location.href = WWWROOT+'/disinfectsystem/toussemanager/instrumentGoodsManagement/instrumentRoomGoodsManagement.jsp?editMode=true'; + if(sstsConfig.displayModeOfInstrumentRoomGoodsManagement && sstsConfig.displayModeOfInstrumentRoomGoodsManagement == 1){ + document.location.href = WWWROOT+'/disinfectsystem/toussemanager/instrumentGoodsManagement/instrumentRoomGoodsManagementForMode1.jsp?editMode=true'; + }else { + document.location.href = WWWROOT+'/disinfectsystem/toussemanager/instrumentGoodsManagement/instrumentRoomGoodsManagement.jsp?editMode=true'; + } } } }); @@ -748,7 +757,11 @@ //切记注意:按取消关闭window后,一定要把已选择的申请单号变量清空 selectedInvoicePlanId = ""; window.close(); - document.location.href = WWWROOT+'/disinfectsystem/toussemanager/instrumentGoodsManagement/instrumentRoomGoodsManagement.jsp?editMode=true'; + if(sstsConfig.displayModeOfInstrumentRoomGoodsManagement && sstsConfig.displayModeOfInstrumentRoomGoodsManagement == 1){ + document.location.href = WWWROOT+'/disinfectsystem/toussemanager/instrumentGoodsManagement/instrumentRoomGoodsManagementForMode1.jsp?editMode=true'; + }else { + document.location.href = WWWROOT+'/disinfectsystem/toussemanager/instrumentGoodsManagement/instrumentRoomGoodsManagement.jsp?editMode=true'; + } } }] }); Index: ssts-web/src/main/webapp/disinfectsystem/toussemanager/instrumentGoodsManagement/instrumentRoomGoodsManagementForMode1.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/toussemanager/instrumentGoodsManagement/instrumentRoomGoodsManagementForMode1.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/toussemanager/instrumentGoodsManagement/instrumentRoomGoodsManagementForMode1.js (revision 37491) @@ -0,0 +1,316 @@ +var entityName = "仪器班物品"; +var grid; +var operationReservationWindow; + +//GDSRMYY-575:仪器班物品名称自定义 +if (sstsConfig.aliasNameOfSurgicalInstrumentsManagement) { + var aliasNameOfSurgicalInstrumentsManagement = sstsConfig.aliasNameOfSurgicalInstrumentsManagement || []; + for (var i = 0; i < aliasNameOfSurgicalInstrumentsManagement.length; i++) { + if (aliasNameOfSurgicalInstrumentsManagement[i].fieldName == 'instrumentRoomGoodsManagement') { + entityName = aliasNameOfSurgicalInstrumentsManagement[i].displayText; + } + } +} + +function returnUrl(operation) { + var url = WWWROOT + '/disinfectsystem/toussemanager/position/changePosition.jsp?editMode=true&operation=' + encodeURIComponent(operation); + document.location.href = url; +} + +function showDetailWindow(result) { + var detailStore = new Ext.data.Store({ + data: result.details, + reader: new Ext.data.JsonReader({ + fields: [ + { name: 'barcode' }, + { name: 'destLocation' }, + { name: 'operator' }, + { name: 'tousseName' } + ] + }) + }); + + var detailGrid = new top.Ext.grid.GridPanel({ + id: 'detailGrid', + store: detailStore, + columns: [ + { header: "条码", width: 80, menuDisabled: true, dataIndex: 'barcode' }, + { header: "器械包名称", width: 80, menuDisabled: true, dataIndex: 'tousseName' }, + { header: "最后位置", width: 80, menuDisabled: true, dataIndex: 'destLocation' }, + { header: "最后操作人", width: 27, menuDisabled: true, dataIndex: 'operator' } + ], + viewConfig: { + forceFit: true + }, + height: 300, + autoExpandColumn: 'materialAmount', + frame: false + }); + + var form = new top.Ext.Panel({ + id: 'detailPanel', + split: true, + border: 0, + frame: true, + bodyStyle: 'padding:0px auto;margin:0px', + width: 800, + height: 400, + layout: 'column', + items: [{ + columnWidth: .33, + layout: 'form', + labelWidth: 90, + labelAlign: 'right', + height: 30, + items: [{ + xtype: 'textfield', + fieldLabel: '操作时间', + readOnly: true, + cls: 'fieldReadOnlyNoRemove', + value: result.operationTime, + anchor: '95%' + }] + }, { + columnWidth: .33, + layout: 'form', + labelWidth: 90, + labelAlign: 'right', + height: 30, + items: [{ + xtype: 'textfield', + fieldLabel: '操作类型', + readOnly: true, + cls: 'fieldReadOnlyNoRemove', + value: result.operation, + anchor: '95%' + }] + }, { + columnWidth: .33, + layout: 'form', + labelWidth: 90, + labelAlign: 'right', + height: 30, + items: [{ + xtype: 'textfield', + fieldLabel: '操作人', + readOnly: true, + cls: 'fieldReadOnlyNoRemove', + value: result.operator, + anchor: '95%' + }] + }, { + columnWidth: 1, + layout: 'form', + items: [detailGrid] + }] + }); + + var detailWindow = new top.Ext.Window({ + title: '操作记录', + width: 800, + height: 400, + border: false, + autoScroll: true, + layout: 'fit', + modal: true, + items: [form], + buttonAlign: 'center', + buttons: [{ + text: "关闭", + handler: function () { + detailWindow.close(); + } + }] + }); + + detailWindow.show(); +} + +function getPersonalTousseOperationRecordDetail(id) { + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!loadPersonalTousseOperationRecordDetail.do', + params: { recordId: id }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (result.success) { + showDetailWindow(result.data) + } + }, + failure: function (response, options) { + showResult(response.responseText); + } + }); +} + +Ext.onReady(function () { + Ext.QuickTips.init(); + + var tousseLocationManagement = '器械包位置管理'; + if (sstsConfig.enableSurgicalInstrumentsManagement) { + if (sstsConfig.aliasNameOfSurgicalInstrumentsManagement) { + var aliasNameOfSurgicalInstrumentsManagement = sstsConfig.aliasNameOfSurgicalInstrumentsManagement || []; + for (var i = 0; i < aliasNameOfSurgicalInstrumentsManagement.length; i++) { + if (aliasNameOfSurgicalInstrumentsManagement[i].fieldName == 'tousseLocationManagement') { + tousseLocationManagement = aliasNameOfSurgicalInstrumentsManagement[i].displayText; + } + } + } + } + + var signHidden = true; + var tousseLocationHidden = true; + var returnBackHidden = true; + if (!SSTS_InstrumentGoodsManagement && isEnableTousseOpSign == 'true') { + signHidden = false; + } + + //GDSRMYY-582:手术仪器管理拆分权限 + if (sstsConfig.enableSplitPermissionsOfSurgicalInstrumentsManagement) { + tousseLocationHidden = SSTS_InstrumentGoods_TousseLocation_Manager; + returnBackHidden = SSTS_InstrumentGoods_ReturnBack; + } else { + tousseLocationHidden = SSTS_InstrumentGoodsManagement; + returnBackHidden = SSTS_InstrumentGoodsManagement; + } + + var pageSize = 10; + + var gridStore = new Ext.data.Store({ + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!loadPersonalTousseOperationRecord.do', + method: 'POST' + }), + autoLoad: { params: { start: 0, limit: pageSize } },//第一次自动load + lastOptions: { params: { start: 0, limit: pageSize } }, + reader: new Ext.data.JsonReader({ + root: 'data', + totalProperty: 'count', + fields: [ + { name: 'id' }, + { name: 'operationTime' }, + { name: 'operation' }, + { name: 'destLocation' }, + { name: 'tousseAmount' }, + { name: 'operationStatus' }, + { name: 'remark' } + ] + }), + listeners: { + beforeload: function (thiz) { + if (Ext.getCmp('pagesize')) { + var pagesize = Ext.getCmp('pagesize').getValue(); + thiz.baseParams["limit"] = pagesize; + } else { + thiz.baseParams["limit"] = pageSize; + } + } + } + }); + + var pageSizeStore = new Ext.data.SimpleStore({ + fields: ['value'], + data: [[10], [20], [30], [50], [100]] + }); + + var combo = new Ext.form.ComboBox({ + xtype: 'combo', + valueField: 'value', + displayField: 'value', + store: pageSizeStore, + mode: 'local', + id: 'pagesize', + name: 'pagesize', + forceSelection: true, + editable: false, + triggerAction: 'all', + value: pageSize, + width: 50, + listeners: { + select: function (combo, record, index) { + Ext.getCmp('pagingTool').pageSize = record.data.value + gridStore.load(); + } + } + }) + + grid = new Ext.grid.GridPanel({ + title: '个人操作记录', + store: gridStore, + columns: [ + { header: "操作时间", width: 160, dataIndex: 'operationTime' }, + { header: "操作类型", width: 120, dataIndex: 'operation' }, + { header: "目的位置", width: 140, dataIndex: 'destLocation' }, + { header: "器械包数量", width: 120, dataIndex: 'tousseAmount' }, + { + header: "器械流转", width: 120, dataIndex: 'operationStatus', renderer: function (v, p, record) { + var id = record.data.id; + if (v == '异常') { + return "" + v + ""; + } else if (v == '部分正常') { + return "" + v + ""; + } else { + return "" + v + ""; + } + } + }, + { header: "备注", width: 300, dataIndex: 'remark' }, + ], + stripeRows: true, + bbar: new Ext.PagingToolbar({ + id: 'pagingTool', + pageSize: pageSize, + store: gridStore, + items: ['-', '每页显示', combo, '条'], + displayInfo: true, + displayMsg: '第 {0} 到 {1} 条数据 共 {2} 条', + emptyMsg: "没有数据" + }), + //autoExpandColumn: 'remark', + bodyStyle: 'border:1px solid #afd7af' + }); + + var html = '