zenglf
2023-09-28 997835429a1d66643364091e8437ebbbeb8ff97a
src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue
@@ -116,6 +116,30 @@
              },
            ],
          },
          processQuantity:{
            rules:[
              {
                required:true,
                message: "请输入加工数量"
              },
            ],
          },
          unqualifiedQuantity:{
            rules:[
              {
                required:true,
                message: "请输入不合格数量"
              },
            ],
          },
          efficientDate:{
            rules:[
              {
                required:true,
                message: "请选择日期"
              },
            ],
          },
        },
        url: {
@@ -227,7 +251,11 @@
            let stat = formData.processQuantity
            let end = formData.unqualifiedQuantity
            if(end>stat){
              that.$message.warning("不合格数量必须小于等于加工数量");
              // that.$message.warning("不合格数量必须小于等于加工数量");
              that.$notification.warning({
                message:'消息',
                description:"不合格数量必须小于等于加工数量"
              });
              that.confirmLoading = false
            }else{
              let obj
@@ -240,11 +268,19 @@
              }
              obj.then((res) => {
                if (res.success) {
                  that.$message.success("添加成功")
                  // that.$message.success("添加成功")
                  that.$notification.success({
                    message:'消息',
                    description:"添加成功"
                  });
                  // that.$message.success(res.message)
                  that.$emit('ok', res.result)
                } else {
                  that.$message.warning(res.message)
                  // that.$message.warning(res.message)
                  that.$notification.warning({
                    message:'消息',
                    description:res.message
                  });
                }
              }).finally(() => {
                that.confirmLoading = false