修改员工领料、退料

This commit is contained in:
xiaofajia 2024-11-04 15:26:12 +08:00
parent 8cc46e3a28
commit 916bb23ff2
2 changed files with 23 additions and 7 deletions

View File

@ -38,17 +38,17 @@ export function getRepairSoById(id){
} }
// 员工确认领料 // 员工确认领料
export function confirmGet(id){ export function confirmGet(id, image){
return request({ return request({
url: preUrl + "/confirmGet?id=" + id, url: preUrl + "/confirmGet?id=" + id + "&image=" + image,
method: 'get' method: 'get'
}) })
} }
// 员工确认退料 // 员工确认退料
export function confirmBack(id){ export function confirmBack(id, image){
return request({ return request({
url: preUrl + "/confirmBack?id=" + id, url: preUrl + "/confirmBack?id=" + id + "&image=" + image,
method: 'get' method: 'get'
}) })
} }

View File

@ -49,6 +49,15 @@
<el-table-column label="规格" align="center" prop="repairWares.model" /> <el-table-column label="规格" align="center" prop="repairWares.model" />
<el-table-column label="数量" align="center" prop="goodsCount" /> <el-table-column label="数量" align="center" prop="goodsCount" />
</el-table> </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"> <div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleConfirm"> <el-button type="primary" size="small" @click="handleConfirm">
确认 确认
@ -88,7 +97,8 @@ export default {
dialogVisible: false, dialogVisible: false,
items: [], items: [],
dialogLoading: false, dialogLoading: false,
formData:{} formData:{},
image: null
} }
}, },
mounted() { mounted() {
@ -131,15 +141,21 @@ export default {
} }
}, },
async handleConfirm(){ 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){ if (this.type){
try { try {
await confirmGet(this.formData.id) await confirmGet(this.formData.id, this.image)
this.dialogVisible = false this.dialogVisible = false
this.$modal.msgSuccess("操作成功") this.$modal.msgSuccess("操作成功")
await this.getList() await this.getList()
}catch{} }catch{}
}else { }else {
await confirmBack(this.formData.id) await confirmBack(this.formData.id, this.image)
this.dialogVisible = false this.dialogVisible = false
this.$modal.msgSuccess("操作成功") this.$modal.msgSuccess("操作成功")
await this.getList() await this.getList()