修改订单详情切换用户时,将之前的userId字段改为memberId字段
This commit is contained in:
@@ -221,7 +221,7 @@
|
||||
if(!canJieZhang){
|
||||
return
|
||||
}
|
||||
const userId=orderDetail.info.userId||''
|
||||
const memberId=orderDetail.info.memberId||''
|
||||
clearEmit()
|
||||
go.to('PAGES_ORDER_PAY', {
|
||||
tableId: options.tableId|| orderDetail.info.tableId,
|
||||
@@ -229,7 +229,7 @@
|
||||
masterId: options.masterId,
|
||||
orderId: orderDetail.info.id,
|
||||
discount: 1,
|
||||
userId
|
||||
memberId
|
||||
})
|
||||
}
|
||||
|
||||
@@ -243,8 +243,8 @@
|
||||
const options = reactive({})
|
||||
async function init() {
|
||||
const res = await orderApi.tbOrderInfoDetail(options.id)
|
||||
if(res.userId){
|
||||
queryAllShopUser({id:res.userId}).then(res=>{
|
||||
if(res.memberId){
|
||||
queryAllShopUser({id:res.memberId}).then(res=>{
|
||||
if(res.content[0]){
|
||||
user.value=res.content[0]
|
||||
}
|
||||
@@ -320,6 +320,7 @@
|
||||
//更新选择用户
|
||||
function setUser(par) {
|
||||
const submitPar = {
|
||||
orderId:options.id||'',
|
||||
masterId: options.masterId,
|
||||
tableId: options.tableId|| orderDetail.info.tableId,
|
||||
vipUserId: user.value.id ? user.value.id : '',
|
||||
|
||||
@@ -42,13 +42,18 @@
|
||||
<view class="u-flex u-row-between u-p-t-30 u-p-b-30 border-bottom">
|
||||
<view class="u-flex">
|
||||
<image class="icon" :src="item.icon" mode=""></image>
|
||||
<text class="u-m-l-10">{{item.payName}}</text>
|
||||
<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'">
|
||||
<text class="u-m-r-4">{{user.telephone||user.nickName}}</text>
|
||||
<text>余额:</text>
|
||||
<text>¥{{user.amount||'0'}}</text>
|
||||
<view>
|
||||
<text>会员:</text>
|
||||
<text class="u-m-r-4">{{user.telephone||user.nickName}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>余额:</text>
|
||||
<text>¥{{user.amount||'0'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<my-radio @click="changePayType(index,item)"
|
||||
:modelValue="index==pays.payTypes.selIndex">
|
||||
@@ -195,7 +200,7 @@
|
||||
type: data.id ? 0 : 1 //0 设置 1 取消
|
||||
}).then(res=>{
|
||||
user.value = data
|
||||
order.userId=data.id
|
||||
order.memberId=data.id
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -286,7 +291,7 @@
|
||||
masterId: order.masterId,
|
||||
orderId: order.id || order.orderId,
|
||||
payType,
|
||||
vipUserId: order.userId,
|
||||
vipUserId: order.memberId,
|
||||
discount: 1,
|
||||
code: ''
|
||||
})
|
||||
@@ -337,11 +342,11 @@
|
||||
})
|
||||
let payCodeUrl = ref('')
|
||||
async function init() {
|
||||
const res = await orderApi.tbOrderInfoDetail(order.orderId)
|
||||
Object.assign(order, res)
|
||||
if (order.userId) {
|
||||
const orderRes = await orderApi.tbOrderInfoDetail(order.orderId)
|
||||
Object.assign(order, orderRes)
|
||||
if (orderRes.memberId) {
|
||||
queryAllShopUser({
|
||||
id: order.userId
|
||||
id: orderRes.memberId
|
||||
}).then(res => {
|
||||
if(res.content[0]){
|
||||
user.value =res.content[0]
|
||||
|
||||
Reference in New Issue
Block a user