Index: ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js =================================================================== diff -u -r36808 -r36817 --- ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js (.../operationReservationView.js) (revision 36808) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js (.../operationReservationView.js) (revision 36817) @@ -310,6 +310,44 @@ }); } +//取出或存入托盘 +function sendKardexContainerTCPCommand(status){ + 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: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); + }, + failure : function(response, options) { + showResult(response.responseText); + } + }); +} + function editOperationReservation(id, committedStatus, deliverStatus) { var operationRoomAllowBlank = true; var operationTimeAllowBlank = true; @@ -1083,50 +1121,26 @@ }] }, { layout: 'form', - columnWidth: .33, + columnWidth :'80px', items: [{ xtype: 'button', - text: '取回托盘', + 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); - } - }); + sendKardexContainerTCPCommand('取出'); } }] + },{ + layout : 'form', + columnWidth :'80px', + hidden:!sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer, + style:'margin-left:10px', + items:[{ + xtype : 'button', + text : '存入托盘', + handler : function() { + sendKardexContainerTCPCommand('存入'); + } + }] }] }, { columnWidth: 1,