优化订单无法再次打印的问题

This commit is contained in:
gyq
2026-05-13 09:47:40 +08:00
parent 7f05d42d32
commit 97e0df4621
4 changed files with 49 additions and 50 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
{ {
"name": "vite-electron", "name": "vite-electron",
"private": true, "private": true,
"version": "2.0.29", "version": "2.0.30",
"main": "dist-electron/main.js", "main": "dist-electron/main.js",
"scripts": { "scripts": {
"dev": "chcp 65001 && vite", "dev": "chcp 65001 && vite",

View File

@@ -448,7 +448,7 @@ async function payTypeChange(index, item) {
SelectVipUserRef.value.show() SelectVipUserRef.value.show()
} }
} }
if (item.payType == "arrears") { if (item.payType == "virtual") {
// 挂账支付 // 挂账支付
showBuyerHandle(); showBuyerHandle();
} }
@@ -540,7 +540,7 @@ async function confirmOrder(t = 1) {
upadatePayData() upadatePayData()
payType.value = payList.value[payActive.value].payType payType.value = payList.value[payActive.value].payType
if (payList.value[payActive.value].payType == "arrears") { if (payList.value[payActive.value].payType == "virtual") {
showBuyerHandle(); showBuyerHandle();
return return
} else if (payList.value[payActive.value].payType == "scanCode") { } else if (payList.value[payActive.value].payType == "scanCode") {

View File

@@ -1,5 +1,5 @@
<template> <template>
<el-drawer v-model="showDrawer" direction="rtl" size="300px"> <el-drawer v-model="showDrawer" direction="rtl" size="500px">
<template #header> <template #header>
<h4>订单打印</h4> <h4>订单打印</h4>
</template> </template>
@@ -80,8 +80,13 @@
</el-button> </el-button>
</div> </div>
<div class="btn"> <div class="btn">
<el-button type="primary" style="width: 100%" :loading="printLoading" @click="printHandle('normal')"> <el-button type="primary" style="width: 100%" :loading="printLoading" @click="printHandle('normal', 2)">
打印 打印前台
</el-button>
</div>
<div class="btn">
<el-button type="warning" style="width: 100%" :loading="printLoading" @click="printHandle('normal', 3)">
打印厨房票
</el-button> </el-button>
</div> </div>
</div> </div>
@@ -111,21 +116,15 @@ const loading = ref(false);
const printLoading = ref(false); const printLoading = ref(false);
// 打印操作 // 打印操作
async function printHandle(type) { async function printHandle(type, t = null) {
try { try {
printLoading.value = true; printLoading.value = true;
switch (type) { switch (type) {
case "normal": case "normal":
// 打印订单小票
if (printStore.deviceNoteList.length) {
printStore.ORDER(commOrderPrintData(originOrderInfo.value));
} else {
await orderPrint({ await orderPrint({
id: orderInfo.value.id, id: orderInfo.value.id,
type: 0 // 0结算单 1预结算单 2退款 type: t // 1 预结算单 2结算单 3厨房
}) })
ElMessage.success('云打印小票成功')
}
break; break;
case "label": case "label":
// 打印标签小票 // 打印标签小票