Browse Source

Merge branch 'uat(dev)' into feature_20241231_计划外列表页面刷新优化

# Conflicts:
#	src/views/deviceOutside/index.vue
zhujindu 1 year ago
parent
commit
a3528301c1
67 changed files with 6083 additions and 3940 deletions
  1. 3 0
      README.md
  2. 19 0
      checkPassword.js
  3. 1 1
      package.json
  4. 39 31
      public/index.html
  5. 14 3
      src/api/index.js
  6. 11 0
      src/api/store.js
  7. 14 0
      src/assets/TCFX_0.svg
  8. BIN
      src/assets/imageEmpty.png
  9. 2 0
      src/assets/styles/index.css
  10. 46 31
      src/components/deleteUploadImg1.vue
  11. 429 0
      src/components/imageAIVerifyErr copy.vue
  12. 440 0
      src/components/imageAIVerifyErr.vue
  13. 161 18
      src/components/uploadImgVStore.vue
  14. 1 1
      src/components/uploadImgVStorec.vue
  15. 194 16
      src/components/uploadVNormal.vue
  16. 8 0
      src/main.js
  17. 33 9
      src/mixin/clew.js
  18. 2 0
      src/store/getters.js
  19. 2 0
      src/store/index.js
  20. 19 0
      src/store/modules/otheStore.js
  21. 10 3
      src/store/modules/user.js
  22. 1 0
      src/utils/TXApiFun.js
  23. 168 138
      src/utils/index.js
  24. 5 2
      src/utils/request.js
  25. 6 3
      src/views/clew/clewent.vue
  26. 11 2
      src/views/clew/complaintDetail/index.vue
  27. 2 1
      src/views/clew/complaintDetail/radioGroup.vue
  28. 4 10
      src/views/clew/index.vue
  29. 57 49
      src/views/componentsTarget/createStoreBJ.vue
  30. 22 0
      src/views/componentsTarget/index.css
  31. 56 46
      src/views/componentsTarget/placeOrder.vue
  32. 35 30
      src/views/componentsTarget/visitedRealTime.vue
  33. 88 27
      src/views/deviceOutside/index.vue
  34. 90 18
      src/views/deviceOutside/rangeStore.vue
  35. 1 0
      src/views/deviceOutside/suishenbangOutstoreVisit.vue
  36. 41 31
      src/views/deviceOutside/topStore.vue
  37. 249 184
      src/views/deviceWithin/abnormalVisit.vue
  38. 388 214
      src/views/deviceWithin/addStoreVisit.vue
  39. 118 455
      src/views/deviceWithin/index.vue
  40. 1 0
      src/views/deviceWithin/storeVisit.vue
  41. 3 1
      src/views/deviceWithin/taskTips.vue
  42. 372 301
      src/views/historicalVisit/historAllVisit.vue
  43. 31 1
      src/views/historicalVisit/historicalDetails.vue
  44. 0 6
      src/views/home/bottomBtn.vue
  45. 10 10
      src/views/home/hintTabPage/hintDetail.vue
  46. 41 23
      src/views/home/hintTabPage/index.vue
  47. 4 4
      src/views/home/hintTabPage/noVisit.vue
  48. 7 3
      src/views/home/hintTabPage/visitPage.vue
  49. 97 46
      src/views/home/index.vue
  50. 68 21
      src/views/signApproval/newStoreApprovalDetail.vue
  51. 429 323
      src/views/signApproval/signApproval.vue
  52. 35 1
      src/views/storeManagement/index.vue
  53. 355 208
      src/views/storeManagement/storeAdd.vue
  54. 73 24
      src/views/storeManagement/storeDetail.vue
  55. 353 104
      src/views/storeManagement/storeEdit.vue
  56. 5 2
      src/views/storeManagement/success.vue
  57. 8 2
      src/views/week/assignAwait/JZfollowUp.vue
  58. 7 83
      src/views/week/daily.vue
  59. 4 80
      src/views/week/dailyApproval.vue
  60. 167 128
      src/views/week/dailyApprovalList.vue
  61. 4 1
      src/views/week/dailyDetails.vue
  62. 4 91
      src/views/week/dailyHistoricalDetails.vue
  63. 179 162
      src/views/week/index.vue
  64. 258 248
      src/views/week/weekly.vue
  65. 264 248
      src/views/week/weeklyApproval.vue
  66. 257 248
      src/views/week/weeklyApprovalDetils.vue
  67. 257 248
      src/views/week/weeklyHistoricalDetils.vue

+ 3 - 0
README.md

@@ -24,5 +24,8 @@ npm run prod // 生产环境
 ```
 npm run build:dev  // 测试环境
 npm run build:prod // 生产环境
+//为了避免测试环境意外打包成正式环境,在打包正式环境之前添加密码校验操作
+//密码:admin
+checkPassword.js 生产环境打包校验
 
 ```

+ 19 - 0
checkPassword.js

@@ -0,0 +1,19 @@
+// scripts/password-check.js
+const readline = require('readline');
+
+const rl = readline.createInterface({
+  input: process.stdin,
+  output: process.stdout,
+});
+
+rl.question('请输入密码: ', (password) => {
+  rl.close();
+  if (password === 'admin') {
+    // 替换为你的实际密码
+    console.log('密码正确,开始打包...');
+    process.exit(0);
+  } else {
+    console.error('密码错误,打包终止!');
+    process.exit(1);
+  }
+});

+ 1 - 1
package.json

@@ -7,7 +7,7 @@
     "test": "vue-cli-service serve --mode test",
     "prod": "vue-cli-service serve --mode production",
     "build:dev": "vue-cli-service build --mode development",
-    "build:prod": "vue-cli-service build",
+    "build:prod": "node checkPassword.js && vue-cli-service build",
     "lint": "vue-cli-service lint"
   },
   "dependencies": {

+ 39 - 31
public/index.html

@@ -1,38 +1,46 @@
 <!DOCTYPE html>
 <html lang="">
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <head>
+    <meta charset="utf-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
     <meta
-            name="viewport"
-            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"
-    />
-    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
-    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+      name="viewport"
+      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
     <title><%= webpackConfig.name %></title>
-</head>
-<body class="bgcolor">
-<noscript>
-    <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
-</noscript>
-<div id="app"></div>
-<script>
-    if (GetQueryValue("loginName") != null) {
-        localStorage.removeItem('loginType')
-        localStorage.setItem('loginName', GetQueryValue("loginName"));
-        location.href=location.href.split("?")[0]+"?v="+new Date().getTime();
-    }
-    function GetQueryValue(queryName) {
+  </head>
+  <body class="bgcolor">
+    <noscript>
+      <strong
+        >We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without
+        JavaScript enabled. Please enable it to continue.</strong
+      >
+    </noscript>
+    <div id="app"></div>
+    <script>
+      if (GetQueryValue('loginName') != null) {
+        localStorage.removeItem('loginType');
+        localStorage.setItem('loginName', GetQueryValue('loginName'));
+        location.href = location.href.split('?')[0] + '?v=' + new Date().getTime();
+      }
+      function GetQueryValue(queryName) {
         var query = decodeURI(window.location.search.substring(1));
-        var vars = query.split("&");
-        for (var i = 0; i < vars.length; i++) {var pair = vars[i].split("=");if (pair[0] == queryName) {return pair[1];}}
+        var vars = query.split('&');
+        for (var i = 0; i < vars.length; i++) {
+          var pair = vars[i].split('=');
+          if (pair[0] == queryName) {
+            return pair[1];
+          }
+        }
         return null;
-    }
-</script>
-<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
-<script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
-<!--生产、uat-->
-<script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&libraries=service,tools&key=Y7SBZ-PI5K5-FOJIT-ILHLY-PN66T-HKB4A"></script>
-</body>
+      }
+    </script>
+    <script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
+    <script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
+    <!--生产、uat-->
+    <script
+      charset="utf-8"
+      src="https://map.qq.com/api/gljs?v=1.exp&libraries=service,tools&key=Y7SBZ-PI5K5-FOJIT-ILHLY-PN66T-HKB4A"></script>
+  </body>
 </html>
-

+ 14 - 3
src/api/index.js

@@ -678,11 +678,12 @@ export function getChainsByDeptCode(query) {
 }
 // 照片上传
 //门店
-export function uploadImagev(data) {
+export function uploadImagev(data, signal) {
   return request({
     url: '/mobile/store/uploadImage',
     method: 'post',
     data: data,
+    signal: signal,
   });
 }
 //任务
@@ -694,11 +695,12 @@ export function addPhotov(data) {
   });
 }
 // 拜访
-export function addstorePhoto(data) {
+export function addstorePhoto(data, signal) {
   return request({
     url: '/mobile/storeGroup/addPhoto',
     method: 'post',
     data: data,
+    signal: signal,
   });
 }
 export function buryingPoint(data) {
@@ -905,7 +907,7 @@ export function selectVisitsRealTime(query) {
   });
 }
 
-// 审批历史
+// 审批历史-审批历史
 export function storeApprovaHistory(query) {
   return request({
     url: '/mobile/store/storeApprovaHistory',
@@ -959,3 +961,12 @@ export function getDictOption(query, dictTypr) {
     params: query,
   });
 }
+
+// 仍要上传图片入库
+export function addPhotoToDB(data) {
+  return request({
+    url: 'mobile/storeGroup/addPhotoToDB',
+    method: 'post',
+    data: data,
+  });
+}

+ 11 - 0
src/api/store.js

@@ -0,0 +1,11 @@
+// 门店相关接口
+import request from '@/utils/request';
+
+// 获取经销商分类
+export function listChainsByCategory(query) {
+  return request({
+    url: 'mobile/store/listChainsByCategory',
+    method: 'get',
+    params: query,
+  });
+}

File diff suppressed because it is too large
+ 14 - 0
src/assets/TCFX_0.svg


BIN
src/assets/imageEmpty.png


+ 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;}

+ 46 - 31
src/components/deleteUploadImg1.vue

@@ -1,27 +1,37 @@
 <template>
-  <div >
-  <van-row gutter="10" >
-    <van-col span="6" v-for="(urls, index) in imgs" :key="index">
-      <div class="imgview">
-        <van-icon name="close" size="16" v-on:click="deleteImg(index,urls.id)"/>
-        <img v-if="urls.type=='2'" :src="urls.fileUrl" width="100px" height="100px" @click="previewsImg(index)"/>
-        <img v-else :src="urls.fileUrl" width="100px" height="100px" @click="previewsImg(index)"/>
-      </div>
-    </van-col>
-  </van-row>
-<!--  <div style="padding: 10px 16px 0;">-->
-<!--    <div class="img-box" v-for="(urls, index) in imgs" :key="index">-->
-<!--      <van-icon name="clear" v-on:click="deleteImg(index,urls.id)"/>-->
-<!--      <img v-if="urls.type=='2'" :src="urls.fileUrl" width="100px" height="100px" @click="previewsImg(index)"/>-->
-<!--      <img v-else :src="urls.fileUrl" width="100px" height="100px" @click="previewsImg(index)"/>-->
-<!--    </div>-->
-<!--  </div>-->
+  <div>
+    <van-row gutter="10">
+      <van-col span="6" v-for="(urls, index) in imgs" :key="index">
+        <div class="imgview">
+          <van-icon name="close" size="16" v-on:click="deleteImg(index, urls.id)" />
+          <img
+            v-if="urls.type == '2'"
+            :src="urls.fileUrl"
+            width="100px"
+            height="100px"
+            @click="previewsImg(index)" />
+          <img
+            v-else
+            :src="urls.fileUrl"
+            width="100px"
+            height="100px"
+            @click="previewsImg(index)" />
+        </div>
+      </van-col>
+    </van-row>
+    <!--  <div style="padding: 10px 16px 0;">-->
+    <!--    <div class="img-box" v-for="(urls, index) in imgs" :key="index">-->
+    <!--      <van-icon name="clear" v-on:click="deleteImg(index,urls.id)"/>-->
+    <!--      <img v-if="urls.type=='2'" :src="urls.fileUrl" width="100px" height="100px" @click="previewsImg(index)"/>-->
+    <!--      <img v-else :src="urls.fileUrl" width="100px" height="100px" @click="previewsImg(index)"/>-->
+    <!--    </div>-->
+    <!--  </div>-->
   </div>
 </template>
 
 <script>
-import {ImagePreview} from "vant";
-import {removePhoto} from "@/api/index";
+import { ImagePreview } from 'vant';
+import { removePhoto } from '@/api/index';
 
 export default {
   name: 'deleteUploadImg',
@@ -29,41 +39,46 @@ export default {
     imgs: {
       type: Array,
       default() {
-        return []
-      }
+        return [];
+      },
+    },
+    photoIdentifyType: {
+      // 图匠识别目的(1:店招内容识别,2:门店代码识别,3:调色机识别,4:更换店招)
+      type: String,
+      default: '',
     },
   },
   data() {
     return {
-      url: process.env.VUE_APP_Target1 + process.env.VUE_APP_BASE_API
-    }
+      url: process.env.VUE_APP_Target1 + process.env.VUE_APP_BASE_API,
+    };
   },
   methods: {
     deleteImg(index, collectionItemId) {
-      removePhoto({fileId: collectionItemId}).then(res => {
+      removePhoto({ fileId: collectionItemId }).then((res) => {
         if (res.code == 200) {
-          this.$toast("删除成功!")
+          this.$toast('删除成功!');
           this.imgs.splice(index, 1);
         } else {
-          this.$toast("删除失败!")
+          this.$toast('删除失败!');
         }
-      })
+      });
     },
     previewsImg(index) {
-      var arrimg = []
+      var arrimg = [];
       for (var imgi = 0; imgi < this.imgs.length; imgi++) {
-        arrimg.push(this.imgs[imgi].fileUrl)
+        arrimg.push(this.imgs[imgi].fileUrl);
       }
       ImagePreview({
         images: arrimg,
         startPosition: index,
         onClose() {
           // do something
-        }
+        },
       });
     },
   },
-}
+};
 </script>
 
 <style lang="scss" scoped>

+ 429 - 0
src/components/imageAIVerifyErr copy.vue

@@ -0,0 +1,429 @@
+<template>
+  <div class="imageAIVerifyErr">
+    <el-dialog
+      title=""
+      :visible.sync="vanPopup"
+      width="80%"
+      :append-to-body="true"
+      :close-on-click-modal="false"
+      @close="close"
+      custom-class="AIVerifyErrdialog">
+      <div class="AIVerifyErrMask">
+        <div class="contentAIVerify">
+          <!-- <div class="uploadImgAIVerify" @click="uploadImg(false)" v-if="shopSignChange == 0">
+            <div class="labelAIVerify"><span class="van-f-red-AIVerify">*</span>重新拍照上传</div>
+            <div class="iconAIVerify">
+              <van-icon class="photoAIVerify" name="photograph" size="22px" color="#969696" />
+            </div>
+          </div> -->
+          <div class="errorImg" v-if="shopSignChange == 0">
+            <img
+              v-if="imageAIVerifyData.url"
+              :src="imageAIVerifyData.url"
+              width="100%"
+              height="200px"
+              @click="previewsImg(imageAIVerifyData.url)" />
+            <img v-else :src="imageEmpty" width="100%" height="200px" />
+          </div>
+          <div class="AIVerify">
+            图像识别结果:<span style="color: red">{{ contentMessage }}</span>
+          </div>
+        </div>
+        <!-- shopSignChange 与历史照片是否一致(是否要更换照片) 0一致(要更换),1不一致(不要更换) -->
+        <template v-if="shopSignChange == 0">
+          <template v-if="shotsNum >= 3">
+            <!-- 拜访店招显示 -->
+            <div class="tipsAIVerify" v-if="npkpiData.recognizeType == 1">
+              <van-icon name="question-o" />上传后作为本店标准店招,未来每次拜访时校验。
+            </div>
+            <div class="feedbackMessage">
+              <div class="label">反馈图像识别不正确:</div>
+              <div class="value">
+                <van-field
+                  v-model="feedbackMessage"
+                  rows="1"
+                  autosize
+                  type="textarea"
+                  placeholder="请输入反馈意见" />
+              </div>
+            </div>
+          </template>
+          <div class="uploadBtnAIVerify">
+            <div class="confirmUploadAIVerify" @click="uploadImg(false)">重新拍照</div>
+            <div v-if="shotsNum >= 3" class="stillUploadAIVerify" @click="confirmUpload">
+              仍要上传
+            </div>
+          </div>
+        </template>
+        <template v-if="shopSignChange == 1">
+          <div class="historyImageAIVerify">
+            <!-- 有门店身份证时 只显示门店身份证和本地拜访照 -->
+            <template v-if="imageAIVerifyData.storeIDCardUrl">
+              <div class="storeIDCardUrl imageItemAIVerify">
+                <img
+                  :src="imageAIVerifyData.storeIDCardUrl"
+                  width="100px"
+                  height="100px"
+                  @click="previewsImg(imageAIVerifyData.storeIDCardUrl)" />
+                <span>门店标准店招</span>
+              </div>
+            </template>
+            <template v-else>
+              <div class="initImage imageItemAIVerify">
+                <img
+                  v-if="imageAIVerifyData.createStoreUrl"
+                  :src="imageAIVerifyData.createStoreUrl"
+                  width="100px"
+                  height="100px"
+                  @click="previewsImg(imageAIVerifyData.createStoreUrl)" />
+                <img v-else :src="imageEmpty" width="100px" height="100px" />
+                <span>建店时门店照</span>
+              </div>
+              <div class="newestImage imageItemAIVerify">
+                <img
+                  v-if="imageAIVerifyData.lastVisitUrl"
+                  :src="imageAIVerifyData.lastVisitUrl"
+                  width="100px"
+                  height="100px"
+                  @click="previewsImg(imageAIVerifyData.lastVisitUrl)" />
+                <img v-else :src="imageEmpty" width="100px" height="100px" />
+                <span>上次拜访店招</span>
+              </div>
+            </template>
+            <div class="presentImage imageItemAIVerify">
+              <img
+                v-if="imageAIVerifyData.url"
+                :src="imageAIVerifyData.url"
+                width="100px"
+                height="100px"
+                @click="previewsImg(imageAIVerifyData.url)" />
+              <img v-else :src="imageEmpty" width="100px" height="100px" />
+              <span>本次拜访店招</span>
+            </div>
+          </div>
+          <div class="tipsRemarkAIVerify">
+            <div>若历史照片拍摄不规范,请选择<span style="color: #81b337">更新门店照</span></div>
+            <div>本次拜访店招会作为本店标准店招,未来每次拜访时校验</div>
+          </div>
+          <div class="feedbackMessage">
+            <div class="label">反馈图像识别不正确:</div>
+            <div class="value">
+              <van-field
+                v-model="feedbackMessage"
+                rows="2"
+                autosize
+                type="textarea"
+                placeholder="请输入反馈意见" />
+            </div>
+          </div>
+          <div class="uploadBtnAIVerify">
+            <div class="confirmUploadAIVerify" @click="uploadImg(true)">重新拍照</div>
+            <div class="changeImageAIVerify" @click="confirmUpDataImage()">更新门店照</div>
+          </div>
+        </template>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { ImagePreview } from 'vant';
+import store from '@/store';
+import { mapState } from 'vuex';
+import imageEmpty from '@/assets/imageEmpty.png';
+export default {
+  props: {
+    imageAIVerifyFlag: {
+      type: Boolean,
+      default: false,
+    },
+    imageAIVerifyData: {
+      type: [Array, Object],
+    },
+    source: {
+      // 新建店还是门店拜访 visit/newCreated
+      type: String,
+    },
+  },
+  computed: {
+    ...mapState({
+      shotsNum: (state) => state.otheStore.shotsNum,
+    }),
+  },
+  watch: {
+    imageAIVerifyFlag: {
+      handler(val) {
+        console.log('imageAIVerifyFlag=' + val);
+        if (val) this.initData();
+      },
+      immediate: true,
+    },
+  },
+  data() {
+    return {
+      imageEmpty: imageEmpty,
+      contentMessage: '', //提示内容
+      vanPopup: true,
+      shopSignChange: 0,
+      npkpiData: null,
+      feedbackMessage: '', //反馈图像识别不正确原因
+    };
+  },
+  methods: {
+    initData() {
+      // 图匠识别目的(1:店招内容识别,2:门店代码识别,3:调色机识别,4:更换店招)
+      // shopSignChange  是否更换店招(0:未更换,1:更换) 1不一致,0一致
+      // checkInfo 图片检查结果
+      // cheatState 是否作弊(0:未作弊,1:作弊)
+      // cheatType	作弊类型
+      // qualifiedState 是否合格(0:不合格,1:合格)
+      // unqualifiedReason	不合格原因
+      this.feedbackMessage = '';
+      this.shopSignChange = 0;
+      this.npkpiData =
+        this.source == 'visit'
+          ? this.imageAIVerifyData.npkpiData
+          : this.imageAIVerifyData[0].npkpiData;
+      this.shopSignMatchList = this.npkpiData.shopSignMatchList;
+      // 先判断照片作弊情况,然后是否合格,然后是否和历史照片一致
+      // 作弊和不合格记录识别次数,超过两次弹框提醒
+      if (this.npkpiData.checkInfo) {
+        // 作弊
+        if (this.npkpiData.checkInfo.cheatState == 1) {
+          // 增加识别次数
+          store.dispatch('setShotsNum', this.shotsNum + 1);
+          // 作弊原因
+          this.contentMessage = this.contentMessage + this.npkpiData.checkInfo.cheatType;
+          return;
+        }
+        // 不合格
+        if (this.npkpiData.checkInfo.qualifiedState == 0) {
+          // 增加识别次数
+          store.dispatch('setShotsNum', this.shotsNum + 1);
+          // 不合格原因
+          this.contentMessage = this.contentMessage + this.npkpiData.checkInfo.unqualifiedReason;
+          return;
+        }
+        // recognizeType 识别目的(1:店招内容识别,2:门店代码识别,3:调色机识别)
+        if (this.npkpiData.recognizeType == 1) {
+          this.comparisonImage();
+        } else {
+          this.confirmUpload();
+        }
+      }
+    },
+    // 照片和历史照片是否一致
+    comparisonImage() {
+      this.shopSignChange = this.npkpiData.shopSignChange;
+      if (this.npkpiData.shopSignChange == 1) {
+        this.contentMessage = '与历史照片不一致,请确认店招是否更换?';
+        return false;
+      } else {
+        this.confirmUpDataImage();
+      }
+    },
+    // 重新拍照
+    uploadImg(flag) {
+      // flag: true,识别与历史照片不一致状态下,点击重新拍照,照片识别次数需要加1
+      if (flag) {
+        // 增加识别次数
+        store.dispatch('setShotsNum', this.shotsNum + 1);
+      }
+      this.$emit('close');
+      this.$emit('uploadImgFun');
+    },
+    // 照片是否入库,1.照片识别三次不通过仍要上传,2.照片识别通过
+    // isUpdate:是否更新店招照片,只有门店店招需要更新
+    confirmUpload() {
+      // 拜访店招 不合格或作弊三次先提示是否仍要上传,确认后在判断是否与历史照片一致
+      if (this.npkpiData.recognizeType == 1 && this.shotsNum >= 3) {
+        this.comparisonImage();
+      } else {
+        this.$emit('close');
+        this.$emit('confirmUpload', {
+          data: this.imageAIVerifyData,
+          feedbackMessage: this.feedbackMessage,
+        });
+      }
+    },
+    confirmUpDataImage() {
+      this.$emit('close');
+      this.$emit('confirmUpload', {
+        data: this.imageAIVerifyData,
+        isUpdate: 'true',
+        feedbackMessage: this.feedbackMessage,
+      });
+    },
+    close() {
+      this.$emit('close');
+    },
+    openTips() {
+      this.$dialog
+        .confirm({
+          title: '提示',
+          message: '不规范的照片上传后会更换本店标准店招,未来每次拜访时校验。',
+          showCancelButton: false,
+          className: 'openTips',
+          overlayClass: 'openTipsMask',
+        })
+        .then(() => {});
+    },
+    previewsImg(url) {
+      ImagePreview({
+        images: [url],
+        className: 'AIImageItem',
+        getContainer: 'el-dialog__wrapper',
+      });
+    },
+  },
+};
+</script>
+<style lang="scss">
+.el-dialog__wrapper {
+  z-index: 3333 !important;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background: rgba(0, 0, 0, 0.5) !important;
+  .el-dialog__body {
+    padding: 6px !important;
+  }
+  .el-dialog__header {
+    text-align: center;
+  }
+  .AIVerifyErrdialog {
+    width: 95% !important;
+    margin-top: 1vh !important;
+    border-radius: 8px !important;
+  }
+  .AIVerifyErrMask {
+    width: 100%;
+    padding: 8px;
+    overflow: hidden;
+    /* min-height: 180px; */
+  }
+  .van-popup {
+    width: 90%;
+    padding: 8px;
+    border-radius: 8px;
+    overflow: hidden;
+  }
+  .van-f-red-AIVerify {
+    color: red;
+    width: 8px;
+    display: inline-block;
+    line-height: 26px;
+  }
+  .photoAIVerify {
+    /*margin-top: 9px;*/
+    float: right;
+  }
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    text-align: center;
+    padding: 5px;
+  }
+  .contentAIVerify {
+    .AIVerify {
+      padding: 6px 0;
+      font-size: 14px;
+      /* color: red; */
+      /* text-align: center; */
+      /* border-top: 1px solid #cfcfcf; */
+    }
+    .uploadImgAIVerify {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 8px 0;
+      border-top: 1px solid #cfcfcf;
+      .labelAIVerify {
+        font-size: 14px;
+      }
+    }
+    .errorImg {
+      width: 100%;
+    }
+  }
+  .tipsAIVerify {
+    border-top: 1px solid #cfcfcf;
+    padding: 5px 0;
+    font-size: 14px;
+    color: red;
+    /* white-space: nowrap; */
+  }
+  .uploadBtnAIVerify {
+    /* border-top: 1px solid #cfcfcf; */
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    padding: 8px 0;
+    div {
+      /* width: 40%; */
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-size: 14px;
+      color: #fff;
+      border-radius: 10px;
+      margin: 0 6px;
+      flex: 1;
+    }
+    .confirmUploadAIVerify {
+      background-color: #0057ba;
+      padding: 8px 0;
+    }
+    .changeImageAIVerify {
+      background-color: #81b337;
+      padding: 8px 0;
+    }
+    .stillUploadAIVerify {
+      border: 1px solid #0057ba;
+      color: #0057ba;
+      padding: 8px 0;
+    }
+  }
+  .historyImageAIVerify {
+    display: flex;
+    justify-content: space-around;
+    padding: 5px 0;
+    .imageItemAIVerify {
+      width: 30%;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      span {
+        font-size: 12px;
+      }
+    }
+  }
+  .tipsRemarkAIVerify {
+    border-top: 1px solid #cfcfcf;
+    div {
+      font-size: 12px;
+      padding: 3px 0;
+    }
+  }
+  .feedbackMessage {
+    border-top: 1px solid #cfcfcf;
+    padding: 5px 0;
+    /* width: 100%; */
+    .van-field__body {
+      border: 1px solid #ccc;
+      padding-left: 10px;
+    }
+  }
+}
+.openTipsMask,
+.openTips {
+  z-index: 3334 !important;
+}
+.van-overlay {
+  /* z-index: 3334 !important; */
+}
+.van-image-preview {
+  z-index: 3335 !important;
+  background: rgba(0, 0, 0, 0.8) !important;
+}
+</style>

+ 440 - 0
src/components/imageAIVerifyErr.vue

@@ -0,0 +1,440 @@
+<template>
+  <div class="imageAIVerifyErr">
+    <el-dialog
+      title="图像识别结果"
+      :visible.sync="vanPopup"
+      width="80%"
+      :append-to-body="true"
+      :close-on-click-modal="false"
+      @close="close"
+      custom-class="AIVerifyErrdialog">
+      <div class="AIVerifyErrMask" v-if="npkpiData">
+        <div class="contentAIVerify">
+          <!-- <div class="errorImg" v-if="shopSignChange == 0">
+            <img v-if="url" :src="url" height="200px" @click="previewsImg(url)" />
+            <img v-else :src="imageEmpty" width="100%" height="200px" />
+          </div>
+          <div class="AIVerify">
+            图像识别结果:<span style="color: red">{{ contentMessage }}</span>
+          </div> -->
+        </div>
+        <!-- shopSignChange 与历史照片是否一致(是否要更换照片) 0一致(要更换),1不一致(不要更换) -->
+        <template v-if="shopSignChange == 0">
+          <div class="errorImg">
+            <img v-if="url" :src="url" height="200px" @click="previewsImg(url)" />
+            <img v-else :src="imageEmpty" width="100%" height="200px" />
+          </div>
+          <div class="AIVerify">
+            图像识别结果:<span style="color: red">{{ contentMessage }}</span>
+          </div>
+          <template v-if="shotsNum >= 3">
+            <!-- 拜访店招显示 -->
+            <div class="feedbackMessage">
+              <div class="label">反馈图像识别不正确:</div>
+              <div class="value">
+                <van-field
+                  v-model="feedbackMessage"
+                  rows="1"
+                  autosize
+                  type="textarea"
+                  placeholder="请输入反馈意见" />
+              </div>
+            </div>
+          </template>
+          <div class="uploadBtnAIVerify">
+            <div class="confirmUploadAIVerify" @click="uploadImg(false)">重新拍照</div>
+            <div v-if="shotsNum >= 3" class="stillUploadAIVerify" @click="confirmUpload">
+              仍要上传
+            </div>
+          </div>
+          <template v-if="shotsNum >= 3">
+            <div class="tipsAIVerify" v-if="npkpiData.recognizeType == 1">
+              <van-icon name="question-o" />上传后作为本店标准店招,未来每次拜访时校验。
+            </div>
+          </template>
+        </template>
+        <template v-if="shopSignChange == 1">
+          <div class="historyImageAIVerify">
+            <!-- 有门店身份证时 只显示门店身份证和本地拜访照 -->
+            <template v-if="storeIDCardUrl">
+              <div class="storeIDCardUrl imageItemAIVerify">
+                <img
+                  :src="storeIDCardUrl"
+                  width="100px"
+                  height="100px"
+                  @click="previewsImg(storeIDCardUrl)" />
+                <span>门店标准店招</span>
+              </div>
+            </template>
+            <template v-else>
+              <div class="initImage imageItemAIVerify">
+                <img
+                  v-if="createStoreUrl"
+                  :src="createStoreUrl"
+                  width="100px"
+                  height="100px"
+                  @click="previewsImg(createStoreUrl)" />
+                <img v-else :src="imageEmpty" width="100px" height="100px" />
+                <span>建店时门店照</span>
+              </div>
+              <div class="newestImage imageItemAIVerify">
+                <img
+                  v-if="lastVisitUrl"
+                  :src="lastVisitUrl"
+                  width="100px"
+                  height="100px"
+                  @click="previewsImg(lastVisitUrl)" />
+                <img v-else :src="imageEmpty" width="100px" height="100px" />
+                <span>上次拜访店招</span>
+              </div>
+            </template>
+            <div class="presentImage imageItemAIVerify">
+              <img v-if="url" :src="url" width="100px" height="100px" @click="previewsImg(url)" />
+              <img v-else :src="imageEmpty" width="100px" height="100px" />
+              <span>本次拜访店招</span>
+            </div>
+          </div>
+          <div class="AIVerify">
+            图像识别结果:<span style="color: red">{{ contentMessage }}</span>
+          </div>
+          <div class="feedbackMessage">
+            <div class="label">反馈图像识别不正确:</div>
+            <div class="value">
+              <van-field
+                v-model="feedbackMessage"
+                rows="2"
+                autosize
+                type="textarea"
+                placeholder="请输入反馈意见" />
+            </div>
+          </div>
+          <div class="uploadBtnAIVerify">
+            <div class="confirmUploadAIVerify" @click="uploadImg(true)">重新拍照</div>
+            <div class="changeImageAIVerify" @click="confirmUpDataImage()">更新门店照</div>
+          </div>
+          <div class="tipsRemarkAIVerify">
+            <div>若历史照片拍摄不规范,请选择<span style="color: #81b337">更新门店照</span></div>
+            <div>本次拜访店招会作为本店标准店招,未来每次拜访时校验</div>
+          </div>
+        </template>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { ImagePreview } from 'vant';
+import store from '@/store';
+import { mapState } from 'vuex';
+import imageEmpty from '@/assets/imageEmpty.png';
+export default {
+  props: {
+    imageAIVerifyFlag: {
+      type: Boolean,
+      default: false,
+    },
+    imageAIVerifyData: {
+      type: [Array, Object],
+    },
+    source: {
+      // 新建店还是门店拜访 visit/newCreated
+      type: String,
+    },
+  },
+  computed: {
+    ...mapState({
+      shotsNum: (state) => state.otheStore.shotsNum,
+    }),
+  },
+  watch: {
+    imageAIVerifyFlag: {
+      handler(val) {
+        console.log('imageAIVerifyFlag=' + val);
+        if (val) this.initData();
+      },
+      immediate: true,
+    },
+  },
+  data() {
+    return {
+      imageEmpty: imageEmpty,
+      contentMessage: '', //提示内容
+      vanPopup: true,
+      shopSignChange: 0,
+      npkpiData: null,
+      feedbackMessage: '', //反馈图像识别不正确原因
+      url: '', //	本次图片路径
+      createStoreUrl: '', //	建店时店招
+      lastVisitUrl: '', //	上次拜访时店招
+      storeIDCardUrl: '', //	门店身份证
+    };
+  },
+  methods: {
+    initData() {
+      // 图匠识别目的(1:店招内容识别,2:门店代码识别,3:调色机识别,4:更换店招)
+      // shopSignChange  是否更换店招(0:未更换,1:更换) 1不一致,0一致
+      // checkInfo 图片检查结果
+      // cheatState 是否作弊(0:未作弊,1:作弊)
+      // cheatType	作弊类型
+      // qualifiedState 是否合格(0:不合格,1:合格)
+      // unqualifiedReason	不合格原因
+      this.feedbackMessage = '';
+      this.shopSignChange = 0;
+      this.npkpiData =
+        this.source == 'visit'
+          ? this.imageAIVerifyData.npkpiData
+          : this.imageAIVerifyData[0].npkpiData;
+      let imageAIVerifyData =
+        this.source == 'visit' ? this.imageAIVerifyData : this.imageAIVerifyData[0];
+      this.shopSignMatchList = this.npkpiData.shopSignMatchList;
+      this.url = imageAIVerifyData.url || ''; //	图片路径
+      this.createStoreUrl = imageAIVerifyData.createStoreUrl || ''; //	建店时店招
+      this.lastVisitUrl = imageAIVerifyData.lastVisitUrl || ''; //	上次拜访时店招
+      this.storeIDCardUrl = imageAIVerifyData.storeIDCardUrl || ''; //	门店身份证
+      // 先判断照片作弊情况,然后是否合格,然后是否和历史照片一致
+      // 作弊和不合格记录识别次数,超过两次弹框提醒
+      if (this.npkpiData.checkInfo) {
+        // 作弊
+        if (this.npkpiData.checkInfo.cheatState == 1) {
+          // 增加识别次数
+          store.dispatch('setShotsNum', this.shotsNum + 1);
+          // 作弊原因
+          this.contentMessage = this.contentMessage + this.npkpiData.checkInfo.cheatType;
+          return;
+        }
+        // 不合格
+        if (this.npkpiData.checkInfo.qualifiedState == 0) {
+          // 增加识别次数
+          store.dispatch('setShotsNum', this.shotsNum + 1);
+          // 不合格原因
+          this.contentMessage = this.contentMessage + this.npkpiData.checkInfo.unqualifiedReason;
+          return;
+        }
+        // recognizeType 识别目的(1:店招内容识别,2:门店代码识别,3:调色机识别)
+        if (this.npkpiData.recognizeType == 1) {
+          this.comparisonImage();
+        } else {
+          this.confirmUpload();
+        }
+      }
+    },
+    // 照片和历史照片是否一致
+    comparisonImage() {
+      this.shopSignChange = this.npkpiData.shopSignChange;
+      if (this.npkpiData.shopSignChange == 1) {
+        this.contentMessage = '与历史照片不一致,请确认店招是否更换?';
+        return false;
+      } else {
+        this.confirmUpDataImage();
+      }
+    },
+    // 重新拍照
+    uploadImg(flag) {
+      // flag: true,识别与历史照片不一致状态下,点击重新拍照,照片识别次数需要加1
+      if (flag) {
+        // 增加识别次数
+        store.dispatch('setShotsNum', this.shotsNum + 1);
+      }
+      this.$emit('close');
+      this.$emit('uploadImgFun');
+    },
+    // 照片是否入库,1.照片识别三次不通过仍要上传,2.照片识别通过
+    // isUpdate:是否更新店招照片,只有门店店招需要更新
+    confirmUpload() {
+      // 拜访店招 不合格或作弊三次先提示是否仍要上传,确认后在判断是否与历史照片一致
+      if (this.npkpiData.recognizeType == 1 && this.shotsNum >= 3) {
+        this.comparisonImage();
+      } else {
+        this.$emit('close');
+        this.$emit('confirmUpload', {
+          data: this.imageAIVerifyData,
+          feedbackMessage: this.feedbackMessage,
+        });
+      }
+    },
+    confirmUpDataImage() {
+      this.$emit('close');
+      this.$emit('confirmUpload', {
+        data: this.imageAIVerifyData,
+        isUpdate: 'true',
+        feedbackMessage: this.feedbackMessage,
+      });
+    },
+    close() {
+      this.$emit('close');
+    },
+    openTips() {
+      this.$dialog
+        .confirm({
+          title: '提示',
+          message: '不规范的照片上传后会更换本店标准店招,未来每次拜访时校验。',
+          showCancelButton: false,
+          className: 'openTips',
+          overlayClass: 'openTipsMask',
+        })
+        .then(() => {});
+    },
+    previewsImg(url) {
+      ImagePreview({
+        images: [url],
+        className: 'AIImageItem',
+        getContainer: 'el-dialog__wrapper',
+      });
+    },
+  },
+};
+</script>
+<style lang="scss">
+.el-dialog__wrapper {
+  z-index: 3333 !important;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background: rgba(0, 0, 0, 0.5) !important;
+  .el-dialog__body {
+    padding: 6px !important;
+  }
+  .el-dialog__header {
+    text-align: center;
+  }
+  .AIVerifyErrdialog {
+    width: 95% !important;
+    margin-top: 1vh !important;
+    border-radius: 8px !important;
+  }
+  .AIVerifyErrMask {
+    width: 100%;
+    padding: 8px;
+    overflow: hidden;
+    /* min-height: 180px; */
+    .errorImg {
+      width: 100%;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+    .AIVerify {
+      padding: 6px 0;
+      font-size: 14px;
+      /* color: red; */
+      /* text-align: center; */
+      /* border-top: 1px solid #cfcfcf; */
+    }
+  }
+  .van-popup {
+    width: 90%;
+    padding: 8px;
+    border-radius: 8px;
+    overflow: hidden;
+  }
+  .van-f-red-AIVerify {
+    color: red;
+    width: 8px;
+    display: inline-block;
+    line-height: 26px;
+  }
+  .photoAIVerify {
+    /*margin-top: 9px;*/
+    float: right;
+  }
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    text-align: center;
+    padding: 5px;
+  }
+  .contentAIVerify {
+    .uploadImgAIVerify {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 8px 0;
+      border-top: 1px solid #cfcfcf;
+      .labelAIVerify {
+        font-size: 14px;
+      }
+    }
+  }
+  .tipsAIVerify {
+    /* border-top: 1px solid #cfcfcf; */
+    padding: 5px 0;
+    font-size: 14px;
+    color: red;
+    /* white-space: nowrap; */
+  }
+  .uploadBtnAIVerify {
+    /* border-top: 1px solid #cfcfcf; */
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    padding: 8px 0;
+    div {
+      /* width: 40%; */
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-size: 14px;
+      color: #fff;
+      border-radius: 10px;
+      margin: 0 6px;
+      flex: 1;
+    }
+    .confirmUploadAIVerify {
+      background-color: #0057ba;
+      padding: 8px 0;
+    }
+    .changeImageAIVerify {
+      background-color: #81b337;
+      padding: 8px 0;
+    }
+    .stillUploadAIVerify {
+      border: 1px solid #0057ba;
+      color: #0057ba;
+      padding: 8px 0;
+    }
+  }
+  .historyImageAIVerify {
+    display: flex;
+    justify-content: space-around;
+    padding: 5px 0;
+    .imageItemAIVerify {
+      width: 30%;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      span {
+        font-size: 12px;
+        padding-top: 3px;
+      }
+    }
+  }
+  .tipsRemarkAIVerify {
+    border-top: 1px solid #cfcfcf;
+    padding: 3px 0;
+    div {
+      font-size: 12px;
+      padding: 3px 0;
+    }
+  }
+  .feedbackMessage {
+    border-top: 1px solid #cfcfcf;
+    padding: 5px 0;
+    /* width: 100%; */
+    .van-field__body {
+      border: 1px solid #ccc;
+      padding-left: 10px;
+    }
+  }
+}
+.openTipsMask,
+.openTips {
+  z-index: 3334 !important;
+}
+.van-overlay {
+  /* z-index: 3334 !important; */
+}
+.van-image-preview {
+  z-index: 3335 !important;
+  background: rgba(0, 0, 0, 0.8) !important;
+}
+</style>

+ 161 - 18
src/components/uploadImgVStore.vue

@@ -17,6 +17,23 @@
       </p>
     </div>
     <p style="text-align: center">{{ imgText }}</p>
+    <div class="mask" v-if="progressFlag">
+      <el-progress
+        type="circle"
+        :percentage="percentage"
+        :show-text="true"
+        :format="format"></el-progress>
+      <div class="progressClose" @click="progressClose">取消</div>
+    </div>
+    <imageAIVerifyErr
+      v-if="imageAIVerifyFlag"
+      :imageAIVerifyFlag="imageAIVerifyFlag"
+      :imageAIVerifyData="imageAIVerifyData"
+      @confirmUpload="confirmUpload"
+      @uploadImgFun="uploadImg"
+      :source="'newCreated'"
+      @normalFlow="normalFlow"
+      @close="close"></imageAIVerifyErr>
   </div>
 </template>
 
@@ -24,9 +41,10 @@
 import { ImagePreview } from 'vant';
 import axios from 'axios';
 import { uploadImagev } from '@/api/index';
-
+import imageAIVerifyErr from './imageAIVerifyErr';
 export default {
   name: 'uploadImg',
+  components: { imageAIVerifyErr },
   props: {
     uploadid: {
       type: String,
@@ -59,6 +77,11 @@ export default {
       type: Number,
       default: 1,
     },
+    photoIdentifyType: {
+      // 图匠识别目的(1:店招内容识别,2:门店代码识别,3:调色机识别,4:更换店招)
+      type: String,
+      default: '',
+    },
   },
   data() {
     return {
@@ -68,6 +91,12 @@ export default {
       num: 0,
       serverIdArr: [],
       imgUrlArr: [],
+      progressFlag: false,
+      percentage: 0,
+      timeFlag: null,
+      imageAIVerifyFlag: false,
+      imageAIVerifyData: null, //图匠校验返回的数据
+      controller: null, //取消请求状态
     };
   },
   watch: {
@@ -128,6 +157,9 @@ export default {
       });
     },
     uploadImagev(meidaId) {
+      // 初始化重置 图匠校验
+      this.resetProgress();
+      this.close();
       var that = this;
       var form = {
         mediaId: meidaId,
@@ -135,26 +167,103 @@ export default {
         locationRemark: localStorage.getItem('locationRemark'),
         deptName: localStorage.getItem('deptName'),
       };
-      var loind1 = that.$toast.loading({
-        duration: 0,
-        message: '上传中...',
-        forbidClick: true,
+      this.controller = null;
+      // 需要图匠校验的添加参数和loading
+      if (this.photoIdentifyType) {
+        form.photoIdentifyType = this.photoIdentifyType;
+        this.progress();
+        this.controller = new AbortController(); //取消请求
+      } else {
+        this.toastLoading(0, '上传中...', true);
+      }
+      uploadImagev(form, this.controller ? this.controller.signal : null)
+        .then((res) => {
+          this.toastLoading().clear();
+          if (res.code == -1) {
+            // 图匠图片校验接口超时
+            this.requestTimeOut(res);
+          } else if (res.code == 200) {
+            // 图匠校验结果返回
+            if (this.photoIdentifyType) {
+              // 重置loaidng状态
+              this.resetProgress();
+              this.imageAIVerifyFlag = true;
+              console.log('res.data=' + JSON.stringify(res.data));
+              this.imageAIVerifyData = res.data;
+            } else {
+              // 正常流程
+              this.normalFlow(res);
+            }
+          } else {
+            this.resetProgress();
+            that.$toast('上传失败!');
+          }
+        })
+        .catch((error) => {
+          if (error.message === 'canceled') {
+            this.$toast('取消上传');
+            console.log('请求被取消:', error.message);
+          }
+          this.resetProgress();
+        });
+    },
+    progress() {
+      // 后端接口20000ms后失效,每1000m progress加10,到90停止;
+      this.progressFlag = true;
+      this.percentage = 10;
+      this.timeFlag = setInterval(() => {
+        this.percentage = this.percentage + 10;
+        if (this.percentage == 90) clearInterval(this.timeFlag);
+      }, 1000);
+    },
+    format(percentage) {
+      return `${percentage} %\n图像识别中`;
+    },
+    requestTimeOut(res) {
+      this.resetProgress();
+      this.close();
+      this.$dialog
+        .confirm({
+          title: '系统提示',
+          message: res.msg,
+          showCancelButton: false,
+        })
+        .then(() => {
+          this.normalFlow(res);
+        });
+    },
+    // 正常流程
+    normalFlow(res) {
+      let imgArr = [];
+      let businessId = [];
+      res.data.forEach((item) => {
+        imgArr.push(item.url);
+        if (item.businessId) businessId.push(item.businessId);
       });
-      uploadImagev(form).then((res) => {
-        if (res.code == 200) {
-          // that.imgArr = res.data.url;
-          let imgArr = [];
-          res.data.forEach((item) => {
-            imgArr.push(item.url);
-          });
-          loind1.clear();
-          that.$toast('上传成功!');
-          that.$emit('newimgarr', { fileUrl: imgArr.join(','), type: that.type });
-        } else {
-          that.$toast('上传失败!');
-        }
+      this.$toast('上传成功!');
+      this.$emit('newimgarr', {
+        fileUrl: imgArr.join(','),
+        type: this.type,
+        businessId: businessId.join(','),
       });
     },
+    // 重置loaidng状态
+    resetProgress() {
+      this.percentage = 100;
+      clearInterval(this.timeFlag);
+      this.progressFlag = false;
+      this.percentage = 0;
+    },
+    // 取消图片上传
+    progressClose() {
+      this.controller.abort();
+    },
+    confirmUpload(res) {
+      this.normalFlow(res);
+    },
+    close() {
+      this.imageAIVerifyFlag = false;
+    },
   },
 };
 </script>
@@ -212,4 +321,38 @@ export default {
 .coverImg .ico {
   top: 42%;
 }
+.mask {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  width: 100%;
+  height: 100%;
+  background: rgba(255, 255, 255, 0.8);
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  z-index: 99999999;
+  display: flex;
+  flex-direction: column;
+  .progressClose {
+    width: 70px;
+    text-align: center;
+    background: #67c23a;
+    color: #fff;
+    height: 30px;
+    line-height: 30px;
+    border-radius: 5px;
+    margin-top: 5px;
+    font-size: 12px;
+  }
+}
+</style>
+<style lang="scss">
+.mask {
+  .el-progress__text {
+    white-space: pre-wrap;
+  }
+}
 </style>

+ 1 - 1
src/components/uploadImgVStorec.vue

@@ -45,7 +45,7 @@ export default {
       default: 1,
     },
     imgArr: {
-      type: String,
+      type: [String, Array],
       default: '',
     },
   },

+ 194 - 16
src/components/uploadVNormal.vue

@@ -4,15 +4,35 @@
       <van-icon class="photo photos" name="photograph" size="22px" color="#969696" />
     </div>
     <div id="allmap"></div>
+    <div class="mask" v-if="progressFlag">
+      <el-progress
+        type="circle"
+        :percentage="percentage"
+        :show-text="true"
+        :width="110"
+        :format="format"></el-progress>
+      <div class="progressClose" @click="progressClose">取消</div>
+    </div>
+    <imageAIVerifyErr
+      v-if="imageAIVerifyFlag"
+      :imageAIVerifyFlag="imageAIVerifyFlag"
+      :imageAIVerifyData="imageAIVerifyData"
+      @confirmUpload="confirmUpload"
+      @uploadImgFun="uploadImg"
+      :source="'visit'"
+      @normalFlow="normalFlow"
+      @close="close"></imageAIVerifyErr>
   </div>
 </template>
 
 <script>
-import { addstorePhoto, addVisitsPosition } from '@/api/index';
+import { addstorePhoto, addVisitsPosition, addPhotoToDB } from '@/api/index';
+import imageAIVerifyErr from './imageAIVerifyErr';
 import axios from 'axios';
 
 export default {
   name: 'uploadImg',
+  components: { imageAIVerifyErr },
   props: {
     uploadid: {
       type: String,
@@ -27,7 +47,7 @@ export default {
       default: '',
     },
     secondCollectionId: {
-      type: String,
+      type: [String, Number],
       default: '',
     },
     firstCollectionId: {
@@ -80,11 +100,24 @@ export default {
       type: String,
       default: '',
     },
+    photoIdentifyType: {
+      // 图匠识别目的(1:店招内容识别,2:门店代码识别,3:调色机识别,4:更换店招)
+      type: String,
+      default: '',
+    },
   },
   data() {
     return {
       shows: false,
       url: '',
+      progressFlag: false,
+      percentage: 0,
+      timeFlag: null,
+      imageAIVerifyFlag: false,
+      imageAIVerifyData: null, //图匠校验返回的数据
+      meidaId: '', //当前上传图片id
+      addressesRemark: '', //当前位置信息
+      controller: null, //取消请求状态
     };
   },
   methods: {
@@ -160,10 +193,10 @@ export default {
               });
               wx.chooseImage({
                 count: 1,
-                sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
+                sizeType: ['original'], // 可以指定是原图还是压缩图,默认二者都有
                 sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
                 defaultCameraMode: 'normal', //表示进入拍照界面的默认模式,目前有normal与batch两种选择,normal表示普通单拍模式,batch表示连拍模式,不传该参数则为normal模式。从3.0.26版本开始支持front和batch_front两种值,其中front表示默认为前置摄像头单拍模式,batch_front表示默认为前置摄像头连拍模式。(注:用户进入拍照界面仍然可自由切换两种模式)
-                isSaveToAlbum: 0,
+                isSaveToAlbum: 0, //整型值,0表示拍照时不保存到系统相册,1表示自动保存,默认值是1
                 success: function (res) {
                   var localIds = '';
                   if (res.localIds != undefined) {
@@ -185,6 +218,9 @@ export default {
         });
     },
     uploadImagev(meidaId, addressesRemark) {
+      // 初始化重置 图匠校验
+      this.resetProgress();
+      this.close();
       var that = this;
       var parentCollectionId = null;
       if (that.parentCollectionId != null && that.parentCollectionId != 'null') {
@@ -206,6 +242,8 @@ export default {
       if (that.thirdCollectionId != null && that.thirdCollectionId != 'null') {
         thirdCollectionId = that.thirdCollectionId;
       }
+      this.meidaId = meidaId;
+      this.addressesRemark = addressesRemark;
       var form = {
         mediaId: meidaId,
         collectionItemId: that.collectionId,
@@ -224,20 +262,126 @@ export default {
         deviceCode: that.deviceCode, //设备编号
         putInCode: that.putInCode, //投放编号
       };
-      var loind1 = that.$toast.loading({
-        duration: 0,
-        message: '上传中...',
-        forbidClick: true,
+      this.controller = null;
+      // 需要图匠校验的添加参数和loading
+      if (this.photoIdentifyType) {
+        form.photoIdentifyType = this.photoIdentifyType;
+        this.progress();
+        this.controller = new AbortController(); //取消请求
+      } else {
+        this.toastLoading(0, '上传中...', true);
+      }
+      addstorePhoto(form, this.controller ? this.controller.signal : null)
+        .then((res) => {
+          this.toastLoading().clear();
+          if (res.code == -1) {
+            // 图匠图片校验接口超时
+            this.requestTimeOut(res);
+          } else if (res.code == 200) {
+            // 图匠校验结果返回
+            if (this.photoIdentifyType) {
+              // 重置loaidng状态
+              this.resetProgress();
+              this.imageAIVerifyFlag = true;
+              this.imageAIVerifyData = res.data;
+            } else {
+              // 正常流程
+              this.normalFlow(res);
+            }
+          } else {
+            this.resetProgress();
+            that.$toast('上传失败!');
+          }
+        })
+        .catch((error) => {
+          if (error.message === 'canceled') {
+            this.$toast('取消上传');
+            console.log('请求被取消:', error.message);
+          }
+          this.resetProgress();
+        });
+    },
+    // 正常流程
+    normalFlow(res) {
+      this.$toast('上传成功!');
+      this.$emit('newimgarr', {
+        fileUrl: res.data.url,
+        id: res.data.fileId,
+        type: 2,
+        photoIdentifyType: this.photoIdentifyType,
       });
-      addstorePhoto(form).then((res) => {
-        if (res.code == 200) {
-          loind1.clear();
-          that.$toast('上传成功!');
-          that.$emit('newimgarr', { fileUrl: res.data.url, id: res.data.fileId, type: 2 });
-        } else {
-          that.$toast('上传失败!');
+    },
+    progress() {
+      // 后端接口20000ms后失效,每1000m progress加10,到90停止;
+      this.progressFlag = true;
+      this.percentage = 10;
+      this.timeFlag = setInterval(() => {
+        this.percentage = this.percentage + 10;
+        if (this.percentage == 90) clearInterval(this.timeFlag);
+      }, 1000);
+    },
+    format(percentage) {
+      return `${percentage} %\n图像识别中`;
+    },
+    // 重置loaidng状态
+    resetProgress() {
+      this.percentage = 100;
+      clearInterval(this.timeFlag);
+      this.progressFlag = false;
+      this.percentage = 0;
+    },
+    // 照片是否入库,1.照片识别三次不通过仍要上传,2.照片识别通过
+    // isUpdate:是否更新店招照片,只有门店店招需要更新
+    confirmUpload(res) {
+      if (this.photoIdentifyType) {
+        var form = {
+          mediaId: this.meidaId, //	string	图片素材id
+          visitSource: '1', //	Long	拜访模式
+          storeGroupId: this.storeGroupId, //	string	门店任务组,多个用逗号隔开
+          visitsId: localStorage.getItem('visitId'), //	string	拜访id
+          taskId: this.taskId, //	string	任务id
+          objectType: this.objectType, //	string	照片类型,取任务上的照片类型,如果没有则取手动选择的照片类型
+          locationRemark: this.addressesRemark, //	String	当前地址信息
+          firstCollectionId: this.firstCollectionId, //	Long	第一级采集项id,取当前采集项的字段就行
+          secondCollectionId: this.secondCollectionId, //	Long	第二级采集项id,取当前采集项的字段就行
+          putInCode: this.putInCode, //	String	当前任务对应的投放编号
+          deviceCode: this.deviceCode, //	String	当前任务对应的设备编号
+          collectionItemId: this.collectionId,
+          url: res.data.url, //	String	当前拍摄图片的url
+          businessId: res.data.businessId, // 当前拍摄图片id
+        };
+        if (res.isUpdate) {
+          form.isUpdate = 'true';
+          form.feedbackMessage = res.feedbackMessage;
         }
-      });
+        addPhotoToDB(form).then((resData) => {
+          if (resData.code == 200) {
+            console.log(resData);
+            res.data.fileId = resData.data.fileId;
+            this.normalFlow(res);
+          }
+        });
+      }
+    },
+    close() {
+      this.imageAIVerifyFlag = false;
+    },
+    requestTimeOut(res) {
+      this.resetProgress();
+      this.close();
+      this.$dialog
+        .confirm({
+          title: '系统提示',
+          message: res.msg,
+          showCancelButton: false,
+        })
+        .then(() => {
+          this.confirmUpload(res);
+        });
+    },
+    // 取消图片上传
+    progressClose() {
+      this.controller.abort();
     },
   },
 };
@@ -270,6 +414,33 @@ export default {
       z-index: 89;
     }
   }
+  .mask {
+    position: fixed;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    width: 100%;
+    height: 100%;
+    background: rgba(255, 255, 255, 1);
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    z-index: 99999999;
+    display: flex;
+    flex-direction: column;
+    .progressClose {
+      width: 70px;
+      text-align: center;
+      background: #67c23a;
+      color: #fff;
+      height: 30px;
+      line-height: 30px;
+      border-radius: 5px;
+      margin-top: 5px;
+      font-size: 12px;
+    }
+  }
 }
 #allmap {
   width: 10px;
@@ -278,3 +449,10 @@ export default {
   position: relative;
 }
 </style>
+<style lang="scss">
+.mask {
+  .el-progress__text {
+    white-space: pre-wrap;
+  }
+}
+</style>

+ 8 - 0
src/main.js

@@ -15,6 +15,7 @@ import {
   Micrometer,
   weeklyTimeDivision,
   gcj02BD,
+  verifyStoreType,
 } from '@/utils/index';
 import { toastLoading } from '@/utils/commonVant';
 import '@vant/touch-emulator';
@@ -32,11 +33,17 @@ import ElPopover from 'element-ui/lib/popover';
 import 'element-ui/lib/theme-chalk/table-column.css';
 import 'element-ui/lib/theme-chalk/popover.css';
 import Vconsole from 'vconsole';
+import ElProgress from 'element-ui/lib/progress';
+import 'element-ui/lib/theme-chalk/progress.css';
+import ElDialog from 'element-ui/lib/dialog';
+import 'element-ui/lib/theme-chalk/dialog.css';
 // import wx from 'weixin-js-sdk';
 
 Vue.use(ElTable);
 Vue.use(ElTableColumn);
 Vue.use(ElPopover);
+Vue.use(ElProgress);
+Vue.use(ElDialog);
 Vue.config.productionTip = false;
 Vue.prototype.parseTime = parseTime;
 Vue.prototype.selectDictLabel = selectDictLabel;
@@ -50,6 +57,7 @@ Vue.prototype.twoPointSum = twoPointSum;
 Vue.prototype.wx = wx;
 Vue.prototype.parseTimeParagraph = parseTimeParagraph;
 Vue.prototype.Micrometer = Micrometer;
+Vue.prototype.verifyStoreType = verifyStoreType;
 Vue.prototype.Toast = Toast;
 Vue.prototype.notify = Notify;
 var clipboard = new ClipboardJS('.btn');

+ 33 - 9
src/mixin/clew.js

@@ -114,25 +114,49 @@ export const clewMixins = {
           } else if (optionList[i].answerType == 'bg') {
             // 表格
             let tableData = optionList[i].tableData;
-            if (!this.filterBGData(tableData).length) {
+            let filterBGData = this.filterBGData(tableData);
+            if (filterBGData.hasAllFilledRow && filterBGData.filledRow == '') {
+              optionList[i].answerValue = JSON.stringify(tableData);
+            } else {
               this.requiredFlag = false;
-              this.requiredMessage = '请填写' + optionList[i].customerClueName;
+              this.requiredMessage =
+                filterBGData.filledRow != ''
+                  ? filterBGData.filledRow
+                  : '请填写' + optionList[i].customerClueName;
               return;
-            } else {
-              optionList[i].answerValue = JSON.stringify(tableData);
             }
           }
         }
       }
     },
     filterBGData(tableData) {
-      let data = [];
-      const isValid = tableData.data.some((row) => {
-        if (Object.values(row).every((value) => value.trim() !== '')) {
-          data.push(row);
+      // 如果一行中有一个输入框输入了内容,其他输入框没有内容,就弹框提示当前行其它输入框也要填写,
+      // 整个表格必须有一行所有输入框都输入了内容
+      let hasAllFilledRow = false; // 是否有整行都填写
+      let filledRow = ''; // 有内容行
+      tableData.data.forEach((row, rowIndex) => {
+        const hasContent = Object.values(row).some(
+          (cell, index) => index !== 0 && cell.trim() !== ''
+        );
+        const allFilled = Object.values(row).every((cell, index) => {
+          return cell.trim() !== '';
+        });
+        if (hasContent && !allFilled) {
+          filledRow = `${row.typeName}请填写完整`;
+          return;
+        }
+        if (allFilled) {
+          hasAllFilledRow = true;
         }
       });
-      return data;
+      return { hasAllFilledRow, filledRow };
+      // let data = [];
+      // const isValid = tableData.data.some((row) => {
+      //   if (Object.values(row).every((value) => value.trim() !== '')) {
+      //     data.push(row);
+      //   }
+      // });
+      // return data;
     },
   },
 };

+ 2 - 0
src/store/getters.js

@@ -1,6 +1,8 @@
 const getters = {
   userInfo: (state) => state.user.userInfo,
   refreshClewPage: (state) => state.isRefreshPage.refreshClewPage,
+  storeType: (state) => state.user.storeType,
+  shotsNum: (state) => state.otheStore.shotsNum,
   deviceOutsidePage: (state) => state.isRefreshPage.deviceOutsidePage,
 };
 export default getters;

+ 2 - 0
src/store/index.js

@@ -2,6 +2,7 @@ import Vue from 'vue';
 import Vuex from 'vuex';
 import user from './modules/user';
 import isRefreshPage from './modules/isRefreshPage';
+import otheStore from './modules/otheStore';
 import getters from './getters';
 
 Vue.use(Vuex);
@@ -10,6 +11,7 @@ const store = new Vuex.Store({
   modules: {
     user,
     isRefreshPage,
+    otheStore,
   },
   getters,
 });

+ 19 - 0
src/store/modules/otheStore.js

@@ -0,0 +1,19 @@
+const otheStore = {
+  state: {
+    shotsNum: 0,
+  },
+
+  mutations: {
+    SET_SHOTS_NUM: (state, value) => {
+      state.shotsNum = value;
+    },
+  },
+
+  actions: {
+    setShotsNum({ commit }, value) {
+      commit('SET_SHOTS_NUM', value);
+    },
+  },
+};
+
+export default otheStore;

+ 10 - 3
src/store/modules/user.js

@@ -1,10 +1,10 @@
-import { getMobileUserInfo } from '@/api/index';
-import { selectAllocationPermission } from '@/api/week';
+import { getMobileUserInfo, getDictOption } from '@/api/index';
 
 const user = {
   state: {
     userInfo: null,
     activaTypeStore: null,
+    storeType: [],
   },
 
   mutations: {
@@ -17,6 +17,9 @@ const user = {
     SET_ASSIGN_FLAG: (state, value) => {
       state.isAssignFlag = value;
     },
+    SET_STORE_TYPE: (state, value) => {
+      state.storeType = value;
+    },
   },
 
   actions: {
@@ -32,7 +35,11 @@ const user = {
             localStorage.setItem('deptLevel', res.data.depts[0].deptLevel);
             localStorage.setItem('userId', res.data.userId);
             localStorage.setItem('deptIds', JSON.stringify(res.data.deptIds));
-            resolve();
+            // 门店类型
+            getDictOption({}, 'sfa_store_type').then((res) => {
+              commit('SET_STORE_TYPE', res.data);
+              resolve();
+            });
           })
           .catch((error) => {
             reject(error);

+ 1 - 0
src/utils/TXApiFun.js

@@ -136,6 +136,7 @@ export function getTicketFun(jsApiList = ['getLocation'], configType = 'config')
       } else {
         console.log('获取签名失败');
         reject('获取签名失败');
+        alert('获取签名失败');
       }
     });
   });

+ 168 - 138
src/utils/index.js

@@ -1,189 +1,219 @@
+import store from '../store';
+
 // 日期格式化
 export function parseTime(time, pattern) {
-    if(time!="null"){
+  if (time != 'null') {
     if (arguments.length === 0 || !time) {
-        return null
+      return null;
     }
-    const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
-    let date
+    const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}';
+    let date;
     if (typeof time === 'object') {
-        date = time
+      date = time;
     } else {
-        if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
-            time = parseInt(time)
-        } else if (typeof time === 'string') {
-            time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '');
-        }
-        if ((typeof time === 'number') && (time.toString().length === 10)) {
-            time = time * 1000
-        }
-        date = new Date(time)
+      if (typeof time === 'string' && /^[0-9]+$/.test(time)) {
+        time = parseInt(time);
+      } else if (typeof time === 'string') {
+        time = time
+          .replace(new RegExp(/-/gm), '/')
+          .replace('T', ' ')
+          .replace(new RegExp(/\.[\d]{3}/gm), '');
+      }
+      if (typeof time === 'number' && time.toString().length === 10) {
+        time = time * 1000;
+      }
+      date = new Date(time);
     }
     const formatObj = {
-        y: date.getFullYear(),
-        m: date.getMonth() + 1,
-        d: date.getDate(),
-        h: date.getHours(),
-        i: date.getMinutes(),
-        s: date.getSeconds(),
-        a: date.getDay()
-    }
+      y: date.getFullYear(),
+      m: date.getMonth() + 1,
+      d: date.getDate(),
+      h: date.getHours(),
+      i: date.getMinutes(),
+      s: date.getSeconds(),
+      a: date.getDay(),
+    };
     const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
-        let value = formatObj[key]
-        // Note: getDay() returns 0 on Sunday
-        if (key === 'a') {
-            return ['日', '一', '二', '三', '四', '五', '六'][value]
-        }
-        if (result.length > 0 && value < 10) {
-            value = '0' + value
-        }
-        return value || 0
-    })
-    return time_str
-    }else{
-        return ""
-    }
+      let value = formatObj[key];
+      // Note: getDay() returns 0 on Sunday
+      if (key === 'a') {
+        return ['日', '一', '二', '三', '四', '五', '六'][value];
+      }
+      if (result.length > 0 && value < 10) {
+        value = '0' + value;
+      }
+      return value || 0;
+    });
+    return time_str;
+  } else {
+    return '';
+  }
 }
 // 千分号
 export function Micrometer(num) {
-    if(num!=null){
-    let numt = (num || 0).toString().split(".");
+  if (num != null) {
+    let numt = (num || 0).toString().split('.');
     if (numt[1] == undefined) {
-        return numt[0].replace(/(\d)(?=(?:\d{3})+$)/g, "$1,");
+      return numt[0].replace(/(\d)(?=(?:\d{3})+$)/g, '$1,');
     } else {
-        return numt[0].replace(/(\d)(?=(?:\d{3})+$)/g, "$1,") + "." + numt[1];
-    }
-    }else{
-        return 0.00
+      return numt[0].replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') + '.' + numt[1];
     }
+  } else {
+    return 0.0;
+  }
 }
-export function weeklyTimeDivision(time,type){
-    if(type==0){
-        return time.split(" ")[0]+"  "
-    }else{
-        return time.split(" ")[1]
-    }
+export function weeklyTimeDivision(time, type) {
+  if (type == 0) {
+    return time.split(' ')[0] + '  ';
+  } else {
+    return time.split(' ')[1];
+  }
 }
 export function parseTimeParagraph(dayTime) {
-    var currentDate = new Date(dayTime)
-    var timesStamp = currentDate.getTime();
-    var currenDay = currentDate.getDay();
-    var dates = [];
-    var   tabTime=[]
-    for (var i = 0; i < 14; i++) {
-        var dataTime=new Date(timesStamp + 24 * 60 * 60 * 1000 * (i - (currenDay + 6) % 7)).toLocaleDateString().replace(/\//g, '-')
-        var dataTimeArr=dataTime.split("-")
-        if(dataTimeArr[1]<10){
-            dataTimeArr[1]="0"+dataTimeArr[1]
-        }
-        if(dataTimeArr[2]<10){
-            dataTimeArr[2]="0"+dataTimeArr[2]
-        }
-        dates.push(dataTimeArr.join("-")+" "+["周日","周一","周二","周三","周四","周五","周六"][new Date(dataTime.toString().replace(/-/g, '/')).getDay()]);
+  var currentDate = new Date(dayTime);
+  var timesStamp = currentDate.getTime();
+  var currenDay = currentDate.getDay();
+  var dates = [];
+  var tabTime = [];
+  for (var i = 0; i < 14; i++) {
+    var dataTime = new Date(timesStamp + 24 * 60 * 60 * 1000 * (i - ((currenDay + 6) % 7)))
+      .toLocaleDateString()
+      .replace(/\//g, '-');
+    var dataTimeArr = dataTime.split('-');
+    if (dataTimeArr[1] < 10) {
+      dataTimeArr[1] = '0' + dataTimeArr[1];
+    }
+    if (dataTimeArr[2] < 10) {
+      dataTimeArr[2] = '0' + dataTimeArr[2];
     }
-    tabTime.push(dates[0])
-    tabTime.push(dates[4])
-    return dates
+    dates.push(
+      dataTimeArr.join('-') +
+        ' ' +
+        ['周日', '周一', '周二', '周三', '周四', '周五', '周六'][
+          new Date(dataTime.toString().replace(/-/g, '/')).getDay()
+        ]
+    );
+  }
+  tabTime.push(dates[0]);
+  tabTime.push(dates[4]);
+  return dates;
 }
 export function weeklay(dataTime) {
-    return ["周日","周一","周二","周三","周四","周五","周六"][new Date(dataTime).getDay()]
+  return ['周日', '周一', '周二', '周三', '周四', '周五', '周六'][new Date(dataTime).getDay()];
 }
 
 // 回显数据字典
 export function selectDictLabel(datas, value) {
-    var actions = [];
-    Object.keys(datas).some((key) => {
-        if (datas[key].dictValue == ('' + value)) {
-            actions.push(datas[key].dictLabel);
-            return true;
-        }
-    })
-    return actions.join('');
+  var actions = [];
+  Object.keys(datas).some((key) => {
+    if (datas[key].dictValue == '' + value) {
+      actions.push(datas[key].dictLabel);
+      return true;
+    }
+  });
+  return actions.join('');
 }
 
 export function selectDictLabelu(datas, value) {
-    var actions = [];
-    Object.keys(datas).some((key) => {
-        if (datas[key].dictValue == ('' + value)) {
-            actions.push(datas[key].text);
-            return true;
-        }
-    })
-    return actions.join('');
+  var actions = [];
+  Object.keys(datas).some((key) => {
+    if (datas[key].dictValue == '' + value) {
+      actions.push(datas[key].text);
+      return true;
+    }
+  });
+  return actions.join('');
 }
 
 // 回显数据字典(字符串数组)
 export function selectDictLabels(datas, value, separator) {
-    var actions = [];
-    var currentSeparator = undefined === separator ? "," : separator;
-    var temp = value.split(currentSeparator);
-    Object.keys(value.split(currentSeparator)).some((val) => {
-        Object.keys(datas).some((key) => {
-            if (datas[key].dictValue == ('' + temp[val])) {
-                actions.push(datas[key].dictLabel + currentSeparator);
-            }
-        })
-    })
-    return actions.join('').substring(0, actions.join('').length - 1);
+  var actions = [];
+  var currentSeparator = undefined === separator ? ',' : separator;
+  var temp = value.split(currentSeparator);
+  Object.keys(value.split(currentSeparator)).some((val) => {
+    Object.keys(datas).some((key) => {
+      if (datas[key].dictValue == '' + temp[val]) {
+        actions.push(datas[key].dictLabel + currentSeparator);
+      }
+    });
+  });
+  return actions.join('').substring(0, actions.join('').length - 1);
 }
 
 // 字符串格式化(%s )
 export function sprintf(str) {
-    var args = arguments, flag = true, i = 1;
-    str = str.replace(/%s/g, function () {
-        var arg = args[i++];
-        if (typeof arg === 'undefined') {
-            flag = false;
-            return '';
-        }
-        return arg;
-    });
-    return flag ? str : '';
+  var args = arguments,
+    flag = true,
+    i = 1;
+  str = str.replace(/%s/g, function () {
+    var arg = args[i++];
+    if (typeof arg === 'undefined') {
+      flag = false;
+      return '';
+    }
+    return arg;
+  });
+  return flag ? str : '';
 }
 
 // 转换字符串,undefined,null等转化为""
 export function praseStrEmpty(str) {
-    if (!str || str == "undefined" || str == "null") {
-        return "";
-    }
-    return str;
+  if (!str || str == 'undefined' || str == 'null') {
+    return '';
+  }
+  return str;
 }
 
 //
 export function twoPointSum(latA, lonA, latB, lonB) {
-    var coordinate = 6371000.;
-    var PI = 3.14159265358979324;
-    var x = Math.cos(latA * PI / 180.) * Math.cos(latB * PI / 180.) * Math.cos((lonA - lonB) * PI / 180);
-    var y = Math.sin(latA * PI / 180.) * Math.sin(latB * PI / 180.);
-    var s = x + y;
-    if (s > 1) s = 1;
-    if (s < -1) s = -1;
-    var alphabet = Math.acos(s);
-    var PointSum = alphabet * coordinate;
-    return PointSum;
+  var coordinate = 6371000;
+  var PI = 3.14159265358979324;
+  var x =
+    Math.cos((latA * PI) / 180) *
+    Math.cos((latB * PI) / 180) *
+    Math.cos(((lonA - lonB) * PI) / 180);
+  var y = Math.sin((latA * PI) / 180) * Math.sin((latB * PI) / 180);
+  var s = x + y;
+  if (s > 1) s = 1;
+  if (s < -1) s = -1;
+  var alphabet = Math.acos(s);
+  var PointSum = alphabet * coordinate;
+  return PointSum;
 }
 
 export function CJ02BD(gcjLat, gcjLon) {
-    var x = gcjLon,
-        y = gcjLat;
-    var x_pi = 3.14159265358979324 * 3000.0 / 180.0;
-    var z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi);
-    var theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi);
-    var bdLon = z * Math.cos(theta) + 0.0065;
-    var bdLat = z * Math.sin(theta) + 0.006;
+  var x = gcjLon,
+    y = gcjLat;
+  var x_pi = (3.14159265358979324 * 3000.0) / 180.0;
+  var z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi);
+  var theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi);
+  var bdLon = z * Math.cos(theta) + 0.0065;
+  var bdLat = z * Math.sin(theta) + 0.006;
 
-    return {
-        'lat': bdLat,
-        'lon': bdLon
-    };
+  return {
+    lat: bdLat,
+    lon: bdLon,
+  };
 }
 export function gcj02BD(gcjLat, gcjLon) {
-    var x = gcjLon - 0.0065,
-        y = gcjLat - 0.006;
-    var x_pi = 3.14159265358979324 * 3000.0 / 180.0;
-    var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
-    var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
-    var bdLon = z * Math.cos(theta);
-    var bdLat = z * Math.sin(theta);
-    return { lat: bdLat, lon: bdLon };
+  var x = gcjLon - 0.0065,
+    y = gcjLat - 0.006;
+  var x_pi = (3.14159265358979324 * 3000.0) / 180.0;
+  var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
+  var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
+  var bdLon = z * Math.cos(theta);
+  var bdLat = z * Math.sin(theta);
+  return { lat: bdLat, lon: bdLon };
+}
+
+/**
+ *门店类型集合,返回对应的类型
+ *@param {*String} dictValue //类型
+ *  */
+export function verifyStoreType(dictValue) {
+  if (!dictValue) return null;
+  let storeData = null;
+  storeData = store.getters.storeType.find((val) => val.dictValue == dictValue);
+  let remarkType = storeData ? JSON.parse(storeData.remark) : null;
+  return remarkType;
 }

+ 5 - 2
src/utils/request.js

@@ -16,7 +16,7 @@ const service = axios.create({
 // request拦截器
 service.interceptors.request.use(
   (config) => {
-    toastLoading(0, '加载中...', true);
+    // toastLoading(0, '加载中...', true);
     config.headers['userId'] = localStorage.getItem('loginName');
     return config;
   },
@@ -28,7 +28,7 @@ service.interceptors.request.use(
 // 响应拦截器
 service.interceptors.response.use(
   (res) => {
-    toastLoading().clear();
+    // toastLoading().clear();
     const code = res.data.code || 200;
     const msg = errorCode[code] || res.data.msg || errorCode['default'];
     if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
@@ -42,6 +42,9 @@ service.interceptors.response.use(
       //     duration:5000
       // });
       return res.data;
+    } else if (code == -1) {
+      // 图匠图片校验接口超时
+      return res.data;
     } else if (code !== 200) {
       Toast({
         message: msg,

+ 6 - 3
src/views/clew/clewent.vue

@@ -704,7 +704,8 @@ export default {
                 window.location.replace(window.location.origin + '/mobile/clew');
               } else {
                 store.dispatch('setRefreshClewPage', true);
-                this.$router.replace({ path: '/clew' });
+                // 返回上一页不会刷新页面
+                this.$router.go(-1);
               }
               return done(true);
             } else {
@@ -915,7 +916,8 @@ export default {
                 window.location.replace(window.location.origin + '/mobile/clew');
               } else {
                 store.dispatch('setRefreshClewPage', true);
-                this.$router.replace({ path: '/clew' });
+                // 返回上一页不会刷新页面
+                this.$router.go(-1);
               }
             } else {
               this.$toast(res.msg);
@@ -1009,7 +1011,8 @@ export default {
               window.location.replace(window.location.origin + '/mobile/clew');
             } else {
               store.dispatch('setRefreshClewPage', true);
-              this.$router.replace({ path: '/clew' });
+              // 返回上一页不会刷新页面
+              this.$router.go(-1);
             }
           } else {
             this.$toast(res.msg);

+ 11 - 2
src/views/clew/complaintDetail/index.vue

@@ -191,6 +191,7 @@ import radioGroup from './radioGroup';
 import followUpHistory from './followUpHistory';
 import { getDictOption } from '@/api/index';
 import { updateCustomerClueDept, getDeptInfo } from '@/api/clew';
+import store from '@/store';
 
 export default {
   name: 'complaintDetail',
@@ -326,8 +327,14 @@ export default {
         insertCustomerClueAnswerKs(params).then((res) => {
           this.toastLoading().clear();
           if (res.code == 200) {
-            this.$toast(res.msg);
-            window.location.replace(window.location.origin + '/mobile/clew');
+            if (this.$route.query.token != undefined) {
+              window.location.replace(window.location.origin + '/mobile/clew');
+            } else {
+              store.dispatch('setRefreshClewPage', true);
+              // 返回上一页不会刷新页面
+              this.$router.go(-1);
+              // this.$router.replace({ path: '/clew' });
+            }
           } else {
             this.$toast(res.msg);
           }
@@ -470,6 +477,8 @@ export default {
               if (this.$route.query.token != undefined) {
                 window.location.replace(window.location.origin + '/mobile/clew');
               } else {
+                store.dispatch('setRefreshClewPage', true);
+                // 返回上一页不会刷新页面
                 this.$router.go(-1);
               }
               return done(true);

+ 2 - 1
src/views/clew/complaintDetail/radioGroup.vue

@@ -109,8 +109,9 @@
               <template v-if="item.answerType == 'wb'">
                 <van-field v-model="scope.row[item.prop]" />
               </template>
+              <!-- 正整数 digit -->
               <template v-if="item.answerType == 'sz'">
-                <van-field v-model="scope.row[item.prop]" type="number" />
+                <van-field v-model="scope.row[item.prop]" type="digit" />
               </template>
             </template>
           </el-table-column>

+ 4 - 10
src/views/clew/index.vue

@@ -83,18 +83,15 @@ export default {
       customerClueOption: [],
     };
   },
-  // created() {
-  //   this.getCustomerClue();
-  //   this.approveList();
-  // },
-  activated() {
+  created() {
     this.getCustomerClue();
   },
+  activated() {},
   watch: {
     refreshClewPage: {
       handler(val) {
         if (val) {
-          // this.approveList();
+          this.approveList();
           store.dispatch('setRefreshClewPage', false);
         }
       },
@@ -104,11 +101,8 @@ export default {
       if (to.path == '/clew' && from.path == '/My/index') {
         this.isHandle = '-1';
         this.cid = -1;
+        this.getCustomerClue();
       }
-      // if (to.path == '/clew' && from.path == '/clewent') {
-      //   this.pageNum = 1;
-      //   this.approveList();
-      // }
     },
   },
   beforeRouteLeave(to, from, next) {

+ 57 - 49
src/views/componentsTarget/createStoreBJ.vue

@@ -1,4 +1,4 @@
-<!-- 拜访数据(实时) -->
+<!-- 建店布机 -->
 <template>
   <van-row>
     <van-col span="12">
@@ -13,13 +13,13 @@
     </van-col>
     <van-col span="12">
       <p>
-        可控店点数:
+        <span class="colLabel colLabel_KK">可控店</span>
         <span class="colorbalck">{{ Micrometer(reportTargetAll.controlledShopMonthAct) }}</span>
       </p>
     </van-col>
     <van-col span="12">
       <p>
-        可控店点数:
+        <span class="colLabel colLabel_KK">可控店</span>
         <span class="colorbalck">{{ Micrometer(reportTargetAll.controlledShopYearAct) }}</span>
         <span class="colorbalck" v-if="reportTargetAll.controlledShopYearRate"
           >({{ reportTargetAll.controlledShopYearRate }}%)</span
@@ -29,13 +29,13 @@
     </van-col>
     <van-col span="12">
       <p>
-        分销店点数:
+        <span class="colLabel colLabel_FX">分销店</span>
         <span class="colorbalck">{{ Micrometer(reportTargetAll.allShopMonthAct) }}</span>
       </p>
     </van-col>
     <van-col span="12">
       <p>
-        分销店点数:
+        <span class="colLabel colLabel_FX">分销店</span>
         <span class="colorbalck">{{ Micrometer(reportTargetAll.allShopYearAct) }}</span>
         <span class="colorbalck" v-if="reportTargetAll.allShopYearRate"
           >({{ reportTargetAll.allShopYearRate }}%)</span
@@ -43,75 +43,83 @@
         <span class="colorbalck" v-else>({{ '-' }})</span>
       </p>
     </van-col>
-    <div class="colBack">
+    <div>
       <div class="backLeft back"></div>
       <div class="backRight back"></div>
       <van-col span="12">
         <p>
-          金牌店点数:
+          <span class="colLabel colLabel_JP">金牌店</span>
           <span class="colorbalck">{{ Micrometer(reportTargetAll.goldShopMonthAct) }}</span>
         </p>
       </van-col>
       <van-col span="12">
         <p>
-          金牌店点数:<span class="colorbalck">{{
-            Micrometer(reportTargetAll.goldShopYearAct)
-          }}</span
-          ><span class="colorbalck" v-if="reportTargetAll.goldShopYearRate"
-            >({{ reportTargetAll.goldShopYearRate }}%)</span
-          >
+          <span class="colLabel colLabel_JP">金牌店</span>
+          <span class="colorbalck">{{ Micrometer(reportTargetAll.goldShopYearAct) }}</span>
+          <span class="colorbalck" v-if="reportTargetAll.goldShopYearRate">
+            ({{ reportTargetAll.goldShopYearRate }}%)
+          </span>
           <span class="colorbalck" v-else>({{ '-' }})</span>
         </p>
       </van-col>
-      <van-col span="12"
-        ><p>
-          金牌店布机:<span class="colorbalck">{{
-            Micrometer(reportTargetAll.goldShopBjMonthAct)
-          }}</span>
-        </p></van-col
-      >
       <van-col span="12">
         <p>
-          金牌店布机:<span class="colorbalck">{{
-            Micrometer(reportTargetAll.goldShopBjYearAct)
-          }}</span
-          ><span class="colorbalck" v-if="reportTargetAll.goldShopBjYearRate"
-            >({{ reportTargetAll.goldShopBjYearRate }}%)</span
-          >
+          <span class="colLabel colLabel_JPBJ">金牌店布机</span>
+          <span class="colorbalck">{{ Micrometer(reportTargetAll.goldShopBjMonthAct) }}</span>
+        </p>
+      </van-col>
+      <van-col span="12">
+        <p>
+          <span class="colLabel colLabel_JPBJ">金牌店布机</span>
+          <span class="colorbalck">{{ Micrometer(reportTargetAll.goldShopBjYearAct) }}</span>
+          <span class="colorbalck" v-if="reportTargetAll.goldShopBjYearRate">
+            ({{ reportTargetAll.goldShopBjYearRate }}%)
+          </span>
           <span class="colorbalck" v-else>({{ '-' }})</span>
         </p>
       </van-col>
-
-      <van-col span="12"
-        ><p>
-          同A店点数:<span class="colorbalck">{{
-            Micrometer(reportTargetAll.tcAShopMonthAct)
+      <van-col span="12">
+        <p>
+          <span class="colLabel colLabel_TCFX">同城分销</span>
+        </p>
+      </van-col>
+      <van-col span="12">
+        <p>
+          <span class="colLabel colLabel_TCFX">同城分销</span>
+        </p>
+      </van-col>
+      <van-col span="12">
+        <p>
+          涂料店:<span class="colorbalck">{{
+            Micrometer(reportTargetAll.tcfxTlShopMonthAct)
           }}</span>
-        </p></van-col
-      >
+        </p>
+      </van-col>
       <van-col span="12">
         <p>
-          同A店点数:<span class="colorbalck">{{ Micrometer(reportTargetAll.tcAShopYearAct) }}</span
-          ><span class="colorbalck" v-if="reportTargetAll.tcAShopYearRate"
-            >({{ reportTargetAll.tcAShopYearRate }}%)</span
-          >
+          涂料店:<span class="colorbalck">{{
+            Micrometer(reportTargetAll.tcfxTlShopYearAct)
+          }}</span>
+          <span class="colorbalck" v-if="reportTargetAll.tcfxTlShopYearRate">
+            ({{ reportTargetAll.tcfxTlShopYearRate }}%)
+          </span>
           <span class="colorbalck" v-else>({{ '-' }})</span>
         </p>
       </van-col>
 
-      <van-col span="12"
-        ><p>
-          同B店点数:<span class="colorbalck">{{
-            Micrometer(reportTargetAll.tcBShopMonthAct)
-          }}</span>
-        </p></van-col
-      >
       <van-col span="12">
-        <p>
-          同B店点数:<span class="colorbalck">{{ Micrometer(reportTargetAll.tcBShopYearAct) }}</span
-          ><span class="colorbalck" v-if="reportTargetAll.tcBShopYearRate"
-            >({{ reportTargetAll.tcBShopYearRate }}%)</span
-          >
+        <p style="margin-top: 0">
+          其他店:
+          <span class="colorbalck">{{ Micrometer(reportTargetAll.tcfxOtherShopMonthAct) }}</span>
+        </p>
+      </van-col>
+      <van-col span="12">
+        <p style="margin-top: 0">
+          其他店:
+          <span class="colorbalck">{{ Micrometer(reportTargetAll.tcfxOtherShopYearAct) }}</span>
+          <span class="colorbalck" v-if="reportTargetAll.tcfxOtherShopYearRate">
+            ({{ reportTargetAll.tcfxOtherShopYearRate }}%)
+          </span>
           <span class="colorbalck" v-else>({{ '-' }})</span>
         </p>
       </van-col>

+ 22 - 0
src/views/componentsTarget/index.css

@@ -49,4 +49,26 @@ p{
         position: relative;
         z-index: 3;
     }
+}
+.colLabel{
+    display: inline-block;
+    padding: 2px 5px;
+    color: #fff;
+    margin-right: 10px;
+    border-radius:3px;
+}
+.colLabel_KK{
+    background: rgb(235, 104, 119);
+}
+.colLabel_FX{
+    background: rgb(253 120 88);
+}
+.colLabel_JP{
+    background: rgb(241, 183, 137);
+}
+.colLabel_JPBJ{
+    background: rgb(248 215 189);
+}
+.colLabel_TCFX{
+    background: rgb(131 204 202);
 }

+ 56 - 46
src/views/componentsTarget/placeOrder.vue

@@ -1,10 +1,10 @@
-<!-- 拜访数据(实时) -->
+<!-- 下单点数 -->
 <template>
   <van-row>
     <van-col span="24"><span class="leftTitle">本月进度</span></van-col>
     <van-col span="12">
       <p>
-        可控店下单点数:
+        <span class="colLabel colLabel_KK">可控店</span>
         <span class="colorbalck">{{
           Micrometer(reportTargetAll.controlledOrderShopMonthAct)
         }}</span>
@@ -12,61 +12,71 @@
     </van-col>
     <van-col span="12">
       <p>
-        可控店下单率:
+        <span class="colLabel colLabel_KK">可控店</span>
         <span class="colorbalck">{{ reportTargetAll.controlledShopMonthOrderRate }}%</span>
       </p>
     </van-col>
-    <van-col span="12"
-      ><p>
-        分销店下单点数:<span class="colorbalck">{{
-          Micrometer(reportTargetAll.fxOrderShopMonthAct)
-        }}</span>
-      </p></van-col
-    >
-    <van-col span="12"
-      ><p>
-        分销店下单率:<span class="colorbalck">{{ reportTargetAll.fxShopMonthOrderRate }}%</span>
-      </p></van-col
-    >
-    <div class="colBack">
+    <van-col span="12">
+      <p>
+        <span class="colLabel colLabel_FX">分销店</span>
+        <span class="colorbalck">{{ Micrometer(reportTargetAll.fxOrderShopMonthAct) }}</span>
+      </p>
+    </van-col>
+    <van-col span="12">
+      <p>
+        <span class="colLabel colLabel_FX">分销店</span
+        ><span class="colorbalck">{{ reportTargetAll.fxShopMonthOrderRate }}%</span>
+      </p>
+    </van-col>
+    <div>
       <div class="backLeft back"></div>
       <div class="backRight back"></div>
-      <van-col span="12"
-        ><p>
-          金牌店下单点数:<span class="colorbalck">{{
-            Micrometer(reportTargetAll.jpOrderShopMonthAct)
-          }}</span>
-        </p></van-col
-      >
-      <van-col span="12"
-        ><p>
-          金牌店下单率:<span class="colorbalck">{{ reportTargetAll.jpShopMonthOrderRate }}%</span>
-        </p></van-col
-      >
-
-      <van-col span="12"
-        ><p>
-          同A店下单点数:<span class="colorbalck">{{
-            Micrometer(reportTargetAll.tcAOrderShopMonthAct)
-          }}</span>
-        </p></van-col
-      >
       <van-col span="12">
         <p>
-          同A店下单率:<span class="colorbalck">{{ reportTargetAll.tcAShopMonthOrderRate }}%</span>
+          <span class="colLabel colLabel_JP">金牌店</span>
+          <span class="colorbalck">{{ Micrometer(reportTargetAll.jpOrderShopMonthAct) }}</span>
         </p>
       </van-col>
-
-      <van-col span="12"
-        ><p>
-          同B店下单点数:<span class="colorbalck">{{
-            Micrometer(reportTargetAll.tcBOrderShopMonthAct)
-          }}</span>
-        </p></van-col
-      >
       <van-col span="12">
         <p>
-          同B店下单率:<span class="colorbalck">{{ reportTargetAll.tcBShopMonthOrderRate }}%</span>
+          <span class="colLabel colLabel_JP">金牌店</span>
+          <span class="colorbalck"> {{ reportTargetAll.jpShopMonthOrderRate }}% </span>
+        </p>
+      </van-col>
+      <van-col span="12">
+        <p>
+          <span class="colLabel colLabel_TCFX">同城分销</span>
+        </p>
+      </van-col>
+      <van-col span="12">
+        <p>
+          <span class="colLabel colLabel_TCFX">同城分销</span>
+        </p>
+      </van-col>
+      <van-col span="12">
+        <p>
+          涂料店:
+          <span class="colorbalck">{{ Micrometer(reportTargetAll.tcfxTlOrderShopMonthAct) }}</span>
+        </p>
+      </van-col>
+      <van-col span="12">
+        <p>
+          涂料店:
+          <span class="colorbalck">{{ reportTargetAll.tcfxTlShopMonthOrderRate }}%</span>
+        </p>
+      </van-col>
+      <van-col span="12">
+        <p style="margin-top: 0">
+          其他店:
+          <span class="colorbalck">{{
+            Micrometer(reportTargetAll.tcfxOtherOrderShopMonthAct)
+          }}</span>
+        </p>
+      </van-col>
+      <van-col span="12">
+        <p style="margin-top: 0">
+          其他店:
+          <span class="colorbalck">{{ reportTargetAll.tcfxOtherShopMonthOrderRate }}%</span>
         </p>
       </van-col>
     </div>

+ 35 - 30
src/views/componentsTarget/visitedRealTime.vue

@@ -44,12 +44,6 @@
         整体拜访率:<span class="colorbalck">{{ reportTargetAll.allVisitMonthRate }}%</span>
       </p></van-col
     >
-    <!--            <van-col v-if="powerGrade==2&&!JZQuota&&!GZdata" span="24"><p>未分配点数:<span-->
-    <!--                class="colorbalck">{{ reportTargetAll.undistrNum }}</span></p></van-col>-->
-    <!--            <van-col v-if="powerGrade==2&&!JZQuota&&!GZdata" span="24"><p>已覆盖未排线点数:<span-->
-    <!--                class="colorbalck">{{ reportTargetAll.coverNotPlan }}</span></p></van-col>-->
-    <!--            <van-col span="24" v-if="powerGrade==2"><p>未挂接销售门店数:<span class="colorbalck">{{reportTargetAll.customerYearTarget}}%</span></p></van-col>-->
-    <!--            <van-col span="24" v-if="powerGrade==2"><p>已挂接销售,但不在拜访计划中的门店数量:<span class="colorbalck">{{reportTargetAll.customerYearTarget}}%</span></p></van-col>-->
   </van-row>
   <!-- 其他 -->
   <van-row v-else>
@@ -61,73 +55,84 @@
     </van-col>
     <van-col span="12">
       <p>
-        可控店:
+        <span class="colLabel colLabel_KK">可控店</span>
         <span class="colorbalck">{{ Micrometer(reportTargetAll.controlledShopVisitDayNum) }}</span>
       </p>
     </van-col>
     <van-col span="12">
       <p>
-        <span style="font-weight: 600">本月</span>可控店:
+        <span class="colLabel colLabel_KK">可控店</span>
         <span class="colorbalck">{{
           Micrometer(reportTargetAll.controlledShopVisitMonthNum)
         }}</span>
         <span class="colorbalck">({{ reportTargetAll.controlledShopVisitMonthRate }}%)</span>
       </p>
     </van-col>
-    <van-col span="12"
-      ><p>
-        分销店:<span class="colorbalck">{{ Micrometer(reportTargetAll.fxShopVisitDayNum) }}</span>
-      </p></van-col
-    >
-    <van-col span="12"
-      ><p>
-        <span style="font-weight: 600">本月</span>分销店:
+    <van-col span="12">
+      <p>
+        <span class="colLabel colLabel_FX">分销店</span>
+        <span class="colorbalck">{{ Micrometer(reportTargetAll.fxShopVisitDayNum) }}</span>
+      </p>
+    </van-col>
+    <van-col span="12">
+      <p>
+        <span class="colLabel colLabel_FX">分销店</span>
         <span class="colorbalck">{{ Micrometer(reportTargetAll.fxShopVisitMonthNum) }}</span>
         <span class="colorbalck"> ({{ reportTargetAll.fxShopVisitMonthRate }}%) </span>
       </p>
     </van-col>
-    <div class="colBack">
+    <div>
       <div class="backLeft back"></div>
       <div class="backRight back"></div>
       <van-col span="12">
         <p>
-          金牌店:
+          <span class="colLabel colLabel_JP">金牌店</span>
           <span class="colorbalck">{{ Micrometer(reportTargetAll.jpShopVisitDayNum) }}</span>
         </p>
       </van-col>
       <van-col span="12">
         <p>
-          <span style="font-weight: 600">本月</span>金牌店:
+          <span class="colLabel colLabel_JP">金牌店</span>
           <span class="colorbalck">{{ Micrometer(reportTargetAll.jpShopVisitMonthNum) }}</span>
           <span class="colorbalck"> ({{ reportTargetAll.jpShopVisitMonthRate }}%) </span>
         </p>
       </van-col>
       <van-col span="12">
         <p>
-          同A店:
-          <span class="colorbalck">{{ Micrometer(reportTargetAll.tcAShopVisitDayNum) }}</span>
+          <span class="colLabel colLabel_TCFX">同城分销</span>
         </p>
       </van-col>
       <van-col span="12">
         <p>
-          <span style="font-weight: 600">近2月</span>同A店:
-          <span class="colorbalck">{{ Micrometer(reportTargetAll.tcAShopVisitMonthNum) }}</span>
-          <span class="colorbalck"> ({{ reportTargetAll.tcAShopVisitMonthRate }}%) </span>
+          <span class="colLabel colLabel_TCFX">同城分销</span>
         </p>
       </van-col>
       <van-col span="12">
         <p>
-          同B店:<span class="colorbalck">{{
-            Micrometer(reportTargetAll.tcBShopVisitDayNum)
-          }}</span>
+          涂料店:
+          <span class="colorbalck">{{ Micrometer(reportTargetAll.tcfxTlShopVisitDayNum) }}</span>
         </p>
       </van-col>
       <van-col span="12">
         <p>
-          <span style="font-weight: 600">近3月</span>同B店:<span class="colorbalck">{{
-            Micrometer(reportTargetAll.tcBShopVisitMonthNum)
+          <span style="font-weight: 600">近2月</span>涂料店:
+          <span class="colorbalck">{{ Micrometer(reportTargetAll.tcfxTlShopVisitMonthNum) }}</span>
+          <span class="colorbalck"> ({{ reportTargetAll.tcfxTlShopVisitMonthRate }}%) </span>
+        </p>
+      </van-col>
+      <van-col span="12">
+        <p style="margin-top: 0">
+          其他店:<span class="colorbalck">{{
+            Micrometer(reportTargetAll.tcfxOtherShopVisitDayNum)
+          }}</span>
+        </p>
+      </van-col>
+      <van-col span="12">
+        <p style="margin-top: 0">
+          <span style="font-weight: 600">近3月</span>其他店:<span class="colorbalck">{{
+            Micrometer(reportTargetAll.tcfxOtherShopVisitMonthNum)
           }}</span>
-          <span class="colorbalck"> ({{ reportTargetAll.tcBShopVisitMonthRate }}%) </span>
+          <span class="colorbalck"> ({{ reportTargetAll.tcfxOtherShopVisitMonthRate }}%) </span>
         </p>
       </van-col>
     </div>

+ 88 - 27
src/views/deviceOutside/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="bgcolor">
+  <div class="bgcolor deviceOutside">
     <div class="navBarTOP">
       <!--        顶部条-->
       <van-nav-bar class="navBar" title="计划外">
@@ -25,7 +25,7 @@
       </van-tabs>
     </div>
     <!--        主体内容-->
-    <div class="container" id="content" style="margin-top: 144px">
+    <div class="container content" style="margin-top: 144px" @touchmove="handleTouch">
       <van-list
         class="myList"
         v-model="loading"
@@ -244,7 +244,34 @@
                   :src="sbpmdh"
                   @click="linkapp(item)" />
               </div>
-              <div class="info" v-if="typeShow">经销商:{{ item.chainName }}</div>
+              <!-- 分销店 -->
+              <template
+                v-if="
+                  item.sfaStoreType &&
+                  item.sfaStoreType.type == 'fxd' &&
+                  item.sfaStoreChainsContactList
+                ">
+                <div class="info" v-if="typeShow">
+                  经销商:
+                  <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>
+              </template>
+              <template v-else>
+                <div class="info" v-if="typeShow">经销商:{{ item.chainName }}</div>
+              </template>
               <!-- storeLonExist 门店是否存在经纬度 字段false=不显示导航和距离,true=显示 -->
               <div class="info" v-if="item.storeLonExist">
                 距离:{{ Micrometer(item.distance) }}m
@@ -321,21 +348,17 @@
         </div>
         <van-empty v-if="list.length == 0" />
       </van-list>
-      <br />
-      <br />
-      <br />
-      <br />
-      <br />
     </div>
     <van-popup v-model="showPicker" position="bottom" class="textsize">
       <van-row
         style="
-          position: fixed;
-          top: 0;
+          /* position: fixed; */
+          /* top: 0; */
           width: 100%;
           z-index: 998;
           background-color: #fff;
           border-bottom: 1px solid #ccc;
+          height: 50px;
         ">
         <van-col span="3" style="text-align: center; margin: 14px 0" @click="showPicker = false">
           <van-icon name="cross" size="20" color="#909399" />
@@ -350,8 +373,8 @@
           <van-button type="default" size="small" style="height: 28px">重置</van-button>
         </van-col>
       </van-row>
-      <div style="height: 48px; width: 100%"></div>
-      <div class="searchcheck">
+      <!-- <div style="height: 48px; width: 100%"></div> -->
+      <div class="searchcheck" @touchmove="handleTouch">
         <p class="searchchecktitle">&nbsp;经销商</p>
         <van-row>
           <van-col span="24">
@@ -731,7 +754,24 @@ export default {
     // }
     // this.getMonth();
   },
+  mounted() {
+    // 上拉边界下拉出现白色空白
+    let node = document.getElementsByClassName('deviceOutside')[0];
+    node.addEventListener(
+      'touchmove',
+      (e) => {
+        if (e._isScroller) return;
+        e.preventDefault();
+      },
+      {
+        passive: false,
+      }
+    );
+  },
   methods: {
+    handleTouch(e) {
+      e._isScroller = true;
+    },
     initData() {
       // 筛选-门店标签
       if (localStorage.getItem('outvstoreLabelTypes') != null) {
@@ -1086,11 +1126,7 @@ export default {
       }
       var that = this;
       this.disabled = true;
-      let loading2 = this.$toast.loading({
-        duration: 0,
-        message: '加载中...',
-        forbidClick: true,
-      });
+      this.toastLoading(0, '加载中...', true);
       getUserOrgStoreList({
         lat: that.lat,
         lon: that.lon,
@@ -1103,8 +1139,8 @@ export default {
         genDate: this.genDate,
       }).then((res) => {
         this.disabled = false;
+        this.toastLoading().clear();
         if (res.code == 200) {
-          loading2.clear();
           this.loading = false;
           if (this.pageNum == '1') {
             this.list = [];
@@ -1342,9 +1378,6 @@ export default {
         if (val.lat == '' || val.lat == null) {
           this.lat = location.lat;
           this.lon = location.lon;
-        } else {
-          this.lat = val.lat;
-          this.lon = val.lon;
         }
         // let PointSum = this.twoPointSum(this.lat, this.lon, location.lat, location.lon).toFixed(2);
         let PointSumval = this.twoPointSum(
@@ -1628,9 +1661,6 @@ export default {
                         if (val.lat == '' || val.lat == null) {
                           that.lat = location.lat;
                           that.lon = location.lon;
-                        } else {
-                          that.lat = val.lat;
-                          that.lon = val.lon;
                         }
                         let PointSum = that
                           .twoPointSum(that.lat, that.lon, location.lat, location.lon)
@@ -2232,8 +2262,22 @@ export default {
   font-size: 16px;
   font-weight: 600;
 }
+.deviceOutside {
+  height: 100%;
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  overflow: hidden;
+  .content {
+    flex: 1;
+    overflow-y: auto;
+  }
+  .tabBar {
+    height: 50px;
+  }
+}
 </style>
-<style>
+<style lang="scss">
 .van-tabs__nav--card .van-tab.van-tab--active {
   background-color: #0057ba !important;
 }
@@ -2324,8 +2368,8 @@ export default {
   width: 100%;
 }
 .searchcheck {
-  height: 93vh;
-  overflow-y: auto;
+  /* height: 93vh;
+  overflow-y: auto; */
 }
 .searchchecktitle {
   width: 100%;
@@ -2342,5 +2386,22 @@ export default {
 }
 .textsize {
   font-size: 14px;
+  /* overflow: hidden; */
+  display: flex;
+  flex-direction: column;
+  .searchcheck {
+    flex: 1;
+    overflow-y: auto;
+    margin-bottom: 50px;
+  }
+}
+.deviceOutside {
+  .TCFXListItem {
+    display: inline-block;
+    border: 1px solid #ccc;
+    padding: 3px 5px;
+    margin: 0 5px;
+    border-radius: 6px;
+  }
 }
 </style>

+ 90 - 18
src/views/deviceOutside/rangeStore.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="rangeStore">
     <div id="container"></div>
     <div class="navBarTOP">
       <van-nav-bar class="navBar" title="附近客户信息" left-arrow @click-left="onClickLeft">
@@ -14,7 +14,7 @@
         direction="horizontal"
         class="mapCheckbox"
         @change="selectMapIco">
-        <van-grid :column-num="7" class="icoImgMAP">
+        <van-grid :column-num="5" class="icoImgMAP">
           <van-grid-item>
             <div slot="text" class="titleico">
               <van-checkbox name="jinpai_ccm">
@@ -35,14 +35,41 @@
           </van-grid-item>
           <van-grid-item>
             <div slot="text" class="titleico">
-              <van-checkbox name="tcfx_A">
+              <van-checkbox name="tcfx_tl">
                 <van-icon :name="storeAmap" size="32" />
-                <p class="p">同城</p>
-                <p>A店</p>
+                <p class="p">非金牌</p>
+                <p>涂料店</p>
               </van-checkbox>
             </div>
           </van-grid-item>
           <van-grid-item>
+            <div slot="text" class="titleico">
+              <van-checkbox name="tcfx_cw">
+                <van-icon :name="storeBCZmap" size="32" />
+                <p class="p">非金牌</p>
+                <p>厨卫店</p>
+              </van-checkbox>
+            </div>
+          </van-grid-item>
+          <van-grid-item>
+            <div slot="text" class="titleico">
+              <van-checkbox name="qita">
+                <van-icon :name="othermap" size="32" />
+                <p class="p">非金牌</p>
+                <p>其他店</p>
+              </van-checkbox>
+            </div>
+          </van-grid-item>
+          <!-- <van-grid-item v-if="filterTCFX(item)" v-for="(item, index) in storeType" :key="index">
+            <div slot="text" class="titleico">
+              {{ index }}
+              <van-checkbox :name="'TCFX_' + index" v-if="index == 0">
+                <van-icon :name="require('@/assets/' + 'TCFX_' + index)" size="32" />
+                <p class="p">{{ item.dictLabel }}</p>
+              </van-checkbox>
+            </div>
+          </van-grid-item> -->
+          <!-- <van-grid-item>
             <div slot="text" class="titleico">
               <van-checkbox name="tcfx_B_fs">
                 <van-icon :name="storeBFSmap" size="32" />
@@ -66,15 +93,7 @@
                 <p>水泥店</p>
               </van-checkbox>
             </div>
-          </van-grid-item>
-          <van-grid-item>
-            <div slot="text" class="titleico">
-              <van-checkbox name="qita">
-                <van-icon :name="othermap" size="32" />
-                <p class="p">其他</p>
-              </van-checkbox>
-            </div>
-          </van-grid-item>
+          </van-grid-item> -->
         </van-grid>
       </van-checkbox-group>
       <div class="searchDiv">
@@ -358,7 +377,34 @@
                 >{{ info.telephone }}</a
               ><van-icon name="phone" size="16" color="#1989fa" />
             </p>
-            <p class="text">经销商:{{ info.chainName }}</p>
+            <!-- 分销店 -->
+            <template
+              v-if="
+                info.sfaStoreType &&
+                info.sfaStoreType.type == 'fxd' &&
+                info.sfaStoreChainsContactList
+              ">
+              <div class="text">
+                经销商:
+                <div class="TCFXListItem" v-for="(item, index) in info.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>
+            </template>
+            <template v-else>
+              <p class="text">经销商:{{ info.chainName }}</p>
+            </template>
             <p class="text">地址:{{ info.addressLine }}</p>
             <div class="text" style="height: 24px">
               <!--          <van-button @click="linkapp(info)" style="float: right;margin-top: -36px;" type="info" size="small" plain  class="centerBtn centerBtn1">-->
@@ -607,6 +653,7 @@ import check from './../../assets/check.svg';
 import { topStore } from '@/api/inventory';
 import { gcj02BD } from '@/utils';
 import { checkStoreAddressByStoreCode } from '@/api/visitstore';
+import { mapState } from 'vuex';
 export default {
   name: 'rangeStore',
   components: {
@@ -617,6 +664,11 @@ export default {
     BmInfoWindow,
     BmGeolocation,
   },
+  computed: {
+    ...mapState({
+      storeType: (state) => state.user.storeType,
+    }),
+  },
   data() {
     return {
       moreTypeShow: false,
@@ -1048,36 +1100,42 @@ export default {
     },
     mpFn(row, tyle) {
       if (row.iconName == 'qita') {
+        // 非金牌-其他
         if (tyle == 1) {
           this.checkIco = otheractive;
         } else {
           return this.other;
         }
-      } else if (row.iconName == 'tcfx_A') {
+      } else if (row.iconName == 'tcfx_tl') {
+        // 非金牌-涂料店
         if (tyle == 1) {
           this.checkIco = storeAactive;
         } else {
           return this.storeA;
         }
-      } else if (row.iconName == 'tcfx_B_cz') {
+      } else if (row.iconName == 'tcfx_cw') {
+        // 非金牌-厨卫
         if (tyle == 1) {
           this.checkIco = storeBCZactive;
         } else {
           return this.storeBCZ;
         }
       } else if (row.iconName == 'tcfx_B_fs') {
+        // 同城分销-瓷砖店
         if (tyle == 1) {
           this.checkIco = storeBFSactive;
         } else {
           return this.storeBFS;
         }
       } else if (row.iconName == 'tcfx_B_qt') {
+        // 同城分销-黄沙-水泥
         if (tyle == 1) {
           this.checkIco = storeBOtheractive;
         } else {
           return this.storeBOther;
         }
       } else if (row.iconName == 'jinpai') {
+        // 无布机-金牌店
         if (tyle == 1) {
           this.checkIco = storeGoldactive;
         } else {
@@ -2005,6 +2063,11 @@ export default {
         });
       }
     },
+    filterTCFX(item) {
+      if (!item.remark) return false;
+      let remark = JSON.parse(item.remark);
+      return remark.tcfx ? true : false;
+    },
   },
 };
 </script>
@@ -2118,7 +2181,7 @@ export default {
   height: 26px;
 }
 </style>
-<style>
+<style lang="scss">
 .van-tabs__nav--card .van-tab.van-tab--active {
   background-color: #0057ba !important;
 }
@@ -2227,4 +2290,13 @@ export default {
 .textsize {
   font-size: 14px;
 }
+.rangeStore {
+  .TCFXListItem {
+    display: inline-block;
+    border: 1px solid #ccc;
+    padding: 3px 5px;
+    margin: 0 5px;
+    border-radius: 6px;
+  }
+}
 </style>

+ 1 - 0
src/views/deviceOutside/suishenbangOutstoreVisit.vue

@@ -557,6 +557,7 @@ export default {
           locationCity: this.city,
           locationRemark: this.address,
           locationAccuracy: this.locationAccuracy,
+          photoIdentifyType: val.photoIdentifyType,
         },
       });
     },

+ 41 - 31
src/views/deviceOutside/topStore.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="bgcolor">
+  <div class="bgcolor topStore">
     <div class="navBarTOP">
       <!--        顶部条-->
       <van-nav-bar class="navBar" title="高销额门店推荐" left-arrow @click-left="onClickLeft">
@@ -183,24 +183,6 @@
                         <van-icon :name="order60" size="26" />
                       </div>
                     </el-popover>
-                    <!--                  <el-popover-->
-                    <!--                      popper-class="zpover"-->
-                    <!--                      placement="bottom"-->
-                    <!--                      width="200"-->
-                    <!--                      trigger="click"-->
-                    <!--                      content="金牌店近30天未下单">-->
-
-                    <!--                    <div v-if="cstype==4" class="visitStoreIco" style="background-color: #fff;" slot="reference"><van-icon :name="order" size="26" /></div>-->
-                    <!--                  </el-popover>-->
-                    <!--                  <el-popover-->
-                    <!--                      popper-class="zpover zpover99"-->
-                    <!--                      placement="bottom"-->
-                    <!--                      width="200"-->
-                    <!--                      trigger="click"-->
-                    <!--                      content="本店没参加碰瓷专案">-->
-                    <!--                    <div  class="visitStoreIco"  v-if="cstype==2"  slot="reference" style="background-color: white"><van-icon :name="nocj" size="26" /></div>-->
-                    <!--                  </el-popover>-->
-
                     <el-popover
                       popper-class="zpover"
                       placement="bottom"
@@ -221,7 +203,6 @@
                       width="200"
                       trigger="click"
                       content="本店本月进过超好贴">
-                      <!--         v-if="item.storeLabels.zyssl"        -->
                       <div
                         v-if="item.storeLabels.chtczj"
                         class="visitStoreIco"
@@ -230,15 +211,6 @@
                       </div>
                     </el-popover>
-                    <!--                  <el-popover-->
-                    <!--                      placement="bottom"-->
-                    <!--                      width="200"-->
-                    <!--                      popper-class="zpover zpover2"-->
-                    <!--                      trigger="click"-->
-                    <!--                      content="本月未被拜访的信息">-->
-                    <!--                    <div v-if="item.storeLabels.noVisit" class="visitStoreIco" style="background-color: #fff" slot="reference">-->
-                    <!--                      <van-icon :name="visitTimess" size="26" /></div>-->
-                    <!--                  </el-popover>-->
                     <el-popover
                       placement="bottom"
                       popper-class="zpover zpover1 zpover1sb"
@@ -298,7 +270,36 @@
                   /></a>
                 </div>
                 <div class="info">地址:{{ item.addressLine }}</div>
-                <div class="info" v-if="typeShow">经销商:{{ item.chainName }}</div>
+                <!-- 分销店 -->
+                <template
+                  v-if="
+                    item.sfaStoreType &&
+                    item.sfaStoreType.type == 'fxd' &&
+                    item.sfaStoreChainsContactList
+                  ">
+                  <div class="info" v-if="typeShow">
+                    经销商:
+                    <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>
+                </template>
+                <template v-else>
+                  <div class="info" v-if="typeShow">经销商:{{ item.chainName }}</div>
+                </template>
                 <div class="info" style="color: #444">
                   门店销额(近三个月):¥{{ Micrometer(item.rolling3monthAMT) }}元
                   <span
@@ -2738,7 +2739,7 @@ export default {
   font-weight: 600;
 }
 </style>
-<style>
+<style lang="scss">
 .zpover99 {
   background-color: #00afff !important;
 }
@@ -2848,4 +2849,13 @@ export default {
 .visitStoreIcos {
   /*background: url("./../../assets/order1.png") center;*/
 }
+.topStore {
+  .TCFXListItem {
+    display: inline-block;
+    border: 1px solid #ccc;
+    padding: 3px 5px;
+    margin: 0 5px;
+    border-radius: 6px;
+  }
+}
 </style>

+ 249 - 184
src/views/deviceWithin/abnormalVisit.vue

@@ -3,7 +3,7 @@
     <!--        顶部条-->
     <van-nav-bar class="navBar" title="异常拜访" left-arrow @click-left="onClickLeft">
       <template #right>
-        <span  @click="onstopVisit" class="navRightBtnTop">取消拜访</span>
+        <span @click="onstopVisit" class="navRightBtnTop">取消拜访</span>
       </template>
     </van-nav-bar>
     <!--        主体内容-->
@@ -12,42 +12,58 @@
       <van-form class="bgWhite">
         <div class="formLabel">
           <van-cell>
-            <template #title>
-              <span class="van-f-red">*</span>异常信息照
-            </template>
+            <template #title> <span class="van-f-red">*</span>异常信息照 </template>
             <template #right-icon>
-              <upload-img :uploadid="uploadid2" :imgArr="imgs" @newimgarr="newimgarr1"
-                          :visitModel="visitModel" :visitsId="visitId" :taskId="rdId"></upload-img>
+              <upload-img
+                :uploadid="uploadid2"
+                :imgArr="imgs"
+                @newimgarr="newimgarr1"
+                :visitModel="visitModel"
+                :visitsId="visitId"
+                :taskId="rdId"></upload-img>
             </template>
           </van-cell>
-          <div style="padding:10px 10px 0;" v-if="imgs.length>0">
+          <div style="padding: 10px 10px 0" v-if="imgs.length > 0">
             <delete-upload-img :imgs="imgs" @delimg="newimgarr1"></delete-upload-img>
           </div>
         </div>
         <div class="formLabel">
           <van-cell>
-            <template #title>
-              <span class="van-f-red">*</span>异常事由
-            </template>
+            <template #title> <span class="van-f-red">*</span>异常事由 </template>
           </van-cell>
           <van-radio-group v-model="abnormalReason" class="z-checkbox">
-            <van-radio :name="item.dictValue" v-for="(item,index) in typeList" :key="index">{{item.dictLabel }}</van-radio>
+            <van-radio :name="item.dictValue" v-for="(item, index) in typeList" :key="index">{{
+              item.dictLabel
+            }}</van-radio>
           </van-radio-group>
         </div>
-        <div class="formLabel" style="padding-bottom: 20px;">
+        <div class="formLabel" style="padding-bottom: 20px">
           <van-cell>
             <van-cell>
-              <template #title>
-                <span class="van-f-red">*</span>信息备注
-              </template>
+              <template #title> <span class="van-f-red">*</span>信息备注 </template>
             </van-cell>
           </van-cell>
-          <van-field v-model="remark" rows="3"  autosize maxlength="260" show-word-limit label=""
-                     :formatter="formatter" type="textarea" placeholder="请填写信息异常信息"/>
+          <van-field
+            v-model="remark"
+            rows="3"
+            autosize
+            maxlength="260"
+            show-word-limit
+            label=""
+            :formatter="formatter"
+            type="textarea"
+            placeholder="请填写信息异常信息" />
         </div>
       </van-form>
-      <div class="formLabel" style="margin:20px 16px;">
-        <van-button block type="info" size="normal" style="background-color: #0057ba;" @click="endVisitsFn">提交</van-button>
+      <div class="formLabel" style="margin: 20px 16px">
+        <van-button
+          block
+          type="info"
+          size="normal"
+          style="background-color: #0057ba"
+          @click="endVisitsFn"
+          >提交</van-button
+        >
       </div>
     </div>
     <div id="allmap"></div>
@@ -56,13 +72,13 @@
 
 <script>
 // import uploadImg from "@/components/uploadImg";
-import uploadImg from "@/components/uploadVvisit";
-import deleteUploadImg from "@/components/deleteUploadImg1";
-import {addVisits, getVisitsDetail, endVisits, getPhotoTypeList1, stopVisit} from "@/api/index";
+import uploadImg from '@/components/uploadVvisit';
+import deleteUploadImg from '@/components/deleteUploadImg1';
+import { addVisits, getVisitsDetail, endVisits, getPhotoTypeList1, stopVisit } from '@/api/index';
 
 export default {
-  name: "abnormalVisit",
-  components: {uploadImg, deleteUploadImg},
+  name: 'abnormalVisit',
+  components: { uploadImg, deleteUploadImg },
   data() {
     return {
       flag: false,
@@ -70,109 +86,116 @@ export default {
       checkboxGroup: [],
       PhotoTypeList: [],
       radio: '',
-      typeList: "",
+      typeList: '',
       imgs: [],
-      abnormalReason: "",
+      abnormalReason: '',
       uploadid2: 'uploadid2',
-      remark: "",
-      lat: "",
-      lon: "",
-      storeCode: "",
+      remark: '',
+      lat: '',
+      lon: '',
+      storeCode: '',
       dialogms: true,
-      visitModel: ""
-    }
+      visitModel: '',
+    };
   },
   created() {
-    this.getPhotoTypeList()
-    this.urlParameter = this.$route.query
-    this.storeId = this.$route.query.storeId + "";
+    this.getPhotoTypeList();
+    this.urlParameter = this.$route.query;
+    this.storeId = this.$route.query.storeId + '';
     this.visitId = this.$route.query.visitId;
-    this.rdId = this.$route.query.rdId + "";
+    this.rdId = this.$route.query.rdId + '';
     this.storeCode = this.$route.query.storeCode;
-    this.lat = this.$route.query.lat + "";
-    this.lon = this.$route.query.lon + "";
-    this.visitModel = this.$route.query.visitModel + "";
-    this.imgs = []
-    this.remark = ""
-    this.abnormalReason = ""
+    this.lat = this.$route.query.lat + '';
+    this.lon = this.$route.query.lon + '';
+    this.visitModel = this.$route.query.visitModel + '';
+    this.imgs = [];
+    this.remark = '';
+    this.abnormalReason = '';
   },
   watch: {
     $route(to, from) {
-      if (from.path == "/deviceWithin/index" && to.path == "/abnormalVisit") {
-        this.urlParameter = this.$route.query
-        this.storeId = this.$route.query.storeId + "";
+      if (from.path == '/deviceWithin/index' && to.path == '/abnormalVisit') {
+        this.urlParameter = this.$route.query;
+        this.storeId = this.$route.query.storeId + '';
         this.visitId = this.$route.query.visitId;
-        this.rdId = this.$route.query.rdId + "";
+        this.rdId = this.$route.query.rdId + '';
         this.storeCode = this.$route.query.storeCode;
-        this.lat = this.$route.query.lat + "";
-        this.lon = this.$route.query.lon + "";
-        this.visitModel = this.$route.query.visitModel + "";
-        this.imgs = []
-        this.remark = ""
-        this.abnormalReason = ""
+        this.lat = this.$route.query.lat + '';
+        this.lon = this.$route.query.lon + '';
+        this.visitModel = this.$route.query.visitModel + '';
+        this.imgs = [];
+        this.remark = '';
+        this.abnormalReason = '';
       }
-      if (from.path == "/abnormalVisit" && to.path == "/deviceWithin/index") {
-        localStorage.removeItem("visitId")
+      if (from.path == '/abnormalVisit' && to.path == '/deviceWithin/index') {
+        localStorage.removeItem('visitId');
       }
-    }
+    },
   },
   activated() {
     this.imgs = [];
-    this.remark = "";
-    this.abnormalReason = "";
-    this.visitModel = this.$route.query.visitModel + "";
-    if(this.$route.query.type=="edit"){
-      this.visitId = this.$route.query.visitId + "";
-      localStorage.setItem("visitId",this.$route.query.visitId);
-      this.getVisitsDetailFn()
-    }else{
-      this.addVisits()
+    this.remark = '';
+    this.abnormalReason = '';
+    this.visitModel = this.$route.query.visitModel + '';
+    if (this.$route.query.type == 'edit') {
+      this.visitId = this.$route.query.visitId + '';
+      localStorage.setItem('visitId', this.$route.query.visitId);
+      this.getVisitsDetailFn();
+    } else {
+      this.addVisits();
     }
   },
   methods: {
     // 结束拜访
-    onstopVisit(){
-      this.$dialog.confirm({
-        confirmButtonText:"确定",
-        cancelButtonText:"取消",
-        title: '系统提示',
-        message: '取消拜访会清空填写的拜访内容和照片,是否确认?',
-      }).then(() => {
-        stopVisit({visitsId:this.visitId}).then(res=>{
-          if(res.code==200){
-            this.$dialog.alert({
-              title: '系统提示',
-              message: '拜访中任务结束成功!',
-            }).then(() => {
-              window.location.replace(window.location.origin+"/mobile/deviceWithin/index")
-            });
-          }else{
-            this.$toast(res.msg)
-          }
+    onstopVisit() {
+      this.$dialog
+        .confirm({
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          title: '系统提示',
+          message: '取消拜访会清空填写的拜访内容和照片,是否确认?',
         })
-      })
+        .then(() => {
+          stopVisit({ visitsId: this.visitId }).then((res) => {
+            if (res.code == 200) {
+              this.$dialog
+                .alert({
+                  title: '系统提示',
+                  message: '拜访中任务结束成功!',
+                })
+                .then(() => {
+                  window.location.replace(window.location.origin + '/mobile/deviceWithin/index');
+                });
+            } else {
+              this.$toast(res.msg);
+            }
+          });
+        });
     },
     formatter(value) {
-      return value.replace(/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi, '');
+      return value.replace(
+        /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
+        ''
+      );
     },
     getVisitsDetailFn() {
-      getVisitsDetail({visitsId: this.$route.query.visitId}).then(res => {
+      getVisitsDetail({ visitsId: this.$route.query.visitId }).then((res) => {
         if (res.code == 200) {
-          this.list = res.data
-          this.abnormalReason=res.data.abnormalReason+""
-          this.remark=res.data.remark
+          this.list = res.data;
+          this.abnormalReason = res.data.abnormalReason + '';
+          this.remark = res.data.remark;
           if (res.data.visitSource == 2) {
-            this.imgs = res.data.sysFileInfos
+            this.imgs = res.data.sysFileInfos;
           }
-        }else{
-          this.$toast(res.msg)
+        } else {
+          this.$toast(res.msg);
         }
-      })
+      });
     },
     getPhotoTypeList() {
-      getPhotoTypeList1({}).then(res => {
-        this.typeList = res.data
-      })
+      getPhotoTypeList1({}).then((res) => {
+        this.typeList = res.data;
+      });
     },
     newimgarr1(val) {
       this.imgs.push(val);
@@ -182,144 +205,186 @@ export default {
     },
     addVisits() {
       var that = this;
-      var map = new TMap.Map('allmap', {zoom: 14, center: new TMap.LatLng(39.986785, 116.301012),});
+      var map = new TMap.Map('allmap', {
+        zoom: 14,
+        center: new TMap.LatLng(39.986785, 116.301012),
+      });
       var geocoder = new TMap.service.Geocoder();
-      var markers = new TMap.MultiMarker({map: map, geometries: [],});
+      var markers = new TMap.MultiMarker({ map: map, geometries: [] });
       markers.setGeometries([]);
       var input = [that.urlParameter.marklat, that.urlParameter.marklon];
       var location = new TMap.LatLng(Number(input[0]), Number(input[1]));
       map.setCenter(location);
-      markers.updateGeometries([{id: 'main', position: location,},]);
-      geocoder.getAddress({ location: location }).then(function(result){
-            var addresses=result.result.formatted_addresses
+      markers.updateGeometries([{ id: 'main', position: location }]);
+      geocoder.getAddress({ location: location }).then(
+        function (result) {
+          var addresses = result.result.formatted_addresses;
           var params = {
             storeId: that.storeId,
             storeCode: that.storeCode,
-            visitSource: "2",
-            visitEntry: "0",
+            visitSource: '2',
+            visitEntry: '0',
+            lat: that.lat,
+            lon: that.lon,
+            visitModel: that.$route.query.visitModel,
+            routeDetailsId: that.rdId,
+            locationCity: '',
+            locationRemark: addresses.recommend,
+            locationAccuracy: that.urlParameter.PointSum,
+          };
+          localStorage.setItem('address', '');
+          if (that.visitId != null) {
+            params.id = that.visitId;
+          }
+          addVisits(params).then((res) => {
+            if (res.code == 200) {
+              localStorage.setItem('visitId', res.data);
+              that.visitId = res.data;
+            } else {
+              this.$toast(res.msg);
+            }
+          });
+        },
+        function (err) {
+          var params = {
+            storeId: that.storeId,
+            storeCode: that.storeCode,
+            visitSource: '2',
+            visitEntry: '0',
             lat: that.urlParameter.lat,
             lon: that.urlParameter.lon,
             visitModel: that.$route.query.visitModel,
             routeDetailsId: that.rdId,
-            locationCity: "",
-            locationRemark:  addresses.recommend,
-            locationAccuracy: that.urlParameter.PointSum
-          }
-         localStorage.setItem('address', "");
+            locationCity: '',
+            locationRemark: '',
+            locationAccuracy: that.urlParameter.PointSum,
+          };
+          localStorage.setItem('address', '');
           if (that.visitId != null) {
-            params.id = that.visitId
+            params.id = that.visitId;
           }
-          addVisits(params).then(res => {
+          addVisits(params).then((res) => {
             if (res.code == 200) {
               localStorage.setItem('visitId', res.data);
-              that.visitId = res.data
-            }else{
-              this.$toast(res.msg)
+              that.visitId = res.data;
+            } else {
+              this.$toast(res.msg);
             }
-          })
-      },function(err){
-        var params = {
-          storeId: that.storeId,
-          storeCode: that.storeCode,
-          visitSource: "2",
-          visitEntry: "0",
-          lat: that.urlParameter.lat,
-          lon: that.urlParameter.lon,
-          visitModel: that.$route.query.visitModel,
-          routeDetailsId: that.rdId,
-          locationCity: "",
-          locationRemark:"",
-          locationAccuracy: that.urlParameter.PointSum
-        }
-        localStorage.setItem('address', "");
-        if (that.visitId != null) {
-          params.id = that.visitId
+          });
         }
-        addVisits(params).then(res => {
-          if (res.code == 200) {
-            localStorage.setItem('visitId', res.data);
-            that.visitId = res.data
-          }else{
-            this.$toast(res.msg)
-          }
-        })
-      })
+      );
     },
     endVisitsFn() {
-      var insert=""
-      if(this.$route.query.type=="edit"){
-        insert=false
-      }else{
-        insert=true
+      var insert = '';
+      if (this.$route.query.type == 'edit') {
+        insert = false;
+      } else {
+        insert = true;
       }
       if (this.imgs.length == 0) {
-        this.$toast("请上传图片");
+        this.$toast('请上传图片');
         return;
-      } else if (this.abnormalReason == "") {
-        this.$toast("请选择事由");
+      } else if (this.abnormalReason == '') {
+        this.$toast('请选择事由');
         return;
-      } else if (this.remark.trim() == "") {
-        this.$toast("请填写异常内容");
+      } else if (this.remark.trim() == '') {
+        this.$toast('请填写异常内容');
         return;
       } else {
-        let dwellTime = this.weekend(localStorage.getItem('startTime'), new Date())
+        let dwellTime = this.weekend(localStorage.getItem('startTime'), new Date());
         endVisits({
-          visitSource: "2",
+          visitSource: '2',
           dwellTime: dwellTime,
           remark: this.remark,
-          visitType: "0",
-          insert:insert,
+          visitType: '0',
+          insert: insert,
           abnormalReason: this.abnormalReason,
           id: this.visitId,
           storeCode: this.storeCode,
-          visitModel: this.$route.query.visitModel
-        }).then(res => {
+          visitModel: this.$route.query.visitModel,
+        }).then((res) => {
           if (res.code == 200) {
-            this.$dialog.alert({
-              title: '系统提示',
-              message: '保存成功',
-            }).then(() => {
-              if(insert){
-                window.location.replace(window.location.origin+"/mobile/deviceWithin/index")
-
-              }else{
-                this.$router.go(-1)
-              }
-            });
-            localStorage.removeItem("visitId")
+            this.$dialog
+              .alert({
+                title: '系统提示',
+                message: '保存成功',
+              })
+              .then(() => {
+                if (insert) {
+                  window.location.replace(window.location.origin + '/mobile/deviceWithin/index');
+                } else {
+                  this.$router.go(-1);
+                }
+              });
+            localStorage.removeItem('visitId');
             localStorage.removeItem('startTime');
           } else {
             this.$toast.fail(res.msg);
           }
-        })
+        });
       }
     },
     weekend(time1) {
       var arrtime1 = new Date(time1).getTime();
       var arrtime2 = new Date().getTime();
-      return (Math.round((arrtime2 - arrtime1) / 1000));
+      return Math.round((arrtime2 - arrtime1) / 1000);
     },
-  }
-}
+  },
+};
 </script>
 <style lang="scss" scoped>
-.container {padding-bottom: 50px;}
-.van-f-red {color: red;width: 4px;display: inline-block}
-.formLabel {margin: 0 16px;border-bottom: 1px solid #f1f1f1}
-.formLabel .van-cell {padding: 10px 0}
-.z-checkbox .van-radio {padding: 6px 0;}
+.container {
+  padding-bottom: 50px;
+}
+.van-f-red {
+  color: red;
+  width: 4px;
+  display: inline-block;
+}
+.formLabel {
+  margin: 0 16px;
+  border-bottom: 1px solid #f1f1f1;
+}
+.formLabel .van-cell {
+  padding: 10px 0;
+}
+.z-checkbox .van-radio {
+  padding: 6px 0;
+}
 </style>
 <style>
-.bgWhite {background-color: white;}
-.formLabel .van-field {border: 1px solid #f1f1f1;padding: 10px;width: 100%;background-color: #f1f1f1;}
-.formLabel .van-field__control {padding: 0 10px}
-.lineGrey {height: 10px;width: 100%;background: #f1f1f1;}
-.van-dialog__confirm, .van-dialog__confirm:active {color: #0057ba;}
-.navRightBtnTop{color: white; background: #74a4d9; display: block; padding: 6px 10px; border-radius: 6px;}
-#allmap{
+.bgWhite {
+  background-color: white;
+}
+.formLabel .van-field {
+  border: 1px solid #f1f1f1;
+  padding: 10px;
+  width: 100%;
+  background-color: #f1f1f1;
+}
+.formLabel .van-field__control {
+  padding: 0 10px;
+}
+.lineGrey {
+  height: 10px;
+  width: 100%;
+  background: #f1f1f1;
+}
+.van-dialog__confirm,
+.van-dialog__confirm:active {
+  color: #0057ba;
+}
+.navRightBtnTop {
+  color: white;
+  background: #74a4d9;
+  display: block;
+  padding: 6px 10px;
+  border-radius: 6px;
+}
+#allmap {
   width: 20px;
   height: 20px;
   left: -1000px;
   position: relative;
 }
-</style>
+</style>

File diff suppressed because it is too large
+ 388 - 214
src/views/deviceWithin/addStoreVisit.vue


+ 118 - 455
src/views/deviceWithin/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="bgcolor">
+  <div class="bgcolor deviceWithin">
     <div class="navBarTOP">
       <!--        顶部条-->
       <van-nav-bar class="navBar" title="计划内"> </van-nav-bar>
@@ -44,12 +44,8 @@
         <van-icon class="CalendarIcon" :name="timeico" @click="show = true" />
       </div>
     </div>
-    <div class="lineGrey" v-if="mapShows"></div>
-    <div class="lineGrey" v-if="mapShows"></div>
-    <div class="lineGrey" v-if="mapShows"></div>
-    <div class="lineGrey" v-if="mapShows"></div>
     <!--        主体内容-->
-    <div class="container" style="margin-top: 144px">
+    <div class="container content" style="margin-top: 190px" @touchmove="handleTouch">
       <div class="cellcontent" v-for="(item, index) in list" :key="index">
         <van-cell>
           <div class="card">
@@ -193,15 +189,6 @@
                   </div>
                 </el-popover>
-                <!--              <el-popover-->
-                <!--                  placement="bottom"-->
-                <!--                  width="200"-->
-                <!--                  popper-class="zpover zpover2"-->
-                <!--                  trigger="click"-->
-                <!--                  content="本月未被拜访的信息">-->
-                <!--                <div v-if="item.storeLabels.noVisit" class="visitStoreIco" style="background-color: #fff" slot="reference">-->
-                <!--                  <van-icon :name="visitTimess" size="26" /></div>-->
-                <!--              </el-popover>-->
                 <el-popover
                   placement="bottom"
                   popper-class="zpover zpover1 zpover1sb"
@@ -250,7 +237,34 @@
                 :src="sbpmdh"
                 @click="linkapp(item)" />
             </div>
-            <div class="info" v-if="typeShow">经销商:{{ item.chainName }}</div>
+            <!-- 分销店 -->
+            <template
+              v-if="
+                item.sfaStoreType &&
+                item.sfaStoreType.type == 'fxd' &&
+                item.sfaStoreChainsContactList
+              ">
+              <div class="info" v-if="typeShow">
+                经销商:
+                <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>
+            </template>
+            <template v-else>
+              <div class="info" v-if="typeShow">经销商:{{ item.chainName }}</div>
+            </template>
             <!-- storeLonExist 门店是否存在经纬度 字段false=不显示导航和距离,true=显示 -->
             <div class="info" v-if="item.storeLonExist">距离:{{ Micrometer(item.distance) }}m</div>
           </div>
@@ -316,14 +330,7 @@
       <p style="text-align: center; color: #888a8e" v-if="list.length > 0">--已经到底了--</p>
       <br />
       <van-empty description="暂无数据" v-if="list.length == 0" />
-      <!--</van-list>-->
     </div>
-    <br />
-    <br />
-    <br />
-    <br />
-    <br />
-    <br />
     <van-popup v-model="show" position="bottom" :style="{ height: '50%' }">
       <van-datetime-picker
         v-model="currentDate"
@@ -426,34 +433,9 @@ export default {
   },
   watch: {
     $route(to, from) {
-      // this.getMonth();
-      // this.storeName = localStorage.getItem("deviveStoreName");
       if (from.path == '/deviceWithin/index' && to.path == '/storeVisitpage') {
         localStorage.setItem('startTime', new Date());
       }
-      // if (from.path == "/abnormalVisit" && to.path == "/deviceWithin/index") {
-      //   this.getUserInPlanList();
-      //   this.$dialog.close();
-      // }
-      // if (from.path == "/home" && to.path == "/deviceWithin/index") {
-      //   this.getUserInPlanList();
-      //   // localStorage.removeItem("startTime")
-      // }
-      // if (from.path == "/outsidelist/index" && to.path == "/deviceWithin/index") {
-      //   this.getUserInPlanList();
-      // }
-      // if (from.path == "/storeVisitpage" && to.path == "/deviceWithin/index") {
-      //   this.getUserInPlanList();
-      // }
-      // if (from.path == "/topStore" && to.path == "/deviceWithin/index") {
-      //   this.getUserInPlanList();
-      // }
-      // if (from.path == "/storeDetail" && to.path == "/deviceWithin/index") {
-      //   this.getUserInPlanList();
-      // }
-      // if (from.path == "/storeEdit" && to.path == "/deviceWithin/index") {
-      //   this.getUserInPlanList();
-      // }
     },
   },
   activated() {
@@ -466,16 +448,24 @@ export default {
       this.getUserInPlanList();
     });
   },
-  // created() {
-  //   let that = this;
-  //   that.query = that.$route.query;
-  //   this.timeData = this.parseTime(new Date(), "{yy}-{mm}-{dd}");
-  //   this.storeName = localStorage.getItem("deviveStoreName");
-  //   localStorage.removeItem("visitId");
-  //   this.getUserInPlanList();
-  //   this.getMonth();
-  // },
+  mounted() {
+    // 解决iOS 上拉边界下拉出现白色空白
+    let node = document.getElementsByClassName('deviceWithin')[0];
+    node.addEventListener(
+      'touchmove',
+      (e) => {
+        if (e._isScroller) return;
+        e.preventDefault();
+      },
+      {
+        passive: false,
+      }
+    );
+  },
   methods: {
+    handleTouch(e) {
+      e._isScroller = true;
+    },
     linkapp(val) {
       var poind = this.gcj02BD(val.lat, val.lon);
       let url = window.location.href;
@@ -801,7 +791,6 @@ export default {
                     this.lon = TXisBD.lon;
                     localStorage.setItem('lat', this.lat);
                     localStorage.setItem('lon', this.lon);
-                    // var location = this.CJ02BD(res.latitude, res.longitude);
                     this.checkStoreAddressByStoreCodeFun(val, TXisBD, resData);
                   })
                   .catch((error) => {
@@ -809,169 +798,6 @@ export default {
                       message: error,
                     });
                   });
-                // let loading1 = this.$toast.loading({
-                //   duration: 0,
-                //   message: '加载中...',
-                //   forbidClick: true,
-                // });
-                // let url = window.location.href;
-                // let wx = this.wx;
-                // let qiyeData;
-                // const instance = axios.create();
-                // instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
-                // instance
-                //   .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
-                //     params: {
-                //       url: url,
-                //     },
-                //   })
-                //   .then((response) => {
-                //     if (response.status == 200) {
-                //       this.cont = 3;
-                //       var flat = true;
-                //       var times = setInterval(() => {
-                //         this.cont--;
-                //         if (this.cont == '0') {
-                //           if (flat) {
-                //             loading1.clear();
-                //             clearInterval(times);
-                //             that.$dialog
-                //               .alert({
-                //                 message: '定位失败,请开启企微定位权限',
-                //               })
-                //               .then(() => {});
-                //           } else {
-                //             clearInterval(times);
-                //           }
-                //         }
-                //       }, 1000);
-                //       qiyeData = response.data.data;
-                //       wx.config({
-                //         beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
-                //         debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-                //         appId: qiyeData.appId, // 必填,企业微信的corpID
-                //         timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
-                //         nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
-                //         signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
-                //         jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
-                //       });
-                //       wx.ready(() => {
-                //         wx.getLocation({
-                //           type: 'gcj02',
-                //           success: (res) => {
-                //             flat = false;
-                //             var location = this.CJ02BD(res.latitude, res.longitude);
-                //             this.location = location;
-                //             checkStoreAddressByStoreCode({
-                //               storeCode: val.storeCode,
-                //               lon: location.lon,
-                //               lat: location.lat,
-                //             }).then((response) => {
-                //               loading1.clear();
-                //               if (val.lat == '' || val.lat == null) {
-                //                 that.lat = location.lat;
-                //                 that.lon = location.lon;
-                //               } else {
-                //                 that.lat = val.lat;
-                //                 that.lon = val.lon;
-                //               }
-                //               let PointSum = that
-                //                 .twoPointSum(that.lat, that.lon, location.lat, location.lon)
-                //                 .toFixed(2);
-                //               let PointSumval = that
-                //                 .twoPointSum(location.lat, location.lon, location.lat, location.lon)
-                //                 .toFixed(2);
-                //               // GZ:工装店铺 直接进入拜访
-                //               if (localStorage.getItem('postType') == 'GZ') {
-                //                 localStorage.setItem('startTime', new Date());
-                //                 localStorage.setItem('ORGName', val.deptName);
-                //                 localStorage.setItem('chainNameR', val.storeName);
-                //                 this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
-                //                 return;
-                //               }
-                //               // 门店编码校验门店地址不通过
-                //               if (response.code != 200) {
-                //                 // updateAddress : ,1:同城AB+金牌,去修改地址;2:非金牌店铺,非同城店铺偏差过大不允许拜访,可以重置定位;0非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
-                //                 if (response.data.updateAddress == 0) {
-                //                   // 非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
-                //                   this.$dialog
-                //                     .confirm({
-                //                       confirmButtonText: '确定拜访',
-                //                       cancelButtonText: '取消拜访',
-                //                       title: '系统提示',
-                //                       message:
-                //                         '该客户没有经纬度,此次拜访会保存定位点作为客户经纬度,下次拜访时判断是否偏差过大。',
-                //                       closeOnClickOverlay: true,
-                //                     })
-                //                     .then(() => {
-                //                       this.toSuishenbangOutstoreVisit(
-                //                         res,
-                //                         val,
-                //                         location,
-                //                         PointSumval
-                //                       );
-                //                     });
-                //                 } else if (response.data.updateAddress == 1) {
-                //                   // 同城AB+金牌,去修改地址
-                //                   // addressUpdateTimesOver: true=已经达到最大次数,不让修改; false=没有达到可以修改
-                //                   if (!response.data.addressUpdateTimesOver) {
-                //                     this.$dialog
-                //                       .confirm({
-                //                         title: '系统提示',
-                //                         message: response.msg + '请立即修改后再拜访',
-                //                         messageAlign: 'left',
-                //                         confirmButtonText: '立即修改',
-                //                         cancelButtonText: '取消',
-                //                       })
-                //                       .then(() => {
-                //                         this.$router.push({
-                //                           path: '/storeDetail',
-                //                           query: {
-                //                             id: val.storeId,
-                //                             type: 'address',
-                //                             storeAddressId: val.storeAddressId,
-                //                           },
-                //                         });
-                //                       });
-                //                   } else {
-                //                     this.$dialog.confirm({
-                //                       title: '系统提示',
-                //                       message: '已经达到最大修改次数',
-                //                       messageAlign: 'left',
-                //                       confirmButtonText: '确定',
-                //                     });
-                //                   }
-                //                 } else if (response.data.updateAddress == 2) {
-                //                   // 1.非金牌店铺,非同城店铺 位置偏差过大 重置经纬度
-                //                   this.resetCoord(res, val, location, PointSumval);
-                //                   return;
-                //                 }
-                //               } else {
-                //                 // 门店编码校验门店地址通过 进入拜访
-                //                 this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
-                //               }
-                //             });
-                //           },
-                //           fail: function () {
-                //             loading1.clear();
-                //             that.$dialog.alert({
-                //               message: 'GPS未开启',
-                //             });
-                //           },
-                //         });
-                //       });
-                //       wx.error(function (res) {
-                //         loading1.clear();
-                //         that.$dialog
-                //           .alert({
-                //             message: '定位失败,请开启企微定位权限',
-                //           })
-                //           .then(() => {});
-                //       });
-                //     } else {
-                //       loading1.clear();
-                //     }
-                //   });
               }
             }
           }
@@ -993,9 +819,6 @@ export default {
         if (val.lat == '' || val.lat == null) {
           this.lat = location.lat;
           this.lon = location.lon;
-        } else {
-          this.lat = val.lat;
-          this.lon = val.lon;
         }
         // let PointSum = this.twoPointSum(this.lat, this.lon, location.lat, location.lon).toFixed(2);
         let PointSumval = this.twoPointSum(
@@ -1277,9 +1100,6 @@ export default {
                         if (val.lat == '' || val.lat == null) {
                           that.lat = location.lat;
                           that.lon = location.lon;
-                        } else {
-                          that.lat = val.lat;
-                          that.lon = val.lon;
                         }
                         let PointSum = that
                           .twoPointSum(that.lat, that.lon, location.lat, location.lon)
@@ -1460,165 +1280,58 @@ export default {
             localStorage.setItem('ORGName', val.deptName);
             localStorage.setItem('chainNameR', val.storeName);
           } else {
-            if (this.flag) {
-              this.flag = false;
-              this.timer = null;
-              this.timer = setTimeout(() => {
-                this.flag = true;
-              }, 2000);
-              let loading1 = this.$toast.loading({
-                duration: 0,
-                message: '定位中...',
-                forbidClick: true,
-              });
-              let url = window.location.href;
-              let that = this;
-              let wx = this.wx;
-              let qiyeData;
-              const instance = axios.create();
-              instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
-              instance
-                .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
-                  params: {
-                    url: url,
+            getPosition()
+              .then((res) => {
+                let { TXisBD, resData } = res;
+                this.lat = TXisBD.lat;
+                this.lon = TXisBD.lon;
+                localStorage.setItem('lat', this.lat);
+                localStorage.setItem('lon', this.lon);
+                console.log('异常拜访=' + this.lat);
+                console.log('异常拜访=' + this.lon);
+                let PointSum = this.twoPointSum(
+                  TXisBD.lat,
+                  TXisBD.lon,
+                  TXisBD.lat,
+                  TXisBD.lon
+                ).toFixed(2);
+                this.$router.push({
+                  path: '/abnormalVisit',
+                  query: {
+                    storeId: val.storeId,
+                    rdId: val.rdId,
+                    lat: this.lat,
+                    lon: this.lon,
+                    visitModel: localStorage.getItem('postType') != 'GZ' ? '5' : '3',
+                    visitId: val.visitId,
+                    genDate: val.genDate,
+                    storeCode: val.storeCode,
+                    latNew: location.lat,
+                    lonNew: location.lon,
+                    PointSum: PointSum,
+                    marklat: resData.latitude,
+                    marklon: resData.longitude,
                   },
-                })
-                .then((response) => {
-                  if (response.status == 200) {
-                    this.cont = 3;
-                    var flat = true;
-                    var times = setInterval(() => {
-                      this.cont--;
-                      if (this.cont == '0') {
-                        if (flat) {
-                          loading1.clear();
-                          clearInterval(times);
-                          that.$dialog.alert({
-                            message: '定位失败,请开启企微定位权限',
-                          });
-                        } else {
-                          clearInterval(times);
-                        }
-                      }
-                    }, 1000);
-                    qiyeData = response.data.data;
-                    wx.config({
-                      beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
-                      debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-                      appId: qiyeData.appId, // 必填,企业微信的corpID
-                      timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
-                      nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
-                      signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
-                      jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
-                    });
-                    wx.ready(function () {
-                      wx.getLocation({
-                        type: 'gcj02',
-                        success: function (res) {
-                          flat = false;
-                          loading1.clear();
-                          var location = that.CJ02BD(res.latitude, res.longitude);
-                          if (val.lat == '' || val.lat == null) {
-                            that.lat = location.lat;
-                            that.lon = location.lon;
-                          } else {
-                            that.lat = val.lat;
-                            that.lon = val.lon;
-                          }
-                          let PointSum = that
-                            .twoPointSum(that.lat, that.lon, location.lat, location.lon)
-                            .toFixed(2);
-                          if (PointSum > 500 && localStorage.getItem('postType') != 'GZ') {
-                            that.$dialog
-                              .confirm({
-                                confirmButtonText: '确定',
-                                cancelButtonText: '取消',
-                                title: '系统提示',
-                                message: '定位距离偏差大',
-                                closeOnClickOverlay: true,
-                              })
-                              .then(() => {
-                                that.dialogms = false;
-                                that.$router.push({
-                                  path: '/abnormalVisit',
-                                  query: {
-                                    storeId: val.storeId,
-                                    rdId: val.rdId,
-                                    lat: that.lat,
-                                    lon: that.lon,
-                                    visitModel: '5',
-                                    visitId: val.visitId,
-                                    genDate: val.genDate,
-                                    storeCode: val.storeCode,
-                                    latNew: location.lat,
-                                    lonNew: location.lon,
-                                    PointSum: PointSum,
-                                    marklat: res.latitude,
-                                    marklon: res.longitude,
-                                  },
-                                });
-                                localStorage.setItem('startTime', new Date());
-                                localStorage.setItem('ORGName', val.deptName);
-                                localStorage.setItem('chainNameR', val.storeName);
-                              });
-                          } else {
-                            that.$router.push({
-                              path: '/abnormalVisit',
-                              query: {
-                                storeId: val.storeId,
-                                rdId: val.rdId,
-                                lat: that.lat,
-                                lon: that.lon,
-                                visitModel: '3',
-                                visitId: val.visitId,
-                                genDate: val.genDate,
-                                storeCode: val.storeCode,
-                                latNew: location.lat,
-                                lonNew: location.lon,
-                                PointSum: PointSum,
-                                marklat: res.latitude,
-                                marklon: res.longitude,
-                              },
-                            });
-                            localStorage.setItem('startTime', new Date());
-                            localStorage.setItem('ORGName', val.deptName);
-                            localStorage.setItem('chainNameR', val.storeName);
-                          }
-                          addVisitsPosition({
-                            storeId: val.storeId,
-                            visitsId: '',
-                            lon: res.longitude,
-                            lat: res.latitude,
-                            sourceLon: location.lon,
-                            sourceLat: location.lat,
-                            positionDesc: '',
-                            accuracy: res.accuracy,
-                          });
-                        },
-                        fail: function () {
-                          loading1.clear();
-                          that.$dialog
-                            .alert({
-                              message: 'GPS未开启',
-                            })
-                            .then(() => {
-                              // that.abnormalVisit(val)
-                            });
-                        },
-                      });
-                    });
-                    wx.error(function (res) {
-                      loading1.clear();
-                      that.$dialog.alert({
-                        message: '定位失败,请开启企微定位权限',
-                      });
-                    });
-                  } else {
-                    loading1.clear();
-                    this.$toast.fail(dataList.msg);
-                  }
                 });
-            }
+                localStorage.setItem('startTime', new Date());
+                localStorage.setItem('ORGName', val.deptName);
+                localStorage.setItem('chainNameR', val.storeName);
+                addVisitsPosition({
+                  storeId: val.storeId,
+                  visitsId: '',
+                  lon: resData.longitude,
+                  lat: resData.latitude,
+                  sourceLon: location.lon,
+                  sourceLat: location.lat,
+                  positionDesc: '',
+                  accuracy: resData.accuracy,
+                });
+              })
+              .catch((error) => {
+                this.$dialog.alert({
+                  message: error,
+                });
+              });
           }
         } else {
           this.$dialog.alert({
@@ -1654,77 +1367,6 @@ export default {
       this.$router.push({
         path: '/topStore',
       });
-      // let loading1 = this.$toast.loading({
-      //   duration: 0,
-      //   message: '加载中...',
-      //   forbidClick: true,
-      // });
-      // let url = window.location.href;
-      // let wx = this.wx;
-      // var that = this;
-      // let qiyeData;
-      // const instance = axios.create();
-      // instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
-      // instance
-      //   .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
-      //     params: {
-      //       url: url,
-      //     },
-      //   })
-      //   .then((response) => {
-      //     if (response.status == 200) {
-      //       this.cont = 5;
-      //       var flat = true;
-      //       var times = setInterval(() => {
-      //         this.cont--;
-      //         if (this.cont == '0') {
-      //           if (flat) {
-      //             loading1.clear();
-      //             clearInterval(times);
-      //             that.$dialog.alert({
-      //               message: '定位失败,请开启企微定位权限',
-      //             });
-      //           } else {
-      //             clearInterval(times);
-      //           }
-      //         }
-      //       }, 1000);
-      //       qiyeData = response.data.data;
-      //       wx.config({
-      //         beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
-      //         debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-      //         appId: qiyeData.appId, // 必填,企业微信的corpID
-      //         timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
-      //         nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
-      //         signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
-      //         jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
-      //       });
-      //       wx.ready(function () {
-      //         wx.getLocation({
-      //           type: 'gcj02',
-      //           success: function (res) {
-      //             flat = false;
-      //             loading1.clear();
-      //             that.$router.push({
-      //               path: '/topStore',
-      //             });
-      //           },
-      //           fail: function () {
-      //             loading1.clear();
-      //             that.$dialog.alert({
-      //               message: 'GPS未开启',
-      //             });
-      //           },
-      //         });
-      //       });
-      //       wx.error(function (res) {
-      //         loading1.clear();
-      //         that.$dialog.alert({
-      //           message: '定位失败,请开启企微定位权限',
-      //         });
-      //       });
-      //     }
-      //   });
     },
     formLink() {
       this.$router.push('/storeVisit/questions');
@@ -1920,4 +1562,25 @@ export default {
   font-size: 16px;
   font-weight: 600;
 }
+.deviceWithin {
+  height: 100%;
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  overflow: hidden;
+  .content {
+    flex: 1;
+    overflow-y: auto;
+  }
+  .tabBar {
+    height: 50px;
+  }
+  .TCFXListItem {
+    display: inline-block;
+    border: 1px solid #ccc;
+    padding: 3px 5px;
+    margin: 0 5px;
+    border-radius: 6px;
+  }
+}
 </style>

+ 1 - 0
src/views/deviceWithin/storeVisit.vue

@@ -687,6 +687,7 @@ export default {
             types: this.$route.query.type,
             locationAccuracy: this.locationAccuracy,
             insert: this.insert,
+            photoIdentifyType: val.photoIdentifyType,
           },
         });
       }

+ 3 - 1
src/views/deviceWithin/taskTips.vue

@@ -1,6 +1,8 @@
 <template>
   <div class="tips">
-    <span class="examples" v-if="examplePhoto" @click="openExamplesImg(examplePhoto)">示例</span>
+    <span class="examples" v-if="examplePhoto" @click="openExamplesImg(examplePhoto)"
+      >拍摄要求</span
+    >
     <span class="phone" v-if="contactPhone">
       <van-icon name="phone" size="18px" /><a :href="'tel:' + contactPhone" class="call">{{
         contactPhone

+ 372 - 301
src/views/historicalVisit/historAllVisit.vue

@@ -1,47 +1,58 @@
 <template>
-  <div class="bgcolor">
+  <div class="bgcolor historAllVisit">
     <div class="navBarTOP">
       <!--        顶部条-->
-      <van-nav-bar
-          class="navBar"
-          title="历史拜访"
-          left-arrow
-          @click-left="onClickLeft"
-      />
+      <van-nav-bar class="navBar" title="历史拜访" left-arrow @click-left="onClickLeft" />
       <div class="searcTime">
         <van-row class="serchInput">
           <van-col span="12">
-            <van-cell class="monthNow selectcell" :title="companyName"  is-link arrow-direction="down" @click="regionClick"/>
+            <van-cell
+              class="monthNow selectcell"
+              :title="companyName"
+              is-link
+              arrow-direction="down"
+              @click="regionClick" />
           </van-col>
           <van-col span="12">
-            <van-cell  class="monthNow selectcell"  :title="regionName"  is-link @click="SalesRegionClick" arrow-direction="down"/>
+            <van-cell
+              class="monthNow selectcell"
+              :title="regionName"
+              is-link
+              @click="SalesRegionClick"
+              arrow-direction="down" />
           </van-col>
           <van-col span="12">
-            <van-cell  class="monthNow selectcell"  :title="deptName" is-link @click="SalesDepartmentClick" arrow-direction="down"/>
+            <van-cell
+              class="monthNow selectcell"
+              :title="deptName"
+              is-link
+              @click="SalesDepartmentClick"
+              arrow-direction="down" />
           </van-col>
           <van-col span="12">
-            <van-cell  class="monthNow selectcell"  :title="userName" is-link @click="StaffClick" arrow-direction="down"/>
+            <van-cell
+              class="monthNow selectcell"
+              :title="userName"
+              is-link
+              @click="StaffClick"
+              arrow-direction="down" />
           </van-col>
           <van-col span="12">
             <div class="monthNow" @click="startTimeshow = true">
               <span class="month">{{ startTime }}</span>
-              <van-icon class="CalendarIcon" :name="timeico"/>
+              <van-icon class="CalendarIcon" :name="timeico" />
             </div>
           </van-col>
           <van-col span="12">
             <div class="monthNow" @click="endTimeshow = true">
               <span class="month">{{ endTime }}</span>
-              <van-icon class="CalendarIcon" :name="timeico"/>
+              <van-icon class="CalendarIcon" :name="timeico" />
             </div>
           </van-col>
         </van-row>
       </div>
       <div class="searchDiv">
-        <van-search
-            v-model="storeName"
-            show-action
-            placeholder="搜索名称/编号/地址/拜访人"
-        >
+        <van-search v-model="storeName" show-action placeholder="搜索名称/编号/地址/拜访人">
           <template #action>
             <div @click="onSearch">搜索</div>
           </template>
@@ -50,125 +61,170 @@
       <div class="lineGrey"></div>
     </div>
     <!--        主体内容-->
-    <div class="container" style="margin-top: 262px;">
+    <div class="container" style="margin-top: 262px">
       <van-list
-      class="myList1"
-      v-model="loading"
-      :finished="finished"
-      finished-text="没有更多了"
-      @load="onLoad"
-      >
-        <div v-if="list.length>0">
-          <div class="cellcontent" v-for="(item,index) in list" :key="index">
-            <van-cell @click="detilsFn(item)">
-              <div class="card" style="position: relative;">
-                <span v-if="item.visitSource==2" class="stateAbnormal">异常拜访</span>
+        class="myList1"
+        v-model="loading"
+        :finished="finished"
+        finished-text="没有更多了"
+        @load="onLoad">
+        <div v-if="list.length > 0">
+          <div class="cellcontent" v-for="(item, index) in list" :key="index">
+            <van-cell>
+              <div class="card" style="position: relative" @click="detilsFn(item)">
+                <span v-if="item.visitSource == 2" class="stateAbnormal">异常拜访</span>
                 <!--<span v-if="item.visitModel==5" class="state">偏差过大</span>-->
-                <span v-if="item.visitSource==1" class="state">正常拜访</span>
-                <div class="title"><span>{{ item.storeName }}</span>
-                  (<span style="color:#0057ba">{{
-                      item.storeCode
-                    }}</span>)
+                <span v-if="item.visitSource == 1" class="state">正常拜访</span>
+                <div class="title">
+                  <span>{{ item.storeName }}</span> (<span style="color: #0057ba">{{
+                    item.storeCode
+                  }}</span
+                  >)
                 </div>
                 <div class="info">拜访人:{{ item.nickName }}</div>
-                <div class="info">拜访时间:{{ item.visitsTime }}
-                  <span class="textRight" v-if="item.status=='1'&&item.taskId==null">审批中</span>
-                  <span class="textRight" v-if="item.status=='1'&&item.taskId!=null" style="color:red;">退回修改</span>
-                  <span  class="textRight" style="color: #07c160;" v-if="item.status==2">审批完成</span>
-                  <span class="textRight" v-if="item.status=='3'" style="color:red;">拒绝</span></div>
+                <div class="info">
+                  拜访时间:{{ item.visitsTime }}
+                  <span class="textRight" v-if="item.status == '1' && item.taskId == null"
+                    >审批中</span
+                  >
+                  <span
+                    class="textRight"
+                    v-if="item.status == '1' && item.taskId != null"
+                    style="color: red"
+                    >退回修改</span
+                  >
+                  <span class="textRight" style="color: #07c160" v-if="item.status == 2"
+                    >审批完成</span
+                  >
+                  <span class="textRight" v-if="item.status == '3'" style="color: red">拒绝</span>
+                </div>
                 <div class="info" v-if="item.dwellTime">拜访时长:{{ item.dwellTime }}</div>
                 <div class="info">地址:{{ item.addressLine }}</div>
-                <div class="info">经销商:{{ item.chainName }}</div>
               </div>
+              <!-- 分销店 -->
+              <template
+                v-if="
+                  item.sfaStoreType &&
+                  item.sfaStoreType.type == 'fxd' &&
+                  item.sfaStoreChainsContactList
+                ">
+                <div class="info">
+                  经销商:
+                  <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>
+              </template>
+              <template v-else>
+                <div class="info">经销商:{{ item.chainName }}</div>
+              </template>
             </van-cell>
             <div class="lineGrey"></div>
           </div>
-       </div>
+        </div>
       </van-list>
-<!--      <p style="text-align: center;color: #ccc;font-size: 12px;" v-if="list.length!=0">&#45;&#45;已经到底了&#45;&#45;</p>-->
-<!--      <van-empty description="&#45;&#45;已经到底了&#45;&#45;" v-if="list.length==0"/>-->
+      <!--      <p style="text-align: center;color: #ccc;font-size: 12px;" v-if="list.length!=0">&#45;&#45;已经到底了&#45;&#45;</p>-->
+      <!--      <van-empty description="&#45;&#45;已经到底了&#45;&#45;" v-if="list.length==0"/>-->
     </div>
     <van-popup v-model="startTimeshow" position="bottom" :style="{ height: '30%' }">
       <van-datetime-picker
-          v-model="startcurrentDate"
-          type="date"
-          title="开始日期"
-          :min-date="minDate"
-          :max-date="startmaxDate"
-          @confirm="dateeconfirm"
-          @cancel="startTimeshow=false"
-      />
+        v-model="startcurrentDate"
+        type="date"
+        title="开始日期"
+        :min-date="minDate"
+        :max-date="startmaxDate"
+        @confirm="dateeconfirm"
+        @cancel="startTimeshow = false" />
     </van-popup>
     <van-popup v-model="endTimeshow" position="bottom" :style="{ height: '50%' }">
       <van-datetime-picker
-          v-model="currentDate"
-          type="date"
-          title="开始日期"
-          :min-date="endminDate"
-          :max-date="maxDate"
-          @confirm="endTimeconfirm"
-          @cancel="endTimeshow=false"
-      />
+        v-model="currentDate"
+        type="date"
+        title="开始日期"
+        :min-date="endminDate"
+        :max-date="maxDate"
+        @confirm="endTimeconfirm"
+        @cancel="endTimeshow = false" />
     </van-popup>
     <van-popup v-model="RegionShow" capture position="bottom">
       <van-picker
-          show-toolbar
-          :columns="companyList"
-          value-key="deptName"
-          @confirm="onregionConfirm"
-          @cancel="RegionShow = false"
-      />
+        show-toolbar
+        :columns="companyList"
+        value-key="deptName"
+        @confirm="onregionConfirm"
+        @cancel="RegionShow = false" />
     </van-popup>
     <van-popup v-model="SalesRegionShow" capture position="bottom">
       <van-picker
-          show-toolbar
-          :columns="regionList"
-          value-key="deptName"
-          @confirm="onSalesRegionConfirm"
-          @cancel="SalesRegionShow = false"
-      />
+        show-toolbar
+        :columns="regionList"
+        value-key="deptName"
+        @confirm="onSalesRegionConfirm"
+        @cancel="SalesRegionShow = false" />
     </van-popup>
     <van-popup v-model="SalesDepartmentShow" capture position="bottom">
       <van-picker
-          show-toolbar
-          :columns="deptList"
-          value-key="deptName"
-          @confirm="onSalesDepartmentConfirm"
-          @cancel="SalesDepartmentShow = false"
-      />
+        show-toolbar
+        :columns="deptList"
+        value-key="deptName"
+        @confirm="onSalesDepartmentConfirm"
+        @cancel="SalesDepartmentShow = false" />
     </van-popup>
     <van-popup v-model="StaffShow" capture position="bottom">
       <van-picker
-          show-toolbar
-          :columns="userList"
-          @confirm="onStaffConfirm"
-          value-key="nickName"
-          @cancel="StaffShow = false"
-      />
+        show-toolbar
+        :columns="userList"
+        @confirm="onStaffConfirm"
+        value-key="nickName"
+        @cancel="StaffShow = false" />
     </van-popup>
   </div>
 </template>
 
 <script>
-import {getVisits,getvisitDeptInfo} from "@/api/index";
-import timeico from "@/assets/Icon/datatims.png";
+import { getVisits, getvisitDeptInfo } from '@/api/index';
+import timeico from '@/assets/Icon/datatims.png';
 
 export default {
-  name: "index.vue",
+  name: 'index.vue',
   data() {
     return {
       timeico: timeico,
       defaultDate: new Date(),
       searchValue: '',
       calendarShow: '',
-      monthNames: ['-01', '-02', '-03', '-04', '-05', '-06', '-07', '-08', '-09', '-10', '-11', '-12',],
+      monthNames: [
+        '-01',
+        '-02',
+        '-03',
+        '-04',
+        '-05',
+        '-06',
+        '-07',
+        '-08',
+        '-09',
+        '-10',
+        '-11',
+        '-12',
+      ],
       calendarIsshow: false,
       tabVal: 'insidePlan',
       list: [],
       loading: false,
       finished: true,
       listActive: null,
-      query: "",
+      query: '',
       show: false,
       minDate: new Date(2022, 0, 1),
       maxDate: new Date(),
@@ -176,142 +232,142 @@ export default {
       startcurrentDate: new Date(),
       endminDate: new Date(),
       startmaxDate: new Date(),
-      endTime: "",
-      startTime: "",
+      endTime: '',
+      startTime: '',
       endTimeshow: false,
       startTimeshow: false,
-      storeName: "",
-      companyName:"全部公司",
-      deptName:"全部销售部",
-      regionName:"全部大区",
-      userName:"全部业务员",
-      companyCode:"",
-      deptCode:"",
-      regionCode:"",
-      userCode:"",
-      companyList:[],
-      deptList:[],
-      regionList:[],
-      userList:[],
+      storeName: '',
+      companyName: '全部公司',
+      deptName: '全部销售部',
+      regionName: '全部大区',
+      userName: '全部业务员',
+      companyCode: '',
+      deptCode: '',
+      regionCode: '',
+      userCode: '',
+      companyList: [],
+      deptList: [],
+      regionList: [],
+      userList: [],
       RegionShow: false,
       SalesRegionShow: false,
       SalesDepartmentShow: false,
       StaffShow: false,
-      deptForm:{type:"",parentId:""},
-      pageNum:1 , // 当前页码  int类型
-      pageSize:10, // 当前每页条数  int类型
-      formData:{
-        companyId:"", // 公司id,必传 Long类型
-        regionId:"", // 大区id,必传  Long类型
-        deptId:"", // 部门id,如果为周报或日报为必传  Long类型
-        userId:"", // 业务员id,如果为日报为必传      Long类型
-        startTime:"", // 开始时间,必传  格式:yyyy-MM-dd  String类型
-        endTime:"", // 结束时间,必传  格式:yyyy-MM-dd  String类型
-        pageNum:1 , // 当前页码  int类型
-        pageSize:10, // 当前每页条数  int类型
+      deptForm: { type: '', parentId: '' },
+      pageNum: 1, // 当前页码  int类型
+      pageSize: 10, // 当前每页条数  int类型
+      formData: {
+        companyId: '', // 公司id,必传 Long类型
+        regionId: '', // 大区id,必传  Long类型
+        deptId: '', // 部门id,如果为周报或日报为必传  Long类型
+        userId: '', // 业务员id,如果为日报为必传      Long类型
+        startTime: '', // 开始时间,必传  格式:yyyy-MM-dd  String类型
+        endTime: '', // 结束时间,必传  格式:yyyy-MM-dd  String类型
+        pageNum: 1, // 当前页码  int类型
+        pageSize: 10, // 当前每页条数  int类型
       },
-    }
+    };
   },
   activated() {
-  // watch: {
-  //   $route(to, from) {
-  //     if (from.path == "/My/index" && to.path == "/historAllVisit") {
-  //       this.info();
-  //       this.userList=[]
-        this.pageNum=1;
-        this.list=[];
-        // this.powerGrade = localStorage.getItem("powerGrade")
-        // this.getDeptInfo("dept")
-        // if(this.powerGrade==5){
-        //   setTimeout(()=>{
-        //     if(this.$route.query.userCode==undefined){
-        //       this.companyName=this.companyList[0].deptName;
-        //       this.companyCode=this.companyList[0].deptId;
-        //     }
-        //     this.getDeptInfo("dept",1)
-        //   },1000)
-        // }
-        // if(this.powerGrade==4){
-        //   setTimeout(()=>{
-        //     this.getDeptInfo("dept",1)
-        //   },1000)
-        // }
-        // if(this.powerGrade==3){
-        //   setTimeout(()=>{
-        //     this.getDeptInfo("dept",2)
-        //   },1000)
-        // }
-        // if(this.powerGrade==2||this.powerGrade==1){
-        //   setTimeout(()=>{
-        //     this.getDeptInfo("user")
-        //   },2000)
-        // }
-        setTimeout(()=>{
-          this.onSearch();
-        },1000)
-      // }
+    // watch: {
+    //   $route(to, from) {
+    //     if (from.path == "/My/index" && to.path == "/historAllVisit") {
+    //       this.info();
+    //       this.userList=[]
+    this.pageNum = 1;
+    this.list = [];
+    // this.powerGrade = localStorage.getItem("powerGrade")
+    // this.getDeptInfo("dept")
+    // if(this.powerGrade==5){
+    //   setTimeout(()=>{
+    //     if(this.$route.query.userCode==undefined){
+    //       this.companyName=this.companyList[0].deptName;
+    //       this.companyCode=this.companyList[0].deptId;
+    //     }
+    //     this.getDeptInfo("dept",1)
+    //   },1000)
+    // }
+    // if(this.powerGrade==4){
+    //   setTimeout(()=>{
+    //     this.getDeptInfo("dept",1)
+    //   },1000)
+    // }
+    // if(this.powerGrade==3){
+    //   setTimeout(()=>{
+    //     this.getDeptInfo("dept",2)
+    //   },1000)
     // }
-  // },
-},
+    // if(this.powerGrade==2||this.powerGrade==1){
+    //   setTimeout(()=>{
+    //     this.getDeptInfo("user")
+    //   },2000)
+    // }
+    setTimeout(() => {
+      this.onSearch();
+    }, 1000);
+    // }
+    // }
+    // },
+  },
   created() {
     this.info();
-    this.userList=[]
-    this.pageNum=1;
-    this.list=[];
-    this.powerGrade = localStorage.getItem("powerGrade")
-    this.getDeptInfo("dept")
-    if(this.powerGrade==5){
-      setTimeout(()=>{
-        if(this.$route.query.userCode==undefined){
-          this.companyName=this.companyList[0].deptName;
-          this.companyCode=this.companyList[0].deptId;
+    this.userList = [];
+    this.pageNum = 1;
+    this.list = [];
+    this.powerGrade = localStorage.getItem('powerGrade');
+    this.getDeptInfo('dept');
+    if (this.powerGrade == 5) {
+      setTimeout(() => {
+        if (this.$route.query.userCode == undefined) {
+          this.companyName = this.companyList[0].deptName;
+          this.companyCode = this.companyList[0].deptId;
         }
-        this.getDeptInfo("dept",1)
-      },1000)
+        this.getDeptInfo('dept', 1);
+      }, 1000);
     }
-    if(this.powerGrade==4){
-      setTimeout(()=>{
-        this.getDeptInfo("dept",1)
-      },1000)
+    if (this.powerGrade == 4) {
+      setTimeout(() => {
+        this.getDeptInfo('dept', 1);
+      }, 1000);
     }
-    if(this.powerGrade==3){
-      setTimeout(()=>{
-        this.getDeptInfo("dept",2)
-      },1000)
+    if (this.powerGrade == 3) {
+      setTimeout(() => {
+        this.getDeptInfo('dept', 2);
+      }, 1000);
     }
-    if(this.powerGrade==2||this.powerGrade==1){
-      setTimeout(()=>{
-        this.getDeptInfo("user")
-      },2000)
+    if (this.powerGrade == 2 || this.powerGrade == 1) {
+      setTimeout(() => {
+        this.getDeptInfo('user');
+      }, 2000);
     }
     // setTimeout(()=>{
     //   this.onSearch();
     // },1000)
   },
   methods: {
-    onLoad(){
+    onLoad() {
       // this.loading = false;
       this.getVisitsListFn();
     },
-    info(){
+    info() {
       this.query = this.$route.query;
-      this.startTime = this.getDay(-7)
-      this.startcurrentDate = new Date(this.getDay(-7))
-      this.endTime = this.parseTime(new Date(), '{y}-{m}-{d}')
-      this.endminDate = new Date(this.getDay(-7))
+      this.startTime = this.getDay(-7);
+      this.startcurrentDate = new Date(this.getDay(-7));
+      this.endTime = this.parseTime(new Date(), '{y}-{m}-{d}');
+      this.endminDate = new Date(this.getDay(-7));
     },
     detilsFn(val) {
       this.$router.push({
-        path: "/historicalDetails",
+        path: '/historicalDetails',
         query: {
           visitId: val.id,
-          storeId:val.storeId,
-          storeCode:val.storeCode,
-          taskId:val.taskId,
-          userId:val.userId,
-          storeCategory:val.storeCategory
-        }
-      })
+          storeId: val.storeId,
+          storeCode: val.storeCode,
+          taskId: val.taskId,
+          userId: val.userId,
+          storeCategory: val.storeCategory,
+        },
+      });
     },
     timeBefore7(date) {
       if (!date) {
@@ -324,9 +380,9 @@ export default {
         m = date.getMonth();
         var d1 = new Date(y, m, 0);
         var d2 = d1.getDate();
-        return y + '/' + (m < 10 ? ('0' + m) : m) + '/' + (d2 + d);
+        return y + '/' + (m < 10 ? '0' + m : m) + '/' + (d2 + d);
       } else {
-        return y + '/' + (m < 10 ? ('0' + m) : m) + '/' + (d < 10 ? ('0' + d) : d);
+        return y + '/' + (m < 10 ? '0' + m : m) + '/' + (d < 10 ? '0' + d : d);
       }
     },
     getDay(day) {
@@ -338,33 +394,33 @@ export default {
       var tDate = today.getDate();
       tMonth = this.doHandleMonth(tMonth + 1);
       tDate = this.doHandleMonth(tDate);
-      return tYear + "-" + tMonth + "-" + tDate;
+      return tYear + '-' + tMonth + '-' + tDate;
     },
     doHandleMonth(month) {
       var m = month;
       if (month.toString().length == 1) {
-        m = "0" + month;
+        m = '0' + month;
       }
       return m;
     },
     dateeconfirm() {
-      this.startTimeshow = false
-      this.startTime = this.parseTime(this.startcurrentDate, '{yy}-{mm}-{dd}')
-      this.endminDate = new Date(this.startcurrentDate)
-      this.onSearch()
+      this.startTimeshow = false;
+      this.startTime = this.parseTime(this.startcurrentDate, '{yy}-{mm}-{dd}');
+      this.endminDate = new Date(this.startcurrentDate);
+      this.onSearch();
     },
     endTimeconfirm() {
-      this.endTimeshow = false
-      this.endTime = this.parseTime(this.currentDate, '{yy}-{mm}-{dd}')
-      this.startmaxDate = new Date(this.currentDate)
-      this.onSearch()
+      this.endTimeshow = false;
+      this.endTime = this.parseTime(this.currentDate, '{yy}-{mm}-{dd}');
+      this.startmaxDate = new Date(this.currentDate);
+      this.onSearch();
     },
     onClickLeft() {
-      this.$router.go(-1)
+      this.$router.go(-1);
     },
     onSearch() {
-      this.pageNum=1;
-      this.list=[];
+      this.pageNum = 1;
+      this.list = [];
       this.getVisitsListFn();
     },
     getVisitsListFn() {
@@ -378,27 +434,30 @@ export default {
         this.refreshing = false;
       }
       getVisits({
-        startTime: this.startTime+ " 00:00:00",//
-        stopTime: this.endTime+ " 24:00:00", //
+        startTime: this.startTime + ' 00:00:00', //
+        stopTime: this.endTime + ' 24:00:00', //
         storeRequest: this.storeName.trim(),
-        pageNum:this.pageNum,
-        pageSize:this.pageSize,
-        companyId: this.companyCode, regionId: this.regionCode, userId: this.userCode, deptId: this.deptCode
-      }).then(res => {
-        loading1.clear()
+        pageNum: this.pageNum,
+        pageSize: this.pageSize,
+        companyId: this.companyCode,
+        regionId: this.regionCode,
+        userId: this.userCode,
+        deptId: this.deptCode,
+      }).then((res) => {
+        loading1.clear();
         if (res.code == 200) {
-          this.loading=false
-          this.list = this.list.concat(res.data)
-          if (this.list.length >=res.total) {
+          this.loading = false;
+          this.list = this.list.concat(res.data);
+          if (this.list.length >= res.total) {
             this.finished = true;
-          }else{
+          } else {
             this.finished = false;
           }
-          this.pageNum=this.pageNum+1
+          this.pageNum = this.pageNum + 1;
         } else {
-          this.$toast.fail(res.msg)
+          this.$toast.fail(res.msg);
         }
-      })
+      });
     },
     regionClick() {
       // if(this.powerGrade>4){
@@ -420,101 +479,101 @@ export default {
     },
     StartTimeClick() {
       this.StartTimeShow = true;
-    },onregionConfirm(val) {
+    },
+    onregionConfirm(val) {
       this.RegionShow = false;
-      this.companyName=val.deptName;
-      this.companyCode=val.deptId;
-      this.regionName="全部大区";
-      this.regionCode="";
-      this.deptName="全部销售部";
-      this.deptCode="";
-      this.userName="全部业务员";
-      this.userCode="";
-      this.getDeptInfo("dept",1)
+      this.companyName = val.deptName;
+      this.companyCode = val.deptId;
+      this.regionName = '全部大区';
+      this.regionCode = '';
+      this.deptName = '全部销售部';
+      this.deptCode = '';
+      this.userName = '全部业务员';
+      this.userCode = '';
+      this.getDeptInfo('dept', 1);
     },
     onSalesRegionConfirm(val) {
       this.SalesRegionShow = false;
-      this.regionName=val.deptName;
-      this.regionCode=val.deptId;
-      if(val.deptId!=""){
-        this.getDeptInfo("dept",2)
+      this.regionName = val.deptName;
+      this.regionCode = val.deptId;
+      if (val.deptId != '') {
+        this.getDeptInfo('dept', 2);
       }
-      this.deptName="全部销售部";
-      this.deptCode="";
-      this.userName="全部业务员";
-      this.userCode="";
-      this.userList=[]
+      this.deptName = '全部销售部';
+      this.deptCode = '';
+      this.userName = '全部业务员';
+      this.userCode = '';
+      this.userList = [];
     },
     onSalesDepartmentConfirm(val) {
       this.SalesDepartmentShow = false;
-      this.deptName=val.deptName;
-      this.deptCode=val.deptId;
-      if(val.deptId!=""){
-
-        this.getDeptInfo("user")
+      this.deptName = val.deptName;
+      this.deptCode = val.deptId;
+      if (val.deptId != '') {
+        this.getDeptInfo('user');
       }
-      this.userName="全部业务员";
-      this.userCode="";
+      this.userName = '全部业务员';
+      this.userCode = '';
     },
     onStaffConfirm(val) {
       this.StaffShow = false;
-      this.userName=val.nickName;
-      this.userCode=val.userId;
+      this.userName = val.nickName;
+      this.userCode = val.userId;
     },
-    getDeptInfo(type,grade){
-      this.deptForm.type=type
-      if(type=="dept"){
-        if(grade=="1"){
-          this.deptForm.parentId=this.companyCode
-        }else if(grade=="2"){
-          this.deptForm.parentId=this.regionCode
-        }else{
-          this.deptForm.type=""
-          this.deptForm.parentId=""
+    getDeptInfo(type, grade) {
+      this.deptForm.type = type;
+      if (type == 'dept') {
+        if (grade == '1') {
+          this.deptForm.parentId = this.companyCode;
+        } else if (grade == '2') {
+          this.deptForm.parentId = this.regionCode;
+        } else {
+          this.deptForm.type = '';
+          this.deptForm.parentId = '';
         }
-      }else if(type=="user"){
-        this.deptForm.parentId=this.deptCode
+      } else if (type == 'user') {
+        this.deptForm.parentId = this.deptCode;
       }
-      getvisitDeptInfo(this.deptForm).then(res=>{
-        if(type=="dept"){
-          if(grade=="1"){
-            if(res.data.region!=null){
-              this.regionList=[{deptName:"全部大区",deptId:""}].concat(res.data.region)
+      getvisitDeptInfo(this.deptForm).then((res) => {
+        if (type == 'dept') {
+          if (grade == '1') {
+            if (res.data.region != null) {
+              this.regionList = [{ deptName: '全部大区', deptId: '' }].concat(res.data.region);
             }
-          }else if(grade=="2"){
-            if(res.data.dept!=null){
-              this.deptList=[{deptName:"全部销售部",deptId:""}].concat(res.data.dept)
+          } else if (grade == '2') {
+            if (res.data.dept != null) {
+              this.deptList = [{ deptName: '全部销售部', deptId: '' }].concat(res.data.dept);
             }
-          }else{
-            this.companyList=res.data.company
-            if(this.$route.query.userCode==undefined){
-              this.companyName=res.data.company[0].deptName
-              this.companyCode=res.data.company[0].deptId
+          } else {
+            this.companyList = res.data.company;
+            if (this.$route.query.userCode == undefined) {
+              this.companyName = res.data.company[0].deptName;
+              this.companyCode = res.data.company[0].deptId;
             }
-            if(res.data.dept!=null){
-              this.deptName=res.data.dept[0].deptName
-              this.deptCode=res.data.dept[0].deptId
-              this.deptList=res.data.dept
+            if (res.data.dept != null) {
+              this.deptName = res.data.dept[0].deptName;
+              this.deptCode = res.data.dept[0].deptId;
+              this.deptList = res.data.dept;
             }
-            if(res.data.region!=null){
-              this.regionName=res.data.region[0].deptName
-              this.regionCode=res.data.region[0].deptId
-              this.regionList=res.data.region
+            if (res.data.region != null) {
+              this.regionName = res.data.region[0].deptName;
+              this.regionCode = res.data.region[0].deptId;
+              this.regionList = res.data.region;
             }
-            if(res.data.user!=null){
-              this.userList=res.data.user
-              this.userCode=""
+            if (res.data.user != null) {
+              this.userList = res.data.user;
+              this.userCode = '';
             }
           }
-        }else if(type=="user"){
-          if(res.data.user!=null){
-            this.userList=[{nickName:"全部业务员",userId:""}].concat(res.data.user)
+        } else if (type == 'user') {
+          if (res.data.user != null) {
+            this.userList = [{ nickName: '全部业务员', userId: '' }].concat(res.data.user);
           }
         }
-      })
+      });
     },
-  }
-}
+  },
+};
 </script>
 <style lang="scss">
 .searchDiv {
@@ -533,7 +592,7 @@ export default {
   }
 
   .van-search--show-action {
-    padding-right: 12px
+    padding-right: 12px;
   }
 
   .van-search__content {
@@ -554,6 +613,15 @@ export default {
     }
   }
 }
+.historAllVisit {
+  .TCFXListItem {
+    display: inline-block;
+    border: 1px solid #ccc;
+    padding: 3px 5px;
+    margin: 0 5px;
+    border-radius: 6px;
+  }
+}
 </style>
 <style lang="scss" scoped>
 .bgcolor {
@@ -573,12 +641,13 @@ export default {
   box-sizing: border-box;
   background-color: #f1f1f1;
   border-radius: 20px;
-  margin:8px;
+  margin: 8px;
   border: 1px solid #ccc;
   position: relative;
   color: #333;
   font-size: 14px;
-  .van-cell__left-icon, .van-cell__right-icon{
+  .van-cell__left-icon,
+  .van-cell__right-icon {
     line-height: 34px;
   }
   .CalendarIcon {
@@ -593,10 +662,12 @@ export default {
     }
   }
 }
-.serchInput{
-  padding: 0 4px ;
+.serchInput {
+  padding: 0 4px;
+}
+.selectcell {
+  width: 92%;
 }
-.selectcell{width: 92%}
 .card {
   box-sizing: border-box;
 
@@ -620,7 +691,7 @@ export default {
   background-color: white;
 }
 .btnbox {
-  padding: 0 16px
+  padding: 0 16px;
 }
 .cellcontent .centerBtn {
   margin: 0 auto 10px;
@@ -672,4 +743,4 @@ export default {
   float: right;
   color: #0057ba;
 }
-</style>
+</style>

+ 31 - 1
src/views/historicalVisit/historicalDetails.vue

@@ -29,7 +29,28 @@
         <div class="subtitle">拜访人:{{ list.nickName }}</div>
         <div class="subtitle">拜访日期:{{ list.startTime }}~{{ list.stopTime }}</div>
         <div class="subtitle" v-if="list.dwellTime">拜访时长:{{ list.dwellTime }}</div>
-        <div class="subtitle">经销商:{{ list.chainName }}</div>
+        <!-- 分销店 -->
+        <template
+          v-if="
+            verifyStoreType(list.storeCategory) && verifyStoreType(list.storeCategory).type == 'fxd'
+          ">
+          <div class="subtitle" style="display: flex">
+            <div class="label" style="width: 75px">经销商:</div>
+            <div class="valuue TCFXList">
+              <div
+                class="sfaStoreChainsContactList"
+                v-for="(item, index) in list.sfaStoreChainsContactList"
+                :key="index">
+                {{ item.categoryDescribe }}
+                {{ item.chainCode }}
+                {{ item.chainName }}
+              </div>
+            </div>
+          </div>
+        </template>
+        <template v-else>
+          <div class="subtitle">经销商:{{ list.chainName }}</div>
+        </template>
         <div class="subtitle" v-if="updateTimeShow">更新时间:{{ list.updateTime }}</div>
       </div>
       <p
@@ -389,6 +410,15 @@ export default {
     }
   }
 }
+.TCFXList {
+  .van-field__control--custom {
+    flex-direction: column;
+    align-items: self-start;
+    .TCFXListTreeSelec {
+      padding: 3px;
+    }
+  }
+}
 </style>
 <style>
 .fontWeit .van-cell__title {

+ 0 - 6
src/views/home/bottomBtn.vue

@@ -124,11 +124,6 @@ export default {
   },
   methods: {
     getReportInfo() {
-      //   let loading1 = this.$toast.loading({
-      //     duration: 0,
-      //     message: '加载中...',
-      //     forbidClick: true,
-      //   });
       getReportInfo({ isContent: false }).then((res) => {
         if (res.code == 200) {
           if (res.data.postType == 'GZ') {
@@ -141,7 +136,6 @@ export default {
           } else {
             this.JZQuota = false;
           }
-          //   loading1.clear();
           localStorage.setItem('powerGrade', res.data.positionId);
           localStorage.setItem('isDiy', res.data.diy);
           localStorage.setItem('uType', res.data.userType);

+ 10 - 10
src/views/home/hintTabPage/hintDetail.vue

@@ -135,20 +135,20 @@ export default {
           ],
         },
         {
-          label: '同A店',
+          label: '同城分销-涂料店',
           childredColumn: [
             {
               label: '(近2月)',
-              prop: 'tongANotVisited',
+              prop: 'TuLiaoNotVisited',
             },
           ],
         },
         {
-          label: '同B店',
+          label: '同城分销-其他店',
           childredColumn: [
             {
               label: '(近3月)',
-              prop: 'tongBNotVisited',
+              prop: 'QiTaNotVisited',
             },
           ],
         },
@@ -178,20 +178,20 @@ export default {
           ],
         },
         {
-          label: '同A店',
+          label: '同城分销-涂料店',
           childredColumn: [
             {
               label: '(7天未结案)',
-              prop: 'tongAAbnormalNum',
+              prop: 'TuLiaoAbnormalNum',
             },
           ],
         },
         {
-          label: '同B店',
+          label: '同城分销-其他店',
           childredColumn: [
             {
               label: '(7天未结案)',
-              prop: 'tongBAbnormalNum',
+              prop: 'QiTaAbnormalNum',
             },
           ],
         },
@@ -316,12 +316,12 @@ export default {
       this.maskShow = true;
       if (this.fromType == 'noVisit') {
         // 未拜访
-        this.deptId = tree ? tree.onlyId : this.userInfo.deptId;
+        this.deptId = tree ? tree.onlyId : null;
         this.firstProp = 'onlyName';
         this.selectNoVisitsInfoFun(resolve);
       } else if (this.fromType == 'createStore') {
         // 建店
-        this.deptId = tree ? tree.onlyId : this.userInfo.deptId;
+        this.deptId = tree ? tree.onlyId : null;
         this.firstProp = 'onlyName';
         this.selectPendingCasesInfoFun(resolve);
       } else if (this.fromType == 'pantone') {

+ 41 - 23
src/views/home/hintTabPage/index.vue

@@ -4,11 +4,14 @@
       <van-collapse v-model="activeNames">
         <!-- 拜访(实时) -->
         <van-collapse-item :name="visitCollapse.name">
-          <span class="updateTime">更新时间:{{ visitCollapse.latestUpdateTime }}</span>
+          <span class="updateTime" v-if="visitCollapse.latestUpdateTime != ''">
+            更新时间:
+            {{ visitCollapse.latestUpdateTime }}
+          </span>
           <template #title>
             <div class="itemHeader">
-              <span class="itemTitle">{{ visitCollapse.title }}</span>
-              <span @click.stop>
+              <span class="itemTitle" v-if="visitCollapse.title">{{ visitCollapse.title }}</span>
+              <span @click.stop v-if="visitCollapse.tipsPopoverlabel">
                 <el-popover placement="right" trigger="click" popper-class="hintPopover">
                   <div
                     class="popoverConten"
@@ -24,6 +27,7 @@
             </div>
           </template>
           <visitPage
+            v-if="visitCollapse.resData"
             fromType="noVisit"
             :empLevel="empLevel"
             :contentData="visitCollapse.contentData"
@@ -34,8 +38,12 @@
         <van-collapse-item :name="createStore.name">
           <template #title>
             <div class="itemHeader" @click.stop>
-              <span class="itemTitle">{{ createStore.title }}</span>
-              <el-popover placement="right" trigger="click" popper-class="hintPopover">
+              <span class="itemTitle" v-if="createStore.title">{{ createStore.title }}</span>
+              <el-popover
+                placement="right"
+                trigger="click"
+                popper-class="hintPopover"
+                v-if="createStore.tipsPopoverlabel">
                 <div
                   class="popoverConten"
                   v-for="(item, index) in createStore.tipsPopoverlabel"
@@ -49,6 +57,7 @@
             </div>
           </template>
           <visitPage
+            v-if="createStore.resData"
             fromType="createStore"
             :empLevel="empLevel"
             :contentData="createStore.contentData"
@@ -267,8 +276,8 @@ export default {
             ],
           },
           {
-            title: '同A店',
-            titleProp: 'tongA',
+            title: '同城分销-涂料店',
+            titleProp: 'TuLiao',
             bagColor: '#88abda',
             visitDetail: [
               {
@@ -284,8 +293,8 @@ export default {
             ],
           },
           {
-            title: '同B店',
-            titleProp: 'tongB',
+            title: '同城分销-其他店',
+            titleProp: 'QiTa',
             bagColor: '#8f82bc',
             visitDetail: [
               {
@@ -370,8 +379,8 @@ export default {
             ],
           },
           {
-            title: '同A店',
-            titleProp: 'tongA',
+            title: '同城分销-涂料店',
+            titleProp: 'TuLiao',
             bagColor: '#88abda',
             visitDetail: [
               {
@@ -386,15 +395,15 @@ export default {
                 leftUnit: '家',
                 leftIsClick: false,
                 rightTable: '7天未结案:',
-                rightProp: 'tongAAbnormalNum',
+                rightProp: 'TuLiaoAbnormalNum',
                 rightUnit: '家',
                 rightIsClick: true,
               },
             ],
           },
           {
-            title: '同B店',
-            titleProp: 'tongB',
+            title: '同城分销-其他店',
+            titleProp: 'QiTa',
             bagColor: '#8f82bc',
             visitDetail: [
               {
@@ -409,7 +418,7 @@ export default {
                 leftUnit: '家',
                 leftIsClick: false,
                 rightTable: '7天未结案:',
-                rightProp: 'tongBAbnormalNum',
+                rightProp: 'QiTaAbnormalNum',
                 rightUnit: '家',
                 rightIsClick: true,
               },
@@ -429,13 +438,14 @@ export default {
         pantoneLosding: true,
         pantoneData: {},
       },
+      isLoading: false,
     };
   },
   watch: {
     tabVal: {
       handler(val) {
         if (val == -1) {
-          this.initData();
+          // this.initData();
         }
       },
       immediate: true,
@@ -443,6 +453,10 @@ export default {
   },
   activated() {},
   methods: {
+    onRefresh() {
+      this.initData();
+      this.isLoading = false;
+    },
     initData() {
       if (!this.userInfo) return;
       this.empLevel = this.userInfo.empLevel;
@@ -458,18 +472,22 @@ export default {
     getVisitCollapseData() {
       this.visitCollapse.collapseLosding = true;
       selectVisitsRealTime().then((res) => {
-        this.visitCollapse.resData = res.data;
-        this.visitCollapse.tipsPopoverlabel = res.data.reminderContent;
-        this.visitCollapse.latestUpdateTime = res.data.latestUpdateTime;
-        this.visitCollapse.collapseLosding = false;
+        if (res.code == 200) {
+          this.visitCollapse.resData = res.data;
+          this.visitCollapse.tipsPopoverlabel = res.data.reminderContent;
+          this.visitCollapse.latestUpdateTime = res.data.latestUpdateTime;
+          this.visitCollapse.collapseLosding = false;
+        }
       });
     },
     getSelectBuildingStore() {
       this.createStore.collapseLosding = true;
       selectBuildingStore().then((res) => {
-        this.createStore.resData = res.data;
-        this.createStore.tipsPopoverlabel = res.data.reminderContent;
-        this.createStore.collapseLosding = false;
+        if (res.code == 200) {
+          this.createStore.resData = res.data;
+          this.createStore.tipsPopoverlabel = res.data.reminderContent;
+          this.createStore.collapseLosding = false;
+        }
       });
     },
     getReportData() {

+ 4 - 4
src/views/home/hintTabPage/noVisit.vue

@@ -90,10 +90,10 @@ export default {
         type = '可控店';
       } else if (value == 'jinPai') {
         type = '金牌店';
-      } else if (value == 'tongA') {
-        type = '同城A';
-      } else if (value == 'tongB') {
-        type = '同城B';
+      } else if (value == 'TuLiao') {
+        type = '同城分销-涂料店';
+      } else if (value == 'QiTa') {
+        type = '同城分销-其他店';
       }
       return type;
     },

+ 7 - 3
src/views/home/hintTabPage/visitPage.vue

@@ -16,7 +16,7 @@
               </template>
             </div>
           </div>
-          <div class="itemRight" :style="{ width: fromType == 'noVisit' ? '130px' : '140px' }">
+          <div class="itemRight" :style="{ width: fromType == 'noVisit' ? '150px' : '160px' }">
             <div class="label">{{ list.rightTable }}</div>
             <div
               class="label"
@@ -114,15 +114,19 @@ export default {
   position: relative;
   .storeType {
     display: flex;
-    padding: 8px 0;
+    /* padding: 8px 0; */
+    flex-direction: column;
     .title {
       color: #fff;
       height: 21px;
       margin-right: 6px;
-      width: 50px;
+      /* width: 50px; */
       text-align: center;
       line-height: 21px;
       border-radius: 2px;
+      margin: 4px 0;
+      width: max-content;
+      padding: 0 3px;
     }
     .itemContent {
       /* display: flex; */

+ 97 - 46
src/views/home/index.vue

@@ -1,41 +1,30 @@
 <template>
   <div class="homePage" ref="homePage">
-    <van-nav-bar class="navBar" left-arrow title="门店拜访" @click-left="onClickLeft" />
-    <van-tabs
-      class="myTab"
-      type="card"
-      v-model="tabVal"
-      color="#0057ba"
-      @click="onClickTabs"
-      v-if="isGZorJZ">
-      <van-tab title="提示类" name="-1" v-if="isGZorJZ == 'false'">
-        <hintTabPage :tabVal="tabVal" ref="hintTabPage"></hintTabPage
-      ></van-tab>
-      <van-tab title="A类指标" name="0"
-        ><ABtarget :tabVal="tabVal" ref="Atarget"></ABtarget
-      ></van-tab>
-      <van-tab title="B类指标" name="1"
-        ><ABtarget :tabVal="tabVal" ref="Btarget"></ABtarget
-      ></van-tab>
-    </van-tabs>
-    <div class="bottomBtn">
-      <bottomBtn :tabVal="tabVal"></bottomBtn>
-    </div>
-    <!-- <van-dialog v-model="shows" @confirm="titleconfirm">
-      <div class="tipTitleBox" style="padding: 10px">
-        <p class="p">系统提示</p>
-        <p>各位好,因五一假期,汇报提交时间有调整。</p>
-        <div style="font-size: 14px">
-          <p style="margin-bottom: 6px; line-height: 20px">1、5月1-3日,销售员无需提交日报。</p>
-          <p style="margin-bottom: 6px; line-height: 20px">
-            2、销售部主管周报提交时间改为4月27日-30日。
-          </p>
-          <p>3、大区主管半月报提交时间改为5月4日-7日。</p>
-        </div>
-        <br />
-        <p style="text-align: right">祝大家假期愉快!</p>
+    <div class="content">
+      <van-nav-bar class="navBar" left-arrow title="门店拜访" @click-left="onClickLeft" />
+      <van-tabs
+        class="myTab"
+        type="card"
+        v-model="tabVal"
+        color="#0057ba"
+        @click="onClickTabs"
+        v-if="isGZorJZ">
+        <van-tab title="提示类" name="-1" v-if="isGZorJZ == 'false'">
+          <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
+            <hintTabPage :tabVal="tabVal" ref="hintTabPage"></hintTabPage>
+          </van-pull-refresh>
+        </van-tab>
+        <van-tab title="A类指标" name="0">
+          <ABtarget :tabVal="tabVal" ref="Atarget"></ABtarget>
+        </van-tab>
+        <van-tab title="B类指标" name="1">
+          <ABtarget :tabVal="tabVal" ref="Btarget"></ABtarget>
+        </van-tab>
+      </van-tabs>
+      <div class="bottomBtn">
+        <bottomBtn :tabVal="tabVal" ref="bottomBtn"></bottomBtn>
       </div>
-    </van-dialog> -->
+    </div>
     <tab-bar></tab-bar>
   </div>
 </template>
@@ -47,6 +36,7 @@ import tabBar from '@/components/tabBar';
 import ABtarget from './ABtarget.vue';
 import { mapState } from 'vuex';
 import bottomBtn from './bottomBtn.vue';
+import { getTicketFun } from '@/utils/TXApiFun';
 export default {
   name: 'home',
   components: { tabBar, hintTabPage, ABtarget, bottomBtn },
@@ -60,6 +50,7 @@ export default {
       tabVal: '-1',
       hintTabPageIndex: 0,
       isGZorJZ: null,
+      isLoading: false,
     };
   },
   watch: {
@@ -77,21 +68,61 @@ export default {
   activated() {
     if (this.tabVal == '-1') {
       // 从其他页面跳转过来如果;要重新获取对应tab数据
-      if (this.$refs.hintTabPage) this.$refs.hintTabPage.initData();
+      // if (this.$refs.hintTabPage) this.$refs.hintTabPage.initData();
     } else if (this.tabVal == '0') {
-      if (this.$refs.Atarget) this.$refs.Atarget.initData();
+      // if (this.$refs.Atarget) this.$refs.Atarget.initData();
     } else if (this.tabVal == '1') {
-      if (this.$refs.Btarget) this.$refs.Btarget.initData();
+      // if (this.$refs.Btarget) this.$refs.Btarget.initData();
     }
   },
   created() {
     this.getDict();
   },
+  mounted() {
+    getTicketFun(['showMenuItems', 'hideMenuItems', 'onMenuShareAppMessage']).then((res) => {
+      this.wx.ready(() => {
+        console.log(this.wx);
+        console.log(this.wx.miniProgram);
+        // this.wx.hideMenuItems({
+        //   menuList: ['menuItem:favorite'], // 要显示的菜单项
+        // });
+        this.wx.showMenuItems({
+          menuList: ['menuItem:share:appMessage'], // 要显示的菜单项
+        });
+        this.wx.onMenuShareAppMessage({
+          title: '企业微信',
+          desc: '己的微信让每个企业都有自己的微信',
+          link: 'https://work.weixin.qq.com/',
+          imgUrl:
+            'https://cdn-svs-test.nipponpaint.com.cn/%E5%90%B4%E5%BA%B7-%E9%97%A8%E5%BA%97%E7%85%A7-%E5%A4%A9%E5%BB%B6%E7%BB%BC%E5%90%88%E7%BB%8F%E8%90%A5%E9%83%A8-20250109033940.jpg?Expires=2051941182&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=T7%2FszxqrMyc%2FZWQV955BOGMYFgc%3D',
+          success: () => {
+            // 用户确认分享后回调
+            console.log('用户确认分享后回调');
+          },
+          error: () => {
+            console.log('error');
+            if (res.errMsg.indexOf('no permission') > 0) {
+              alert('未agentConfig');
+            }
+          },
+          cancel: () => {
+            // 用户取消分享后回调
+            console.log('用户取消分享后回调');
+          },
+        });
+      });
+    });
+  },
   methods: {
-    async getDict() {
-      this.isGZorJZ = null;
+    onRefresh() {
+      this.getDict(true);
+      this.isLoading = false;
+    },
+    async getDict(isRefresh) {
+      this.toastLoading(0, '加载中...', true);
       let gz_Option = await getDictOption({}, 'gz_customer_post'); //公装业务员岗位
       let jz_Option = await getDictOption({}, 'jz_post_name'); //家装业务员岗位
+      this.toastLoading().clear();
       let postName = this.userInfo.postName;
       let is_gz = gz_Option.data.find((res) => res.dictLabel == postName);
       let is_jz = jz_Option.data.find((res) => res.dictLabel == postName);
@@ -104,11 +135,22 @@ export default {
       }
       // 家装或工装不显示提示类tab
       this.$nextTick(() => {
-        if (this.isGZorJZ == 'true') {
-          this.tabVal = '0';
-        } else {
-          this.tabVal = '-1';
+        // 刷新状态
+        if (!isRefresh) {
+          if (this.isGZorJZ == 'true') {
+            this.tabVal = '0';
+          } else {
+            this.tabVal = '-1';
+          }
         }
+        if (this.tabVal == '-1') {
+          if (this.$refs.hintTabPage) this.$refs.hintTabPage.initData();
+        } else if (this.tabVal == '0') {
+          if (this.$refs.Atarget) this.$refs.Atarget.initData();
+        } else if (this.tabVal == '1') {
+          if (this.$refs.Btarget) this.$refs.Btarget.initData();
+        }
+        if (this.$refs.bottomBtn) this.$refs.bottomBtn.getReportInfo();
       });
     },
     onClickTabs(val) {
@@ -152,9 +194,18 @@ export default {
     width: 100%;
     height: 100%;
     .homePage {
-      width: 100%;
       height: 100%;
-      /* overflow-y: auto; */
+      width: 100%;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+      .content {
+        flex: 1;
+        overflow-y: auto;
+      }
+      .tabBar {
+        height: 50px;
+      }
     }
   }
 }

+ 68 - 21
src/views/signApproval/newStoreApprovalDetail.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="newStoreApprovalDetail">
     <div class="navBarTOP">
       <!-- 顶部条 -->
       <van-nav-bar class="navBar" title="门店详情" left-arrow @click-left="onClickLeft" />
@@ -51,16 +51,41 @@
             v-model="list.telephone"
             label="联系电话"
             v-if="list.storeCategory != 'C917'" />
-          <van-field
-            readonly
-            v-model="list.chainCode"
-            label="经销商编号"
-            v-if="list.storeCategory != 'C917'" />
-          <van-field
-            readonly
-            v-model="list.chainName"
-            label="经销商名称"
-            v-if="list.storeCategory != 'C917'" />
+          <template v-if="list.storeCategory != 'C917'">
+            <!-- 分销店 -->
+            <template
+              v-if="
+                verifyStoreType(list.storeCategory) &&
+                verifyStoreType(list.storeCategory).type == 'fxd'
+              ">
+              <van-field label="经销商" readonly class="TCFXList">
+                <template #input>
+                  <template v-if="list.sfaStoreChainsContactList">
+                    <div
+                      class="sfaStoreChainsContactList"
+                      v-for="(item, index) in list.sfaStoreChainsContactList"
+                      :key="index">
+                      {{ item.categoryDescribe }}
+                      {{ item.chainCode }}
+                      {{ item.chainName }}
+                    </div>
+                  </template>
+                </template>
+              </van-field>
+            </template>
+            <template v-else>
+              <van-field
+                readonly
+                v-model="list.chainCode"
+                label="经销商编号"
+                v-if="list.storeCategory != 'C917'" />
+              <van-field
+                readonly
+                v-model="list.chainName"
+                label="经销商名称"
+                v-if="list.storeCategory != 'C917'" />
+            </template>
+          </template>
           <van-field readonly v-model="list.salesmanName" label="销售员" />
           <div v-if="list.storeCategory != 'C917'">
             <van-field
@@ -176,7 +201,13 @@
           </van-collapse>
         </van-tab>
         <van-tab title="属性信息" name="outsidePlan">
-          <van-field readonly label="属性" v-if="dictTypeFormShow" v-model="list.tcfxName" />
+          <template v-for="(item, index) in TCFXList" v-if="dictTypeFormShow">
+            <van-field
+              readonly
+              label="属性"
+              v-if="item.dictValue == list.tcfxName"
+              v-model="item.text" />
+          </template>
         </van-tab>
       </van-tabs>
       <br />
@@ -419,6 +450,8 @@ export default {
           TCFXList.push({
             text: res.data[t].dictLabel,
             dictCode: res.data[t].dictCode,
+            dictValue: res.data[t].dictValue,
+            remark: res.data[t].remark,
           });
         }
         this.TCFXList = TCFXList;
@@ -494,15 +527,18 @@ export default {
           } else {
             this.GZAttributeFormShow = false;
           }
-          if (this.list.storeCategory == '129081') {
-            this.dictTypeFormShow = true;
-            if (this.list.attribute3 != '0' && this.list.attribute3 != null) {
-              this.list.tcfxName = this.list.attribute3;
-            } else {
-              this.list.tcfxName = this.list.attribute5;
-            }
-          }
-          if (this.list.storeCategory == '10131') {
+          // if (this.list.storeCategory == '129081') {
+          //   this.dictTypeFormShow = true;
+          //   if (this.list.attribute3 != '0' && this.list.attribute3 != null) {
+          //     this.list.tcfxName = this.list.attribute3;
+          //   } else {
+          //     this.list.tcfxName = this.list.attribute5;
+          //   }
+          // }
+          if (
+            this.verifyStoreType(this.list.storeCategory) &&
+            this.verifyStoreType(this.list.storeCategory).type == 'fxd'
+          ) {
             this.dictTypeFormShow = true;
             for (var k = 0; k < this.TCFXList.length; k++) {
               if (this.TCFXList[k].dictCode == this.list.tcfxName) {
@@ -901,4 +937,15 @@ export default {
     }
   }
 }
+.newStoreApprovalDetail {
+  .TCFXList {
+    .van-field__control--custom {
+      flex-direction: column;
+      align-items: self-start;
+      .TCFXListTreeSelec {
+        padding: 3px;
+      }
+    }
+  }
+}
 </style>

File diff suppressed because it is too large
+ 429 - 323
src/views/signApproval/signApproval.vue


+ 35 - 1
src/views/storeManagement/index.vue

@@ -267,7 +267,34 @@
               </div>
               <div class="info">联系电话:{{ item.telephone }}</div>
               <div class="info">地址:{{ item.addressLine }}</div>
-              <div class="info" v-if="addShow1">经销商:{{ item.chainName }}</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>
+                  </div>
+                </div>
+              </template>
+              <template v-else>
+                <div class="info" v-if="addShow1">经销商:{{ item.chainName }}</div>
+              </template>
             </div>
           </van-cell>
           <div class="lineGrey"></div>
@@ -1006,6 +1033,13 @@ export default {
       }
     }
   }
+  .TCFXListItem {
+    display: inline-block;
+    border: 1px solid #ccc;
+    padding: 3px 5px;
+    margin: 0 5px;
+    border-radius: 6px;
+  }
 }
 </style>
 <style lang="scss" scoped>

+ 355 - 208
src/views/storeManagement/storeAdd.vue

@@ -1,14 +1,15 @@
 <template>
-  <div>
+  <div class="storeAdd">
     <div class="navBarTOP">
-      <!--        顶部条-->
+      <!-- 新建同城分销店必须要下单 -->
       <van-nav-bar
         class="navBar"
         title="新增信息"
         left-arrow
         @click-left="onClickLeft"
         :right-text="
-          fromValue.storeCategory == '129081' || fromValue.storeCategory == '10131'
+          verifyStoreType(fromValue.storeCategory) &&
+          verifyStoreType(fromValue.storeCategory).type == 'fxd'
             ? '去下单'
             : '保存'
         "
@@ -46,46 +47,81 @@
                 <span class="van-f-red">*</span>
               </template>
             </van-field>
-            <div style="background-color: white; padding: 0 14px" class="morelaji">
-              <van-row
-                v-if="fromValue.storeCategory != 'C917'"
-                style="border-bottom: 1px solid #ebedf0">
-                <van-col span="20">
-                  <van-field
-                    rows="1"
-                    autosize
-                    type="textarea"
-                    readonly
-                    clickable
-                    name="picker"
-                    :value="fromValue.chainName"
-                    label="经销商名称"
-                    placeholder="点击选择经销商名称"
-                    @click="showPickerChainsListFn">
-                    <template #left-icon>
-                      <span
-                        v-if="
-                          fromValue.ifJzStoreType != 1 &&
-                          fromValue.storeCategory != 'C912' &&
-                          fromValue.storeCategory != 'C917'
-                        "
-                        class="van-f-red"
-                        >*</span
-                      >
-                    </template>
-                  </van-field>
-                </van-col>
-                <van-col span="4"
-                  ><van-button
-                    size="small"
-                    type="info"
-                    style="margin-top: 6px"
-                    native-type="button"
-                    @click="moreTypeShowfn"
-                    ><van-icon name="list-switching" />更多</van-button
-                  ></van-col
-                >
-              </van-row>
+            <div
+              style="background-color: white; padding: 0 14px"
+              class="morelaji"
+              v-if="fromValue.storeCategory != 'C917'">
+              <!-- 分销店 -->
+              <template
+                v-if="
+                  verifyStoreType(fromValue.storeCategory) &&
+                  verifyStoreType(fromValue.storeCategory).type == 'fxd'
+                ">
+                <van-row style="border-bottom: 1px solid #ebedf0">
+                  <van-col span="24">
+                    <van-field label="经销商名称" @click="showPickerChainsListFn" class="TCFXList">
+                      <template #left-icon>
+                        <span class="van-f-red">*</span>
+                      </template>
+                      <template #input>
+                        <template
+                          v-if="sfaStoreChainsContactList && sfaStoreChainsContactList.length">
+                          <div
+                            class="sfaStoreChainsContactList"
+                            v-for="(item, index) in sfaStoreChainsContactList"
+                            :key="index">
+                            {{ item.categoryDescribe }}
+                            {{ item.chainCode }}
+                            {{ item.chainName }}
+                          </div>
+                        </template>
+                        <template v-else>
+                          <span style="color: rgb(150, 151, 153)"> 点击选择经销商名称 </span>
+                        </template>
+                      </template>
+                    </van-field>
+                  </van-col>
+                </van-row>
+              </template>
+              <template v-else>
+                <van-row style="border-bottom: 1px solid #ebedf0">
+                  <van-col span="20">
+                    <van-field
+                      rows="1"
+                      autosize
+                      type="textarea"
+                      readonly
+                      clickable
+                      name="picker"
+                      :value="fromValue.chainName"
+                      label="经销商名称"
+                      placeholder="点击选择经销商名称"
+                      @click="showPickerChainsListFn">
+                      <template #left-icon>
+                        <span
+                          v-if="
+                            fromValue.ifJzStoreType != 1 &&
+                            fromValue.storeCategory != 'C912' &&
+                            fromValue.storeCategory != 'C917'
+                          "
+                          class="van-f-red"
+                          >*</span
+                        >
+                      </template>
+                    </van-field>
+                  </van-col>
+                  <van-col span="4">
+                    <van-button
+                      size="small"
+                      type="info"
+                      style="margin-top: 6px"
+                      native-type="button"
+                      @click="moreTypeShowfn">
+                      <van-icon name="list-switching" />更多
+                    </van-button>
+                  </van-col>
+                </van-row>
+              </template>
             </div>
             <van-field
               v-model="fromValue.storeName"
@@ -293,13 +329,16 @@
                         :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>
-                  <!-- 新建同城A、B店不显示陈列照 -->
+                  <!-- 新建同城分销店不显示陈列照 -->
                   <template
                     v-if="
-                      fromValue.storeCategory !== '129081' && fromValue.storeCategory !== '10131'
+                      verifyStoreType(fromValue.storeCategory) &&
+                      !verifyStoreType(fromValue.storeCategory).type == 'fxd'
                     ">
                     <van-col span="12" v-if="fromValue.ifJzStoreType != 1">
                       <div v-if="storeTypePOP">
@@ -339,7 +378,8 @@
                   <!-- 新建同城A、B店不显示陈列照 -->
                   <template
                     v-if="
-                      fromValue.storeCategory !== '129081' && fromValue.storeCategory !== '10131'
+                      verifyStoreType(fromValue.storeCategory) &&
+                      !verifyStoreType(fromValue.storeCategory).type == 'fxd'
                     ">
                     <van-col span="12" v-if="fromValue.ifJzStoreType != 1">
                       <div v-if="storeTypePOP">
@@ -359,6 +399,7 @@
             </div>
           </van-tab>
           <van-tab title="属性信息" name="Planpic">
+            <!-- 同城分销店-属性信息 -->
             <div v-if="dictTypeFormShow" style="background-color: #ffffff; padding: 10px">
               <p style="color: #666"><span class="van-f-red">*</span>属性</p>
               <div style="padding: 4px">
@@ -368,7 +409,8 @@
                       span="12"
                       v-for="(item, index) in TCFXList"
                       :key="index"
-                      style="margin-bottom: 10px">
+                      style="margin-bottom: 10px"
+                      v-if="item.remark == fromValue.storeCategory">
                       <van-radio shape="square" :name="item.dictCode">{{ item.text }}</van-radio>
                     </van-col>
                   </van-row>
@@ -448,13 +490,60 @@
         @cancel="showPicker = false" />
     </van-popup>
     <!--经销商-->
-    <van-popup v-model="showPickerChainsList" position="bottom">
-      <van-picker
-        show-toolbar
-        :columns="ChainsList"
-        value-key="chainName"
-        @confirm="onConfirmChainsList"
-        @cancel="showPickerChainsList = false" />
+    <van-popup
+      v-model="showPickerChainsList"
+      position="bottom"
+      class="agencyBox"
+      :close-on-click-overlay="false">
+      <!-- 分销店 -->
+      <template
+        v-if="
+          verifyStoreType(fromValue.storeCategory) &&
+          verifyStoreType(fromValue.storeCategory).type == 'fxd'
+        ">
+        <div class="header_btn">
+          <div class="cancel" @click="showPickerChainsList = false">取消</div>
+          <div class="confirm" @click="treeSelectConfirm">确定</div>
+        </div>
+        <van-tree-select
+          :items="treeSelect"
+          :main-active-index.sync="activeIndex"
+          @click-nav="clickNav">
+          <template #content>
+            <div
+              class="treeSelectchildren"
+              v-if="activeIndex == index"
+              v-for="(item, index) in treeSelect"
+              :key="index">
+              <div
+                class="item"
+                v-for="(val, ind) in item.children"
+                :key="ind"
+                @click="treeSelectItemClick(item, index, val, ind)"
+                v-if="item.children.length">
+                <div
+                  :class="{
+                    'van-radio__icon': true,
+                    'van-radio__icon--round': true,
+                    'van-radio__icon--checked': val.Check,
+                  }">
+                  <i class="van-icon van-icon-success"></i>
+                </div>
+                <div class="value">{{ val.chainCode }} {{ val.chainName }}</div>
+              </div>
+              <van-empty description="" v-if="item.children.length == 0" />
+            </div>
+          </template>
+        </van-tree-select>
+      </template>
+      <template v-else>
+        <van-picker
+          show-toolbar
+          :columns="ChainsList"
+          value-key="chainName"
+          @confirm="onConfirmChainsList"
+          @cancel="showPickerChainsList = false" />
+      </template>
     </van-popup>
     <van-popup v-model="moreTypeShow" position="bottom" style="height: 80%; font-size: 14px">
       <van-row style="background-color: #f5f5f5">
@@ -612,6 +701,7 @@ import {
   getMainProjectList,
   getCustomerNatureList,
   getpotentialCustomerTypeList,
+  getDictOption,
 } from '@/api/index';
 import uploadImg from '@/components/uploadImgVStore';
 import uploadImgc from '@/components/uploadImgVStorec';
@@ -624,6 +714,8 @@ import txmapimg1 from '@/assets/txmap1.svg';
 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 },
@@ -750,13 +842,18 @@ export default {
       marker: undefined,
       pageShow: false,
       map: '',
+      activeIndex: 0,
+      treeSelectItemInd: 0,
+      treeSelect: [],
+      sfaStoreChainsContactList: [], //选中确定的经销商
+      activatedTCFXList: [], //选中的经销商
+      // addStoreType:null, //新增门店类型,TCFX:同城分销(包括分销店和金牌店);C917:潜在客户;C912:工地
     };
   },
   created() {
     this.getTCFXList();
     this.getSJSList();
     this.getQGJZist();
-    this.getbrands();
     this.getpotentialCustomerTypeList();
     setTimeout(() => {
       // this.getLocation()
@@ -770,6 +867,8 @@ export default {
     this.dictTypeQGJZFormShow = false;
     this.dictTypeSJSFormShow = false;
     this.dictTypeFormShow = false;
+    // 拍照次数重置
+    store.dispatch('setShotsNum', 0);
   },
   watch: {
     $route(to, from) {
@@ -835,12 +934,17 @@ export default {
         this.getpotentialCustomerTypeList();
         this.getSJSList();
         this.getQGJZist();
-        this.getbrands();
         this.getStreetQuery();
       }
+      if (from.path == '/storeAdd') {
+        // 离开当前页面时,关闭弹框
+        if (this.$refs.uploadImgVStore) this.$refs.uploadImgVStore.close();
+      }
     },
   },
   activated() {
+    this.tabVal = 'insidePlan';
+    // this.beforeAddFn();
     // 授权
     getTicketFun(['getLocation', 'chooseImage', 'uploadImage']).then(() => {
       this.$nextTick(() => {
@@ -1165,6 +1269,7 @@ export default {
       } else {
         this.fromValue.carShopImgList.push(val.fileUrl);
       }
+      this.fromValue.businessId = val.businessId ? val.businessId : '';
     },
     getChainsByDeptId(deptCode, ifJzStoreType) {
       getChainsByDeptCode({
@@ -1247,6 +1352,7 @@ export default {
             this.fromValue.city = '';
           }
           this.storeCategoryList = storeCategory;
+          console.log(this.storeCategoryList);
         } else {
           loading1.clear();
           this.$toast.fail('请求超时');
@@ -1320,96 +1426,6 @@ export default {
               message: error,
             });
           });
-        //   let loading1 = this.$toast.loading({
-        //     duration: 0,
-        //     message: '定位中...',
-        //     forbidClick: true,
-        //   });
-        //   let url = window.location.href;
-        //   this.list = [];
-        //   let that = this;
-        //   let qiyeData;
-        //   const instance = axios.create();
-        //   instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
-        //   instance
-        //     .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
-        //       params: {
-        //         url: url,
-        //       },
-        //     })
-        //     .then((response) => {
-        //       if (response.status == 200) {
-        //         this.cont = 3;
-        //         var flat = true;
-        //         var times = setInterval(() => {
-        //           this.cont--;
-        //           if (this.cont == '0') {
-        //             if (flat) {
-        //               loading1.clear();
-        //               clearInterval(times);
-        //               that.$dialog
-        //                 .alert({
-        //                   message: '定位失败,请开启企微定位权限',
-        //                 })
-        //                 .then(() => {
-        //                   this.$router.go(-1);
-        //                 });
-        //             } else {
-        //               clearInterval(times);
-        //             }
-        //           }
-        //         }, 1000);
-        //         qiyeData = response.data.data;
-        //         that.wx.config({
-        //           beta: true,
-        //           debug: false,
-        //           appId: qiyeData.appId,
-        //           timestamp: qiyeData.timestamp,
-        //           nonceStr: qiyeData.nonceStr,
-        //           signature: qiyeData.signature,
-        //           jsApiList: ['ready', 'getLocation'],
-        //         });
-        //         that.wx.ready(function () {
-        //           that.wx.getLocation({
-        //             type: 'gcj02',
-        //             success: function (res) {
-        //               flat = false;
-        //               loading1.clear();
-        //               that.mlon = res.longitude;
-        //               that.mlan = res.latitude;
-        //               var location = that.CJ02BD(res.latitude, res.longitude);
-        //               that.location = location;
-        //               that.fromValue.lat = that.location.lat;
-        //               that.fromValue.lon = that.location.lon;
-        //               that.location.lat1 = res.latitude;
-        //               that.location.lon1 = res.longitude;
-        //               that.addVisits();
-        //             },
-        //             fail: function () {
-        //               loading1.clear();
-        //               that.$dialog
-        //                 .confirm({
-        //                   confirmButtonText: '返回上一页',
-        //                   cancelButtonText: '重新定位',
-        //                   title: '系统提示',
-        //                   message: 'GPS未开启',
-        //                 })
-        //                 .then(() => {
-        //                   that.$router.go(-1);
-        //                 })
-        //                 .catch(() => {
-        //                   that.getLocation();
-        //                 });
-        //             },
-        //           });
-        //         });
-        //         that.wx.error(function (res) {
-        //           this.$toast.fail('定位失败');
-        //         });
-        //       } else {
-        //         this.$toast.fail('接口异常');
-        //       }
-        //     });
       }
     },
     getpotentialCustomerTypeList() {
@@ -1472,11 +1488,16 @@ export default {
         this.ManagementModelList = ManagementModelList;
       });
     },
+    // 同城分销-属性信息
     getTCFXList() {
       getTCFXList({}).then((res) => {
         var TCFXList = [];
         for (var t = 0; t < res.data.length; t++) {
-          TCFXList.push({ text: res.data[t].dictLabel, dictCode: res.data[t].dictValue });
+          TCFXList.push({
+            text: res.data[t].dictLabel,
+            dictCode: res.data[t].dictValue,
+            remark: res.data[t].remark,
+          });
         }
         this.TCFXList = TCFXList;
       });
@@ -1570,20 +1591,24 @@ export default {
     onConfirm(value) {
       this.fromValue.storeCategoryName = value.text;
       this.fromValue.storeCategory = value.dictValue;
-      if (value.dictValue == '129081' || value.dictValue == '10131') {
+      if (
+        this.verifyStoreType(this.fromValue.storeCategory) &&
+        this.verifyStoreType(this.fromValue.storeCategory).type == 'fxd'
+      ) {
+        this.getbrands();
+        // 是否车铺开店
         this.typeABshow = true;
+        // 属性信息
+        this.dictTypeFormShow = true;
       } else {
         this.typeABshow = false;
         this.fromValue.carShop = '';
         this.fromValue.carShopImgList = [];
-      }
-      if (value.dictValue == '129081') {
-        this.dictTypeAFormShow = true;
-      } else {
         this.fromValue.tcfxName = '';
         this.fromValue.tcfxCode = '';
-        this.dictTypeAFormShow = false;
+        this.dictTypeFormShow = false;
       }
+
       if (value.dictValue == 'C917') {
         this.GZAttributeFormShow = true;
         this.dictTypeSJSFormShow = false;
@@ -1596,13 +1621,6 @@ export default {
         this.fromValue.tcfxCode = '';
         this.GZAttributeFormShow = false;
       }
-      if (value.dictValue == '10131') {
-        this.dictTypeFormShow = true;
-      } else {
-        this.fromValue.tcfxName = '';
-        this.fromValue.tcfxCode = '';
-        this.dictTypeFormShow = false;
-      }
       if (value.dictValue == 'sjs61') {
         this.dictTypeSJSFormShow = true;
       } else {
@@ -1632,7 +1650,14 @@ export default {
       this.fromValue.orgName = '';
       this.fromValue.orgId = '';
       this.fromValue.ifJzStoreType = value.ifJzStoreType;
+      // 重置拍摄照片
+      this.fromValue.img = '';
       this.getChainsByDeptCode(null, value.ifJzStoreType);
+      // 切换门店类型删除选定经销商
+      this.treeSelect = [];
+      this.sfaStoreChainsContactList = []; //选中确定的经销商
+      this.activatedTCFXList = []; //选中的经销商
+      this.fromValue.img == ''; // 清空上传的门店照
       this.showPicker = false;
     },
     numberFn() {
@@ -1651,6 +1676,13 @@ export default {
         return;
       } else {
         this.showPickerChainsList = true;
+        // 分销店
+        if (
+          this.verifyStoreType(this.fromValue.storeCategory) &&
+          this.verifyStoreType(this.fromValue.storeCategory).type == 'fxd'
+        ) {
+          this.getStoreChainsContact();
+        }
       }
     },
     moreTypeShowfn() {
@@ -1687,16 +1719,7 @@ export default {
       });
       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.chainName == '' &&
-        fromValue.ifJzStoreType != 1 &&
-        fromValue.storeCategory != 'C912' &&
-        fromValue.storeCategory != 'C917'
-      ) {
-        // fromValue.storeCategory!='C912'
-        this.$toast('经销商未填写');
-        return;
-      } else if (fromValue.orgId == '') {
+      if (fromValue.orgId == '') {
         this.$toast('部门未选择');
         return;
       } else if (fromValue.storeName == '') {
@@ -1771,57 +1794,62 @@ export default {
           this.$toast('照片未上传');
         }
         return;
-      } else if (
-        fromValue.imgSed == '' &&
-        fromValue.ifJzStoreType != 1 &&
-        this.storeTypePOP &&
-        fromValue.storeCategory != 'C917' &&
-        fromValue.storeCategory !== '129081' &&
-        fromValue.storeCategory !== '10131'
-      ) {
-        this.$toast('图片未上传');
-        return;
       } else if (fromValue.lon == '') {
         this.$toast('请获取定位坐标');
         return;
       } else if (
-        (fromValue.storeCategory == '10131' ||
-          fromValue.storeCategory == 'sjs61' ||
-          fromValue.storeCategory == 'zyjz63') &&
+        (fromValue.storeCategory == 'sjs61' || fromValue.storeCategory == 'zyjz63') &&
         fromValue.tcfxName == ''
       ) {
         this.$toast('属性未填写');
         return;
-      } else if (
-        (fromValue.storeCategory == '129081' || fromValue.storeCategory == '10131') &&
-        fromValue.carShop == ''
-      ) {
-        this.$toast('请选择是否车铺开店');
-        return;
-      } else if (
-        (fromValue.storeCategory == '129081' || fromValue.storeCategory == '10131') &&
-        fromValue.carShop == '1' &&
-        fromValue.carShopImgList.length < 1
-      ) {
-        this.$toast('请上传车铺开店照片');
-        return;
       }
       if (fromValue.area.trim() == '' && fromValue.ifJzStoreType == 1) {
         this.$toast('家装展厅面积未填写');
         return;
       }
-
-      if (fromValue.storeCategory == '129081' && fromValue.attribute3 == '') {
-        this.$toast('属性未填写');
-        return;
-      }
+      // 同城分销类型门店
       if (
-        fromValue.storeCategory == '129081' &&
-        fromValue.attribute3 == '0' &&
-        fromValue.attribute5 == ''
+        this.verifyStoreType(this.fromValue.storeCategory) &&
+        this.verifyStoreType(this.fromValue.storeCategory).type == 'fxd'
       ) {
-        this.$toast('属性未填写');
-        return;
+        // 同城分销多经销商
+        this.fromValue.sfaStoreChainsContactList = this.sfaStoreChainsContactList;
+        if (!this.sfaStoreChainsContactList || !this.fromValue.sfaStoreChainsContactList.length) {
+          this.$toast('经销商未填写');
+          return;
+        }
+        if (fromValue.carShop == '') {
+          this.$toast('请选择是否车铺开店');
+          return;
+        } else if (fromValue.carShop == '1' && fromValue.carShopImgList.length < 1) {
+          this.$toast('请上传车铺开店照片');
+          return;
+        }
+        if (fromValue.tcfxName == '') {
+          this.$toast('属性未填写');
+          return;
+        }
+      } else {
+        // 非同城分销店 经销商必填校验
+        if (
+          fromValue.chainName == '' &&
+          fromValue.ifJzStoreType != 1 &&
+          fromValue.storeCategory != 'C912' &&
+          fromValue.storeCategory != 'C917'
+        ) {
+          this.$toast('经销商未填写');
+          return;
+        }
+        // if (
+        //   fromValue.imgSed == '' &&
+        //   fromValue.ifJzStoreType != 1 &&
+        //   this.storeTypePOP &&
+        //   fromValue.storeCategory != 'C917'
+        // ) {
+        //   this.$toast('图片未上传');
+        //   return;
+        // }
       }
       if (this.GZAttributeFormShow && fromValue.potentialCustomerType == '') {
         this.$toast('潜在客户类型未填写');
@@ -1940,6 +1968,86 @@ export default {
         }
       }
     },
+    //获取经销商
+    async getStoreChainsContact() {
+      // 打开select,上次选中确认数据赋值给选中待确认,回显使用
+      this.activatedTCFXList = JSON.parse(JSON.stringify(this.sfaStoreChainsContactList));
+      if (!this.treeSelect.length) {
+        this.toastLoading(0, '加载中...', true);
+        listChainsByCategory({ orgId: this.fromValue.orgId }).then((res) => {
+          this.toastLoading().clear();
+          // 初始化数据
+          res.data.forEach((val) => {
+            val.dot = false;
+          });
+          this.treeSelect = res.data;
+        });
+      }
+      for (let x = 0; x < this.treeSelect.length; x++) {
+        // 设置左侧选中图标
+        let activate = this.activatedTCFXList.find((item) => {
+          return item.categoryCode == this.treeSelect[x].code;
+        });
+        this.treeSelect[x].dot = activate ? true : false;
+        // 反显右侧选中
+        let children = this.treeSelect[x].children;
+        if (children && this.treeSelect[x].dot) {
+          for (let y = 0; y < children.length; y++) {
+            let activate = this.activatedTCFXList.find((item) => {
+              return (
+                children[y].categoryCode == item.categoryCode &&
+                children[y].chainCode == item.chainCode
+              );
+            });
+            if (activate) {
+              children[y].Check = true;
+            } else {
+              children[y].Check = false;
+            }
+          }
+        }
+      }
+      this.$forceUpdate();
+      this.activeIndex = 0;
+    },
+    // 左侧数据点击
+    clickNav(index) {
+      // this.treeSelect[index].children.forEach((val) => {
+      //   // 回显右侧选中
+      //   let activate = this.activatedTCFXList.find((item) => item.code == val.code);
+      //   val.Check = activate ? true : false;
+      // });
+    },
+    // 右侧数据点击
+    treeSelectItemClick(itemData, index, val, ind) {
+      itemData.children.forEach((item) => {
+        if (val.chainCode == item.chainCode) {
+          item.Check = !item.Check;
+          // 设置左侧选中图标
+          itemData.dot = item.Check;
+        } else {
+          item.Check = false;
+        }
+      });
+      this.$forceUpdate();
+    },
+    // 分销店 确认
+    treeSelectConfirm() {
+      let treeSelectArr = [];
+      this.treeSelect.forEach((item) => {
+        if (item.dot) {
+          let childrenData = item.children.find((val) => val.Check);
+          treeSelectArr.push(childrenData);
+        }
+      });
+      if (!treeSelectArr.length) {
+        this.$toast('请选择至少选择一个经销商');
+        return false;
+      }
+      console.log(treeSelectArr);
+      this.sfaStoreChainsContactList = treeSelectArr;
+      this.showPickerChainsList = false;
+    },
   },
 };
 </script>
@@ -1965,7 +2073,7 @@ export default {
   display: inline-block;
 }
 </style>
-<style>
+<style lang="scss">
 .van-dialog__confirm,
 .van-dialog__confirm:active {
   color: #0057ba;
@@ -2016,4 +2124,43 @@ export default {
 .morelaji .van-cell {
   padding: 10px 0;
 }
+.storeAdd {
+  .agencyBox {
+    .header_btn {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 10px;
+      font-size: 16px;
+      border-bottom: 1px solid #ccc;
+      div {
+        padding: 3px;
+      }
+    }
+    .van-sidebar {
+      width: 100px;
+      text-align: center;
+      flex: none;
+    }
+    .treeSelectchildren {
+      .item {
+        display: flex;
+        align-items: center;
+        padding: 5px;
+        .value {
+          margin-left: 15px;
+        }
+      }
+    }
+  }
+  .TCFXList {
+    .van-field__control--custom {
+      flex-direction: column;
+      align-items: self-start;
+      .sfaStoreChainsContactList {
+        padding: 3px;
+      }
+    }
+  }
+}
 </style>

+ 73 - 24
src/views/storeManagement/storeDetail.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="storeDetail">
     <div class="navBarTOP">
       <!-- 顶部条 -->
       <van-nav-bar class="navBar" title="客户详情" left-arrow @click-left="onClickLeft">
@@ -117,16 +117,33 @@
             v-model="list.telephone"
             label="联系电话"
             v-if="list.storeCategory != 'C917'" />
-          <van-field
-            readonly
-            v-model="list.chainCode"
-            label="经销商编号"
-            v-if="list.storeCategory != 'C917'" />
-          <van-field
-            readonly
-            v-model="list.chainName"
-            label="经销商名称"
-            v-if="list.storeCategory != 'C917'" />
+          <template v-if="list.storeCategory != 'C917'">
+            <!-- 分销店 -->
+            <template
+              v-if="
+                verifyStoreType(list.storeCategory) &&
+                verifyStoreType(list.storeCategory).type == 'fxd'
+              ">
+              <van-field label="经销商" readonly class="TCFXList">
+                <template #input>
+                  <template v-if="list.sfaStoreChainsContactList && list.sfaStoreChainsContactList">
+                    <div
+                      class="sfaStoreChainsContactList"
+                      v-for="(item, index) in list.sfaStoreChainsContactList"
+                      :key="index">
+                      {{ item.categoryDescribe }}
+                      {{ item.chainCode }}
+                      {{ item.chainName }}
+                    </div>
+                  </template>
+                </template>
+              </van-field>
+            </template>
+            <template v-else>
+              <van-field readonly v-model="list.chainCode" label="经销商编号" />
+              <van-field readonly v-model="list.chainName" label="经销商名称" />
+            </template>
+          </template>
           <van-field readonly v-model="list.salesmanName" label="销售员" />
           <div v-if="list.storeCategory != 'C917'">
             <van-field
@@ -273,7 +290,13 @@
           </van-collapse>
         </van-tab>
         <van-tab title="属性信息" name="outsidePlan">
-          <van-field readonly label="属性" v-if="dictTypeFormShow" v-model="list.tcfxName" />
+          <template v-for="(item, index) in TCFXList" v-if="dictTypeFormShow">
+            <van-field
+              readonly
+              label="属性"
+              v-if="item.dictValue == list.tcfxName"
+              v-model="item.text" />
+          </template>
         </van-tab>
       </van-tabs>
       <!--省、市、区、街道-->
@@ -588,6 +611,7 @@ export default {
       });
       localStorage.removeItem('successStoreId');
     } else {
+      this.tabVal = 'insidePlan';
       this.showmap = false;
       this.img = '';
       this.detilId = this.$route.query.detilId;
@@ -1147,6 +1171,8 @@ export default {
           TCFXList.push({
             text: res.data[t].dictLabel,
             dictCode: res.data[t].dictCode,
+            dictValue: res.data[t].dictValue,
+            remark: res.data[t].remark,
           });
         }
         this.TCFXList = TCFXList;
@@ -1235,7 +1261,10 @@ export default {
           } else {
             this.displayImg = [];
           }
-          if (this.list.storeCategory == '129081' || this.list.storeCategory == '10131') {
+          if (
+            this.verifyStoreType(this.list.storeCategory) &&
+            this.verifyStoreType(this.list.storeCategory).type == 'fxd'
+          ) {
             this.cityABStore = true;
           } else {
             this.cityABStore = false;
@@ -1261,7 +1290,10 @@ export default {
           } else {
             this.list.carShopImgList = [];
           }
-          if (this.list.storeCategory == '10131' || this.list.storeCategory == '129081') {
+          if (
+            this.verifyStoreType(this.list.storeCategory) &&
+            this.verifyStoreType(this.list.storeCategory).type == 'fxd'
+          ) {
             this.typeABshow = true;
           } else {
             this.typeABshow = false;
@@ -1281,15 +1313,18 @@ export default {
           } else {
             this.GZAttributeFormShow = false;
           }
-          if (this.list.storeCategory == '129081') {
-            this.dictTypeFormShow = true;
-            if (this.list.attribute3 != '0' && this.list.attribute3 != null) {
-              this.list.tcfxName = this.list.attribute3;
-            } else {
-              this.list.tcfxName = this.list.attribute5;
-            }
-          }
-          if (this.list.storeCategory == '10131') {
+          // if (this.list.storeCategory == '129081') {
+          //   this.dictTypeFormShow = true;
+          //   if (this.list.attribute3 != '0' && this.list.attribute3 != null) {
+          //     this.list.tcfxName = this.list.attribute3;
+          //   } else {
+          //     this.list.tcfxName = this.list.attribute5;
+          //   }
+          // }
+          if (
+            this.verifyStoreType(this.list.storeCategory) &&
+            this.verifyStoreType(this.list.storeCategory).type == 'fxd'
+          ) {
             this.dictTypeFormShow = true;
             for (var k = 0; k < this.TCFXList.length; k++) {
               if (this.TCFXList[k].dictCode == this.list.tcfxName) {
@@ -1544,7 +1579,10 @@ export default {
     },
     // 新建同城店铺提交审核
     submitApprovalFun() {
-      if (this.list.storeCategory !== '129081' && this.list.storeCategory !== '10131') {
+      if (
+        this.verifyStoreType(this.list.storeCategory) &&
+        !this.verifyStoreType(this.list.storeCategory).type == 'fxd'
+      ) {
         this.$dialog
           .confirm({
             title: '系统提示',
@@ -1796,4 +1834,15 @@ export default {
     }
   }
 }
+.storeDetail {
+  .TCFXList {
+    .van-field__control--custom {
+      flex-direction: column;
+      align-items: self-start;
+      .TCFXListTreeSelec {
+        padding: 3px;
+      }
+    }
+  }
+}
 </style>

+ 353 - 104
src/views/storeManagement/storeEdit.vue

@@ -47,46 +47,81 @@
                 <span class="van-f-red">*</span>
               </template>
             </van-field>
-            <div style="background-color: white; padding: 0 14px" class="morelaji">
-              <van-row
-                v-if="fromValue.storeCategory != 'C917'"
-                style="border-bottom: 1px solid #ebedf0">
-                <van-col span="20">
-                  <van-field
-                    rows="1"
-                    autosize
-                    type="textarea"
-                    readonly
-                    clickable
-                    name="picker"
-                    :value="fromValue.chainName"
-                    label="经销商名称"
-                    placeholder="点击选择经销商名称"
-                    @click="showPickerChainsListFn">
-                    <template #left-icon>
-                      <span
-                        v-if="
-                          fromValue.ifJzStoreType != 1 &&
-                          fromValue.storeCategory != 'C912' &&
-                          fromValue.storeCategory != 'C917'
-                        "
-                        class="van-f-red"
-                        >*</span
-                      >
-                    </template>
-                  </van-field>
-                </van-col>
-                <van-col span="4"
-                  ><van-button
-                    size="small"
-                    type="info"
-                    style="margin-top: 6px"
-                    native-type="button"
-                    @click="moreTypeShowFn"
-                    ><van-icon name="list-switching" />更多</van-button
-                  ></van-col
-                >
-              </van-row>
+            <div
+              style="background-color: white; padding: 0 14px"
+              class="morelaji"
+              v-if="fromValue.storeCategory != 'C917'">
+              <!-- 分销店 -->
+              <template
+                v-if="
+                  verifyStoreType(fromValue.storeCategory) &&
+                  verifyStoreType(fromValue.storeCategory).type == 'fxd'
+                ">
+                <van-row style="border-bottom: 1px solid #ebedf0">
+                  <van-col span="24">
+                    <van-field label="经销商名称" @click="showPickerChainsListFn" class="TCFXList">
+                      <template #left-icon>
+                        <span class="van-f-red">*</span>
+                      </template>
+                      <template #input>
+                        <template
+                          v-if="sfaStoreChainsContactList && sfaStoreChainsContactList.length">
+                          <div
+                            class="sfaStoreChainsContactList"
+                            v-for="(item, index) in sfaStoreChainsContactList"
+                            :key="index">
+                            {{ item.categoryDescribe }}
+                            {{ item.chainCode }}
+                            {{ item.chainName }}
+                          </div>
+                        </template>
+                        <template v-else>
+                          <span style="color: rgb(150, 151, 153)"> 点击选择经销商名称 </span>
+                        </template>
+                      </template>
+                    </van-field>
+                  </van-col>
+                </van-row>
+              </template>
+              <template v-else>
+                <van-row style="border-bottom: 1px solid #ebedf0">
+                  <van-col span="20">
+                    <van-field
+                      rows="1"
+                      autosize
+                      type="textarea"
+                      readonly
+                      clickable
+                      name="picker"
+                      :value="fromValue.chainName"
+                      label="经销商名称"
+                      placeholder="点击选择经销商名称"
+                      @click="showPickerChainsListFn">
+                      <template #left-icon>
+                        <span
+                          v-if="
+                            fromValue.ifJzStoreType != 1 &&
+                            fromValue.storeCategory != 'C912' &&
+                            fromValue.storeCategory != 'C917'
+                          "
+                          class="van-f-red"
+                          >*</span
+                        >
+                      </template>
+                    </van-field>
+                  </van-col>
+                  <van-col span="4"
+                    ><van-button
+                      size="small"
+                      type="info"
+                      style="margin-top: 6px"
+                      native-type="button"
+                      @click="moreTypeShowFn"
+                      ><van-icon name="list-switching" />更多</van-button
+                    ></van-col
+                  >
+                </van-row>
+              </template>
             </div>
             <van-field
               v-model="fromValue.storeName"
@@ -326,7 +361,7 @@
                         @newimgarr="newimgarr1"
                         imgText="陈列照(至少一张)"
                         :type="2"
-                        count="1"></upload-img>
+                        :count="1"></upload-img>
                     </div>
                   </div>
                 </div>
@@ -338,6 +373,7 @@
             </div> -->
           </van-tab>
           <van-tab title="属性信息" name="Planpic">
+            <!-- 同城分销店-属性信息 -->
             <div v-if="dictTypeFormShow" style="background-color: #ffffff; padding: 10px">
               <p style="color: #666"><span class="van-f-red">*</span>属性</p>
               <div style="padding: 4px">
@@ -347,7 +383,8 @@
                       span="12"
                       v-for="(item, index) in TCFXList"
                       :key="index"
-                      style="margin-bottom: 10px">
+                      style="margin-bottom: 10px"
+                      v-if="item.remark == fromValue.storeCategory">
                       <van-radio shape="square" :name="item.dictCode + ''">{{
                         item.text
                       }}</van-radio>
@@ -430,13 +467,58 @@
         @cancel="showPicker = false" />
     </van-popup>
     <!--经销商-->
-    <van-popup v-model="showPickerChainsList" position="bottom">
-      <van-picker
-        show-toolbar
-        :columns="ChainsList"
-        value-key="chainName"
-        @confirm="onConfirmChainsList"
-        @cancel="showPickerChainsList = false" />
+    <van-popup
+      v-model="showPickerChainsList"
+      position="bottom"
+      class="agencyBox"
+      :close-on-click-overlay="false">
+      <!-- 分销店 -->
+      <template
+        v-if="
+          verifyStoreType(fromValue.storeCategory) &&
+          verifyStoreType(fromValue.storeCategory).type == 'fxd'
+        ">
+        <div class="header_btn">
+          <div class="cancel" @click="showPickerChainsList = false">取消</div>
+          <div class="confirm" @click="treeSelectConfirm">确定</div>
+        </div>
+        <van-tree-select
+          :items="treeSelect"
+          :main-active-index.sync="activeIndex"
+          @click-nav="clickNav">
+          <template #content>
+            <div
+              class="treeSelectchildren"
+              v-if="activeIndex == index"
+              v-for="(item, index) in treeSelect"
+              :key="index">
+              <div
+                class="item"
+                v-for="(val, ind) in item.children"
+                :key="ind"
+                @click="treeSelectItemClick(item, index, val, ind)">
+                <div
+                  :class="{
+                    'van-radio__icon': true,
+                    'van-radio__icon--round': true,
+                    'van-radio__icon--checked': val.Check,
+                  }">
+                  <i class="van-icon van-icon-success"></i>
+                </div>
+                <div class="value">{{ val.chainCode }} {{ val.chainName }}</div>
+              </div>
+            </div>
+          </template>
+        </van-tree-select>
+      </template>
+      <template v-else>
+        <van-picker
+          show-toolbar
+          :columns="ChainsList"
+          value-key="chainName"
+          @confirm="onConfirmChainsList"
+          @cancel="showPickerChainsList = false" />
+      </template>
     </van-popup>
     <van-popup v-model="moreTypeShow" position="bottom" style="height: 80%; font-size: 14px">
       <van-row style="background-color: #f5f5f5">
@@ -579,6 +661,7 @@ import {
   getMainRelationList,
   getManagementModelList,
   getpotentialCustomerTypeList,
+  getDictOption,
 } from '@/api/index';
 import uploadImg from '@/components/uploadImgVStore';
 import uploadImgc from '@/components/uploadImgVStorec';
@@ -591,6 +674,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',
@@ -718,9 +802,16 @@ export default {
       pLat: '',
       pLot: '',
       displayImg: [],
+      activeIndex: 0,
+      treeSelectItemInd: 0,
+      treeSelect: [],
+      sfaStoreChainsContactList: [], //选中确定的经销商
+      activatedTCFXList: [], //选中的经销商
     };
   },
   activated() {
+    this.tabVal = 'insidePlan';
+    this.treeSelect = [];
     // 授权
     getTicketFun(['getLocation', 'chooseImage', 'uploadImage']).then(() => {
       this.getTCFXList();
@@ -1175,6 +1266,7 @@ export default {
 
         if (res.code == 200) {
           this.fromValue = res.data;
+          this.sfaStoreChainsContactList = this.fromValue.sfaStoreChainsContactList;
           if (this.fromValue.imgSed && this.fromValue.imgSed != '') {
             this.displayImg = this.fromValue.imgSed.split(',');
           } else {
@@ -1208,19 +1300,23 @@ export default {
           }
           // this.getChainsByDeptCode(res.data.orgId)
           this.getChainsByDeptCode(null, res.data.ifJzStoreType);
-          if (this.fromValue.storeCategory == '129081' || this.fromValue.storeCategory == '10131') {
+          if (
+            this.verifyStoreType(this.fromValue.storeCategory) &&
+            this.verifyStoreType(this.fromValue.storeCategory).type == 'fxd'
+          ) {
             this.typeABshow = true;
+            this.dictTypeFormShow = true;
           }
-          if (this.fromValue.storeCategory == '129081') {
-            this.dictTypeAFormShow = true;
-          }
+          // if (this.fromValue.storeCategory == '129081') {
+          //   this.dictTypeAFormShow = true;
+          // }
+          // if (this.fromValue.storeCategory == '10131') {
+          //   this.dictTypeFormShow = true;
+          // }
 
           if (this.fromValue.attribute3 == '0') {
             this.attrShow = true;
           }
-          if (this.fromValue.storeCategory == '10131') {
-            this.dictTypeFormShow = true;
-          }
           if (this.fromValue.storeCategory == 'sjs61') {
             this.dictTypeSJSFormShow = true;
           }
@@ -1368,14 +1464,27 @@ export default {
         this.$toast('部门未选择');
         return;
       } else {
-        this.showPickerChainsList = true;
+        // 分销店
+        if (
+          this.verifyStoreType(this.fromValue.storeCategory) &&
+          this.verifyStoreType(this.fromValue.storeCategory).type == 'fxd'
+        ) {
+          this.getStoreChainsContact();
+        } else {
+          this.showPickerChainsList = true;
+        }
       }
     },
+    // 同城分销-属性信息
     getTCFXList() {
       getTCFXList({}).then((res) => {
         var TCFXList = [];
         for (var t = 0; t < res.data.length; t++) {
-          TCFXList.push({ text: res.data[t].dictLabel, dictCode: res.data[t].dictValue });
+          TCFXList.push({
+            text: res.data[t].dictLabel,
+            dictCode: res.data[t].dictValue,
+            remark: res.data[t].remark,
+          });
         }
         this.TCFXList = TCFXList;
       });
@@ -1461,21 +1570,28 @@ export default {
       // || value.dictValue == "129081" ||value.dictValue == "10131"
       this.fromValue.storeCategoryName = value.text;
       this.fromValue.storeCategory = value.dictValue;
-      if (value.dictValue == '129081' || value.dictValue == '10131') {
+      if (
+        this.verifyStoreType(this.fromValue.storeCategory) &&
+        this.verifyStoreType(this.fromValue.storeCategory).type == 'fxd'
+      ) {
         this.typeABshow = true;
+        this.dictTypeFormShow = true;
       } else {
         this.typeABshow = false;
         this.fromValue.carShop = '';
         this.fromValue.carShopImgList = [];
-      }
-
-      if (value.dictValue == '129081') {
-        this.dictTypeAFormShow = true;
-      } else {
         this.fromValue.tcfxName = '';
         this.fromValue.tcfxCode = '';
-        this.dictTypeAFormShow = false;
+        this.dictTypeFormShow = false;
       }
+
+      // if (value.dictValue == '129081') {
+      //   this.dictTypeAFormShow = true;
+      // } else {
+      //   this.fromValue.tcfxName = '';
+      //   this.fromValue.tcfxCode = '';
+      //   this.dictTypeAFormShow = false;
+      // }
       if (value.dictValue == 'C917') {
         this.GZAttributeFormShow = true;
         this.dictTypeSJSFormShow = false;
@@ -1488,13 +1604,13 @@ export default {
         this.fromValue.tcfxCode = '';
         this.GZAttributeFormShow = false;
       }
-      if (value.dictValue == '10131') {
-        this.dictTypeFormShow = true;
-      } else {
-        this.fromValue.tcfxName = '';
-        this.fromValue.tcfxCode = '';
-        this.dictTypeFormShow = false;
-      }
+      // if (value.dictValue == '10131') {
+      //   this.dictTypeFormShow = true;
+      // } else {
+      //   this.fromValue.tcfxName = '';
+      //   this.fromValue.tcfxCode = '';
+      //   this.dictTypeFormShow = false;
+      // }
       if (value.dictValue == 'sjs61') {
         this.dictTypeSJSFormShow = true;
       } else {
@@ -1524,6 +1640,10 @@ export default {
         this.fromValue.storeCategory = value.dictValue;
         this.fromValue.ifJzStoreType = value.ifJzStoreType;
         this.getChainsByDeptCode(null, value.ifJzStoreType);
+        // 切换门店类型删除选定经销商
+        this.treeSelect = [];
+        this.sfaStoreChainsContactList = []; //选中确定的经销商
+        this.activatedTCFXList = []; //选中的经销商
         this.showPicker = false;
       }
       if (value.dictValue == 'C912') {
@@ -1567,15 +1687,7 @@ export default {
       }
       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.chainName == '' &&
-        fromValue.ifJzStoreType != 1 &&
-        fromValue.storeCategory != 'C912' &&
-        fromValue.storeCategory != 'C917'
-      ) {
-        this.$toast('经销商未选择');
-        return;
-      } else if (fromValue.orgId == '') {
+      if (fromValue.orgId == '') {
         this.$toast('部门未选择');
         return;
       } else if (fromValue.storeName == '') {
@@ -1651,17 +1763,7 @@ export default {
         }
         return;
       } else if (
-        fromValue.imgSed == '' &&
-        fromValue.ifJzStoreType != 1 &&
-        this.storeTypePOP &&
-        fromValue.storeCategory != 'C917'
-      ) {
-        this.$toast('图片未上传');
-        return;
-      } else if (
-        (fromValue.storeCategory == '10131' ||
-          fromValue.storeCategory == 'sjs61' ||
-          fromValue.storeCategory == 'zyjz63') &&
+        (fromValue.storeCategory == 'sjs61' || fromValue.storeCategory == 'zyjz63') &&
         fromValue.tcfxName == ''
       ) {
         this.$toast('属性未填写');
@@ -1671,22 +1773,43 @@ export default {
         this.$toast('家装展厅面积未填写');
         return;
       }
-      if (fromValue.storeCategory == '129081' && fromValue.attribute3 == '') {
-        this.$toast('属性未填写');
+      if (this.GZAttributeFormShow && fromValue.potentialCustomerType == '') {
+        this.$toast('潜在客户类型未填写');
         return;
       }
+
+      // 同城分销类型门店
       if (
-        fromValue.storeCategory == '129081' &&
-        fromValue.attribute3 == '0' &&
-        fromValue.attribute5 == ''
+        this.verifyStoreType(this.fromValue.storeCategory) &&
+        this.verifyStoreType(this.fromValue.storeCategory).type == 'fxd'
       ) {
-        this.$toast('属性未填写');
-        return;
-      }
-      if (this.GZAttributeFormShow && fromValue.potentialCustomerType == '') {
-        this.$toast('潜在客户类型未填写');
-        return;
+        // 同城分销多经销商
+        this.fromValue.sfaStoreChainsContactList = this.sfaStoreChainsContactList;
+        if (!this.sfaStoreChainsContactList || !this.sfaStoreChainsContactList.length) {
+          this.$toast('经销商未填写');
+          return;
+        }
+        if (fromValue.tcfxName == '') {
+          this.$toast('属性未填写');
+          return;
+        }
+        if (fromValue.imgSed == '') {
+          this.$toast('图片未上传');
+          return;
+        }
+      } else {
+        // 非同城分销店 经销商必填校验
+        if (
+          fromValue.chainName == '' &&
+          fromValue.ifJzStoreType != 1 &&
+          fromValue.storeCategory != 'C912' &&
+          fromValue.storeCategory != 'C917'
+        ) {
+          this.$toast('经销商未选择');
+          return;
+        }
       }
+
       let loading1 = this.$toast.loading({
         duration: 0,
         message: '加载中...',
@@ -1752,6 +1875,93 @@ export default {
         startPosition: index,
       });
     },
+    //获取经销商
+    async getStoreChainsContact() {
+      // 打开select,上次选中确认数据赋值给选中待确认,回显使用
+      this.activatedTCFXList = JSON.parse(JSON.stringify(this.sfaStoreChainsContactList));
+      if (!this.treeSelect.length) {
+        this.toastLoading(0, '加载中...', true);
+        listChainsByCategory({ orgId: this.fromValue.orgId }).then((res) => {
+          this.toastLoading().clear();
+          // 初始化数据
+          res.data.forEach((val) => {
+            val.dot = false;
+          });
+          this.showPickerChainsList = true;
+          this.treeSelect = res.data;
+          this.setCheckData();
+        });
+      } else {
+        this.showPickerChainsList = true;
+        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;
+        });
+        this.treeSelect[x].dot = activate ? true : false;
+        // 右侧选中返现
+        let children = this.treeSelect[x].children;
+        if (children && this.treeSelect[x].dot) {
+          for (let y = 0; y < children.length; y++) {
+            let activate = this.activatedTCFXList.find((item) => {
+              return (
+                children[y].categoryCode == item.categoryCode &&
+                children[y].chainCode == item.chainCode
+              );
+            });
+            if (activate) {
+              children[y].Check = true;
+            } else {
+              children[y].Check = false;
+            }
+          }
+        }
+      }
+      this.$forceUpdate();
+      this.activeIndex = 0;
+    },
+    // 左侧数据点击
+    clickNav(index) {
+      // this.treeSelect[index].children.forEach((val) => {
+      //   // 回显右侧选中
+      //   let activate = this.activatedTCFXList.find((item) => item.code == val.code);
+      //   val.Check = activate ? true : false;
+      // });
+    },
+    // 右侧数据点击
+    treeSelectItemClick(itemData, index, val, ind) {
+      itemData.children.forEach((item) => {
+        if (val.chainCode == item.chainCode) {
+          item.Check = !item.Check;
+          // 设置左侧选中图标
+          itemData.dot = item.Check;
+        } else {
+          item.Check = false;
+        }
+      });
+      this.$forceUpdate();
+    },
+    // 分销店 确认
+    treeSelectConfirm() {
+      let treeSelectArr = [];
+      this.treeSelect.forEach((item) => {
+        if (item.dot) {
+          let childrenData = item.children.find((val) => val.Check);
+          treeSelectArr.push(childrenData);
+        }
+      });
+      if (!treeSelectArr.length) {
+        this.$toast('请选择至少选择一个经销商');
+        return false;
+      }
+      console.log(treeSelectArr);
+      this.sfaStoreChainsContactList = treeSelectArr;
+      this.showPickerChainsList = false;
+    },
   },
 };
 </script>
@@ -1813,7 +2023,7 @@ export default {
   }
 }
 </style>
-<style>
+<style lang="scss">
 #allmap {
   width: 100px;
   height: 100px;
@@ -1864,4 +2074,43 @@ export default {
 .morelaji .van-cell {
   padding: 10px 0;
 }
+.storeEdit {
+  .agencyBox {
+    .header_btn {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 10px;
+      font-size: 16px;
+      border-bottom: 1px solid #ccc;
+      div {
+        padding: 3px;
+      }
+    }
+    .van-sidebar {
+      width: 100px;
+      text-align: center;
+      flex: none;
+    }
+    .treeSelectchildren {
+      .item {
+        display: flex;
+        align-items: center;
+        padding: 5px;
+        .value {
+          margin-left: 15px;
+        }
+      }
+    }
+  }
+  .TCFXList {
+    .van-field__control--custom {
+      flex-direction: column;
+      align-items: self-start;
+      .sfaStoreChainsContactList {
+        padding: 3px;
+      }
+    }
+  }
+}
 </style>

+ 5 - 2
src/views/storeManagement/success.vue

@@ -38,7 +38,10 @@
         ></van-col
       > -->
     </van-row>
-    <van-row gutter="20" style="display: flex; justify-content: center">
+    <van-row
+      gutter="20"
+      style="display: flex; justify-content: center"
+      v-if="fromValue && this.fromValue.storeId">
       <van-col>
         <van-button
           style="width: 120px"
@@ -64,7 +67,7 @@ export default {
   name: 'success',
   data() {
     return {
-      fromValue: {},
+      fromValue: null,
       cont: 0,
       timer: null,
       flag: true,

+ 8 - 2
src/views/week/assignAwait/JZfollowUp.vue

@@ -96,6 +96,7 @@ import {
 import { mapState } from 'vuex';
 import radioGroup from './radioGroup';
 import followUpHistory from './followUpHistory';
+import store from '@/store';
 
 export default {
   name: 'assignPage',
@@ -245,8 +246,13 @@ export default {
         insertFollowCustomerClueAnswer(params).then((res) => {
           this.toastLoading().clear();
           if (res.code == 200) {
-            this.$toast(res.msg);
-            window.location.replace(window.location.origin + '/mobile/clew');
+            if (this.$route.query.token != undefined) {
+              window.location.replace(window.location.origin + '/mobile/clew');
+            } else {
+              store.dispatch('setRefreshClewPage', true);
+              // 返回上一页不会刷新页面
+              this.$router.go(-1);
+            }
           } else {
             this.$toast(res.msg);
           }

+ 7 - 83
src/views/week/daily.vue

@@ -26,7 +26,8 @@
     <div style="height: 4px"></div>
     <!--        主体内容-->
     <div class="container linepAdd">
-      <van-collapse v-model="activeNames">
+      <van-collapse v-model="activeNames" v-if="!YFQuota">
+        <!-- YFQuota:应用服务平台 不显示各项指标 -->
         <van-collapse-item v-if="!GZQuota" title="拜访数据(实时)" name="7">
           <visitedRealTime
             :reportTargetAll="reportTargetAll"
@@ -244,85 +245,6 @@
             >
           </van-row>
         </van-collapse-item>
-        <!-- <van-collapse-item v-if="JZQuota" name="20" title="瓷砖胶过账(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月实际</span></van-col>
-            <van-col span="12"><span class="rightTitle">本季实际</span></van-col>
-            <van-col span="12"
-              ><p>
-                客户数:<span class="colorbalck">{{ reportTargetAll.czjPostCustomerMonth }}</span>
-              </p>
-            </van-col>
-            <van-col span="12"
-              ><p>
-                客户数:<span class="colorbalck">{{ reportTargetAll.czjPostCustomerQuarter }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                下单数(包):<span class="colorbalck">{{
-                  reportTargetAll.czjPostOrderNumMonth
-                }}</span>
-              </p>
-            </van-col>
-            <van-col span="12"
-              ><p>
-                下单数(包):<span class="colorbalck">{{
-                  reportTargetAll.czjPostOrderNumQuarter
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                下单销售额:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjPostOrderPriceMonth)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                下单销售额:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjPostOrderPriceQuarter)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                下单率:<span class="colorbalck">{{ reportTargetAll.czjPostOrderRateMonth }}%</span>
-              </p>
-            </van-col>
-            <van-col span="12"
-              ><p>
-                下单率:<span class="colorbalck"
-                  >{{ reportTargetAll.czjPostOrderRateQuarter }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="24"><span class="leftTitle">年度累计实际</span></van-col>
-            <van-col span="24"
-              ><p>
-                客户数:<span class="colorbalck">{{ reportTargetAll.czjPostCustomerYear }}</span>
-              </p>
-            </van-col>
-            <van-col span="24"
-              ><p>
-                下单数(包):<span class="colorbalck">{{ reportTargetAll.czjPostOrderNumYear }}</span>
-              </p>
-            </van-col>
-            <van-col span="24"
-              ><p>
-                下单销售额:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjPostOrderPriceYear)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="24"
-              ><p>
-                下单率:<span class="colorbalck">{{ reportTargetAll.czjPostOrderRateYear }}%</span>
-              </p>
-            </van-col>
-          </van-row>
-        </van-collapse-item> -->
         <van-collapse-item v-if="JZQuota" name="22" title="基材粉料过账(千元)">
           <van-row>
             <van-col span="12"><span class="leftTitle">本月实际</span></van-col>
@@ -621,8 +543,9 @@ export default {
         },
       ],
       type: '-1',
-      JZQuota: false,
-      GZQuota: false,
+      JZQuota: false, //家装
+      GZQuota: false, //工装
+      YFQuota: false, //应用服务
       titlejz: '',
       notVisitReason: '', //今日拜访0家店的原因;
     };
@@ -681,6 +604,7 @@ export default {
             localStorage.setItem('powerGrade', res.data.positionId);
             this.GZQuota = false;
             this.JZQuota = false;
+            this.YFQuota = res.data.postType == 'YF' ? true : false;
             if (res.data.postType == 'JZ') {
               this.JZQuota = true;
             } else if (res.data.postType == 'GZ') {
@@ -784,7 +708,6 @@ export default {
             return false;
           }
         }
-        debugger;
         if (
           (this.$route.query.reportId && this.notVisitReason) ||
           this.reportTarget.showNotVisitReason
@@ -862,6 +785,7 @@ export default {
         this.reportTarget = res.data;
         this.GZQuota = false;
         this.JZQuota = false;
+        this.YFQuota = res.data.postType == 'YF' ? true : false;
         if (res.data.postType == 'JZ') {
           this.JZQuota = true;
         } else if (res.data.postType == 'GZ') {

+ 4 - 80
src/views/week/dailyApproval.vue

@@ -11,7 +11,8 @@
     <div style="height: 4px"></div>
     <!--        主体内容-->
     <div class="container linep">
-      <van-collapse v-model="activeNames">
+      <van-collapse v-model="activeNames" v-if="!YFQuota">
+        <!-- YFQuota:应用服务平台 不显示各项指标 -->
         <van-collapse-item v-if="!GZQuota" title="拜访数据(实时)" name="7">
           <visitedRealTime
             :reportTargetAll="reportTargetAll"
@@ -229,85 +230,6 @@
             >
           </van-row>
         </van-collapse-item>
-        <!-- <van-collapse-item v-if="JZQuota" name="20" title="瓷砖胶过账(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月实际</span></van-col>
-            <van-col span="12"><span class="rightTitle">本季实际</span></van-col>
-            <van-col span="12"
-              ><p>
-                客户数:<span class="colorbalck">{{ reportTargetAll.czjPostCustomerMonth }}</span>
-              </p>
-            </van-col>
-            <van-col span="12"
-              ><p>
-                客户数:<span class="colorbalck">{{ reportTargetAll.czjPostCustomerQuarter }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                下单数(包):<span class="colorbalck">{{
-                  reportTargetAll.czjPostOrderNumMonth
-                }}</span>
-              </p>
-            </van-col>
-            <van-col span="12"
-              ><p>
-                下单数(包):<span class="colorbalck">{{
-                  reportTargetAll.czjPostOrderNumQuarter
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                下单销售额:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjPostOrderPriceMonth)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                下单销售额:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjPostOrderPriceQuarter)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                下单率:<span class="colorbalck">{{ reportTargetAll.czjPostOrderRateMonth }}%</span>
-              </p>
-            </van-col>
-            <van-col span="12"
-              ><p>
-                下单率:<span class="colorbalck"
-                  >{{ reportTargetAll.czjPostOrderRateQuarter }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="24"><span class="leftTitle">年度累计实际</span></van-col>
-            <van-col span="24"
-              ><p>
-                客户数:<span class="colorbalck">{{ reportTargetAll.czjPostCustomerYear }}</span>
-              </p>
-            </van-col>
-            <van-col span="24"
-              ><p>
-                下单数(包):<span class="colorbalck">{{ reportTargetAll.czjPostOrderNumYear }}</span>
-              </p>
-            </van-col>
-            <van-col span="24"
-              ><p>
-                下单销售额:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjPostOrderPriceYear)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="24"
-              ><p>
-                下单率:<span class="colorbalck">{{ reportTargetAll.czjPostOrderRateYear }}%</span>
-              </p>
-            </van-col>
-          </van-row>
-        </van-collapse-item> -->
         <van-collapse-item v-if="JZQuota" name="22" title="基材粉料过账(千元)">
           <van-row>
             <van-col span="12"><span class="leftTitle">本月实际</span></van-col>
@@ -613,6 +535,7 @@ export default {
       type: '-1',
       JZQuota: false,
       GZQuota: false,
+      YFQuota: false,
       titlejz: '',
       //
     };
@@ -735,6 +658,7 @@ export default {
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
         this.GZQuota = false;
         this.JZQuota = false;
+        this.YFQuota = res.data.postType == 'YF' ? true : false;
         if (res.data.postType == 'JZ') {
           this.JZQuota = true;
         } else if (res.data.postType == 'GZ') {

+ 167 - 128
src/views/week/dailyApprovalList.vue

@@ -2,16 +2,11 @@
   <div class="bgcolor">
     <!--        顶部条-->
     <div class="navBarTOP">
-    <van-nav-bar
-        class="navBar"
-        title="汇报审批"
-        left-arrow
-        @click-left="onClickLeft"
-    />
-    <van-tabs v-model="type" color="#0057ba"  @change="tabChange">
-      <van-tab title="待审批" name="approvalPending" :disabled="disabled"></van-tab>
-      <van-tab title="已审批" name="approvalSuccess" :disabled="disabled"></van-tab>
-    </van-tabs>
+      <van-nav-bar class="navBar" title="汇报审批" left-arrow @click-left="onClickLeft" />
+      <van-tabs v-model="type" color="#0057ba" @change="tabChange">
+        <van-tab title="待审批" name="approvalPending" :disabled="disabled"></van-tab>
+        <van-tab title="已审批" name="approvalSuccess" :disabled="disabled"></van-tab>
+      </van-tabs>
     </div>
     <div class="container">
       <div class="lineGrey"></div>
@@ -23,143 +18,182 @@
       <div class="lineGrey"></div>
       <div class="lineGrey"></div>
       <div class="lineGrey"></div>
-      <van-list  v-model="loading" :finished="finished" finished-text="--已经到底了--" @load="onLoad">
-      <div class="cellcontent brud weekList" v-for="(item,index) in  list" :key="index">
-        <van-cell @click="approveFn(item)">
-          <div class="cardContent">
-            <div class="title" v-if="type=='approvalPending'">
-              <p class="textLeft" v-if="item.reportType==1">{{item.nickName}}的{{item.reportTypeStr}}</p>
-              <p class="textLeft" v-if="item.reportType==2">{{item.deptName}}的{{item.reportTypeStr}}</p>
-              <p class="textLeft" v-if="item.reportType==3">{{item.dqName}}的{{item.reportTypeStr}}</p>
-              <p class="textRight">审批</p></div>
-            <div class="title" v-if="type=='approvalSuccess'">
-              <p class="textLeft" v-if="item.reportType==1">{{item.nickName}}的{{item.reportTypeStr}}</p>
-              <p class="textLeft" v-if="item.reportType==2">{{item.deptName}}的{{item.reportTypeStr}}</p>
-              <p class="textLeft" v-if="item.reportType==3">{{item.dqName}}的{{item.reportTypeStr}}</p>
-              <p class="textRight">
-                <van-rate
+      <van-list
+        v-model="loading"
+        :finished="finished"
+        finished-text="--已经到底了--"
+        @load="onLoad">
+        <div class="cellcontent brud weekList" v-for="(item, index) in list" :key="index">
+          <van-cell @click="approveFn(item)">
+            <div class="cardContent">
+              <div class="title" v-if="type == 'approvalPending'">
+                <!-- reportType: 1日报;2周报;3半月报 -->
+                <!-- <p class="textLeft" v-if="item.reportType == 1">
+                  {{ item.nickName }}的{{ item.reportTypeStr }}
+                </p>
+                <p class="textLeft" v-if="item.reportType == 2">
+                  {{ item.deptName }}的{{ item.reportTypeStr }}
+                </p>
+                <p class="textLeft" v-if="item.reportType == 3">
+                  {{ item.dqName }}的{{ item.reportTypeStr }}
+                </p> -->
+                <p class="textLeft">{{ filterName(item) }}的{{ item.reportTypeStr }}</p>
+                <p class="textRight">审批</p>
+              </div>
+              <div class="title" v-if="type == 'approvalSuccess'">
+                <p class="textLeft" v-if="item.reportType == 1">
+                  {{ item.nickName }}的{{ item.reportTypeStr }}
+                </p>
+                <p class="textLeft" v-if="item.reportType == 2">
+                  {{ item.deptName }}的{{ item.reportTypeStr }}
+                </p>
+                <p class="textLeft" v-if="item.reportType == 3">
+                  {{ item.dqName }}的{{ item.reportTypeStr }}
+                </p>
+                <p class="textRight">
+                  <van-rate
                     v-model="item.number"
                     :size="18"
                     color="#ffd21e"
                     void-icon="star"
                     void-color="#eee"
-                    readonly
-                />
-              </p>
+                    readonly />
+                </p>
+              </div>
+              <div class="info" v-if="type == 'approvalPending'">
+                提交时间:{{ item.commitTime }}
+              </div>
+              <div class="info" v-if="type == 'approvalSuccess'">
+                审批时间:{{ item.approvalTime }}
+              </div>
             </div>
-            <div class="info" v-if="type=='approvalPending'">提交时间:{{item.commitTime}}</div>
-            <div class="info" v-if="type=='approvalSuccess'">审批时间:{{item.approvalTime}}</div>
-          </div>
-        </van-cell>
-      </div>
-      <van-empty description="" v-if="list.length==0"/>
+          </van-cell>
+        </div>
+        <van-empty description="" v-if="list.length == 0" />
       </van-list>
     </div>
   </div>
 </template>
 
 <script>
-import {approveList} from "@/api/index";
+import { approveList } from '@/api/index';
 export default {
-  name: "MyHistoricalWeekly",
+  name: 'MyHistoricalWeekly',
   data() {
     return {
-      type:"approvalPending",
-      disabled:false,
-      pageNum:1,
-      pageSize:10,
+      type: 'approvalPending',
+      disabled: false,
+      pageNum: 1,
+      pageSize: 10,
       loading: false,
       finished: false,
-      list:[]
-    }
+      list: [],
+    };
   },
   created() {
     // this.approveList()
   },
   watch: {
     $route(to, from) {
-      this.powerGrade = localStorage.getItem("powerGrade")
-      this.pageNum=1
-      if(to.path=="/dailyApprovalList"&&from.path=="/home"){
-        this.approveList()
+      this.powerGrade = localStorage.getItem('powerGrade');
+      this.pageNum = 1;
+      if (to.path == '/dailyApprovalList' && from.path == '/home') {
+        this.approveList();
       }
-      if(to.path=="/dailyApprovalList"&&from.path=="/daily"){
-        this.pageNum=1
-        this.approveList()
+      if (to.path == '/dailyApprovalList' && from.path == '/daily') {
+        this.pageNum = 1;
+        this.approveList();
       }
-      if(to.path=="/dailyApprovalList"&&from.path=="/dailyApproval"){
-        this.pageNum=1
-        this.approveList()
+      if (to.path == '/dailyApprovalList' && from.path == '/dailyApproval') {
+        this.pageNum = 1;
+        this.approveList();
       }
-      if(to.path=="/dailyApprovalList"&&from.path=="/weeklyApproval"){
-        this.pageNum=1
-        this.approveList()
+      if (to.path == '/dailyApprovalList' && from.path == '/weeklyApproval') {
+        this.pageNum = 1;
+        this.approveList();
       }
-      if(to.path=="/dailyApprovalList"&&from.path=="/doubleWeeklyApproval"){
-        this.pageNum=1
-        this.approveList()
+      if (to.path == '/dailyApprovalList' && from.path == '/doubleWeeklyApproval') {
+        this.pageNum = 1;
+        this.approveList();
       }
-      if(to.path=="/dailyApprovalList"&&from.path=="/dailyDetails"){
-        this.pageNum=1
-        this.approveList()
+      if (to.path == '/dailyApprovalList' && from.path == '/dailyDetails') {
+        this.pageNum = 1;
+        this.approveList();
       }
-      if(to.path=="/dailyApprovalList"&&from.path=="/weeklyApprovalDetils"){
-        this.pageNum=1
-        this.approveList()
+      if (to.path == '/dailyApprovalList' && from.path == '/weeklyApprovalDetils') {
+        this.pageNum = 1;
+        this.approveList();
       }
-      if(to.path=="/dailyApprovalList"&&from.path=="/doubleWeeklyDetils"){
-        this.pageNum=1
-        this.approveList()
+      if (to.path == '/dailyApprovalList' && from.path == '/doubleWeeklyDetils') {
+        this.pageNum = 1;
+        this.approveList();
       }
-    }
+    },
   },
   methods: {
-    onLoad(){
-      this.approveList()
+    filterName(item) {
+      // <!-- reportType: 1日报;2周报;3半月报 -->
+      let name = '';
+      // 应用服务平台
+      if (item.postType == 'DIY') {
+        if (item.reportType == 1) {
+          name = item.nickName;
+        } else if (item.reportType == 2) {
+          name = item.deptName;
+        } else if (item.reportType == 3) {
+          name = item.dqName;
+        }
+      } else {
+        name = item.nickName;
+      }
+      return name;
     },
-    approveFn(row){
-      this.list=[];
-      if(this.type=="approvalPending"){
-        if(row.reportType=="1"){
+    onLoad() {
+      this.approveList();
+    },
+    approveFn(row) {
+      this.list = [];
+      if (this.type == 'approvalPending') {
+        if (row.reportType == '1') {
           this.$router.push({
-            path: "/dailyApproval",
-            query: {reportId: row.id,}
-          })
-        }else if(row.reportType=="2"){
+            path: '/dailyApproval',
+            query: { reportId: row.id },
+          });
+        } else if (row.reportType == '2') {
           this.$router.push({
-            path: "/weeklyApproval",
-            query: {reportId: row.id,}
-          })
-        }else{
+            path: '/weeklyApproval',
+            query: { reportId: row.id },
+          });
+        } else {
           this.$router.push({
-            path: "/doubleWeeklyApproval",
-            query: {reportId: row.id,}
-          })
+            path: '/doubleWeeklyApproval',
+            query: { reportId: row.id },
+          });
         }
-      }else{
-        if(row.reportType=="1"){
+      } else {
+        if (row.reportType == '1') {
           this.$router.push({
-            path: "/dailyDetails",
-            query: {reportId: row.id,}
-          })
-        }else if(row.reportType=="2"){
+            path: '/dailyDetails',
+            query: { reportId: row.id },
+          });
+        } else if (row.reportType == '2') {
           this.$router.push({
-            path: "/weeklyApprovalDetils",
-            query: {reportId: row.id,}
-          })
-        }else{
+            path: '/weeklyApprovalDetils',
+            query: { reportId: row.id },
+          });
+        } else {
           this.$router.push({
-            path: "/doubleWeeklyDetils",
-            query: {reportId: row.id,}
-          })
+            path: '/doubleWeeklyDetils',
+            query: { reportId: row.id },
+          });
         }
       }
     },
     tabChange() {
       this.disabled = true;
-      this.list=[];
-      this.pageNum=1
-      this.approveList()
+      this.list = [];
+      this.pageNum = 1;
+      this.approveList();
     },
     approveList() {
       let loading1 = this.$toast.loading({
@@ -171,35 +205,36 @@ export default {
         this.list = [];
         this.refreshing = false;
       }
-      approveList({type: this.type, pageNum:this.pageNum, pageSize:this.pageSize,}).then(res => {
-        loading1.clear()
-        this.disabled = false;
-        this.loading = false;
-        if(this.pageNum==1){
-          this.list=[];
-          this.refreshing =false;
-        }
-        this.list = this.list.concat(res.data)
-        if(this.list.length >=res.total) {
-          this.finished = true;
-        }else{
-          this.finished = false;
+      approveList({ type: this.type, pageNum: this.pageNum, pageSize: this.pageSize }).then(
+        (res) => {
+          loading1.clear();
+          this.disabled = false;
+          this.loading = false;
+          if (this.pageNum == 1) {
+            this.list = [];
+            this.refreshing = false;
+          }
+          this.list = this.list.concat(res.data);
+          if (this.list.length >= res.total) {
+            this.finished = true;
+          } else {
+            this.finished = false;
+          }
+          this.pageNum = this.pageNum + 1;
         }
-        this.pageNum=this.pageNum+1
-      })
+      );
     },
     onClickLeft() {
-      this.$router.push("/home")
-    }
-  }
-}
+      this.$router.push('/home');
+    },
+  },
+};
 </script>
 <style>
 .bgcolor {
   background-color: #f5f5f5;
 }
 
-
 .cardContent {
   box-sizing: border-box;
 }
@@ -219,7 +254,7 @@ export default {
 
 .cardContent .title p {
   padding: 0;
-  margin: 0
+  margin: 0;
 }
 
 .cardContent .title .textLeft {
@@ -241,10 +276,14 @@ export default {
   border-radius: 8px;
   overflow: hidden;
 }
-.weekList{
-  border-radius:0;
+.weekList {
+  border-radius: 0;
+}
+.weekList .van-cell {
+  border-radius: 6px;
+  overflow: hidden;
+}
+.weekList .cardContent .title {
+  line-height: 32px;
 }
-.weekList .van-cell{border-radius: 6px;
-  overflow: hidden;}
-.weekList .cardContent .title{line-height: 32px}
-</style>
+</style>

+ 4 - 1
src/views/week/dailyDetails.vue

@@ -11,7 +11,8 @@
     <div class="lineGrey"></div>
     <!--        主体内容-->
     <div class="container linep">
-      <van-collapse v-model="activeNames">
+      <van-collapse v-model="activeNames" v-if="!YFQuota">
+        <!-- YFQuota:应用服务平台 不显示各项指标 -->
         <van-collapse-item v-if="!GZQuota" title="拜访数据(实时)" name="7">
           <visitedRealTime
             :reportTargetAll="reportTargetAll"
@@ -527,6 +528,7 @@ export default {
       type: '-1',
       JZQuota: false,
       GZQuota: false,
+      YFQuota: false, //应用服务
       titlejz: '',
       saptitle: '业绩目标SAP(千元)',
       ptitle: '',
@@ -580,6 +582,7 @@ export default {
         this.reportTarget = res.data;
         this.JZQuota = false;
         this.GZQuota = false;
+        this.YFQuota = res.data.postType == 'YF' ? true : false;
         this.ptitle = res.data.pdeptName + '-' + res.data.ppostName + '-' + res.data.pnickName;
         if (res.data.postType == 'JZ') {
           this.JZQuota = true;

+ 4 - 91
src/views/week/dailyHistoricalDetails.vue

@@ -17,7 +17,8 @@
       <p style="font-size: 16px; margin: 10px 0" v-if="reportTarget.commitTime">
         提交时间: {{ reportTarget.commitTime }}
       </p>
-      <van-collapse v-model="activeNames">
+      <van-collapse v-model="activeNames" v-if="!YFQuota">
+        <!-- YFQuota:应用服务平台 不显示各项指标 -->
         <van-collapse-item v-if="!GZQuota" title="拜访数据(实时)" name="7">
           <visitedRealTime
             :reportTargetAll="reportTargetAll"
@@ -54,8 +55,6 @@
                 }}</span>
               </p></van-col
             >
-            <!--            <van-col span="12" ><p>业绩达成率:<span class="colorbalck">{{ Micrometer(reportTargetAll.gzCtzjMonthSuccessRate) }}%</span></p></van-col>-->
-            <!--            <van-col span="12" ><p>业绩达成率:<span class="colorbalck">{{ Micrometer(reportTargetAll.gzCtzjQuarterSuccessRate) }}%</span></p></van-col>-->
             <van-col span="12"
               ><p>
                 业绩成长率:<span class="colorbalck"
@@ -90,8 +89,6 @@
                 }}</span>
               </p></van-col
             >
-            <!--            <van-col span="12" ><p>业绩达成率:<span class="colorbalck">{{ Micrometer(reportTargetAll.gzZgwqMonthSuccessRate) }}%</span></p></van-col>-->
-            <!--            <van-col span="12" ><p>业绩达成率:<span class="colorbalck">{{ Micrometer(reportTargetAll.gzZgwqQuarterSuccessRate) }}%</span></p></van-col>-->
             <van-col span="12"
               ><p>
                 业绩成长率:<span class="colorbalck"
@@ -110,7 +107,6 @@
         </van-collapse-item>
         <van-collapse-item v-if="GZQuota" name="41" title="公装客户开发">
           <van-row>
-            <!--            <van-col span="12"><span class="leftTitle">全年开户</span></van-col><van-col span="12"><span class="rightTitle">本月报备</span></van-col>-->
             <van-col span="12"
               ><p>
                 全年实际:<span class="colorbalck">{{
@@ -118,8 +114,6 @@
                 }}</span>
               </p></van-col
             >
-            <!--            <van-col span="12" ><p>报备成功数:<span class="colorbalck">{{ Micrometer(reportTargetAll.gzBbMonthSuccessNum) }}</span></p></van-col>-->
-            <!--            <van-col span="12"><p>&nbsp;</p></van-col>-->
             <van-col span="12"
               ><p>
                 全年目标:<span class="colorbalck">{{
@@ -235,85 +229,6 @@
             >
           </van-row>
         </van-collapse-item>
-        <!-- <van-collapse-item v-if="JZQuota" name="20" title="瓷砖胶过账(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月实际</span></van-col>
-            <van-col span="12"><span class="rightTitle">本季实际</span></van-col>
-            <van-col span="12"
-              ><p>
-                客户数:<span class="colorbalck">{{ reportTargetAll.czjPostCustomerMonth }}</span>
-              </p>
-            </van-col>
-            <van-col span="12"
-              ><p>
-                客户数:<span class="colorbalck">{{ reportTargetAll.czjPostCustomerQuarter }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                下单数(包):<span class="colorbalck">{{
-                  reportTargetAll.czjPostOrderNumMonth
-                }}</span>
-              </p>
-            </van-col>
-            <van-col span="12"
-              ><p>
-                下单数(包):<span class="colorbalck">{{
-                  reportTargetAll.czjPostOrderNumQuarter
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                下单销售额:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjPostOrderPriceMonth)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                下单销售额:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjPostOrderPriceQuarter)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                下单率:<span class="colorbalck">{{ reportTargetAll.czjPostOrderRateMonth }}%</span>
-              </p>
-            </van-col>
-            <van-col span="12"
-              ><p>
-                下单率:<span class="colorbalck"
-                  >{{ reportTargetAll.czjPostOrderRateQuarter }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="24"><span class="leftTitle">年度累计实际</span></van-col>
-            <van-col span="24"
-              ><p>
-                客户数:<span class="colorbalck">{{ reportTargetAll.czjPostCustomerYear }}</span>
-              </p>
-            </van-col>
-            <van-col span="24"
-              ><p>
-                下单数(包):<span class="colorbalck">{{ reportTargetAll.czjPostOrderNumYear }}</span>
-              </p>
-            </van-col>
-            <van-col span="24"
-              ><p>
-                下单销售额:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjPostOrderPriceYear)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="24"
-              ><p>
-                下单率:<span class="colorbalck">{{ reportTargetAll.czjPostOrderRateYear }}%</span>
-              </p>
-            </van-col>
-          </van-row>
-        </van-collapse-item> -->
         <van-collapse-item v-if="JZQuota" name="22" title="基材粉料过账(千元)">
           <van-row>
             <van-col span="12"><span class="leftTitle">本月实际</span></van-col>
@@ -471,10 +386,6 @@
           <div style="padding: 10px 0">
             <van-field readonly v-model="projectFollowNum" type="digit" />
           </div>
-          <!--          <p class="contentContainerTitle">报备数量</p>-->
-          <!--          <div style="padding: 10px 0">-->
-          <!--            <van-field readonly v-model="reportingNum" type="digit"  />-->
-          <!--          </div>-->
           <p class="contentContainerTitle">今日TUC成功报备数量</p>
           <div style="padding: 10px 0">
             <van-field readonly v-model="tucReportingSuccessNum" type="digit" />
@@ -662,6 +573,7 @@ export default {
       JZQuota: false,
       titlejz: '',
       GZQuota: false,
+      YFQuota: false, //应用服务
       saptitle: '业绩目标SAP(千元)',
       //
     };
@@ -844,6 +756,7 @@ export default {
         loading1.clear();
         this.GZQuota = false;
         this.JZQuota = false;
+        this.YFQuota = res.data.postType == 'YF' ? true : false;
         if (res.data.postType == 'JZ') {
           this.JZQuota = true;
         } else if (res.data.postType == 'GZ') {

+ 179 - 162
src/views/week/index.vue

@@ -1,183 +1,185 @@
 <template>
-  <div>
+  <div class="userPage">
     <div class="navBarTOP">
       <van-nav-bar class="navBar" title="我的" />
     </div>
-    <div class="lineGrey"></div>
-    <div class="lineGrey"></div>
-    <div class="lineGrey"></div>
-    <div class="lineGrey"></div>
-    <div style="height: 8px"></div>
-    <div class="myHeader">
-      <van-row>
-        <van-col span="7">
-          <van-image round width="8rem" height="8rem" :src="avatar" @click="login" />
-        </van-col>
-        <van-col span="17">
-          <div class="avatarContent">
-            <p class="nickName">{{ nickName }}</p>
-            <p>
-              <span class="postName">{{ postName }}</span>
-            </p>
-          </div>
-        </van-col>
-      </van-row>
-    </div>
-    <!--        主体内容-->
-    <div class="container">
-      <!--      门店及拜访-->
-      <van-cell-group inset class="mtb10">
-        <van-cell :title="addBTN" is-link @click="onSelect('B')" v-if="addShow">
-          <template #icon>
-            <van-icon :name="addShop" class="zicon" />
-          </template>
-        </van-cell>
-        <van-cell title="新增专卖店/金牌店" is-link @click="onSelect('A')" v-if="addShow1">
-          <template #icon>
-            <van-icon :name="addShop" class="zicon" />
-          </template>
-        </van-cell>
-        <van-cell :title="title" is-link to="/storemanagementlist">
-          <template #icon>
-            <van-icon :name="storeselect" class="zicon" />
-          </template>
-        </van-cell>
-        <van-cell title="历史拜访" is-link to="/historAllVisit">
-          <template #icon>
-            <van-icon :name="history" class="zicon" />
-          </template>
-        </van-cell>
-      </van-cell-group>
-      <!--      客资类-->
-      <van-cell-group inset class="mtb10">
-        <van-cell title="客资&投诉任务" to="/clew" v-if="customerClueButton">
-          <template #icon>
-            <van-icon :name="history" class="zicon" />
-          </template>
-          <template #title>
-            <span>客资&投诉任务</span>
-            &nbsp;<van-tag type="danger" v-if="customerClueNum > 0">{{ customerClueNum }}</van-tag>
-          </template>
-          <template #right-icon>
-            <van-icon name="arrow" size="16" />
-          </template>
-        </van-cell>
-        <van-cell title="待分配客资" to="/assignAwait" v-if="isAssignFlag">
-          <template #icon>
-            <van-icon :name="history" class="zicon" />
-          </template>
-          <template #title>
-            <span>待分配客资</span>
-            &nbsp;<van-tag type="danger" v-if="notAllocationNum > 0">{{
-              notAllocationNum
-            }}</van-tag>
-          </template>
-          <template #right-icon>
-            <van-icon name="arrow" size="16" />
-          </template>
-        </van-cell>
-      </van-cell-group>
-      <!--      汇报类-->
-      <van-cell-group inset class="mtb10">
-        <van-cell
-          title="我的历史汇报"
-          v-if="historyButton"
-          is-link
-          to="/myHistoricalDaily"
-          class="MYTile">
-          <template #title>
-            <span class="custom-title">我的历史汇报&nbsp;&nbsp;</span>
-          </template>
-          <template #icon>
-            <van-icon :name="daily" class="zicon" />
-          </template>
-          <template #right-icon>
-            <van-tag type="danger" v-if="existReject">退回待处理</van-tag>
-            <van-icon name="arrow" />
-          </template>
-        </van-cell>
-        <van-cell v-if="showDaily || isDiy == 'true'" is-link to="/subordinateHistoricalDaily">
-          下属业务员历史日报
-          <span
-            style="font-weight: 600; font-size: 16px; color: red; margin-left: 15px"
-            v-if="thisWeekRemarkNum != null"
-            >{{ thisWeekRemarkNum }}/5</span
-          >
-          <template #icon>
-            <van-icon :name="daily" class="zicon" />
-          </template>
-        </van-cell>
-        <van-cell
-          title="下属部主管历史周报"
-          v-if="showWeekly || isDiy == 'true'"
-          is-link
-          to="/subordinateHistoricalWeekly">
-          <template #icon>
-            <van-icon :name="daily" class="zicon" />
-          </template>
-        </van-cell>
-        <van-cell
-          title="下属大区主管历史半月报"
-          v-if="showDouble || isDiy == 'true'"
-          is-link
-          to="/doubleWeeklyHistorical">
-          <template #icon>
-            <van-icon :name="daily" class="zicon" />
-          </template>
-        </van-cell>
-        <van-cell
-          title="下属汇报率审批率统计"
-          v-if="showDaily || showWeekly || showDouble || isDiy == 'true'"
-          is-link
-          to="/reportingRate">
-          <template #icon>
-            <van-icon :name="daily" class="zicon" />
-          </template>
-        </van-cell>
-      </van-cell-group>
-      <!--      物料类-->
-      <van-cell-group inset class="mtb10">
-        <van-cell title="我的物料库存" is-link to="/myInventory" class="MYTile">
-          <template #title>
-            <span class="custom-title">我的物料库存&nbsp;&nbsp;</span>
-          </template>
-          <template #icon>
-            <van-icon :name="daily" class="zicon" />
-          </template>
-        </van-cell>
-      </van-cell-group>
-      <!--      <p style="margin: -8px 16px 8px;color: #888;" v-if="list">主管任务</p>-->
-      <van-cell-group inset>
-        <div style="border-radius: 6px; overflow: hidden">
+    <div class="content">
+      <div class="myHeader">
+        <van-row>
+          <van-col span="7">
+            <van-image round width="8rem" height="8rem" :src="avatar" @click="login" />
+          </van-col>
+          <van-col span="17">
+            <div class="avatarContent">
+              <p class="nickName">{{ nickName }}</p>
+              <p>
+                <span class="postName">{{ postName }}</span>
+              </p>
+            </div>
+          </van-col>
+        </van-row>
+      </div>
+      <!--        主体内容-->
+      <div class="container">
+        <!--      门店及拜访-->
+        <van-cell-group inset class="mtb10">
+          <van-cell :title="addBTN" is-link @click="onSelect('B')" v-if="addShow">
+            <template #icon>
+              <van-icon :name="addShop" class="zicon" />
+            </template>
+          </van-cell>
+          <van-cell title="新增专卖店/金牌店" is-link @click="onSelect('A')" v-if="addShow1">
+            <template #icon>
+              <van-icon :name="addShop" class="zicon" />
+            </template>
+          </van-cell>
+          <van-cell :title="title" is-link to="/storemanagementlist">
+            <template #icon>
+              <van-icon :name="storeselect" class="zicon" />
+            </template>
+          </van-cell>
+          <van-cell title="历史拜访" is-link to="/historAllVisit">
+            <template #icon>
+              <van-icon :name="history" class="zicon" />
+            </template>
+          </van-cell>
+        </van-cell-group>
+        <!--      客资类-->
+        <van-cell-group inset class="mtb10">
+          <van-cell title="客资&投诉任务" to="/clew" v-if="customerClueButton">
+            <template #icon>
+              <van-icon :name="history" class="zicon" />
+            </template>
+            <template #title>
+              <span>客资&投诉任务</span>
+              &nbsp;<van-tag type="danger" v-if="customerClueNum > 0">{{
+                customerClueNum
+              }}</van-tag>
+            </template>
+            <template #right-icon>
+              <van-icon name="arrow" size="16" />
+            </template>
+          </van-cell>
+          <van-cell title="待分配客资" to="/assignAwait" v-if="isAssignFlag">
+            <template #icon>
+              <van-icon :name="history" class="zicon" />
+            </template>
+            <template #title>
+              <span>待分配客资</span>
+              &nbsp;<van-tag type="danger" v-if="notAllocationNum > 0">{{
+                notAllocationNum
+              }}</van-tag>
+            </template>
+            <template #right-icon>
+              <van-icon name="arrow" size="16" />
+            </template>
+          </van-cell>
+        </van-cell-group>
+        <!--      汇报类-->
+        <van-cell-group inset class="mtb10">
           <van-cell
+            title="我的历史汇报"
+            v-if="historyButton"
             is-link
-            v-for="(item, index) in list"
-            :key="index"
-            :to="'/VisitSummaryAdd?summaryId=' + item.summaryId + '&title=' + item.summaryTaskName">
+            to="/myHistoricalDaily"
+            class="MYTile">
             <template #title>
-              <span class="custom-title">{{ item.summaryTaskName }}</span>
+              <span class="custom-title">我的历史汇报&nbsp;&nbsp;</span>
             </template>
             <template #icon>
               <van-icon :name="daily" class="zicon" />
             </template>
+            <template #right-icon>
+              <van-tag type="danger" v-if="existReject">退回待处理</van-tag>
+              <van-icon name="arrow" />
+            </template>
           </van-cell>
-          <van-cell title="主管任务查询" is-link to="/VisitSummary" v-if="summaryTaskButton">
+          <van-cell v-if="showDaily || isDiy == 'true'" is-link to="/subordinateHistoricalDaily">
+            下属业务员历史日报
+            <span
+              style="font-weight: 600; font-size: 16px; color: red; margin-left: 15px"
+              v-if="thisWeekRemarkNum != null"
+              >{{ thisWeekRemarkNum }}/5</span
+            >
             <template #icon>
-              <van-icon :name="history" class="zicon" />
+              <van-icon :name="daily" class="zicon" />
             </template>
           </van-cell>
-          <van-cell title="家装推广会历史提报查询" is-link to="/VisitSummaryMy" v-if="jzTaskButton">
+          <van-cell
+            title="下属部主管历史周报"
+            v-if="showWeekly || isDiy == 'true'"
+            is-link
+            to="/subordinateHistoricalWeekly">
             <template #icon>
-              <van-icon :name="history" class="zicon" />
+              <van-icon :name="daily" class="zicon" />
+            </template>
+          </van-cell>
+          <van-cell
+            title="下属大区主管历史半月报"
+            v-if="showDouble || isDiy == 'true'"
+            is-link
+            to="/doubleWeeklyHistorical">
+            <template #icon>
+              <van-icon :name="daily" class="zicon" />
             </template>
           </van-cell>
-        </div>
-      </van-cell-group>
-      <br /><br />
-      <br /><br />
-      <br /><br />
-      <tab-bar tabBarActive="MyList"></tab-bar>
+          <van-cell
+            title="下属汇报率审批率统计"
+            v-if="showDaily || showWeekly || showDouble || isDiy == 'true'"
+            is-link
+            to="/reportingRate">
+            <template #icon>
+              <van-icon :name="daily" class="zicon" />
+            </template>
+          </van-cell>
+        </van-cell-group>
+        <!--      物料类-->
+        <van-cell-group inset class="mtb10">
+          <van-cell title="我的物料库存" is-link to="/myInventory" class="MYTile">
+            <template #title>
+              <span class="custom-title">我的物料库存&nbsp;&nbsp;</span>
+            </template>
+            <template #icon>
+              <van-icon :name="daily" class="zicon" />
+            </template>
+          </van-cell>
+        </van-cell-group>
+        <!--      <p style="margin: -8px 16px 8px;color: #888;" v-if="list">主管任务</p>-->
+        <van-cell-group inset>
+          <div style="border-radius: 6px; overflow: hidden">
+            <van-cell
+              is-link
+              v-for="(item, index) in list"
+              :key="index"
+              :to="
+                '/VisitSummaryAdd?summaryId=' + item.summaryId + '&title=' + item.summaryTaskName
+              ">
+              <template #title>
+                <span class="custom-title">{{ item.summaryTaskName }}</span>
+              </template>
+              <template #icon>
+                <van-icon :name="daily" class="zicon" />
+              </template>
+            </van-cell>
+            <van-cell title="主管任务查询" is-link to="/VisitSummary" v-if="summaryTaskButton">
+              <template #icon>
+                <van-icon :name="history" class="zicon" />
+              </template>
+            </van-cell>
+            <van-cell
+              title="家装推广会历史提报查询"
+              is-link
+              to="/VisitSummaryMy"
+              v-if="jzTaskButton">
+              <template #icon>
+                <van-icon :name="history" class="zicon" />
+              </template>
+            </van-cell>
+          </div>
+        </van-cell-group>
+      </div>
     </div>
+    <tab-bar tabBarActive="MyList"></tab-bar>
   </div>
 </template>
 
@@ -361,7 +363,22 @@ export default {
   },
 };
 </script>
-<style scoped>
+<style scoped lang="scss">
+.userPage {
+  height: 100%;
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  overflow: hidden;
+  .content {
+    flex: 1;
+    margin-top: 46px;
+    overflow-y: auto;
+  }
+  .tabBar {
+    height: 50px;
+  }
+}
 .myHeader {
   background-color: #1c84c6;
   padding: 24px 30px;

+ 258 - 248
src/views/week/weekly.vue

@@ -27,254 +27,261 @@
       <div class="lineGrey"></div>
       <div style="height: 8px"></div>
       <van-collapse v-model="activeNames" style="margin-top: -3px">
-        <van-collapse-item title="建店布机" name="2">
-          <createStoreBJ :reportTargetAll="reportTargetAll"></createStoreBJ>
-        </van-collapse-item>
-        <van-collapse-item name="16" title="专业时时丽分销店下单">
-          <ZYPlaceOrder :reportTargetAll="reportTargetAll"></ZYPlaceOrder>
-        </van-collapse-item>
-        <van-collapse-item title="业绩目标SAP(千元)" name="1" v-if="type != 3 && type != 4">
-          <performanceSAP :reportTargetAll="reportTargetAll" :JZQuota="JZQuota"></performanceSAP>
-        </van-collapse-item>
-        <van-collapse-item name="27" title="乳胶漆中高端(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
-            <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.rjqSapMonthAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.rjqSapQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.rjqSapQuarterSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item name="11" title="专业时时丽SAP(千元)">
-          <ZYSAP :reportTargetAll="reportTargetAll"></ZYSAP>
-        </van-collapse-item>
-        <van-collapse-item name="28" title="防水+背胶SAP(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
-            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.fsbjSapMonthAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.fsbjSapQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.fsbjSapMonthSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.fsbjSapQuarterSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item name="29" title="瓷砖胶SAP(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
-            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjSapMonthAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjSapQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.czjSapQuarterSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.czjSapQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item title="魔术漆SAP(千元)" name="3">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
-            <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqMonthAct) }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqQuarterAct) }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.ysqMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.ysqMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item title="质感外墙SAP(千元)" name="4">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
-            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.zgwqMonthAct) }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.zgwqQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item name="17" title="超好贴分销店下单">
-          <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
-        </van-collapse-item>
-        <van-collapse-item title="客户开拓" name="6">
-          <van-row>
-            <!--            <van-col span="12" v-if="powerGrade>=3"><span class="leftTitle">非片区经销商</span></van-col>-->
-            <!--            v-if="powerGrade==2"-->
-            <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
-            <!--            <van-col span="12" v-if="powerGrade>=3"><span class="rightTitle" >TOP70直营家装</span></van-col>-->
-            <van-col span="24"
-              ><p>
-                全年开发数:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.customerAct)
-                }}</span>
-              </p></van-col
-            >
-            <!--            <van-col span="12" v-if="powerGrade>=3"><p>全年目标:<span class="colorbalck">{{reportTargetAll.directCustomerYearTarget}}</span></p></van-col>-->
-            <!--            <van-col span="24"><p>实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.customerAct) }}</span></p></van-col>-->
-            <!--            <van-col span="12" v-if="powerGrade>=3"><p>实际:<span class="colorbalck">{{reportTargetAll.directCustomerAct}}</span></p></van-col>-->
-            <van-col span="24"
-              ><p>
-                全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
-              </p></van-col
-            >
-            <!--            <van-col span="12" v-if="powerGrade>=3"><p>全年进度率:<span class="colorbalck">{{reportTargetAll.directCustomerYearRate}}%</span></p></van-col>-->
-          </van-row>
-        </van-collapse-item>
-
-        <!--        <van-collapse-item title="门店异常管理提醒" name="7">-->
-        <!--          <van-row>-->
-        <!--            <van-col span="24"><p>未分配点数:<span class="colorbalck">{{reportTargetAll.undistrNum}}</span></p></van-col>-->
-        <!--            <van-col span="24"><p>已覆盖未排线点数:<span class="colorbalck">{{reportTargetAll.coverNotPlan}}</span></p></van-col>-->
-        <!--          </van-row>-->
-        <!--        </van-collapse-item>-->
+        <template v-if="!YFQuota">
+          <!-- YFQuota:应用服务平台 不显示各项指标 -->
+          <van-collapse-item title="建店布机" name="2">
+            <createStoreBJ :reportTargetAll="reportTargetAll"></createStoreBJ>
+          </van-collapse-item>
+          <van-collapse-item name="16" title="专业时时丽分销店下单">
+            <ZYPlaceOrder :reportTargetAll="reportTargetAll"></ZYPlaceOrder>
+          </van-collapse-item>
+          <van-collapse-item title="业绩目标SAP(千元)" name="1" v-if="type != 3 && type != 4">
+            <performanceSAP :reportTargetAll="reportTargetAll" :JZQuota="JZQuota"></performanceSAP>
+          </van-collapse-item>
+          <van-collapse-item name="27" title="乳胶漆中高端(千元)">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
+              <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.rjqSapMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.rjqSapQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.rjqSapMonthSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.rjqSapQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck"
+                    >{{ reportTargetAll.rjqSapQuarterGrowRate }}%</span
+                  >
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item name="11" title="专业时时丽SAP(千元)">
+            <ZYSAP :reportTargetAll="reportTargetAll"></ZYSAP>
+          </van-collapse-item>
+          <van-collapse-item name="28" title="防水+背胶SAP(千元)">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
+              ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.fsbjSapMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.fsbjSapQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.fsbjSapMonthSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.fsbjSapQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck"
+                    >{{ reportTargetAll.fsbjSapQuarterGrowRate }}%</span
+                  >
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item name="29" title="瓷砖胶SAP(千元)">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
+              ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.czjSapMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.czjSapQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.czjSapMonthSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.czjSapQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck"
+                    >{{ reportTargetAll.czjSapQuarterGrowRate }}%</span
+                  >
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item title="魔术漆SAP(千元)" name="3">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
+              <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqMonthAct) }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.ysqQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck">{{ reportTargetAll.ysqMonthSuccessRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.ysqQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.ysqMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterGrowRate }}%</span>
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item title="质感外墙SAP(千元)" name="4">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
+              ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.zgwqMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.zgwqQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthSuccessRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.zgwqQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterGrowRate }}%</span>
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item name="17" title="超好贴分销店下单">
+            <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
+          </van-collapse-item>
+          <van-collapse-item title="客户开拓" name="6">
+            <van-row>
+              <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
+              <van-col span="24"
+                ><p>
+                  全年开发数:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.customerAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="24"
+                ><p>
+                  全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+        </template>
         <van-collapse-item title="上周工作成果" name="8">
           <div style="margin-top: -10px">
             <div v-for="(item2, index2) in reportContentsList2" :key="index2">
@@ -429,6 +436,7 @@ export default {
       temporaryShow: '',
       type: '-1',
       JZQuota: false,
+      YFQuota: false, //应用服务
     };
   },
   created() {
@@ -463,6 +471,7 @@ export default {
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
         loading1.clear();
         if (res.code == 200) {
+          this.YFQuota = res.data.postType == 'YF' ? true : false;
           this.JZQuota = false;
           if (res.data.postType == 'JZ') {
             this.JZQuota = true;
@@ -696,6 +705,7 @@ export default {
         localStorage.setItem('powerGrade', res.data.positionId);
         this.type = res.data.userType;
         var dayTime = res.data.date;
+        this.YFQuota = res.data.postType == 'YF' ? true : false;
         this.timeList = this.parseTimeParagraph(
           dayTime.slice(0, 4) + '-' + dayTime.slice(4, 6) + '-' + dayTime.slice(6, 8)
         );

+ 264 - 248
src/views/week/weeklyApproval.vue

@@ -12,254 +12,268 @@
       <div class="lineGrey"></div>
       <div style="height: 4px"></div>
       <van-collapse v-model="activeNames">
-        <van-collapse-item title="建店布机" name="2">
-          <createStoreBJ :reportTargetAll="reportTargetAll"></createStoreBJ>
-        </van-collapse-item>
-        <van-collapse-item name="16" title="专业时时丽分销店下单">
-          <ZYPlaceOrder :reportTargetAll="reportTargetAll"></ZYPlaceOrder>
-        </van-collapse-item>
-        <van-collapse-item title="业绩目标SAP(千元)" name="1" v-if="type != 3 && type != 4">
-          <performanceSAP :reportTargetAll="reportTargetAll" :JZQuota="JZQuota"></performanceSAP>
-        </van-collapse-item>
-        <van-collapse-item name="27" title="乳胶漆中高端(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
-            <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.rjqSapMonthAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.rjqSapQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.rjqSapQuarterSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item name="11" title="专业时时丽SAP(千元)">
-          <ZYSAP :reportTargetAll="reportTargetAll"></ZYSAP>
-        </van-collapse-item>
-        <van-collapse-item name="28" title="防水+背胶SAP(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
-            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.fsbjSapMonthAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.fsbjSapQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.fsbjSapMonthSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.fsbjSapQuarterSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item name="29" title="瓷砖胶SAP(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
-            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjSapMonthAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjSapQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.czjSapQuarterSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.czjSapQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item title="魔术漆SAP(千元)" name="3">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
-            <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqMonthAct) }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqQuarterAct) }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.ysqMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.ysqMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item title="质感外墙SAP(千元)" name="4">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
-            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.zgwqMonthAct) }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.zgwqQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item name="17" title="超好贴分销店下单">
-          <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
-        </van-collapse-item>
-        <van-collapse-item title="客户开拓" name="6">
-          <van-row>
-            <!--            <van-col span="12" v-if="powerGrade>=3"><span class="leftTitle">非片区经销商</span></van-col>-->
-            <!--            v-if="powerGrade==2"-->
-            <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
-            <!--            <van-col span="12" v-if="powerGrade>=3"><span class="rightTitle" >TOP70直营家装</span></van-col>-->
-            <van-col span="24"
-              ><p>
-                全年开发数:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.customerAct)
-                }}</span>
-              </p></van-col
-            >
-            <!--            <van-col span="12" v-if="powerGrade>=3"><p>全年目标:<span class="colorbalck">{{reportTargetAll.directCustomerYearTarget}}</span></p></van-col>-->
-            <!--            <van-col span="24"><p>实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.customerAct) }}</span></p></van-col>-->
-            <!--            <van-col span="12" v-if="powerGrade>=3"><p>实际:<span class="colorbalck">{{reportTargetAll.directCustomerAct}}</span></p></van-col>-->
-            <van-col span="24"
-              ><p>
-                全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
-              </p></van-col
-            >
-            <!--            <van-col span="12" v-if="powerGrade>=3"><p>全年进度率:<span class="colorbalck">{{reportTargetAll.directCustomerYearRate}}%</span></p></van-col>-->
-          </van-row>
-        </van-collapse-item>
-
-        <!--        <van-collapse-item title="门店异常管理提醒" name="7">-->
-        <!--          <van-row>-->
-        <!--            <van-col span="24"><p>未分配点数:<span class="colorbalck">{{reportTargetAll.undistrNum}}</span></p></van-col>-->
-        <!--            <van-col span="24"><p>已覆盖未排线点数:<span class="colorbalck">{{reportTargetAll.coverNotPlan}}</span></p></van-col>-->
-        <!--          </van-row>-->
-        <!--        </van-collapse-item>-->
+        <template v-if="!YFQuota">
+          <!-- YFQuota:应用服务平台 不显示各项指标 -->
+          <van-collapse-item title="建店布机" name="2">
+            <createStoreBJ :reportTargetAll="reportTargetAll"></createStoreBJ>
+          </van-collapse-item>
+          <van-collapse-item name="16" title="专业时时丽分销店下单">
+            <ZYPlaceOrder :reportTargetAll="reportTargetAll"></ZYPlaceOrder>
+          </van-collapse-item>
+          <van-collapse-item title="业绩目标SAP(千元)" name="1" v-if="type != 3 && type != 4">
+            <performanceSAP :reportTargetAll="reportTargetAll" :JZQuota="JZQuota"></performanceSAP>
+          </van-collapse-item>
+          <van-collapse-item name="27" title="乳胶漆中高端(千元)">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
+              <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.rjqSapMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.rjqSapQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.rjqSapMonthSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.rjqSapQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck"
+                    >{{ reportTargetAll.rjqSapQuarterGrowRate }}%</span
+                  >
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item name="11" title="专业时时丽SAP(千元)">
+            <ZYSAP :reportTargetAll="reportTargetAll"></ZYSAP>
+          </van-collapse-item>
+          <van-collapse-item name="28" title="防水+背胶SAP(千元)">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
+              ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.fsbjSapMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.fsbjSapQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.fsbjSapMonthSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.fsbjSapQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck"
+                    >{{ reportTargetAll.fsbjSapQuarterGrowRate }}%</span
+                  >
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item name="29" title="瓷砖胶SAP(千元)">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
+              ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.czjSapMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.czjSapQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.czjSapMonthSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.czjSapQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck"
+                    >{{ reportTargetAll.czjSapQuarterGrowRate }}%</span
+                  >
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item title="魔术漆SAP(千元)" name="3">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
+              <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqMonthAct) }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.ysqQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck">{{ reportTargetAll.ysqMonthSuccessRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.ysqQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.ysqMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterGrowRate }}%</span>
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item title="质感外墙SAP(千元)" name="4">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
+              ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.zgwqMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.zgwqQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthSuccessRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.zgwqQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterGrowRate }}%</span>
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item name="17" title="超好贴分销店下单">
+            <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
+          </van-collapse-item>
+          <van-collapse-item title="客户开拓" name="6">
+            <van-row>
+              <!--            <van-col span="12" v-if="powerGrade>=3"><span class="leftTitle">非片区经销商</span></van-col>-->
+              <!--            v-if="powerGrade==2"-->
+              <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
+              <!--            <van-col span="12" v-if="powerGrade>=3"><span class="rightTitle" >TOP70直营家装</span></van-col>-->
+              <van-col span="24"
+                ><p>
+                  全年开发数:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.customerAct)
+                  }}</span>
+                </p></van-col
+              >
+              <!--            <van-col span="12" v-if="powerGrade>=3"><p>全年目标:<span class="colorbalck">{{reportTargetAll.directCustomerYearTarget}}</span></p></van-col>-->
+              <!--            <van-col span="24"><p>实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.customerAct) }}</span></p></van-col>-->
+              <!--            <van-col span="12" v-if="powerGrade>=3"><p>实际:<span class="colorbalck">{{reportTargetAll.directCustomerAct}}</span></p></van-col>-->
+              <van-col span="24"
+                ><p>
+                  全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
+                </p></van-col
+              >
+              <!--            <van-col span="12" v-if="powerGrade>=3"><p>全年进度率:<span class="colorbalck">{{reportTargetAll.directCustomerYearRate}}%</span></p></van-col>-->
+            </van-row>
+          </van-collapse-item>
+        </template>
         <van-collapse-item title="上周工作成果" name="8">
           <div style="margin-top: -10px">
             <div v-for="(item2, index2) in reportContentsList2" :key="index2">
@@ -429,6 +443,7 @@ export default {
       reportTarget: {},
       type: '-1',
       JZQuota: false,
+      YFQuota: false, //应用服务
     };
   },
   created() {
@@ -536,6 +551,7 @@ export default {
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
         loading1.clear();
         if (res.code == 200) {
+          this.YFQuota = res.data.postType == 'YF' ? true : false;
           this.JZQuota = false;
           if (res.data.postType == 'JZ') {
             this.JZQuota = true;

+ 257 - 248
src/views/week/weeklyApprovalDetils.vue

@@ -12,254 +12,261 @@
       <div class="lineGrey"></div>
       <div style="height: 4px"></div>
       <van-collapse v-model="activeNames">
-        <van-collapse-item title="建店布机" name="2">
-          <createStoreBJ :reportTargetAll="reportTargetAll"></createStoreBJ>
-        </van-collapse-item>
-        <van-collapse-item name="16" title="专业时时丽分销店下单">
-          <ZYPlaceOrder :reportTargetAll="reportTargetAll"></ZYPlaceOrder>
-        </van-collapse-item>
-        <van-collapse-item title="业绩目标SAP(千元)" name="1" v-if="type != 3 && type != 4">
-          <performanceSAP :reportTargetAll="reportTargetAll" :JZQuota="JZQuota"></performanceSAP>
-        </van-collapse-item>
-        <van-collapse-item name="27" title="乳胶漆中高端(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
-            <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.rjqSapMonthAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.rjqSapQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.rjqSapQuarterSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item name="11" title="专业时时丽SAP(千元)">
-          <ZYSAP :reportTargetAll="reportTargetAll"></ZYSAP>
-        </van-collapse-item>
-        <van-collapse-item name="28" title="防水+背胶SAP(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
-            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.fsbjSapMonthAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.fsbjSapQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.fsbjSapMonthSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.fsbjSapQuarterSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item name="29" title="瓷砖胶SAP(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
-            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjSapMonthAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjSapQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.czjSapQuarterSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.czjSapQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item title="魔术漆SAP(千元)" name="3">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
-            <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqMonthAct) }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqQuarterAct) }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.ysqMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.ysqMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item title="质感外墙SAP(千元)" name="4">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
-            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.zgwqMonthAct) }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.zgwqQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item name="17" title="超好贴分销店下单">
-          <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
-        </van-collapse-item>
-        <van-collapse-item title="客户开拓" name="6">
-          <van-row>
-            <!--            <van-col span="12" v-if="powerGrade>=3"><span class="leftTitle">非片区经销商</span></van-col>-->
-            <!--            v-if="powerGrade==2"-->
-            <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
-            <!--            <van-col span="12" v-if="powerGrade>=3"><span class="rightTitle" >TOP70直营家装</span></van-col>-->
-            <van-col span="24"
-              ><p>
-                全年开发数:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.customerAct)
-                }}</span>
-              </p></van-col
-            >
-            <!--            <van-col span="12" v-if="powerGrade>=3"><p>全年目标:<span class="colorbalck">{{reportTargetAll.directCustomerYearTarget}}</span></p></van-col>-->
-            <!--            <van-col span="24"><p>实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.customerAct) }}</span></p></van-col>-->
-            <!--            <van-col span="12" v-if="powerGrade>=3"><p>实际:<span class="colorbalck">{{reportTargetAll.directCustomerAct}}</span></p></van-col>-->
-            <van-col span="24"
-              ><p>
-                全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
-              </p></van-col
-            >
-            <!--            <van-col span="12" v-if="powerGrade>=3"><p>全年进度率:<span class="colorbalck">{{reportTargetAll.directCustomerYearRate}}%</span></p></van-col>-->
-          </van-row>
-        </van-collapse-item>
-        <!--        <van-collapse-item title="门店异常管理提醒" name="7">-->
-        <!--          <van-row>-->
-        <!--            <van-col span="24"><p>未分配点数:<span class="colorbalck">{{reportTargetAll.undistrNum}}</span></p></van-col>-->
-        <!--            <van-col span="24"><p>已覆盖未排线点数:<span class="colorbalck">{{reportTargetAll.coverNotPlan}}</span></p></van-col>-->
-        <!--          </van-row>-->
-        <!--        </van-collapse-item>-->
-
+        <template v-if="!YFQuota">
+          <!-- YFQuota:应用服务平台 不显示各项指标 -->
+          <van-collapse-item title="建店布机" name="2">
+            <createStoreBJ :reportTargetAll="reportTargetAll"></createStoreBJ>
+          </van-collapse-item>
+          <van-collapse-item name="16" title="专业时时丽分销店下单">
+            <ZYPlaceOrder :reportTargetAll="reportTargetAll"></ZYPlaceOrder>
+          </van-collapse-item>
+          <van-collapse-item title="业绩目标SAP(千元)" name="1" v-if="type != 3 && type != 4">
+            <performanceSAP :reportTargetAll="reportTargetAll" :JZQuota="JZQuota"></performanceSAP>
+          </van-collapse-item>
+          <van-collapse-item name="27" title="乳胶漆中高端(千元)">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
+              <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.rjqSapMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.rjqSapQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.rjqSapMonthSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.rjqSapQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck"
+                    >{{ reportTargetAll.rjqSapQuarterGrowRate }}%</span
+                  >
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item name="11" title="专业时时丽SAP(千元)">
+            <ZYSAP :reportTargetAll="reportTargetAll"></ZYSAP>
+          </van-collapse-item>
+          <van-collapse-item name="28" title="防水+背胶SAP(千元)">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
+              ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.fsbjSapMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.fsbjSapQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.fsbjSapMonthSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.fsbjSapQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck"
+                    >{{ reportTargetAll.fsbjSapQuarterGrowRate }}%</span
+                  >
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item name="29" title="瓷砖胶SAP(千元)">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
+              ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.czjSapMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.czjSapQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.czjSapMonthSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.czjSapQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck"
+                    >{{ reportTargetAll.czjSapQuarterGrowRate }}%</span
+                  >
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item title="魔术漆SAP(千元)" name="3">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
+              <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqMonthAct) }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.ysqQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck">{{ reportTargetAll.ysqMonthSuccessRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.ysqQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.ysqMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterGrowRate }}%</span>
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item title="质感外墙SAP(千元)" name="4">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
+              ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.zgwqMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.zgwqQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthSuccessRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.zgwqQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterGrowRate }}%</span>
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item name="17" title="超好贴分销店下单">
+            <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
+          </van-collapse-item>
+          <van-collapse-item title="客户开拓" name="6">
+            <van-row>
+              <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
+              <van-col span="24"
+                ><p>
+                  全年开发数:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.customerAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="24"
+                ><p>
+                  全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+        </template>
         <van-collapse-item title="上周工作成果" name="8">
           <div style="margin-top: -10px">
             <div v-for="(item2, index2) in reportContentsList2" :key="index2">
@@ -447,6 +454,7 @@ export default {
       type: '-1',
       ptitle: '',
       JZQuota: false,
+      YFQuota: false, //应用服务
     };
   },
   created() {
@@ -477,6 +485,7 @@ export default {
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
         loading1.clear();
         if (res.code == 200) {
+          this.YFQuota = res.data.postType == 'YF' ? true : false;
           this.JZQuota = false;
           if (res.data.postType == 'JZ') {
             this.JZQuota = true;

+ 257 - 248
src/views/week/weeklyHistoricalDetils.vue

@@ -13,254 +13,261 @@
       <div class="lineGrey"></div>
       <p style="font-size: 16px; margin: 10px 0">{{ title }}</p>
       <van-collapse v-model="activeNames">
-        <van-collapse-item title="建店布机" name="2">
-          <createStoreBJ :reportTargetAll="reportTargetAll"></createStoreBJ>
-        </van-collapse-item>
-        <van-collapse-item name="16" title="专业时时丽分销店下单">
-          <ZYPlaceOrder :reportTargetAll="reportTargetAll"></ZYPlaceOrder>
-        </van-collapse-item>
-        <van-collapse-item title="业绩目标SAP(千元)" name="1" v-if="type != 3 && type != 4">
-          <performanceSAP :reportTargetAll="reportTargetAll" :JZQuota="JZQuota"></performanceSAP>
-        </van-collapse-item>
-        <van-collapse-item name="27" title="乳胶漆中高端(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
-            <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.rjqSapMonthAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.rjqSapQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.rjqSapQuarterSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item name="11" title="专业时时丽SAP(千元)">
-          <ZYSAP :reportTargetAll="reportTargetAll"></ZYSAP>
-        </van-collapse-item>
-        <van-collapse-item name="28" title="防水+背胶SAP(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
-            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.fsbjSapMonthAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.fsbjSapQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.fsbjSapMonthSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.fsbjSapQuarterSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item name="29" title="瓷砖胶SAP(千元)">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
-            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjSapMonthAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.czjSapQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck"
-                  >{{ reportTargetAll.czjSapQuarterSuccessRate }}%</span
-                >
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.czjSapQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item title="魔术漆SAP(千元)" name="3">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
-            <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqMonthAct) }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqQuarterAct) }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.ysqMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.ysqMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item title="质感外墙SAP(千元)" name="4">
-          <van-row>
-            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
-            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.zgwqMonthAct) }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                实际:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.zgwqQuarterAct)
-                }}</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                达成率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterSuccessRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthGrowRate }}%</span>
-              </p></van-col
-            >
-            <van-col span="12"
-              ><p>
-                成长率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterGrowRate }}%</span>
-              </p></van-col
-            >
-          </van-row>
-        </van-collapse-item>
-        <van-collapse-item name="17" title="超好贴分销店下单">
-          <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
-        </van-collapse-item>
-        <van-collapse-item title="客户开拓" name="6">
-          <van-row>
-            <!--            <van-col span="12" v-if="powerGrade>=3"><span class="leftTitle">非片区经销商</span></van-col>-->
-            <!--            v-if="powerGrade==2"-->
-            <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
-            <!--            <van-col span="12" v-if="powerGrade>=3"><span class="rightTitle" >TOP70直营家装</span></van-col>-->
-            <van-col span="24"
-              ><p>
-                全年开发数:<span class="colorbalck">{{
-                  Micrometer(reportTargetAll.customerAct)
-                }}</span>
-              </p></van-col
-            >
-            <!--            <van-col span="12" v-if="powerGrade>=3"><p>全年目标:<span class="colorbalck">{{reportTargetAll.directCustomerYearTarget}}</span></p></van-col>-->
-            <!--            <van-col span="24"><p>实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.customerAct) }}</span></p></van-col>-->
-            <!--            <van-col span="12" v-if="powerGrade>=3"><p>实际:<span class="colorbalck">{{reportTargetAll.directCustomerAct}}</span></p></van-col>-->
-            <van-col span="24"
-              ><p>
-                全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
-              </p></van-col
-            >
-            <!--            <van-col span="12" v-if="powerGrade>=3"><p>全年进度率:<span class="colorbalck">{{reportTargetAll.directCustomerYearRate}}%</span></p></van-col>-->
-          </van-row>
-        </van-collapse-item>
-
-        <!--                <van-collapse-item title="门店异常管理提醒" name="7">-->
-        <!--                  <van-row>-->
-        <!--                    <van-col span="24"><p>未分配点数:<span class="colorbalck">{{reportTargetAll.undistrNum}}</span></p></van-col>-->
-        <!--                    <van-col span="24"><p>已覆盖未排线点数:<span class="colorbalck">{{reportTargetAll.coverNotPlan}}</span></p></van-col>-->
-        <!--                  </van-row>-->
-        <!--                </van-collapse-item>-->
+        <template v-if="!YFQuota">
+          <!-- YFQuota:应用服务平台 不显示各项指标 -->
+          <van-collapse-item title="建店布机" name="2">
+            <createStoreBJ :reportTargetAll="reportTargetAll"></createStoreBJ>
+          </van-collapse-item>
+          <van-collapse-item name="16" title="专业时时丽分销店下单">
+            <ZYPlaceOrder :reportTargetAll="reportTargetAll"></ZYPlaceOrder>
+          </van-collapse-item>
+          <van-collapse-item title="业绩目标SAP(千元)" name="1" v-if="type != 3 && type != 4">
+            <performanceSAP :reportTargetAll="reportTargetAll" :JZQuota="JZQuota"></performanceSAP>
+          </van-collapse-item>
+          <van-collapse-item name="27" title="乳胶漆中高端(千元)">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
+              <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.rjqSapMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.rjqSapQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.rjqSapMonthSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.rjqSapQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck"
+                    >{{ reportTargetAll.rjqSapQuarterGrowRate }}%</span
+                  >
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item name="11" title="专业时时丽SAP(千元)">
+            <ZYSAP :reportTargetAll="reportTargetAll"></ZYSAP>
+          </van-collapse-item>
+          <van-collapse-item name="28" title="防水+背胶SAP(千元)">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
+              ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.fsbjSapMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.fsbjSapQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.fsbjSapMonthSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.fsbjSapQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck"
+                    >{{ reportTargetAll.fsbjSapQuarterGrowRate }}%</span
+                  >
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item name="29" title="瓷砖胶SAP(千元)">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
+              ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.czjSapMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.czjSapQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.czjSapMonthSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.czjSapQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck"
+                    >{{ reportTargetAll.czjSapQuarterGrowRate }}%</span
+                  >
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item title="魔术漆SAP(千元)" name="3">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
+              <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqMonthAct) }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.ysqQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck">{{ reportTargetAll.ysqMonthSuccessRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.ysqQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.ysqMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterGrowRate }}%</span>
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item title="质感外墙SAP(千元)" name="4">
+            <van-row>
+              <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
+              ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.zgwqMonthAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  实际:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.zgwqQuarterAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthSuccessRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  达成率:<span class="colorbalck"
+                    >{{ reportTargetAll.zgwqQuarterSuccessRate }}%</span
+                  >
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthGrowRate }}%</span>
+                </p></van-col
+              >
+              <van-col span="12"
+                ><p>
+                  成长率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterGrowRate }}%</span>
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+          <van-collapse-item name="17" title="超好贴分销店下单">
+            <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
+          </van-collapse-item>
+          <van-collapse-item title="客户开拓" name="6">
+            <van-row>
+              <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
+              <van-col span="24"
+                ><p>
+                  全年开发数:<span class="colorbalck">{{
+                    Micrometer(reportTargetAll.customerAct)
+                  }}</span>
+                </p></van-col
+              >
+              <van-col span="24"
+                ><p>
+                  全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
+                </p></van-col
+              >
+            </van-row>
+          </van-collapse-item>
+        </template>
         <van-collapse-item title="上周工作成果" name="8">
           <div style="margin-top: -10px">
             <div v-for="(item2, index2) in reportContentsList2" :key="index2">
@@ -461,6 +468,7 @@ export default {
       isDiy: false,
       type: '-1',
       JZQuota: false,
+      YFQuota: false, //应用服务
     };
   },
   created() {
@@ -580,6 +588,7 @@ export default {
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
         loading1.clear();
         if (res.code == 200) {
+          this.YFQuota = res.data.postType == 'YF' ? true : false;
           this.JZQuota = false;
           if (res.data.postType == 'JZ') {
             this.JZQuota = true;