领料流程修改
This commit is contained in:
parent
47c9d3b46b
commit
a9ae52222b
@ -55,6 +55,13 @@
|
|||||||
|
|
||||||
<uni-popup ref="popup" background-color="#fff">
|
<uni-popup ref="popup" background-color="#fff">
|
||||||
<view class="popup-content" style="padding: 15px;">
|
<view class="popup-content" style="padding: 15px;">
|
||||||
|
<view class="dl-avatar-box">
|
||||||
|
<uni-section title="领料人" type="line">
|
||||||
|
<view class="uni-px-5 uni-pb-5">
|
||||||
|
<uni-data-checkbox multiple v-model="chooseStaff" :localdata="staffs"></uni-data-checkbox>
|
||||||
|
</view>
|
||||||
|
</uni-section>
|
||||||
|
</view>
|
||||||
<view class="dl-avatar-box">
|
<view class="dl-avatar-box">
|
||||||
<uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile"
|
<uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile"
|
||||||
limit="9" title="请上传配件申请单照片(最多选择9张图片)"></uni-file-picker>
|
limit="9" title="请上传配件申请单照片(最多选择9张图片)"></uni-file-picker>
|
||||||
@ -93,6 +100,10 @@ export default {
|
|||||||
selectRows: [],
|
selectRows: [],
|
||||||
fileList: [],
|
fileList: [],
|
||||||
sizeType: ['compressed'],
|
sizeType: ['compressed'],
|
||||||
|
chooseStaff: [],
|
||||||
|
staffs: [],
|
||||||
|
ticketId: null,
|
||||||
|
nowStaffId: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(data) {
|
onLoad(data) {
|
||||||
@ -100,6 +111,8 @@ export default {
|
|||||||
this.formData = getJSONData("applyWaresForm")
|
this.formData = getJSONData("applyWaresForm")
|
||||||
this.isReceive = this.formData.isReceive
|
this.isReceive = this.formData.isReceive
|
||||||
this.twId = this.formData.id
|
this.twId = this.formData.id
|
||||||
|
this.ticketId = this.formData.ticketId
|
||||||
|
this.nowStaffId = this.formData.repairId
|
||||||
this.init()
|
this.init()
|
||||||
}
|
}
|
||||||
if (data.isToBeReviewed) {
|
if (data.isToBeReviewed) {
|
||||||
@ -109,7 +122,7 @@ export default {
|
|||||||
|
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
submitBefore(){
|
async submitBefore(){
|
||||||
if (this.isReceive){
|
if (this.isReceive){
|
||||||
if (!this.selectRows || this.selectRows.length === 0){
|
if (!this.selectRows || this.selectRows.length === 0){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -118,7 +131,21 @@ export default {
|
|||||||
})
|
})
|
||||||
return
|
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()
|
this.$refs.popup.open()
|
||||||
|
})
|
||||||
}else {
|
}else {
|
||||||
this.submit()
|
this.submit()
|
||||||
}
|
}
|
||||||
@ -288,6 +315,14 @@ export default {
|
|||||||
return item.path.replace(config.baseImageUrl, "")
|
return item.path.replace(config.baseImageUrl, "")
|
||||||
}).join(",")
|
}).join(",")
|
||||||
}
|
}
|
||||||
|
if (this.isReceive && (!this.chooseStaff || this.chooseStaff.length === 0)){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择领料人!',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.formData.repairSo.userIds = this.chooseStaff.join(",")
|
||||||
request({
|
request({
|
||||||
url: '/admin-api/repair/tw/pass',
|
url: '/admin-api/repair/tw/pass',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user