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('失败') }