From 359b0f7bf2fce39dfb748bf6de1ab1a651c11b32 Mon Sep 17 00:00:00 2001 From: wws <18630710203@163.com> Date: Wed, 2 Aug 2023 11:27:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B9=BF=E6=96=99=E8=AE=A1=E5=88=92=E7=AE=A1?= =?UTF-8?q?=E7=90=86(=E8=AE=A1=E5=88=92=E4=BF=AE=E6=94=B9=E9=80=BB?= =?UTF-8?q?=E8=BE=91-=E8=AE=A1=E5=88=92=E5=B7=B2=E6=8E=A5=E6=96=99?= =?UTF-8?q?=E5=88=99=E4=B8=8D=E5=85=81=E8=AE=B8=E4=BF=AE=E6=94=B9)?= =?UTF-8?q?=E3=80=81=E5=B7=A5=E5=8D=95=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97?= =?UTF-8?q?(=E5=B7=A5=E5=8D=95=E4=BF=AE=E6=94=B9=E6=88=90=E5=9E=8B?= =?UTF-8?q?=E6=9C=BA=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/plan/plan.js | 8 +++ src/views/plan/order/index.vue | 2 - src/views/plan/plan/index.vue | 78 +++++++++++++++--------------- src/views/plan/workorder/index.vue | 25 +--------- 4 files changed, 49 insertions(+), 64 deletions(-) diff --git a/src/api/plan/plan.js b/src/api/plan/plan.js index 7f85ad6..d51d701 100644 --- a/src/api/plan/plan.js +++ b/src/api/plan/plan.js @@ -1,5 +1,13 @@ import request from '@/utils/request' +// 通过主计划id校验是否可拆分 +export function checkChangePlan(id) { + return request({ + url:'/plan/plan/checkChangePlan/'+id, + method:'get' + }) +} + // 修改-提交按钮-修改湿料计划 export function updatePlanDetail(data) { return request({ diff --git a/src/views/plan/order/index.vue b/src/views/plan/order/index.vue index ae4eab2..ceef5cc 100644 --- a/src/views/plan/order/index.vue +++ b/src/views/plan/order/index.vue @@ -794,8 +794,6 @@ export default { }, /** 查询订单列表 */ getList() { - console.log("这里是日期范围") - console.log(this.queryParams.planDateArray) this.loading = true if (this.queryParams.planDateArray != null) { this.queryParams.planDateStart = moment(this.queryParams.planDateArray[0]).format('YYYY-MM-DD') diff --git a/src/views/plan/plan/index.vue b/src/views/plan/plan/index.vue index 8a80e77..0ca5a40 100644 --- a/src/views/plan/plan/index.vue +++ b/src/views/plan/plan/index.vue @@ -351,7 +351,8 @@ import { getPlan, delPlan, addPlan, - updatePlan + updatePlan, + checkChangePlan } from '@/api/plan/plan' import moment from 'moment' @@ -750,8 +751,6 @@ export default { getBMSList(productDate).then(response => { if (response.data !== undefined) { this.bmsList = response.data - console.log('这里是bms开始') - console.log(this.bmsList) } }) // 一会完成下方数据同步 @@ -768,43 +767,48 @@ export default { }, /** 修改按钮操作 */ handleUpdate(row) { - console.log('这里是修改操作区域') - console.log(row) - // 清除缓存 - this.reset() - this.selectBucketList = null - this.workOrderTime = null - this.workOrderList = [] - this.selectProductList = null - this.newWorkOrderList = [] - this.bmapId = null - // 初始化数据 - this.form.planTime = new Date() - // 在获取到新的数据后执行以下代码 - this.workLoading = true // 设置加载状态为true,表示正在加载 - // 获取订单详情list - getPlanDetailList(row.id).then(response => { - if (response.data !== undefined) { - this.wetMaterialPlanList = response.data - - this.refreshWorkTable = false // 先将refreshProTable设置为false,隐藏表格 - this.$nextTick(() => { - // 使用$nextTick来等待DOM更新完成 - this.refreshWorkTable = true // 立即将refreshProTable设置为true,显示表格 - this.workLoading = false // 设置加载状态为false,表示加载完成 + checkChangePlan(row.id).then(response => { + if (response.code == 500){ + + }else { + // 清除缓存 + this.reset() + this.selectBucketList = null + this.workOrderTime = null + this.workOrderList = [] + this.selectProductList = null + this.newWorkOrderList = [] + this.bmapId = null + // 初始化数据 + this.form.planTime = new Date() + // 在获取到新的数据后执行以下代码 + this.workLoading = true // 设置加载状态为true,表示正在加载 + // 获取订单详情list + getPlanDetailList(row.id).then(response => { + if (response.data !== undefined) { + this.wetMaterialPlanList = response.data + + this.refreshWorkTable = false // 先将refreshProTable设置为false,隐藏表格 + this.$nextTick(() => { + // 使用$nextTick来等待DOM更新完成 + this.refreshWorkTable = true // 立即将refreshProTable设置为true,显示表格 + this.workLoading = false // 设置加载状态为false,表示加载完成 + }) + } }) + // 获取料罐list + getBucketList().then(response => { + this.selectBucketList = response.data + }) + // 获取物料信息list + getProductList().then(response => { + this.selectProductList = response.data + }) + + this.dialogVisible = true } }) - // 获取料罐list - getBucketList().then(response => { - this.selectBucketList = response.data - }) - // 获取物料信息list - getProductList().then(response => { - this.selectProductList = response.data - }) - this.dialogVisible = true }, /** 修改-提交按钮 */ updateForm() { @@ -840,8 +844,6 @@ export default { return } - console.log('这里是工单list') - console.log(this.newWorkOrderList) addWetPlan(this.newWorkOrderList).then(response => { if (response.code === 200) { this.$message({ diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue index a0223d4..7657440 100644 --- a/src/views/plan/workorder/index.vue +++ b/src/views/plan/workorder/index.vue @@ -508,24 +508,14 @@ export default { }, /** 更改工艺 */ routeChange(e){ - console.log("您更改了工艺") - console.log(e) this.workForm.routeCode = e - console.log("这里是全部数据") - console.log(this.workForm) - console.log("这里是订单数据") - console.log(this.productData) }, /** 更改班次 */ shiftChange(e){ - console.log("您更改了班次") - console.log(e) this.workForm.shiftId = e }, /** 拆分数量 */ splitNumChange(e){ - console.log("拆分数量改变") - console.log(e) //不能为负数 if (e <= 0) { e = 1 @@ -572,17 +562,10 @@ export default { }, /** 工单日期选择 */ checkDate(e){ - console.log("工单日期改变") - console.log(e) - this.workForm.productDate = e }, /** 成型机选择 */ machineType(e) { - console.log("成型机选择改变") - console.log(e) - console.log(this.proline) - this.workForm.prodLineCode = e }, /** 查询生产工单列表 */ @@ -682,8 +665,6 @@ export default { return; }else { - console.log("这里是你要的数据") - console.log(this.selectWork) // 数据初始化 this.reset(); this.splitData = []; @@ -700,7 +681,7 @@ export default { //初始化日期为默认今天 this.splitForm.productDate = new Date() //获取成型机和班次 - getprodLineShift(row.orderType).then(response => { + getprodLineShift(this.selectWork.prodType).then(response => { this.proline = response.data.lines this.workShift = response.data.shifts this.routes = response.data.routes @@ -708,8 +689,6 @@ export default { // 获取批次信息list getWorkBatchList(this.selectWork).then(response => { this.formFields = response.data - console.log("这里是批次数据") - console.log(response.data) }) // 获取工单和订单信息 @@ -717,8 +696,6 @@ export default { this.proLoading = true // 设置加载状态为true,表示正在加载 this.workerLoading = true // 设置加载状态为true,表示正在加载 getOrderAndWork(this.selectWork).then(response =>{ - console.log("这里是返回数据") - console.log(response) this.splitData.push(response.data.workOrder) this.productData.push(response.data.order)