Index: ssts-web/src/main/webapp/homepage/menu.jsp
===================================================================
diff -u -r36261 -r36601
--- ssts-web/src/main/webapp/homepage/menu.jsp (.../menu.jsp) (revision 36261)
+++ ssts-web/src/main/webapp/homepage/menu.jsp (.../menu.jsp) (revision 36601)
@@ -2520,6 +2520,16 @@
/**
+ * 《存取记录》权限
+ */
+var SSTS_accessList_Manager = true;
+
+ if (sstsConfig.enableWarehousePositionModule){
+ SSTS_accessList_Manager = false
+ }
+
+
+/**
* 《摄像头定义》权限
*/
var SSTS_cameraDefinition = true;
Index: ssts-web/src/main/webapp/disinfectsystem/config/bjdxzlyy/menu/menuconfigure.js
===================================================================
diff -u -r35830 -r36601
--- ssts-web/src/main/webapp/disinfectsystem/config/bjdxzlyy/menu/menuconfigure.js (.../menuconfigure.js) (revision 35830)
+++ ssts-web/src/main/webapp/disinfectsystem/config/bjdxzlyy/menu/menuconfigure.js (.../menuconfigure.js) (revision 36601)
@@ -184,10 +184,11 @@
singleClickExpand:singleClickExpandTree,
hidden:SSTS_storageLocationManager && SSTS_storageLocationLook && SSTS_tousseAccess,
children:[
- {hidden :SSTS_storageLocationManager,text:"库位管理",href:WWWROOT+'/disinfectsystem/storageLocationManage/storageLocationManageView.jsp',hrefTarget:linkTarget,leaf:true},
- {hidden :SSTS_storageLocationLook,text:"库存查看",href:WWWROOT+'/disinfectsystem/storageLocationManage/storageLocationLookView.jsp',hrefTarget:linkTarget,leaf:true},
- {hidden :SSTS_tousseAccess,text:"物品存取",href:WWWROOT+'/disinfectsystem/storageLocationManage/goodsAccess.jsp',hrefTarget:linkTarget,leaf:true}
- ]
+ {hidden :SSTS_storageLocationManager,text:"库位管理",href:WWWROOT+'/disinfectsystem/storageLocationManage/storageLocationManageView.jsp',hrefTarget:linkTarget,leaf:true},
+ {hidden :SSTS_storageLocationLook,text:"库存查看",href:WWWROOT+'/disinfectsystem/storageLocationManage/storageLocationLookView.jsp',hrefTarget:linkTarget,leaf:true},
+ {hidden :SSTS_tousseAccess,text:"物品存取",href:WWWROOT+'/disinfectsystem/storageLocationManage/goodsAccess.jsp',hrefTarget:linkTarget,leaf:true},
+ {hidden :SSTS_accessList_Manager,text:"存取记录",href:WWWROOT+'/disinfectsystem/storageLocationManage/accessListView.jsp',hrefTarget:linkTarget,leaf:true}
+ ]
};
DWREngine.setAsync(false);
PackingTableManager.getAllTaskGroup(setTaskGroup);
Index: ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/accessListView.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/accessListView.js (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/accessListView.js (revision 36601)
@@ -0,0 +1,400 @@
+var listStore;
+var grid;
+
+// 修复Ext4日期控件中选择年月就关闭picker的bug
+Ext4.override(Ext4.form.field.Date, {
+ collapseIf: function (e) {
+ var me = this;
+ if (!me.isDestroyed && !e.within(me.bodyEl, false, true) && !e.within(me.picker.el, false, true) && !me.isEventWithinPickerLoadMask(e)) {
+ me.collapse();
+ }
+ },
+ mimicBlur: function (e) {
+ var me = this,
+ picker = me.picker;
+ if (!picker || !e.within(picker.el, false, true) && !me.isEventWithinPickerLoadMask(e)) {
+ me.callParent(arguments);
+ }
+ },
+ isEventWithinPickerLoadMask: function (e) {
+ var loadMask = this.picker.loadMask;
+ return loadMask ? e.within(loadMask.maskEl, false, true) || e.within(loadMask.el, false, true) : false;
+ }
+});
+
+//查询
+function search(listStore, params) {
+ listStore.proxy.extraParams = params;
+ listStore.loadPage(1);
+}
+
+Ext4.onReady(function () {
+ Ext4.QuickTips.init();
+ var columns = [
+ { header: "物品名称", dataIndex: 'tousseName', width: 200, menuDisabled: true },
+ { header: "操作时间", dataIndex: 'time', width: 120, menuDisabled: true },
+ { header: "操作类型", dataIndex: 'status', width: 100, menuDisabled: true },
+ { header: "操作内容", dataIndex: 'operateDetail', width: 130, menuDisabled: true },
+ { header: "操作员", dataIndex: 'operator', width: 120, menuDisabled: true },
+ { header: "器械包条码", dataIndex: 'barcode', width: 120, menuDisabled: true },
+ { header: "抽屉名称", dataIndex: 'storageName', width: 120, menuDisabled: true },
+ { header: "上级库位", dataIndex: 'parentStorageName', width: 120, menuDisabled: true },
+ { header: "仓库", dataIndex: 'wareHouseName', width: 120, menuDisabled: true },
+ { header: "所属科室名称", dataIndex: 'orgUnitName', width: 120, menuDisabled: true }
+ ];
+
+ listStore = new Ext4.data.JsonStore({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/baseData/storageRecordAction!loadStorageRecordList.do',
+ reader: {
+ root: 'data'
+ }
+ },
+ fields: [
+ { name: 'tousseName' },
+ { name: 'time' },
+ { name: 'status' },
+ { name: 'operator' },
+ { name: 'barcode' },
+ { name: 'storageName' },
+ { name: 'parentId' },
+ { name: 'parentStorageName' },
+ { name: 'wareHouseName' },
+ { name: 'orgUnitName' },
+ { name: 'operateDetail' }
+ ]
+ });
+
+ grid = new Ext4.grid.GridPanel({
+ title: '物品存取记录',
+ columns: columns,
+ frame: false,
+ autoScroll: false,
+ store: listStore,
+ viewConfig: {
+ autoFill: true
+ }
+ });
+
+ //物品类型
+ var GoodsTypeData = [];
+ Ext4.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/diposableGoodsAction!getDiposableGoodsType.do',
+ async: false,
+ success: function (response, options) {
+ var result = Ext4.decode(response.responseText);
+ GoodsTypeData = result;
+ }
+ });
+
+ //所属科室
+ var departJsonStore = new Ext4.data.Store({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/systemmanage/orgUnit/searchApplyDepartmentByKeyWord.do',
+ reader: {
+ totalProperty: 'totalCount',
+ root: 'data'
+ },
+ pageSize: 25,
+ extraParams: {
+ onlyOneself: false,
+ showDisableOrgUnit: false
+ }
+ },
+ fields: [
+ { name: 'id', mapping: 'departmentCode' },
+ { name: 'name', mapping: 'departmentName' }
+ ]
+ });
+
+ //仓库
+ var wareHouseStore = new Ext4.data.Store({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/baseData/wareHouseAction!getWareHouseData.do',
+ reader: {
+ totalProperty: 'totalCount',
+ root: 'data'
+ },
+ pageSize: 25
+ },
+ fields: [
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' },
+ { name: 'orgUnitCode', mapping: 'orgUnitCode' }
+ ]
+ });
+
+ // 物品名称
+ var tousseAndDiposableGoodsStore = new Ext4.data.Store({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!searchTousseAndDressing.do',
+ reader: {
+ totalProperty: 'totalCount',
+ root: 'data'
+ }
+ },
+ fields: [
+ { name: 'id', mapping: 'id' },
+ { name: 'spelling', mapping: 'spelling' },
+ { name: 'name', mapping: 'name' },
+ { name: 'displayName', mapping: 'displayName' },
+ { name: 'amount', mapping: 'amount' }
+ ]
+ });
+
+ var dt = new Date();
+ var v = dt.getMonth() + 1;
+ if (v < 10) {
+ v = "0" + (dt.getMonth() + 1);
+ }
+ var startDayofMonth = dt.getFullYear() + "/" + v + "/01";
+ var form = new Ext4.form.Panel({
+ region: 'north',
+ buttonAlign: 'center',
+ border: 0,
+ frame: true,
+ bodyStyle: 'padding:0px auto;margin:0px',
+ height: 100,
+ id: 'form',
+ items: [{
+ layout: 'column',
+ autoHeight: true,
+ items: [{
+ layout: 'form',
+ columnWidth: 0.25,
+ items: [{
+ xtype: 'datefield',
+ fieldLabel: '开始日期',
+ labelAlign: 'right',
+ id: 'startDate',
+ name: 'startDate',
+ editable: false,
+ format: 'Y-m-d',
+ altFormats: 'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j',
+ allowBlank: false,
+ anchor: '95%',
+ value: new Date(startDayofMonth)
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 0.25,
+ items: [{
+ xtype: 'datefield',
+ fieldLabel: '结束日期',
+ labelAlign: 'right',
+ id: 'endDate',
+ name: 'endDate',
+ editable: false,
+ format: 'Y-m-d',
+ altFormats: 'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j',
+ allowBlank: false,
+ anchor: '95%',
+ value: new Date()
+ }]
+ }, {
+ xtype: 'hidden',
+ id: 'disposableGoodsId',
+ name: 'disposableGoodsId'
+ }, {
+ layout: 'form',
+ columnWidth: 0.25,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '条码',
+ id: 'barcode',
+ name: 'barcode',
+ labelAlign: 'right',
+ anchor: '95%'
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 0.25,
+ items: [{
+ xtype: 'combo',
+ id: 'tousseName',
+ name: 'tousseName',
+ queryParam: 'spell',
+ fieldLabel: '物品名称',
+ labelAlign: 'right',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'displayName',
+ anchor: '95%',
+ store: tousseAndDiposableGoodsStore,
+ width: 400,
+ lazyInit: true,
+ triggerAction: 'all',
+ hideTrigger: true,
+ typeAhead: false,
+ allowBlank: true,
+ listeners: {
+ select: function (combo, record, index) {
+ Ext4.getCmp('disposableGoodsId').setValue(record[0].data.id);
+ Ext4.getCmp('tousseName').setValue(record[0].data.name);
+ }
+ }
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 0.25,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '所属科室',
+ id: 'orgUnitCode',
+ name: 'orgUnitCode',
+ labelAlign: 'right',
+ valueField: 'id',
+ displayField: 'name',
+ minChars: 0,
+ queryParam: 'spell',
+ allowBlank: true,
+ forceSelection: true,
+ store: departJsonStore,
+ pageSize: 25,
+ listConfig: { width: 300 },
+ mode: 'remote',
+ triggerAction: 'all',
+ anchor: '95%'
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 0.25,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '仓库',
+ id: 'wareHouseId',
+ name: 'wareHouseId',
+ labelAlign: 'right',
+ valueField: 'id',
+ displayField: 'name',
+ minChars: 0,
+ queryParam: 'spell',
+ allowBlank: true,
+ forceSelection: true,
+ editable: false,
+ store: wareHouseStore,
+ pageSize: 25,
+ listConfig: { width: 300 },
+ mode: 'remote',
+ triggerAction: 'all',
+ anchor: '95%'
+ }]
+ }]
+ }],
+ buttons: [{
+ xtype: 'button',
+ text: '查询',
+ minWidth: 70,
+ iconCls: 'icon_search',
+ handler: function () {
+ var startDate = Ext4.getCmp('startDate').getRawValue();
+ var endDate = Ext4.getCmp('endDate').getRawValue();
+ var barcode = Ext4.getCmp('barcode').getValue();
+ var tousseName = Ext4.getCmp('tousseName').getValue();
+ var orgUnitCode = Ext4.getCmp('orgUnitCode').getValue();
+ var wareHouseId = Ext4.getCmp('wareHouseId').getValue();
+
+ if (startDate || endDate) {
+ if (!compareDate(startDate, endDate)) {
+ showResult("开始时间不能大于结束时间");
+ return;
+ }
+ }
+
+ var params = {
+ startDate: startDate,
+ endDate: endDate
+ }
+
+ //条码
+ if (!isUndefinedOrNullOrEmpty(barcode)) {
+ params.barcode = barcode;
+ }
+ //物品名称
+ if (!isUndefinedOrNullOrEmpty(tousseName)) {
+ params.tousseName = tousseName;
+ }
+ //所属科室
+ if (!isUndefinedOrNullOrEmpty(orgUnitCode)) {
+ params.orgUnitCode = orgUnitCode;
+ }
+ //仓库
+ if (!isUndefinedOrNullOrEmpty(wareHouseId)) {
+ params.wareHouseId = wareHouseId;
+ }
+
+ search(listStore, params);
+ }
+ }, {
+ xtype: 'button',
+ text: '重置',
+ minWidth: 70,
+ iconCls: 'icon_set',
+ handler: function () {
+ Ext4.getCmp('startDate').setValue(new Date(startDayofMonth));
+ Ext4.getCmp('endDate').setValue(new Date());
+ Ext4.getCmp('barcode').setValue("");
+ Ext4.getCmp('tousseName').setValue("");
+ Ext4.getCmp('orgUnitCode').setValue("");
+ Ext4.getCmp('wareHouseId').setValue("");
+ }
+ }, {
+ xtype: 'button',
+ text: '导出',
+ minWidth: 70,
+ iconCls: 'btn_ext_download',
+ handler: function () {
+ var startDate = Ext4.getCmp('startDate').getRawValue();
+ var endDate = Ext4.getCmp('endDate').getRawValue();
+ var barcode = Ext4.getCmp('barcode').getValue();
+ var tousseName = Ext4.getCmp('tousseName').getValue();
+ var orgUnitCode = Ext4.getCmp('orgUnitCode').getValue();
+ var wareHouseId = Ext4.getCmp('wareHouseId').getValue();
+
+ if (startDate || endDate) {
+ if (!compareDate(startDate, endDate)) {
+ showResult("开始时间不能大于结束时间");
+ return;
+ }
+ }
+
+ var exportUrl = WWWROOT + "/disinfectSystem/baseData/storageRecordAction!exportStorageRecord.do";
+ exportUrl += "?startDate=" + startDate;
+ exportUrl += "&endDate=" + endDate;
+
+ //条码
+ if (!isUndefinedOrNullOrEmpty(barcode)) {
+ exportUrl += "&barcode=" + barcode;
+ }
+ //物品名称
+ if (!isUndefinedOrNullOrEmpty(tousseName)) {
+ exportUrl += "&tousseName=" + encodeURIComponent(tousseName);
+ }
+ //所属科室
+ if (!isUndefinedOrNullOrEmpty(orgUnitCode)) {
+ exportUrl += "&orgUnitCode=" + orgUnitCode;
+ }
+ //仓库
+ if (!isUndefinedOrNullOrEmpty(wareHouseId)) {
+ exportUrl += "&wareHouseId=" + wareHouseId;
+ }
+
+ location.href = exportUrl;
+ }
+ }]
+ });
+
+ new Ext4.container.Viewport({
+ layout: 'border',
+ items: [form, {
+ region: 'center',
+ layout: 'fit',
+ items: [grid]
+ }]
+ });
+
+});
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/accessListView.jsp
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/accessListView.jsp (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/accessListView.jsp (revision 36601)
@@ -0,0 +1,34 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ include file="/common/taglibs.jsp"%>
+<%@ include file="/common/includeExtJsAndCss.jsp"%>
+<%@ include file="/common/includeExtJs4_2.jsp"%>
+<%@ page import="com.forgon.tools.SpringBeanManger" %>
+<%
+ String userName = AcegiHelper.getLoginUser().getUserFullName();
+ request.setAttribute("userName",userName);
+%>
+
+
+
+存取记录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.jsp
===================================================================
diff -u -r33370 -r36601
--- ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.jsp (.../operationReservationView.jsp) (revision 33370)
+++ ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.jsp (.../operationReservationView.jsp) (revision 36601)
@@ -70,7 +70,12 @@
.script("${ctx}/disinfectsystem/print/print.js?version=${svnRevision}")
.script("${ctx}/disinfectsystem/config/${profile}/print/printConfig.js?version=${svnRevision}")
}
-
+var SSTS_OR_Fetch = true;
+
+ if(sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer){
+ SSTS_OR_Fetch = false
+ }
+
var today = '<%=request.getAttribute("today")%>';
var tomorrow = '${tomorrowDate}';
Index: ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js
===================================================================
diff -u -r36581 -r36601
--- ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js (.../operationReservationView.js) (revision 36581)
+++ ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js (.../operationReservationView.js) (revision 36601)
@@ -3,6 +3,8 @@
var operationReservationWindow;
var lastSelIdArray = [];
var saveOrgUnitCode = null;
+//是否成功取回托盘
+var sendToSuccess = false;
function initQueryValueAndReload() {
setQueryValues();
grid.getStore().lastOptions.params['start'] = 0;
@@ -18,19 +20,18 @@
}
//明细grid删除按钮
function renderDeleteButton(v, p, record, rowIndex) {
- return "
";
+ return "
";
}
//删除grid明细
function deleteItem(tousseDefinitionId) {
- var gridStore = top.Ext.getCmp('operationReservationGrid').getStore();
- for (var i = 0; i < gridStore.getCount(); i++) {
- var record = gridStore.getAt(i);
- if (record.data.tousseDefinitionId == tousseDefinitionId) {
- gridStore.remove(record);
- break;
+ var rootNode = top.Ext.getCmp('operationReservationGrid').getRootNode();
+ rootNode.eachChild(function (pNode) {
+ if (pNode.attributes.tousseDefinitionId == tousseDefinitionId) {
+ pNode.remove();
+ return false;
}
- }
+ });
}
//Ext.form.DateField在IE8下显示不全
Ext.override(top.Ext.menu.Menu, {
@@ -39,14 +40,7 @@
}
});
-var goodsItemRecord = Ext.data.Record.create([
- { name: 'itemId' },
- { name: 'tousseDefinitionId' },
- { name: 'name' },
- { name: 'amount' }
-]);
-
function saveOrSubmitForm(id, isCommit) {
var form = top.Ext.getCmp("materialInvoiceForm");
if (!form.getForm().isValid()) {
@@ -58,21 +52,21 @@
showResult('手术名称不能为空!');
return false;
}
- var store = top.Ext.getCmp('operationReservationGrid').getStore();
- if (store.getCount() <= 0) {
+ var rootNode = top.Ext.getCmp('operationReservationGrid').getRootNode();
+ if (!rootNode.hasChildNodes()) {
showResult('请添加物品项!');
return false;
}
var jsonArray = new Array();
- for (var i = 0; i < store.getCount(); i++) {
- var record = store.getAt(i);
+ rootNode.eachChild(function (pNode) {
+ var po = pNode.attributes;
jsonArray.push({
- itemId: record.data.itemId,
- tousseDefinitionId: record.data.tousseDefinitionId,
- name: record.data.name,
- amount: record.data.amount
+ itemId: po.itemId,
+ tousseDefinitionId: po.tousseDefinitionId,
+ name: po.name,
+ amount: po.amount
});
- }
+ });
var params = {
id: id,
@@ -115,8 +109,114 @@
}
});
}
+function createTousseNode(isParentNode, itemId, tousseDefinitionId, name, amount, goodIndex, accessStatus, barcode, storageName) {
+ var node;
+ if (isParentNode) {
+ //创建父节点
+ node = new top.Ext.tree.TreeNode({
+ id: Ext.id(),
+ text: goodIndex,
+ cls: 'master-task',
+ iconCls: 'no-node-icon',
+ uiProvider: top.Ext.tree.ColumnNodeUI,
+ leaf: false,
+ expanded: true
+ });
+ } else {
+ //创建子节点
+ node = new top.Ext.tree.TreeNode({
+ id: Ext.id(),
+ text: goodIndex,
+ iconCls: 'no-node-icon',
+ uiProvider: top.Ext.tree.ColumnNodeUI,
+ leaf: true,
+ expanded: true
+ });
+ }
+ node.attributes.itemId = itemId;
+ node.attributes.tousseDefinitionId = tousseDefinitionId;
+ node.attributes.name = name;
+ node.attributes.amount = amount;
+ node.attributes.accessStatus = accessStatus;
+ node.attributes.barcode = barcode;
+ node.attributes.storageName = storageName;
+ node.attributes.goodIndex = goodIndex;
+ return node;
+}
-function editOperationReservation(id, committedStatus) {
+//添加明细
+function addItems(itemId, tousseDefinitionId, name, amount, goodIndex, tousseStorageInfos) {
+ if (name == null || name == '') {
+ showResult("请填写物品名称!");
+ return false;
+ }
+ if (amount == null || amount == '') {
+ showResult("请填写数量!");
+ return false;
+ }
+ var rootNode = top.Ext.getCmp('operationReservationGrid').getRootNode();
+ var isExist = false;
+ rootNode.eachChild(function (pNode) {
+ if (pNode.attributes.name == name) {
+ isExist = true;
+ return false;
+ }
+ });
+ if (!isExist) {
+ //添加操作
+ var parentNode = createTousseNode(true, itemId, tousseDefinitionId, name, amount, goodIndex);
+ if (tousseStorageInfos && tousseStorageInfos.length > 0) {
+ for (var i = 0; i < tousseStorageInfos.length; i++) {
+ var accessStatus = tousseStorageInfos[i].accessStatus;
+ var barcode = tousseStorageInfos[i].barcode;
+ var storageName = tousseStorageInfos[i].storageName;
+ var childNode = createTousseNode(false, itemId, tousseDefinitionId, name, amount, '', accessStatus, barcode, storageName);
+ parentNode.appendChild(childNode);
+ }
+ }
+ rootNode.appendChild(parentNode);
+ top.Ext.getCmp('goodsName').setValue('');
+ top.Ext.getCmp('amount').setValue('');
+ top.Ext.getCmp('goodsName').focus();
+ } else {
+ showResult(name + ",已添加!");
+ }
+}
+
+//刷新tree
+function reload(id) {
+ Ext.Ajax.request({
+ url: WWWROOT + "/disinfectsystem/operationReservationAction!loadOperationReservation.do",
+ params: { id: id },
+ success: function (result) {
+ if (result != null) {
+ var data = JSON.parse(result.responseText);
+ if (data.success) {
+ var rootNode = top.Ext.getCmp('operationReservationGrid').getRootNode();
+ rootNode.eachChild(function (pNode) {
+ pNode.remove();
+ });
+ var tousseItems = data.items;
+ for (var i = 0; i < tousseItems.length; i++) {
+ var itemId = tousseItems[i].itemId || '';
+ var tousseDefinitionId = tousseItems[i].tousseDefinitionId || '';
+ var name = tousseItems[i].name || '';
+ var amount = tousseItems[i].amount || 0;
+ var tousseStorageInfos = tousseItems[i].tousseStorageInfos || [];
+ addItems(itemId, tousseDefinitionId, name, amount, (i + 1), tousseStorageInfos);
+ }
+ } else {
+ showResult("该单已不存在!");
+ }
+ }
+ },
+ failure: function () {
+ showResult("加载失败,请联系管理员!");
+ }
+ });
+}
+
+function editOperationReservation(id, committedStatus, deliverStatus) {
var operationRoomAllowBlank = true;
var operationTimeAllowBlank = true;
var consoleNameAllowBlank = true;
@@ -241,43 +341,167 @@
}
}
});
- //添加明细
- function addItems(itemId, tousseDefinitionId, name, amount) {
- if (name == null || name == '') {
- showResult("请填写物品名称!");
- return false;
- }
- if (amount == null || amount == '') {
- showResult("请填写数量!");
- return false;
- }
- var store = top.Ext.getCmp('operationReservationGrid').getStore();
- var isExist = false;
- var count = store.getCount();
- for (var i = 0; i < count; i++) {
- var record = store.getAt(i);
- if (record.get("name") == name) {
- isExist = true;
- break;
+
+ //托盘选择
+ var storageLocationStore = new Ext.data.Store({
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/storageLocationAction!loadOperationReservationGoodsStorageLocation.do',
+ method: 'POST'
+ }),
+ reader: new Ext.data.JsonReader({
+ totalProperty: 'totalCount',
+ root: 'data'
+ }, [
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' },
+ { name: 'barcode', mapping: 'barcode' },
+ { name: 'storageLocationCode', mapping: 'storageLocationCode' }
+ ]),
+ listeners: {
+ beforeload: function (thiz) {
+ thiz.baseParams["invoicePlanId"] = id;
}
}
- if (!isExist) {
- //添加操作
- var materialInvoiceItem = new goodsItemRecord({
- itemId: itemId,
- tousseDefinitionId: tousseDefinitionId,
- name: name,
- amount: amount
- });
- store.add(materialInvoiceItem);
- top.Ext.getCmp('goodsName').setValue('');
- top.Ext.getCmp('amount').setValue('');
- top.Ext.getCmp('goodsName').focus();
- } else {
- showResult(name + ",已添加!");
- }
- }
+ });
+ var gridPanel = new top.Ext.tree.ColumnTree({
+ id: 'operationReservationGrid',
+ rootVisible: false,
+ autoScroll: true,
+ bodyStyle: 'border:1px solid #afd7af',
+ containerScroll: true,
+ width: (document.body.clientWidth > 700) ? 665 : (document.body.clientWidth - 80),
+ height: (document.body.clientHeight > 600) ? 350 : (document.body.clientHeight - 300),
+ columns: [{
+ header: '序号',
+ width: 50,
+ dataIndex: 'goodIndex'
+ }, {
+ header: '物品名称',
+ width: 170,
+ dataIndex: 'name'
+ }, {
+ header: '数量',
+ width: 80,
+ dataIndex: 'amount'
+ }, {
+ header: '条码',
+ width: 80,
+ dataIndex: 'barcode',
+ hidden: !sstsConfig.enableWarehousePositionModuleInterfaceWithKardexContainer
+ }, {
+ header: '存取状态',
+ width: 80,
+ dataIndex: 'accessStatus',
+ hidden: !sstsConfig.enableWarehousePositionModuleInterfaceWithKardexContainer
+ }, {
+ header: '托盘名称',
+ width: 80,
+ dataIndex: 'storageName',
+ hidden: !sstsConfig.enableWarehousePositionModuleInterfaceWithKardexContainer
+ }, {
+ header: '删除',
+ width: 80,
+ dataIndex: 'deleteButton',
+ renderer: renderDeleteButton
+ }],
+ tbar: [{
+ text: '手术名称:'
+ }, {
+ xtype: 'combo',
+ queryParam: 'spell',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'operationName',
+ store: operationNameStore,
+ forceSelection: false,
+ lazyInit: true,
+ triggerAction: 'all',
+ hideTrigger: false,
+ typeAhead: false,
+ editable: true,
+ width: 300,
+ name: "operation",
+ id: "operation",
+ anchor: '98%',
+ listeners: {
+ select: function (combo, record, index) {
+ top.Ext.getCmp("operationName").setValue(combo.getRawValue());
+ var rootNode = top.Ext.getCmp('operationReservationGrid').getRootNode();
+ rootNode.removeAll();
+ var items = record.get("items");
+ if (items != null) {
+ for (var i = 0; i < items.length; i++) {
+ addItems("", items[i].tousseDefinitionId, items[i].name, items[i].amount, (i + 1));
+ }
+ }
+ }
+ }
+ }],
+ listeners: {
+ render: function () {
+ var tbar = new top.Ext.Toolbar({
+ items: [{
+ text: '物品名称:'
+ }, {
+ xtype: 'combo',
+ id: 'goodsName',
+ name: 'goodsName',
+ queryParam: 'spell',
+ fieldLabel: '物品名称',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'displayName',
+ anchor: '100%',
+ width: (document.body.clientWidth > 700) ? 300 : 200,
+ store: tousseAndDiposableGoodsStore,
+ lazyInit: true,
+ triggerAction: 'all',
+ hideTrigger: true,
+ typeAhead: false,
+ forceSelection: true,
+ allowBlank: true
+ }, {
+ text: ' 数量:'
+ }, {
+ xtype: 'textfield',
+ maxLength: '16',
+ id: 'amount',
+ name: 'amount',
+ width: 70,
+ regex: /^\d+$/,
+ regexText: '只能输入数字',
+ anchor: '100%',
+ listeners: {
+ specialkey: function (field, e) {
+ if (e.getKey() == Ext.EventObject.ENTER) {
+ var tousseDefinitionId = top.Ext.getCmp('goodsName').getValue();
+ var name = top.Ext.getCmp('goodsName').getRawValue()
+ var amount = top.Ext.getCmp('amount').getValue();
+ addItems("", tousseDefinitionId, name, amount);
+ }
+ }
+ }
+ }, {
+ text: '添加',
+ iconCls: 'btn_ext_add',
+ handler: function () {
+ var tousseDefinitionId = top.Ext.getCmp('goodsName').getValue();
+ var name = top.Ext.getCmp('goodsName').getRawValue()
+ var amount = top.Ext.getCmp('amount').getValue();
+ addItems("", tousseDefinitionId, name, amount);
+ }
+ }
+ ]
+ });
+ tbar.render(top.Ext.getCmp('operationReservationGrid').tbar);
+ }
+ },
+ root: new top.Ext.tree.AsyncTreeNode({
+ text: '器械包'
+ })
+ });
+
var form = new top.Ext.FormPanel({
id: 'materialInvoiceForm',
frame: true,
@@ -549,6 +773,117 @@
}]
}, {
columnWidth: 1,
+ layout: 'column',
+ hidden: !(!SSTS_OR_Fetch && (deliverStatus == '部分发货' || deliverStatus == '已发货')),
+ items: [{
+ layout: 'form',
+ columnWidth: .33,
+ items: [{
+ xtype: 'combo',
+ id: 'storageLocationAddr',
+ name: 'storageLocationAddr',
+ valueField: 'queryValue',
+ displayField: 'queryMode',
+ width: 180,
+ fieldLabel: '开口选择',
+ mode: 'local',
+ readOnly: true,
+ editable: false,
+ triggerAction: 'all',
+ forceSelection: true,
+ anchor: '99%',
+ store: new Ext.data.SimpleStore({
+ fields: ['queryMode', 'queryValue'],
+ data: [['一号开口', 'S01-1'], ['二号开口', 'S01-2'], ['三号开口', 'S01-3']]
+ })
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ items: [{
+ xtype: 'hidden',
+ id: 'storageLocationId',
+ name: 'storageLocationId'
+ }, {
+ xtype: 'hidden',
+ id: 'kardexContainerHost',
+ name: 'kardexContainerHost',
+ value: '194.1.2.135'
+ }, {
+ xtype: 'hidden',
+ id: 'kardexContainerPort',
+ name: 'kardexContainerPort',
+ value: '15008'
+ }, {
+ xtype: 'combo',
+ fieldLabel: '托盘选择',
+ id: 'storageLocationName',
+ name: 'storageLocationName',
+ minChars: 0,
+ valueField: 'name',
+ displayField: 'name',
+ store: storageLocationStore,
+ triggerAction: 'all',
+ readOnly: true,
+ editable: false,
+ forceSelection: true,
+ allowBlank: true,
+ anchor: '99%',
+ listeners: {
+ select: function (combo, record, index) {
+ top.Ext.getCmp('storageLocationId').setValue(record.data.id);
+ }
+ }
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ items: [{
+ xtype: 'button',
+ text: '取回托盘',
+ handler: function () {
+ var storageLocationId = top.Ext.getCmp("storageLocationId").getValue();
+ var storageLocationAddr = top.Ext.getCmp("storageLocationAddr").getValue();
+ var kardexContainerHost = top.Ext.getCmp("kardexContainerHost").getValue();
+ var kardexContainerPort = top.Ext.getCmp("kardexContainerPort").getValue();
+ var params = {
+ storageLocationId: storageLocationId,
+ addr: storageLocationAddr,
+ status: '取出',
+ host: kardexContainerHost,
+ port: kardexContainerPort
+ }
+ if (storageLocationAddr == '') {
+ showResult('开口不能为空');
+ return;
+ }
+ if (storageLocationId == '') {
+ showResult('托盘不能为空');
+ return;
+ }
+ showResult('已经发送命令给货柜,托盘调度中,请稍候!');
+ Ext.Ajax.timeout = 2 * 60 * 1000;
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/baseData/storageRecordAction!sendKardexContainerTCPCommand.do',
+ async: false,
+ params: params,
+ timeout: 2 * 60 * 1000,
+ success: function (response) {
+ var result = Ext.decode(response.responseText);
+ showResult(result.message);
+ if (result.success) {
+ sendToSuccess = true;
+ }
+ },
+ failure: function (response, options) {
+ showResult(response.responseText);
+ }
+ });
+ }
+ }]
+ }]
+ }, {
+ columnWidth: 1,
layout: 'form',
items: [{
xtype: 'textarea',
@@ -561,149 +896,66 @@
anchor: '100%'
}]
}]
- }, new top.Ext.grid.EditorGridPanel({
- id: 'operationReservationGrid',
- bodyStyle: 'border:1px solid #afd7af',
- frame: false,
- viewConfig: {
- forceFit: true
- },
- store: new Ext.data.Store({
- proxy: new Ext.data.HttpProxy({
- url: WWWROOT + '/disinfectSystem/materialInvoiceAction!getMaterialInvoiceItemsByMaterialInvoiceId.do',
- method: 'POST'
- }),
- reader: new Ext.data.JsonReader({
- fields: [
- { name: 'id' },
- { name: 'materialDefinitionId' },
- { name: 'materialName' },
- { name: 'userecordId' },
- { name: 'userecordName' },
- { name: 'userecordDepartCoding' },
- { name: 'amount' },
- { name: 'deleteButton' }
- ]
- })
- }),
- cm: new Ext.grid.ColumnModel([new Ext.grid.RowNumberer({ header: "序号", width: 40 }),
- { header: "itemId", dataIndex: 'itemId', hidden: true },
- { header: "tousseDefinitionId", dataIndex: 'tousseDefinitionId', hidden: true },
- { header: "物品名称", dataIndex: 'name', width: 170, menuDisabled: true },
- {
- header: " 数量", dataIndex: 'amount', width: 80, menuDisabled: true,
- editor: new Ext.form.TextField({
- regex: /^\d+$/,
- regexText: '只能输入数字',
- allowBlank: false
- })
- },
- { header: "删除", width: 80, menuDisabled: true, dataIndex: 'deleteButton', id: 'expandColumn', renderer: renderDeleteButton }
- ]),
- width: (document.body.clientWidth > 700) ? 665 : (document.body.clientWidth - 80),
- height: (document.body.clientHeight > 600) ? 350 : (document.body.clientHeight - 300),
- autoExpandColumn: 'expandColumn',
- clicksToEdit: 1,// 设置点击几次才可编辑
- selModel: new top.Ext.grid.RowSelectionModel({
- singleSelect: false
- }),
- tbar: [{
- text: '手术名称:'
- }, {
- xtype: 'combo',
- queryParam: 'spell',
- minChars: 0,
- valueField: 'id',
- displayField: 'operationName',
- store: operationNameStore,
- forceSelection: false,
- lazyInit: true,
- triggerAction: 'all',
- hideTrigger: false,
- typeAhead: false,
- editable: true,
- width: 300,
- name: "operation",
- id: "operation",
- anchor: '98%',
- listeners: {
- select: function (combo, record, index) {
-
- top.Ext.getCmp("operationName").setValue(combo.getRawValue());
- var store = top.Ext.getCmp('operationReservationGrid').getStore();
- store.removeAll();
-
- var items = record.get("items");
- if (items != null) {
- for (var i = 0; i < items.length; i++) {
- addItems("", items[i].tousseDefinitionId, items[i].name, items[i].amount);
+ }, gridPanel],
+ buttons: [{
+ text: '取出',
+ hidden: !(!SSTS_OR_Fetch && (deliverStatus == '部分发货' || deliverStatus == '已发货')),
+ handler: function () {
+ var storageLocationId = top.Ext.getCmp('storageLocationId').getValue();
+ var storageLocationName = top.Ext.getCmp('storageLocationName').getRawValue();
+ if (storageLocationId == '') {
+ showResult('托盘不能为空');
+ return;
+ }
+ var rootNode = top.Ext.getCmp('operationReservationGrid').getRootNode();
+ var hasStorage = false;
+ rootNode.eachChild(function (pNode) {
+ if (pNode.childNodes.length > 0) {
+ for (var i = 0; i < pNode.childNodes.length; i++) {
+ if (storageLocationName == pNode.childNodes[i].attributes.storageName) {
+ hasStorage = true;
+ break;
}
}
}
+ });
+ if (!hasStorage) {
+ showResult('所选托盘中不含有当前手术预约单物品,请选择其他托盘!');
+ return
}
- }
- ],
- listeners: {
- render: function () {
- var tbar = new top.Ext.Toolbar({
- items: [{
- text: '物品名称:'
- }, {
- xtype: 'combo',
- id: 'goodsName',
- name: 'goodsName',
- queryParam: 'spell',
- fieldLabel: '物品名称',
- minChars: 0,
- valueField: 'id',
- displayField: 'displayName',
- anchor: '100%',
- width: (document.body.clientWidth > 700) ? 300 : 200,
- store: tousseAndDiposableGoodsStore,
- lazyInit: true,
- triggerAction: 'all',
- hideTrigger: true,
- typeAhead: false,
- forceSelection: true,
- allowBlank: true
- }, {
- text: ' 数量:'
- }, {
- xtype: 'textfield',
- maxLength: '16',
- id: 'amount',
- name: 'amount',
- width: 70,
- regex: /^\d+$/,
- regexText: '只能输入数字',
- anchor: '100%',
- listeners: {
- specialkey: function (field, e) {
- if (e.getKey() == Ext.EventObject.ENTER) {
- var tousseDefinitionId = top.Ext.getCmp('goodsName').getValue();
- var name = top.Ext.getCmp('goodsName').getRawValue()
- var amount = top.Ext.getCmp('amount').getValue();
- addItems("", tousseDefinitionId, name, amount);
- }
+ if (!sendToSuccess) {
+ showResult('托盘名称未进行取回托盘操作,请先取回托盘!');
+ return
+ }
+ top.Ext.MessageBox.confirm("请确认", "是否在" + storageLocationName + "中取出当前手术预约单中的物品?", function (button, text) {
+ if ("yes" == button) {
+ Ext.Ajax.timeout = 2 * 60 * 1000;
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/tousseInstanceAction!takeOutOperationReservationTousseInstance.do',
+ async: false,
+ params: {
+ operationReservationId: id,
+ storageLocationId: storageLocationId
+ },
+ timeout: 2 * 60 * 1000,
+ success: function (response) {
+ var result = Ext.decode(response.responseText);
+ showResult(result.message);
+ if (result.success) {
+ top.Ext.getCmp('storageLocationName').setValue('');
+ top.Ext.getCmp('storageLocationId').setValue('');
+ sendToSuccess = false;
+ reload(id);
}
+ },
+ failure: function (response, options) {
+ showResult(response.responseText);
}
- }, {
- text: '添加',
- iconCls: 'btn_ext_add',
- handler: function () {
- var tousseDefinitionId = top.Ext.getCmp('goodsName').getValue();
- var name = top.Ext.getCmp('goodsName').getRawValue()
- var amount = top.Ext.getCmp('amount').getValue();
- addItems("", tousseDefinitionId, name, amount);
- }
- }
- ]
- });
- tbar.render(top.Ext.getCmp('operationReservationGrid').tbar);
- }
+ });
+ }
+ });
}
- })],
- buttons: [{
+ }, {
text: '暂存',
hidden: (committedStatus == 1 ? true : false),
handler: function () {
@@ -761,7 +1013,12 @@
top.Ext.getCmp("remark").setValue(data.remark);
var tousseItems = data.items;
for (var i = 0; i < tousseItems.length; i++) {
- addItems(tousseItems[i].itemId, tousseItems[i].tousseDefinitionId, tousseItems[i].name, tousseItems[i].amount);
+ var itemId = tousseItems[i].itemId || '';
+ var tousseDefinitionId = tousseItems[i].tousseDefinitionId || '';
+ var name = tousseItems[i].name || '';
+ var amount = tousseItems[i].amount || 0;
+ var tousseStorageInfos = tousseItems[i].tousseStorageInfos || [];
+ addItems(itemId, tousseDefinitionId, name, amount, (i + 1), tousseStorageInfos);
}
} else {
showResult("该单已不存在!");
@@ -905,13 +1162,13 @@
);
}
-function editRecord(id, committedStatus) {
+function editRecord(id, committedStatus, deliverStatus) {
lastSelIdArray = [id];
- editOperationReservation(id, committedStatus);
+ editOperationReservation(id, committedStatus, deliverStatus);
}
function modify(v, data) {
- editRecord(data['id'], data['committedStatus']);
+ editRecord(data['id'], data['committedStatus'], data['deliverStatus']);
}
Ext.onReady(function () {
Index: ssts-web/src/main/webapp/ext/fontSize15/styles/common.css
===================================================================
diff -u -r36154 -r36601
--- ssts-web/src/main/webapp/ext/fontSize15/styles/common.css (.../common.css) (revision 36154)
+++ ssts-web/src/main/webapp/ext/fontSize15/styles/common.css (.../common.css) (revision 36601)
@@ -507,4 +507,9 @@
/* SZSLGZXYY-16:bbar居中*/
#signImgWin .x-toolbar table {
margin: 0 auto !important;
+}
+
+/* 隐藏TreeNode图标*/
+.no-node-icon, #operationReservationGrid .x-tree-elbow-end{
+ display: none !important;
}
\ No newline at end of file
Index: ssts-web/src/main/webapp/ext/fontSize12/styles/common.css
===================================================================
diff -u -r36154 -r36601
--- ssts-web/src/main/webapp/ext/fontSize12/styles/common.css (.../common.css) (revision 36154)
+++ ssts-web/src/main/webapp/ext/fontSize12/styles/common.css (.../common.css) (revision 36601)
@@ -588,4 +588,9 @@
/* SZSLGZXYY-16:bbar居中*/
#signImgWin .x-toolbar table {
margin: 0 auto !important;
+}
+
+/* 隐藏TreeNode图标*/
+.no-node-icon, #operationReservationGrid .x-tree-elbow-end{
+ display: none !important;
}
\ No newline at end of file
Index: ssts-web/src/main/webapp/homepage/menuconfigure.js
===================================================================
diff -u -r36289 -r36601
--- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 36289)
+++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 36601)
@@ -224,9 +224,10 @@
singleClickExpand:singleClickExpandTree,
hidden:SSTS_storageLocationManager && SSTS_storageLocationLook && SSTS_tousseAccess,
children:[
- {hidden :SSTS_storageLocationManager,text:"库位管理",href:WWWROOT+'/disinfectsystem/storageLocationManage/storageLocationManageView.jsp',hrefTarget:linkTarget,leaf:true},
- {hidden :SSTS_storageLocationLook,text:"库存查看",href:WWWROOT+'/disinfectsystem/storageLocationManage/storageLocationLookView.jsp',hrefTarget:linkTarget,leaf:true},
- {hidden :SSTS_tousseAccess,text:"物品存取",href:WWWROOT+'/disinfectsystem/storageLocationManage/goodsAccess.jsp',hrefTarget:linkTarget,leaf:true}
+ {hidden :SSTS_storageLocationManager,text:"库位管理",href:WWWROOT+'/disinfectsystem/storageLocationManage/storageLocationManageView.jsp',hrefTarget:linkTarget,leaf:true},
+ {hidden :SSTS_storageLocationLook,text:"库存查看",href:WWWROOT+'/disinfectsystem/storageLocationManage/storageLocationLookView.jsp',hrefTarget:linkTarget,leaf:true},
+ {hidden :SSTS_tousseAccess,text:"物品存取",href:WWWROOT+'/disinfectsystem/storageLocationManage/goodsAccess.jsp',hrefTarget:linkTarget,leaf:true},
+ {hidden :SSTS_accessList_Manager,text:"存取记录",href:WWWROOT+'/disinfectsystem/storageLocationManage/accessListView.jsp',hrefTarget:linkTarget,leaf:true}
]
});
DisinfectsystemTreeData.push({