版本更新,折扣打印优化

This commit is contained in:
gyq
2024-08-28 09:53:27 +08:00
parent fbfee69b25
commit 3047fe0404
8 changed files with 85 additions and 50 deletions

View File

@@ -15,7 +15,7 @@
</el-icon>
<span class="t">{{ status[props.tableInfo.status] }}</span>
</div>
<div class="cart" v-if="props.tableInfo.status == 'using'">
<div class="cart" v-loading="payLoading" v-if="props.tableInfo.status == 'using'">
<div class="cart_list">
<div class="item" v-for="item in cartList" :key="item.id">
<div class="top">
@@ -32,10 +32,10 @@
</div>
<div class="btn_container">
<div class="btn_wrap">
<el-button type="success" style="width: 100%;" @click="toOrderMeal(1)">加菜</el-button>
<el-button type="success" style="width: 100%;" @click="toOrderMeal(1)">加菜/管理</el-button>
</div>
<div class="btn_wrap">
<el-button type="primary" :loading="payLoading" style="width: 100%;" @click="showPayHandle">结算({{
<el-button type="primary" style="width: 100%;" @click="showPayHandle">结算({{
orderInfo.orderAmount || 0 }})</el-button>
</div>
</div>
@@ -111,24 +111,25 @@ function showPayHandle() {
// 获取订单详情
async function getOrderDetail() {
try {
if (!props.tableInfo.status == 'using') return
payLoading.value = true
const res = await orderDetail({
shopId: store.userInfo.shopId,
id: props.tableInfo.orderId
})
payLoading.value = false
orderInfo.value = res
if (props.tableInfo.orderId) {
payLoading.value = true
const res = await orderDetail({
shopId: store.userInfo.shopId,
id: props.tableInfo.orderId
})
payLoading.value = false
orderInfo.value = res
cartList.value = res.detailList.map(item => {
let obj = {
name: item.productName,
number: item.num,
salePrice: item.price,
skuName: item.productSkuName
}
return obj
})
cartList.value = res.detailList.map(item => {
let obj = {
name: item.productName,
number: item.num,
salePrice: item.price,
skuName: item.productSkuName
}
return obj
})
}
} catch (error) {
payLoading.value = false
console.log(error);