This commit is contained in:
aihe 2024-05-27 15:50:41 +08:00
parent ff21084fc0
commit d822296cba

View File

@ -23,14 +23,15 @@
货物图片
</view>
<view style="width: 120rpx;">
<u-button @click="handleCheckDanJu(1)" :plain="true" shape="circle" custom-style="margin: 0 10rpx;height:50rpx;font-size: 28rpx;">
<u-button @click="handleCheckDanJu(modelInfo.billPicSendRmk, 1)" :plain="true" shape="circle" custom-style="margin: 0 10rpx;height:50rpx;font-size: 28rpx;">
查看
</u-button>
</view>
</u-row>
<view>
<view v-if="showHuoPreview">
<u-row>
<u-image @click="handlePreviewDiDan(modelInfo.huoPreviewUrl)" :src="modelInfo.huoPreviewUrl" width="100" height="50" mode="aspectFill"
<u-image v-for="(item, index) in modelInfo.billPicSendRmk"
@click="handlePreviewDiDan(modelInfo.billPicSendRmk, index)" :src="item" width="100" height="50" mode="aspectFill"
custom-style="margin: 20rpx 20rpx 0 0;"
></u-image>
</u-row>
@ -41,14 +42,15 @@
签收底单
</view>
<view style="width: 120rpx;">
<u-button @click="handleCheckDanJu(2)" :plain="true" shape="circle" custom-style="margin: 0 10rpx;height:50rpx;font-size: 28rpx;">
<u-button @click="handleCheckDanJu(modelInfo.billPicDispatchRmk, 2)" :plain="true" shape="circle" custom-style="margin: 0 10rpx;height:50rpx;font-size: 28rpx;">
查看
</u-button>
</view>
</u-row>
<view>
<view v-if="showSignPreview">
<u-row>
<u-image @click="handlePreviewDiDan(modelInfo.signPreviewUrl)" :src="modelInfo.signPreviewUrl" width="100" height="50" mode="aspectFill"
<u-image v-for="(item, index) in modelInfo.billPicDispatchRmk"
@click="handlePreviewDiDan(modelInfo.billPicDispatchRmk, index)" :src="item" width="100" height="50" mode="aspectFill"
custom-style="margin: 20rpx 20rpx 0 0;"
></u-image>
</u-row>
@ -123,7 +125,12 @@
queryOption: {
billCode: '', // 运单id
},
modelInfo: {},
modelInfo: {
billPicSendRmk: [],
billPicDispatchRmk: [],
},
showHuoPreview: false,
showSignPreview: false,
danCheckModal: {
show: false
},
@ -148,20 +155,23 @@
initData() {
},
handleCheckDanJu(type) {
handleCheckDanJu(list, type) {
let url = ''
if(type == 1) {
url = this.modelInfo.huoPreviewUrl = ''
if(list.length == 0) {
this.showToast("暂无数据")
}
if(type == 1) {
this.showHuoPreview = true
}
if(type == 2) {
url = this.modelInfo.signPreviewUrl = ''
this.showSignPreview = true
}
this.handlePreviewDiDan(url)
// this.danCheckModal.show = true
this.handlePreviewDiDan(list, 0)
},
handlePreviewDiDan(url = '') {
handlePreviewDiDan(list, index) {
uni.previewImage({
urls: url?.join?.(",")
urls: list,
current: index
})
},
handleScanValChange: debounce(function(val){
@ -169,8 +179,11 @@
}),
async handleSearch(val) {
let res = await apiService.getOrderDetail({...this.searchParam, _loading: true})
// 通过对象合并才能修改父级 数据
Object.assign(this.modelInfo, res.data || {})
this.modelInfo.billPicSendRmk = this.modelInfo.billPicSendRmk?.split(",") || []
this.modelInfo.billPicDispatchRmk = this.modelInfo.billPicDispatchRmk?.split(",") || []
},
handleSubmitDanCheck() {
this.danCheckModal.show = false