From 6aec4340155093adf5b32548687a09469732aa5b Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Fri, 24 Apr 2026 09:30:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96usb=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/store/print.js | 1 + src/views/device/add.vue | 14 +++++++------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 19fdcf6..863bbab 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vite-electron", "private": true, - "version": "2.0.25", + "version": "2.0.27", "main": "dist-electron/main.js", "scripts": { "dev": "chcp 65001 && vite", diff --git a/src/store/print.js b/src/store/print.js index ec3b14d..5cd19bf 100644 --- a/src/store/print.js +++ b/src/store/print.js @@ -130,6 +130,7 @@ export const usePrint = defineStore("print", { // 结算单 async ORDER(data) { try { + console.log('结算单===', data); // 筛选条件:状态启用 + 小票类型 + handoverSwitch=1 + 打印机可用 + 打印服务正常 const validPrinters = this.deviceNoteList.filter(p => { return p.status diff --git a/src/views/device/add.vue b/src/views/device/add.vue index 3ba1ed7..71be9c4 100644 --- a/src/views/device/add.vue +++ b/src/views/device/add.vue @@ -13,7 +13,7 @@ - + @@ -37,10 +37,9 @@
- + - +
@@ -175,6 +174,7 @@ import { usePrint } from "@/store/print.js"; import { printerAdd, printerDetail } from "@/api/account.js"; import classify from "@/components/classify/index.vue"; import { useGoods } from '@/store/goods.js' +import receiptPrint from "@/components/lodop/receiptPrint.js"; const goodsStore = useGoods() const classifyRef = ref(null); @@ -240,7 +240,7 @@ const form = ref({ categoryList: [], // 分类 sort: '', receiptSize: '58mm', // 小票尺寸 58mm 80mm - classifyPrint: '1', // 分类打印 0-所有 1-部分分类 2-部分商品 + classifyPrint: '0', // 分类打印 0-所有 1-部分分类 2-部分商品 printNum: '', // 打印数量 c1m1^2 = 顾客+商家[2张] m1^1 = 商家[1张] c1^1顾客[1张] c2m1^3顾客2+商家1[3张] kitchenPrintMode: 'all', // 打印方式 all-全部打印 normal-仅打印结账单「前台」one-仅打印制作单「厨房」queue-仅打印排队取号 printContentType: [], @@ -308,7 +308,7 @@ function printHandle() { printData.printTime = dayjs().format("YYYY-MM-DD HH:mm:ss"); if (form.value.connectionType === 'USB') { - printStore.pushReceiptData(printData, false); + receiptPrint(printData,) } else if (form.value.connectionType === '局域网') { ipcRenderer.send('ORDER', JSON.stringify({ printerIp: form.value.address, @@ -402,7 +402,7 @@ async function tbPrintMachineDetailAjax(id) { }) console.log(form.value); - + // if (printTypeList.value[1].values.length > 0 && form.value.classifyPrint == 1) { // form.value.classifyPrint = 1