From 735a1ea33c1618978f11cd2e210b6914a4168108 Mon Sep 17 00:00:00 2001 From: TengXF <302828528@qq.com> Date: Sat, 11 May 2024 17:27:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20=E6=95=B0=E9=87=8F=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=EF=BC=8C=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/workScheduling/index.ts | 2 +- .../mes/workScheduling/addBasicItem/index.vue | 20 ++++++++++++++++++- .../mes/workScheduling/workScheduling.vue | 3 ++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/api/mes/workScheduling/index.ts b/src/api/mes/workScheduling/index.ts index 3d232c0..33f7ee0 100644 --- a/src/api/mes/workScheduling/index.ts +++ b/src/api/mes/workScheduling/index.ts @@ -105,7 +105,7 @@ export function callBasicItemForm(params) { //领料 export function receiveBasicItem(data) { - return http.post('/mes/', data) + return http.post('/mes/item-request-main/receiveBasicItem', data) } //补料 diff --git a/src/pages/mes/workScheduling/addBasicItem/index.vue b/src/pages/mes/workScheduling/addBasicItem/index.vue index 5bea09b..4c5e02a 100644 --- a/src/pages/mes/workScheduling/addBasicItem/index.vue +++ b/src/pages/mes/workScheduling/addBasicItem/index.vue @@ -32,7 +32,7 @@ 补料数量: - + @@ -112,6 +112,24 @@ } } + function calculatePass(item,planCount){ + const count = item.repMaterialCounts * planCount + if(item.srcMaterialCounts > count){ + proxy.$modal.showToast('数量不能超过最大物料数') + setTimeout(() => { + item.srcMaterialCounts=count + proxy.$modal.closeLoading() + }, 500) + } + if(item.srcMaterialCounts <= 0 ){ + proxy.$modal.showToast('数量必须大于0') + setTimeout(() => { + item.srcMaterialCounts=1 + proxy.$modal.closeLoading() + }, 500) + } + } + // 提交事件 function handleSubmit(){ saveData.value.planDayCode = queryForm.value.planNoDay diff --git a/src/pages/mes/workScheduling/workScheduling.vue b/src/pages/mes/workScheduling/workScheduling.vue index 101afb5..b307d45 100644 --- a/src/pages/mes/workScheduling/workScheduling.vue +++ b/src/pages/mes/workScheduling/workScheduling.vue @@ -409,12 +409,13 @@ function finished(item) { function submitFinish(item){ workSchedulingListApi.completeHandle(item).then((res) => { proxy.$modal.closeLoading() - if (res.data) { + if (res.code == 0) { proxy.$modal.showToast('成功') list.value = [] status.value = 'loadmore' tabParams.value.pageNo = 1 getTabsList() + } else { proxy.$modal.showToast('失败') }