Index: ssts-web/src/main/resources/systemset/operationDefine.xml
===================================================================
diff -u -r39139 -r39371
--- ssts-web/src/main/resources/systemset/operationDefine.xml (.../operationDefine.xml) (revision 39139)
+++ ssts-web/src/main/resources/systemset/operationDefine.xml (.../operationDefine.xml) (revision 39371)
@@ -115,6 +115,10 @@
+
+
+
+
Index: ssts-web/src/main/webapp/homepage/menu.jsp
===================================================================
diff -u -r39139 -r39371
--- ssts-web/src/main/webapp/homepage/menu.jsp (.../menu.jsp) (revision 39139)
+++ ssts-web/src/main/webapp/homepage/menu.jsp (.../menu.jsp) (revision 39371)
@@ -1039,6 +1039,16 @@
/**
+ * 《ZSYY-400:查看交接记录》菜单
+ */
+ var SSTS_PackHandover_Select = true;
+
+ if (sstsConfig.enableEasyToSecondRecycling) {
+ SSTS_PackHandover_Select = false
+ }
+
+
+/**
* 《灭菌管理》菜单
*/
var SSTS_Sterilization_Menu = true;
Index: ssts-web/src/main/webapp/disinfectsystem/packing/packHandoverList.jsp
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/packing/packHandoverList.jsp (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/packing/packHandoverList.jsp (revision 39371)
@@ -0,0 +1,68 @@
+<%@page import="java.util.Date"%>
+<%@page import="java.text.SimpleDateFormat"%>
+<%@page import="java.util.List"%>
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ include file="/common/taglibs.jsp"%>
+<%
+ LoginUserData userData = AcegiHelper.getLoginUser();
+ request.setAttribute("userName",userData.getUserFullName());
+ request.setAttribute("userCode",userData.getUserName());
+
+ SimpleDateFormat dateFormat =new SimpleDateFormat("yyyy-MM-dd");
+ request.setAttribute("newDate", dateFormat.format(new Date()));
+%>
+
+
+
+交接记录
+
+
+
+
+<%@ include file="/common/includeExtJsAndCss.jsp"%>
+<%@ include file="/common/includeExtJs4_2.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: ssts-web/src/main/webapp/homepage/menuconfigure.js
===================================================================
diff -u -r39139 -r39371
--- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 39139)
+++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 39371)
@@ -303,6 +303,14 @@
packageListLink.hrefTarget = linkTarget;
packageListLink.leaf = true;
DisinfectsystemTreeData[reviewMenuIndexOfDisinfectsystemTree].children[taskGroup.length] = packageListLink;
+
+ var packageListLink = new Object();
+ packageListLink.hidden = SSTS_PackHandover_Select;
+ packageListLink.text = '交接记录';
+ packageListLink.href = WWWROOT+'/disinfectsystem/packing/packHandoverList.jsp';
+ packageListLink.hrefTarget = linkTarget;
+ packageListLink.leaf = true;
+ DisinfectsystemTreeData[reviewMenuIndexOfDisinfectsystemTree].children[taskGroup.length] = packageListLink;
}
/**设置"装配管理"菜单的下一级子菜单(各任务组装配、自定义装配、历史装配记录)、"审核打包"菜单的下一级子菜单(各任务组) end */
Index: ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js
===================================================================
diff -u -r39354 -r39371
--- ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js (.../config.js) (revision 39354)
+++ ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js (.../config.js) (revision 39371)
@@ -399,6 +399,8 @@
expandFieldsOfRecycle:["currentlyToBeRecycled","serialNumber"],
//启用外来器械包再次使用功能
enableForeignTousseUsedAgainFunction:true,
+//审核打包交接功能
+handoverRecordsOfPacking:true,
//器械包信息的默认查询数据排序方式
defaultSortingMethodOfTousseInstanceManager:"packing"
}
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/packing/packHandoverList.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/packing/packHandoverList.js (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/packing/packHandoverList.js (revision 39371)
@@ -0,0 +1,219 @@
+var grid;
+
+function renderCallModifyFunction(v, p, record) {
+ var data = record.data;
+ return "" + v + "";
+}
+
+//删除交接信息
+function deleteConfig() {
+ var ids = grid.getSelectedValues('id', ';');
+ if (ids == '') {
+ showResult("请选择要删除的数据");
+ } else {
+ Ext4.MessageBox.confirm("请确认", "确定要删除选中的信息吗?", function (button, text) {
+ if ("yes" == button) {
+ Ext4.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/packHandoverRecordAction!deletePackHandoverRecord.do',
+ params: { ids: ids },
+ success: function (response, options) {
+ var result = Ext4.JSON.decode(response.responseText);
+ var success = result.success;
+ if (success) {
+ showResult('删除成功');
+ grid.dwrReload();
+ } else {
+ showResult(result.message);
+ }
+ }
+ });
+ }
+ });
+ }
+}
+
+Ext.onReady(function () {
+ Ext.QuickTips.init();
+
+ var columns = [
+ { header: "流水号", width: 150, dataIndex: 'serialNumber', sortable: false, renderer: renderCallModifyFunction },
+ { header: "交接时间", width: 150, dataIndex: 'handoverDate', sortable: false },
+ { header: "交接人", width: 120, dataIndex: 'handoverPerson', sortable: false },
+ { header: "交接数量", width: 120, dataIndex: 'amount', sortable: false }
+ ];
+
+ var readerDetail = [
+ { name: 'id' },
+ { name: 'serialNumber' },
+ { name: 'handoverDate' },
+ { name: 'handoverPerson' },
+ { name: 'amount' }
+ ];
+
+ var filters = new Ext.grid.GridFilters({
+ filters: [
+ { type: 'string', dataIndex: 'serialNumber' },
+ { type: 'string', dataIndex: 'handoverPerson' },
+ { type: 'date', dataIndex: 'handoverDate' }
+ ]
+ });
+
+ var tbar = [{
+ text: '添加',
+ iconCls: 'btn_ext_application_add',
+ hidden: SSTS_PackHandover_Create,
+ handler: function () {
+ showWindow();
+ }
+ }, '-', {
+ text: '修改',
+ iconCls: 'btn_ext_application_edit',
+ hidden: SSTS_PackHandover_Update,
+ handler: function () {
+ var id = grid.getSelectedValues('id');
+ var serialNumber = grid.getSelectedValues('serialNumber');
+ if (id == '') {
+ showResult("请选择要修改的数据");
+ } else if (typeof id == 'number') {
+ showWindow(id, serialNumber);
+ } else {
+ showResult("只能选择一条数据");
+ }
+ }
+ }, '-', {
+ text: '删除',
+ iconCls: 'btn_ext_application_del',
+ hidden: SSTS_PackHandover_Delete,
+ handler: function () {
+ deleteConfig();
+ }
+ }];
+
+ var departUsersStore = new Ext.data.Store({
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/systemmanage/user/userAction!loadUsersBySearchString.do?searchDisableUser=false',
+ method: 'POST'
+ }),
+ reader: new Ext.data.JsonReader({
+ fields: [
+ { name: 'id' },
+ { name: 'fullName' },
+ { name: 'orgUnitName' }
+ ]
+ })
+ });
+
+ var searchTbar = [{
+ text: '开始时间:'
+ }, {
+ xtype: 'datefieldWithMin',
+ fieldLabel: '开始时间',
+ name: 'startHandoverDate',
+ format: 'Y-m-d H:i',
+ id: 'startHandoverDate',
+ readOnly: false,
+ editable: false,
+ theHours: 0,
+ theMinutes: 0,
+ value: newDate + ' 00:00',
+ width: 150
+ }, {
+ text: '结束时间:'
+ }, {
+ xtype: 'datefieldWithMin',
+ fieldLabel: '结束时间',
+ name: 'endHandoverDate',
+ id: 'endHandoverDate',
+ readOnly: false,
+ editable: false,
+ format: 'Y-m-d H:i',
+ theHours: 23,
+ theMinutes: 59,
+ value: newDate + ' 23:59',
+ width: 150
+ }, {
+ text: '交接人:'
+ }, {
+ xtype: 'combo',
+ id: 'handoverPerson',
+ name: 'handoverPerson',
+ queryParam: 'spell',
+ minChars: 0,
+ displayField: 'fullName',
+ store: departUsersStore,
+ forceSelection: false,
+ lazyInit: true,
+ triggerAction: 'all',
+ hideTrigger: true,
+ typeAhead: false,
+ anchor: '96%'
+ }, {
+ xtype: 'button',
+ text: '查询',
+ iconCls: 'icon_search',
+ handler: function () {
+ var startHandoverDate = Ext.getCmp('startHandoverDate').getRawValue();
+ var endHandoverDate = Ext.getCmp('endHandoverDate').getRawValue();
+ if (startHandoverDate || endHandoverDate) {
+ if (!compareDate(startHandoverDate, endHandoverDate)) {
+ showResult("开始时间不能大于结束时间");
+ return;
+ }
+ }
+ $Id('parm_s_startHandoverDate').value = startHandoverDate;
+ $Id('parm_s_endHandoverDate').value = endHandoverDate;
+ $Id('parm_s_handoverPerson').value = Ext.getCmp('handoverPerson').getRawValue();
+ grid.dwrReload();
+ }
+ }, '-', {
+ xtype: 'button',
+ text: '重置',
+ iconCls: 'icon_set',
+ handler: function () {
+ Ext.getCmp('startHandoverDate').setRawValue(newDate + ' 00:00');
+ Ext.getCmp('endHandoverDate').setRawValue(newDate + ' 23:59');
+ Ext.getCmp('handoverPerson').setValue('');
+ $Id('parm_s_startHandoverDate').value = '';
+ $Id('parm_s_endHandoverPerson').value = '';
+ $Id('parm_s_handoverPerson').value = '';
+ }
+ }];
+
+ grid = new Ext.ux.ForgonPageGrid({
+ title: '交接记录',
+ tbar: searchTbar,
+ pageSize: 20,
+ defaultSortField: 'id',
+ defaultSortDirection: 'DESC',
+ isCheckboxSelectionModel: true,
+ rememberSelected: false,
+ isShowSearchField: false,
+ columns: columns,
+ plugins: filters,
+ isShowRowNumber: false,
+ frame: false,
+ border: false,
+ listeners: {
+ 'render': function () {
+ new Ext.Toolbar({ items: tbar }).render(this.tbar);
+ }
+ }
+ },
+ readerDetail,
+ PackHandoverRecordTableManager.findPackHandoverRecordTableList,
+ null
+ );
+
+ new Ext.Viewport({
+ layout: 'border',
+ plain: true,
+ bufferResize: true,
+ monitorResize: true,
+ items: [{
+ region: 'center',
+ margins: '0 0 0 0',
+ layout: 'fit',
+ items: grid
+ }]
+ });
+});
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/packing/packHandoverForm.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/packing/packHandoverForm.js (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/packing/packHandoverForm.js (revision 39371)
@@ -0,0 +1,411 @@
+var configWin;
+var store1;
+var store2;
+var store1Map = new newMap();
+var formPanel;
+
+function cancel() {
+ configWin.close();
+}
+
+//获取交接物品
+function getPackHandoverRecord(id, serialNumber) {
+ Ext4.Ajax.request({
+ url: WWWROOT + '//disinfectSystem/packHandoverRecordAction!getPackHandoverRecord.do',
+ params: { id: id, serialNumber: serialNumber },
+ success: function (response, options) {
+ var result = Ext4.decode(response.responseText);
+ if (result.success) {
+ top.Ext4.getCmp('id').setValue(id);
+ top.Ext4.getCmp('handoverPerson').setValue(result.data.handoverPerson);
+ top.Ext4.getCmp('handoverPersonCode').setValue(result.data.handoverPersonCode);
+ top.Ext4.getCmp('handoverDate').setValue(result.data.handoverDate);
+ top.Ext4.getCmp('serialNumber').setValue(result.data.serialNumber);
+ var packHandoverRecordItems = result.data.packHandoverRecordItems;
+ for (var i = 0; i < packHandoverRecordItems.length; i++) {
+ var tousseName = packHandoverRecordItems[i].tousseName;
+ if (store1Map.has(tousseName)) {
+ var amount = store1Map.get(tousseName);
+ store1Map.setValue(tousseName, (parseInt(amount) + 1));
+ } else {
+ store1Map.put(tousseName, 1);
+ }
+ }
+ var data1 = [];
+ store1Map.forEach(function (key, item) {
+ data1.push({
+ tousseName: item,
+ amount: key
+ })
+ });
+ store1.add(data1);
+ top.Ext4.getCmp('grid1Id').setTitle('统计信息:' + store1Map.size() + ' 个物品');
+ store2.add(packHandoverRecordItems);
+ } else {
+ showResult(result.message);
+ }
+ }
+ });
+}
+
+//删除交接物品
+function deleteItem(localID) {
+ var store = top.Ext4.getCmp('store2').getStore();
+ var tousseName = '';
+ for (var i = 0; i < store.getCount(); i++) {
+ if (store.getAt(i).data.tousseInstanceId == localID) {
+ tousseName = store.getAt(i).data.tousseName;
+ store.remove(store.getAt(i));
+ break;
+ }
+ }
+ //统计信息
+ if (tousseName !== '') {
+ if (store1Map.has(tousseName)) {
+ var amount = store1Map.get(tousseName);
+ if (parseInt(amount) - 1 == 0) {
+ store1Map.remove(tousseName)
+ } else {
+ store1Map.setValue(tousseName, (parseInt(amount) - 1));
+ }
+ }
+ top.Ext4.getCmp('grid1Id').setTitle('统计信息:' + store1Map.size() + ' 个物品');
+ store1.removeAll();
+ store1Map.forEach(function (key, item) {
+ store1.add({
+ tousseName: item,
+ amount: key
+ });
+ });
+ }
+}
+
+//扫描条码
+function scanBarcode(barcode) {
+ Ext4.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/tousseInstanceAction!loadTousseInstanceByBarcode.do',
+ params: { barcode: barcode },
+ success: function (response, options) {
+ var result = Ext4.decode(response.responseText);
+ top.Ext4.getCmp('barcode').setValue('');
+ if (result.success) {
+ var tousseName = result.data.tousseName;
+ var tousseInstanceId = result.data.id;
+ var status = result.data.status;
+ if (status !== '已审核') {
+ showResult('请扫描已审核的器械包!');
+ return;
+ }
+ var has = false;
+ if (store2.getCount() > 0) {
+ for (var i = 0; i < store2.getCount(); i++) {
+ if (barcode == store2.getAt(i).data.barcode) {
+ has = true;
+ break;
+ }
+ }
+ }
+ if (has) {
+ showResult('器械包已存在!');
+ return;
+ }
+ //扫描物品列表
+ var data = [{
+ id: '',
+ tousseInstanceId: tousseInstanceId,
+ barcode: barcode,
+ tousseName: tousseName
+ }];
+ store2.add(data);
+ //统计信息
+ if (store1Map.has(tousseName)) {
+ var amount = store1Map.get(tousseName);
+ store1Map.setValue(tousseName, (parseInt(amount) + 1));
+ } else {
+ store1Map.put(tousseName, 1);
+ }
+ top.Ext4.getCmp('grid1Id').setTitle('统计信息:' + store1Map.size() + ' 个物品');
+ store1.removeAll();
+ var data1 = [];
+ store1Map.forEach(function (key, item) {
+ data1.push({
+ tousseName: item,
+ amount: key
+ })
+ });
+ store1.add(data1);
+ } else {
+ showResult(result.message);
+ }
+ }
+ });
+}
+
+//保存交接信息
+function saveConfig() {
+ var id = top.Ext4.getCmp('id').getValue();
+ var handoverPerson = top.Ext4.getCmp('handoverPerson').getValue();
+ var handoverPersonCode = top.Ext4.getCmp('handoverPersonCode').getValue();
+ var packHandoverRecordItems = [];
+ var store = top.Ext4.getCmp('store2').getStore();
+ for (var i = 0; i < store.getCount(); i++) {
+ var item = store.getAt(i).data;
+ packHandoverRecordItems.push({
+ id: item.id,
+ tousseInstanceId: item.tousseInstanceId,
+ sequence: i + 1
+ })
+ }
+ if (packHandoverRecordItems.length == 0) {
+ showResult('交接物品不能为空!');
+ return
+ }
+ var params = {
+ id: id,
+ handoverPerson: handoverPerson,
+ handoverPersonCode: handoverPersonCode,
+ packHandoverRecordItems: JSON.stringify(packHandoverRecordItems)
+ }
+ Ext4.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/packHandoverRecordAction!saveOrUpdatePackHandoverRecord.do',
+ params: params,
+ success: function (response, options) {
+ var result = Ext4.decode(response.responseText);
+ showResult(result.message);
+ if (result.success) {
+ configWin.close();
+ grid.dwrReload();
+ }
+ },
+ failure: function (response, options) {
+ showResult('保存失败!');
+ }
+ });
+}
+
+//显示交接信息的窗口
+function showWindow(id, serialNumber) {
+ var formPanel = new top.Ext4.form.Panel({
+ id: 'configForm',
+ region: 'center',
+ border: true,
+ frame: true,
+ layout: "column",
+ fieldDefaults: {
+ labelAlign: 'right',
+ labelWidth: 90
+ },
+ items: [{
+ xtype: 'hidden',
+ id: 'id',
+ name: 'id'
+ }, {
+ columnWidth: .49,
+ layout: 'form',
+ border: 0,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '流水号',
+ id: 'serialNumber',
+ name: 'serialNumber',
+ allowBlank: true,
+ readOnly: true,
+ anchor: '95%',
+ cls: 'fieldReadOnlyNoRemove'
+ }]
+ }, {
+ columnWidth: .49,
+ layout: 'form',
+ border: 0,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '交接时间',
+ id: 'handoverDate',
+ name: 'handoverDate',
+ allowBlank: true,
+ readOnly: true,
+ anchor: '95%',
+ cls: 'fieldReadOnlyNoRemove'
+ }]
+ }, {
+ columnWidth: .49,
+ layout: 'form',
+ border: 0,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '交接人条码',
+ id: 'handoverBarcode',
+ name: 'handoverBarcode',
+ allowBlank: true,
+ style: 'margin-bottom: 5px;',
+ anchor: '95%',
+ listeners: {
+ specialkey: function (thiz, e) {
+ if (e.getKey() == 13) {
+ var handoverBarcode = top.Ext4.getCmp('handoverBarcode').getValue();
+ UserTableManager.getUserByBarcode(handoverBarcode, function (responseText) {
+ top.Ext4.getCmp('handoverBarcode').setValue('');
+ if (responseText != null && responseText != "") {
+ var result = Ext4.decode(responseText);
+ if (!result.success) {
+ showResult(result.message || "输入的条码有误!");
+ return;
+ }
+ top.Ext4.getCmp('handoverPerson').setValue(result.fullName);
+ top.Ext4.getCmp('handoverPersonCode').setValue(result.name);
+ focusExtJSField(top.Ext4.getCmp('barcode'));
+ } else {
+ showResult('找不到该条码所对应的人员信息');
+ }
+ });
+ }
+ }
+ }
+ }]
+ }, {
+ columnWidth: .49,
+ layout: 'form',
+ border: 0,
+ items: [{
+ xtype: 'hidden',
+ id: 'handoverPersonCode',
+ name: 'handoverPersonCode',
+ value: userCode
+ }, {
+ xtype: 'textfield',
+ fieldLabel: '交接人',
+ id: 'handoverPerson',
+ name: 'handoverPerson',
+ allowBlank: true,
+ style: 'margin-bottom: 5px;',
+ cls: 'fieldReadOnlyNoRemove',
+ readOnly: true,
+ value: userName,
+ anchor: '95%'
+ }]
+ }, {
+ columnWidth: .49,
+ layout: 'form',
+ border: 0,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '扫描条码',
+ id: 'barcode',
+ name: 'barcode',
+ allowBlank: true,
+ style: 'margin-bottom: 5px;',
+ anchor: '95%',
+ listeners: {
+ specialkey: function (thiz, e) {
+ if (e.getKey() == 13) {
+ var barcode = top.Ext4.getCmp('barcode').getValue();
+ scanBarcode(barcode);
+ }
+ }
+ }
+ }]
+ }]
+ });
+ store1 = new top.Ext4.data.JsonStore({
+ data: [],
+ fields: [
+ { name: 'tousseName' },
+ { name: 'amount' }
+ ]
+ });
+ store2 = new top.Ext4.data.JsonStore({
+ data: [],
+ fields: [
+ { name: 'tousseName' },
+ { name: 'barcode' },
+ { name: 'tousseInstanceId' },
+ { name: 'id' }
+ ]
+ });
+ var grid1 = new top.Ext4.grid.Panel({
+ title: '统计信息:0 个物品',
+ store: store1,
+ width: 590,
+ height: 200,
+ id: 'grid1Id',
+ columns: [{
+ text: '物品名称',
+ width: 460,
+ dataIndex: 'tousseName'
+ }, {
+ text: '数量',
+ width: 100,
+ dataIndex: 'amount'
+ }]
+ });
+ var grid2 = new top.Ext4.grid.Panel({
+ title: '扫描物品列表',
+ store: store2,
+ width: 590,
+ height: 230,
+ id: 'store2',
+ columns: [{
+ text: '物品名称',
+ width: 280,
+ dataIndex: 'tousseName'
+ }, {
+ text: '物品条码',
+ width: 140,
+ dataIndex: 'barcode'
+ }, {
+ text: '操作',
+ width: 140,
+ renderer: function (v, p, record) {
+ var id = record.data.tousseInstanceId;
+ return "";
+ }
+ }]
+ })
+ configWin = new top.Ext4.window.Window({
+ id: 'configWin',
+ layout: 'border',
+ title: '登记交接信息',
+ width: 600,
+ height: 600,
+ modal: true,
+ border: false,
+ plain: true,
+ layout: 'anchor',
+ buttonAlign: 'center',
+ items: [{
+ height: 100,
+ anchor: '100%',
+ layout: 'fit',
+ items: [formPanel]
+ }, {
+ region: 'center',
+ anchor: '100%',
+ layout: 'hbox',
+ align: 'stretch',
+ items: [grid1]
+ }, {
+ region: 'center',
+ anchor: '100%',
+ layout: 'hbox',
+ align: 'stretch',
+ items: [grid2]
+ }],
+ buttons: [{
+ text: '保存',
+ handler: function () {
+ saveConfig();
+ }
+ }, {
+ text: '取消',
+ handler: function () {
+ configWin.close();
+ }
+ }]
+ });
+ store1Map.clear();
+ configWin.show();
+ if (id || serialNumber) {
+ getPackHandoverRecord(id, serialNumber);
+ }
+}
+