新增本地USB打印

This commit is contained in:
gyq
2024-07-29 18:10:01 +08:00
parent 4fb34a4235
commit b2e450fd52
8 changed files with 222 additions and 46 deletions

View File

@@ -1,4 +1,5 @@
import _ from "lodash";
import { dayjs } from "element-plus";
import { defineStore } from "pinia";
import { useUser } from "@/store/user.js";
import { usePrint } from "@/store/print.js";
@@ -96,6 +97,7 @@ export const useSocket = defineStore({
if (!this.orderList.some((el) => el == data.orderInfo.orderNo)) {
// console.log("打印", data);
printStore.labelPrint(data);
printStore.pushReceiptData(data);
this.orderList.push(data.orderInfo.orderNo);
if (this.orderList.length > 30) {
this.orderList.splice(0, 1);