From 36aef6744f21e53faf189da355950904aa5518b4 Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Thu, 11 Sep 2025 14:48:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A5=A8=E6=89=93=E5=8D=B0=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/printer/Common.js | 192 ++ src/utils/printer/WebSDK.js | 1 + .../canteen/order/reserveManagement/index.vue | 1688 +++++++++-------- 3 files changed, 1137 insertions(+), 744 deletions(-) create mode 100644 src/utils/printer/Common.js create mode 100644 src/utils/printer/WebSDK.js diff --git a/src/utils/printer/Common.js b/src/utils/printer/Common.js new file mode 100644 index 00000000..6e1013af --- /dev/null +++ b/src/utils/printer/Common.js @@ -0,0 +1,192 @@ +var port = 18080; +var connectionMode = "ws:"; +var wsPrint = null; +let wsGetPrinterList = null; +var CHUNK_SIZE = 1024 * 64; + +const WebSocketPrint = function (serverURL, strPrinterName, request, callback) { + var _websocket; + var _callback = callback; + var _request = request; + var _connectedsocket = false; + + var onMessage = function (msg) { + if (_websocket.readyState == 1) { + var res = JSON.parse(msg.data); + var ret = res.statusMessage; + var printerStatus; + if (res.printerStatus !== undefined) { + printerStatus = res.printerStatus.message; + ret += ":" + printerStatus; + } + _callback(res); + } else { + _callback(msg.data); + } + }; + + var onClose = function (msg) { + if (!_connectedsocket) { + _callback("Cannot connect to server"); + } + _websocket.close(); + _connectedsocket = false; + wsPrint = null; + }; + + var webSocketInit = function (uri) { + _websocket = new WebSocket(uri); + _websocket.binaryType = "arraybuffer"; + _websocket.onopen = function (event) { + console.log("open : " + uri); + }; + _websocket.onerror = function (event) { + wsPrint = null; + if (_websocket.readyState == 3) { + _callback("Cannot connect to server"); + } + }; + _websocket.onmessage = function (msg) { + onMessage(msg); + }; + _websocket.onclose = function (msg) { + onClose(msg); + }; + }; + + webSocketInit(serverURL + strPrinterName + _request); + + this.send = function (data) { + const sendData = () => { + for (let i = 0; i < data.length; i += CHUNK_SIZE) { + const chunk = data.slice(i, i + CHUNK_SIZE); + _websocket.send(chunk); + } + }; + + if (_websocket.readyState === WebSocket.OPEN) { + sendData(); + } else if (_websocket.readyState === WebSocket.CONNECTING) { + const originalOnOpen = _websocket.onopen; + _websocket.onopen = function(event) { + if (originalOnOpen) originalOnOpen(event); + sendData(); + _connectedsocket = true; + }; + } + }; + + this.disconnect = function () { + if (_websocket && _websocket.readyState === WebSocket.OPEN) { + console.log("Closing WebSocket connection..."); + _websocket.close(); + } + }; +}; + +const WebSocketGetPrinterList = function (serverURL, callback) { + var _websocket; + var _callback = callback; + var _connectedsocket = false; + + var onMessage = function (msg) { + if (_websocket.readyState == 1) { + var res = JSON.parse(msg.data); + _callback(res); + } else { + a; + _callback(msg.data); + } + }; + + var onClose = function (msg) { + if (!_connectedsocket) { + _callback("Cannot connect to server"); + } + _websocket.close(); + _connectedsocket = false; + wsGetPrinterList = null; + }; + + var webSocketInit = function (uri) { + _websocket = new WebSocket(uri); + _websocket.onopen = function (event) { + console.log("open : " + uri); + }; + _websocket.onerror = function (event) { + wsGetPrinterList = null; + if (_websocket.readyState == 3) { + _callback("Cannot connect to server"); + } + }; + _websocket.onmessage = function (msg) { + onMessage(msg); + }; + _websocket.onclose = function (msg) { + console.log("WebSocket connection closed"); + onClose(msg); + }; + }; + + webSocketInit(serverURL); + + this.send = function (strSubmit) { + if (_websocket.readyState == 1) { + _websocket.send(strSubmit); + } else { + _websocket.onopen = function () { + if (_websocket.readyState == 1) { + _websocket.send(strSubmit); + _connectedsocket = true; + } + }; + } + }; +}; + +function setPort(serverPort) { + port = serverPort; +} + +function getServerURL() { + var localAddress = `//127.0.0.1:${port}/WebSDK/`; + var serverURL = connectionMode + localAddress; + return { + url: serverURL, + }; +} + +function setConnectionMode(mode) { + connectionMode = mode; +} + +function requestPrint(strPrinterName, strSubmit, _callback) { + _callback(""); + var serverURL = getServerURL().url; + console.log(serverURL); + + if (wsPrint == null) + wsPrint = new WebSocketPrint(serverURL, strPrinterName, "", _callback); + const encoder = new TextEncoder(); + const bytesSubmit = encoder.encode(strSubmit); + wsPrint.send(bytesSubmit); +} + +function getPrinterList(category, _callback) { + var serverURL = getServerURL().url + "getPrinterList"; + if (wsGetPrinterList == null) { + wsGetPrinterList = new WebSocketGetPrinterList(serverURL, _callback); + } + wsGetPrinterList.send(JSON.stringify(category)); +} + +export { + setPort, + getServerURL, + setConnectionMode, + requestPrint, + getPrinterList, + wsPrint, + WebSocketPrint, + WebSocketGetPrinterList +} diff --git a/src/utils/printer/WebSDK.js b/src/utils/printer/WebSDK.js new file mode 100644 index 00000000..b3e0ea4a --- /dev/null +++ b/src/utils/printer/WebSDK.js @@ -0,0 +1 @@ +export var WebSDK=function(t){"use strict";class e{constructor(t){this.functionData={id:0,commandType:t,hasReadFunc:!1,functions:{}},this.func={},this.num=0,this.hasReadFunc=!1}getData(){return this.functionData.functions=this.func,this.functionData.hasReadFunc=this.hasReadFunc,this.func={},this.num=0,this.hasReadFunc=!1,JSON.stringify(this.functionData)}setId(t){return this.functionData.id=t,this}_addFunction(t,e,i=!1){return this.func["func"+this.num]={[t]:e},this.num++,this.hasReadFunc||=i,this}directPrintText(t){return this._addFunction("directPrintText",[t]),this}directPrintHex(t){return this._addFunction("directPrintHex",[t]),this}setEncoding(t="gbk"){return this._addFunction("setEncoding",[t]),this}}const i=Object.freeze({CODE_128:"128",CODE_128M:"128M",CODE_EAN128:"EAN128",CODE_25:"25",CODE_25C:"25C",CODE_39:"39",CODE_39C:"39C",CODE_93:"93",CODE_EAN13:"EAN13",CODE_EAN13_2:"EAN13+2",CODE_EAN13_5:"EAN13+5",CODE_EAN8:"EAN8",CODE_EAN8_2:"EAN8+2",CODE_EAN8_5:"EAN8+5",CODE_CODA:"CODA",CODE_POST:"POST",CODE_UPCA:"UPCA",CODE_UPCA_2:"UPCA+2",CODE_UPCA_5:"UPCA+5",CODE_UPCE:"UPCE",CODE_UPCE_2:"UPCE+2",CODE_UPCE_5:"UPCE+5",CODE_CPOST:"CPOST",CODE_MSI:"MSI",CODE_MSIC:"MSIC",CODE_PLESSEY:"PLESSEY",CODE_ITF14:"ITF14",CODE_EAN14:"EAN14",CODE_11:"11",CODE_TELEPEN:"TELEPEN",CODE_TELEPENN:"TELEPENN",CODE_PLANET:"PLANET",CODE_CODE49:"CODE49",CODE_DPI:"DPI",CODE_DPL:"DPL"}),n=Object.freeze({L:"L",M:"M",Q:"Q",H:"H"}),r=Object.freeze({ROTATION_0:0,ROTATION_90:90,ROTATION_180:180,ROTATION_270:270}),a=Object.freeze({LEFT:1,CENTER:2,RIGHT:3}),d=Object.freeze({NONE:0,LEFT:1,CENTER:2,RIGHT:3}),s=Object.freeze({FNT_8_12:"1",FNT_12_20:"2",FNT_16_24:"3",FNT_24_32:"4",FNT_32_48:"5",FNT_14_19:"6",FNT_14_25:"7",FNT_21_27:"8",FNT_SIMPLIFIED_CHINESE:"TSS24.BF2",FNT_TRADITIONAL_CHINESE:"TST24.BF2",FNT_KOREAN:"K"}),o=Object.freeze({AUTO:"A",MANUAL:"M"}),h=Object.freeze({M1:"M1",M2:"M2"}),c=Object.freeze({URL:0,BASE64:1,LOCAL_PATH:2}),u=Object.freeze({OVERWRITE:0,OR:1,XOR:2}),_=Object.freeze({BOTTOM:0,TOP:1});var E=Object.freeze({__proto__:null,BarcodeType:i,EccLevel:n,Rotation:r,Alignment:a,Readable:d,FontSize:s,QrCodeMode:o,QrCodeModel:h,ImageSource:c,ImageMode:u,Orientation:_});const C=Object.freeze({LEFT:0,CENTER:1,RIGHT:2}),O=Object.freeze({DEFAULT:0,FONTB:1,BOLD:8,REVERSE:16,UNDERLINE:128,UNDERLINE2:256}),T=Object.freeze({_1WIDTH:0,_2WIDTH:16,_3WIDTH:32,_4WIDTH:48,_5WIDTH:64,_6WIDTH:80,_7WIDTH:96,_8WIDTH:112}),P=Object.freeze({NORMAL:0,WIDTH_DOUBLE:1,HEIGHT_DOUBLE:2,WIDTH_HEIGHT_DOUBLE:3}),l=Object.freeze({UPCA:65,UPCE:66,EAN8:68,EAN13:67,JAN8:68,JAN13:67,ITF:70,Codabar:71,Code39:69,Code93:72,Code128:73}),A=Object.freeze({NONE:0,ABOVE:1,BELOW:2,BOTH:3}),F=Object.freeze({L:48,M:49,Q:50,H:51}),N=Object.freeze({ALL:0,HALF:1}),R=Object.freeze({_58:1,_80:2,_76:3}),I=Object.freeze({TOW:0,FIVE:1}),f=Object.freeze({UNKNOWN:-1,NORMAL:0,COVEROPEN:16,PAPEREMPTY:32,CASH_OPEN:0,CASH_CLOSE:1}),m=Object.freeze({PRINT:1,OFFLINE:2,ERR:3,PAPER:4}),D=Object.freeze({LEFT_TOP:0,LEFT_BOTTOM:1,RIGHT_BOTTOM:2,RIGHT_TOP:3}),g=Object.freeze({URL:0,BASE64:1,LOCAL_PATH:2}),w=Object.freeze({PC437:0,KATAKANA:1,PC850:2,PC860:3,PC863:4,PC865:5,WEST_EUROPE:6,GREEK:7,HEBREW1:8,EAST_EUROPE:9,IRAN:10,WPC1252:16,PC866:17,PC852:18,PC858:19,IranII:20,LATVIAN:21,ARABIC:22,PT1511251:23,PC747:24,WPC1257:25,VIETNAM:27,PC864:28,PC1001:29,UIGUR:30,HEBREW2:31,WPC1255_ISRAEL:32,WPC1256:33,PC861_ICELANDIC:56,PC863_CANADIAN:57,PC865_NORDIC:58,PC866_RUSSIAN:59,PC855_BULGARIAN:60,PC857_TURKEY:61,PC862_HEBREW:62,PC864_ARABIC:63,PC737_GREEK:64,PC851_GREEK:65,PC869_GREEK:66,PC928_GREEK:67,PC772_LITHUANIAN:68,PC774_LITHUANIAN:69,PC874_THAI:70,WPC1252_LATIN_1:71,WPC1250_LATIN_2:72,WPC1251_CYRILLIC:73,PC3840_IBM_RUSSIAN:74,PC3841_GOST:75,PC3843_POLISH:76,PC3844_CS2:77,PC3845_HUNGARIAN:78,PC3846_TURKISH:79,PC3847_BRAZIL_ABNT:80,PC3848_BRAZIL:81,PC1001_ARABIC:82,SIMPLIFIED_CHINESE:256,TRADITIONAL_CHINESE:257,KOREAN:258,JAPANESE:259});var L=Object.freeze({__proto__:null,Alignment:C,FontStyle:O,TextWidth:T,BitmapMode:P,BarcodeType:l,HRILocation:A,QrEcLevel:F,CutMode:N,DeviceType:R,CashDrawerPin:I,PrinterStatus:f,StatusType:m,PrintDirection:D,ImageSource:g,CodePage:w});const y=Object.freeze({Nomal:"N",Invert:"I"}),x=Object.freeze({ROTATION_0:"N",ROTATION_90:"R",ROTATION_180:"I",ROTATION_270:"B"}),S=Object.freeze({URL:0,BASE64:1,LOCAL_PATH:2}),H=Object.freeze({HEX:"H",ASCII:"A"});var B=Object.freeze({__proto__:null,Direction:y,Rotation:x,ImageSource:S,DataFormat:H});return t.EscPosCommand=class extends e{constructor(){super("ESC_POS")}setCodePage(t){return this._addFunction("setCodePage",[t]),this}setDefaultCodePage(t){return this._addFunction("setDefaultCodePage",[t]),this}setDoubleByteMode(t=!0){this._addFunction("setDoubleByteMode",[t])}checkPrinterStatus(){return this._addFunction("checkPrinterStatus",[2]),this}printText(t){const e={data:null,textSize:1,alignment:C.CENTER},{data:i,textSize:n,alignment:r}={...e,...t};return this._addFunction("printText",[i,n,r,0]),this}printBarCode(t){const e={data:null,type:l.Code128,width:3,height:162,alignment:C.CENTER,textPosition:A.NONE},{data:i,type:n,width:r,height:a,alignment:d,textPosition:s}={...e,...t};return this._addFunction("printBarCode",[i,n,r,a,d,s]),this}printQrCode(t){const e={alignment:C.CENTER,size:3,ecLevel:F.L},{data:i,alignment:n,size:r,ecLevel:a}={...e,...t};return this._addFunction("printQrCode",[i,n,r,a]),this}printAndFeed(t=0){return this._addFunction("printAndFeed",[t]),this}printImage(t){const e={type:g.URL,data:"",alignment:C.CENTER,mode:P.NORMAL},{type:i,data:n,alignment:r,mode:a}={...e,...t};return this._addFunction("printImage",[i,n,a,r]),this}printTable(t){return this._addFunction("printTable",[t.titles,t.columnWidths,t.rows]),this}setAlignment(t=0){return this._addFunction("setAlignment",[t]),this}cutPaper(t=1){return this._addFunction("cutPaper",[t]),this}feedAndCut(t=0){return this._addFunction("feedAndCut",[t]),this}cleanBuffer(){return this._addFunction("cleanBuffer",[]),this}},t.PosConst=L,t.TsplCommand=class extends e{constructor(){super("TSPL")}setUnit(t="MM"){return this._addFunction("setUnit",[t]),this}checkPrinterStatus(){return this._addFunction("checkPrinterStatus",[]),this}setPaperSize(t){return this._addFunction("setPaperSize",[t.width,t.height]),this}printBuffer(t=1){return this._addFunction("printBuffer",[t]),this}clearBuffer(){return this._addFunction("clearBuffer",[]),this}setGap(t){const{height:e,offset:i}={height:0,offset:0,...t};return this._addFunction("setGap",[e,i]),this}setSpeed(t=4){return this._addFunction("setSpeed",[t]),this}setDensity(t=8){return this._addFunction("setDensity",[t]),this}setDirection(t){const{orientation:e,isMirror:i}={orientation:1,isMirror:!1,...t};return this._addFunction("setDirection",[e,i]),this}setOffset(t=0){return this._addFunction("setOffset",[t]),this}setReference(t){const{x:e,y:i}={x:0,y:0,...t};return this._addFunction("setReference",[e,i]),this}setFeed(t){return this._addFunction("setFeed",[t]),this}setBackFeed(t){return this._addFunction("setBackFeed",t),this}setFormFeed(){return this._addFunction("setFormFeed",[]),this}setLimitFeed(t=254){return this._addFunction("setLimitFeed",[t]),this}setHome(){return this._addFunction("setHome",[]),this}setCodePage(t){return this._addFunction("setCodePage",[t]),this}setSound(t){const{level:e,interval:i}={level:5,interval:200,...t};return this._addFunction("setSound",[e,i]),this}setCut(){return this._addFunction("setCut",[]),this}setPeel(t=!0){return this._addFunction("setPeel",[t]),this}setTear(t=!0){return this._addFunction("setTear",[t]),this}setBline(t){const{height:e,offset:i}={height:0,offset:0,...t};return this._addFunction("setBline",[e,i]),this}drawText(t){const e={x:8,y:8,font:s.FNT_8_12,rotation:r.ROTATION_0,xRatio:1,yRatio:1,alignment:null,data:null},{x:i,y:n,font:a,rotation:d,xRatio:o,yRatio:h,alignment:c,data:u}={...e,...t};if(!u)throw new Error("Text data is required");return null==c?this._addFunction("drawText",[i,n,a,d,o,h,u]):this._addFunction("drawText",[i,n,a,d,o,h,c,u]),this}drawBox(t){const{x:e,y:i,width:n,height:r,thickness:a,radius:d}={x:8,y:8,width:100,height:100,thickness:4,radius:0,...t};return this._addFunction("drawBox",[e,i,n,r,a,d]),this}drawBar(t){const{x:e,y:i,width:n,height:r}={x:8,y:8,width:100,height:16,...t};return this._addFunction("drawBar",[e,i,n,r]),this}drawBarCode(t){const e={x:8,y:8,codeType:i.CODE_128,height:100,readable:d.LEFT,rotation:r.ROTATION_0,narrow:2,wide:2,alignment:null,data:null},{x:n,y:a,codeType:s,height:o,readable:h,rotation:c,narrow:u,wide:_,alignment:E,data:C}={...e,...t};if(!C)throw new Error("Barcode data is required");return null==E?this._addFunction("drawBarCode",[n,a,s,o,h,c,u,_,C]):this._addFunction("drawBarCode",[n,a,s,o,h,c,u,_,E,C]),this}drawQrCode(t){const e={x:8,y:8,ecLevel:n.L,cellWidth:5,mode:o.AUTO,rotation:r.ROTATION_0,model:h.M1,mask:7,data:null},{x:i,y:a,ecLevel:d,cellWidth:s,mode:c,rotation:u,model:_,mask:E,data:C}={...e,...t};return this._addFunction("drawQrCode",[i,a,d,s,c,u,_,E,C]),this}drawImage(t){const e={x:8,y:8,mode:u.OVERWRITE,width:100,type:c.URL,data:null},{x:i,y:n,mode:r,width:a,type:d,data:s}={...e,...t};return this._addFunction("drawImage",[i,n,r,a,d,s]),this}drawErase(t){const{x:e,y:i,width:n,height:r}={x:8,y:8,width:100,height:100,...t};return this._addFunction("drawErase",[e,i,n,r]),this}drawReverse(t){const{x:e,y:i,width:n,height:r}={x:8,y:8,width:100,height:100,...t};return this._addFunction("drawReverse",[e,i,n,r]),this}},t.TsplConst=E,t.ZplCommand=class extends e{constructor(){super("ZPL")}commandStart(){return this._addFunction("commandStart",[]),this}commandEnd(){return this._addFunction("commandEnd",[]),this}setCustomFont(t){const{fontName:e,alias:i,codePage:n}={fontName:"",alias:"",codePage:28,...t};return this._addFunction("setCustomFont",[e,i,n]),this}setPrintWidth(t=0){return this._addFunction("setPrintWidth",[t]),this}setPrintCount(t=1){return this._addFunction("setPrintCount",[t]),this}setPaperSize(t=8,e=8){return this._addFunction("setPaperSize",[t,e]),this}setDirection(t=y.Nomal){return this._addFunction("setDirection",[t]),this}setBlackMakOffset(t=0){return this._addFunction("setBlackMakOffset",[t]),this}setReference(t=0,e=0){return this._addFunction("setReference",[t,e]),this}setBarcodeDefault(t){const{modWidth:e,ratio:i,height:n}={modWidth:2,ratio:3,height:10,...t};return this._addFunction("setBarcodeDefault",[e,i,n]),this}drawText(t){const e={x:8,y:8,font:"A",rotation:x.ROTATION_0,sizeW:10,sizeH:10,data:null},{x:i,y:n,font:r,rotation:a,sizeW:d,sizeH:s,data:o}={...e,...t};return this._addFunction("drawText",[i,n,r,a,d,s,o]),this}drawReverse(t){const{x:e,y:i,width:n,height:r,radius:a}={x:8,y:8,width:100,height:100,radius:0,...t};return this._addFunction("drawReverse",[e,i,n,r,a]),this}drawBox(t){const{x:e,y:i,width:n,height:r,thickness:a,radius:d}={x:8,y:8,width:100,height:100,thickness:1,radius:0,...t};return this._addFunction("drawBox",[e,i,n,r,d,a]),this}drawQrCode(t){const{x:e,y:i,size:n,data:r}={x:8,y:8,size:2,data:null,...t};return this._addFunction("drawQrCode",[e,i,n,r]),this}drawCode39(t){const e={x:8,y:8,rotation:x.ROTATION_0,checksum:!1,height:80,hri:!0,aboveHri:!1,data:null},{x:i,y:n,rotation:r,checksum:a,height:d,hri:s,aboveHri:o,data:h}={...e,...t};return this._addFunction("drawCode39",[i,n,r,a,d,s,o,h]),this}drawCode93(t){const e={x:8,y:8,rotation:x.ROTATION_0,checksum:!1,height:80,hri:!0,aboveHri:!1,data:null},{x:i,y:n,rotation:r,checksum:a,height:d,hri:s,aboveHri:o,data:h}={...e,...t};return this._addFunction("drawCode93",[i,n,r,d,s,o,a,h]),this}drawCode128(t){const e={x:8,y:8,rotation:x.ROTATION_0,checksum:!1,height:80,hri:!0,aboveHri:!1,mode:"N",data:null},{x:i,y:n,rotation:r,checksum:a,height:d,hri:s,aboveHri:o,mode:h,data:c}={...e,...t};return this._addFunction("drawCode128",[i,n,r,d,s,o,a,h,c]),this}drawEan8(t){const e={x:8,y:8,rotation:x.ROTATION_0,height:80,hri:!0,aboveHri:!1,data:null},{x:i,y:n,rotation:r,height:a,hri:d,aboveHri:s,data:o}={...e,...t};return this._addFunction("drawEan8",[i,n,r,a,d,s,o]),this}drawEan13(t){const e={x:8,y:8,rotation:x.ROTATION_0,height:80,hri:!0,aboveHri:!1,data:null},{x:i,y:n,rotation:r,height:a,hri:d,aboveHri:s,data:o}={...e,...t};return this._addFunction("drawEan13",[i,n,r,a,d,s,o]),this}drawUpcE(t){const e={x:8,y:8,rotation:x.ROTATION_0,height:80,hri:!0,aboveHri:!1,checksum:!1,data:null},{x:i,y:n,rotation:r,height:a,hri:d,aboveHri:s,checksum:o,data:h}={...e,...t};return this._addFunction("drawUpcE",[i,n,r,a,d,s,o,h]),this}drawUpcA(t){const e={x:8,y:8,rotation:x.ROTATION_0,height:80,hri:!0,aboveHri:!1,checksum:!1,data:null},{x:i,y:n,rotation:r,height:a,hri:d,aboveHri:s,checksum:o,data:h}={...e,...t};return this._addFunction("drawUpcA",[i,n,r,a,d,s,o,h]),this}drawPdf417(t){const e={x:8,y:8,rotation:x.ROTATION_0,height:80,secureLevel:0,col:1,row:1,showIndicator:!1,data:null},{x:i,y:n,rotation:r,height:a,secureLevel:d,col:s,row:o,showIndicator:h,data:c}={...e,...t};return this._addFunction("drawPdf417",[i,n,r,a,d,s,o,h,c]),this}drawMicroPdf417(t){const e={x:8,y:8,rotation:x.ROTATION_0,height:80,mode:0,data:null},{x:i,y:n,rotation:r,height:a,mode:d,data:s}={...e,...t};return this._addFunction("drawMicroPdf417",[i,n,r,a,d,s]),this}drawImage(t){const e={x:8,y:8,width:100,type:S.URL,data:null},{x:i,y:n,width:r,type:a,data:d}={...e,...t};return this._addFunction("drawImage",[i,n,r,a,d]),this}calibrateRfidTag(){return this._addFunction("calibrateRfidTag",[]),this}setRfid(t){const{writePower:e,readPower:i,tagType:n,position:r,errLength:a,errRepeat:d}={writePower:12,readPower:13,tagType:8,position:25,errLength:50,errRepeat:1,...t};return this._addFunction("setRfid",[e,i,n,r,a,d]),this}writeToRfid(t){const e={format:H.HEX,start:2,size:0,memoryBlock:"E",data:null},{format:i,start:n,size:r,memoryBlock:a,data:d}={...e,...t};return d.length%2!=0&&(d+="0"),this._addFunction("writeToRfid",[i,n,r,a,d]),this}readFromRfid(t){const{format:e,start:i,size:n,memoryBlock:r}={format:"H",start:2,size:8,memoryBlock:"1",...t};return this._addFunction("readFromRfid",[e,i,n,r],!0),this}},t.ZplConst=B,Object.defineProperty(t,"__esModule",{value:!0}),t}({}); diff --git a/src/views/canteen/order/reserveManagement/index.vue b/src/views/canteen/order/reserveManagement/index.vue index 63dc09fa..0aa0f9e6 100644 --- a/src/views/canteen/order/reserveManagement/index.vue +++ b/src/views/canteen/order/reserveManagement/index.vue @@ -2,106 +2,131 @@
- - + + - + - + - + - - - - - - - + + + + + + + - - + value:'id',label:'label' + }" clearable collapse-tags @change="handleAreaChange" + > + - - - + + + - - - - + + + + - - - + + + - - + - - - + value:'id',label:'label' + }" clearable collapse-tags + > + + + + + + + + + + + + + 搜索 @@ -110,25 +135,36 @@ - - 批量核销 - - - 批量退单 - - - - + + - -