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

feature_20250917_调色机预警

sunny 2 месяцев назад
Родитель
Сommit
a7f7398329

+ 9 - 0
src/api/home.js

@@ -8,3 +8,12 @@ export function getStoreInfos(query) {
     params: query,
   });
 }
+// 提示类预警门店列表信息
+export function getColorMixerStoreInfos(query) {
+  return request({
+    url: '/mobile/storeStatistics/getColorMixerStoreInfos',
+    method: 'get',
+    params: query,
+  });
+}
+

+ 13 - 7
src/api/index.js

@@ -902,26 +902,32 @@ export function getReportMaterial(query) {
     params: query,
   });
 }
-
+// 提示类页签-查询下属业务员色卡指标接口
+export function getReportMaterialType(data, signal) {
+  return request({
+    url: '/mobile/reportMobile/getReportMaterialType',
+    method: 'post',
+    data: data,
+    signal: signal,
+  });
+}
 // 提示类页签-调色预警查询接口
 export function getColorWarning(query) {
   return request({
-    url: '/mobile/reportMobile/getReportMaterial',
+    url: '/mobile/storeStatistics/selectColorMixerStore',
     method: 'get',
     params: query,
   });
 }
-
-// 提示类页签-查询下属业务员色卡指标接口
-export function getReportMaterialType(data, signal) {
+// 提示类页签-查询调色机详情接口
+export function selectColorMixerStoreInfo(data, signal) {
   return request({
-    url: '/mobile/reportMobile/getReportMaterialType',
+    url: '/mobile/storeStatistics/selectColorMixerStoreInfo',
     method: 'post',
     data: data,
     signal: signal,
   });
 }
-
 // 新建同城店铺提交审核
 export function submitApproval(query) {
   return request({

+ 64 - 9
src/views/home/hintTabPage/hintDetail.vue

@@ -16,13 +16,25 @@
         v-model="activaPantoneName"
         color="#0057ba"
         @change="tabChangePantone"
-        v-if="activeTabName == 'pantone' || activeTabName == 'colorWarning'">
+        v-if="activeTabName == 'pantone'">
         <van-tab
           v-for="(val, key, index) in tabsItemPantone"
           :key="index"
           :title="key"
           :name="key"></van-tab>
       </van-tabs>
+      <van-tabs
+        class="myTab"
+        v-model="activaPantoneName"
+        color="#0057ba"
+        @change="tabChangePantone"
+        v-if="activeTabName == 'colorWarning'">
+        <van-tab
+          v-for="(val, key, index) in tabsItemPantone"
+          :key="index"
+          :title="key=='keKong'?'可控店':'金牌店'"
+          :name="key"></van-tab>
+      </van-tabs>
     </div>
     <div class="content">
       <el-table
@@ -77,6 +89,8 @@ import {
   selectPendingCasesInfo,
   getReportMaterialType,
   getReportMaterial,
+  selectColorMixerStoreInfo,
+  getColorWarning
 } from '@/api/index';
 import { mapState } from 'vuex';
 export default {
@@ -107,8 +121,8 @@ export default {
         //   name: 'pantone',
         // },
       ],
-      activePantoneTabName: '', //色卡tabName
-      tabsItemPantone: {}, //色卡tabItem
+      activePantoneTabName: '', //色卡/调色预警tabName
+      tabsItemPantone: {}, //色卡/调色预警tabItem
       toggleIndex: 0,
       firstLabel: '',
       firstProp: '',
@@ -251,7 +265,7 @@ export default {
           childredColumn: [
             {
               label: '(家)',
-              prop: 'zfxsbNum',
+              prop: 'colorSeven',
             },
           ],
         },
@@ -260,7 +274,7 @@ export default {
           childredColumn: [
             {
               label: '(家)',
-              prop: 'ywyylyNum',
+              prop: 'colorMonth',
             },
           ],
         },
@@ -269,7 +283,7 @@ export default {
           childredColumn: [
             {
               label: '(家)',
-              prop: 'ywyyffNum',
+              prop: 'colorStop',
             },
           ],
         },
@@ -278,7 +292,7 @@ export default {
           childredColumn: [
             {
               label: '(家)',
-              prop: 'mdwqsNum',
+              prop: 'colorDis',
             },
           ],
         },
@@ -384,9 +398,9 @@ export default {
         this.getPantoneData(resolve, deptId);
       }else if (this.fromType == 'colorWarning') {
         // 调色预警
-        this.firstProp = 'warehouseName';
+        this.firstProp = 'onlyName';
         let deptId = tree ? tree.deptId : null;
-        this.getPantoneData(resolve, deptId);
+        this.getColorWarningData(resolve, deptId);
       }
     },
     tabChange(val) {
@@ -501,6 +515,47 @@ export default {
         }
       });
     },
+    // 调色机tab
+    getColorWarningData(resolve, deptId) {
+      if (JSON.stringify(this.tabsItemPantone) != '{}') {
+        this.getColorWarningFun(resolve, deptId);
+      } else {
+        getColorWarning().then((res) => {
+          this.tabsItemPantone = res.data;
+          delete this.tabsItemPantone.tip;
+          // 初次获取tab数据延迟等待this.activaPantoneName当前激活tab赋值成功,获取其物料code
+          this.$nextTick(() => {
+            this.materialCode = this.materialCode
+              ? this.materialCode
+              : this.tabsItemPantone[this.activaPantoneName].materialCode;
+            this.getColorWarningFun(null, null);
+          });
+        });
+      }
+    },
+    // 调色机详情
+    getColorWarningFun(resolve, deptId) {
+      // deptId 第一次传 null 获取当前等级下的数据(不需要当前层级)
+      selectColorMixerStoreInfo({ deptId: deptId,storeType:this.activaPantoneName }, this.controller.signal).then((res) => {
+        this.maskShow = false;
+        if (res.code == 200) {
+          res.data.forEach((val) => {
+            if (val.isChildren && val.isChildren == 'true') val.hasChildren = true;
+          });
+          // 是否是子级
+          if (resolve) {
+            resolve && resolve(res.data);
+          } else {
+            this.tableList = res.data;
+          }
+        } else {
+          this.Toast({
+            message: res.msg,
+            duration: 5000,
+          });
+        }
+      });
+    },
   },
 };
 </script>

+ 6 - 6
src/views/home/hintTabPage/index.vue

@@ -216,19 +216,19 @@
           </template>
           <div class="pantoneContent">
             <div v-for="(val, key, index) in colorWarning.contentData" :key="index">
-                <div :class="['title',key=='1988色卡'?'kekong':'jinpai']">{{ key }}</div>
+                <div :class="['title',key=='keKong'?'kekong':'jinpai']">{{ key=='keKong'?'可控店':'金牌店' }}</div>
                 <div class="pantoneItem">
                   <div class="firstItem item">
                     <div class="left">
                       <div class="lebel">滚动7天未调色:</div>
                       <div class="value valueIsClick" @click="colorWarningClick(val, key, val.mdwqsNum)">
-                        {{ Micrometer(val.ywyylyNum) }}家
+                        {{ Micrometer(val.colorSeven) }}家
                       </div>
                     </div>
                     <div class="right">
                       <div class="lebel">当月未调色:</div>
                       <div class="value valueIsClick" @click="colorWarningClick(val, key, val.mdwqsNum)">
-                        {{ Micrometer(val.ywyyffNum) }}家
+                        {{ Micrometer(val.colorMonth) }}家
                       </div>
                     </div>
                   </div>
@@ -236,13 +236,13 @@
                     <div class="left">
                       <div class="lebel">从未调色:</div>
                       <div class="value valueIsClick" @click="colorWarningClick(val, key, val.mdwqsNum)">
-                        {{ Micrometer(val.mdwqsNum) }}家
+                        {{ Micrometer(val.colorStop) }}家
                       </div>
                     </div>
                     <div class="right">
                       <div class="lebel">近两年DIS为0:</div>
                       <div class="value valueIsClick" @click="colorWarningClick(val, key, val.mdwqsNum)">
-                        {{ Micrometer(val.wqsmdNum) }}家
+                        {{ Micrometer(val.colorDis) }}家
                       </div>
                     </div>
                   </div>
@@ -645,7 +645,7 @@ export default {
         // 销售部,大区,公司,总部
         this.$router.push({
           path: '/hintDetail',
-          query: { fromType: 'pantone', materialCode: val.materialCode, pantoneName: key }, // materialCode物料来源
+          query: { fromType: 'colorWarning', materialCode: val.materialCode, pantoneName: key }, // materialCode物料来源
         });
       }
     },

+ 91 - 63
src/views/home/hintTabPage/warningStore.vue

@@ -8,14 +8,14 @@
         <van-collapse-item v-for="(val, key, ind) in list" :key="ind" :name="key">
           <template #title>
             <div class="title">{{ key | storeType }}</div>
-            <div class="num">{{ val ? val.length : 0 }}家</div>
+            <div class="num">{{ val.storeNum }}家</div>
           </template>
           <div class="itemContent">
-            <template v-if="val && val.length">
-              <div class="item" v-for="(item, index) in val" :key="index">
+            <template v-if="val.storeList && val.storeList.length > 1">
+              <div class="item" v-for="(item, index) in val.storeList" :key="index">
                 <van-cell>
                   <div class="card">
-                    <div class="title">
+                    <div class="title titlero">
                       <template v-if="item.storeLabels">
                         <!-- 金牌店ABC -->
                         <img class="JPABC" :src="require('@/assets/Icon/storeA.png')" v-if="item.storeLabels.storeA" />
@@ -38,21 +38,10 @@
                         <span class="statusIcon noSubmit" v-if="item.processApprovalStatus == 0">未提交</span>
                       </template>
                     </div>
-                    <div class="info">
-                      类型:{{ item.storeCategory }} &nbsp;
-                      <el-popover popper-class="zpover zpover6" placement="bottom-start" trigger="click">
-                        <div>
-                          <p>
-                            本店经营品项指导:
-                            <a @click="linkimg(item)" style="text-decoration: underline">点击查看</a>
-                          </p>
-                        </div>
-                        <van-icon name="question-o" size="18" slot="reference" />
-                      </el-popover>
-                    </div>
                     <div class="info" style="position: relative">
                       联系人:{{ item.contactName }}
-                      <div style="position: absolute; bottom: 0; right: 14px">
+                      <div style="position: absolute; bottom: 0px; right: 0px">
+                        <!-- 凤凰客户 -->
                         <el-popover popper-class="zpover" placement="bottom" width="120" trigger="click"
                           content="该客户为凤凰客户">
                           <div v-if="item.storeLabels.fhCustomer" class="visitStoreIco" style="background-color: #fff"
@@ -63,32 +52,32 @@
                         <el-popover popper-class="zpover zpover6" placement="bottom-start" trigger="click">
                           <div>
                             <p>
-                              本店{{ timeData1 }}下单SKU数:<a @click="linkList(item)"
+                              本店{{ timeData }}下单SKU数:<a @click="linkList(item)"
                                 style="text-decoration: underline">点击查看详情</a>
                             </p>
                           </div>
                           <div class="visitStoreIco" v-if="item.storeLabels.zysslNums !== false"
                             style="background-color: #fff; position: relative" slot="reference">
                             <p style="
-                        width: 100%;
-                        position: absolute;
-                        z-index: 1;
-                        top: 0.2px;
-                        width: 22px;
-                        margin: 0;
-                        margin-left: 3.6px;
-                        text-align: center;
-                        font-size: 12px;
-                      ">
+                          width: 100%;
+                          position: absolute;
+                          z-index: 1;
+                          top: 0.2px;
+                          width: 22px;
+                          margin: 0;
+                          margin-left: 3.6px;
+                          text-align: center;
+                          font-size: 12px;
+                        ">
                               {{ item.storeLabels.zysslNums }}
                             </p>
                             <van-icon :name="ord" size="26" />
                           </div>
                         </el-popover>
-                        <el-popover popper-class="zpover" placement="bottom" width="200" trigger="click">
+                        <el-popover popper-class="zpover zpover5" placement="bottom" width="200" trigger="click">
                           <div v-if="item.storeLabels">
                             <p>已参加:</p>
-                            <p v-for="tt in (item.storeLabels.targetOne + '').split(';')" :key="tt">
+                            <p v-for="tt in (item.storeLabels.targetOne + '').split(';')" :key="tt.index">
                               {{ tt }}
                             </p>
                           </div>
@@ -97,8 +86,13 @@
                             <van-icon :name="targetOne" size="26" />
                           </div>
                         </el-popover>
-                        <el-popover popper-class="zpover" placement="bottom" width="200" trigger="click"
-                          content="同城店近60天未下单">
+                        <el-popover popper-class="zpover" placement="bottom" width="120" trigger="click" content="调色机5天未联网">
+                          <div v-if="item.storeLabels.ccmOffline" class="visitStoreIco" style="background-color: #fff"
+                            slot="reference">
+                            <van-icon :name="Network" size="26" />
+                          </div>
+                        </el-popover>
+                        <el-popover popper-class="zpover" placement="bottom" width="200" trigger="click" content="同城店近60天未下单">
                           <div v-if="item.storeLabels.fxNoOrder" class="visitStoreIco" style="background-color: #fff"
                             slot="reference">
                             <van-icon :name="order60" size="26" />
@@ -113,7 +107,7 @@
                         </el-popover>
                         <el-popover popper-class="zpover" placement="bottom" width="200" trigger="click"
                           content="本店本月进过专业时时丽">
-                          <div v-if="item.storeLabels.zyssl" class="visitStoreIco" style="background-color: #ed5c68"
+                          <div class="visitStoreIco" v-if="item.storeLabels.zyssl" style="background-color: #ed5c68"
                             slot="reference">
                           </div>
@@ -125,27 +119,28 @@
                           </div>
                         </el-popover>
-                        <el-popover placement="bottom" popper-class="zpover zpover1 zpover1sb" trigger="click"
-                          :disabled="!item.userVisitTimesMap" :content="'本店本月已拜访过' + item.storeLabels.visitTimes + '次'">
+                        <el-popover placement="bottom" popper-class="zpover zpover1 zpover1sb"
+                          :disabled="!item.userVisitTimesMap" trigger="click">
                           <div v-if="item.storeLabels.visitTimes && item.storeLabels.visitTimes > 0"
                             class="visitStoreIco" slot="reference" style="background-color: #fff; position: relative">
                             <p style="
-                        width: 100%;
-                        position: absolute;
-                        z-index: 10;
-                        top: -2px;
-                        margin: 0;
-                        text-align: center;
-                        font-size: 12px;
-                      ">
+                          width: 100%;
+                          position: absolute;
+                          z-index: 10;
+                          top: -2px;
+                          margin: 0;
+                          text-align: center;
+                          font-size: 12px;
+                        ">
                               {{ item.storeLabels.visitTimes }}
                             </p>
-                            <!-- A级金牌店拜访次数少于2 -->
+                            <!-- A级金牌店拜访次数少于needVisitNum 需要拜访的次数 -->
                             <van-icon :name="require('@/assets/ordernumRed.png')" size="26" v-if="
                               item.storeLabels.storeA &&
                               item.needVisitNum &&
                               item.storeLabels.visitTimes < item.needVisitNum
                             " />
+                            <!-- 其他门店拜访 -->
                             <van-icon :name="require('@/assets/ordernum.png')" size="26" v-else />
                           </div>
                           <p style="text-align: center; background: #fff; color: #000; padding: 5px 0">
@@ -162,14 +157,26 @@
                         </el-popover>
                       </div>
                     </div>
+                    <div class="info">
+                      类型:{{ item.storeCategory }}&nbsp;
+                      <el-popover popper-class="zpover zpover6" placement="bottom-start" trigger="click">
+                        <div>
+                          <p>
+                            本店经营品项指导:
+                            <a @click="linkimg(item)" style="text-decoration: underline">点击查看</a>
+                          </p>
+                        </div>
+                        <van-icon name="question-o" size="18" slot="reference" />
+                      </el-popover>
+                    </div>
                     <div class="info" v-if="item.telephone" @click="buryingPointFn(item)">
                       联系电话:<a style="color: #0057ba; font-weight: bold; text-decoration: underline"
                         :href="'tel:' + item.telephone">{{
                         item.telephone }}<van-icon name="phone" /></a>
                     </div>
-                    <div class="info" v-if="item.addressLine">
-                      地址:{{ item.addressLine
-                      }}<img v-if="item.storeLonExist" style="width: 36px" :src="sbpmdh" @click="linkapp(item)" />
+                    <div class="info">
+                      地址:{{ item.addressLine }}
+                      <img v-if="item.storeLonExist" style="width: 36px" :src="sbpmdh" @click="linkapp(item)" />
                     </div>
                     <!-- 潜在店不显示经销商 -->
                     <template v-if="item.sfaStoreType.type != 'qzd'">
@@ -181,7 +188,7 @@
                       ">
                         <div class="info" v-if="typeShow">
                           经销商:
-                          <div class="TCFXListItem" v-for="(item, index) in item.sfaStoreChainsContactList" :key="index">
+                          <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>
@@ -199,7 +206,9 @@
                       </template>
                     </template>
                     <!-- storeLonExist 门店是否存在经纬度 字段false=不显示导航和距离,true=显示 -->
-                    <div class="info" v-if="item.storeLonExist">距离:{{ Micrometer(item.distance) }}m</div>
+                    <div class="info" v-if="item.storeLonExist">
+                      距离:{{ Micrometer(item.distance) }}m
+                    </div>
                     <div class="info" v-if="item.cntOrderAmtYear">
                       门店销额(全年累计):{{ Micrometer(item.cntOrderAmtYear) }}元
                     </div>
@@ -215,12 +224,13 @@
   </div>
 </template>
 <script>
-import { getStoreInfos } from '@/api/home';
+import { getColorMixerStoreInfos } from '@/api/home';
 import { mapState } from 'vuex';
 import store from '@/store';
 import { getMonthCommon } from '@/utils';
 import { buryingPoint, ProductItemImge } from '@/api/index';
 import axios from 'axios';
+import paste from '@/assets/paste.png';
 export default {
   name: 'unCreateStore',
   computed: {
@@ -230,7 +240,8 @@ export default {
   },
   data() {
     return {
-      activeName: '',
+      paste: paste,
+      activeName: 'jinPai',
       list: {},
       TXPiont: {}, //腾讯定位数据
       TXisBD: {}, // 腾讯定位数据转百度
@@ -243,16 +254,10 @@ export default {
   filters: {
     storeType(value) {
       let type = '';
-      if (value == 'keKongAbnormalNum') {
+      if (value == 'keKong') {
         type = '可控店';
-      } else if (value == 'jinPaiUnfinishedNum') {
-        type = '金牌店7天未完工列表';
-      } else if (value == 'jinPaiAbnormalNum') {
+      } else if (value == 'jinPai') {
         type = '金牌店';
-      } else if (value == 'TuLiaoAbnormalNum') {
-        type = '同城分销-涂料店7天未结案列表';
-      } else if (value == 'QiTaAbnormalNum') {
-        type = '同城分销-其他店7天未结案列表';
       }
       return type;
     },
@@ -260,7 +265,7 @@ export default {
   activated() {
     this.timeData = getMonthCommon();
     this.getList();
-    this.activeName = this.activaCreateTypeStore || '';
+    // this.activeName = this.activaCreateTypeStore || '';
   },
   methods: {
     collapseCange(value) {
@@ -268,7 +273,7 @@ export default {
     },
     getList() {
       this.toastLoading(0, '加载中...', true);
-      getStoreInfos()
+      getColorMixerStoreInfos()
         .then((res) => {
           this.toastLoading().clear();
           this.list = res.data;
@@ -337,7 +342,7 @@ export default {
     },
     buryingPointFn(val) {
       buryingPoint({
-        systemModel: '计划内',
+        systemModel: '调色机预警门店明细',
         buryingPointType: 1,
         buryingPointValue: val.telephone,
         buryingPointName: '点击电话',
@@ -547,10 +552,12 @@ export default {
 .van-dialog__confirm:active {
   color: #0057ba;
 }
+
 .searchDiv {
   .van-search {
     background: #fff;
   }
+
   .van-search__action {
     font-size: 14px;
     color: #0057ba;
@@ -561,9 +568,11 @@ export default {
     border: 1px solid #c1c1c1;
     padding: 0 20px;
   }
+
   .van-search--show-action {
     padding-right: 12px;
   }
+
   .van-search__content {
     border: 1px solid #c1c1c1;
     border-bottom-left-radius: 60px;
@@ -577,9 +586,11 @@ export default {
 .bgcolor {
   background-color: #f5f5f5;
 }
+
 .container {
   padding-bottom: 50px;
 }
+
 .monthNow {
   height: 48px;
   line-height: 48px;
@@ -589,6 +600,7 @@ export default {
   box-sizing: border-box;
   background-color: #f5f5f5;
   font-size: 16px;
+
   .CalendarIcon {
     font-size: 24px;
     color: #0057ba;
@@ -597,15 +609,18 @@ export default {
     margin-left: 10px;
   }
 }
+
 .card {
   padding: 10px 16px;
   box-sizing: border-box;
+
   .title {
     font-size: 15px;
     font-weight: bold;
     color: #333;
     line-height: 22px;
     padding-right: 52px;
+
     /*word-break: break-all;*/
     .JPABC {
       width: 20px;
@@ -613,6 +628,7 @@ export default {
       top: 4px;
       margin-right: 3px;
     }
+
     .statusIcon {
       padding: 3px;
       font-size: 12px;
@@ -623,25 +639,30 @@ export default {
       line-height: 16px;
       vertical-align: -1px;
     }
+
     .submit {
       background: #ffba13;
     }
+
     .noSubmit {
       background: #f11818;
     }
   }
+
   .info {
     font-size: 14px;
     color: #909090;
     line-height: 26px;
   }
 }
+
 .navBarTOP {
   position: fixed;
   width: 100%;
   z-index: 2;
   top: 0;
 }
+
 .cellcontent .centerBtn {
   margin: 0 auto 10px;
   display: block;
@@ -650,15 +671,18 @@ export default {
   color: #0057ba;
   border: 1px solid #0057ba;
 }
+
 .cellcontent .centerBtn1 {
   background-color: #0057ba;
   color: #fff;
 }
+
 .btnbox {
   padding-top: 14px;
   border-top: 1px solid #eee;
   margin: 0 10px;
 }
+
 .cellcontent .centerBtn2 {
   margin: 0 auto 10px;
   display: block;
@@ -667,6 +691,7 @@ export default {
   border-radius: 5px;
   padding: 0;
 }
+
 .statstext {
   background-color: #0057ba;
   position: absolute;
@@ -677,17 +702,21 @@ export default {
   border-top-left-radius: 60px;
   color: #fff;
 }
+
 .lineGrey {
   height: 10px;
   width: 100%;
   background: #f1f1f1;
 }
+
 .cellcontent .van-cell {
   padding: 10px 0;
 }
+
 .statstext .van-icon__image {
   height: 0.7em;
 }
+
 .visitStoreIco {
   float: left;
   float: left;
@@ -701,4 +730,3 @@ export default {
   height: 26px;
 }
 </style>
-