Browse Source

no message

zhujindu 2 weeks ago
parent
commit
51575348e1
1 changed files with 80 additions and 12 deletions
  1. 80 12
      src/views/storeManagement/storeAdd.vue

+ 80 - 12
src/views/storeManagement/storeAdd.vue

@@ -739,6 +739,15 @@
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
+    <div class="mask" v-if="progressFlag">
+      <el-progress
+        type="circle"
+        :percentage="percentage"
+        :show-text="true"
+        :width="110"
+        :format="format"></el-progress>
+      <!-- <div class="progressClose" @click="progressClose">取消</div> -->
+    </div>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -920,6 +929,9 @@ export default {
       otherCompetitor: '', //主营竞品品牌-其他
       otherCompetitor: '', //主营竞品品牌-其他
       storeCompetitorList: [],
       storeCompetitorList: [],
       activatedStoreCompetitor: [],
       activatedStoreCompetitor: [],
+      progressFlag: false,
+      percentage: 0,
+      timeFlag: null,
     };
     };
   },
   },
   created() {
   created() {
@@ -1986,17 +1998,26 @@ export default {
                 });
                 });
               });
               });
           } else if (res.data.type == 2 || res.data.type == 1) {
           } else if (res.data.type == 2 || res.data.type == 1) {
-            this.$dialog
-              .confirm({
-                title: '系统提示',
-                message: `该门店类型为<span style="color:red">同城分销店</span>,<br/>首笔订单最低金额:<span style="color:red">1000元</span>`,
-                confirmButtonText: '去下单',
-                cancelButtonText: '修改门店信息',
-              })
-              .then(() => {
-                this.toastLoading(0, '上传中...', true);
-                this.addStoreFun();
-              });
+            if (
+              126565 == this.fromValue.storeCategory &&
+              this.fromValue.orgName &&
+              this.fromValue.orgName.indexOf('BMD') != -1
+            ) {
+              this.progress();
+              this.addStoreFun('BMD');
+            } else {
+              this.$dialog
+                .confirm({
+                  title: '系统提示',
+                  message: `该门店类型为<span style="color:red">同城分销店</span>,<br/>首笔订单最低金额:<span style="color:red">1000元</span>`,
+                  confirmButtonText: '去下单',
+                  cancelButtonText: '修改门店信息',
+                })
+                .then(() => {
+                  this.toastLoading(0, '上传中...', true);
+                  this.addStoreFun();
+                });
+            }
           }
           }
         });
         });
       } else {
       } else {
@@ -2004,7 +2025,7 @@ export default {
       }
       }
     },
     },
     // 添加门店
     // 添加门店
-    addStoreFun() {
+    addStoreFun(BMDtype) {
       addStore(this.fromValue).then((res) => {
       addStore(this.fromValue).then((res) => {
         this.toastLoading().clear();
         this.toastLoading().clear();
         if (res.code == 200) {
         if (res.code == 200) {
@@ -2086,6 +2107,7 @@ export default {
             });
             });
           }
           }
         } else {
         } else {
+          this.resetProgress();
           this.$dialog.alert({
           this.$dialog.alert({
             title: '系统提示',
             title: '系统提示',
             message: res.msg,
             message: res.msg,
@@ -2199,6 +2221,25 @@ export default {
       this.sfaStoreChainsContactList = treeSelectArr;
       this.sfaStoreChainsContactList = treeSelectArr;
       this.showPickerChainsList = false;
       this.showPickerChainsList = false;
     },
     },
+    // 重置loaidng状态
+    resetProgress() {
+      this.percentage = 100;
+      clearInterval(this.timeFlag);
+      this.progressFlag = false;
+      this.percentage = 0;
+    },
+    progress() {
+      // 后端接口20000ms后失效,每1000m progress加10,到90停止;
+      this.progressFlag = true;
+      this.percentage = 10;
+      this.timeFlag = setInterval(() => {
+        this.percentage = this.percentage + 10;
+        if (this.percentage == 90) clearInterval(this.timeFlag);
+      }, 1000);
+    },
+    format(percentage) {
+      return `${percentage} %\n图像识别中`;
+    },
   },
   },
 };
 };
 </script>
 </script>
@@ -2337,5 +2378,32 @@ export default {
       width: 50px;
       width: 50px;
     }
     }
   }
   }
+  .mask {
+    position: fixed;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    width: 100%;
+    height: 100%;
+    background: rgba(255, 255, 255, 1);
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    z-index: 99999999;
+    display: flex;
+    flex-direction: column;
+    .progressClose {
+      width: 70px;
+      text-align: center;
+      background: #67c23a;
+      color: #fff;
+      height: 30px;
+      line-height: 30px;
+      border-radius: 5px;
+      margin-top: 5px;
+      font-size: 12px;
+    }
+  }
 }
 }
 </style>
 </style>