|
@@ -320,18 +320,14 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
orderDetail: {
|
|
|
- async handler(newVal) {
|
|
|
+ handler(newVal) {
|
|
|
this.orderDetailInfo = newVal || {};
|
|
|
- await this.init();
|
|
|
+ this.init();
|
|
|
},
|
|
|
deep: true,
|
|
|
immediate: true
|
|
|
}
|
|
|
},
|
|
|
- // async mounted() {
|
|
|
- // this.orderDetailInfo = await this.orderDetail || {}
|
|
|
- // this.init()
|
|
|
- // },
|
|
|
computed: {
|
|
|
isUpEntRed() {
|
|
|
return this.orderDetailInfo?.redPunchData?.isUpEnt || false
|
|
@@ -388,7 +384,6 @@ export default {
|
|
|
async init() {
|
|
|
this.orderData = this.orderDetailInfo?.orderData || {};
|
|
|
let productData = this.orderDetailInfo?.productData || [];
|
|
|
-
|
|
|
if(productData.length > 0) {
|
|
|
// 使用 Promise.all 来并行处理每个 product 的异步操作
|
|
|
productData = await Promise.all(
|