对接支付优惠

This commit is contained in:
gyq
2025-03-11 09:10:49 +08:00
parent 5cf2355d28
commit 3df0cce9ec
31 changed files with 1527 additions and 846 deletions

View File

@@ -23,11 +23,7 @@
<div class="item">小计</div>
</div>
<div class="table_content">
<div
class="table_row"
v-for="item in orderInfo.cartList"
:key="item.id"
>
<div class="table_row" v-for="item in orderInfo.cartList" :key="item.id">
<div v-if="item.productType == 'package'">
<div class="flex">
<div class="item">
@@ -37,11 +33,7 @@
{{ formatDecimal(item.payAmount) }}
</div>
</div>
<div
class="flex"
v-for="val in item.proGroupInfo"
:key="val.proId"
>
<div class="flex" v-for="val in item.proGroupInfo" :key="val.proId">
<div class="item">>{{ val.proName }}</div>
<div class="item">0.00</div>
<div class="item">{{ val.number }}</div>
@@ -84,21 +76,12 @@
<template #footer>
<div class="drawer_footer">
<div class="btn">
<el-button
style="width: 100%"
:loading="printLoading"
@click="printHandle('label')"
>
<el-button style="width: 100%" :loading="printLoading" @click="printHandle('label')">
打印标签
</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')">
打印小票
</el-button>
</div>
@@ -111,13 +94,11 @@
import { ref } from "vue";
import { usePrint } from "@/store/print.js";
import { useUser } from "@/store/user.js";
import { getOrderById } from "@/api/order.js";
import {
formatDecimal,
getOrderByIdAjax,
commOrderPrintData,
} from "@/utils/index.js";
import dayjs from "dayjs";
const userStore = useUser();
const printStore = usePrint();
@@ -135,6 +116,10 @@ function printHandle(type) {
// 打印订单小票
printStore.pushReceiptData(commOrderPrintData(orderInfo.value));
break;
case "label":
// 打印标签小票
printStore.labelPrint(commOrderPrintData(orderInfo.value));
break;
default:
break;
}
@@ -164,52 +149,66 @@ defineExpose({
padding-top: 20px;
padding-bottom: 50px;
color: #333;
.header {
font-size: 24px;
}
.center {
display: flex;
justify-content: center;
}
.line {
margin: 14px 0;
border-bottom: 1px dashed #666;
}
.blod {
font-size: 20px;
font-weight: bold;
}
.row {
margin-top: 4px;
font-size: 14px;
}
.between {
display: flex;
justify-content: space-between;
}
.table {
--itemWidth: 45px;
.flex {
display: flex;
margin-top: 2px;
}
.item {
&:nth-child(1) {
flex: 1;
}
&:nth-child(2) {
width: var(--itemWidth);
}
&:nth-child(3) {
width: var(--itemWidth);
}
&:nth-child(4) {
width: var(--itemWidth);
}
}
.table_head {
display: flex;
}
.table_row {
margin-top: 8px;
}