Explorar el Código

新增同城分销店增加去下单提示

zhujindu hace 10 meses
padre
commit
7ff090dac9
Se han modificado 1 ficheros con 17 adiciones y 13 borrados
  1. 17 13
      src/views/storeManagement/storeAdd.vue

+ 17 - 13
src/views/storeManagement/storeAdd.vue

@@ -329,7 +329,9 @@
                         :imgArr="fromValue.img"
                         @newimgarr="newimgarr1"
                         :imgText="fromValue.ifJzStoreType != 1 ? '门店照' : '家装前台照片'"
-                        :type="1"></upload-img>
+                        :photoIdentifyType="fromValue.ifJzStoreType != 1 ? '1' : ''"
+                        :type="1"
+                        ref="uploadImgVStore"></upload-img>
                     </div>
                   </van-col>
                   <!-- 新建同城分销店不显示陈列照 -->
@@ -713,6 +715,7 @@ import txmapimg2 from '@/assets/txmap2.svg';
 import txmapimg3 from '@/assets/marker_blue.png';
 import { getPosition, getTicketFun } from '@/utils/TXApiFun';
 import { listChainsByCategory } from '@/api/store';
+import store from '@/store';
 export default {
   name: 'storeAdd',
   components: { uploadImg, uploadImgView, mapmarker, uploadImgc, deleteImgView },
@@ -864,6 +867,8 @@ export default {
     this.dictTypeQGJZFormShow = false;
     this.dictTypeSJSFormShow = false;
     this.dictTypeFormShow = false;
+    // 拍照次数重置
+    store.dispatch('setShotsNum', 0);
   },
   watch: {
     $route(to, from) {
@@ -931,6 +936,10 @@ export default {
         this.getQGJZist();
         this.getStreetQuery();
       }
+      if (from.path == '/storeAdd') {
+        // 离开当前页面时,关闭弹框
+        if (this.$refs.uploadImgVStore) this.$refs.uploadImgVStore.close();
+      }
     },
   },
   activated() {
@@ -1260,6 +1269,7 @@ export default {
       } else {
         this.fromValue.carShopImgList.push(val.fileUrl);
       }
+      this.fromValue.businessId = val.businessId ? val.businessId : '';
     },
     getChainsByDeptId(deptCode, ifJzStoreType) {
       getChainsByDeptCode({
@@ -1640,6 +1650,8 @@ export default {
       this.fromValue.orgName = '';
       this.fromValue.orgId = '';
       this.fromValue.ifJzStoreType = value.ifJzStoreType;
+      // 重置拍摄照片
+      this.fromValue.img = '';
       this.getChainsByDeptCode(null, value.ifJzStoreType);
       // 切换门店类型删除选定经销商
       this.treeSelect = [];
@@ -1700,11 +1712,7 @@ export default {
         }
       }
       this.fromValue.orderProductStoreList = arrList;
-      let loading1 = this.$toast.loading({
-        duration: 0,
-        message: '加载中...',
-        forbidClick: true,
-      });
+      this.toastLoading(0, '上传中...', true);
       var fromValue = this.fromValue;
       var telrg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
       if (fromValue.orgId == '') {
@@ -1839,7 +1847,7 @@ export default {
         this.verifyStoreType(this.fromValue.storeCategory) &&
         this.verifyStoreType(this.fromValue.storeCategory).type == 'fxd'
       ) {
-        loading1.clear();
+        this.toastLoading().clear();
         this.$dialog
           .confirm({
             title: '系统提示',
@@ -1848,11 +1856,7 @@ export default {
             cancelButtonText: '修改门店信息',
           })
           .then(() => {
-            let loading1 = this.$toast.loading({
-              duration: 0,
-              message: '加载中...',
-              forbidClick: true,
-            });
+            this.toastLoading(0, '上传中...', true);
             this.addStoreFun();
           });
       } else {
@@ -1862,7 +1866,7 @@ export default {
     // 添加门店
     addStoreFun() {
       addStore(this.fromValue).then((res) => {
-        loading1.clear();
+        this.toastLoading().clear();
         if (res.code == 200) {
           if (res.data.serverCode) {
             this.fromValue.storeCode = res.data.sfaStore.storeCode;