From 8996eadcd30b56b8864e3a20be152c880cb499b6 Mon Sep 17 00:00:00 2001 From: TengXF <302828528@qq.com> Date: Mon, 20 May 2024 16:20:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20update=201=E3=80=81=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86=E4=B8=8D=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98=E3=80=82?= =?UTF-8?q?2=E3=80=81=E5=BE=85=E6=8A=A5=E5=B7=A5=E5=92=8C=E5=BE=85?= =?UTF-8?q?=E8=B4=A8=E6=A3=80=E5=A2=9E=E5=8A=A0=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/mes/workScheduling/waitQuality.vue | 17 +++++ src/pages/mes/workScheduling/waitReport.vue | 76 ++++++++++++------- .../mes/workScheduling/workScheduling.vue | 58 ++++++++++---- 3 files changed, 106 insertions(+), 45 deletions(-) diff --git a/src/pages/mes/workScheduling/waitQuality.vue b/src/pages/mes/workScheduling/waitQuality.vue index e0cb35f..6912cb7 100644 --- a/src/pages/mes/workScheduling/waitQuality.vue +++ b/src/pages/mes/workScheduling/waitQuality.vue @@ -126,6 +126,23 @@ // 提交处理请求函数 function handleSubmit(){ + if(saveData.value.personSelected.length == 0 ){ + proxy.$modal.showToast('生产人员不能为空') + setTimeout(() => { + proxy.$modal.closeLoading() + }, 1000) + return; + } + + if(saveData.value.checkPerson == ''){ + proxy.$modal.showToast('质检人员不能为空') + setTimeout(() => { + proxy.$modal.closeLoading() + }, 1000) + return; + } + + proxy.$modal.confirm('确定提交处理吗').then(() => { submitData() }) diff --git a/src/pages/mes/workScheduling/waitReport.vue b/src/pages/mes/workScheduling/waitReport.vue index aff37b5..bde90fd 100644 --- a/src/pages/mes/workScheduling/waitReport.vue +++ b/src/pages/mes/workScheduling/waitReport.vue @@ -9,14 +9,19 @@ 报工人员: + + + 报工数量: - - + + + + 报工工时: @@ -34,17 +39,18 @@ 合格数量: - + 不合格数量: - + + @@ -87,15 +93,18 @@ planDayCode:'PO20240430-0011', processCode:'QD_CY_01' }) + const rekey=ref(0) //变更计数器 + const Quakey = ref(0) + const maxQualified = ref(0) const reportPersonList = ref([]) const formData = ref({ checkFlag:false, - reportCount:'', - qualified:'', - unqualified:'', + reportCount:0, + qualified:0, + unqualified:0, reportPerson:'', reportPersonName:'', - workTerm:'' + workTerm:0 }) const planCount = ref(100) const saveData = ref({ @@ -115,15 +124,23 @@ formData.value.unqualified = 0 } } - function calculatePass(){ + function changeReportCount(){ + rekey.value++ + console.log(1) + if(formData.value.reportCount> planCount.value){ + formData.value.reportCount = planCount.value + } + if(formData.value.checkFlag){ + formData.value.qualified = formData.value.reportCount + formData.value.unqualified = 0 + } + } + function changeQualified(){ + Quakey.value++ + if(formData.value.qualified>formData.value.reportCount){ + formData.value.qualified = formData.value.reportCount + } if(formData.value.checkFlag){ - console.log(formData.value.qualified) - console.log(formData.value.reportCount) - console.log(formData.value.qualified > formData.value.reportCount) - - if(formData.value.qualified>formData.value.reportCount){ - formData.value.qualified = formData.value.reportCount - } formData.value.unqualified = formData.value.reportCount - formData.value.qualified } } @@ -143,7 +160,7 @@ } }).catch(() => { proxy.$modal.closeLoading() - }) + }) } function handleData(){ @@ -186,21 +203,21 @@ // 提交处理请求函数 function handleSubmit(){ - if(formData.value.checkFlag){ - console.log(formData.value.unqualified) - console.log(formData.value.qualified) - if(formData.value.reportCount != (formData.value.unqualified + formData.value.qualified)){ - proxy.$modal.showToast('数量填写有问题,请检查') - setTimeout(() => { + if(reportPersonList.value.length == 0 ){ + proxy.$modal.showToast('报工人员不能为空') + setTimeout(() => { proxy.$modal.closeLoading() - }, 1500) - return; - } + }, 1000) + return; + } + if(formData.value.workTerm == 0){ + proxy.$modal.showToast('报工工时不能为空') + setTimeout(() => { + proxy.$modal.closeLoading() + }, 1000) + return; } - const Rcount = formData.value.unqualified + formData.value.qualified - - // calculatePass() proxy.$modal.confirm('确定提交处理吗').then(() => { submitData() }) @@ -213,6 +230,7 @@ saveData.value.processCode = paramData.value.nodeCode saveData.value.schedulingCode = paramData.value.schedulingCode planCount.value = paramData.value.planCount + maxQualified.value = paramData.value.planCount formData.value.reportCount = paramData.value.planCount } }) diff --git a/src/pages/mes/workScheduling/workScheduling.vue b/src/pages/mes/workScheduling/workScheduling.vue index 4330a15..bc10d70 100644 --- a/src/pages/mes/workScheduling/workScheduling.vue +++ b/src/pages/mes/workScheduling/workScheduling.vue @@ -2,8 +2,8 @@ - + @@ -43,6 +43,10 @@ + + ID 测试用: + {{ item.id }} + 计划号: {{ item.planMasterCode }} @@ -130,7 +134,7 @@ 齐套检查 + @click="openInspectItem(item)">待齐套 开工 叫料 补料 - - 完工 { + workSchedulingListApi.getWorkSchedulingPDAPage(tabParams.value).then((res) => { proxy.$modal.closeLoading() if (res.data.list.length > 0) { list.value = list.value.concat(res.data.list) @@ -379,6 +398,7 @@ switch (index) { case 0: tabParams.value.status = ''; + tabParams.value.planMasterCode = '' break; case 1: tabParams.value.status = '-1'; @@ -429,13 +449,19 @@ }) async function searchTable() { + console.log(searchValue.value) + // tabParams.value.planMasterCode = searchValue.value list.value = [] - searchTableParams.value.planNoDay = this.searchValue - await workSchedulingListApi.getWorkSchedulingPDAPage(searchTableParams.value).then((res) => { - if (res.data.list.length > 0) { - list.value = list.value.concat(res.data.list) - } - }) + tabParams.value.pageNo = 1 + getTabsList() + // list.value = [] + // searchTableParams.value.planNoDay = this.searchValue + // console.log(searchTableParams.value) + // await workSchedulingListApi.getWorkSchedulingPDAPage(searchTableParams.value).then((res) => { + // if (res.data.list.length > 0) { + // list.value = list.value.concat(res.data.list) + // } + // }) } // 完工处理->验证 function finished(item) {