diff --git a/src/pages/mes/workScheduling/callMaterial.vue b/src/pages/mes/workScheduling/callMaterial.vue index 47353d4..44ba349 100644 --- a/src/pages/mes/workScheduling/callMaterial.vue +++ b/src/pages/mes/workScheduling/callMaterial.vue @@ -17,11 +17,17 @@ 计划数量:{{ item.srcMaterialCounts * planCountStr }} - + + 叫料数量: + + + + + 提交 @@ -109,23 +115,31 @@ function submitCMForm () { proxy.$modal.alert("叫料数量不能大于计划数量"); return } + if( parseInt(list.value[i].totalMaterialCounts) == 0 ){ + proxy.$modal.alert("叫料数量不能为0"); + return + } + } - param.value.remark = JSON.stringify(list.value) - workSchedulingListApi.callBasicItemForm(param.value).then((res) => { - console.log(res) - if (res.data) { - proxy.$modal.showToast('成功') - setTimeout(() => { - proxy.$tab.navigateBack() + proxy.$modal.confirm('确定提交处理吗').then(() => { + param.value.remark = JSON.stringify(list.value) + workSchedulingListApi.callBasicItemForm(param.value).then((res) => { + console.log(res) + if (res.data) { + proxy.$modal.showToast('成功') + setTimeout(() => { + proxy.$tab.navigateBack() + loading.value = false + proxy.$modal.closeLoading() + }, 1000) + }else{ + proxy.$modal.showToast('失败') loading.value = false proxy.$modal.closeLoading() - }, 1000) - }else{ - proxy.$modal.showToast('失败') - loading.value = false - proxy.$modal.closeLoading() - } + } + }) }) + } //滑动到底部展示