From f60327c377097f67ed42c349bda2a54c3147b7be Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 07 三月 2024 16:35:45 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 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 ee7099a..f4fbfe0 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
@@ -16,7 +16,7 @@
//瀹氫箟琛ㄥご鏁版嵁
const titleUploadData = ref({
//娴佺▼鍗″彿
- processId: 'NG24030501A01/2',
+ processId: 'NG24030701B01/1',
//閿�鍞崟鍙�
orderId: '',
//鐢熶骇鍗曞彿
@@ -229,11 +229,10 @@
const regex = /^[0-9]\d*$/
const brokenNum =
(row.breakageQuantity === undefined || row.breakageQuantity===null) ? 0 : row.breakageQuantity
-
if (row.completedQuantity && !regex.test(row.completedQuantity)) {
- return new Error('璇疯緭鍏ユ暣鏁帮紝骞朵笖澶т簬-1')
- }else if(row.completedQuantity+brokenNum>row.quantity){
- return new Error((`${row.completedQuantity}+$(brokenNum)>${row.quantity}`))
+ return new Error('璇疯緭鍏ユ暣鏁帮紝骞朵笖澶т簬绛変簬0')
+ }else if((row.completedQuantity*1+brokenNum*1)>row.quantity*1){
+ return new Error((`${row.completedQuantity}+${brokenNum}>${row.quantity}`))
}
}
@@ -524,12 +523,12 @@
titleUploadData.value.creator = user.user.userName
titleUploadData.value.creatorId = user.user.userId
const requestDetailData = xGrid.value.getTableData().fullData.filter((row) => {
- const a = (row.completedQuantity !== undefined && row.completedQuantity !== null && row.completedQuantity !== '')
- const b = (row.breakageQuantity !== undefined && row.breakageQuantity !== null && row.breakageQuantity !== '')
+ const a = (row.completedQuantity !== undefined && row.completedQuantity !== null && row.completedQuantity !== '' && row.completedQuantity*1!==0)
+ const b = (row.breakageQuantity !== undefined && row.breakageQuantity !== null && row.breakageQuantity !== '' && row.breakageQuantity*1!==0)
return (a || b)
})
if(requestDetailData.length === 0){
- ElMessage.warning('璇峰~鍐欒嚦灏戜竴鏉℃崯鑰楁暟鍜屽畬宸ユ暟')
+ ElMessage.warning('璇峰~鍐欒嚦灏戜竴鏉℃崯鑰楁暟鍜屽畬宸ユ暟澶т簬0')
return false
}
@@ -537,11 +536,12 @@
title:titleUploadData.value,
detail:xGrid.value.getTableData().fullData
}
- console.log(xGrid.value.getTableData().fullData)
request.post(`/reportingWork/saveReportingWork`,requestData).then(res =>{
if (res.code == 200){
ElMessage.success("鎶ュ伐鎴愬姛")
router.push({path:'/main/reportingWorks/AddReportingWork',query:{random:Math.random()}})
+ }else{
+ ElMessage.error(res.msg)
}
}).catch(err =>{
ElMessage.error(err.message)
--
Gitblit v1.8.0