diff --git a/src/api/plan/workorder.js b/src/api/plan/workorder.js index 420e212..58e99fd 100644 --- a/src/api/plan/workorder.js +++ b/src/api/plan/workorder.js @@ -92,3 +92,12 @@ export function downWorkorder(workorderId) { method: 'post' }); } + +// 提交修改工单接口 +export function subChangeWorkOrderM(data){ + return request({ + url:'/plan/pro/workorder/subChangeWorkOrderM', + method:'post', + data:data + }) + } \ No newline at end of file diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue index 0b89dec..e1f79d7 100644 --- a/src/views/plan/workorder/index.vue +++ b/src/views/plan/workorder/index.vue @@ -161,6 +161,18 @@ >工单详情 + + 设备修改 + + @@ -538,6 +550,75 @@ 确定 + + + + + + + + + + + + + + + + +
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + + +
@@ -549,7 +630,7 @@ import { downWorkorder, getOrderAndWork,getProSortNo, getWorkBatchList, - subChangeWorkOrder, + subChangeWorkOrder,subChangeWorkOrderM, checkWorkOrder } from '@/api/plan/workorder' import moment from 'moment'; @@ -625,6 +706,9 @@ export default { materialCode:null, materialName:null }, + splitFormM: { + prodLineCodeArray: [] + }, // 遮罩层 loading: true, // 选中数组 @@ -646,6 +730,7 @@ export default { title: "", // 是否显示弹出层 open: false, + openM:false, // 查询参数 queryParams: { productDateArray: [new Date(), new Date()], @@ -703,6 +788,7 @@ export default { /**********************************/ eRouteProps: {multiple: true}, eRouteOptions: [], + eRouteOptionsM: [], // 班次 workShift: [], //组成白坯物料弹窗 @@ -940,7 +1026,7 @@ export default { } setAtrr1(this.productData[0], this.splitData[0]); - + } }) @@ -1434,7 +1520,7 @@ export default { } setAtrr1(this.productData[0], this.splitData[0]); - + } }) @@ -1443,10 +1529,72 @@ export default { this.title = "生产工单详情"; this.showDetail = false; }, + //工单设备修改开始-----》》》 + editMachine(row) { + // 数据初始化 + this.reset(); + this.splitData = []; + this.productData = []; + this.splitFormM = { + prodLineCodeArray: [], + } + + // 获取工艺设备信息 + getProEquipment(this.selectWork.routeCode).then(response2 => { + this.eRouteOptionsM = response2.data + }) + + getOrderAndWork(this.selectWork).then(response => { + // 设置选择机型 + this.splitFormM.prodLineCodeArray = response.data.workOrder.prodLineCodeArray + this.splitData.push(response.data.workOrder) + this.productData.push(response.data.order) + this.refreshProTable = false // 先将refreshProTable设置为false,隐藏表格 + this.refreshWorkerTable = false // 先将refreshProTable设置为false,隐藏表格 + this.$nextTick(() => { + // 使用$nextTick来等待DOM更新完成 + this.refreshProTable = true // 立即将refreshProTable设置为true,显示表格 + this.proLoading = false // 设置加载状态为false,表示加载完成 + }) + this.$nextTick(() => { + // 使用$nextTick来等待DOM更新完成 + this.refreshWorkerTable = true // 立即将refreshProTable设置为true,显示表格 + this.workerLoading = false // 设置加载状态为false,表示加载完成 + }) + }) + + this.openM = true; + this.titleM = "生产工单设备修改"; + + }, + //工单设备修改结束-----《《《《《《 + + // 工单设备变更-变更提交按钮 + submitFormM() { + //下面是请求处理 + const data = { + proOrderWorkorder: this.selectWork, + prodLineCodeArray: this.splitFormM.prodLineCodeArray + } + subChangeWorkOrderM(data).then(response => { + if (response.code == 500) { + this.$modal.msgError(response.msg) + return + } + this.getList() + this.$modal.msgSuccess('提交成功') + }) + // 清除缓存 + this.splitFormM = { + prodLineCodeArray: [] + } + this.openM = false + }, // 取消按钮 cancel() { this.open = false; + this.openM = false; this.showDetail = true; this.reset(); },