修改订单详情订单列表价格展示,增加会员价

This commit is contained in:
2024-11-06 17:37:56 +08:00
parent 80a096cd97
commit f2f5bac39e
8 changed files with 593 additions and 62 deletions

View File

@@ -15,15 +15,31 @@
</view>
<view class="content bg-fff border-r-12">
<view class=" u-p-t-30 u-p-l-26 u-p-r-26 card top u-m-t-30">
<view class="u-flex u-p-l-24 u-p-r-24 border-bottom-dashed u-row-between u-p-b-30">
<view>优惠券</view>
<view class="color-999 u-flex u-col-center">
<text>选择优惠券</text>
<view class="u-flex u-col-center">
<uni-icons type="right" color="#999"></uni-icons>
<view class="border-bottom-dashed u-p-b-30">
<view class="u-flex u-p-l-24 u-p-r-24 u-row-between " @click="toQuan">
<view>优惠券</view>
<view class="color-999 u-flex u-col-center">
<text>选择优惠券</text>
<view class="u-flex u-col-center">
<uni-icons type="right" color="#999"></uni-icons>
</view>
</view>
</view>
<view class="u-m-t-24" v-if="pays.quan.length>0">
<view class="u-flex u-p-l-24 u-p-r-24 u-m-t-24 u-row-between " v-for="(item,index) in pays.quan" :key="index">
<view class="u-flex">
<view class="hui"></view>
<view class="u-m-l-18">{{item.name}}</view>
</view>
<view class="color-red">
{{item.discountAmount}}
</view>
</view>
</view>
</view>
<view class="u-flex u-p-l-24 u-p-r-24 border-bottom u-row-between u-p-t-30 u-p-b-30"
v-if="discount.price&&discount.currentPrice!=order.amount">
<view>服务员改价</view>
@@ -45,7 +61,7 @@
<text class="u-m-l-10 no-wrap">{{item.payName}}</text>
</view>
<view class="u-flex color-999 u-font-24">
<view class="u-m-r-20" v-if="item.payType=='vipPay'">
<view class="u-m-r-20" v-if="item.payType=='vipPay'&&user.id">
<view>
<text>会员</text>
<text class="u-m-r-4">{{user.telephone||user.nickName}}</text>
@@ -130,6 +146,18 @@
import * as orderApi from '@/http/yskApi/order.js'
import infoBox from '@/commons/utils/infoBox.js'
import editDiscount from '@/components/my-components/edit-discount.vue'
function toQuan(){
console.log(order);
if(!order.memberId){
return infoBox.showToast('请先选择会员',0.5).then(()=>{
chooseUser()
})
}
go.to('PAGES_ORDER_QUAN',{
orderId:order.id,
memberId:order.memberId
})
}
async function discountShow(){
const bol=await hasPermission('yun_xu_da_zhe')
if(bol){
@@ -173,7 +201,8 @@
payTypes: {
list: [],
selIndex: 0
}
},
quan:[]
})
function chooseUser() {
@@ -184,9 +213,9 @@
console.log(option);
const submitPar = {
tableId: order.tableId,
orderId:order.id,
masterId: order.masterId,
vipUserId: user.value.id ? user.value.id : '',
orderId:order.id,
type: user.value.id ? 0 : 1 //0 设置 1 取消
}
Object.assign(submitPar, par)
@@ -206,8 +235,17 @@
})
})
}
function watchChooseQuan() {
uni.$off('choose-quan')
uni.$on('choose-quan', (arr) => {
console.log(arr);
pays.quan=arr
})
}
onShow(()=>{
watchChooseuser()
watchChooseQuan()
})
watch(() => pays.selIndex, (newval) => {
@@ -381,6 +419,15 @@
</script>
<style lang="scss" scoped>
$quan-color: #318AFE;
.hui {
// background-color: $quan-color;
background-image: linear-gradient(to right bottom,rgb(254,103,4),rgb(241,50,42));
padding: 4rpx 10rpx;
border-radius: 10rpx;
font-size: 24rpx;
color: #fff;
}
.box-shadow {
box-shadow: 0 0 5px #E5E5E5;
}