优化订单无法再次打印的问题
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "vite-electron",
|
||||
"private": true,
|
||||
"version": "2.0.29",
|
||||
"version": "2.0.30",
|
||||
"main": "dist-electron/main.js",
|
||||
"scripts": {
|
||||
"dev": "chcp 65001 && vite",
|
||||
|
||||
@@ -448,7 +448,7 @@ async function payTypeChange(index, item) {
|
||||
SelectVipUserRef.value.show()
|
||||
}
|
||||
}
|
||||
if (item.payType == "arrears") {
|
||||
if (item.payType == "virtual") {
|
||||
// 挂账支付
|
||||
showBuyerHandle();
|
||||
}
|
||||
@@ -540,7 +540,7 @@ async function confirmOrder(t = 1) {
|
||||
upadatePayData()
|
||||
|
||||
payType.value = payList.value[payActive.value].payType
|
||||
if (payList.value[payActive.value].payType == "arrears") {
|
||||
if (payList.value[payActive.value].payType == "virtual") {
|
||||
showBuyerHandle();
|
||||
return
|
||||
} else if (payList.value[payActive.value].payType == "scanCode") {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-drawer v-model="showDrawer" direction="rtl" size="300px">
|
||||
<el-drawer v-model="showDrawer" direction="rtl" size="500px">
|
||||
<template #header>
|
||||
<h4>订单打印</h4>
|
||||
</template>
|
||||
@@ -80,8 +80,13 @@
|
||||
</el-button>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -111,21 +116,15 @@ const loading = ref(false);
|
||||
const printLoading = ref(false);
|
||||
|
||||
// 打印操作
|
||||
async function printHandle(type) {
|
||||
async function printHandle(type, t = null) {
|
||||
try {
|
||||
printLoading.value = true;
|
||||
switch (type) {
|
||||
case "normal":
|
||||
// 打印订单小票
|
||||
if (printStore.deviceNoteList.length) {
|
||||
printStore.ORDER(commOrderPrintData(originOrderInfo.value));
|
||||
} else {
|
||||
await orderPrint({
|
||||
id: orderInfo.value.id,
|
||||
type: 0 // 0结算单 1预结算单 2退款单
|
||||
})
|
||||
ElMessage.success('云打印小票成功')
|
||||
}
|
||||
await orderPrint({
|
||||
id: orderInfo.value.id,
|
||||
type: t // 1 预结算单 2结算单 3厨房单
|
||||
})
|
||||
break;
|
||||
case "label":
|
||||
// 打印标签小票
|
||||
|
||||
Reference in New Issue
Block a user