diff --git a/src/pages/mes/reworkBatch/create.vue b/src/pages/mes/reworkBatch/create.vue index a29d0f3..25af921 100644 --- a/src/pages/mes/reworkBatch/create.vue +++ b/src/pages/mes/reworkBatch/create.vue @@ -121,6 +121,7 @@ timestamp: true, }) const form = ref({ + status:'1', reworkAction:'', reworkPersoncode:'', processCode:'', diff --git a/src/pages/mes/reworkBatch/index.vue b/src/pages/mes/reworkBatch/index.vue index c2ac32c..cd996ef 100644 --- a/src/pages/mes/reworkBatch/index.vue +++ b/src/pages/mes/reworkBatch/index.vue @@ -20,8 +20,9 @@ 处理状态: - - + + + @@ -49,17 +50,11 @@ 返修结果:{{item.reworkResult}} - - 去处理 - - - 退回 - - - - 退回 - + 去处理 + 退回 + 终止 + 完成 + 退回 @@ -96,8 +91,8 @@ import * as reworkBatchApi from "@/api/mes/reworkBatch/reworkBatchApi.ts" const { proxy } = getCurrentInstance() const paramData = ref() - // const tabsList = ref([{name:'待返修'},{name:'返修中'},{name:'已完成'}]) - const tabsList = ref([{name:'待处理'},{name:'已完成'}]) + const tabsList = ref([{name:'待返修'},{name:'返修中'},{name:'已完成'},{name:'已终止'}]) + // const tabsList = ref([{name:'待处理'},{name:'已完成'}]) const reworkPersoncode = ref() const showType = ref(false) const current = ref(0) @@ -151,7 +146,7 @@ function handleSuspend(index){ proxy.$modal.confirm('确定提交吗').then(() => { paramData.value = index - changeStatus(1) + changeStatus(-1) }) } // 完成按钮提交事件 @@ -171,8 +166,8 @@ // 状态变更通用方法 function changeStatus(val){ - paramData.value.status = val proxy.$modal.loading('加载中') + paramData.value.status = val reworkBatchApi.update(paramData.value).then((res) => { proxy.$modal.closeLoading() if (res.data) { @@ -194,8 +189,13 @@ } function tabsChange(curr){ + if(curr == 3 ){ + params.value.status = -1 + }else{ + + params.value.status = (curr + 1) + } current.value = curr - params.value.status = (curr + 1) params.value.pageNo = 1 params.value.pageSize = 5 list.value = [] diff --git a/src/pages/mes/reworkSingle/create.vue b/src/pages/mes/reworkSingle/create.vue index 93134f5..a4f482a 100644 --- a/src/pages/mes/reworkSingle/create.vue +++ b/src/pages/mes/reworkSingle/create.vue @@ -3,10 +3,10 @@ - + - + @@ -109,10 +109,11 @@ timestamp: true, }) const form = ref({ + status:'1', reworkAction:'', reworkPersoncode:'', processCode:'', - productCode:'', + productionCode:'', productName:'', stationCode:'', offlineReson:'', @@ -134,7 +135,7 @@ // 提交事件 function handleSubmit(){ // 验证必填项 - if(form.value.productCode=='' && form.value.productCode.trim() == ''){ + if(form.value.productionCode=='' && form.value.productionCode.trim() == ''){ proxy.$modal.showToast('请先选择产品') return } @@ -172,7 +173,7 @@ } // 选择产品回调函数 function selectProduct(index){ - form.value.productCode = index[0].value + form.value.productionCode = index[0].value form.value.productName = index[0].label showProduct.value = false } @@ -244,7 +245,7 @@ form.value.planCode = paramData.value.planMasterCode form.value.processCode = paramData.value.workingNode form.value.stationCode = paramData.value.currentWorkstation - form.value.productCode = paramData.value.currentWorkstation + form.value.productionCode = paramData.value.productCode } }) diff --git a/src/pages/mes/reworkSingle/index.vue b/src/pages/mes/reworkSingle/index.vue index c2f9a05..b2e4a7c 100644 --- a/src/pages/mes/reworkSingle/index.vue +++ b/src/pages/mes/reworkSingle/index.vue @@ -20,8 +20,9 @@ 处理状态: - - + + + @@ -43,17 +44,11 @@ 返修结果:{{item.reworkResult}} - - 去处理 - - - 退回 - - - - 退回 - + 去处理 + 退回 + 终止 + 完成 + 退回 @@ -90,8 +85,8 @@ import * as reworkSingleApi from "@/api/mes/reworkSingle/reworkSingleApi.ts" const { proxy } = getCurrentInstance() const paramData = ref() - // const tabsList = ref([{name:'待返修'},{name:'返修中'},{name:'已完成'}]) - const tabsList = ref([{name:'待处理'},{name:'已完成'}]) + const tabsList = ref([{name:'待返修'},{name:'返修中'},{name:'已完成'},{name:'已终止'}]) + // const tabsList = ref([{name:'待处理'},{name:'已完成'}]) const reworkPersoncode = ref() const showType = ref(false) const current = ref(0) @@ -131,21 +126,22 @@ } // “去处理”按钮提交事件 function handleReceive(){ - if(reworkPersoncode.value != '' && reworkPersoncode.value.trim() != ''){ + if(reworkPersoncode.value == '' && reworkPersoncode.value.trim() == ''){ + proxy.$modal.showToast('请输入返修人员') + reworkPersoncode.value = null + return; + } + else{ paramData.value.reworkPersoncode=reworkPersoncode.value changeStatus(2) showType.value = false } - else{ - proxy.$modal.showToast('请输入返修人员') - reworkPersoncode.value = null - } } // 终止按钮提交事件 function handleSuspend(index){ proxy.$modal.confirm('确定提交吗').then(() => { paramData.value = index - changeStatus(1) + changeStatus(-1) }) } // 完成按钮提交事件 @@ -165,8 +161,8 @@ // 状态变更通用方法 function changeStatus(val){ - paramData.value.status = val proxy.$modal.loading('加载中') + paramData.value.status = val reworkSingleApi.update(paramData.value).then((res) => { proxy.$modal.closeLoading() if (res.data) { @@ -188,8 +184,13 @@ } function tabsChange(curr){ + if(curr == 3 ){ + params.value.status = -1 + }else{ + + params.value.status = (curr + 1) + } current.value = curr - params.value.status = (curr + 1) params.value.pageNo = 1 params.value.pageSize = 5 list.value = [] @@ -228,6 +229,10 @@