优化打包、订单云打印

This commit is contained in:
gyq
2025-03-18 17:19:59 +08:00
parent 64f539623f
commit 177d987769
10 changed files with 116 additions and 35 deletions

View File

@@ -119,7 +119,7 @@
<div class="left" v-else></div>
<div class="right">
<el-text>
{{ formatDecimal(goodsStore.cartInfo.total, 2, true) }}
{{ formatDecimal(goodsStore.cartInfo.total || 0, 2, true) }}
</el-text>{{ formatDecimal(goodsStore.cartInfo.totalAmount || 0) }}
</div>
</div>
@@ -269,6 +269,8 @@ async function createOrderHandle(t = 0) {
if (t == 1) {
settleAccountRef.value.show(t)
} else {
goodsStore.clearCart()
}
// 清除购物车,更新历史订单
@@ -317,8 +319,28 @@ function giftPackHandle(key, item) {
const allSelectedHandle = async () => {
if (goodsStore.allSelected) {
goodsStore.allSelected = 0
// 取消订单的全部外带
if (goodsStore.orderList.length) {
await goodsStore.historyOrderAjax(goodsStore.orderListInfo.tableCode)
goodsStore.calcCartInfo()
}
} else {
goodsStore.allSelected = 1
// 回复订单的外带数据
if (goodsStore.orderList.length) {
goodsStore.orderList.map(item => {
item.goods.map(val => {
if (val.goods_type == 'weight') {
val.pack_number = 1
} else {
val.pack_number = val.number
}
})
})
goodsStore.calcCartInfo()
}
}
if (goodsStore.cartList.length) {