退料流程还是按照目前的流程,需要增加双方拍照上传的功能。

This commit is contained in:
xiaofajia 2024-11-25 18:10:13 +08:00
parent c7245d1e69
commit 9210d98ff8

View File

@ -56,7 +56,7 @@
<uni-popup ref="popup" background-color="#fff">
<view class="popup-content" style="padding: 15px;">
<view class="dl-avatar-box">
<uni-section title="领料人" type="line">
<uni-section :title="isReceive ? '领料人' : '退料人'" type="line">
<view class="uni-px-5 uni-pb-5">
<uni-data-checkbox multiple v-model="chooseStaff" :localdata="staffs"></uni-data-checkbox>
</view>
@ -123,32 +123,36 @@ export default {
computed: {},
methods: {
async submitBefore(){
if (this.isReceive){
if (!this.selectRows || this.selectRows.length === 0){
uni.showToast({
title: '请选择配件!',
icon: 'none'
})
return
}
request({
url: '/admin-api/repair/worker/listByTicketId?ticketId=' + this.ticketId,
method: 'get'
}).then(res => {
this.chooseStaff = []
const data = res.data
this.staffs = data.map(item => {
return {
text: item.userName,
value: item.userId
}
})
this.chooseStaff.push(this.nowStaffId)
this.$refs.popup.open()
if (!this.selectRows || this.selectRows.length === 0){
uni.showToast({
title: '请选择配件!',
icon: 'none'
})
}else {
this.submit()
return
}
const flag = this.selectRows.filter(item => item.thisNum > 0)
if (!flag || flag.length === 0) {
uni.showToast({
title: '请设置配件数量!',
icon: 'none'
})
return
}
request({
url: '/admin-api/repair/worker/listByTicketId?ticketId=' + this.ticketId,
method: 'get'
}).then(res => {
this.chooseStaff = []
const data = res.data
this.staffs = data.map(item => {
return {
text: item.userName,
value: item.userId
}
})
this.chooseStaff.push(this.nowStaffId)
this.$refs.popup.open()
})
},
afterRead(file) {
for (let i = 0; i < file.tempFilePaths.length; i++) {
@ -310,14 +314,14 @@ export default {
}
})]
}
if (this.isReceive && this.fileList && this.fileList.length > 0){
if (this.fileList && this.fileList.length > 0){
this.formData.images = this.fileList.map(item => {
return item.path.replace(config.baseImageUrl, "")
}).join(",")
}
if (this.isReceive && (!this.chooseStaff || this.chooseStaff.length === 0)){
if ((!this.chooseStaff || this.chooseStaff.length === 0)){
uni.showToast({
title: '请选择领料人!',
title: `请选择${this.isReceive ? '领' : '退'}料人!`,
icon: 'none'
})
return