新加如果上限值小于标准值提示上限值过小应大于等于标准值,如果下限值大于标准值提示下限值过大应小于等于标准值
已修改1个文件
26 ■■■■■ 文件已修改
pages/QC/SJ/detail.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/QC/SJ/detail.vue
@@ -280,6 +280,19 @@
        let checkValue = Number(this.formData.fcheckResu);
        let minValue = Number(this.formData.minValue);
        let maxValue = Number(this.formData.maxValue);
        let standardValue = Number(this.formData.standardValue);
        // 添加新的验证:检查上限值和下限值与标准值的关系
        if (this.formData.standardValue != null) {
          if (maxValue < standardValue) {
            this.$showMessage("上限值过小,应大于等于标准值");
            return;
          }
          if (minValue > standardValue) {
            this.$showMessage("下限值过大,应小于等于标准值");
            return;
          }
        }
        if (isNaN(checkValue) || isNaN(minValue) || isNaN(maxValue)) {
          this.$showMessage("检验值或范围值格式不正确,请检查输入");
@@ -385,6 +398,19 @@
        let checkValue = Number(this.editData.fcheckResu);
        let minValue = Number(this.formData.minValue);
        let maxValue = Number(this.formData.maxValue);
        let standardValue = Number(this.formData.standardValue);
        // 添加新的验证:检查上限值和下限值与标准值的关系
        if (this.formData.standardValue != null) {
          if (maxValue < standardValue) {
            this.$showMessage("上限值过小,应大于等于标准值");
            return;
          }
          if (minValue > standardValue) {
            this.$showMessage("下限值过大,应小于等于标准值");
            return;
          }
        }
        if (isNaN(checkValue) || isNaN(minValue) || isNaN(maxValue)) {
          this.$showMessage("检验值或范围值格式不正确,请检查输入");