修改员工领料、退料
This commit is contained in:
parent
8cc46e3a28
commit
916bb23ff2
@ -38,17 +38,17 @@ export function getRepairSoById(id){
|
||||
}
|
||||
|
||||
// 员工确认领料
|
||||
export function confirmGet(id){
|
||||
export function confirmGet(id, image){
|
||||
return request({
|
||||
url: preUrl + "/confirmGet?id=" + id,
|
||||
url: preUrl + "/confirmGet?id=" + id + "&image=" + image,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 员工确认退料
|
||||
export function confirmBack(id){
|
||||
export function confirmBack(id, image){
|
||||
return request({
|
||||
url: preUrl + "/confirmBack?id=" + id,
|
||||
url: preUrl + "/confirmBack?id=" + id + "&image=" + image,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -49,6 +49,15 @@
|
||||
<el-table-column label="规格" align="center" prop="repairWares.model" />
|
||||
<el-table-column label="数量" align="center" prop="goodsCount" />
|
||||
</el-table>
|
||||
<el-form style="margin-top: 1rem" :inline="true">
|
||||
<el-row :gutter="1">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="图片" prop="image">
|
||||
<ImageUpload v-model="image" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" size="small" @click="handleConfirm">
|
||||
确认
|
||||
@ -88,7 +97,8 @@ export default {
|
||||
dialogVisible: false,
|
||||
items: [],
|
||||
dialogLoading: false,
|
||||
formData:{}
|
||||
formData:{},
|
||||
image: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -131,15 +141,21 @@ export default {
|
||||
}
|
||||
},
|
||||
async handleConfirm(){
|
||||
if (this.image){
|
||||
const data = this.image.split(",")
|
||||
this.image = data.map(item => {
|
||||
return item.replace(process.env.VUE_APP_FILE_API, "")
|
||||
}).join(",")
|
||||
}
|
||||
if (this.type){
|
||||
try {
|
||||
await confirmGet(this.formData.id)
|
||||
await confirmGet(this.formData.id, this.image)
|
||||
this.dialogVisible = false
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
await this.getList()
|
||||
}catch{}
|
||||
}else {
|
||||
await confirmBack(this.formData.id)
|
||||
await confirmBack(this.formData.id, this.image)
|
||||
this.dialogVisible = false
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
await this.getList()
|
||||
|
Loading…
Reference in New Issue
Block a user