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

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

parent c51b29e8
...@@ -126,12 +126,21 @@ ...@@ -126,12 +126,21 @@
v-hasPermi="['pro:combination:add']">订单组合 v-hasPermi="['pro:combination:add']">订单组合
</el-button> </el-button>
</el-col> </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-col :span="1.5">
<el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="multiple" @click="handleArrange" <el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="multiple" @click="handleArrange"
v-hasPermi="['mes:pro:workorder:dofinish']">生产编排 v-hasPermi="['mes:pro:workorder:dofinish']">生产编排
</el-button> </el-button>
</el-col> </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-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleMake" <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleMake"
v-hasPermi="['mes:pro:workorder:make']">生产补单 v-hasPermi="['mes:pro:workorder:make']">生产补单
...@@ -566,7 +575,6 @@ import { ...@@ -566,7 +575,6 @@ import {
doCheckToolNum, doCheckToolNum,
closeWorkorder closeWorkorder
} from "@/api/mes/pro/workorder"; } from "@/api/mes/pro/workorder";
import { addProtaskList } from "@/api/mes/pro/protask"; import { addProtaskList } from "@/api/mes/pro/protask";
import Workorderbom from "./bom/bom.vue"; import Workorderbom from "./bom/bom.vue";
...@@ -578,9 +586,9 @@ import { genCode } from "@/api/system/autocode/rule"; ...@@ -578,9 +586,9 @@ import { genCode } from "@/api/system/autocode/rule";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getToken } from "@/utils/auth"; 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 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 ArrangeInfo from "@/views/mes/pro/arrange/info.vue";
import CommandList from "./commandList.vue"; import CommandList from "./commandList.vue";
import dayjs from 'dayjs'; import dayjs from 'dayjs';
...@@ -821,7 +829,17 @@ export default { ...@@ -821,7 +829,17 @@ export default {
} }
this.arrangeCode = arrangeCode; 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" // status: "COMBINED"
let params = [] let params = []
// for(const item in this.selectedRows){ // for(const item in this.selectedRows){
...@@ -857,7 +875,17 @@ export default { ...@@ -857,7 +875,17 @@ export default {
this.getList(); 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 params = []
let hasNonEmptyCombination = false; let hasNonEmptyCombination = false;
this.selectedRows.every((item, index) => { 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