更新订单列表详情,更新商品管理,更新代客下单

This commit is contained in:
2024-09-23 17:39:38 +08:00
parent 90e3866524
commit edcf844adb
36 changed files with 5301 additions and 949 deletions

View File

@@ -12,7 +12,7 @@
<view class="item u-m-b-20" v-for="(item,index) in order.info" :key="index">
<view class="u-flex u-col-top">
<view>
<image class="img" :src="item.coverImg" mode=""></image>
<image class="img" :src="item.coverImg||item.productImg" mode=""></image>
</view>
<view class="u-p-l-30 u-flex-1">
<view class="u-flex u-row-between u-col-top">
@@ -21,20 +21,27 @@
<view class="tui" v-if="item.status=='return'">
已退
</view>
<view :class="{'line-th':item.status=='return'}">{{item.name}}</view>
<view :class="{'line-th':item.status=='return'}">{{item.name||item.productName}}</view>
</view>
<view class="u-text-right">
<view>{{item.salePrice}}</view>
<view v-if="item.status=='return'" class="line-th color-666 u-font-24">{{item.salePrice}}</view>
<view class="u-m-t-10 u-font-24">X{{item.number}}</view>
<view>{{item.salePrice||item.price}}</view>
<view v-if="item.status=='return'" class="line-th color-666 u-font-24">{{item.salePrice||item.price}}</view>
<view class="u-m-t-10 u-font-24">X{{item.number||item.num}}</view>
</view>
</view>
</view>
</view>
<view class="u-flex u-row-right gap-20 u-m-t-20" v-if="item.status!='return'">
<!-- <my-button :height="60" color="#333" plain type="cancel" shape="circle">更多操作</my-button> -->
<my-button :width="168" :height="60" plain shape="circle" @tap="tuicai(item,index)">退菜</my-button>
</view>
<template v-if="orderInfo.status=='unpaid'">
<view class="u-flex u-row-right gap-20 u-m-t-20" v-if="item.status!='return'">
<!-- <my-button :height="60" color="#333" plain type="cancel" shape="circle">更多操作</my-button> -->
<my-button :width="168" :height="60" plain shape="circle" @tap="tuicai(item,index)">退菜</my-button>
</view>
</template>
<template v-if="orderInfo.status=='closed'">
<view class="u-flex u-row-right gap-20 u-m-t-20" v-if="item.status!='return'">
<my-button :width="168" :height="60" plain shape="circle" @tap="tuikuan(item,index)">退款</my-button>
</view>
</template>
</view>
</view>
<view class="bg-gray u-p-20 u-m-t-20">
@@ -45,9 +52,15 @@
<view class="u-m-t-40">
<view class="u-flex u-row-between border-bottom u-p-b-20">
<view class="tag no-pay">
未支付
<view>
<template v-if="orderInfo.status=='unpaid'">
<view class="tag no-pay">
未支付
</view>
</template>
</view>
<view>
<text>小计</text>
<text class="font-bold u-font-32">{{allPrice}}</text>
@@ -73,11 +86,21 @@
computed
} from 'vue';
import color from '@/commons/color.js'
const emits=defineEmits(['tuicai'])
const emits=defineEmits(['tuicai','tuikuan','printOrder'])
function tuicai(item,index){
emits('tuicai',item,index)
}
function tuikuan(item,index){
emits('tuikuan',item,index)
}
function printOrder(){
emits('printOrder')
}
const props = defineProps({
orderInfo:{
type: Object,
default: () => {}
},
data: {
type: Array,
default: () => []
@@ -90,7 +113,7 @@
const allPrice = computed(() => {
return props.data.reduce((prve, cur) => {
const curTotal=cur.info.filter(v=>v.isGift !== "true"&& v.status !== "return").reduce((a,b)=>{
return a+b.salePrice * b.number
return a+(b.salePrice||b.price) * (b.number||b.num)
},0)
return prve + curTotal
}, 0).toFixed(2)
@@ -100,15 +123,13 @@
let result = 0
result = props.data.reduce((a, b) => {
const bTotal = b.info.reduce((prve, cur) => {
return prve + cur.number * 1;
return prve + (cur.number||cur.num) * 1;
}, 0);
return a + bTotal
}, 0)
return result
})
function printOrder(){
}
</script>
<style lang="scss" scoped>

View File

@@ -10,15 +10,15 @@
</view>
<view class="u-flex u-row-between u-m-t-20">
<view>桌位号</view>
<view>{{table.name}}</view>
<view>{{table.name||data.tableName}}</view>
</view>
<view class="u-flex u-row-between u-m-t-20">
<view>就餐人数</view>
<view>{{seatFee.totalNumber}}</view>
<view>{{seatFee.number||''}}</view>
</view>
<view class="u-flex u-row-between u-m-t-20">
<view>支付方式</view>
<view></view>
<view>{{data.payType||''}}</view>
</view>
<view class="u-flex u-row-between u-m-t-20">
<view>预约时间</view>

View File

@@ -1,11 +1,12 @@
<template>
<view class="default-box-padding bg-fff border-r-12 u-m-t-20">
<up-steps :dot="true" current="0" direction="column">
<my-step :list="recoders.list"></my-step>
<!-- <up-steps :dot="true" current="0" direction="column">
<up-steps-item title="2024-09-02 09:19" :itemStyle="itemStyle" desc="[东风(id:124413)]使用代客下单提交。(未打印预结单)">
</up-steps-item>
<up-steps-item title="2024-09-02 09:19" desc="[东风(id:124413)]使用代客下单提交。(未打印预结单)">
</up-steps-item>
</up-steps>
</up-steps> -->
</view>
@@ -19,7 +20,14 @@
const itemStyle = reactive({
color: 'rgb(255,0,0)'
})
const recoders = reactive({
list:[
{title:'2024-09-15 112030',content:'[东风(id:124413)]使用代客下单提交。(未打印预结单)'},
{title:'2024-09-15 ',content:'[东风(id:124413)]使用代客下单提交。(未打印预结单)'},
{title:'2024-09-15 ',content:'[东风(id:124413)]使用代客下单提交。(未打印预结单)'}
],
active:0
})
</script>
<style>

View File

@@ -1,6 +1,8 @@
<template>
<view class="u-font-28 default-box-padding u-relative bg-fff border-r-12 u-overflow-hide">
<view class="change u-absolute my-bg-main color-fff left-top" >切换</view>
<template v-if="orderInfo.status=='unpaid'">
<view class="change u-absolute my-bg-main color-fff left-top" @click="chooseUser">切换</view>
</template>
<view class="u-flex u-row-between u-m-t-20 border-bottom u-p-b-20">
<view class="u-flex">
<up-avatar :size="30"></up-avatar>
@@ -27,14 +29,28 @@
</view>
</template>
<script>
<script setup>
import go from '@/commons/utils/go.js'
const props = defineProps({
orderInfo: {
type: Object,
default: () => {}
},
user: {
type: Object,
default: () => {}
}
})
function chooseUser() {
go.to('PAGES_CHOOSE_USER')
}
</script>
<style lang="scss" scoped>
.change{
padding: 4rpx 16rpx;
border-radius: 0 0 16rpx 0;
z-index: 2;
}
.change {
padding: 4rpx 16rpx;
border-radius: 0 0 16rpx 0;
z-index: 2;
}
</style>