|
@ -2,11 +2,10 @@ |
|
|
<view> |
|
|
<view> |
|
|
<navbar title="订单详情" bgColor="#DC2828" color="#fff" leftClick @leftClick="$utils.navigateBack" /> |
|
|
<navbar title="订单详情" bgColor="#DC2828" color="#fff" leftClick @leftClick="$utils.navigateBack" /> |
|
|
|
|
|
|
|
|
<!-- 水洗店 --> |
|
|
|
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<view class="controls"> |
|
|
<view class="controls"> |
|
|
<view class="title"> |
|
|
<view class="title"> |
|
|
<image src="../static/order/icon.png" mode=""></image> |
|
|
|
|
|
|
|
|
<image src="@/static/image/order/icon.png" mode=""></image> |
|
|
服务完成 |
|
|
服务完成 |
|
|
</view> |
|
|
</view> |
|
|
<view class="tips"> |
|
|
<view class="tips"> |
|
@ -36,8 +35,28 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 送货图 --> |
|
|
|
|
|
<view class="" v-if="deliveryPictures.length > 0"> |
|
|
|
|
|
<view class="controls"> |
|
|
|
|
|
<view class="delivery-title"> |
|
|
|
|
|
<view class="flex" style="display: flex; align-items: center;"> |
|
|
|
|
|
<view style="width: 8rpx;height: 30rpx; |
|
|
|
|
|
background: #FD5100;border-radius: 6rpx;" /> |
|
|
|
|
|
<view class="head-title">送货图</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="delivery-images"> |
|
|
|
|
|
<view class="image-item" |
|
|
|
|
|
v-for="(image, index) in deliveryPictures" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
@click="previewImage(image, deliveryPictures)"> |
|
|
|
|
|
<image :src="image.trim()" mode="aspectFill"></image> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 酒店和水洗店 --> |
|
|
|
|
|
<view class="info"> |
|
|
<view class="info"> |
|
|
<view class="flex" style="display: flex;"> |
|
|
<view class="flex" style="display: flex;"> |
|
|
<view style="width: 8rpx;height: 30rpx; |
|
|
<view style="width: 8rpx;height: 30rpx; |
|
@ -230,6 +249,7 @@ export default { |
|
|
], |
|
|
], |
|
|
order: {}, |
|
|
order: {}, |
|
|
id: '', |
|
|
id: '', |
|
|
|
|
|
deliveryPictures: [], |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad(options) { |
|
|
onLoad(options) { |
|
@ -243,12 +263,43 @@ export default { |
|
|
}, res => { |
|
|
}, res => { |
|
|
this.order = res.result; |
|
|
this.order = res.result; |
|
|
this.stepsCurrent = this.order.status; |
|
|
this.stepsCurrent = this.order.status; |
|
|
|
|
|
this.deliveryPictures = this.getAllDeliveryPictures(); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 联系客服 |
|
|
// 联系客服 |
|
|
clickService() { |
|
|
clickService() { |
|
|
this.$refs.customerServicePopup.open(); |
|
|
this.$refs.customerServicePopup.open(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 预览送货图片 |
|
|
|
|
|
previewImage(current, urls) { |
|
|
|
|
|
uni.previewImage({ |
|
|
|
|
|
current: current.trim(), |
|
|
|
|
|
urls: urls.map(url => url.trim()) |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
// 提取所有送货图片(包括主订单和子订单) |
|
|
|
|
|
getAllDeliveryPictures() { |
|
|
|
|
|
let allPictures = []; |
|
|
|
|
|
|
|
|
|
|
|
// 提取主订单的送货图 |
|
|
|
|
|
if (this.order.deliveryPicture) { |
|
|
|
|
|
const mainPictures = this.order.deliveryPicture.split(',').map(pic => pic.trim()).filter(pic => pic); |
|
|
|
|
|
allPictures = allPictures.concat(mainPictures); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 提取所有子订单的送货图 |
|
|
|
|
|
if (this.order.children && Array.isArray(this.order.children)) { |
|
|
|
|
|
this.order.children.forEach(child => { |
|
|
|
|
|
if (child.deliveryPicture) { |
|
|
|
|
|
const childPictures = child.deliveryPicture.split(',').map(pic => pic.trim()).filter(pic => pic); |
|
|
|
|
|
allPictures = allPictures.concat(childPictures); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 去重(如果有重复的图片) |
|
|
|
|
|
return [...new Set(allPictures)]; |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
@ -316,6 +367,36 @@ export default { |
|
|
color: $uni-color; |
|
|
color: $uni-color; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.delivery-title { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
margin-bottom: 20rpx; |
|
|
|
|
|
|
|
|
|
|
|
.head-title { |
|
|
|
|
|
font-family: PingFang SC, PingFang SC-Bold; |
|
|
|
|
|
color: #2f2e2e; |
|
|
|
|
|
line-height: 30rpx; |
|
|
|
|
|
margin-left: 10rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.delivery-images { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
|
gap: 20rpx; |
|
|
|
|
|
|
|
|
|
|
|
.image-item { |
|
|
|
|
|
width: 200rpx; |
|
|
|
|
|
height: 200rpx; |
|
|
|
|
|
border-radius: 10rpx; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
|
|
|
|
image { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.steps { |
|
|
.steps { |
|
|