From deff81ac755ed3b5e00d61b6b036a806a86d0903 Mon Sep 17 00:00:00 2001 From: shidongli Date: Thu, 25 Aug 2022 14:23:23 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=A4=84=E6=96=B9=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=B5=8B=E8=AF=95=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/itemCategory/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/views/system/itemCategory/index.vue b/src/views/system/itemCategory/index.vue index a7d05c9..b9eafed 100644 --- a/src/views/system/itemCategory/index.vue +++ b/src/views/system/itemCategory/index.vue @@ -295,8 +295,13 @@ export default { console.log(min, max); if (Number(max) < Number(min)) { - console.log(min, max); - callback(new Error("最高分必须大于最低分,请重新填写!")); + if(max!=="" && min!==""){ + callback(new Error("最高分必须大于最低分,请重新填写!")); + }else{ + console.log(min, max); + } + + } if ( value.map((e) => { From 94dcf37c2e3350371586c035bb9ea99e992ca506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Thu, 25 Aug 2022 14:56:22 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E6=95=B0?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/testItems/index.vue | 199 +++++++++++++++++++-------- 1 file changed, 143 insertions(+), 56 deletions(-) diff --git a/src/views/system/testItems/index.vue b/src/views/system/testItems/index.vue index 65f0740..e3121e5 100644 --- a/src/views/system/testItems/index.vue +++ b/src/views/system/testItems/index.vue @@ -277,7 +277,6 @@ @@ -286,7 +285,6 @@ @@ -316,7 +314,6 @@ @@ -329,8 +326,6 @@ @@ -343,7 +338,6 @@ @@ -357,7 +351,6 @@ style="width: 300px" v-model="form.unifiedStandardScore" type="text" - placeholder="请输入统一标准最高得分" /> @@ -464,21 +457,19 @@ export default { name: "TestItems", data() { var roleMoeny = (rule, value, callback) => { - var str = value; + var str = value + ""; var str_ = ""; var str2 = ""; str_ = str.substr(str.indexOf(".")).length; - if (value.includes(".")) { - str2 = str.substr(0, str.indexOf(".")).length; + if (str.includes(".")) { + str2 = str.substr(str.indexOf(".")).length; console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { callback(new Error("请输入数字")); } else if (!this.form.largeStandardScore) { callback(new Error("不能为空")); - } else if (this.form.largeStandardScore * 1 > 99999999) { + } else if (this.form.middleStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 - } else if (this.form.largeStandardScore == "0") { - callback(new Error("请输入成绩")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度 } else if (str2 > 3) { @@ -493,10 +484,10 @@ export default { callback(new Error("请输入数字")); } else if (!this.form.largeStandardScore) { callback(new Error("不能为空")); - } else if (this.form.largeStandardScore * 1 > 99999999) { + } else if (this.form.middleStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 - } else if (this.form.largeStandardScore == "0") { - callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 } else if (str2 > 3) { callback(new Error("整数为三位")); // 限制最大额度 } else { @@ -505,11 +496,11 @@ export default { } }; var roleMoeny1 = (rule, value, callback) => { - var str = value; + var str = value + ""; var str_ = ""; var str2 = ""; str_ = str.substr(str.indexOf(".")).length; - if (value.includes(".")) { + if (str.includes(".")) { str2 = str.substr(0, str.indexOf(".")).length; console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { @@ -518,8 +509,6 @@ export default { callback(new Error("不能为空")); } else if (this.form.middleStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 - } else if (this.form.middleStandardScore == "0") { - callback(new Error("请输入成绩")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度 } else if (str2 > 3) { @@ -536,8 +525,8 @@ export default { callback(new Error("不能为空")); } else if (this.form.unifiedStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 - } else if (this.form.unifiedStandardScore == "0") { - callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 } else if (str2 > 3) { callback(new Error("整数为三位")); // 限制最大额度 } else { @@ -546,11 +535,11 @@ export default { } }; var roleMoeny2 = (rule, value, callback) => { - var str = value; + var str = value + ""; var str_ = ""; var str2 = ""; str_ = str.substr(str.indexOf(".")).length; - if (value.includes(".")) { + if (str.includes(".")) { str2 = str.substr(0, str.indexOf(".")).length; console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { @@ -559,8 +548,6 @@ export default { callback(new Error("不能为空")); } else if (this.form.middleStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 - } else if (this.form.middleStandardScore == "0") { - callback(new Error("请输入成绩")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度 } else if (str2 > 3) { @@ -577,8 +564,8 @@ export default { callback(new Error("不能为空")); } else if (this.form.middleStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 - } else if (this.form.middleStandardScore == "0") { - callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 } else if (str2 > 3) { callback(new Error("整数为三位")); // 限制最大额度 } else { @@ -587,11 +574,11 @@ export default { } }; var roleMoeny3 = (rule, value, callback) => { - var str = value; + var str = value + ""; var str_ = ""; var str2 = ""; str_ = str.substr(str.indexOf(".")).length; - if (value.includes(".")) { + if (str.includes(".")) { str2 = str.substr(0, str.indexOf(".")).length; console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { @@ -600,8 +587,6 @@ export default { callback(new Error("不能为空")); } else if (this.form.smallStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 - } else if (this.form.smallStandardScore == "0") { - callback(new Error("请输入成绩")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度 } else if (str2 > 3) { @@ -618,8 +603,8 @@ export default { callback(new Error("不能为空")); } else if (this.form.smallStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 - } else if (this.form.smallStandardScore == "0") { - callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 } else if (str2 > 3) { callback(new Error("整数为三位")); // 限制最大额度 } else { @@ -627,12 +612,12 @@ export default { } } }; - var roleMoeny4 = (rule, value, callback) => { - var str = value; + var roleMoeny4 = (rule, value, callback) => { + var str = value + ""; var str_ = ""; var str2 = ""; str_ = str.substr(str.indexOf(".")).length; - if (value.includes(".")) { + if (str.includes(".")) { str2 = str.substr(0, str.indexOf(".")).length; console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { @@ -641,8 +626,6 @@ export default { callback(new Error("不能为空")); } else if (this.form.minScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 - } else if (this.form.minScore == "0") { - callback(new Error("请输入成绩")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度 } else if (str2 > 3) { @@ -659,8 +642,8 @@ export default { callback(new Error("不能为空")); } else if (this.form.minScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 - } else if (this.form.minScore == "0") { - callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 } else if (str2 > 3) { callback(new Error("整数为三位")); // 限制最大额度 } else { @@ -669,11 +652,11 @@ export default { } }; var roleMoeny5 = (rule, value, callback) => { - var str = value; + var str = value + ""; var str_ = ""; var str2 = ""; str_ = str.substr(str.indexOf(".")).length; - if (value.includes(".")) { + if (str.includes(".")) { str2 = str.substr(0, str.indexOf(".")).length; console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { @@ -682,8 +665,6 @@ export default { callback(new Error("不能为空")); } else if (this.form.maxScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 - } else if (this.form.maxScore == "0") { - callback(new Error("请输入成绩")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度 } else if (str2 > 3) { @@ -700,8 +681,8 @@ export default { callback(new Error("不能为空")); } else if (this.form.maxScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 - } else if (this.form.maxScore == "0") { - callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 } else if (str2 > 3) { callback(new Error("整数为三位")); // 限制最大额度 } else { @@ -722,11 +703,11 @@ export default { .toString(); console.log(min, max); - if (Number(max) < Number(min)) { - console.log(min, max); + if (max && min && max < min) { callback(new Error("最高分必须大于最低分,请重新填写!")); + } else { + console.log(min, max); } - if ( value.map((e) => { return e.levelName; @@ -787,6 +768,7 @@ export default { }; return { + str: [], //项目测试类型 itemResultType: "item_result_type", //度量单位 @@ -846,7 +828,6 @@ export default { form: {}, // 表单校验 rules: { - unifiedStandardScore: [ { required: true, @@ -855,7 +836,7 @@ export default { trigger: "blur", }, ], - largeStandardScore: [ + largeStandardScore: [ { required: true, validator: roleMoeny, @@ -863,7 +844,7 @@ export default { trigger: "blur", }, ], - middleStandardScore: [ + middleStandardScore: [ { required: true, validator: roleMoeny2, @@ -871,7 +852,7 @@ export default { trigger: "blur", }, ], - smallStandardScore: [ + smallStandardScore: [ { required: true, validator: roleMoeny3, @@ -886,7 +867,7 @@ export default { trigger: "blur", }, ], - minScore: [ + minScore: [ { required: true, validator: roleMoeny4, @@ -894,7 +875,7 @@ export default { trigger: "blur", }, ], - maxScore: [ + maxScore: [ { required: true, validator: roleMoeny5, @@ -948,6 +929,112 @@ export default { this.getList(); }, methods: { + // checkInput() { + // this.form.minScore = this.dealInputVal(this.form.minScore); + // }, + // dealInputVal(value) { + // value = value.replace(/^0*(0\.|[1-9])/, "$1"); + // value = value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符 + // value = value.replace(/^\./g, ""); //验证第一个字符是数字而不是字符 + // value = value.replace(/\.{1,}/g, "."); //只保留第一个.清除多余的 + // value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); + // value = value.replace(/^(\-)*(\d*)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数 + // value = + // value.indexOf(".") > 0 + // ? value.split(".")[0].substring(0, 10) + "." + value.split(".")[1] + // : value.substring(0, 10); + // return value; + // }, + // checkInput1() { + // this.form.maxScore = this.dealInputVal(this.form.maxScore); + // }, + // dealInputVal(value) { + // value = value.replace(/^0*(0\.|[1-9])/, "$1"); + // value = value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符 + // value = value.replace(/^\./g, ""); //验证第一个字符是数字而不是字符 + // value = value.replace(/\.{1,}/g, "."); //只保留第一个.清除多余的 + // value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); + // value = value.replace(/^(\-)*(\d*)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数 + // value = + // value.indexOf(".") > 0 + // ? value.split(".")[0].substring(0, 10) + "." + value.split(".")[1] + // : value.substring(0, 10); + // return value; + // }, + // checkInput2() { + // this.form.largeStandardScore = this.dealInputVal( + // this.form.largeStandardScore + // ); + // }, + // dealInputVal(value) { + // value = value.replace(/^0*(0\.|[1-9])/, "$1"); + // value = value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符 + // value = value.replace(/^\./g, ""); //验证第一个字符是数字而不是字符 + // value = value.replace(/\.{1,}/g, "."); //只保留第一个.清除多余的 + // value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); + // value = value.replace(/^(\-)*(\d*)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数 + // value = + // value.indexOf(".") > 0 + // ? value.split(".")[0].substring(0, 10) + "." + value.splilevelMinScoredatat(".")[1] + // : value.substring(0, 10); + // return value; + // }, + // checkInput3() { + // this.form.middleStandardScore = this.dealInputVal( + // this.form.middleStandardScore + // ); + // }, + // dealInputVal(value) { + // value = value.replace(/^0*(0\.|[1-9])/, "$1"); + // value = value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符 + // value = value.replace(/^\./g, ""); //验证第一个字符是数字而不是字符 + // value = value.replace(/\.{1,}/g, "."); //只保留第一个.清除多余的 + // value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); + // value = value.replace(/^(\-)*(\d*)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数 + // value = + // value.indexOf(".") > 0 + // ? value.split(".")[0].substring(0, 10) + "." + value.split(".")[1] + // : value.substring(0, 10); + // return value; + // }, + // checkInput4() { + // this.form.smallStandardScore = this.dealInputVal( + // this.form.smallStandardScore + // ); + // }, + // dealInputVal(value) { + // value = value.replace(/^0*(0\.|[1-9])/, "$1"); + // value = value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符 + // value = value.replace(/^\./g, ""); //验证第一个字符是数字而不是字符 + // value = value.replace(/\.{1,}/g, "."); //只保留第一个.清除多余的 + // value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); + // value = value.replace(/^(\-)*(\d*)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数 + // value = + // value.indexOf(".") > 0 + // ? value.split(".")[0].substring(0, 10) + "." + value.split(".")[1] + // : value.substring(0, 10); + // return value; + // }, + + // checkInput5() { + // this.form.unifiedStandardScore = this.dealInputVal( + // this.form.unifiedStandardScore + // ); + // }, + // dealInputVal(value) { + // value = value.replace(/^0*(0\.|[1-9])/, "$1"); + // value = value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符 + // value = value.replace(/^\./g, ""); //验证第一个字符是数字而不是字符 + // value = value.replace(/\.{1,}/g, "."); //只保留第一个.清除多余的 + // value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); + // value = value.replace(/^(\-)*(\d*)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数 + // value = + // value.indexOf(".") > 0 + // ? value.split(".")[0].substring(0, 10) + "." + value.split(".")[1] + // : value.substring(0, 10); + // return value; + // }, + delInput(index) { this.form.itemLevelList.splice(index, 1); console.log(this.form.itemLevelList); From feac7a95d5bf70a271d3810e580562424a7e7255 Mon Sep 17 00:00:00 2001 From: shidongli Date: Thu, 25 Aug 2022 15:00:03 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86=20=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=BE=97=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/views/system/itemCategory/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 2a72dbc..6a5988e 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VUE_APP_TITLE = 幼儿园体质检测管理系统 ENV = 'development' # 若依管理系统/开发环境 -VUE_APP_BASE_API = 'http://192.168.16.81:8081' +VUE_APP_BASE_API = 'http://192.168.16.64:8080' #'/dev-api' # 路由懒加载 diff --git a/src/views/system/itemCategory/index.vue b/src/views/system/itemCategory/index.vue index b9eafed..5ab9e6d 100644 --- a/src/views/system/itemCategory/index.vue +++ b/src/views/system/itemCategory/index.vue @@ -295,7 +295,7 @@ export default { console.log(min, max); if (Number(max) < Number(min)) { - if(max!=="" && min!==""){ + if(max && min && max < min){ callback(new Error("最高分必须大于最低分,请重新填写!")); }else{ console.log(min, max); From 73b1b769b6a14b99944d3d3a1e40180071aa5017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Thu, 25 Aug 2022 17:01:26 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E6=95=B0?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=B8=BA0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/testItems/index.vue | 40 ++++++---------------------- 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/src/views/system/testItems/index.vue b/src/views/system/testItems/index.vue index e3121e5..3b05176 100644 --- a/src/views/system/testItems/index.vue +++ b/src/views/system/testItems/index.vue @@ -466,9 +466,7 @@ export default { console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { callback(new Error("请输入数字")); - } else if (!this.form.largeStandardScore) { - callback(new Error("不能为空")); - } else if (this.form.middleStandardScore * 1 > 99999999) { + } else if (this.form.middleStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度 @@ -482,9 +480,7 @@ export default { console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { callback(new Error("请输入数字")); - } else if (!this.form.largeStandardScore) { - callback(new Error("不能为空")); - } else if (this.form.middleStandardScore * 1 > 99999999) { + } else if (this.form.middleStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度 @@ -505,8 +501,6 @@ export default { console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { callback(new Error("请输入数字")); - } else if (!this.form.middleStandardScore) { - callback(new Error("不能为空")); } else if (this.form.middleStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 } else if (str_ > 3) { @@ -521,8 +515,6 @@ export default { console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { callback(new Error("请输入数字")); - } else if (!this.form.unifiedStandardScore) { - callback(new Error("不能为空")); } else if (this.form.unifiedStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 } else if (str_ > 3) { @@ -544,8 +536,6 @@ export default { console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { callback(new Error("请输入数字")); - } else if (!this.form.middleStandardScore) { - callback(new Error("不能为空")); } else if (this.form.middleStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 } else if (str_ > 3) { @@ -560,9 +550,7 @@ export default { console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { callback(new Error("请输入数字")); - } else if (!this.form.middleStandardScore) { - callback(new Error("不能为空")); - } else if (this.form.middleStandardScore * 1 > 99999999) { + } else if (this.form.middleStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度 @@ -583,9 +571,7 @@ export default { console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { callback(new Error("请输入数字")); - } else if (!this.form.smallStandardScore) { - callback(new Error("不能为空")); - } else if (this.form.smallStandardScore * 1 > 99999999) { + } else if (this.form.smallStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度 @@ -599,9 +585,7 @@ export default { console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { callback(new Error("请输入数字")); - } else if (!this.form.smallStandardScore) { - callback(new Error("不能为空")); - } else if (this.form.smallStandardScore * 1 > 99999999) { + } else if (this.form.smallStandardScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度 @@ -622,9 +606,7 @@ export default { console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { callback(new Error("请输入数字")); - } else if (!this.form.minScore) { - callback(new Error("不能为空")); - } else if (this.form.minScore * 1 > 99999999) { + } else if (this.form.minScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度 @@ -638,8 +620,6 @@ export default { console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { callback(new Error("请输入数字")); - } else if (!this.form.minScore) { - callback(new Error("不能为空")); } else if (this.form.minScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 } else if (str_ > 3) { @@ -661,9 +641,7 @@ export default { console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { callback(new Error("请输入数字")); - } else if (!this.form.maxScore) { - callback(new Error("不能为空")); - } else if (this.form.maxScore * 1 > 99999999) { + } else if (this.form.maxScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度 @@ -677,9 +655,7 @@ export default { console.log(str2); if (Number.isNaN(Number.parseFloat(value))) { callback(new Error("请输入数字")); - } else if (!this.form.maxScore) { - callback(new Error("不能为空")); - } else if (this.form.maxScore * 1 > 99999999) { + } else if (this.form.maxScore * 1 > 99999999) { callback(new Error("最大99999999")); // 限制最大额度 } else if (str_ > 3) { callback(new Error("小数点后两位")); // 限制最大额度