Просмотр исходного кода

feature_20260128_公装双包客户&三大渠道标签

zhujindu 1 неделя назад
Родитель
Сommit
b7eba3738b

+ 1 - 1
src/api/storeManagement.js

@@ -9,7 +9,7 @@ export function getStoreArchives(query) {
   });
 }
 
-// 修改门店档案信息接口
+// 修改金牌店门店档案信息接口
 export function updateArchives(data) {
   return request({
     url: 'mobile/store/updateArchives',

+ 6 - 0
src/router/index.js

@@ -158,6 +158,12 @@ const router = new VueRouter({
           component: () => import('@/views/storeManagement/JPattributeEditor.vue'),
           meta: { title: '金牌店档案编辑', keepAlive: true },
         },
+        {
+          path: '/GZattributeEditor',
+          name: 'GZattributeEditor',
+          component: () => import('@/views/storeManagement/GZattributeEditor.vue'),
+          meta: { title: '公装经销商编辑', keepAlive: true },
+        },
         {
           path: '/FSQStoreDetail',
           name: 'FSQStoreDetail',

+ 2 - 1
src/views/deviceWithin/addStoreVisit.vue

@@ -5552,7 +5552,8 @@ export default {
             }
           }
           this.RIndex = value.index;
-          this.collectionItemList[value.childindex].collectionOptionList[value.index].isCheck = 1;
+          if (value.index != -1)
+            this.collectionItemList[value.childindex].collectionOptionList[value.index].isCheck = 1;
         }
         if (value.childIndex4 == 'D') {
           let r5 =

+ 48 - 0
src/views/storeManagement/GZattributeDetail.vue

@@ -0,0 +1,48 @@
+<template>
+  <div class="GzStore">
+    <van-field readonly v-model="storeArchives.doubleContracting" label="是否双包客户" />
+    <van-field
+      v-if="storeArchives.doubleContracting == '是'"
+      readonly
+      autosize
+      type="textarea"
+      v-model="storeArchives.mainProductCategorys"
+      label="客户类型" />
+    <van-field readonly v-model="storeArchives.doubleContracting" label="是否三大渠道" />
+    <van-field
+      v-if="storeArchives.doubleContracting == '是'"
+      readonly
+      autosize
+      type="textarea"
+      v-model="storeArchives.mainProductCategorys"
+      label="渠道类型" />
+  </div>
+</template>
+<script>
+export default {
+  props: {
+    storeArchives: {
+      type: Object,
+      default: () => {},
+    },
+  },
+  data() {
+    return {};
+  },
+  activated() {},
+  methods: {},
+};
+</script>
+<style scoped lang="scss">
+.GzStore {
+  // padding: 0 16px;
+  background: #fff;
+  .van-cell {
+    // padding: 10px 0;
+    // border-bottom: 1px solid #ccc;
+  }
+  .van-field__label {
+    width: 9em;
+  }
+}
+</style>

+ 164 - 0
src/views/storeManagement/GZattributeEditor.vue

@@ -0,0 +1,164 @@
+<template>
+  <div class="GZattributeEditor">
+    <van-nav-bar class="navBar" title="公装经销商编辑" left-arrow @click-left="onClickLeft" />
+    <div class="content" v-if="detail">
+      <van-form ref="tabstoreVal">
+        <van-field label="是否双包客户">
+          <template #input>
+            <van-radio-group v-model="detail.doubleContracting" direction="horizontal">
+              <van-radio name="是">是</van-radio>
+              <van-radio name="否">否</van-radio>
+            </van-radio-group>
+          </template>
+        </van-field>
+        <van-field
+          v-if="detail.doubleContracting == '是'"
+          autosize
+          type="textarea"
+          label="客户类型">
+          <template #input>
+            <van-checkbox-group v-model="detail.mainProductCategorys" direction="horizontal">
+              <van-checkbox
+                v-for="(item, index) in mainProductCategorys"
+                :name="item.dictValue"
+                shape="square"
+                :key="index">
+                {{ item.dictValue }}
+              </van-checkbox>
+            </van-checkbox-group>
+          </template>
+        </van-field>
+        <van-field label="是否三大渠道">
+          <template #input>
+            <van-radio-group v-model="detail.doubleContracting" direction="horizontal">
+              <van-radio name="是">是</van-radio>
+              <van-radio name="否">否</van-radio>
+            </van-radio-group>
+          </template>
+        </van-field>
+        <van-field
+          v-if="detail.doubleContracting == '是'"
+          autosize
+          type="textarea"
+          label="渠道类型">
+          <template #input>
+            <van-checkbox-group v-model="detail.mainProductCategorys" direction="horizontal">
+              <van-checkbox
+                v-for="(item, index) in mainProductCategorys"
+                :name="item.dictValue"
+                shape="square"
+                :key="index">
+                {{ item.dictValue }}
+              </van-checkbox>
+            </van-checkbox-group>
+          </template>
+        </van-field>
+      </van-form>
+    </div>
+    <div class="footer-btn">
+      <van-button
+        style="color: white; background: rgb(0, 87, 186); border-radius: 6px; width: 90%"
+        @click="confirmShare">
+        保 存
+      </van-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import { sendAndCheckVerCode, getDictOption } from '@/api/index';
+import { getStoreArchives, updateArchives } from '@/api/storeManagement';
+export default {
+  name: 'GZattributeEditor',
+  data() {
+    return {};
+  },
+  activated() {
+    this.toastLoading(0, '加载中...', true);
+    Promise.all([this.getDictOptionFun('gz_visit_label_channel_type')]).then((res) => {
+      debugger;
+    });
+  },
+  methods: {
+    getDictOptionFun(type) {
+      getDictOption({}, type).then((res) => {});
+    },
+    getDetaild() {
+      getStoreArchives({ storeCode: this.$route.query.storeCode }).then((res) => {
+        this.toastLoading().clear();
+        if (res.code == 200) {
+          //   let copyData = JSON.parse(JSON.stringify(res.data));
+          res.data.mainProductCategorys = res.data.mainProductCategorys
+            ? res.data.mainProductCategorys.split(',')
+            : [];
+          this.detail = res.data;
+          this.mobileStatus = res.data.mobileStatus;
+          // mobileStatus  是否验证通过 1,2是
+          if (res.data.mobileStatus == '1' || res.data.mobileStatus == '2') {
+            this.verificationPassedPhoneNum = this.detail.ownerMobile;
+          }
+          // 验证码和发送按钮是否显示
+          this.verifyMobile = this.mobileStatus == '0' ? false : true;
+        }
+      });
+    },
+    // 保存
+    confirmShare() {
+      this.toastLoading(0, '加载中...', true);
+      let params = JSON.parse(JSON.stringify(this.detail));
+      params.mainProductCategorys = params.mainProductCategorys.join(',');
+      params.storeCode = this.$route.query.storeCode;
+      updateArchives(params).then((res) => {
+        this.toastLoading().clear();
+        if (res.code == 200) {
+          this.$toast(res.msg);
+          this.$router.go(-1);
+        } else {
+          this.$toast(res.msg);
+        }
+      });
+    },
+    onClickLeft() {
+      this.$router.go(-1);
+    },
+  },
+};
+</script>
+
+<style lang="scss">
+.GZattributeEditor {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  overflow: hidden;
+  .content {
+    flex: 1;
+    overflow-y: auto;
+    background: #fff;
+    padding: 10px 15px;
+    margin-top: 10px;
+    background: #fff;
+    .van-cell {
+      padding: 10px 0;
+      border-bottom: 1px solid #ccc;
+    }
+    .van-field__label {
+      width: 9em;
+    }
+    .van-checkbox--horizontal {
+      margin-bottom: 10px;
+      width: 100%;
+    }
+    .van-radio--horizontal {
+      margin-bottom: 10px;
+    }
+  }
+  .footer-btn {
+    display: flex;
+    justify-content: space-around;
+    padding: 10px 0;
+  }
+}
+</style>

+ 71 - 0
src/views/storeManagement/JPattributeDetail.vue

@@ -0,0 +1,71 @@
+<template>
+  <div class="JpStore">
+    <van-field readonly v-model="storeArchives.ownerMobile" label="主经营者电话" />
+    <van-field readonly v-model="storeArchives.ownerName" label="主经营者姓名" />
+    <van-field readonly v-model="storeArchives.ownerBirthday" label="主经营者出生日期" />
+    <van-field
+      readonly
+      autosize
+      type="textarea"
+      v-model="storeArchives.mainProductCategorys"
+      label="主营/擅长经营品类" />
+    <van-field
+      readonly
+      autosize
+      type="textarea"
+      v-model="storeArchives.totalSalesAmount"
+      label="门店24年总进货额(含所有品牌品类,单位:万元)" />
+    <van-field readonly v-model="storeArchives.performanceRatio" label="门店立邦业绩占比(单位:%)" />
+    <van-field
+      readonly
+      autosize
+      type="textarea"
+      v-model="storeArchives.mainBrand"
+      label="门店主营TOP3品牌" />
+    <van-field
+      readonly
+      v-model="storeArchives.constructionResource"
+      label="是否有工地资源(支持工地配送,承接工地双包等)" />
+    <van-field
+      v-if="storeArchives.constructionResource == '是'"
+      readonly
+      v-model="storeArchives.constructionYearNum"
+      label="年工地数量" />
+    <van-field readonly v-model="storeArchives.doubleContracting" label="是否有双包能力" />
+    <van-field readonly v-model="storeArchives.emergencyContactRelation" label="紧急联系人身份" />
+    <van-field readonly v-model="storeArchives.emergencyContact" label="紧急联系人姓名" />
+    <van-field
+      readonly
+      v-model="storeArchives.emergencyContactBirthday"
+      label="紧急联系人出生日期" />
+    <van-field readonly v-model="storeArchives.emergencyContactMobile" label="紧急联系人电话" />
+  </div>
+</template>
+<script>
+export default {
+  props: {
+    storeArchives: {
+      type: Object,
+      default: () => {},
+    },
+  },
+  data() {
+    return {};
+  },
+  activated() {},
+  methods: {},
+};
+</script>
+<style scoped lang="scss">
+.JpStore {
+  // padding: 0 16px;
+  background: #fff;
+  .van-cell {
+    // padding: 10px 0;
+    // border-bottom: 1px solid #ccc;
+  }
+  .van-field__label {
+    width: 9em;
+  }
+}
+</style>

+ 46 - 76
src/views/storeManagement/storeDetail.vue

@@ -8,9 +8,10 @@
             <span style="color: #0057ba" @click="chainMaintain">维护经销商</span>
           </template>
           <template v-else>
-            <!-- 金牌店 编辑属性信息 当前门店是否是我覆盖的:myCover -->
+            <!-- 金牌店/公装经销 编辑属性信息 当前门店是否是我覆盖的:myCover -->
             <!-- <template> -->
-            <template v-if="list.myCover && list.storeCode">
+            <template
+              v-if="list.myCover && (list.ifJpStoreType == '1' || list.storeCategory == 'C108')">
               <span style="color: #0057ba" v-if="type != 'address'" @click="attributeEditor">
                 编辑
               </span>
@@ -334,75 +335,23 @@
             </van-collapse-item>
           </van-collapse>
         </van-tab>
-        <van-tab title="属性信息" name="outsidePlan">
+        <!-- 公装经销商 -->
+        <van-tab title="客户标签" name="outsidePlan" v-if="list.storeCategory == 'C108'">
+          <GZattributeDetail :storeArchives="list.storeArchives"></GZattributeDetail>
+        </van-tab>
+        <van-tab title="属性信息" name="outsidePlan" v-else>
           <!-- 金牌店档案信息 -->
-          <template v-if="list.ifJpStoreType == '1' && list.storeArchives">
-            <div class="JpStore">
-              <van-field readonly v-model="list.storeArchives.ownerMobile" label="主经营者电话" />
-              <van-field readonly v-model="list.storeArchives.ownerName" label="主经营者姓名" />
-              <van-field
-                readonly
-                v-model="list.storeArchives.ownerBirthday"
-                label="主经营者出生日期" />
-              <van-field
-                readonly
-                autosize
-                type="textarea"
-                v-model="list.storeArchives.mainProductCategorys"
-                label="主营/擅长经营品类" />
-              <van-field
-                readonly
-                autosize
-                type="textarea"
-                v-model="list.storeArchives.totalSalesAmount"
-                label="门店24年总进货额(含所有品牌品类,单位:万元)" />
-              <van-field
-                readonly
-                v-model="list.storeArchives.performanceRatio"
-                label="门店立邦业绩占比(单位:%)" />
-              <van-field
-                readonly
-                autosize
-                type="textarea"
-                v-model="list.storeArchives.mainBrand"
-                label="门店主营TOP3品牌" />
-              <van-field
-                readonly
-                v-model="list.storeArchives.constructionResource"
-                label="是否有工地资源(支持工地配送,承接工地双包等)" />
-              <van-field
-                v-if="list.storeArchives.constructionResource == '是'"
-                readonly
-                v-model="list.storeArchives.constructionYearNum"
-                label="年工地数量" />
-              <van-field
-                readonly
-                v-model="list.storeArchives.doubleContracting"
-                label="是否有双包能力" />
-              <van-field
-                readonly
-                v-model="list.storeArchives.emergencyContactRelation"
-                label="紧急联系人身份" />
-              <van-field
-                readonly
-                v-model="list.storeArchives.emergencyContact"
-                label="紧急联系人姓名" />
-              <van-field
-                readonly
-                v-model="list.storeArchives.emergencyContactBirthday"
-                label="紧急联系人出生日期" />
+          <JPattributeDetail
+            :storeArchives="list.storeArchives"
+            v-if="list.ifJpStoreType == '1' && list.storeArchives" />
+          <template v-else>
+            <template v-for="(item, index) in TCFXList" v-if="dictTypeFormShow">
               <van-field
                 readonly
-                v-model="list.storeArchives.emergencyContactMobile"
-                label="紧急联系人电话" />
-            </div>
-          </template>
-          <template v-for="(item, index) in TCFXList" v-if="dictTypeFormShow" v-else>
-            <van-field
-              readonly
-              label="属性"
-              v-if="item.dictValue == list.tcfxName"
-              v-model="item.text" />
+                label="属性"
+                v-if="item.dictValue == list.tcfxName"
+                v-model="item.text" />
+            </template>
           </template>
         </van-tab>
       </van-tabs>
@@ -633,8 +582,17 @@ import uploadImg from '@/components/viewaddreddUploadImg.vue';
 import helpPage from './helpPage.vue';
 import { getPosition, getMapPoi, getkeywordPoi, getTicketFun } from '@/utils/TXApiFun';
 import { getOrderUrlByStoreId } from '@/api/inventory';
+import JPattributeDetail from './JPattributeDetail.vue';
+import GZattributeDetail from './GZattributeDetail.vue';
 export default {
-  components: { uploadImg, mapmarker, viewUploadImg, helpPage },
+  components: {
+    uploadImg,
+    mapmarker,
+    viewUploadImg,
+    helpPage,
+    JPattributeDetail,
+    GZattributeDetail,
+  },
   data() {
     return {
       addresssb: '',
@@ -825,7 +783,7 @@ export default {
             styleId: 'abc',
             position: new TMap.LatLng(
               this.maplist[val].location.lat,
-              this.maplist[val].location.lng
+              this.maplist[val].location.lng,
             ),
           },
         ]);
@@ -1373,7 +1331,11 @@ export default {
       this.lon = '';
       getById({ storeId: this.$route.query.id })
         .then((res) => {
-          this.tabVal = res.data.ifJpStoreType == '1' ? 'outsidePlan' : 'insidePlan';
+          if (res.data.ifJpStoreType == '1' || res.data.storeCategory == 'C108') {
+            this.tabVal = 'outsidePlan';
+          } else {
+            this.tabVal = 'insidePlan';
+          }
           localStorage.setItem('locationRemark', res.data.addressLine);
           localStorage.setItem('orgName', res.data.orgName);
           localStorage.setItem('chainName', res.data.storeName);
@@ -1697,12 +1659,20 @@ export default {
         query: { id: this.$route.query.id },
       });
     },
-    // 金牌店属性编辑
     attributeEditor() {
-      this.$router.push({
-        path: '/JPattributeEditor',
-        query: { storeCode: this.list.storeCode },
-      });
+      if (this.list.storeCategory == 'C108') {
+        // 公装经销商
+        this.$router.push({
+          path: '/GZattributeEditor',
+          query: { storeCode: this.list.storeCode },
+        });
+      } else {
+        // 金牌店属性编辑
+        this.$router.push({
+          path: '/JPattributeEditor',
+          query: { storeCode: this.list.storeCode },
+        });
+      }
     },
   },
 };