Commit 0f41cc1d authored by 沈翠玲's avatar 沈翠玲

生产工单添加取消组合和取消编排按钮

parent c51b29e8
......@@ -126,12 +126,21 @@
v-hasPermi="['pro:combination:add']">订单组合
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-edit" size="mini" @click="()=>handleCombination('del')"
>取消组合
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="multiple" @click="handleArrange"
v-hasPermi="['mes:pro:workorder:dofinish']">生产编排
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-edit" size="mini" @click="()=>handleArrange('del')"
>取消编排
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleMake"
v-hasPermi="['mes:pro:workorder:make']">生产补单
......@@ -566,7 +575,6 @@ import {
doCheckToolNum,
closeWorkorder
} from "@/api/mes/pro/workorder";
import { addProtaskList } from "@/api/mes/pro/protask";
import Workorderbom from "./bom/bom.vue";
......@@ -578,9 +586,9 @@ import { genCode } from "@/api/system/autocode/rule";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getToken } from "@/utils/auth";
import { addCombination, batchAddCombination } from "@/api/mes/pro/combination";
import { addCombination, batchAddCombination, delCombination } from "@/api/mes/pro/combination";
import CombinationInfos from "@/views/mes/pro/combination/infos.vue";
import { batchAddArrange } from "@/api/mes/pro/arrange";
import { batchAddArrange, delArrange } from "@/api/mes/pro/arrange";
import ArrangeInfo from "@/views/mes/pro/arrange/info.vue";
import CommandList from "./commandList.vue";
import dayjs from 'dayjs';
......@@ -821,7 +829,17 @@ export default {
}
this.arrangeCode = arrangeCode;
},
async handleArrange() {
async handleArrange(type) {
if(type === 'del') {
if(this.ids.length === 0) return this.$message.warning('请勾选要取消编排的工单')
this.$modal.confirm('确认取消编排?').then(() => {
return delArrange(this.ids)//执行报工
}).then(() => {
this.getList();
this.$modal.msgSuccess("取消成功");
}).catch(() => {});
return
}
// status: "COMBINED"
let params = []
// for(const item in this.selectedRows){
......@@ -857,7 +875,17 @@ export default {
this.getList();
});
},
async handleCombination() {
async handleCombination(type) {
if(type === 'del') {
if(this.ids.length === 0) return this.$message.warning('请勾选要取消组合的工单')
this.$modal.confirm('确认取消组合?').then(() => {
return delCombination(this.ids)//执行报工
}).then(() => {
this.getList();
this.$modal.msgSuccess("取消成功");
}).catch(() => {});
return
}
let params = []
let hasNonEmptyCombination = false;
this.selectedRows.every((item, index) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment