diff --git a/src/views/mes/wm/inPlan/index.vue b/src/views/mes/wm/inPlan/index.vue index c8c3ffe..102798b 100644 --- a/src/views/mes/wm/inPlan/index.vue +++ b/src/views/mes/wm/inPlan/index.vue @@ -24,53 +24,42 @@ plain icon="el-icon-plus" size="mini" - @click="handleAdd" - v-hasPermi="['wm:PLAN:add']" - >新增 + @click="handleAdd('DBRK')" + >刀柄入库 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 刀片入库 + - - - - - - - - - + 整刀回库 + + + + 拆刀回库 + + + + @@ -145,110 +134,102 @@ /> -
- - - - - - - - - - - - - - - - - - 入库计划明细信息 - - - 添加 - - - - 删除 - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- + + + + + + + + + + + +
+ -
- -
+
@@ -261,6 +242,7 @@ import {listArea} from "@/api/mes/wm/area" import {addWmsInTask} from "@/api/mes/wm/wmsInTask" import WmsInPlanDetailEntityTableCmps from "@/views/mes/wm/inPlan/wmsInPlanDetailEntityTableCmps.vue"; import WmsInPlanKnifeBackFormCmps from "@/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue"; +import plan from "@/views/mes/cal/plan/index.vue"; // 计划编码重复性验证 const planCodeValidator = (rule, value, callback) => { @@ -307,7 +289,7 @@ export default { // 库位列表 areaList: [], // 弹出层标题 - title: "", + dialogTitle: "", // 是否显示弹出层 open: false, // 下发操作对话框 @@ -360,12 +342,7 @@ export default { } }; }, - computed: { - /** 控制弹窗类型 */ - isKnifeBack() { - return this.form.planTypeId == 9 || this.form.planTypeId == 7 || this.form.planTypeId == 15; - } - }, + computed: {}, created() { this.getList(); }, @@ -501,6 +478,7 @@ export default { isDelete: null, planCode: null, planTypeId: null, + planTypeCode: null, wmsInPlanDetailsList: [] }; this.wmsInPlanDetailsList = []; @@ -523,10 +501,25 @@ export default { this.multiple = !selection.length }, /** 新增按钮操作 */ - handleAdd() { + handleAdd(planTypeCode) { this.reset(); - this.open = true; - this.title = "添加入库计划"; + // 填充计划类型 + const filter = this.inPlanTypeList.filter(item => item.code === planTypeCode); + if (filter.length) { + this.form.planTypeId = filter[0].typeId; + this.form.planTypeCode = filter[0].code; + this.form.planTypeName = filter[0].name; + } else { + this.$message.error("系统错误,请联系管理员"); + console.error("计划类型查找失败") + return; + } + if (planTypeCode === "DPRK") { + this.open = true; + } else { + this.knifeBackVisible = true; + } + this.dialogTitle = "新增" + filter[0].name; }, /** 执行按钮操作 */ async handleIssue(row) { @@ -561,6 +554,7 @@ export default { materialId: planForm.materialId, materialCode: material[0].itemCode, planTypeId: planForm.planTypeId, + planTypeCode: planForm.planTypeCode, // 状态为待执行 planInStatus: 0, // 入库计划明细ID @@ -599,7 +593,7 @@ export default { this.form = response.data; this.wmsInPlanDetailsList = response.data.wmsInPlanDetailsList; this.open = true; - this.title = "修改入库计划"; + this.dialogTitle = "修改入库计划"; }); }, /** 提交按钮 */ diff --git a/src/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue b/src/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue index b398ba6..6320f32 100644 --- a/src/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue +++ b/src/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue @@ -40,7 +40,7 @@ export default { }, computed: { title() { - return this.localDataForm.planId ? "修改入库计划" : "新增入库计划" + return (this.localDataForm.planId ? "修改" : "新增") + this.dataForm.planTypeName }, }, methods: { @@ -206,21 +206,9 @@ export default { - - - - - - - - - - - @@ -231,7 +219,7 @@ export default { - + - 整刀实例 + 台账实例