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