Index: ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js =================================================================== diff -u -r37401 -r37457 --- ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js (.../operationReservationView.js) (revision 37401) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js (.../operationReservationView.js) (revision 37457) @@ -1498,6 +1498,12 @@ return "

" + status + "

"; } + var committedStatusDefault = '未提交'; + + if(sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer){ + committedStatusDefault = '已提交'; + } + var form = new Ext.form.FormPanel({ title: '', region: 'north', @@ -1527,7 +1533,7 @@ fieldLabel: '提交状态', mode: 'local', readOnly: true, - value: '未提交', + value: committedStatusDefault, triggerAction: 'all', forceSelection: true, store: new Ext.data.SimpleStore({ Index: ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/storageLocationLookView.jsp =================================================================== diff -u -r37389 -r37457 --- ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/storageLocationLookView.jsp (.../storageLocationLookView.jsp) (revision 37389) +++ ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/storageLocationLookView.jsp (.../storageLocationLookView.jsp) (revision 37457) @@ -43,6 +43,11 @@ + @@ -54,6 +59,7 @@ + Index: ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/storageLocationLookView.js =================================================================== diff -u -r37429 -r37457 --- ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/storageLocationLookView.js (.../storageLocationLookView.js) (revision 37429) +++ ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/storageLocationLookView.js (.../storageLocationLookView.js) (revision 37457) @@ -42,10 +42,13 @@ $Id("parm_s_warseCode").value = params.wareHouseId; $Id("parm_s_parentStorageLocation").value = params.parentStorageLocation; $Id("parm_s_parentStorageLocationId").value = params.parentStorageLocationId; + //BJDXZLYY-47:存入扫描多个条码 + $Id('parm_s_scanTousseBarcodes').value = ''; + warseIsOut = false; //BJDXZLYY-44:存入取出 if (sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer) { loadFirstStorageLocation(params.type, params.id); - drawerStore.load(); + return } grid.dwrReload(); } @@ -84,37 +87,16 @@ Ext.getCmp('drawerCode').setValue(result.storageLocation.barcode);//库位条码 Ext.getCmp('barcode2').setValue(""); Ext.getCmp('barcode2').focus(); - drawerStore.load(); + grid.dwrReload(); } + warseIsOut = false; } else if (returnType == "storageRecord") {//扫描物品条码 var id = result.tousseInstance.id; - var tousseName = result.tousseInstance.tousseName; var barcode = result.tousseInstance.barcode; - var goodIdsList = Ext.getCmp("goodIdsList").getValue() || ''; - var goodNamesList = Ext.getCmp("goodNamesList").getValue() || ''; - id = '' + id + ''; - if (goodIdsList !== '') { - var goodIdsListArr = goodIdsList.split(';'); - var goodNamesListArr = goodNamesList.split(';'); - var index = goodIdsListArr.indexOf(id); - if (index >= 0) { - top.Ext.Msg.confirm('请确认', '当前物品已存在,是否移除?', function (btn) { - if (btn == 'yes') { - goodIdsListArr.splice(index, 1); - goodNamesListArr.splice(index, 1); - Ext.getCmp("goodIdsList").setValue(goodIdsListArr.join(';')); - Ext.getCmp("goodNamesList").setValue(goodNamesListArr.join(';')); - } - }) - } else { - goodIdsListArr.push(id); - goodNamesListArr.push(tousseName + '(' + barcode + ')'); - Ext.getCmp("goodIdsList").setValue(goodIdsListArr.join(';')); - Ext.getCmp("goodNamesList").setValue(goodNamesListArr.join(';')); - } - } else { - Ext.getCmp("goodIdsList").setValue(id) - Ext.getCmp("goodNamesList").setValue(tousseName + '(' + barcode + ')') + if (checkedType == '存入') { + storageLocationItemStorage(id, barcode); + } else if (checkedType == '取出') { + storageLocationItemRetrieval(id); } Ext.getCmp('barcode2').setValue(""); Ext.getCmp('barcode2').focus(); @@ -201,6 +183,8 @@ $Id("parm_s_queryMode").value = queryMode; $Id("parm_s_instrumentSetTypeIds").value = instrumentSetTypeIds; + //BJDXZLYY-47:存入扫描多个条码 + $Id('parm_s_scanTousseBarcodes').value = ''; grid.dwrReload(); } @@ -231,8 +215,6 @@ Ext.getCmp('superiorWarsehouse').setValue(""); Ext.getCmp('drawerName').setValue(""); Ext.getCmp('drawerCode').setValue(""); - Ext.getCmp('goodIdsList').setValue(""); - Ext.getCmp('goodNamesList').setValue(""); } } @@ -276,38 +258,36 @@ } //BJDXZLYY-44:物品存入 -function storageLocationItemStorage(isTrue) { - var tousseInstanceIds = Ext.getCmp("goodIdsList").getValue() || ''; +function storageLocationItemStorage(tousseInstanceId, barcode) { var storageLocationId = $Id("parm_s_id").value; var storageLocationAddr = Ext.getCmp("addr").getValue() || ''; if (storageLocationId == '' || storageLocationId == 0 || storageLocationId == '0') { showResult('请先选择了托盘后再操作。'); return; } - if (tousseInstanceIds == '' && !isTrue) { - top.Ext.Msg.confirm('请确认', '不添加物品时仅将托盘送回仓库,是否继续?', function (btn) { - if (btn == 'yes') { - storageLocationItemStorage(true) - } - }) - return + if (!warseIsOut) { + showResult('请先取出托盘后再操作。'); + return; } - var storageLocationId = $Id("parm_s_id").value; Ext.Ajax.request({ url: WWWROOT + '/disinfectSystem/storageLocationGoodsAccessAction!storageLocationItemStorage.do', params: { - tousseInstanceIds: tousseInstanceIds, + tousseInstanceIds: tousseInstanceId, storageLocationId: storageLocationId, containerOpeningCode: storageLocationAddr }, success: function (response, options) { var result = Ext.decode(response.responseText); if (result.success) { + //BJDXZLYY-47:存入扫描多个条码 + var oldBarcode = $Id('parm_s_scanTousseBarcodes').value; + if (oldBarcode == '') { + $Id('parm_s_scanTousseBarcodes').value = barcode; + } else { + $Id('parm_s_scanTousseBarcodes').value = oldBarcode + ';' + barcode; + } grid.dwrReload(); - Ext.getCmp("goodIdsList").setValue('') - Ext.getCmp("goodNamesList").setValue('') - warseIsOut = false; } showResult(result.message); }, @@ -318,38 +298,29 @@ } //BJDXZLYY-44:物品取出 -function storageLocationItemRetrieval(isTrue) { - var tousseInstanceIds = Ext.getCmp("goodIdsList").getValue() || ''; +function storageLocationItemRetrieval(tousseInstanceId) { var storageLocationId = $Id("parm_s_id").value; var storageLocationAddr = Ext.getCmp("addr").getValue() || ''; if (storageLocationId == '' || storageLocationId == 0 || storageLocationId == '0') { showResult('请先选择了托盘后再操作。'); return; } - if (tousseInstanceIds == '' && !isTrue) { - top.Ext.Msg.confirm('请确认', '不添加物品时仅将托盘送回仓库,是否继续?', function (btn) { - if (btn == 'yes') { - storageLocationItemRetrieval(true) - } - }) - return + if (!warseIsOut) { + showResult('请先取出托盘后再操作。'); + return; } - var storageLocationId = $Id("parm_s_id").value; Ext.Ajax.request({ url: WWWROOT + '/disinfectSystem/storageLocationGoodsAccessAction!storageLocationItemRetrieval.do', params: { - tousseInstanceIds: tousseInstanceIds, + tousseInstanceIds: tousseInstanceId, storageLocationId: storageLocationId, containerOpeningCode: storageLocationAddr }, success: function (response, options) { var result = Ext.decode(response.responseText); if (result.success) { grid.dwrReload(); - Ext.getCmp("goodIdsList").setValue('') - Ext.getCmp("goodNamesList").setValue('') - warseIsOut = false; } showResult(result.message); }, @@ -379,8 +350,6 @@ var result = Ext.decode(response.responseText); if (result.success && result.data) { putInOrTakeOutTousse(result.data.barcode); - Ext.getCmp("goodIdsList").setValue('') - Ext.getCmp("goodNamesList").setValue('') } }, failure: function () { @@ -455,6 +424,39 @@ } } +function getTreePathById(params, callback) { + if (params.id == '' || params.type == '') { + return; + } + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/storageLocationAction!loadStorageLocationTree.do', + async: false, + params: { + id: params.id, + nodeType: params.type + }, + success: function (response) { + var result = Ext.decode(response.responseText); + if (result.length > 0) { + var nodeId = result[0].id; + var nodeType = result[0].type; + var nodeParams = { + id: nodeId, + type: nodeType, + returnType: params.returnType, + returnPath: params.returnPath + '/' + nodeId + } + if (nodeType !== params.returnType) { + getTreePathById(nodeParams, callback); + } else { + result[0].returnPath = nodeParams.returnPath; + callback(result[0]) + } + } + } + }); +} + var serverDate; Ext.onReady(function () { @@ -473,6 +475,12 @@ } var readerDetail = [{ + name: 'id' + }, { + name: 'tousseInstanceId' + }, { + name: 'scanTousseBarcode' + }, { name: 'tousseName' }, { name: 'sterileEndTime' @@ -884,7 +892,7 @@ id: 'drawerName', name: 'drawerName', fieldLabel: '抽屉名称', - queryParam: 'keyword', + queryParam: 'spell', minChars: 0, valueField: 'name', displayField: 'name', @@ -897,34 +905,12 @@ anchor: '95%', listeners: { select: function (combo, record, index) { - if (warseIsOut) { - showResult('当前已取出【' + oldWarseName + '】,请先执行了“存入”或“取出”操作后再切换'); - Ext.getCmp("drawerName").setValue(oldWarseName); - return; - } Ext.getCmp("drawerName").setValue(record.data.name); Ext.getCmp("drawerCode").setValue(record.data.barcode); putInOrTakeOutTousse(record.data.barcode, 'drawer'); } } }] - }, { - columnWidth: 1, - layout: 'form', - labelAlign: "right", - height: 30, - items: [{ - xtype: 'hidden', - id: 'goodIdsList', - name: 'goodIdsList' - }, { - xtype: 'textfield', - id: 'goodNamesList', - name: 'goodNamesList', - fieldLabel: '物品列表', - disabled: true, - anchor: '99%' - }] }] }, { layout: 'column', @@ -962,26 +948,27 @@ Ext.getCmp('btn1').show(); Ext.getCmp('btn2').show(); Ext.getCmp('btn3').hide(); - Ext.getCmp('btn4').hide(); - Ext.getCmp('btn5').hide(); + Ext.getCmp('retrievalBtn').hide(); resetStorageLocation(); + //BJDXZLYY-47:存入扫描多个条码 + $Id('parm_s_scanTousseBarcodes').value = ''; grid.dwrReload(); } else if (group == "存入") { Ext.getCmp('queryType1').hide(); Ext.getCmp('queryType2').show(); Ext.getCmp('btn1').hide(); Ext.getCmp('btn2').hide(); Ext.getCmp('btn3').show(); - Ext.getCmp('btn4').show(); - Ext.getCmp('btn5').hide(); + Ext.getCmp('retrievalBtn').hide(); + resetStorageLocation(); } else if (group == "取出") { Ext.getCmp('queryType1').hide(); Ext.getCmp('queryType2').show(); Ext.getCmp('btn1').hide(); Ext.getCmp('btn2').hide(); Ext.getCmp('btn3').show(); - Ext.getCmp('btn4').hide(); - Ext.getCmp('btn5').show(); + Ext.getCmp('retrievalBtn').show(); + resetStorageLocation(); } } } @@ -1014,24 +1001,6 @@ handler: function () { sendKardexContainerTCPCommand(); } - }, { - xtype: 'button', - text: '存入并送回托盘', - minWidth: 70, - id: 'btn4', - hidden: true, - handler: function () { - storageLocationItemStorage(); - } - }, { - xtype: 'button', - text: '取出并送回托盘', - minWidth: 70, - id: 'btn5', - hidden: true, - handler: function () { - storageLocationItemRetrieval(); - } }] }); @@ -1050,6 +1019,8 @@ $Id("parm_s_warseCode").value = ""; $Id("parm_s_parentStorageLocation").value = ""; $Id("parm_s_parentStorageLocationId").value = ""; + //BJDXZLYY-47:存入扫描多个条码 + $Id('parm_s_scanTousseBarcodes').value = ''; grid.dwrReload(); } } @@ -1064,25 +1035,56 @@ treeLoader.baseParams.nodeType = node.attributes.type; }); + var tbar = [{ + text: '取出', + id: 'retrievalBtn', + hidden: true, + handler: function () { + var records = grid.getSelectionModel().getSelections(); + if (records.length == 0) { + showResult("请先勾选物品后再进行取出操作"); + return; + } + + var ids = []; + + for (var i = 0; i < records.length; i++) { + var tousseInstanceId = records[i].data.tousseInstanceId; + ids[i] = tousseInstanceId; + } + + storageLocationItemRetrieval(ids.join(';')) + } + }]; + grid = new Ext.ux.ForgonPageGrid({ - id: 'tousseInstanceGrid', + tbar: tbar, pageSize: 20, - renderTo: 'gridDiv', - showLoadMask: true, defaultSortField: 'id', - defaultSortDirection: 'DESC', + defaultSortDirection: 'ASC', isCheckboxSelectionModel: true, - rememberSelected: false, - isShowSearchField: true, - columns: columns, plugins: filters, - frame: false, + rememberSelected: false, autoExpandColumn: 'orgUnitName', - border: false + viewConfig: { + forceFit: true, + //是否隔行换色 + stripeRows: false, + getRowClass: function (record, rowIndex, rowParams, store) { + var className = ''; + if (sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer) { + if (record.data.scanTousseBarcode) { + className = 'scanBg'; + } + } + return className; + } + }, + columns: columns }, readerDetail, StorageLocationTableManager.findGoodsAndStorageLocationTableList, - null + null //这个参数只是占位作用 ); var viewport = new Ext.Viewport({ @@ -1172,5 +1174,23 @@ root.expand(false, /*no anim*/ false); Ext.getCmp('goodsName').focus(false, 100); Ext.getCmp('queryType2').hide(); + //BJDXZLYY-47:默认选中“库位列表”中的第一个科室的第一个仓库 + if (sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer) { + var params = { + id: 'orgUnit;0', + type: 'orgUnit', + returnType: 'storageLocation', + returnPath: '/orgUnit;0' + } + getTreePathById(params, function (result) { + var treePanel = viewport.findById('west-panel'); + treePanel.expandPath(result.returnPath, 'id', function (bSuccess, oLastNode) { + if (!bSuccess) return; + oLastNode.ensureVisible(); + oLastNode.select(); + }); + }) + $Id('parm_s_scanTousseBarcodes').value = ''; + } });