优化打包、订单云打印
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user