Forráskód Böngészése

Merge branch 'feature_20250828_竞品店维护' into uat(dev)

# Conflicts:
#	src/views/deviceOutside/rangeStore.vue
zhujindu 3 hónapja
szülő
commit
adf4a254d8

+ 18 - 2
src/components/filtrate.vue

@@ -96,6 +96,20 @@
             </div>
           </div>
           <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
+          <template v-if="postType != 'GZ' && postType != 'JZ'">
+            <p class="searchchecktitle" @click="isCompetingStores = !isCompetingStores">
+              &nbsp;竞品店<van-icon name="arrow-down" style="float: right" />
+            </p>
+            <div v-if="isCompetingStores">
+              <div class="checkbox1" v-for="(item, index) in storeTypeLists" :key="index">
+                <div v-if="item.groupType == 'qzd'" class="child">
+                  <van-checkbox :name="item.dictValue">{{ item.dictLabel }}</van-checkbox>
+                </div>
+              </div>
+              <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
+            </div>
+            <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
+          </template>
           <p class="searchchecktitle" @click="otherShow = !otherShow">
             &nbsp;其他 <van-icon name="arrow-down" style="float: right" />
           </p>
@@ -177,11 +191,13 @@ export default {
       otherfxdShow: true,
       otherfxdShow1: true,
       otherfxdShow2: true,
+      isCompetingStores: true,
+      postType: '',
     };
   },
   activated() {
-    var postType = localStorage.getItem('postType');
-    if (postType == 'GZ') {
+    this.postType = localStorage.getItem('postType');
+    if (this.postType == 'GZ') {
       this.otherShow = true;
     } else {
       this.otherShow = false;

+ 6 - 0
src/router/index.js

@@ -206,6 +206,12 @@ const router = new VueRouter({
           component: () => import('@/views/storeManagement/FSQStoreEdit.vue'),
           meta: { title: '仿石漆', keepAlive: true },
         },
+        {
+          path: '/competingStoresDetail',
+          name: 'competingStoresDetail',
+          component: () => import('@/views/storeManagement/competingStoresDetail.vue'),
+          meta: { title: '竞品门店', keepAlive: true },
+        },
       ],
     },
     {

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

@@ -508,6 +508,20 @@
             </div>
           </div>
           <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
+          <template v-if="postType != 'GZ' && postType != 'JZ'">
+            <p class="searchchecktitle" @click="isCompetingStores = !isCompetingStores">
+              &nbsp;竞品店<van-icon name="arrow-down" style="float: right" />
+            </p>
+            <div v-if="isCompetingStores">
+              <div class="checkbox1" v-for="(item, index) in storeTypeLists" :key="index">
+                <div v-if="item.groupType == 'qzd'" class="child">
+                  <van-checkbox :name="item.dictValue">{{ item.dictLabel }}</van-checkbox>
+                </div>
+              </div>
+              <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
+            </div>
+            <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
+          </template>
           <p class="searchchecktitle" @click="otherShow = !otherShow">
             &nbsp;其他 <van-icon name="arrow-down" style="float: right" />
           </p>
@@ -677,6 +691,8 @@ export default {
       lon: '',
       timeData: '',
       customerVisits: true,
+      isCompetingStores: true,
+      postType: '',
     };
   },
   watch: {
@@ -731,8 +747,8 @@ export default {
       ) {
         this.onSearch();
       }
-      var postType = localStorage.getItem('postType');
-      if (postType == 'GZ') {
+      this.postType = localStorage.getItem('postType');
+      if (this.postType == 'GZ') {
         this.addShow1 = false;
         this.otherShow = true;
       } else {
@@ -785,8 +801,8 @@ export default {
     this.query = this.$route.query;
     localStorage.removeItem('visitId');
     this.getStoreLabels();
-    var postType = localStorage.getItem('postType');
-    if (postType == 'GZ') {
+    this.postType = localStorage.getItem('postType');
+    if (this.postType == 'GZ') {
       this.addShow1 = false;
       this.otherShow = true;
     } else {
@@ -2032,8 +2048,14 @@ export default {
         buryingPointName: '客户信息',
         buryingPointPosition: this.tabVal == 1 ? '我的' : '销售部',
       });
-      // FSQ 仿石漆服务商
-      if (/^FSQ/.test(val.storeCode)) {
+      if (val.sfaStoreType.type == 'qzd') {
+        // 竞品店/潜在店
+        this.$router.push({
+          path: '/competingStoresDetail',
+          query: { id: val.storeId },
+        });
+      } else if (/^FSQ/.test(val.storeCode)) {
+        // FSQ 仿石漆服务商
         this.$router.push({
           path: '/FSQStoreDetail',
           query: { id: val.storeId },

+ 17 - 0
src/views/deviceOutside/rangeStore.vue

@@ -614,6 +614,20 @@
             </div>
           </div>
           <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
+          <template v-if="postType != 'GZ' && postType != 'JZ'">
+            <p class="searchchecktitle" @click="isCompetingStores = !isCompetingStores">
+              &nbsp;竞品店<van-icon name="arrow-down" style="float: right" />
+            </p>
+            <div v-if="isCompetingStores">
+              <div class="checkbox1" v-for="(item, index) in storeTypeLists" :key="index">
+                <div v-if="item.groupType == 'qzd'" class="child">
+                  <van-checkbox :name="item.dictValue">{{ item.dictLabel }}</van-checkbox>
+                </div>
+              </div>
+              <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
+            </div>
+            <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
+          </template>
           <p class="searchchecktitle" @click="otherShow = !otherShow">
             &nbsp;其他 <van-icon name="arrow-down" style="float: right" />
           </p>
@@ -857,6 +871,8 @@ export default {
         lng: '',
         lat: '',
       }, //地图中心位置
+      isCompetingStores: true,
+      postType: '',
     };
   },
   created() {
@@ -871,6 +887,7 @@ export default {
     }
   },
   activated() {
+    this.postType = localStorage.getItem('postType');
     this.listData = [];
     this.baiduMapKey = new Date().getTime();
     this.closeFn();

+ 8 - 2
src/views/deviceWithin/index.vue

@@ -1450,8 +1450,14 @@ export default {
         buryingPointName: '客户信息',
         buryingPointPosition: '计划内',
       });
-      // FSQ 仿石漆服务商
-      if (/^FSQ/.test(val.storeCode)) {
+      if (val.sfaStoreType.type == 'qzd') {
+        // 竞品店/潜在店
+        this.$router.push({
+          path: '/competingStoresDetail',
+          query: { id: val.storeId },
+        });
+      } else if (/^FSQ/.test(val.storeCode)) {
+        // FSQ 仿石漆服务商
         this.$router.push({
           path: '/FSQStoreDetail',
           query: { id: val.storeId },

+ 203 - 0
src/views/storeManagement/competingStoresDetail.vue

@@ -0,0 +1,203 @@
+<template>
+  <div class="FSQStoreDetail">
+    <div class="header">
+      <van-nav-bar class="navBar" title="客户详情" left-arrow @click-left="onClickLeft">
+      </van-nav-bar>
+    </div>
+    <div class="content">
+      <van-form ref="tabstoreVal" readonly :scroll-to-error="true" :show-error="false">
+        <van-field readonly :value="fromData.storeCode" label="门店代码">
+          <template #left-icon>
+            <span class="van-f-red"></span>
+          </template>
+        </van-field>
+        <van-field
+          v-model="fromData.storeName"
+          label="门店名称"
+          placeholder="请输入门店名称"
+          rows="1"
+          autosize
+          type="textarea"
+          :rules="[
+            {
+              required: true,
+              message: '请输入门店名称',
+            },
+          ]">
+          <template #left-icon>
+            <span class="van-f-red"></span>
+          </template>
+        </van-field>
+        <van-field
+          readonly
+          clickable
+          name="picker"
+          :value="fromData.storeCategoryName"
+          label="类型"
+          placeholder="点击选择类型">
+          <template #left-icon>
+            <span class="van-f-red"></span>
+          </template>
+        </van-field>
+        <van-field
+          v-model="fromData.orgName"
+          label="销售部"
+          placeholder="请输入销售部"
+          :rules="[{ required: true, message: '请输入销售部' }]">
+          <template #left-icon>
+            <span class="van-f-red"></span>
+          </template>
+        </van-field>
+        <van-field
+          readonly
+          clickable
+          name="picker"
+          :value="fromData.provinceName"
+          label="省(州)"
+          placeholder="点击选择省(州)">
+          <template #left-icon>
+            <span class="van-f-red"></span>
+          </template>
+        </van-field>
+        <van-field
+          readonly
+          clickable
+          name="picker"
+          :value="fromData.cityName"
+          label="城市"
+          placeholder="点击选择城市">
+          <template #left-icon>
+            <span class="van-f-red"></span>
+          </template>
+        </van-field>
+        <van-field
+          readonly
+          clickable
+          name="picker"
+          :value="fromData.districtName"
+          label="区(县)"
+          placeholder="点击选择区(县)">
+          <template #left-icon>
+            <span class="van-f-red"></span>
+          </template>
+        </van-field>
+        <!-- <van-field
+          readonly
+          clickable
+          name="picker"
+          :value="fromData.townName"
+          label="街道"
+          placeholder="点击选择街道">
+          <template #left-icon>
+            <span class="van-f-red"></span>
+          </template>
+        </van-field> -->
+        <van-field
+          v-model="fromData.addressLine"
+          label="地址"
+          placeholder="请输入地址"
+          rows="1"
+          autosize
+          type="textarea"
+          :rules="[
+            {
+              required: true,
+              message: '请输入地址',
+            },
+          ]">
+          <template #left-icon>
+            <span class="van-f-red"></span>
+          </template>
+        </van-field>
+        <van-field readonly v-model="fromData.cityLevel" label="城市等级">
+          <template #left-icon>
+            <span class="van-f-red"></span>
+          </template>
+        </van-field>
+        <van-field readonly v-model="fromData.contactName" label="门店联系人">
+          <template #left-icon>
+            <span class="van-f-red"></span>
+          </template>
+        </van-field>
+        <van-field
+          type="tel"
+          v-model="fromData.telephone"
+          label="门店联系人电话"
+          placeholder="请输入门店联系人电话">
+          <template #left-icon>
+            <span class="van-f-red"></span>
+          </template>
+        </van-field>
+        <van-field readonly v-model="fromData.salesmanName" label="销售员" placeholder="销售员">
+          <template #left-icon>
+            <span class="van-f-red"></span>
+          </template>
+        </van-field>
+      </van-form>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getById } from '@/api/index';
+export default {
+  data() {
+    return {
+      fromData: {
+        storeCode: '',
+        storeName: '',
+        telephone: '',
+        storeCategoryName: '',
+        provinceName: '',
+        cityName: '',
+        districtName: '',
+        addressLine: '',
+        orgName: '',
+        townName: '',
+        contactName: '',
+        salesmanName: '',
+        cityLevel: '',
+      },
+    };
+  },
+  activated() {
+    this.toastLoading(0, '加载中...', true);
+    // 获取详情
+    this.getDetail();
+  },
+  methods: {
+    editorFn() {
+      this.$router.push({
+        path: '/FSQStoreEdit',
+        query: { id: this.$route.query.id },
+      });
+    },
+    getDetail() {
+      getById({ storeId: this.$route.query.id }).then((res) => {
+        this.toastLoading().clear();
+        if (res.code == 200) {
+          this.fromData = res.data;
+        }
+      });
+    },
+    onClickLeft() {
+      this.$router.go(-1);
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.FSQStoreDetail {
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  height: 100%;
+  .header {
+    height: 46px;
+  }
+  .content {
+    flex: 1;
+    overflow-y: auto;
+  }
+}
+</style>

+ 37 - 27
src/views/storeManagement/index.vue

@@ -322,32 +322,36 @@
               <div class="info">联系电话:{{ item.telephone }}</div>
               <div class="info">地址:{{ item.addressLine }}</div>
               <!-- 分销店 -->
-              <template
-                v-if="
-                  item.sfaStoreType &&
-                  item.sfaStoreType.type == 'fxd' &&
-                  item.sfaStoreChainsContactList
-                ">
-                <div class="info" v-if="addShow1">
-                  经销商:
-                  <div class="TCFXListItem" v-for="(item, index) in item.sfaStoreChainsContactList">
-                    <el-popover
-                      popper-class="zpover zpoverStoreztype"
-                      placement="bottom-start"
-                      trigger="click">
-                      <div>
-                        <div>{{ item.chainCode }}</div>
-                        <div>{{ item.chainName }}</div>
-                      </div>
-                      <div slot="reference" :key="index">
-                        {{ item.categoryDescribe }}
-                      </div>
-                    </el-popover>
+              <template v-if="item.sfaStoreType.type != 'qzd'">
+                <template
+                  v-if="
+                    item.sfaStoreType &&
+                    item.sfaStoreType.type == 'fxd' &&
+                    item.sfaStoreChainsContactList
+                  ">
+                  <div class="info" v-if="addShow1">
+                    经销商:
+                    <div
+                      class="TCFXListItem"
+                      v-for="(item, index) in item.sfaStoreChainsContactList">
+                      <el-popover
+                        popper-class="zpover zpoverStoreztype"
+                        placement="bottom-start"
+                        trigger="click">
+                        <div>
+                          <div>{{ item.chainCode }}</div>
+                          <div>{{ item.chainName }}</div>
+                        </div>
+                        <div slot="reference" :key="index">
+                          {{ item.categoryDescribe }}
+                        </div>
+                      </el-popover>
+                    </div>
                   </div>
-                </div>
-              </template>
-              <template v-else>
-                <div class="info" v-if="addShow1">经销商:{{ item.chainName }}</div>
+                </template>
+                <template v-else>
+                  <div class="info" v-if="addShow1">经销商:{{ item.chainName }}</div>
+                </template>
               </template>
             </div>
           </van-cell>
@@ -935,8 +939,14 @@ export default {
     },
     storeDetailFn(item) {
       localStorage.setItem('tabVal', this.tabVal);
-      // FSQ 仿石漆服务商
-      if (item.storeCategory == 'FSQ01') {
+      if (item.sfaStoreType.type == 'qzd') {
+        // 竞品店/潜在店
+        this.$router.push({
+          path: '/competingStoresDetail',
+          query: { id: item.storeId },
+        });
+      } else if (item.storeCategory == 'FSQ01') {
+        // FSQ 仿石漆服务商
         this.$router.push({
           path: '/FSQStoreDetail',
           query: { id: item.storeId },