执行入库按钮

This commit is contained in:
JinLu.Yin 2022-05-23 00:38:56 +08:00
parent 8b61ef8ffd
commit 4ec5d9cc32
2 changed files with 29 additions and 2 deletions

View File

@ -35,6 +35,15 @@ export function updateItemrecpt(data) {
})
}
//执行入库
export function execute(recptId) {
return request({
url: '/mes/wm/itemrecpt/' + recptId,
method: 'put'
})
}
// 删除物料入库单
export function delItemrecpt(recptId) {
return request({

View File

@ -120,6 +120,14 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
v-if="scope.row.status =='PREPARE'"
@click="handleExecute(scope.row)"
v-hasPermi="['mes:wm:itemrecpt:edit']"
>执行入库</el-button>
<el-button
size="mini"
type="text"
@ -149,7 +157,7 @@
/>
<!-- 添加或修改物料入库单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="8">
@ -251,7 +259,7 @@
</template>
<script>
import { listItemrecpt, getItemrecpt, delItemrecpt, addItemrecpt, updateItemrecpt } from "@/api/mes/wm/itemrecpt";
import { listItemrecpt, getItemrecpt, delItemrecpt, addItemrecpt, updateItemrecpt,execute } from "@/api/mes/wm/itemrecpt";
import {getTreeList} from "@/api/mes/wm/warehouse"
import {genCode} from "@/api/system/autocode/rule"
import VendorSelect from "@/components/vendorSelect/single.vue";
@ -454,6 +462,16 @@ export default {
this.optType = "edit";
});
},
//
handleExecute(row){
const recptIds = row.recptId || this.ids;
this.$modal.confirm('确认执行入库?').then(function() {
return execute(recptIds)//
}).then(() => {
this.getList();
this.$modal.msgSuccess("入库成功");
}).catch(() => {});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {