Merge branch 'mrr_sj_develop_丁杰_20260413_pricer' of https://gitee.com/qtvbidt/mrr.sj.front into mrr_sj_develop_丁杰_20260413_pricer
This commit is contained in:
commit
0d66d41f15
|
|
@ -377,15 +377,17 @@
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (this.identity == 0) {
|
if (this.identity == 0) {
|
||||||
|
const userSyr = res.data.user_syr || {}; // 避免 null 展开报错
|
||||||
this.orderInfo = res.data ? {
|
this.orderInfo = res.data ? {
|
||||||
...res.data.order,
|
...res.data.order,
|
||||||
...res.data.work_seat,
|
...res.data.work_seat,
|
||||||
...res.data.user_syr,
|
...userSyr,
|
||||||
work_hour_id: res.data.work_seat.id,
|
work_hour_id: res.data.work_seat.id,
|
||||||
order_id: res.data.order.id,
|
order_id: res.data.order.id,
|
||||||
user_sj_id: res.data.user_syr.id,
|
syr_id: userSyr.id, // 用于判断是否有手艺人/顾客信息
|
||||||
} : {};
|
} : {};
|
||||||
} else if (this.identity == 1) {
|
} else if (this.identity == 1) {
|
||||||
|
// 手艺人视角
|
||||||
this.orderInfo = res.data ? {
|
this.orderInfo = res.data ? {
|
||||||
...res.data.order,
|
...res.data.order,
|
||||||
...res.data.work_hour,
|
...res.data.work_hour,
|
||||||
|
|
|
||||||
|
|
@ -411,13 +411,14 @@
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (this.identity == 0) {
|
if (this.identity == 0) {
|
||||||
|
const userSyr = res.data.user_syr || {}; // 避免 null 展开报错
|
||||||
this.orderInfo = res.data ? {
|
this.orderInfo = res.data ? {
|
||||||
...res.data.order,
|
...res.data.order,
|
||||||
...res.data.work_hour,
|
...res.data.work_hour,
|
||||||
...res.data.user_syr,
|
...userSyr, // 有手艺人就展开,没有就是空对象
|
||||||
work_hour_id: res.data.work_hour.id,
|
work_hour_id: res.data.work_hour.id,
|
||||||
order_id: res.data.order.id,
|
order_id: res.data.order.id,
|
||||||
user_sj_id: res.data.user_syr.id,
|
syr_id: userSyr.id, // 手艺人ID(无手艺人时为 undefined)
|
||||||
} : {};
|
} : {};
|
||||||
console.log(this.orderInfo, '----------------------------------')
|
console.log(this.orderInfo, '----------------------------------')
|
||||||
} else if (this.identity == 1) {
|
} else if (this.identity == 1) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue