Browse Source

同城分销店拆分、分销店对应多个经销商

zhujindu 11 tháng trước cách đây
mục cha
commit
ba87a87b18

+ 2 - 0
src/assets/styles/index.css

@@ -76,6 +76,8 @@ div:focus {outline: none;}
 .zpover6 .popper__arrow::after{border-bottom-color: #8F82BC !important;border-top-color: #8F82BC !important;}
 .zpover2  .popper__arrow::after{border-bottom-color: #FFBA13 !important;border-top-color: #FFBA13 !important;}
 .zpover1  .popper__arrow::after{border-bottom-color: #0057ba !important;border-top-color: #0057ba !important;}
+.zpoverStoreztype{background-color: #4a4a4a !important;}
+.zpoverStoreztype  .popper__arrow::after{border-bottom-color: #4a4a4a !important;border-top-color: #4a4a4a !important;}
 .itenHhistory{margin: 10px;border-bottom: 1px solid #eee;}
 .itenHhistory:last-child{border:0}
 .flex1{overflow: hidden;}

+ 12 - 6
src/views/deviceOutside/index.vue

@@ -247,20 +247,25 @@
                   @click="linkapp(item)" />
               </div>
               <!-- 分销店 -->
-              <template v-if="item.sfaStoreType && item.sfaStoreType.type == 'fxd'">
+              <template
+                v-if="
+                  item.sfaStoreType &&
+                  item.sfaStoreType.type == 'fxd' &&
+                  item.sfaStoreChainsContactList
+                ">
                 <div class="info" v-if="typeShow">
                   经销商:
-                  <template
-                    v-if="item.sfaStoreChainsContactList"
-                    v-for="(item, index) in item.sfaStoreChainsContactList">
+                  <template v-for="(item, index) in item.sfaStoreChainsContactList">
                     <el-popover
-                      popper-class="zpover zpover6"
+                      popper-class="zpover zpoverStoreztype"
                       placement="bottom-start"
                       trigger="click">
                       <div>
                         {{ item.chainName }}
                       </div>
-                      <span class="TCFXListItem" :key="index">{{ item.categoryDescribe }}</span>
+                      <div class="TCFXListItem" slot="reference" :key="index">
+                        {{ item.categoryDescribe }}
+                      </div>
                     </el-popover>
                   </template>
                 </div>
@@ -2694,6 +2699,7 @@ export default {
     border: 1px solid #ccc;
     padding: 3px 5px;
     margin: 0 5px;
+    border-radius: 6px;
   }
 }
 </style>

+ 8 - 5
src/views/deviceOutside/rangeStore.vue

@@ -366,12 +366,15 @@
               ><van-icon name="phone" size="16" color="#1989fa" />
             </p>
             <!-- 分销店 -->
-            <template v-if="info.sfaStoreType.type == 'fxd' || info.sfaStoreChainsContactList">
-              <div>
+            <template
+              v-if="
+                info.sfaStoreType &&
+                info.sfaStoreType.type == 'fxd' &&
+                info.sfaStoreChainsContactList
+              ">
+              <div class="text">
                 经销商:
-                <template
-                  v-if="info.sfaStoreChainsContactList"
-                  v-for="(item, index) in info.sfaStoreChainsContactList">
+                <template v-for="(item, index) in info.sfaStoreChainsContactList">
                   <span :key="index">{{ item.chainName }},</span>
                 </template>
               </div>

+ 12 - 6
src/views/deviceOutside/topStore.vue

@@ -271,20 +271,25 @@
                 </div>
                 <div class="info">地址:{{ item.addressLine }}</div>
                 <!-- 分销店 -->
-                <template v-if="item.sfaStoreType && item.sfaStoreType.type == 'fxd'">
+                <template
+                  v-if="
+                    item.sfaStoreType &&
+                    item.sfaStoreType.type == 'fxd' &&
+                    item.sfaStoreChainsContactList
+                  ">
                   <div class="info" v-if="typeShow">
                     经销商:
-                    <template
-                      v-if="item.sfaStoreChainsContactList"
-                      v-for="(item, index) in item.sfaStoreChainsContactList">
+                    <template v-for="(item, index) in item.sfaStoreChainsContactList">
                       <el-popover
-                        popper-class="zpover zpover6"
+                        popper-class="zpover zpoverStoreztype"
                         placement="bottom-start"
                         trigger="click">
                         <div>
                           {{ item.chainName }}
                         </div>
-                        <span class="TCFXListItem" :key="index">{{ item.categoryDescribe }}</span>
+                        <div class="TCFXListItem" slot="reference" :key="index">
+                          {{ item.categoryDescribe }}
+                        </div>
                       </el-popover>
                     </template>
                   </div>
@@ -2847,6 +2852,7 @@ export default {
     border: 1px solid #ccc;
     padding: 3px 5px;
     margin: 0 5px;
+    border-radius: 6px;
   }
 }
 </style>

+ 12 - 6
src/views/deviceWithin/index.vue

@@ -251,20 +251,25 @@
                 @click="linkapp(item)" />
             </div>
             <!-- 分销店 -->
-            <template v-if="item.sfaStoreType && item.sfaStoreType.type == 'fxd'">
+            <template
+              v-if="
+                item.sfaStoreType &&
+                item.sfaStoreType.type == 'fxd' &&
+                item.sfaStoreChainsContactList
+              ">
               <div class="info" v-if="typeShow">
                 经销商:
-                <template
-                  v-if="item.sfaStoreChainsContactList"
-                  v-for="(item, index) in item.sfaStoreChainsContactList">
+                <template v-for="(item, index) in item.sfaStoreChainsContactList">
                   <el-popover
-                    popper-class="zpover zpover6"
+                    popper-class="zpover zpoverStoreztype"
                     placement="bottom-start"
                     trigger="click">
                     <div>
                       {{ item.chainName }}
                     </div>
-                    <span class="TCFXListItem" :key="index">{{ item.categoryDescribe }}</span>
+                    <div class="TCFXListItem" slot="reference" :key="index">
+                      {{ item.categoryDescribe }}
+                    </div>
                   </el-popover>
                 </template>
               </div>
@@ -1678,6 +1683,7 @@ export default {
     border: 1px solid #ccc;
     padding: 3px 5px;
     margin: 0 5px;
+    border-radius: 6px;
   }
 }
 </style>

+ 7 - 4
src/views/historicalVisit/historAllVisit.vue

@@ -101,12 +101,15 @@
                 <div class="info" v-if="item.dwellTime">拜访时长:{{ item.dwellTime }}</div>
                 <div class="info">地址:{{ item.addressLine }}</div>
                 <!-- 分销店 -->
-                <template v-if="item.sfaStoreType && item.sfaStoreType.type == 'fxd'">
+                <template
+                  v-if="
+                    item.sfaStoreType &&
+                    item.sfaStoreType.type == 'fxd' &&
+                    item.sfaStoreChainsContactList
+                  ">
                   <div class="info">
                     经销商:
-                    <template
-                      v-if="item.sfaStoreChainsContactList"
-                      v-for="(item, index) in item.sfaStoreChainsContactList">
+                    <template v-for="(item, index) in item.sfaStoreChainsContactList">
                       <span :key="index">{{ item.chainName }},</span>
                     </template>
                   </div>

+ 7 - 4
src/views/storeManagement/index.vue

@@ -268,12 +268,15 @@
               <div class="info">联系电话:{{ item.telephone }}</div>
               <div class="info">地址:{{ item.addressLine }}</div>
               <!-- 分销店 -->
-              <template v-if="item.sfaStoreType && item.sfaStoreType.type == 'fxd'">
+              <template
+                v-if="
+                  item.sfaStoreType &&
+                  item.sfaStoreType.type == 'fxd' &&
+                  item.sfaStoreChainsContactList
+                ">
                 <div class="info" v-if="addShow1">
                   经销商:
-                  <template
-                    v-if="item.sfaStoreChainsContactList"
-                    v-for="(item, index) in item.sfaStoreChainsContactList">
+                  <template v-for="(item, index) in item.sfaStoreChainsContactList">
                     <span :key="index">{{ item.chainName }},</span>
                   </template>
                 </div>

+ 0 - 1
src/views/storeManagement/storeAdd.vue

@@ -1953,7 +1953,6 @@ export default {
       this.activatedTCFXList = JSON.parse(JSON.stringify(this.sfaStoreChainsContactList));
       if (!this.treeSelect.length) {
         listChainsByCategory().then((res) => {
-          // let treeSelect = await getDictOption({}, 'store_chains_contact');
           // 初始化数据
           res.data.forEach((val) => {
             val.dot = false;

+ 13 - 3
src/views/storeManagement/storeEdit.vue

@@ -465,7 +465,11 @@
         @cancel="showPicker = false" />
     </van-popup>
     <!--经销商-->
-    <van-popup v-model="showPickerChainsList" position="bottom" class="agencyBox">
+    <van-popup
+      v-model="showPickerChainsList"
+      position="bottom"
+      class="agencyBox"
+      :close-on-click-overlay="false">
       <!-- 分销店 -->
       <template
         v-if="
@@ -499,7 +503,7 @@
                   }">
                   <i class="van-icon van-icon-success"></i>
                 </div>
-                <div class="value">{{ val.code }} {{ val.name }}</div>
+                <div class="value">{{ val.chainCode }} {{ val.chainName }}</div>
               </div>
             </div>
           </template>
@@ -668,6 +672,7 @@ import txmapimg3 from '@/assets/marker_blue.png';
 import { valid } from '@/api/visitstore';
 import { ImagePreview } from 'vant';
 import { getPosition, getTicketFun, getMapPoi, getkeywordPoi } from '@/utils/TXApiFun';
+import { listChainsByCategory } from '@/api/store';
 
 export default {
   name: 'storeAdd',
@@ -1877,12 +1882,17 @@ export default {
             val.dot = false;
           });
           this.treeSelect = res.data;
+          this.setCheckData();
         });
+      } else {
+        this.setCheckData();
       }
+    },
+    setCheckData() {
       for (let x = 0; x < this.treeSelect.length; x++) {
         // 设置左侧选中图标
         let activate = this.activatedTCFXList.find((item) => {
-          return item.CategoryCode == this.treeSelect[x].code;
+          return item.categoryCode == this.treeSelect[x].code;
         });
         this.treeSelect[x].dot = activate ? true : false;
         // 右侧选中返现