湿料计划管理(计划修改逻辑-计划已接料则不允许修改)、工单管理模块(工单修改成型机显示问题解决)

yangwl
wws 1 year ago
parent 62d80d2138
commit 359b0f7bf2

@ -1,5 +1,13 @@
import request from '@/utils/request' import request from '@/utils/request'
// 通过主计划id校验是否可拆分
export function checkChangePlan(id) {
return request({
url:'/plan/plan/checkChangePlan/'+id,
method:'get'
})
}
// 修改-提交按钮-修改湿料计划 // 修改-提交按钮-修改湿料计划
export function updatePlanDetail(data) { export function updatePlanDetail(data) {
return request({ return request({

@ -794,8 +794,6 @@ export default {
}, },
/** 查询订单列表 */ /** 查询订单列表 */
getList() { getList() {
console.log("这里是日期范围")
console.log(this.queryParams.planDateArray)
this.loading = true this.loading = true
if (this.queryParams.planDateArray != null) { if (this.queryParams.planDateArray != null) {
this.queryParams.planDateStart = moment(this.queryParams.planDateArray[0]).format('YYYY-MM-DD') this.queryParams.planDateStart = moment(this.queryParams.planDateArray[0]).format('YYYY-MM-DD')

@ -351,7 +351,8 @@ import {
getPlan, getPlan,
delPlan, delPlan,
addPlan, addPlan,
updatePlan updatePlan,
checkChangePlan
} from '@/api/plan/plan' } from '@/api/plan/plan'
import moment from 'moment' import moment from 'moment'
@ -750,8 +751,6 @@ export default {
getBMSList(productDate).then(response => { getBMSList(productDate).then(response => {
if (response.data !== undefined) { if (response.data !== undefined) {
this.bmsList = response.data this.bmsList = response.data
console.log('这里是bms开始')
console.log(this.bmsList)
} }
}) })
// //
@ -768,8 +767,10 @@ export default {
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
console.log('这里是修改操作区域') checkChangePlan(row.id).then(response => {
console.log(row) if (response.code == 500){
}else {
// //
this.reset() this.reset()
this.selectBucketList = null this.selectBucketList = null
@ -805,6 +806,9 @@ export default {
}) })
this.dialogVisible = true this.dialogVisible = true
}
})
}, },
/** 修改-提交按钮 */ /** 修改-提交按钮 */
updateForm() { updateForm() {
@ -840,8 +844,6 @@ export default {
return return
} }
console.log('这里是工单list')
console.log(this.newWorkOrderList)
addWetPlan(this.newWorkOrderList).then(response => { addWetPlan(this.newWorkOrderList).then(response => {
if (response.code === 200) { if (response.code === 200) {
this.$message({ this.$message({

@ -508,24 +508,14 @@ export default {
}, },
/** 更改工艺 */ /** 更改工艺 */
routeChange(e){ routeChange(e){
console.log("您更改了工艺")
console.log(e)
this.workForm.routeCode = e this.workForm.routeCode = e
console.log("这里是全部数据")
console.log(this.workForm)
console.log("这里是订单数据")
console.log(this.productData)
}, },
/** 更改班次 */ /** 更改班次 */
shiftChange(e){ shiftChange(e){
console.log("您更改了班次")
console.log(e)
this.workForm.shiftId = e this.workForm.shiftId = e
}, },
/** 拆分数量 */ /** 拆分数量 */
splitNumChange(e){ splitNumChange(e){
console.log("拆分数量改变")
console.log(e)
// //
if (e <= 0) { if (e <= 0) {
e = 1 e = 1
@ -572,17 +562,10 @@ export default {
}, },
/** 工单日期选择 */ /** 工单日期选择 */
checkDate(e){ checkDate(e){
console.log("工单日期改变")
console.log(e)
this.workForm.productDate = e this.workForm.productDate = e
}, },
/** 成型机选择 */ /** 成型机选择 */
machineType(e) { machineType(e) {
console.log("成型机选择改变")
console.log(e)
console.log(this.proline)
this.workForm.prodLineCode = e this.workForm.prodLineCode = e
}, },
/** 查询生产工单列表 */ /** 查询生产工单列表 */
@ -682,8 +665,6 @@ export default {
return; return;
}else { }else {
console.log("这里是你要的数据")
console.log(this.selectWork)
// //
this.reset(); this.reset();
this.splitData = []; this.splitData = [];
@ -700,7 +681,7 @@ export default {
// //
this.splitForm.productDate = new Date() this.splitForm.productDate = new Date()
// //
getprodLineShift(row.orderType).then(response => { getprodLineShift(this.selectWork.prodType).then(response => {
this.proline = response.data.lines this.proline = response.data.lines
this.workShift = response.data.shifts this.workShift = response.data.shifts
this.routes = response.data.routes this.routes = response.data.routes
@ -708,8 +689,6 @@ export default {
// list // list
getWorkBatchList(this.selectWork).then(response => { getWorkBatchList(this.selectWork).then(response => {
this.formFields = response.data this.formFields = response.data
console.log("这里是批次数据")
console.log(response.data)
}) })
// //
@ -717,8 +696,6 @@ export default {
this.proLoading = true // true this.proLoading = true // true
this.workerLoading = true // true this.workerLoading = true // true
getOrderAndWork(this.selectWork).then(response =>{ getOrderAndWork(this.selectWork).then(response =>{
console.log("这里是返回数据")
console.log(response)
this.splitData.push(response.data.workOrder) this.splitData.push(response.data.workOrder)
this.productData.push(response.data.order) this.productData.push(response.data.order)

Loading…
Cancel
Save