uu
This commit is contained in:
parent
1612af9e41
commit
f6eb2f9bd6
@ -4,7 +4,7 @@
|
|||||||
{{label}}
|
{{label}}
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 120rpx;">
|
<view style="width: 120rpx;">
|
||||||
<u-button @click="handleCheckDanJu(dataList)" :plain="true" shape="circle" custom-style="margin: 0 10rpx;height:50rpx;font-size: 28rpx;">
|
<u-button @click="handleCheckDanJu" :plain="true" shape="circle" custom-style="margin: 0 10rpx;height:50rpx;font-size: 28rpx;">
|
||||||
查看
|
查看
|
||||||
</u-button>
|
</u-button>
|
||||||
</view>
|
</view>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<u-row>
|
<u-row>
|
||||||
<u-image v-for="(item, index) in dataList"
|
<u-image v-for="(item, index) in dataList"
|
||||||
@click="handlePreviewCur(dataList, index)" :src="item" width="100" height="50" mode="aspectFill"
|
@click="handlePreviewCur(index)" :src="item" width="100" height="50" mode="aspectFill"
|
||||||
custom-style="margin: 20rpx 20rpx 0 0;"
|
custom-style="margin: 20rpx 20rpx 0 0;"
|
||||||
></u-image>
|
></u-image>
|
||||||
</u-row>
|
</u-row>
|
||||||
@ -28,6 +28,9 @@
|
|||||||
if(typeof list == 'string') {
|
if(typeof list == 'string') {
|
||||||
list = list.split(",")
|
list = list.split(",")
|
||||||
}
|
}
|
||||||
|
if(!this.canView) {
|
||||||
|
list = []
|
||||||
|
}
|
||||||
return list
|
return list
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -42,6 +45,12 @@
|
|||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
canView: {
|
||||||
|
default () {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
checkViewFun:{}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {}
|
||||||
@ -56,16 +65,23 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handleCheckDanJu(list, type){
|
async handleCheckDanJu(){
|
||||||
let url = ''
|
if(!this.canView) {
|
||||||
if(list.length == 0) {
|
if(this.checkViewFun) {
|
||||||
|
let bl = await this.checkViewFun()
|
||||||
|
if(!bl) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(this.dataList.length == 0) {
|
||||||
return this.showToast("暂无数据")
|
return this.showToast("暂无数据")
|
||||||
}
|
}
|
||||||
this.handlePreviewCur(list, 0)
|
this.handlePreviewCur(this.dataList, 0)
|
||||||
},
|
},
|
||||||
handlePreviewCur(list, index) {
|
handlePreviewCur(index) {
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: list,
|
urls: this.dataList,
|
||||||
current: index
|
current: index
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@ -17,19 +17,19 @@
|
|||||||
<bpd-send-reciever-tmp :value="modelInfo" :showInfoBtn="false" :hideDetail="true"></bpd-send-reciever-tmp>
|
<bpd-send-reciever-tmp :value="modelInfo" :showInfoBtn="false" :hideDetail="true"></bpd-send-reciever-tmp>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="mp-aside">
|
<view class="mp-aside">
|
||||||
<view class="">
|
<!-- <view class="">
|
||||||
<bpd-pic-preview-tmp :list="modelInfo.billPicGoodsRmk" label="货物图片"></bpd-pic-preview-tmp>
|
<bpd-pic-preview-tmp :list="modelInfo.billPicGoodsRmk" label="货物图片"></bpd-pic-preview-tmp>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-30">
|
<view class="mt-30">
|
||||||
<bpd-pic-preview-tmp :list="modelInfo.billPicSendRmk" label="揽收底单图片"></bpd-pic-preview-tmp>
|
<bpd-pic-preview-tmp :list="modelInfo.billPicSendRmk" label="揽收底单图片"></bpd-pic-preview-tmp>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="mt-30">
|
<view class="">
|
||||||
<bpd-pic-preview-tmp :list="modelInfo.billPicDispatchRmk" label="签收底单"></bpd-pic-preview-tmp>
|
<bpd-pic-preview-tmp :list="modelInfo.billPicDispatchRmk" label="签收底单" :canView="canViewImg" :checkViewFun="handleViewImgCheck"></bpd-pic-preview-tmp>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="dt-block">
|
<view class="dt-block">
|
||||||
@ -56,7 +56,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="mt-40">
|
<view class="mt-40">
|
||||||
<u-row justify="center">
|
<u-row justify="center">
|
||||||
<u-code-input v-model="danCheckModal.yanCode" maxlength="4" space="20" fontSize="36" size="80"></u-code-input>
|
<u-code-input v-model="danCheckModal.validCode" maxlength="4" space="20" fontSize="36" size="80"></u-code-input>
|
||||||
</u-row>
|
</u-row>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -97,6 +97,7 @@
|
|||||||
components: { BpdSendRecieverTmp, BpdPicPreviewTmp },
|
components: { BpdSendRecieverTmp, BpdPicPreviewTmp },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
canViewImg: false,
|
||||||
queryOption: {
|
queryOption: {
|
||||||
billCode: '', // 运单id
|
billCode: '', // 运单id
|
||||||
},
|
},
|
||||||
@ -134,12 +135,36 @@
|
|||||||
let res = await apiService.getOrderDetail({...this.searchParam, _loading: true})
|
let res = await apiService.getOrderDetail({...this.searchParam, _loading: true})
|
||||||
// 通过对象合并才能修改父级 数据
|
// 通过对象合并才能修改父级 数据
|
||||||
Object.assign(this.modelInfo, res.data || {})
|
Object.assign(this.modelInfo, res.data || {})
|
||||||
|
// 判断是否有权限查看图片
|
||||||
|
this.canViewImg = this.modelInfo.customerCode == this.$store.getters.userInfo.customerCode
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
this.$refs.lcusRef.initData()
|
this.$refs.lcusRef.initData()
|
||||||
}, 300)
|
}, 300)
|
||||||
},
|
},
|
||||||
|
handleViewImgCheck(){
|
||||||
|
this.danCheckModal.show = true
|
||||||
|
this.danCheckModal.validCode = ''
|
||||||
|
let curPromise = new Promise((resolve)=> {
|
||||||
|
this.danCheckModal.submitResolve = resolve
|
||||||
|
})
|
||||||
|
return curPromise
|
||||||
|
},
|
||||||
handleSubmitDanCheck() {
|
handleSubmitDanCheck() {
|
||||||
this.danCheckModal.show = false
|
let senderPhoneCode = (this.modelInfo.sender?.phone + '').substr(-4);
|
||||||
|
let recieverPhoneCode = (this.modelInfo.reciever?.phone + '').substr(-4)
|
||||||
|
let { validCode } = this.danCheckModal
|
||||||
|
if(validCode == senderPhoneCode || validCode == recieverPhoneCode){
|
||||||
|
this.danCheckModal.show = false
|
||||||
|
this.canViewImg = true
|
||||||
|
this.showLoading()
|
||||||
|
setTimeout(()=> {
|
||||||
|
this.hideLoading()
|
||||||
|
this.danCheckModal.submitResolve(true)
|
||||||
|
}, 1500)
|
||||||
|
} else {
|
||||||
|
this.danCheckModal.validCode = ''
|
||||||
|
this.showToast('验证错误,请检查')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user