From a6c3ed4b70d9b30705b1e6b14c0f2dc1c7b058eb Mon Sep 17 00:00:00 2001 From: yxq Date: Wed, 16 Aug 2023 14:56:13 +0800 Subject: [PATCH] =?UTF-8?q?app=20=E9=87=87=E8=B4=AD=20=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=8F=AA=E8=83=BD=E8=BE=93=E5=85=A5=E6=AD=A3=E6=95=B4=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/common/custompage.js | 4 +++- .../pages/LogisticsManagement/Purchase_Edu/single.vue | 4 ++-- .../pages/LogisticsManagement/Purchase_Info/single.vue | 4 ++-- .../pages/LogisticsManagement/Purchase_Logistic/single.vue | 4 ++-- .../pages/LogisticsManagement/Purchase_Other/single.vue | 4 ++-- .../pages/LogisticsManagement/Purchase_Print/single.vue | 4 ++-- .../pages/LogisticsManagement/Purchase_Student/single.vue | 4 ++-- .../pages/LogisticsManagement/Purchase_Work/single.vue | 4 ++-- .../LogisticsapplyManagement/Purchase_Print_Apply/single.vue | 2 +- 9 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js index ad049a48b..a7804d341 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js @@ -422,7 +422,9 @@ export default { Uri: t => /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须符合网址Url格式', UriOrNull: t => t.length <= 0 || /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须留空或符合网址Url格式', Price: t => this.checkAmt(t) || '须输入数值', - PriceOrNull: t => (!t&&t!==0) || this.checkAmt(t) || '须留空或输入数值' + PriceOrNull: t => (!t&&t!==0) || this.checkAmt(t) || '须留空或输入数值', + PositiveInt: t => /^[1-9]\d*$/.test(t) || '须输入正整数', + PositiveIntOrNull: t => (!t&&t!==0) || /^[1-9]\d*$/.test(t) || '须留空或输入正整数' } } } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Edu/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Edu/single.vue index 8d856bb2e..be310fdb0 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Edu/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Edu/single.vue @@ -277,7 +277,7 @@ export default { let isRight = true for (let s of arr) { let Price = Number(s.Price),Quantity = Number(s.Quantity); - if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&&/^(\-|\+)?\d+(\.\d+)?$/.test(Quantity)){ + if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&& /^[1-9]\d*$/.test(Quantity)){ total = this.accAdd(total,this.accMul(Price,Quantity)) }else{ isRight = false @@ -432,7 +432,7 @@ export default { case 'save': if(!this.current.Purchase_Edu.TotalAmount){ - this.CONFIRM('表单验证失败', '[采购列表]:价格和数量为空或错误') + this.CONFIRM('表单验证失败', '[采购列表]:价格和数量(正整数)为空或错误') return } const verifyResult = this.verifyForm() diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Info/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Info/single.vue index 5d510ac9a..d9da8f395 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Info/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Info/single.vue @@ -274,7 +274,7 @@ export default { let isRight = true for (let s of arr) { let Price = Number(s.Price),Quantity = Number(s.Quantity); - if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&&/^(\-|\+)?\d+(\.\d+)?$/.test(Quantity)){ + if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&& /^[1-9]\d*$/.test(Quantity)){ total = this.accAdd(total,this.accMul(Price,Quantity)) }else{ isRight = false @@ -428,7 +428,7 @@ export default { case 'save': if(!this.current.Purchase_Info.TotalAmount){ - this.CONFIRM('表单验证失败', '[采购列表]:价格和数量为空或错误') + this.CONFIRM('表单验证失败', '[采购列表]:价格和数量(正整数)为空或错误') return } const verifyResult = this.verifyForm() diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Logistic/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Logistic/single.vue index 6199620c0..ca21ab788 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Logistic/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Logistic/single.vue @@ -275,7 +275,7 @@ export default { let isRight = true for (let s of arr) { let Price = Number(s.Price),Quantity = Number(s.Quantity); - if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&&/^(\-|\+)?\d+(\.\d+)?$/.test(Quantity)){ + if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&& /^[1-9]\d*$/.test(Quantity)){ total = this.accAdd(total,this.accMul(Price,Quantity)) }else{ isRight = false @@ -428,7 +428,7 @@ export default { case 'save': if(!this.current.Purchase_Logistic.TotalAmount){ - this.CONFIRM('表单验证失败', '[采购列表]:价格和数量为空或错误') + this.CONFIRM('表单验证失败', '[采购列表]:价格和数量(正整数)为空或错误') return } const verifyResult = this.verifyForm() diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Other/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Other/single.vue index a72c0a61c..91bb57ea7 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Other/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Other/single.vue @@ -275,7 +275,7 @@ export default { let isRight = true for (let s of arr) { let Price = Number(s.Price),Quantity = Number(s.Quantity); - if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&&/^(\-|\+)?\d+(\.\d+)?$/.test(Quantity)){ + if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&& /^[1-9]\d*$/.test(Quantity)){ total = this.accAdd(total,this.accMul(Price,Quantity)) }else{ isRight = false @@ -429,7 +429,7 @@ export default { case 'save': if(!this.current.Purchase_Other.TotalAmount){ - this.CONFIRM('表单验证失败', '[采购列表]:价格和数量为空或错误') + this.CONFIRM('表单验证失败', '[采购列表]:价格和数量(正整数)为空或错误') return } const verifyResult = this.verifyForm() diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Print/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Print/single.vue index 170bbcedf..266f9b11f 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Print/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Print/single.vue @@ -279,7 +279,7 @@ export default { let isRight = true for (let s of arr) { let Price = Number(s.Price),Quantity = Number(s.Quantity); - if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&&/^(\-|\+)?\d+(\.\d+)?$/.test(Quantity)){ + if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&& /^[1-9]\d*$/.test(Quantity)){ total = this.accAdd(total,this.accMul(Price,Quantity)) }else{ isRight = false @@ -433,7 +433,7 @@ export default { case 'save': if(!this.current.Purchase_Print.TotalAmount){ - this.CONFIRM('表单验证失败', '[采购列表]:价格和数量为空或错误') + this.CONFIRM('表单验证失败', '[采购列表]:价格和数量(正整数)为空或错误') return } const verifyResult = this.verifyForm() diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Student/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Student/single.vue index 3c7fc65c7..a0e6f031e 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Student/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Student/single.vue @@ -273,7 +273,7 @@ export default { let isRight = true for (let s of arr) { let Price = Number(s.Price),Quantity = Number(s.Quantity); - if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&&/^(\-|\+)?\d+(\.\d+)?$/.test(Quantity)){ + if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&& /^[1-9]\d*$/.test(Quantity)){ total = this.accAdd(total,this.accMul(Price,Quantity)) }else{ isRight = false @@ -426,7 +426,7 @@ export default { case 'save': if(!this.current.Purchase_Student.TotalAmount){ - this.CONFIRM('表单验证失败', '[采购列表]:价格和数量为空或错误') + this.CONFIRM('表单验证失败', '[采购列表]:价格和数量(正整数)为空或错误') return } const verifyResult = this.verifyForm() diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Work/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Work/single.vue index 8b5230317..cc5fd43b5 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Work/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Work/single.vue @@ -272,7 +272,7 @@ export default { let isRight = true for (let s of arr) { let Price = Number(s.Price),Quantity = Number(s.Quantity); - if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&&/^(\-|\+)?\d+(\.\d+)?$/.test(Quantity)){ + if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&& /^[1-9]\d*$/.test(Quantity)){ total = this.accAdd(total,this.accMul(Price,Quantity)) }else{ isRight = false @@ -425,7 +425,7 @@ export default { case 'save': if(!this.current.Purchase_Work.TotalAmount){ - this.CONFIRM('表单验证失败', '[采购列表]:价格和数量为空或错误') + this.CONFIRM('表单验证失败', '[采购列表]:价格和数量(正整数)为空或错误') return } const verifyResult = this.verifyForm() diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsapplyManagement/Purchase_Print_Apply/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsapplyManagement/Purchase_Print_Apply/single.vue index a3d4c3a66..b220c836a 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsapplyManagement/Purchase_Print_Apply/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsapplyManagement/Purchase_Print_Apply/single.vue @@ -600,7 +600,7 @@ } this.EMIT('LogisticsapplyManagement-Purchase_Print-list-change') - this.NAV_BACK() + setTimeout(()=>this.NAV_BACK(),500) this.TOAST('提交保存成功') }) break