diff --git a/src/api/plan/plan.js b/src/api/plan/plan.js index 7f85ad60..d51d7016 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 ae4eab2b..ceef5ccf 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 8a80e775..0ca5a40f 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 a0223d4a..76574400 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)