浏览代码

fix(仓库管理): 将错误提示从error改为warning以改善用户体验

liujt 1 月之前
父节点
当前提交
1513cd538f
共有 1 个文件被更改,包括 12 次插入12 次删除
  1. 12 12
      src/views/warehouseManagement/warehouseDefinition/add.vue

+ 12 - 12
src/views/warehouseManagement/warehouseDefinition/add.vue

@@ -761,7 +761,7 @@
     },
     data() {
       // const msg = throttle(
-      //   () => this.$message.error('货架总体积不能大于库区体积!'),
+      //   () => this.$message.warning('货架总体积不能大于库区体积!'),
       //   500
       // );
 
@@ -1222,7 +1222,7 @@
               row.reservoirAreaCode === item.reservoirAreaCode
           ).length > 1
         ) {
-          return this.$message.error('货架编号不能重复!');
+          return this.$message.warning('货架编号不能重复!');
         }
         const savedSum = this.areaForm.areaGoodsshelvesList
           .filter((t) => t.reservoirAreaCode === row.reservoirAreaCode)
@@ -1247,7 +1247,7 @@
               row.extInfo[0].areaWidth *
               row.extInfo[0].areaHigh
           ) {
-            return this.$message.error('货架总体积不能大于库区体积!');
+            return this.$message.warning('货架总体积不能大于库区体积!');
           }
         }
 
@@ -1312,7 +1312,7 @@
               item.code === this.areaForm.warehouseAreasSaveList[index].code
           ).length > 1
         ) {
-          return this.$message.error('库区编号不能重复!');
+          return this.$message.warning('库区编号不能重复!');
         }
         this.hjCodeIndex = index;
         this.hjCodeFalg = true;
@@ -1412,7 +1412,7 @@
             (item) => item.reservoirAreaCode === reservoirAreaCode
           ).length === 1
         ) {
-          return this.$message.error('至少保留一个货架!');
+          return this.$message.warning('至少保留一个货架!');
         }
         if (this.savedShelves.includes(id)) {
           let list = this.areaForm.allocationReqList
@@ -1422,7 +1422,7 @@
           const res = await existGoods(list);
 
           if (res?.success && res.data) {
-            return this.$message.error('此货架下货位有关联货物,无法删除!');
+            return this.$message.warning('此货架下货位有关联货物,无法删除!');
           }
         }
 
@@ -1461,7 +1461,7 @@
             (item) => item.reservoirAreaCode === reservoirAreaCode
           ).length === 1
         ) {
-          return this.$message.error('至少保留一个货架!');
+          return this.$message.warning('至少保留一个货架!');
         }
 
         this.$confirm(`是否删除这个货架?`).then(async () => {
@@ -1546,7 +1546,7 @@
           const res = await existGoods(list);
 
           if (res?.success && res.data) {
-            return this.$message.error('此库区下货位有关联货物,无法删除!');
+            return this.$message.warning('此库区下货位有关联货物,无法删除!');
           }
         }
         // 货架code
@@ -1605,23 +1605,23 @@
         delete this.formData.reservoirAreaList;
 
         if (this.areaForm.warehouseAreasSaveList.length === 0) {
-          return this.$message.error('请添加库区');
+          return this.$message.warning('请添加库区');
         }
         // ===dakai
         if (
           this.areaForm.warehouseAreasSaveList.length > 0 &&
           this.areaForm.allocationReqList.length === 0
         ) {
-          return this.$message.error('请添加货位');
+          return this.$message.warning('请添加货位');
         }
         if (
           this.areaForm.warehouseAreasSaveList.length > 0 &&
           this.areaForm.areaGoodsshelvesList.length === 0
         ) {
-          return this.$message.error('请添加货架');
+          return this.$message.warning('请添加货架');
         }
         if (!this.checkVolume()) {
-          return this.$message.error('货架总体积不能大于库区体积!');
+          return this.$message.warning('货架总体积不能大于库区体积!');
         }
 
         // let obj = {};