From eeb0d39b6e2152b16813b25d2e2a0c5333d0f928 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期二, 19 八月 2025 17:09:16 +0800
Subject: [PATCH] 报工最后一道工序修改,添加对应语言
---
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue | 43 +++++++++++++++++++++++++++++++++----------
1 files changed, 33 insertions(+), 10 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
index d9c805a..eab016e 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -431,8 +431,15 @@
}else if(row.quantity_card<row.completedQuantity){
return new Error(t('reportingWorks.pleaseNumber10'))
}
+ const nextProcess = titleUploadData.value.nextProcess//涓嬪伐搴�
+
const completedSum = Number(row.thisQuantitySum) //鎬诲畬宸ユ暟閲�
- const nextQuantitySum = Number(row.nextQuantitySum) //鎬讳笅宸ュ簭瀹屽伐鏁伴噺
+ let nextQuantitySum = ''
+ if (nextProcess!=''){
+ nextQuantitySum = Number(row.nextQuantitySum) //鎬讳笅宸ュ簭瀹屽伐鏁伴噺
+ }else {
+ nextQuantitySum = Number(row.received_quantity) //鎬讳笅宸ュ簭瀹屽伐鏁伴噺
+ }
const totalQuantity = Number(row.quantity) //鍙畬宸ユ暟閲�
const val = Number(cellValue) //杈撳叆鍊�
@@ -450,21 +457,37 @@
`)
}
if(titleUploadData.value.reportingWorkId!=null){
- if(row.completedQuantityComputed>=row.minQuantity ){
- if((val<(row.completedQuantityComputed-row.minQuantity || val>=row.completedQuantityComputed))){
- return new Error(`${row.completedQuantityComputed-row.minQuantity}
+ if (nextProcess!=''){//闈炴渶鍚庝竴閬撳伐搴�
+ if(row.completedQuantityComputed>=row.minQuantity ){
+ if((val<(row.completedQuantityComputed-row.minQuantity || val>=row.completedQuantityComputed))){
+ return new Error(`${row.completedQuantityComputed-row.minQuantity}
<=val<=
${row.completedQuantityComputed}`)
- }
- }else{
- if((val>row.completedQuantityComputed)){
- return new Error(`val
+ }
+ }else{
+ if((val>row.completedQuantityComputed)){
+ return new Error(`val
<=
${row.completedQuantityComputed}`)
+ }
+ }
+ }else {//鏈�鍚庝竴閬撳伐搴�
+ if (val<row.completedQuantityComputed){
+ //搴撳瓨鏁伴噺銆佸凡鍏ュ簱鏁伴噺
+ if (val>(row.inventory_quantity-row.received_quantity)){
+ return new Error(`val
+ <=
+ ${row.inventory_quantity-row.received_quantity}`)
+ }else {
+ if (val < (row.inventory_quantity-row.received_quantity)){
+ //瀹屽伐鎬绘暟銆佹湰娆″畬宸ユ暟銆佸凡鍏ュ簱鏁伴噺
+ if (completedSum-row.completedQuantityComputed <row.received_quantity){
+ return new Error(`${t('reportingWorks.pleaseNumber15')}`)
+ }
+ }
+ }
}
}
-
-
}
}
--
Gitblit v1.8.0