117 Commits 0af30f6326 ... add6997233

Tác giả SHA1 Thông báo Ngày
  zhujindu add6997233 Merge branch 'feature_20251201_仿石漆服务商门店类型取消定位校验' 4 ngày trước cách đây
  zhujindu 07bd6b4df3 feature_20251201_仿石漆服务商门店类型取消定位校验 4 ngày trước cách đây
  zhujindu 4995079642 feature_20251201_门店拜访手机号验证bug修改 4 ngày trước cách đây
  zhujindu bd9c355168 feature_20251201_仿石漆服务商门店类型取消定位校验 4 ngày trước cách đây
  sunny c5cf5ec783 Merge branch 'feature_20251119_设计师增加属性' 1 tuần trước cách đây
  zhujindu bd101339b1 Merge branch 'feature_20251118_客资分配人员关联区域' 2 tuần trước cách đây
  sunny 9918f89e85 feature_20251119_设计师增加属性 2 tuần trước cách đây
  zhujindu b945bd5d63 feature_20251119_设计师招募省市区获取问题修复 2 tuần trước cách đây
  zhujindu 38feb1df8b feature_20251118_客资分配人员关联区域 2 tuần trước cách đây
  zhujindu 6d652de322 feature_20251118_客资分配人员关联区域 2 tuần trước cách đây
  sunny 267095b70e Merge branch 'feature_20251107_质感销售专员首页' 3 tuần trước cách đây
  sunny 3679d96d52 Merge branch 'feature_20250926_数字题型&单行文本题型' 3 tuần trước cách đây
  sunny dba4c21c60 feature_20250926_数字题型&单行文本题 3 tuần trước cách đây
  sunny b60cf614f0 Merge branch 'feature_20250926_数字题型&单行文本题型' 3 tuần trước cách đây
  sunny b139c17ac0 feature_20251107_质感销售专员首页 3 tuần trước cách đây
  sunny 1c0adb2570 Merge branch 'master' of http://git.dgtis.com/tongym/storevisit-ui-mobile into feature_20251107_质感销售专员首页 3 tuần trước cách đây
  sunny 13296d5792 feature_20250926_数字题型&单行文本题型 3 tuần trước cách đây
  sunny 5479328aca feature_20250926_数字题型&单行文本题型 3 tuần trước cách đây
  sunny bc2c3289b8 代码语法写法优化 3 tuần trước cách đây
  sunny 7e5b22a685 添加递归遍历所有表单项方法 3 tuần trước cách đây
  sunny 16386ad2b0 feature_20251107_质感销售专员首页 3 tuần trước cách đây
  sunny ba2213a960 二层数字类型保存时校验 3 tuần trước cách đây
  sunny 0b43b5fb66 feature_20251107_质感销售专员首页 3 tuần trước cách đây
  sunny c71cbfa0fd Merge branch 'master' of http://git.dgtis.com/tongym/storevisit-ui-mobile into feature_20251107_质感销售专员首页 3 tuần trước cách đây
  sunny b16c47413b feature_20251111_计划内页面日期筛选组件maxData 3 tuần trước cách đây
  sunny 8a6006ea1d feature_20251107_质感销售专员首页 3 tuần trước cách đây
  sunny 54df7d2a9f 默认maxData修改 3 tuần trước cách đây
  sunny a848df4ba6 feature_20251107_质感销售专员首页 3 tuần trước cách đây
  sunny fa2a3ac165 Merge branch 'feature_20251015_主管任务门店扫码签到' 4 tuần trước cách đây
  sunny 3d45003cec feature_20251015_主管任务门店扫码签到 4 tuần trước cách đây
  sunny ab4a8aaa63 Merge branch 'feature_20251015_主管任务门店扫码签到' 4 tuần trước cách đây
  sunny 9825b65d6e feature_20251015_主管任务门店扫码签到 4 tuần trước cách đây
  sunny 6b0a9a1624 Merge branch 'feature_20251015_主管任务门店扫码签到' 4 tuần trước cách đây
  sunny fae5f38a62 feature_20251106_0家店拜访原因空格 4 tuần trước cách đây
  sunny d19c889960 0家店的原因暂存无法保存回显bug修改 4 tuần trước cách đây
  sunny 4aa4c80643 feature_20251106_0家店拜访原因空格 4 tuần trước cách đây
  sunny 8ebab186bf 定义machineInTheStore字段 1 tháng trước cách đây
  sunny f01dade347 Merge branch 'feature_20250926_数字题型&单行文本题型' 1 tháng trước cách đây
  sunny f560c67a6b feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  sunny f0228c488c feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  sunny b7f106046b feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  sunny 70b197933d feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  sunny 734ec54810 Merge branch 'feature_20251009_金牌店档案填写校验' 1 tháng trước cách đây
  sunny 2487b369e5 feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  sunny 9bd0d1adde Merge branch 'feature_20251009_金牌店档案填写校验' 1 tháng trước cách đây
  sunny 786a6c5018 Merge remote-tracking branch 'origin/feature_20250926_数字题型&单行文本题型' 1 tháng trước cách đây
  zhujindu 20ee42e186 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  sunny 9d0953387d feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  sunny a7e2cee448 feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  zhujindu b797c11f67 feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  zhujindu f0974f86f0 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 744a923a8d feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 93bbe573d3 feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  zhujindu 670b7d26cc feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 80b7a9049e feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu e4cf3ded90 feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  zhujindu 34460799fe feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  sunny 3d303597fb feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  sunny 4be18f2174 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu de471954f4 feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  zhujindu 134bd0037f feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  zhujindu 7729cfe7a8 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 4dc6090283 feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  zhujindu 7644a34772 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu c87c60860e feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 8caca66022 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 63317d94b0 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 0757965fd2 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 3d543ec19e feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu b97a802367 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu b91ba7b9c3 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu a9ca586897 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 010b598fbb feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 7536039326 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  sunny 6dd8d16f68 feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  zhujindu d99940a615 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu da082ce11d feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 83cfdb577f feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 721ace0232 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 93e37e09e1 feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  zhujindu a288327146 feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  zhujindu c49e003d6b feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 28c07c7ba9 feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  zhujindu d2528d2b61 feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  zhujindu 341468410e feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  zhujindu 75d600b97d feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  sunny ca93644dba feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  zhujindu 1e079be52e feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  zhujindu d4d0947ce4 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 2d47ba46c2 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu e233f6d864 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  sunny 0522aeec74 feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  sunny 2bbfdd0d7b feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  zhujindu ae447d21b0 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu ff612017f9 feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  sunny 9827b4eec1 feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  zhujindu 7fca206161 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 54eb2b4af0 feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  zhujindu 5d630e13b0 feature_20251015_主管任务门店扫码签到 1 tháng trước cách đây
  zhujindu 12750ace95 删除copy文件 1 tháng trước cách đây
  zhujindu 84677cbd90 feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  zhujindu a4d1402efd feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  sunny a6cdbc802d feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  zhujindu d365f38d46 feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  sunny bae71deffb feature_20251009_金牌店档案填写校验 1 tháng trước cách đây
  zhujindu 6f67236abd feature_20250926_数字题型&单行文本题型 1 tháng trước cách đây
  zhujindu f42b342d30 feature_20250926_数字题型&单行文本题型 2 tháng trước cách đây
  zhujindu 36c12afaf1 feature_20250926_数字题型&单行文本题型 2 tháng trước cách đây
  zhujindu f435e96ded feature_20250926_数字题型&单行文本题型 2 tháng trước cách đây
  zhujindu f7487f6821 feature_20250926_数字题型&单行文本题型 2 tháng trước cách đây
  zhujindu 796fe51bff feature_20250926_数字题型&单行文本题型 2 tháng trước cách đây
  zhujindu 9801661fe8 feature_20250926_数字题型&单行文本题型 2 tháng trước cách đây
  zhujindu 8a3c8398fe feature_20250926_数字题型&单行文本题型 2 tháng trước cách đây
  zhujindu 63ab798f1f feature_20250926_数字题型&单行文本题型 2 tháng trước cách đây
  zhujindu 46b9f5defe feature_20250926_数字题型&单行文本题型 2 tháng trước cách đây
  zhujindu d26b29e224 feature_20250926_数字题型&单行文本题型 2 tháng trước cách đây
  zhujindu 14d26f3d43 feature_20250926_数字题型&单行文本题型 2 tháng trước cách đây
33 tập tin đã thay đổi với 2867 bổ sung2970 xóa
  1. 27 0
      src/api/index.js
  2. 1 0
      src/views/clew/clewent.vue
  3. 1 0
      src/views/clew/complaintDetail/radioGroup.vue
  4. 67 39
      src/views/deviceOutside/index.vue
  5. 0 957
      src/views/deviceOutside/suishenbangOutstoreVisit copy.vue
  6. 1154 53
      src/views/deviceWithin/addStoreVisit.vue
  7. 43 28
      src/views/deviceWithin/index.vue
  8. 0 709
      src/views/historicalVisit/historAllVisit copy 2.vue
  9. 0 698
      src/views/historicalVisit/historAllVisit copy.vue
  10. 5 2
      src/views/historicalVisit/hisvistdeils.vue
  11. 535 0
      src/views/home/HomeTarget.vue
  12. 1 1
      src/views/home/bottomBtn.vue
  13. 2 0
      src/views/home/hintTabPage/noVisit.vue
  14. 31 15
      src/views/home/index.vue
  15. 171 35
      src/views/storeManagement/JPattributeEditor.vue
  16. 18 0
      src/views/storeManagement/addDesignerDetail.vue
  17. 40 0
      src/views/storeManagement/addDesignerEdit.vue
  18. 46 0
      src/views/storeManagement/addDesignerPage.vue
  19. 2 2
      src/views/storeManagement/storeDetail.vue
  20. 419 0
      src/views/week/ActivityQRCode.vue
  21. 30 6
      src/views/week/SUPTaskApproval/SUPTaskApprovalDetail.vue
  22. 4 0
      src/views/week/SUPTaskApproval/detailItem.vue
  23. 83 31
      src/views/week/VisitSummaryAdd.vue
  24. 0 360
      src/views/week/VisitSummaryDetail copy.vue
  25. 61 7
      src/views/week/VisitSummaryDetail.vue
  26. 66 12
      src/views/week/VisitSummaryStorageDetail.vue
  27. 4 0
      src/views/week/allowWriteAgainSummary.vue
  28. 37 8
      src/views/week/assignAwait/assignPage.vue
  29. 4 0
      src/views/week/componVisitSummary.vue
  30. 7 4
      src/views/week/daily.vue
  31. 1 1
      src/views/week/dailyDetails.vue
  32. 1 1
      src/views/week/dailyHistoricalDetails.vue
  33. 6 1
      src/views/week/index.vue

+ 27 - 0
src/api/index.js

@@ -1079,3 +1079,30 @@ export function sendAndCheckVerCode(query) {
     params: query,
   });
 }
+
+// 获取签到记录
+export function getSummaryQrCheckList(query) {
+  return request({
+    url: '/mobile/summaryMobile/getSummaryQrCheckList',
+    method: 'get',
+    params: query,
+  });
+}
+
+// 打开扫码签到二维码
+export function getSummaryQrCodeUUID(query) {
+  return request({
+    url: '/mobile/summaryMobile/getSummaryQrCodeUUID',
+    method: 'get',
+    params: query,
+  });
+}
+
+// 电话确认接口
+export function confirmPhone(query) {
+  return request({
+    url: '/mobile/storeGroup/confirmPhone',
+    method: 'get',
+    params: query,
+  });
+}

+ 1 - 0
src/views/clew/clewent.vue

@@ -238,6 +238,7 @@
                   style="width: 100%; position: relative; left: -10px">
                   <el-table-column
                     v-for="(item, index) in JSON.parse(item.answerValue).title"
+                    :key="index"
                     :prop="item.prop"
                     :label="item.label"
                     align="center">

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

@@ -128,6 +128,7 @@
         <el-table :data="val.tableData.data" style="width: 100%; position: relative; left: -10px">
           <el-table-column
             v-for="(item, index) in val.tableData.title"
+            :key="index"
             :prop="item.prop"
             :label="item.label"
             align="center">

+ 67 - 39
src/views/deviceOutside/index.vue

@@ -1454,7 +1454,7 @@ export default {
           location.lon
         ).toFixed(2);
         // GZ:工装店铺 直接进入拜访
-        if (localStorage.getItem('postType') == 'GZ') {
+        if (localStorage.getItem('postType') == 'GZ' || /^FSQ/.test(val.storeCode)) {
           localStorage.setItem('startTime', new Date());
           localStorage.setItem('ORGName', val.deptName);
           localStorage.setItem('chainNameR', val.storeName);
@@ -1977,44 +1977,11 @@ export default {
                           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.$router.push({
-                                  path: '/outabnormalVisit',
-                                  query: {
-                                    storeId: val.storeId,
-                                    rdId: val.rdId,
-                                    lat: that.lat,
-                                    lon: that.lon,
-                                    visitId: val.visitId,
-                                    pageType: 'out',
-                                    visitModel: '5',
-                                    storeCode: val.storeCode,
-                                    tabVal: that.tabVal,
-                                    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);
-                              })
-                              .catch(() => {
-                                // that.abnormalVisit(val)
-                              });
-                          } else {
+                          // 工装和仿石漆不用校验定位
+                          if (
+                            localStorage.getItem('postType') == 'GZ' ||
+                            /^FSQ/.test(val.storeCode)
+                          ) {
                             that.$router.push({
                               path: '/outabnormalVisit',
                               query: {
@@ -2037,6 +2004,67 @@ export default {
                             localStorage.setItem('startTime', new Date());
                             localStorage.setItem('ORGName', val.deptName);
                             localStorage.setItem('chainNameR', val.storeName);
+                          } else {
+                            if (PointSum > 500) {
+                              that.$dialog
+                                .confirm({
+                                  confirmButtonText: '确定',
+                                  cancelButtonText: '取消',
+                                  title: '系统提示',
+                                  message: '定位距离偏差大',
+                                  closeOnClickOverlay: true,
+                                })
+                                .then(() => {
+                                  that.$router.push({
+                                    path: '/outabnormalVisit',
+                                    query: {
+                                      storeId: val.storeId,
+                                      rdId: val.rdId,
+                                      lat: that.lat,
+                                      lon: that.lon,
+                                      visitId: val.visitId,
+                                      pageType: 'out',
+                                      visitModel: '5',
+                                      storeCode: val.storeCode,
+                                      tabVal: that.tabVal,
+                                      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);
+                                })
+                                .catch(() => {
+                                  // that.abnormalVisit(val)
+                                });
+                            } else {
+                              that.$router.push({
+                                path: '/outabnormalVisit',
+                                query: {
+                                  storeId: val.storeId,
+                                  rdId: val.rdId,
+                                  lat: that.lat,
+                                  lon: that.lon,
+                                  visitId: val.visitId,
+                                  pageType: 'out',
+                                  visitModel: '3',
+                                  storeCode: val.storeCode,
+                                  tabVal: that.tabVal,
+                                  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,

+ 0 - 957
src/views/deviceOutside/suishenbangOutstoreVisit copy.vue

@@ -1,957 +0,0 @@
-<template>
-  <div>
-    <!--        顶部条-->
-    <div class="navBarTOP">
-      <van-nav-bar class="navBar" title="拜访" left-arrow @click-left="onClickLeft" />
-    </div>
-    <!--        主体内容-->
-    <div class="container">
-      <div class="lineGrey"></div>
-      <div class="lineGrey"></div>
-      <div class="lineGrey"></div>
-      <div class="lineGrey"></div>
-      <div class="lineGrey"></div>
-      <div class="card mt10">
-        <div class="title f-blue">
-          {{ storeName }}(<span style="color: #0057ba">{{ urlParameter.storeCode }}</span
-          >)
-        </div>
-        <div class="info1" v-if="addressLine != null">类型:{{ storeCategory }}</div>
-        <div class="info1" v-if="addressLine != 'null'">地址:{{ addressLine }}</div>
-        <div class="info1" v-if="notes != null">上次拜访备注:{{ notes }}</div>
-        <div class="info1">拜访时长:{{ showTime }}</div>
-        <div class="info1">
-          <span v-if="urlParameter.hisTime"
-            >上次拜访时间:{{ parseTime(urlParameter.hisTime) }}</span
-          ><span @click="shows = true" class="f-blue" v-if="visitsRemarks" style="font-weight: bold"
-            ><van-icon name="browsing-history-o" />查看最近三次</span
-          >
-        </div>
-        <van-button
-          type="info"
-          style="background: rgb(0, 87, 186); color: #fff; margin: 10px 0; border-radius: 5px"
-          size="small"
-          plain
-          class="centerBtn"
-          @click="visitFn(urlParameter.storeCode)"
-          >经营情况</van-button
-        >
-        <van-button
-          type="info"
-          style="background: rgb(0, 87, 186); color: #fff; margin: 10px; border-radius: 5px"
-          size="small"
-          plain
-          v-if="showOrderButton"
-          class="centerBtn"
-          @click="overbookingFn(urlParameter)"
-          >去下单</van-button
-        >
-        <van-button
-          type="info"
-          style="background: rgb(0, 87, 186); color: #fff; margin: 10px; border-radius: 5px"
-          size="small"
-          plain
-          class="centerBtn"
-          @click="wuliaoLog(urlParameter)"
-          >物料历史</van-button
-        >
-        <van-button
-          type="info"
-          style="
-            float: right;
-            background: #ed5565;
-            border-color: #ed5565;
-            color: #fff;
-            margin: 10px 0;
-            border-radius: 5px;
-          "
-          size="small"
-          plain
-          class="centerBtn"
-          @click="onstopVisit"
-          >取消拜访</van-button
-        >
-      </div>
-      <div
-        v-if="addShow1"
-        style="color: #999; font-size: 12px; padding: 10px; background-color: #f5f5f5">
-        <van-icon
-          name="info-o" />&nbsp;可控店及金牌店的店招任务中,若拍摄两次仍不通过,允许提交,不影响正常拜访。
-      </div>
-      <div class="card">
-        <div
-          class="info"
-          v-for="(item, index) in list"
-          :key="index"
-          @click="addStoreVisit(item, index)">
-          <span class="must" v-show="item.isMust == '0' || item.isMust == '2'">*</span>
-          <span class="must" v-show="item.isMust != '0' && item.isMust != '2'">&nbsp;</span>
-          <p style="width: 74%; margin: 0; line-height: 24px; display: inline-block">
-            {{ item.taskName }}
-          </p>
-          <span v-show="item.processKey != null" class="processIco">
-            <van-icon :name="sp" size="16" />
-          </span>
-          <span v-show="!item.success" class="arrow" style="background-color: #fff; color: #444"
-            ><van-icon name="arrow"
-          /></span>
-          <span v-show="item.success" class="arrow" tyle="background-color: #0057ba"
-            ><van-icon name="success"
-          /></span>
-        </div>
-      </div>
-    </div>
-    <div class="tc" style="padding: 0 16px">
-      <van-button class="submitBtn" block type="info" color="#0057ba" @click="endVisitsFn"
-        >提交拜访</van-button
-      >
-    </div>
-    <br />
-    <van-dialog v-model="shows">
-      <div class="tipTitleBox" style="padding: 10px">
-        <p class="p">近三次拜访备注</p>
-        <div
-          v-for="item in visitsRemarks"
-          style="border-bottom: 1px solid #e8e8e8; font-size: 14px; padding: 10px 0">
-          <p>拜访时间:{{ item.stopTime }}</p>
-          <p>备注:{{ item.visitRemark }}</p>
-        </div>
-      </div>
-    </van-dialog>
-    <div id="allmap"></div>
-    <!-- 物料历史列表 -->
-    <el-dialog
-      :visible.sync="wuliaoTable"
-      width="90%"
-      :append-to-body="true"
-      :close-on-click-modal="false"
-      @close="wuliaoTableClose"
-      custom-class="wuliaoTable">
-      <el-table :data="wuliaoList" border style="width: 100%">
-        <el-table-column label="物料名称" prop="materialDataName" align="center" />
-        <el-table-column label="发放时间" prop="issuerTime" align="center" />
-        <el-table-column label="数量" prop="inventoryNum" width="60" align="center" />
-        <el-table-column label="签收状态" prop="receiptState" width="60" align="center" />
-      </el-table>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import sp from './../../assets/sp.png';
-import {
-  getStoreGroupTask,
-  endVisits,
-  editDwellTime,
-  suishenbangStoreSale,
-  stopVisit,
-  buryingPoint,
-  getMaterialHistory,
-} from '@/api/index';
-import axios from 'axios';
-import { saveVisitsParams, getOrderUrlByStoreId } from '@/api/inventory';
-export default {
-  name: 'suishenbangOutstoreVisit',
-  data() {
-    return {
-      notes: '',
-      visitModel: '1',
-      sp: sp,
-      shows: false,
-      flag: true,
-      questionsshow: false,
-      uploadImgshow: false,
-      imgs: [],
-      uploadImages: [],
-      uploadid1: 'uploadid1',
-      uploadid2: 'uploadid2',
-      iscuxiao: false,
-      text: '',
-      radio: '',
-      uploadImgEditText: '编辑',
-      isEdit: false,
-      storeId: '',
-      rdId: '',
-      lat: '',
-      lon: '',
-      list: [],
-      storeGroupId: '',
-      addShow1: false,
-      visitId: '',
-      addressLine: '',
-      storeCategory: '',
-      storeName: '',
-      contactName: '',
-      urlParameter: '',
-      uType: '-1',
-      showOrderButton: null,
-
-      visitsRemarks: [],
-      location: {
-        lat: '34.6174',
-        lon: '112.44039',
-      },
-      address: '',
-      showTime: '00:00:00',
-      city: '',
-      locationAccuracy: '',
-      id: '89',
-      startTime: null,
-      timeN: null,
-      wuliaoTable: false,
-      wuliaoList: [],
-    };
-  },
-  created() {
-    this.urlParameter = this.$route.query;
-    this.storeId = this.$route.query.storeId + '';
-    this.visitId = this.$route.query.visitId;
-    this.storeCode = this.$route.query.storeCode;
-    this.rdId = this.$route.query.rdId + '';
-    this.addressLine = this.$route.query.addressLine;
-    this.storeCategory = this.$route.query.storeCategory;
-    this.storeName = this.$route.query.storeName;
-    this.contactName = this.$route.query.contactName;
-    this.lat = this.$route.query.lat + '';
-    this.lon = this.$route.query.lon + '';
-    this.visitModel = this.$route.query.visitModel + '';
-    this.uType = localStorage.getItem('uType');
-  },
-  beforeRouteLeave(to, from, next) {
-    if (
-      (to.path == '/outsidelist/index' && from.path == '/suishenbangOutstoreVisit') ||
-      (to.path == '/storeAdd' && from.path == '/suishenbangOutstoreVisit')
-    ) {
-      if (this.visitId != null && this.visitId != '') {
-        this.editDwellTimes();
-      }
-    }
-    next();
-  },
-  activated() {
-    this.urlParameter = this.$route.query;
-    this.storeId = this.$route.query.storeId + '';
-    this.visitId = this.$route.query.visitId;
-    this.storeCode = this.$route.query.storeCode;
-    this.rdId = this.$route.query.rdId + '';
-    this.addressLine = this.$route.query.addressLine + '';
-    this.storeCategory = this.$route.query.storeCategory + '';
-    this.storeName = this.$route.query.storeName + '';
-    this.contactName = this.$route.query.contactName + '';
-    this.lat = this.$route.query.lat + '';
-    this.lon = this.$route.query.lon + '';
-    this.list = [];
-    this.visitModel = this.$route.query.visitModel + '';
-    this.uType = localStorage.getItem('uType');
-    if (localStorage.getItem('visitId') != null) {
-      this.visitId = localStorage.getItem('visitId');
-      setTimeout(() => {
-        this.addVisits();
-      });
-    } else {
-      setTimeout(() => {
-        this.addVisits();
-      });
-    }
-  },
-  methods: {
-    animation() {
-      //前时间减去上次开启时间减去暂停累计时间
-      var times = new Date().getTime() - new Date(this.startTime).getTime();
-      var house = Math.floor(times / 3600000); //毫秒转化为分钟
-      var minutes = Math.floor(times / 60000 - house * 60); //毫秒转化为分钟
-      var minutes1 = Math.floor(times / 60000); //毫秒转化为分钟
-      var seconds = Math.floor((times - minutes1 * 60000) / 1000); //已知分钟将time减去分钟 除去1000得出 秒
-      var ms = Math.floor((times - minutes1 * 60000 - seconds * 1000) / 10); //
-      this.showTime =
-        (house < 10 ? '0' + house : house) +
-        ':' +
-        (minutes < 10 ? '0' + minutes : minutes) +
-        ':' +
-        (seconds < 10 ? '0' + seconds : seconds);
-      // +":"
-      // +(ms<10 ? "0"+ms : ms);
-    },
-    // 结束拜访
-    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(() => {
-                  // this.$router.replace({});
-                  this.onClickLeft();
-                  // window.location.replace(window.location.origin + '/mobile/outsidelist/index');
-                });
-            } else {
-              this.$dialog.alert({
-                title: '系统提示',
-                message: res.msg,
-              });
-            }
-          });
-        });
-    },
-    overbookingFn(val) {
-      buryingPoint({
-        systemModel: '拜访页',
-        buryingPointType: 1,
-        buryingPointValue: val.storeName + '(' + val.storeCode + ')',
-        buryingPointName: '去下单',
-        buryingPointPosition: '拜访页',
-      });
-      this.toastLoading(0, '加载中...', true);
-      getOrderUrlByStoreId({
-        storeId: this.$route.query.storeId,
-        from: this.$route.query.from,
-      }).then((res) => {
-        this.toastLoading().clear();
-        if (res.code == 200 && res.data) {
-          window.location.href = res.data;
-        } else {
-          this.Toast({
-            message: res.msg,
-            duration: 5000,
-          });
-        }
-      });
-    },
-    visitFn(val) {
-      var that = this;
-      suishenbangStoreSale({ storeCode: val }).then((res) => {
-        if (res.code == 200) {
-          if (res.data.num != '0') {
-            window.location.href =
-              process.env.VUE_APP_SSB_LINK + '/order/storeDetail/index?shopCode=' + val;
-          } else {
-            that.$toast(res.data.msg);
-          }
-        } else {
-          that.$toast(res.msg);
-        }
-      });
-    },
-    getLocation() {
-      let loading1 = this.$toast.loading({
-        duration: 0,
-        message: '加载中...',
-        forbidClick: true,
-      });
-      this.list = [];
-      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,
-          },
-        })
-        .then((response) => {
-          if (response.status == 200) {
-            loading1.clear();
-            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) {
-                  var location = that.CJ02BD(res.latitude, res.longitude);
-                  that.location = location;
-                  if (that.urlParameter.lat == '' || that.urlParameter.lat == null) {
-                    that.lat = that.location.lat;
-                    that.lon = that.location.lon;
-                  }
-                  let PointSum = that
-                    .twoPointSum(that.lat, that.lon, location.lat, location.lon)
-                    .toFixed(2);
-                  if (PointSum > 500) {
-                    that.visitModel = '5';
-                    localStorage.setItem('visitModel', '5');
-                    that.$dialog
-                      .confirm({
-                        confirmButtonText: '确定',
-                        cancelButtonText: '重新定位',
-                        title: '系统提示',
-                        message: '距离本店距离差距太大',
-                      })
-                      .then(() => {
-                        that.addVisits();
-                      })
-                      .catch(() => {
-                        that.getLocation();
-                      });
-                  } else {
-                    that.addVisits();
-                  }
-                },
-                fail: function () {
-                  that.$dialog
-                    .alert({
-                      message: 'GPS未开启',
-                    })
-                    .then(() => {
-                      that.getLocation();
-                    });
-                },
-              });
-            });
-          }
-        });
-    },
-    editDwellTimes() {
-      let dwellTime = this.weekend(localStorage.getItem('startTime'), new Date()) + '';
-      editDwellTime({ dwellTime: dwellTime, visitsId: this.visitId }).then((res) => {
-        if (res.code == 200) {
-          localStorage.removeItem('visitId');
-        }
-      });
-    },
-
-    weekend(time1) {
-      var arrtime1 = new Date(time1).getTime();
-      var arrtime2 = new Date().getTime();
-      return Math.round((arrtime2 - arrtime1) / 1000);
-    },
-    addVisits() {
-      var postType = localStorage.getItem('postType');
-      if (postType == 'GZ') {
-        this.addShow1 = false;
-      } else {
-        this.addShow1 = true;
-      }
-      var visitEntry = '';
-      if (this.urlParameter.tabVal == '0') {
-        visitEntry = '2';
-      } else {
-        visitEntry = '1';
-      }
-      if (this.$route.query.shopCode != undefined) {
-        this.storeCode = this.$route.query.shopCode;
-      }
-      var that = this;
-
-      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: [],
-      });
-      markers.setGeometries([]);
-      var input = [that.urlParameter.marklat, that.urlParameter.marklon];
-      var location = new TMap.LatLng(Number(input[0]), Number(input[1]));
-      geocoder.getAddress({ location: location }).then(
-        function (result) {
-          var addresses = result.result.formatted_addresses;
-          let address_component = result.result.address_component;
-          let province = address_component.province;
-          let city = address_component.city;
-          let district = address_component.district;
-          console.log('province=' + province);
-          console.log('city=' + city);
-          console.log('district=' + district);
-          let recommend = '';
-          if (addresses) {
-            recommend = addresses.recommend;
-          }
-          var params = {
-            storeId: that.storeId,
-            storeCode: that.storeCode,
-            visitEntry: visitEntry,
-            lat: that.urlParameter.latNew,
-            lon: that.urlParameter.lonNew,
-            visitModel: that.visitModel,
-            routeDetailsId: that.rdId,
-            visitSource: '1',
-            locationCity: '',
-            locationRemark: recommend,
-            locationAccuracy: that.urlParameter.PointSum,
-            province: address_component.province,
-            city: address_component.city,
-            district: address_component.district,
-          };
-          that.locationAccuracy = that.urlParameter.PointSum;
-          that.city = '';
-          that.address = recommend;
-          localStorage.setItem('address', '');
-          if (that.visitId != null) {
-            params.id = that.visitId;
-          }
-          let loading2 = that.$toast.loading({
-            duration: 0,
-            message: '加载中...',
-            forbidClick: true,
-          });
-          getStoreGroupTask(params).then((res) => {
-            loading2.clear();
-            if (res.code == 200) {
-              localStorage.setItem('visitId', res.data.visitId);
-              that.notes = res.data.notes;
-              that.visitId = res.data.visitId;
-              that.list = res.data.sfaTaskList;
-              that.storeGroupId = res.data.storeGroupId;
-              that.showOrderButton = res.data.showOrderButton;
-              that.startTime = res.data.startTime;
-              that.timeN = setInterval(that.animation, 16);
-              that.visitsRemarks = res.data.visitsRemarks;
-            } else {
-              that.$toast(res.msg);
-            }
-          });
-        },
-        function (err) {
-          var params = {
-            storeId: that.storeId,
-            storeCode: that.storeCode,
-            visitEntry: visitEntry,
-            lat: that.urlParameter.latNew,
-            lon: that.urlParameter.lonNew,
-            visitModel: that.visitModel,
-            routeDetailsId: that.rdId,
-            visitSource: '1',
-            locationCity: '',
-            locationRemark: '',
-            locationAccuracy: that.urlParameter.PointSum,
-          };
-          that.locationAccuracy = that.urlParameter.PointSum;
-          that.city = '';
-          that.address = '';
-          localStorage.setItem('address', '');
-          if (that.visitId != null) {
-            params.id = that.visitId;
-          }
-          let loading2 = that.$toast.loading({
-            duration: 0,
-            message: '加载中...',
-            forbidClick: true,
-          });
-          getStoreGroupTask(params).then((res) => {
-            loading2.clear();
-            if (res.code == 200) {
-              localStorage.setItem('visitId', res.data.visitId);
-              that.notes = res.data.notes;
-              that.visitId = res.data.visitId;
-              that.list = res.data.sfaTaskList;
-              that.storeGroupId = res.data.storeGroupId;
-              that.showOrderButton = res.data.showOrderButton;
-              that.startTime = res.data.startTime;
-              that.timeN = setInterval(that.animation, 16);
-              that.visitsRemarks = res.data.visitsRemarks;
-            } else {
-              that.$toast(res.msg);
-            }
-          });
-        }
-      );
-    },
-    addStoreVisit(val, index) {
-      this.$router.push({
-        path: '/addStoreVisit',
-        query: {
-          storeId: this.storeId,
-          storeCode: this.urlParameter.storeCode,
-          visitId: this.visitId,
-          ids: index,
-          taskId: val.taskId,
-          storeGroupId: this.storeGroupId,
-          taskType: val.taskType,
-          photoType: val.photoType,
-          lat: this.lat,
-          lon: this.lon,
-          visitSource: '1',
-          visitModel: this.visitModel,
-          locationCity: this.city,
-          locationRemark: this.address,
-          locationAccuracy: this.locationAccuracy,
-          photoIdentifyType: val.photoIdentifyType,
-        },
-      });
-    },
-    onClickLeft() {
-      if (this.$route.query.urltype == 1) {
-        window.location.replace(window.location.origin + '/mobile/home');
-      } else {
-        this.$router.go(-1);
-      }
-    },
-    onshouow() {
-      this.uploadshow = false;
-      this.questionsshow = false;
-    },
-    uploadImgEdit() {
-      if (this.uploadImgEditText == '编辑') {
-        this.uploadImgEditText = '完成';
-      } else {
-        this.uploadImgEditText = '编辑';
-        this.uploadImgshow = false;
-      }
-    },
-    deleteImg(index) {
-      this.imgs.splice(index, 1);
-    },
-    questionClick(item) {
-      console.log(item);
-      if (item.isUpload) {
-        this.uploadshow = true;
-      } else if (item.isQuestion) {
-        this.questionsshow = true;
-      }
-    },
-    endVisitsFn() {
-      if (this.list.length == 0) {
-        this.$toast('暂无任务提交');
-        return;
-      }
-      for (var vl = 0; vl < this.list.length; vl++) {
-        if (this.list[vl].isMust == '0') {
-          if (!this.list[vl].success) {
-            this.$toast(this.list[vl].taskName + '任务未完成');
-            return;
-          }
-        }
-      }
-      let loading1 = this.$toast.loading({
-        duration: 0,
-        message: '加载中...',
-        forbidClick: true,
-      });
-      let dwellTime = this.weekend(localStorage.getItem('startTime'), new Date());
-      let storeCode = this.storeCode;
-      if (this.$route.query.shopCode != undefined) {
-        storeCode = this.$route.query.shopCode;
-      }
-      if (this.flag) {
-        this.flag = false;
-        this.timer = null;
-        this.timer = setTimeout(() => {
-          this.flag = true;
-        }, 5000);
-        endVisits({
-          visitSource: '1',
-          storeGroupId: this.storeGroupId,
-          id: this.visitId,
-          storeCode: storeCode,
-          dwellTime: dwellTime,
-          visitModel: this.$route.query.visitModel,
-        }).then((res) => {
-          this.flag = true;
-          loading1.clear();
-          if (res.code == 200) {
-            this.editDwellTimes();
-            if (this.$route.query.linkType == 6) {
-              window.location.replace(window.location.origin + '/mobile/topStore?info=y');
-            } else {
-              if (this.$route.query.urltype == 1) {
-                window.location.replace(window.location.origin + '/mobile/home');
-              } else {
-                this.onClickLeft();
-                // window.location.replace(
-                //   window.location.origin + '/mobile/outsidelist/index?info=y'
-                // );
-              }
-            }
-          } else {
-            this.$toast({
-              message: res.msg,
-              duration: 5000,
-            });
-          }
-        });
-      }
-    },
-    newimgarr1(val) {
-      this.imgs = val;
-    },
-    uploadImgShowFn() {
-      this.uploadImgshow = true;
-      if (this.uploadImages.length <= 0) {
-        this.uploadImgEditText = '';
-      }
-    },
-    previewsImg(index) {
-      ImagePreview({
-        images: this.uploadImages,
-        startPosition: index,
-        onClose() {
-          // do something
-        },
-      });
-    },
-    // 物料历史
-    wuliaoLog() {
-      this.toastLoading(0, '加载中...', true);
-      getMaterialHistory({ storeId: this.storeId })
-        .then((res) => {
-          this.toastLoading().clear();
-          if (res.code == 200 && res.data) {
-            this.wuliaoList = res.data;
-            this.wuliaoTable = true;
-          }
-        })
-        .catch(() => {
-          this.toastLoading().clear();
-        });
-    },
-    wuliaoTableClose() {
-      this.wuliaoTable = false;
-    },
-  },
-  destroyed() {
-    this.timeN = null;
-    clearInterval(this.timeN);
-  },
-};
-</script>
-<style lang="scss" scoped>
-.container {
-  margin-bottom: 10px;
-  background-color: white;
-  /*padding:0 16px;*/
-}
-.navBarOverlay {
-  background: #fff;
-}
-.card {
-  background: #fff;
-  box-sizing: border-box;
-  padding: 10px 16px;
-  .title {
-    line-height: 32px;
-    font-size: 16px;
-    font-weight: bold;
-    color: #333;
-  }
-  .subtitle {
-    line-height: 24px;
-    font-size: 14px;
-    color: #7b7b7b;
-    .status {
-      float: right;
-    }
-  }
-  .info {
-    font-size: 14px;
-    color: #484848;
-    padding: 14px;
-    border-bottom: 1px solid #f1f1f1;
-    position: relative;
-    .arrow {
-      float: right;
-      display: inline-block;
-      height: 20px;
-      width: 20px;
-      line-height: 20px;
-      text-align: center;
-      border-radius: 50%;
-      background: #0057ba;
-      color: #fff;
-      font-weight: bold;
-      font-size: 14px;
-      position: absolute;
-      margin-top: -10px;
-      right: 0;
-      top: 50%;
-    }
-  }
-  .info1 {
-    font-size: 14px;
-    color: #666;
-    line-height: 18px;
-    padding: 4px 0;
-    position: relative;
-    .arrow {
-      float: right;
-      display: inline-block;
-      height: 20px;
-      width: 20px;
-      line-height: 20px;
-      text-align: center;
-      border-radius: 50%;
-      background: #0057ba;
-      color: #fff;
-      font-weight: bold;
-      font-size: 14px;
-      margin-top: 9px;
-      position: absolute;
-      right: 0;
-      top: 50%;
-      margin-top: -10px;
-    }
-  }
-}
-.must {
-  font-size: 18px;
-  color: #f56c6c;
-  margin-right: 2px;
-}
-.zw {
-  display: inline-block;
-  width: 7px;
-  height: 100%;
-}
-.lineGrey {
-  height: 10px;
-  width: 100%;
-  background: #f1f1f1;
-}
-.submitBtn {
-  margin: 16px 0;
-  font-size: 18px;
-}
-.wrapper {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  height: 100%;
-  .block {
-    width: 100%;
-    height: 100%;
-    background-color: #fff;
-    overflow: auto;
-  }
-}
-.questionName {
-  font-size: 16px;
-  color: #484848;
-  /*line-height: 40px;*/
-  background: #f4f4f4;
-  padding: 10px 15px;
-  box-sizing: border-box;
-  position: relative;
-  display: flex;
-  justify-content: center;
-  .text {
-    flex: 9;
-  }
-}
-.answerDiv {
-  background: #fff;
-  padding: 0 15px 10px;
-  .answerItem {
-    padding: 10px 0;
-    border-bottom: 1px solid #dedede;
-    .name {
-      line-height: 36px;
-      font-size: 14px;
-      color: #8b8b8b;
-    }
-  }
-}
-.border {
-  border: 1px solid #dedede;
-}
-.ht30 {
-  height: 30px;
-}
-.bodrder-b {
-  border-bottom: 1px solid #dedede;
-}
-.img-box {
-  width: 50%;
-  /*height: 100%;*/
-  position: relative;
-  padding: 10px;
-  display: inline-block;
-  i {
-    position: absolute;
-    right: 2px;
-    top: 2px;
-  }
-  img {
-    width: 100%;
-    height: 100%;
-  }
-}
-.imgNull {
-  text-align: center;
-  padding-top: 100px;
-  i {
-    color: #dedede;
-  }
-  div {
-    padding-top: 30px;
-    font-size: 18px;
-    font-weight: bold;
-  }
-}
-.card .f-blue {
-  color: #0057ba;
-}
-</style>
-<style lang="scss">
-.navBarOverlay .van-nav-bar__left .van-icon {
-  color: #8b8b8b;
-}
-.navBarOverlay .van-nav-bar__right .van-nav-bar__text {
-  color: #333;
-}
-.ht30 .van-radio__label {
-  color: #8b8b8b;
-}
-.van-dialog__confirm,
-.van-dialog__confirm:active {
-  color: #0057ba;
-}
-#allmap {
-  width: 20px;
-  height: 20px;
-  left: -1000px;
-  position: relative;
-}
-.el-dialog__wrapper {
-  z-index: 9999 !important;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  background: rgba(0, 0, 0, 0.5) !important;
-  .wuliaoTable {
-    overflow: hidden;
-    display: flex;
-    flex-direction: column;
-    max-height: 70%;
-    margin-top: 0 !important;
-    .el-dialog__header {
-      height: 40px;
-      display: flex;
-      justify-content: right;
-      .el-dialog__headerbtn {
-        position: static !important;
-      }
-    }
-    .el-dialog__body {
-      padding: 30px 20px !important;
-      overflow-y: auto;
-      flex: 1;
-    }
-    .cell {
-      font-size: 12px;
-    }
-  }
-}
-</style>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1154 - 53
src/views/deviceWithin/addStoreVisit.vue


+ 43 - 28
src/views/deviceWithin/index.vue

@@ -517,7 +517,7 @@ export default {
       order: order,
       defaultDate: new Date(),
       minDate: new Date(2020, 0, 1),
-      maxDate: new Date(2025, 10, 1),
+      // maxDate: new Date(2025, 10, 1),
       showPopoverVNUM: [],
       showPopoverC: [],
       showPopoverZ: [],
@@ -546,6 +546,18 @@ export default {
       filterParams: {},
     };
   },
+  computed: {
+    /**
+     * 计算最大可选日期:当前日期往后推30天
+     */
+    maxDate() {
+      const today = new Date();
+      const maxYear = today.getFullYear();
+      const maxMonth = today.getMonth();
+      const maxDay = today.getDate() + 30;
+      return new Date(maxYear, maxMonth, maxDay);
+    },
+  },
   watch: {
     $route(to, from) {
       if (from.path == '/deviceWithin/index' && to.path == '/storeVisitpage') {
@@ -973,7 +985,7 @@ export default {
           location.lon
         ).toFixed(2);
         // GZ:工装店铺 直接进入拜访
-        if (localStorage.getItem('postType') == 'GZ') {
+        if (localStorage.getItem('postType') == 'GZ' || /^FSQ/.test(val.storeCode)) {
           localStorage.setItem('startTime', new Date());
           localStorage.setItem('ORGName', val.deptName);
           localStorage.setItem('chainNameR', val.storeName);
@@ -1250,7 +1262,35 @@ export default {
                           .twoPointSum(that.lat, that.lon, location.lat, location.lon)
                           .toFixed(2);
                         if (val.lat == '' || val.lat == null) {
-                          if (localStorage.getItem('postType') != 'GZ') {
+                          if (
+                            localStorage.getItem('postType') == 'GZ' ||
+                            /^FSQ/.test(val.storeCode)
+                          ) {
+                            that.$router.push({
+                              path: '/storeGroup',
+                              query: {
+                                storeId: val.storeId,
+                                rdId: val.rdId,
+                                lat: that.lat,
+                                lon: that.lon,
+                                visitId: val.visitId,
+                                pageType: 'out',
+                                addressLine: val.addressLine,
+                                storeCategory: val.storeCategory,
+                                storeName: val.storeName,
+                                contactName: val.contactName,
+                                hisTime: val.hisTime,
+                                storeCode: val.storeCode,
+                                tabVal: that.tabVal,
+                                visitModel: '1',
+                                latNew: location.lat,
+                                lonNew: location.lon,
+                                PointSum: PointSum,
+                                marklat: res.latitude,
+                                marklon: res.longitude,
+                              },
+                            });
+                          } else {
                             that.$dialog
                               .confirm({
                                 confirmButtonText: '确定拜访',
@@ -1286,31 +1326,6 @@ export default {
                                   },
                                 });
                               });
-                          } else {
-                            that.$router.push({
-                              path: '/storeGroup',
-                              query: {
-                                storeId: val.storeId,
-                                rdId: val.rdId,
-                                lat: that.lat,
-                                lon: that.lon,
-                                visitId: val.visitId,
-                                pageType: 'out',
-                                addressLine: val.addressLine,
-                                storeCategory: val.storeCategory,
-                                storeName: val.storeName,
-                                contactName: val.contactName,
-                                hisTime: val.hisTime,
-                                storeCode: val.storeCode,
-                                tabVal: that.tabVal,
-                                visitModel: '1',
-                                latNew: location.lat,
-                                lonNew: location.lon,
-                                PointSum: PointSum,
-                                marklat: res.latitude,
-                                marklon: res.longitude,
-                              },
-                            });
                           }
                         } else {
                           that.$router.push({

+ 0 - 709
src/views/historicalVisit/historAllVisit copy 2.vue

@@ -1,709 +0,0 @@
-<template>
-  <div class="bgcolor historAllVisit">
-    <div class="navBarTOP">
-      <!--        顶部条-->
-      <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-col>
-          <van-col span="12">
-            <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-col>
-          <van-col span="12">
-            <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" />
-            </div>
-          </van-col>
-          <van-col span="12">
-            <div class="monthNow" @click="endTimeshow = true">
-              <span class="month">{{ endTime }}</span>
-              <van-icon class="CalendarIcon" :name="timeico" />
-            </div>
-          </van-col>
-        </van-row>
-      </div>
-      <div class="searchDiv">
-        <van-search v-model="storeName" show-action placeholder="搜索名称/编号/地址/拜访人">
-          <template #action>
-            <div @click="onSearch">搜索</div>
-          </template>
-        </van-search>
-      </div>
-      <div class="lineGrey"></div>
-    </div>
-    <!--        主体内容-->
-    <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>
-              <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
-                  >)
-                </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" v-if="item.dwellTime">拜访时长:{{ item.dwellTime }}</div>
-                <div class="info">地址:{{ item.addressLine }}</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>
-      </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"/>-->
-    </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" />
-    </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" />
-    </van-popup>
-    <van-popup v-model="RegionShow" capture position="bottom">
-      <van-picker
-        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" />
-    </van-popup>
-    <van-popup v-model="SalesDepartmentShow" capture position="bottom">
-      <van-picker
-        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" />
-    </van-popup>
-  </div>
-</template>
-
-<script>
-import { getVisits, getvisitDeptInfo } from '@/api/index';
-import timeico from '@/assets/Icon/datatims.png';
-
-export default {
-  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',
-      ],
-      calendarIsshow: false,
-      tabVal: 'insidePlan',
-      list: [],
-      loading: false,
-      finished: true,
-      listActive: null,
-      query: '',
-      show: false,
-      minDate: new Date(2022, 0, 1),
-      maxDate: new Date(),
-      currentDate: new Date(),
-      startcurrentDate: new Date(),
-      endminDate: new Date(),
-      startmaxDate: new Date(),
-      endTime: '',
-      startTime: '',
-      endTimeshow: false,
-      startTimeshow: false,
-      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类型
-      deptLevel: null,
-    };
-  },
-  activated() {
-    this.info();
-    this.getDeptInfo('dept', 'companyList', 'first');
-  },
-  created() {},
-  methods: {
-    onLoad() {
-      // this.loading = false;
-      this.getVisitsListFn();
-    },
-    info() {
-      this.deptLevel = localStorage.getItem('deptLevel');
-      // powerGrade:等级(1-销售员 2-销售部主管 3-大区主管 4-区域公司总经理 5-DIY公司)
-      this.powerGrade = localStorage.getItem('powerGrade');
-      this.userList = [];
-      this.pageNum = 1;
-      this.list = [];
-      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));
-    },
-    detilsFn(val) {
-      this.$router.push({
-        path: '/historicalDetails',
-        query: {
-          visitId: val.id,
-          storeId: val.storeId,
-          storeCode: val.storeCode,
-          taskId: val.taskId,
-          userId: val.userId,
-          storeCategory: val.storeCategory,
-        },
-      });
-    },
-    timeBefore7(date) {
-      if (!date) {
-        date = new Date();
-      }
-      var y = date.getFullYear();
-      var m = date.getMonth() + 1;
-      var d = date.getDate() - 6;
-      if (d < 0) {
-        m = date.getMonth();
-        var d1 = new Date(y, m, 0);
-        var d2 = d1.getDate();
-        return y + '/' + (m < 10 ? '0' + m : m) + '/' + (d2 + d);
-      } else {
-        return y + '/' + (m < 10 ? '0' + m : m) + '/' + (d < 10 ? '0' + d : d);
-      }
-    },
-    getDay(day) {
-      var today = new Date();
-      var targetday_milliseconds = today.getTime() + 1000 * 60 * 60 * 24 * day;
-      today.setTime(targetday_milliseconds); //注意,这行是关键代码
-      var tYear = today.getFullYear();
-      var tMonth = today.getMonth();
-      var tDate = today.getDate();
-      tMonth = this.doHandleMonth(tMonth + 1);
-      tDate = this.doHandleMonth(tDate);
-      return tYear + '-' + tMonth + '-' + tDate;
-    },
-    doHandleMonth(month) {
-      var m = month;
-      if (month.toString().length == 1) {
-        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();
-    },
-    endTimeconfirm() {
-      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);
-    },
-    onSearch() {
-      this.pageNum = 1;
-      this.list = [];
-      this.getVisitsListFn();
-    },
-    getVisitsListFn() {
-      let loading1 = this.$toast.loading({
-        duration: 0,
-        message: '数据获取中...',
-        forbidClick: true,
-      });
-      if (this.refreshing) {
-        this.list = [];
-        this.refreshing = false;
-      }
-      getVisits({
-        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();
-        if (res.code == 200) {
-          this.loading = 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;
-        } else {
-          this.$toast.fail(res.msg);
-        }
-      });
-    },
-    regionClick() {
-      // if(this.powerGrade>4){
-      this.RegionShow = true;
-      // }
-    },
-    SalesRegionClick(val) {
-      // if(this.powerGrade>3){
-      this.SalesRegionShow = true;
-      // }
-    },
-    SalesDepartmentClick() {
-      // if(this.powerGrade>2){
-      this.SalesDepartmentShow = true;
-      // }
-    },
-    StaffClick() {
-      this.StaffShow = true;
-    },
-    StartTimeClick() {
-      this.StartTimeShow = true;
-    },
-    onregionConfirm(val) {
-      this.RegionShow = false;
-      this.companyName = val.deptName;
-      this.companyCode = val.deptId;
-      if (val.deptName == '全部公司') {
-        this.regionName = '全部大区';
-        this.regionCode = '';
-        this.deptName = '全部销售部';
-        this.deptCode = '';
-        this.userName = '全部业务员';
-        this.userCode = '';
-      } else {
-        this.deptList = [];
-        this.regionList = [];
-        this.userList = [];
-      }
-      this.getDeptInfo('dept', 'regionList');
-    },
-    onSalesRegionConfirm(val) {
-      this.SalesRegionShow = false;
-      this.regionName = val.deptName;
-      this.regionCode = val.deptId;
-      if (val.deptId != '') {
-        this.getDeptInfo('dept', 'deptList');
-      }
-      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', 'userList');
-      }
-      this.userName = '全部业务员';
-      this.userCode = '';
-    },
-    onStaffConfirm(val) {
-      this.StaffShow = false;
-      this.userName = val.nickName;
-      this.userCode = val.userId;
-    },
-    getDeptInfo(type, activaType, isFirstrequest = false) {
-      this.deptForm.type = type;
-      if (activaType == 'companyList') {
-        // 总部/公司
-        this.deptForm.parentId = '';
-      } else if (activaType == 'regionList') {
-        // 大区
-        this.deptForm.parentId = this.companyCode;
-      } else if (activaType == 'deptList') {
-        // 销售部
-        this.deptForm.parentId = this.regionCode;
-      } else if (activaType == 'userList') {
-        // 业务员
-        this.deptForm.parentId = this.deptCode;
-      }
-      getvisitDeptInfo(this.deptForm).then((res) => {
-        // 总部/公司 默认显示 “全部”;其他:默认显示第一个
-        if (isFirstrequest) {
-          if (this.powerGrade == 5) {
-            this.companyList = [{ deptName: '全部公司', deptId: '' }].concat(res.data.company);
-            // 初始化第一次请求 公司/总部身份 不需要请求大区、销售部、业务员数据
-            this.onSearch();
-          } else {
-            this.companyList = res.data.company;
-            this.companyName = res.data.company[0].deptName;
-            this.companyCode = res.data.company[0].deptId;
-            this.getDeptInfo('dept', 'regionList');
-          }
-        } else {
-          if (activaType == 'regionList') {
-            // 大区
-            this.regionName = res.data.region[0].deptName;
-            this.regionCode = res.data.region[0].deptId;
-            this.regionList = res.data.region;
-            this.getDeptInfo('dept', 'deptList');
-          } else if (activaType == 'deptList') {
-            // 销售部
-            this.deptName = res.data.dept[0].deptName;
-            this.deptCode = res.data.dept[0].deptId;
-            this.deptList = res.data.dept;
-            this.getDeptInfo('user', 'userList');
-          } else if (activaType == 'userList') {
-            // 业务员
-            this.userList = [{ nickName: '全部业务员', userId: '' }].concat(res.data.user);
-          }
-        }
-        // 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 {
-        //     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.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 = '';
-        //     }
-        //   }
-        // } else if (type == 'user') {
-        //   if (res.data.user != null) {
-        //     this.userList = [{ nickName: '全部业务员', userId: '' }].concat(res.data.user);
-        //   }
-        // }
-      });
-    },
-  },
-};
-</script>
-<style lang="scss">
-.searchDiv {
-  .van-search {
-    background: #fff;
-  }
-  .van-search__action {
-    font-size: 14px;
-    color: #1989fa;
-    font-weight: bold;
-    background: #f5f5f5;
-    border-bottom-right-radius: 60px;
-    border-top-right-radius: 60px;
-    border: 1px solid #ccc;
-    padding: 0 20px;
-  }
-
-  .van-search--show-action {
-    padding-right: 12px;
-  }
-
-  .van-search__content {
-    border: 1px solid #ccc;
-    border-bottom-left-radius: 60px;
-    border-top-left-radius: 60px;
-    background: #f5f5f5;
-    border-right: 0;
-  }
-}
-
-.myList1 {
-  .van-cell {
-    padding: 10px 16px;
-
-    &:after {
-      border-bottom: none;
-    }
-  }
-}
-.historAllVisit {
-  .TCFXListItem {
-    display: inline-block;
-    border: 1px solid #ccc;
-    padding: 3px 5px;
-    margin: 0 5px;
-    border-radius: 6px;
-  }
-}
-</style>
-<style lang="scss" scoped>
-.bgcolor {
-  background-color: #f5f5f5;
-}
-
-.container {
-  padding-bottom: 50px;
-}
-
-.monthNow {
-  height: 34px;
-  line-height: 34px;
-  text-align: left;
-  font-weight: bold;
-  padding: 0 16px;
-  box-sizing: border-box;
-  background-color: #f1f1f1;
-  border-radius: 20px;
-  margin: 8px;
-  border: 1px solid #ccc;
-  position: relative;
-  color: #333;
-  font-size: 14px;
-  .van-cell__left-icon,
-  .van-cell__right-icon {
-    line-height: 34px;
-  }
-  .CalendarIcon {
-    float: right;
-    font-size: 24px;
-    color: #1989fa;
-    margin-top: 6px;
-    position: absolute;
-    right: 12px;
-    img {
-      height: 0.8em;
-    }
-  }
-}
-.serchInput {
-  padding: 0 4px;
-}
-.selectcell {
-  width: 92%;
-}
-.card {
-  box-sizing: border-box;
-
-  .title {
-    font-size: 16px;
-    font-weight: bold;
-    color: #333;
-    line-height: 30px;
-    width: 78%;
-  }
-
-  .info {
-    font-size: 14px;
-    color: #909090;
-    line-height: 26px;
-  }
-}
-
-/**/
-.searcTime {
-  background-color: white;
-}
-.btnbox {
-  padding: 0 16px;
-}
-.cellcontent .centerBtn {
-  margin: 0 auto 10px;
-  display: block;
-  width: 92%;
-  border-radius: 5px;
-}
-
-.statstext {
-  background-color: #1c84c6;
-  position: absolute;
-  right: 0;
-  top: 16px;
-  padding: 2px 6px 2px 12px;
-  border-bottom-left-radius: 60px;
-  border-top-left-radius: 60px;
-  color: #fff;
-}
-
-.stateAbnormal {
-  position: absolute;
-  right: 0;
-  top: 0;
-  color: #fff;
-  background-color: red;
-  border-radius: 5px;
-  display: inline-block;
-  padding: 0 5px;
-}
-
-.state {
-  position: absolute;
-  right: 0;
-  top: 0;
-  color: #fff;
-  background-color: #1c84c6;
-  border-radius: 5px;
-  display: inline-block;
-  padding: 0 5px;
-}
-
-.navBarTOP {
-  position: fixed;
-  width: 100%;
-  z-index: 2;
-  top: 0;
-}
-.cellcontent .textRight {
-  float: right;
-  color: #0057ba;
-}
-</style>

+ 0 - 698
src/views/historicalVisit/historAllVisit copy.vue

@@ -1,698 +0,0 @@
-<template>
-  <div class="bgcolor historAllVisit">
-    <div class="navBarTOP">
-      <!--        顶部条-->
-      <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-col>
-          <van-col span="12">
-            <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-col>
-          <van-col span="12">
-            <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" />
-            </div>
-          </van-col>
-          <van-col span="12">
-            <div class="monthNow" @click="endTimeshow = true">
-              <span class="month">{{ endTime }}</span>
-              <van-icon class="CalendarIcon" :name="timeico" />
-            </div>
-          </van-col>
-        </van-row>
-      </div>
-      <div class="searchDiv">
-        <van-search v-model="storeName" show-action placeholder="搜索名称/编号/地址/拜访人">
-          <template #action>
-            <div @click="onSearch">搜索</div>
-          </template>
-        </van-search>
-      </div>
-      <div class="lineGrey"></div>
-    </div>
-    <!--        主体内容-->
-    <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>
-              <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
-                  >)
-                </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" v-if="item.dwellTime">拜访时长:{{ item.dwellTime }}</div>
-                <div class="info">地址:{{ item.addressLine }}</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>
-      </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"/>-->
-    </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" />
-    </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" />
-    </van-popup>
-    <van-popup v-model="RegionShow" capture position="bottom">
-      <van-picker
-        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" />
-    </van-popup>
-    <van-popup v-model="SalesDepartmentShow" capture position="bottom">
-      <van-picker
-        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" />
-    </van-popup>
-  </div>
-</template>
-
-<script>
-import { getVisits, getvisitDeptInfo } from '@/api/index';
-import timeico from '@/assets/Icon/datatims.png';
-
-export default {
-  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',
-      ],
-      calendarIsshow: false,
-      tabVal: 'insidePlan',
-      list: [],
-      loading: false,
-      finished: true,
-      listActive: null,
-      query: '',
-      show: false,
-      minDate: new Date(2022, 0, 1),
-      maxDate: new Date(),
-      currentDate: new Date(),
-      startcurrentDate: new Date(),
-      endminDate: new Date(),
-      startmaxDate: new Date(),
-      endTime: '',
-      startTime: '',
-      endTimeshow: false,
-      startTimeshow: false,
-      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类型
-      deptLevel: null,
-    };
-  },
-  activated() {
-    this.deptLevel = localStorage.getItem('deptLevel');
-    this.onSearch();
-  },
-  created() {
-    this.info();
-    this.userList = [];
-    this.pageNum = 1;
-    this.list = [];
-    // powerGrade:等级(1-销售员 2-销售部主管 3-大区主管 4-区域公司总经理 5-DIY公司)
-    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);
-    }
-  },
-  methods: {
-    onLoad() {
-      // this.loading = false;
-      this.getVisitsListFn();
-    },
-    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));
-    },
-    detilsFn(val) {
-      this.$router.push({
-        path: '/historicalDetails',
-        query: {
-          visitId: val.id,
-          storeId: val.storeId,
-          storeCode: val.storeCode,
-          taskId: val.taskId,
-          userId: val.userId,
-          storeCategory: val.storeCategory,
-        },
-      });
-    },
-    timeBefore7(date) {
-      if (!date) {
-        date = new Date();
-      }
-      var y = date.getFullYear();
-      var m = date.getMonth() + 1;
-      var d = date.getDate() - 6;
-      if (d < 0) {
-        m = date.getMonth();
-        var d1 = new Date(y, m, 0);
-        var d2 = d1.getDate();
-        return y + '/' + (m < 10 ? '0' + m : m) + '/' + (d2 + d);
-      } else {
-        return y + '/' + (m < 10 ? '0' + m : m) + '/' + (d < 10 ? '0' + d : d);
-      }
-    },
-    getDay(day) {
-      var today = new Date();
-      var targetday_milliseconds = today.getTime() + 1000 * 60 * 60 * 24 * day;
-      today.setTime(targetday_milliseconds); //注意,这行是关键代码
-      var tYear = today.getFullYear();
-      var tMonth = today.getMonth();
-      var tDate = today.getDate();
-      tMonth = this.doHandleMonth(tMonth + 1);
-      tDate = this.doHandleMonth(tDate);
-      return tYear + '-' + tMonth + '-' + tDate;
-    },
-    doHandleMonth(month) {
-      var m = month;
-      if (month.toString().length == 1) {
-        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();
-    },
-    endTimeconfirm() {
-      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);
-    },
-    onSearch() {
-      this.pageNum = 1;
-      this.list = [];
-      this.getVisitsListFn();
-    },
-    getVisitsListFn() {
-      let loading1 = this.$toast.loading({
-        duration: 0,
-        message: '数据获取中...',
-        forbidClick: true,
-      });
-      if (this.refreshing) {
-        this.list = [];
-        this.refreshing = false;
-      }
-      getVisits({
-        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();
-        if (res.code == 200) {
-          this.loading = 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;
-        } else {
-          this.$toast.fail(res.msg);
-        }
-      });
-    },
-    regionClick() {
-      // if(this.powerGrade>4){
-      this.RegionShow = true;
-      // }
-    },
-    SalesRegionClick(val) {
-      // if(this.powerGrade>3){
-      this.SalesRegionShow = true;
-      // }
-    },
-    SalesDepartmentClick() {
-      // if(this.powerGrade>2){
-      this.SalesDepartmentShow = true;
-      // }
-    },
-    StaffClick() {
-      this.StaffShow = true;
-    },
-    StartTimeClick() {
-      this.StartTimeShow = true;
-    },
-    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);
-    },
-    onSalesRegionConfirm(val) {
-      this.SalesRegionShow = false;
-      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 = [];
-    },
-    onSalesDepartmentConfirm(val) {
-      this.SalesDepartmentShow = false;
-      this.deptName = val.deptName;
-      this.deptCode = val.deptId;
-      if (val.deptId != '') {
-        this.getDeptInfo('user');
-      }
-      this.userName = '全部业务员';
-      this.userCode = '';
-    },
-    onStaffConfirm(val) {
-      this.StaffShow = false;
-      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 = '';
-        }
-      } 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);
-            }
-          } 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;
-            }
-            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.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);
-          }
-        }
-      });
-    },
-  },
-};
-</script>
-<style lang="scss">
-.searchDiv {
-  .van-search {
-    background: #fff;
-  }
-  .van-search__action {
-    font-size: 14px;
-    color: #1989fa;
-    font-weight: bold;
-    background: #f5f5f5;
-    border-bottom-right-radius: 60px;
-    border-top-right-radius: 60px;
-    border: 1px solid #ccc;
-    padding: 0 20px;
-  }
-
-  .van-search--show-action {
-    padding-right: 12px;
-  }
-
-  .van-search__content {
-    border: 1px solid #ccc;
-    border-bottom-left-radius: 60px;
-    border-top-left-radius: 60px;
-    background: #f5f5f5;
-    border-right: 0;
-  }
-}
-
-.myList1 {
-  .van-cell {
-    padding: 10px 16px;
-
-    &:after {
-      border-bottom: none;
-    }
-  }
-}
-.historAllVisit {
-  .TCFXListItem {
-    display: inline-block;
-    border: 1px solid #ccc;
-    padding: 3px 5px;
-    margin: 0 5px;
-    border-radius: 6px;
-  }
-}
-</style>
-<style lang="scss" scoped>
-.bgcolor {
-  background-color: #f5f5f5;
-}
-
-.container {
-  padding-bottom: 50px;
-}
-
-.monthNow {
-  height: 34px;
-  line-height: 34px;
-  text-align: left;
-  font-weight: bold;
-  padding: 0 16px;
-  box-sizing: border-box;
-  background-color: #f1f1f1;
-  border-radius: 20px;
-  margin: 8px;
-  border: 1px solid #ccc;
-  position: relative;
-  color: #333;
-  font-size: 14px;
-  .van-cell__left-icon,
-  .van-cell__right-icon {
-    line-height: 34px;
-  }
-  .CalendarIcon {
-    float: right;
-    font-size: 24px;
-    color: #1989fa;
-    margin-top: 6px;
-    position: absolute;
-    right: 12px;
-    img {
-      height: 0.8em;
-    }
-  }
-}
-.serchInput {
-  padding: 0 4px;
-}
-.selectcell {
-  width: 92%;
-}
-.card {
-  box-sizing: border-box;
-
-  .title {
-    font-size: 16px;
-    font-weight: bold;
-    color: #333;
-    line-height: 30px;
-    width: 78%;
-  }
-
-  .info {
-    font-size: 14px;
-    color: #909090;
-    line-height: 26px;
-  }
-}
-
-/**/
-.searcTime {
-  background-color: white;
-}
-.btnbox {
-  padding: 0 16px;
-}
-.cellcontent .centerBtn {
-  margin: 0 auto 10px;
-  display: block;
-  width: 92%;
-  border-radius: 5px;
-}
-
-.statstext {
-  background-color: #1c84c6;
-  position: absolute;
-  right: 0;
-  top: 16px;
-  padding: 2px 6px 2px 12px;
-  border-bottom-left-radius: 60px;
-  border-top-left-radius: 60px;
-  color: #fff;
-}
-
-.stateAbnormal {
-  position: absolute;
-  right: 0;
-  top: 0;
-  color: #fff;
-  background-color: red;
-  border-radius: 5px;
-  display: inline-block;
-  padding: 0 5px;
-}
-
-.state {
-  position: absolute;
-  right: 0;
-  top: 0;
-  color: #fff;
-  background-color: #1c84c6;
-  border-radius: 5px;
-  display: inline-block;
-  padding: 0 5px;
-}
-
-.navBarTOP {
-  position: fixed;
-  width: 100%;
-  z-index: 2;
-  top: 0;
-}
-.cellcontent .textRight {
-  float: right;
-  color: #0057ba;
-}
-</style>

+ 5 - 2
src/views/historicalVisit/hisvistdeils.vue

@@ -141,7 +141,9 @@
             <!--padding:10px 0;text-align: right">{{item.collectionOptionList[0].collectionOption}}</p>-->
             <delete-upload-img :imgs="item.fileInfoList"></delete-upload-img>
           </div>
-          <div class="formLabel z-cell z-cells" v-if="item.answerType == 'wb'">
+          <div
+            class="formLabel z-cell z-cells"
+            v-if="item.answerType == 'wb' || item.answerType == 'dhwb'">
             <van-cell>
               <template #title>
                 {{ index + 1 }}.{{ item.collectionName }}
@@ -419,7 +421,8 @@ export default {
               collectionItemLists[q].answerType == 'date' ||
               collectionItemLists[q].answerType == 'tel_send_code' ||
               collectionItemLists[q].answerType == 'check_code' ||
-              collectionItemLists[q].answerType == 'nyr'
+              collectionItemLists[q].answerType == 'nyr' ||
+              collectionItemLists[q].answerType == 'dhwb'
             ) {
               collectionItemLists[q].answerValue =
                 collectionItemLists[q].collectionOptionList[0].answerValue;

+ 535 - 0
src/views/home/HomeTarget.vue

@@ -0,0 +1,535 @@
+<template>
+  <div class="ABtarage">
+    <p class="updataTime">更新时间:{{ updataTime }}</p>
+    <template>
+      <div class="container linep">
+        <van-collapse v-model="activeNames">
+          <div v-for="(homePageItem, index) in homePageIndicatorList" :key="index">
+            <van-collapse-item v-if="homePageItem.labelStyle==1" :name="(index + 1).toString()" :title="homePageItem.name">
+              <van-row>
+                <!-- 动态渲染标题栏 -->
+                <div v-for="(periodItem, periodIndex) in homePageItem.children" :key="'title-' + periodIndex">
+                  <van-col span="12">
+                    <span :class="periodIndex % 2 === 0 ? 'leftTitle' : 'rightTitle'">{{ periodItem.name }}</span>
+                  </van-col>
+                </div>
+
+                <!-- 动态渲染指标项 -->
+                <div v-if="homePageItem.children.length >= 2">
+                  <!-- 遍历第一个周期的所有指标 -->
+                  <div v-for="(metric, metricIndex) in homePageItem.children[0].children" :key="'metric-' + metricIndex">
+                    <!-- 左侧指标 -->
+                    <van-col span="12">
+                      <p>
+                        {{ metric.name }}:
+                        <span class="colorblack">
+                          <template v-if="metric.indicatorUnit === '%'">{{ metric.indicatorValue }}%</template>
+                          <template v-else>
+                            {{ Micrometer(metric.indicatorValue) }}
+                            {{ metric.indicatorUnit }}
+                          </template>
+                        </span>
+                      </p>
+                    </van-col>
+                    <!-- 对应右侧指标 -->
+                    <van-col span="12">
+                      <p>
+                        {{ homePageItem.children[1]?.children[metricIndex]?.name || '-' }}:
+                        <span class="colorblack">
+                          <template v-if="homePageItem.children[1]?.children[metricIndex]?.indicatorUnit === '%'">
+                            {{ homePageItem.children[1]?.children[metricIndex]?.indicatorValue }}%
+                          </template>
+                          <template v-else>
+                            {{ Micrometer(homePageItem.children[1]?.children[metricIndex]?.indicatorValue) }}
+                            {{ homePageItem.children[1]?.children[metricIndex]?.indicatorUnit }}
+                          </template>
+                        </span>
+                      </p>
+                    </van-col>
+                  </div>
+                </div>
+              </van-row>
+            </van-collapse-item>
+            <van-collapse-item v-if="homePageItem.labelStyle==2" :name="(index + 1).toString()" :title="homePageItem.name">
+              <!-- 外层循环:遍历主要类别 -->
+              <van-row v-for="(category, index) in homePageItem.children" :key="index"
+                :style="{ marginTop: index > 0 ? '10px' : '0' }">
+                <van-col span="24">
+                  <span :class="index % 2 === 0 ? 'leftTitle' : 'rightTitle'">{{ category.name }}</span>
+                </van-col>
+
+                <!-- 内层循环:遍历各个统计项 -->
+                <div v-for="(item, idx) in category.children" :key="idx">
+                  <van-col :span="idx == 0 ? 24 : 12">
+                    <p>
+                      {{ item.name }}:<span :style="labelStyle(item.clickable)" @click="onClick(item.clickable)" class="colorbalck">{{ Micrometer(item.indicatorValue) }}{{
+                        item.indicatorUnit }}</span>
+                    </p>
+                  </van-col>
+                </div>
+              </van-row>
+            </van-collapse-item>
+            <van-collapse-item v-if="homePageItem.labelStyle==3" :name="(index + 1).toString()" :title="homePageItem.name">
+              <!-- 外层循环:遍历主要类别 -->
+              <van-row v-for="(category, index) in homePageItem.children" :key="index"
+                :style="{ marginTop: index == 0 ? '-10px' : '0' }">
+                <!-- 内层循环:遍历各个统计项 -->
+                <div v-for="(item, idx) in category.children" :key="idx">
+                  <van-col :span="idx == 0 ? 24 : 12">
+                    <p>
+                      {{ item.name }}:<span :style="labelStyle(item.clickable)" @click="onClick(item.clickable)" class="colorbalck">{{ Micrometer(item.indicatorValue) }}{{
+                        item.indicatorUnit }}</span>
+                    </p>
+                  </van-col>
+                </div>
+              </van-row>
+            </van-collapse-item>
+          </div>
+
+        </van-collapse>
+      </div>
+    </template>
+  </div>
+</template>
+
+<script>
+import store from '@/store';
+import {
+  userTodayPlanNum,
+  getReportInfo,
+} from '@/api/index';
+export default {
+  name: 'home',
+  props: {
+    tabVal: {
+      type: [String, Number],
+      default: '-1',
+    },
+  },
+  data() {
+    return {
+      shows: true,
+      show: true,
+      num: 0,
+      todayGoal: {},
+      progressWidth: 0,
+      updataTime: '',
+      activeNames: [
+        '1',
+        '2',
+        '3',
+        '4',
+        '5',
+        '6',
+        '7',
+        '8',
+        '10',
+        '11',
+        '12',
+        '16',
+        '17',
+        '20',
+        '21',
+        '22',
+        '23',
+        '24',
+        '25',
+        '26',
+        '27',
+        '28',
+        '29',
+        '30',
+        '31',
+        '32',
+        '33',
+        '34',
+        '35',
+        '36',
+        '37',
+        '38',
+        '39',
+        '40',
+        '41',
+        '42',
+        '43',
+      ],
+      activeNameType: [],
+      powerGradeShow: false,
+      showButton: false,
+      isCommit: null,
+      powerGrade: '2',
+      deptLevel: '',
+      // positionId:等级(1-销售员 2-销售部主管 3-大区主管 4-区域公司总经理 5-DIY公司)
+      reportTargetAll: {},
+      homePageIndicatorList: [],
+      approvalPendingNum: 0,
+      isDiy: false,
+      approvalButton: false,
+      times: 5,
+      timer: null,
+      type: '-1',
+      monthNoVisit: {},
+      flag: true,
+      reportInfoData: {},
+      applyNumber: '',
+      proccessPendingNum: 0,
+      JZQuota: false,
+      GZdata: false,
+    };
+  },
+  watch: {
+    tabVal: {
+      handler(val) {
+        if (val == 2) {
+          // keep-alive 模式watch执行了两次
+          this.initData();
+        }
+      },
+      immediate: true,
+    },
+  },
+  methods: {
+    labelStyle(val) {
+      return {
+        'text-decoration': val == 1 ? 'underline' : 'none',
+        color: val == 1 ? '#0057ba' : '#666666',
+      };
+    },
+    // 跳转详情
+    onClick(val) {
+      if(val==1){
+        store.dispatch('setActivaTypeStore', 'FuWuShang');
+        this.$router.push({ path: '/noVisit' });
+      }
+    },
+    initData() {
+      console.log(this.tabVal);
+      this.getReportInfo();
+      this.userTodayPlanNum();
+    },
+    getReportInfo() {
+      let loading1 = this.$toast.loading({
+        duration: 0,
+        message: '加载中...',
+        forbidClick: true,
+      });
+      getReportInfo({ isContent: false }).then((res) => {
+        if (res.code == 200) {
+          loading1.clear();
+          localStorage.setItem('powerGrade', res.data.positionId);
+          localStorage.setItem('userDeptLevel', res.data.userDeptLevel);
+          localStorage.setItem('isDiy', res.data.diy);
+          localStorage.setItem('uType', res.data.userType);
+          localStorage.setItem('jzType', res.data.jzType);
+          localStorage.setItem('customerVisits', res.data.customerManagerVisits);
+          localStorage.setItem('postType', res.data.postType);
+          if (res.data.homePageIndicatorList != null) {
+            this.homePageIndicatorList = res.data.homePageIndicatorList;
+            this.updataTime = res.data.homePageIndicatorUpdateTime;
+          }
+          this.type = res.data.userType;
+        } else {
+          this.$toast(res.msg);
+        }
+      });
+    },
+    userTodayPlanNum() {
+      localStorage.setItem('outvstoreName', '');
+      localStorage.setItem('outvchainName', '');
+      localStorage.removeItem('outvstoreLabelTypes');
+      localStorage.removeItem('outvstoreCategoryList');
+      localStorage.setItem('outvchainCode', '');
+      localStorage.setItem('outvstoreName', '');
+      localStorage.setItem('deviveStoreName', '');
+      localStorage.setItem('outvsortType', '');
+      localStorage.setItem('outsortParam', '');
+      localStorage.setItem('lat', '');
+      localStorage.setItem('lon', '');
+      userTodayPlanNum().then((res) => {
+        if (res.code == 200) {
+          this.todayGoal = res.data;
+          this.progressWidth = (this.todayGoal.finishNum / this.todayGoal.planNum) * 100 + '%';
+          localStorage.setItem('nickName', res.data.user.nickName);
+          localStorage.setItem('postName', res.data.user.postName);
+          localStorage.setItem('zipPhoto', res.data.zipPhoto);
+          localStorage.setItem('storeType', res.data.user.type);
+          localStorage.setItem('deptLevel', res.data.user.depts[0].deptLevel);
+          localStorage.setItem('userId', res.data.user.userId);
+          localStorage.setItem('deptIds', JSON.stringify(res.data.user.deptIds));
+          this.monthNoVisit = res.data.monthNoVisit;
+        } else {
+          this.$toast(res.msg);
+        }
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+.homeTitle {
+  padding: 6px 16px;
+}
+
+.homeTitle .van-icon__image {
+  width: 1.4em;
+  height: auto;
+}
+
+.container {
+  margin: 10px;
+}
+
+.container .van-collapse-item {
+  margin-bottom: 10px;
+  border-radius: 6px;
+  overflow: hidden;
+}
+
+.progressContentlist {
+  font-size: 14px;
+  border-bottom: 1px dashed #f1f1f1;
+  padding: 10px 0;
+}
+
+.linep p {
+  margin: 10px 0 0 0;
+  font-size: 14px;
+  color: #666;
+}
+
+.leftTitle {
+  background-color: #74a4d9;
+  color: #fff;
+  display: inline-block;
+  padding: 0 4px;
+  border-radius: 2px;
+}
+
+.rightTitle {
+  background-color: #e7b4bb;
+  color: #fff;
+  display: inline-block;
+  padding: 0 4px;
+  border-radius: 2px;
+  white-space: nowrap;
+}
+</style>
+<style lang="scss">
+.myTab .van-tabs__nav--card {
+  margin: 0 !important;
+  border-left: 0;
+  border-right: 0;
+}
+
+.myTab .van-tabs__wrap,
+.van-tabs__nav--card {
+  height: 39px;
+}
+
+.myTab .van-tab {
+  line-height: 40px;
+}
+
+.linep .van-collapse-item__content {
+  color: #666;
+}
+
+.linep .van-collapse-item__content {
+  color: #666;
+}
+
+.linep .van-cell__title {
+  color: #1e5398;
+  font-weight: 500;
+  font-size: 16px;
+}
+
+.homeCellIcon {
+  line-height: 34px;
+}
+
+.homeTitle .van-cell__title {
+  color: #444;
+  font-size: 16px;
+  font-weight: bold;
+  padding-left: 4px;
+  line-height: 36px;
+  height: 36px;
+}
+
+.updataTime {
+  color: #999;
+  font-size: 12px;
+  text-align: center;
+}
+
+.homeTitle .van-tag--danger {
+  /* border-radius: 20px; */
+}
+
+.van-dialog__confirm,
+.van-dialog__confirm:active {
+  color: #0057ba;
+}
+
+.tipTitleBox p {
+  margin: 0;
+  line-height: 28px;
+  color: #555;
+}
+
+.tipTitleBox .p {
+  color: #555;
+  font-size: 16px;
+  border-bottom: 1px solid #f5f5f5;
+  margin: 0;
+  margin-bottom: 10px;
+  text-align: center;
+  padding: 14px 0px;
+}
+
+.storeTypeHome .van-collapse-item__content {
+  padding: 0;
+}
+
+.storeTypeHome .storeTypeHomeList .van-cell__title {
+  color: #4a4a4a;
+  font-size: 14px;
+}
+
+.storeTypeHome .monthNoVisit {
+  padding: 10px;
+  margin: 10px;
+  border-radius: 5px;
+  background-color: #ebf4ff;
+}
+
+.storeTypeHome .leftContent {
+  padding-right: 68px;
+  position: relative;
+}
+
+.storeTypeHome .monthNoVisitStatstext {
+  font-size: 12px;
+  background-color: #0057ba;
+  position: absolute;
+  right: 0;
+  top: 6px;
+  padding: 2px 6px 2px 12px;
+  border-bottom-left-radius: 60px;
+  border-top-left-radius: 60px;
+  color: #fff;
+}
+
+.ABtarage {
+  .table-headermd {
+    font-size: 12px;
+    text-align: center;
+    position: initial;
+    width: 98% !important;
+    margin: 0 auto;
+    border-right: 0;
+  }
+
+  .table-headermdhome {
+    font-size: 14px;
+  }
+
+  .table-headermdhome th.el-table__cell>.cell {
+    white-space: pre;
+  }
+
+  .table-headermd .el-table__header,
+  .table-headermd .el-table__body {
+    width: 100% !important;
+  }
+
+  .table-headermdhome.van-cell {
+    padding: 0 6px;
+    height: 100%;
+  }
+
+  .table-headermd th.el-table__cell>.cell {
+    padding: 0 4px;
+    text-align: center;
+  }
+
+  .table-headermdhometh.el-table__cell:first-child>.cell {
+    text-align: left;
+  }
+
+  .table-headermd th.el-table__cell {
+    background-color: #1989fa;
+    color: #fff;
+  }
+
+  .table-headermdhome th.el-table__cell {
+    background-color: #fff;
+    color: #444;
+  }
+
+  .table-headermd .el-table__cell {
+    padding: 4px 0;
+  }
+
+  .table-headermdhome.el-table .cell {
+    padding: 0 4px;
+    text-align: center;
+  }
+
+  .table-headermdhome .tipTitle {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp: 2;
+    text-align: center;
+  }
+
+  .table-headermd::before {
+    height: 0;
+  }
+
+  .table-headermd .cell,
+  .el-table--border .el-table__cell:first-child .cell {
+    padding: 0 4px;
+  }
+}
+
+.colBack {
+  width: 100%;
+  height: 100%;
+  display: block;
+  /* overflow: unset; */
+  position: relative;
+  z-index: 2;
+  float: left;
+  z-index: 2;
+
+  .back {
+    position: absolute;
+    background: rgb(226, 240, 217);
+    height: 100%;
+    display: block;
+    overflow: hidden;
+    /* z-index: 1; */
+    border-radius: 12px;
+    bottom: -4px;
+  }
+
+  .backLeft {
+    width: 45%;
+    left: -12px;
+  }
+
+  .backRight {
+    width: 50%;
+    left: calc(50% - 12px);
+  }
+
+  .van-col {
+    position: relative;
+    z-index: 3;
+  }
+}
+</style>

+ 1 - 1
src/views/home/bottomBtn.vue

@@ -233,7 +233,7 @@ export default {
         color: #99443b;
         font-weight: bold;
         display: flex;
-        align-items: end;
+        align-items: flex-end;
         padding-top: 40px;
         position: relative;
         img {

+ 2 - 0
src/views/home/hintTabPage/noVisit.vue

@@ -100,6 +100,8 @@ export default {
         type = '同城分销-涂料店';
       } else if (value == 'QiTa') {
         type = '同城分销-其他店';
+      }else if (value == 'FuWuShang') {
+        type = '服务商';
       }
       return type;
     },

+ 31 - 15
src/views/home/index.vue

@@ -8,19 +8,22 @@
         type="card"
         v-model="tabVal"
         color="#0057ba"
-        @click="onClickTabs"
-        v-if="isGZorJZ">
-        <van-tab title="提示类" name="-1" v-if="isGZorJZ == 'false'">
+        @click="onClickTabs">
+
+        <van-tab title="提示类" name="-1" v-if="isGZorJZ == 'false' && onlyShowHomeTarget == 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">
+        <van-tab title="A类指标" name="0" v-if="onlyShowHomeTarget == false">
           <ABtarget :tabVal="tabVal" ref="Atarget"></ABtarget>
         </van-tab>
-        <van-tab title="B类指标" name="1">
+        <van-tab title="B类指标" name="1" v-if="onlyShowHomeTarget == false">
           <ABtarget :tabVal="tabVal" ref="Btarget"></ABtarget>
         </van-tab>
+        <van-tab title="首页指标" name="2" v-if="onlyShowHomeTarget == true">
+          <HomeTarget :tabVal="tabVal" ref="HomeTarget"></HomeTarget>
+        </van-tab>
       </van-tabs>
       <div class="bottomBtn">
         <bottomBtn :tabVal="tabVal" ref="bottomBtn"></bottomBtn>
@@ -46,12 +49,13 @@ import { getReportInfo, getDictOption, buryingPoint } from '@/api/index';
 import hintTabPage from './hintTabPage/index.vue';
 import tabBar from '@/components/tabBar';
 import ABtarget from './ABtarget.vue';
+import HomeTarget from './HomeTarget.vue';
 import { mapState } from 'vuex';
 import bottomBtn from './bottomBtn.vue';
 import { WXdigest } from '@/utils/digest';
 export default {
   name: 'home',
-  components: { tabBar, hintTabPage, ABtarget, bottomBtn },
+  components: { tabBar, hintTabPage, ABtarget, HomeTarget, bottomBtn },
   computed: {
     ...mapState({
       userInfo: (state) => state.user.userInfo,
@@ -62,6 +66,7 @@ export default {
       tabVal: '-1',
       hintTabPageIndex: 0,
       isGZorJZ: null,
+      onlyShowHomeTarget: false,
       isLoading: false,
       setSIcontyle: {
         bottom: '85px',
@@ -109,15 +114,21 @@ export default {
       this.isLoading = false;
     },
     async getDict(isRefresh) {
-      let postType = this.userInfo.postType;
-      // postType:人员类型,JZ(家装)、GZ(公装)、YF(应服)、DIY(DIY)
-      if (postType == 'JZ' || postType == 'GZ') {
-        localStorage.setItem('isGZorJZ', 'true');
-        this.isGZorJZ = 'true';
-      } else {
-        localStorage.setItem('isGZorJZ', 'false');
-        this.isGZorJZ = 'false';
-      }
+      let postName = this.userInfo.postName;
+      if (postName == '质感销售负责人' || postName == '质感销售专员') {
+        this.onlyShowHomeTarget = true;
+      }else {
+        this.onlyShowHomeTarget = false;
+        let postType = this.userInfo.postType;
+        // postType:人员类型,JZ(家装)、GZ(公装)、YF(应服)、DIY(DIY)
+        if (postType == 'JZ' || postType == 'GZ') {
+          localStorage.setItem('isGZorJZ', 'true');
+          this.isGZorJZ = 'true';
+        } else {
+          localStorage.setItem('isGZorJZ', 'false');
+          this.isGZorJZ = 'false';
+        }
+      } 
       // 家装或工装不显示提示类tab
       this.$nextTick(() => {
         // 刷新状态
@@ -135,6 +146,8 @@ export default {
           if (this.$refs.Atarget) this.$refs.Atarget.initData();
         } else if (this.tabVal == '1') {
           if (this.$refs.Btarget) this.$refs.Btarget.initData();
+        }else if (this.tabVal == '2') {
+          if (this.$refs.HomeTarget) this.$refs.HomeTarget.initData();
         }
       });
     },
@@ -147,6 +160,9 @@ export default {
         if (this.tabVal == '1') {
           if (this.$refs.Btarget) this.$refs.Btarget.initData();
         }
+        if (this.tabVal == '2') {
+          if (this.$refs.HomeTarget) this.$refs.HomeTarget.initData();
+        }
       });
     },
     onClickLeft() {

+ 171 - 35
src/views/storeManagement/JPattributeEditor.vue

@@ -15,25 +15,26 @@
               size="small"
               style="color: white; background: rgb(0, 87, 186); border-radius: 6px"
               @click="sendCode(detail.ownerMobile)"
-              :disabled="time != null">
-              <span v-if="time">已发送({{ timeNum }})</span>
-              <span v-else>发送验证码</span>
+              :disabled="telConfirm">
+              <span v-if="telConfirm">已确认</span>
+              <span v-else>确认真实</span>
             </van-button>
           </template>
         </van-field>
-        <van-field
+        <span style="color: #ee0a24;font-size: 12px;">为了不打扰金牌店老板,不再发送短信验证码,请务必确认手机号正确无误!</span>
+        <!-- <van-field
           v-model="verificationVal"
           label="主经营者收到的验证码"
           placeholder="请输入验证码"
           type="number"
           @blur="verification(verificationVal)"
-          v-if="!verifyMobile" />
-        <van-field v-model="detail.ownerName" label="主经营者姓名" />
-        <van-field
+          v-if="!verifyMobile" /> -->
+        <van-field v-model="detail.ownerName" :error-message="ownerNameMsg" label="主经营者姓名" />
+        <!-- <van-field
           v-model="detail.ownerBirthday"
           label="主经营者出生日期"
           placeholder="请输入主经营者出生日期"
-          @click="getNyr('ownerBirthday', detail.ownerBirthday)" />
+          @click="getNyr('ownerBirthday', detail.ownerBirthday)" /> -->
         <van-field autosize type="textarea" label="主营/擅长经营品类">
           <template #input>
             <van-checkbox-group v-model="detail.mainProductCategorys" direction="horizontal">
@@ -50,9 +51,19 @@
         <van-field
           v-model="detail.totalSalesAmount"
           type="number"
-          label="门店24年总进货额(含所有品牌品类)" />
-        <van-field v-model="detail.performanceRatio" type="number" label="门店立邦业绩占比(%)" />
-        <van-field v-model="detail.mainBrand" autosize type="textarea" label="门店主营TOP3品牌" />
+          :error-message="totalSalesAmountMsg"
+          label="门店24年总进货额(含所有品牌品类,单位:万元)" />
+        <van-field
+          v-model="detail.performanceRatio"
+          type="number"
+          :error-message="performanceRatioMsg"
+          label="门店立邦业绩占比(单位:%)" />
+        <van-field
+          v-model="detail.mainBrand"
+          autosize
+          type="textarea"
+          :error-message="mainBrandMsg"
+          label="门店主营TOP3品牌" />
         <van-field label="是否有工地资源(支持工地配送,承接工地双包等)">
           <template #input>
             <van-radio-group
@@ -68,6 +79,7 @@
           v-if="detail.constructionResource == '是'"
           v-model="detail.constructionYearNum"
           type="number"
+          :error-message="constructionYearNumMsg"
           label="年工地数量" />
         <van-field label="是否有双包能力">
           <template #input>
@@ -90,10 +102,10 @@
           </template>
         </van-field>
         <van-field v-model="detail.emergencyContact" label="紧急联系人姓名" />
-        <van-field
+        <!-- <van-field
           v-model="detail.emergencyContactBirthday"
           label="紧急联系人出生日期"
-          @click="getNyr('emergencyContactBirthday', detail.emergencyContactBirthday)" />
+          @click="getNyr('emergencyContactBirthday', detail.emergencyContactBirthday)" /> -->
         <van-field
           v-model="detail.emergencyContactMobile"
           type="number"
@@ -129,6 +141,11 @@ export default {
   name: 'JPattributeEditor',
   data() {
     return {
+      ownerNameMsg: '',
+      totalSalesAmountMsg: '',
+      performanceRatioMsg: '',
+      mainBrandMsg: '',
+      constructionYearNumMsg: '',
       detail: null,
       time: null, //计时
       timeNum: 60,
@@ -144,9 +161,16 @@ export default {
       currentDate: new Date(1945, 0, 1),
       mobileStatus: '0',
       verifyMobile: false, //手机号是否验证透通过
+      telConfirm: false,
     };
   },
   activated() {
+    this.telConfirm = false;
+    this.ownerNameMsg = '';
+    this.totalSalesAmountMsg = '';
+    this.performanceRatioMsg = '';
+    this.mainBrandMsg = '';
+    this.constructionYearNumMsg = '';
     this.detail = null;
     this.verificationVal = '';
     if (this.time) clearInterval(this.time);
@@ -179,8 +203,8 @@ export default {
             : [];
           this.detail = res.data;
           this.mobileStatus = res.data.mobileStatus;
-          // mobileStatus 1是 是否验证通过
-          if (res.data.mobileStatus == '1') {
+          // mobileStatus  是否验证通过 1,2是
+          if (res.data.mobileStatus == '1' || res.data.mobileStatus == '2') {
             this.verificationPassedPhoneNum = this.detail.ownerMobile;
           }
           // 验证码和发送按钮是否显示
@@ -194,7 +218,11 @@ export default {
         return;
       }
       if (tel != this.verificationPassedPhoneNum) {
+        this.telConfirm = false;
         this.verifyMobile = false;
+      } else {
+        this.telConfirm = false;
+        this.verifyMobile = true;
       }
     },
     // 发送验证码
@@ -203,26 +231,29 @@ export default {
         this.$toast('格式错误');
         return;
       }
-      if (this.time) return;
-      clearInterval(this.time);
-      this.timeNum = 60;
-      this.sendCodeFun(
-        {
-          type: '1', //String	调用类型:1:发送验证码 2:校验验证码
-          phone: val, //String	手机号
-          verification: '', //String	手机号验证码
-        },
-        () => {
-          this.time = setInterval(() => {
-            this.timeNum--;
-            if (this.timeNum <= 0) {
-              clearInterval(this.time);
-              this.time = null;
-            }
-          }, 1000);
-          this.$toast('发送成功');
-        }
-      );
+      this.telConfirm = true;
+      this.verificationPassedPhoneNum = val;
+      this.$toast('验证成功');
+      // if (this.time) return;
+      // clearInterval(this.time);
+      // this.timeNum = 60;
+      // this.sendCodeFun(
+      //   {
+      //     type: '1', //String	调用类型:1:发送验证码 2:校验验证码
+      //     phone: val, //String	手机号
+      //     verification: '', //String	手机号验证码
+      //   },
+      //   () => {
+      //     this.time = setInterval(() => {
+      //       this.timeNum--;
+      //       if (this.timeNum <= 0) {
+      //         clearInterval(this.time);
+      //         this.time = null;
+      //       }
+      //     }, 1000);
+      //     this.$toast('发送成功');
+      //   }
+      // );
     },
     sendCodeFun(params, callback) {
       sendAndCheckVerCode(params).then((res) => {
@@ -267,6 +298,97 @@ export default {
       //   this.detail.ownerBirthday = this.parseTime(time, '{y}-{m}-{d}');
       this.datetimeShowPicker = false;
     },
+    isValidOwnerName() {
+      this.ownerNameMsg = '';
+      let ownerName = this.detail.ownerName;
+      if (ownerName.length < 2) {
+        this.ownerNameMsg = '最短字数2';
+        return true;
+      }
+      if (ownerName.length > 20) {
+        this.ownerNameMsg = '最长字数20';
+        return true;
+      }
+      const chineseChars = ownerName.match(/[\u4e00-\u9fa5]/g) || [];
+      if (chineseChars.length < 1) {
+        this.ownerNameMsg = '至少一个汉字';
+        return true;
+      }
+      if (!/^[\u4e00-\u9fa5]+(·[\u4e00-\u9fa5]*)*·?$/.test(ownerName)) {
+          this.ownerNameMsg = '只能输入中文';
+          return true;
+      }
+      // if (!/^[\u4e00-\u9fa5a-zA-Z0-9·]+$/.test(ownerName)) {
+      //   this.ownerNameMsg = '不可输入特殊符号';
+      //   return true;
+      // }
+      return false;
+    },
+    isValidTotalSalesAmount() {
+      this.totalSalesAmountMsg = '';
+      let totalSalesAmount = this.detail.totalSalesAmount;
+      const value = parseFloat(totalSalesAmount);
+      if (isNaN(value)) {
+        this.totalSalesAmountMsg = '请输入数字';
+        return true;
+      }
+      if (value < 1) {
+        this.totalSalesAmountMsg = '最小值1';
+        return true;
+      }
+      if (value > 1000) {
+        this.totalSalesAmountMsg = '最大值1000';
+        return true;
+      }
+      return false;
+    },
+
+    isConstructionYearNum() {
+      this.constructionYearNumMsg = '';
+      let constructionYearNum = this.detail.constructionYearNum;
+      const value = parseFloat(constructionYearNum);
+      if (isNaN(value)) {
+        this.constructionYearNumMsg = '请输入数字';
+        return true;
+      }
+      if (value < 1) {
+        this.constructionYearNumMsg = '最小值1';
+        return true;
+      }
+      if (value > 10000) {
+        this.constructionYearNumMsg = '最大值10000';
+        return true;
+      }
+      return false;
+    },
+    isPerformanceRatio() {
+      this.performanceRatioMsg = '';
+      let performanceRatio = this.detail.performanceRatio;
+      const value = parseFloat(performanceRatio);
+      if (isNaN(value)) {
+        this.performanceRatioMsg = '请输入数字';
+        return true;
+      }
+      if (value < 1) {
+        this.performanceRatioMsg = '最小值1';
+        return true;
+      }
+      if (value > 100) {
+        this.performanceRatioMsg = '最大值100';
+        return true;
+      }
+      return false;
+    },
+    isValidMainBrand() {
+      this.mainBrandMsg = '';
+      let mainBrand = this.detail.mainBrand;
+      const chineseChars = mainBrand.match(/[\u4e00-\u9fa5]/g) || [];
+      if (chineseChars.length < 1) {
+        this.mainBrandMsg = '至少一个汉字';
+        return true;
+      }
+      return false;
+    },
     // 保存
     confirmShare() {
       if (
@@ -276,6 +398,20 @@ export default {
         this.$toast('请验证手机号');
         return;
       }
+      this.isValidOwnerName();
+      this.isValidTotalSalesAmount();
+      this.isPerformanceRatio();
+      this.isValidMainBrand();
+      if (this.detail.constructionResource == '是') {
+        this.isConstructionYearNum();
+      }
+      if (this.isValidOwnerName()) return;
+      if (this.isValidTotalSalesAmount()) return;
+      if (this.isPerformanceRatio()) return;
+      if (this.isValidMainBrand()) return;
+      if (this.detail.constructionResource == '是') {
+        if (this.isConstructionYearNum()) return;
+      }
       if (this.detail.emergencyContactMobile != '') {
         if (!/^1[123456789]\d{9}$/.test(this.detail.emergencyContactMobile)) {
           this.$toast('紧急联系人电话格式错误');

+ 18 - 0
src/views/storeManagement/addDesignerDetail.vue

@@ -88,6 +88,23 @@
             <span class="van-f-red">*</span>
           </template>
         </van-field>
+        <van-field
+          readonly
+          clickable
+          name="picker"
+          :value="fromData.designerLevel"
+          label="设计师级别"
+          placeholder="请选择设计师级别"
+          :rules="[
+            {
+              required: true,
+              message: '请选择设计师级别',
+            },
+          ]">
+          <template #left-icon>
+            <span class="van-f-red">*</span>
+          </template>
+        </van-field>
         <van-field
           v-model="fromData.designerCompanyName"
           label="设计公司名称"
@@ -172,6 +189,7 @@ export default {
         chainName: '',
         enterTime: '',
         storeCategoryName: '',
+        designerLevel: '',
         storeCategory: '',
         designerCompanyName: '',
         provinceName: '',

+ 40 - 0
src/views/storeManagement/addDesignerEdit.vue

@@ -110,6 +110,24 @@
             <span class="van-f-red">*</span>
           </template>
         </van-field>
+        <van-field
+          readonly
+          clickable
+          name="picker"
+          :value="fromData.designerLevel"
+          label="设计师级别"
+          placeholder="请选择设计师级别"
+          @click="onClickdesignerLevel"
+          :rules="[
+            {
+              required: true,
+              message: '请选择设计师级别',
+            },
+          ]">
+          <template #left-icon>
+            <span class="van-f-red">*</span>
+          </template>
+        </van-field>
         <van-field
           v-model="fromData.designerCompanyName"
           label="设计公司名称"
@@ -243,6 +261,15 @@
         @confirm="onConfirm"
         @cancel="showPicker = false" />
     </van-popup>
+    <!--设计师级别-->
+    <van-popup v-model="showPickerDL" position="bottom">
+      <van-picker
+        show-toolbar
+        :default-index="defaultIndex"
+        :columns="designerLevelList"
+        @confirm="onConfirmDL"
+        @cancel="showPickerDL = false" />
+    </van-popup>
     <!--省、市、区、街道-->
     <van-popup v-model="showProvincePicker" position="bottom">
       <van-picker
@@ -346,6 +373,7 @@ export default {
         enterTime: '',
         storeCategoryName: '',
         storeCategory: '',
+        designerLevel: '',
         designerCompanyName: '',
         provinceName: '',
         cityName: '',
@@ -362,7 +390,10 @@ export default {
       searchChainName: '',
       showCalendar: false,
       showPicker: false,
+      showPickerDL: false,
       storeCategoryList: [],
+      designerLevelList: [ '大咖', '网红', '商务' ],
+      defaultIndex: 0,
       showProvincePicker: false,
       showCityPicker: false,
       showDistrictPicker: false,
@@ -503,6 +534,15 @@ export default {
       this.fromData.storeCategoryName = value.dictLabel;
       this.fromData.storeCategory = value.dictValue;
       this.showPicker = false;
+    },
+     onConfirmDL(value) { 
+      if (!value) return;
+      this.fromData.designerLevel = value;
+      this.showPickerDL = false;
+    },
+    onClickdesignerLevel(){
+      this.defaultIndex = this.designerLevelList.indexOf(this.fromData.designerLevel);
+      this.showPickerDL = true;
     },
     getStoreCategoryList() {
       designerStoreCategory().then((res) => {

+ 46 - 0
src/views/storeManagement/addDesignerPage.vue

@@ -110,6 +110,24 @@
             <span class="van-f-red">*</span>
           </template>
         </van-field>
+        <van-field
+          readonly
+          clickable
+          name="picker"
+          :value="fromData.designerLevel"
+          label="设计师级别"
+          placeholder="请选择设计师级别"
+          @click="onClickdesignerLevel"
+          :rules="[
+            {
+              required: true,
+              message: '请选择设计师级别',
+            },
+          ]">
+          <template #left-icon>
+            <span class="van-f-red">*</span>
+          </template>
+        </van-field>
         <van-field
           v-model="fromData.designerCompanyName"
           label="设计公司名称"
@@ -245,6 +263,14 @@
         :columns="storeCategoryList"
         @confirm="onConfirm"
         @cancel="showPicker = false" />
+    </van-popup>
+     <!--设计师级别-->
+    <van-popup v-model="showPickerDL" position="bottom">
+      <van-picker
+        show-toolbar
+        :columns="designerLevelList"
+        @confirm="onConfirmDL"
+        @cancel="showPickerDL = false" />
     </van-popup>
     <!--省、市、区、街道-->
     <van-popup v-model="showProvincePicker" position="bottom">
@@ -348,6 +374,7 @@ export default {
         enterTime: '',
         storeCategoryName: '',
         storeCategory: '',
+        designerLevel: '',
         designerCompanyName: '',
         provinceName: '',
         cityName: '',
@@ -364,7 +391,10 @@ export default {
       searchChainName: '',
       showCalendar: false,
       showPicker: false,
+      showPickerDL: false,
       storeCategoryList: [],
+      designerLevelList: [ '大咖', '网红', '商务' ],
+      defaultIndex: 0,
       showProvincePicker: false,
       showCityPicker: false,
       showDistrictPicker: false,
@@ -393,6 +423,7 @@ export default {
       enterTime: '',
       storeCategoryName: '',
       storeCategory: '',
+      designerLevel: '',
       designerCompanyName: '',
       provinceName: '',
       cityName: '',
@@ -454,6 +485,12 @@ export default {
                   this.getStreetQuery('2');
                   this.getStreetQuery('3');
                 });
+              } else {
+                // 数据库没有匹配到对应的省市区数据
+                this.getStreetQuery();
+                this.getStreetQuery('1');
+                this.getStreetQuery('2');
+                this.getStreetQuery('3');
               }
             });
             if (addresses) {
@@ -506,6 +543,15 @@ export default {
       this.fromData.storeCategory = value.dictValue;
       this.showPicker = false;
     },
+    onConfirmDL(value) { 
+      if (!value) return;
+      this.fromData.designerLevel = value;
+      this.showPickerDL = false;
+    },
+    onClickdesignerLevel(){
+      this.defaultIndex = this.designerLevelList.indexOf(this.fromData.designerLevel);
+      this.showPickerDL = true;
+    },
     getStoreCategoryList() {
       designerStoreCategory().then((res) => {
         if (res.code == 200) {

+ 2 - 2
src/views/storeManagement/storeDetail.vue

@@ -355,11 +355,11 @@
                 autosize
                 type="textarea"
                 v-model="list.storeArchives.totalSalesAmount"
-                label="门店24年总进货额(含所有品牌品类)" />
+                label="门店24年总进货额(含所有品牌品类,单位:万元)" />
               <van-field
                 readonly
                 v-model="list.storeArchives.performanceRatio"
-                label="门店立邦业绩占比(%)" />
+                label="门店立邦业绩占比(单位:%)" />
               <van-field
                 readonly
                 autosize

+ 419 - 0
src/views/week/ActivityQRCode.vue

@@ -0,0 +1,419 @@
+<template>
+  <div class="ActivityQRCode">
+    <van-form
+      ref="tabstoreVal"
+      class="QRCodeActivity"
+      :readonly="
+        approvalStatus == '1' ||
+        approvalStatus == '2' ||
+        (approvalStatus == null && !!userSummaryId)
+      ">
+      <div class="activityItem">
+        <span class="van-f-red">*</span>
+        <van-field
+          v-model="activityForm.summaryEventName"
+          name="summaryEventName"
+          label="活动名称"
+          placeholder="请输入活动名称"
+          :rules="[{ required: true }]" />
+      </div>
+      <div class="activityItem">
+        <span class="van-f-red">*</span>
+        <van-field
+          readonly
+          clickable
+          name="summaryEventDate"
+          :value="activityForm.summaryEventDate"
+          label="活动日期"
+          placeholder="请选择活动日期"
+          @click="activityShowCalendarFun"
+          :rules="[{ required: true }]" />
+      </div>
+      <div class="activityItem">
+        <span class="van-f-red">*</span>
+        <van-field
+          readonly
+          clickable
+          name="qrStartTime"
+          :value="activityForm.qrStartTime"
+          label="生效开始日期"
+          placeholder="请选择开始日期"
+          @click="clickValidDateShow('start')"
+          :rules="[{ required: true }]" />
+      </div>
+      <div class="activityItem">
+        <span class="van-f-red">*</span>
+        <van-field
+          readonly
+          clickable
+          name="qrEndTime"
+          :value="activityForm.qrEndTime"
+          label="生效结束日期"
+          placeholder="请选择结束日期"
+          @click="clickValidDateShow('end')"
+          :rules="[{ required: true }]" />
+      </div>
+      <div class="activityItem">
+        <div class="van-cell QRCodeBtnBox">
+          <van-button style="width: 88px" class="QRCodeBtn" color="#0057ba" @click="openQRCode">
+            生成签到码
+          </van-button>
+          <div class="tips">
+            1、生成签到码后自动暂存任务;<br />2、请门店老板使用企微扫码签到
+            <!-- <div>1、点击【暂存】后签到码生效;</div>
+            <div>2、请门店老板使用企微扫码签到</div> -->
+          </div>
+        </div>
+      </div>
+      <div class="activityItem">
+        <div class="van-cell refreshBtnBox" style="padding: 5px 16px" @click="getQRChainList">
+          <div style="font-size: 16px; margin-right: 10px">
+            已签到成功门店:
+            <span style="margin-left: 5px; color: red">{{ QRChainList.length }}家 </span>
+          </div>
+          <div class="refresh">
+            <van-icon
+              style="font-weight: 600; margin-top: 1px"
+              name="replay"
+              size="20"
+              color="#1989fa" />
+          </div>
+        </div>
+      </div>
+      <div class="activityItem">
+        <div class="van-cell chainListBox">
+          <div class="jxsContent">
+            <div class="item" v-for="(val, index) in QRChainList">
+              <el-popover
+                placement="bottom"
+                trigger="click"
+                :content="val.storeName + '(' + val.storeCode + ')'">
+                <template slot="reference">
+                  <div class="selectItem">{{ val.storeName }} &nbsp; ({{ val.storeCode }})</div>
+                </template>
+              </el-popover>
+            </div>
+          </div>
+        </div>
+      </div>
+    </van-form>
+    <!-- 活动日期 -->
+    <van-calendar v-model="activityShowCalendar" @confirm="activityOnConfirm" />
+    <!-- 生效日期 -->
+    <van-popup v-model="validDateShow" capture position="bottom">
+      <van-datetime-picker
+        v-model="validDate"
+        :title="activate.title"
+        :min-date="activate.minDate"
+        :max-date="activate.maxDate"
+        type="datetime"
+        @cancel="validDateShow = false"
+        @confirm="onValidDateConfirm" />
+    </van-popup>
+    <!-- 二维码 -->
+    <div class="QRCodeBox" v-if="QRCodeBox">
+      <div class="centerBox">
+        <div class="title">{{ activityForm.summaryEventName }}</div>
+        <div class="activityDate">{{ activityForm.summaryEventDate }}</div>
+        <img class="QRCodeUrl" :src="this.QRCodeUrl" />
+        <div class="validTimeBox">
+          <div class="text">二维码有效期</div>
+          <div class="validTime">
+            <div>{{ activityForm.qrStartTime }}</div>
+            <div>~</div>
+            <div>{{ activityForm.qrEndTime }}</div>
+          </div>
+        </div>
+        <div class="close" @click="QRCodeBox = false">关闭</div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { getSummaryQrCheckList, getSummaryQrCodeUUID } from '@/api/index';
+export default {
+  props: {
+    ActivityQRCodeData: {
+      type: Object,
+    },
+    qrUuid: {
+      type: String,
+    },
+    approvalStatus: {
+      type: String,
+    },
+    userSummaryId: {
+      type: [String, Number],
+    },
+  },
+  data() {
+    return {
+      // 活动数据
+      activityForm: {
+        summaryEventName: '',
+        summaryEventDate: '',
+        qrStartTime: '',
+        qrEndTime: '',
+      },
+      activityShowCalendar: false,
+      validDateShow: false,
+      QRCodeUrl: '',
+      QRCodeBox: false,
+      activate: {
+        type: '',
+        title: '',
+        minDate: new Date(),
+        maxDate: new Date(2035, 10, 1),
+      },
+      validDate: new Date(),
+      QRChainList: [],
+      qrUuids: null,
+    };
+  },
+  watch: {
+    ActivityQRCodeData: {
+      handler(val) {
+        if (val) this.activityForm = val;
+        if (this.qrUuid) {
+          this.qrUuids = this.qrUuid;
+          this.getQRChainList();
+        }
+        console.log(val);
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
+  methods: {
+    activityOnConfirm(date) {
+      this.activityForm.summaryEventDate = this.formatDate(date);
+      this.activityShowCalendar = false;
+    },
+    // 打开二维码
+    openQRCode(value) {
+      this.toastLoading(0, '加载中...', true);
+      // approvalStatus//1-待审批 2-审批通过 不支持修改,直接查看二维码
+      if (
+        this.approvalStatus == '1' ||
+        this.approvalStatus == '2' ||
+        this.approvalStatus == '3' ||
+        (this.approvalStatus == null && this.userSummaryId) ||
+        (this.qrUuid && this.userSummaryId)
+      ) {
+        getSummaryQrCodeUUID({ qrUuid: this.qrUuid, userSummaryId: this.userSummaryId }).then(
+          (res) => {
+            this.toastLoading().clear();
+            this.QRCodeUrl = res.data.base64Png;
+            this.QRCodeBox = true;
+          }
+        );
+      } else {
+        this.$refs.tabstoreVal
+          .validate()
+          .then(() => {
+            // 验证通过
+            this.$emit('onSubmit', (res) => {
+              this.toastLoading().clear();
+              this.QRCodeBox = true;
+              this.QRCodeUrl = res.data.base64Png;
+              this.qrUuids = res.data.qrUuid;
+            });
+          })
+          .catch((errors) => {
+            this.toastLoading().clear();
+            //验证失败
+            window.scrollTo(0, 0);
+          });
+      }
+    },
+    activityShowCalendarFun() {
+      if (
+        this.approvalStatus == '1' ||
+        this.approvalStatus == '2' ||
+        (this.approvalStatus == null && this.userSummaryId)
+      )
+        return;
+      this.activityShowCalendar = true;
+    },
+    clickValidDateShow(type) {
+      if (
+        this.approvalStatus == '1' ||
+        this.approvalStatus == '2' ||
+        (this.approvalStatus == null && this.userSummaryId)
+      )
+        return;
+      if (type == 'start') {
+        this.activate = {
+          type: type,
+          title: '请选择开始日期',
+          minDate: new Date(),
+          maxDate: new Date(2035, 9, 1),
+        };
+        this.validDate = new Date();
+      } else {
+        this.activate = {
+          type: type,
+          title: '请选择结束日期',
+          minDate: this.activityForm.qrStartTime
+            ? new Date(this.activityForm.qrStartTime)
+            : new Date(),
+          maxDate: new Date(2035, 9, 1),
+        };
+        this.validDate = this.activityForm.qrEndTime
+          ? new Date(this.activityForm.qrEndTime)
+          : new Date();
+      }
+      this.validDateShow = true;
+    },
+    onValidDateConfirm(date) {
+      let time = this.parseTime(new Date(date), '{y}-{m}-{d} {h}:{i}:{s}') + '';
+      if (this.activate.type == 'start') {
+        this.activityForm.qrStartTime = time;
+        if (
+          new Date(this.activityForm.qrStartTime).getTime() >
+          new Date(this.activityForm.qrEndTime).getTime()
+        ) {
+          this.activityForm.qrEndTime = null;
+        }
+      } else {
+        this.activityForm.qrEndTime = time;
+      }
+      this.validDateShow = false;
+    },
+    formatDate(date) {
+      var Month = date.getMonth() + 1;
+      var Day = date.getDate();
+      if (Month < 10) {
+        Month = '0' + Month;
+      }
+      if (Day < 10) {
+        Day = '0' + Day;
+      }
+      return `${date.getFullYear()}-${Month}-${Day}`;
+    },
+    getQRChainList() {
+      if (!this.qrUuids) return;
+      this.QRChainList = [];
+      this.toastLoading(0, '加载中...', true);
+      getSummaryQrCheckList({ qrUuid: this.qrUuids }).then((res) => {
+        this.toastLoading().clear();
+        if (res.code == 200) {
+          this.QRChainList = res.data || [];
+        } else {
+          this.QRChainList = [];
+        }
+      });
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.ActivityQRCode {
+  .QRCodeActivity {
+    background-color: white;
+    margin-bottom: 10px;
+    .activityItem {
+      display: flex;
+      .van-f-red {
+        position: relative;
+        left: 16px;
+        top: 10px;
+        z-index: 1;
+      }
+      .QRCodeBtnBox {
+        justify-content: space-between;
+        align-items: end;
+        .QRCodeBtn {
+          width: auto;
+          border-radius: 10px;
+        }
+        .tips {
+          flex: 1;
+          font-size: 14px;
+          line-height: 15px;
+          text-align: right;
+          color: red;
+        }
+        .van-button--normal {
+          padding: 0 8px;
+        }
+      }
+      .jxsContent {
+        margin-bottom: 10px;
+        .item {
+          padding: 5px;
+          background: #e9e9e9;
+          margin: 5px 0;
+          .el-popover__reference-wrapper {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+          }
+          .selectItem {
+            flex: 1;
+            white-space: nowrap;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            font-size: 14px;
+          }
+        }
+      }
+    }
+  }
+  .QRCodeBox {
+    position: fixed;
+    width: 100%;
+    height: 100%;
+    z-index: 9999999999;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    .centerBox {
+      width: 90%;
+      // height: 100%;
+      background: rgba(255, 255, 255, 0.1);
+      backdrop-filter: blur(10px);
+      border-radius: 20px;
+      padding: 10px 20px;
+      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
+      text-align: center;
+      color: #fff;
+      font-size: 18px;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      .title {
+        font-size: 24px;
+        font-weight: 600;
+        margin-bottom: 10px;
+      }
+      .activityDate {
+        // font-size: 20px;
+        margin: 10px 0;
+      }
+      .QRCodeUrl {
+        // width: 100%;
+        margin: 10px 0;
+      }
+      .validTimeBox {
+        margin-top: 10px;
+        .validTime {
+          margin: 10px 0;
+          font-size: 12px;
+        }
+      }
+      .close {
+        width: 40%;
+        padding: 10px 15px;
+        background: rgba(255, 255, 255, 0.2);
+        border-radius: 12px;
+      }
+    }
+  }
+}
+</style>

+ 30 - 6
src/views/week/SUPTaskApproval/SUPTaskApprovalDetail.vue

@@ -40,13 +40,20 @@
       </div>
     </div>
     <div class="lineGrey"></div>
-    <div
-      class="container linep"
-      style="background-color: #fff; width: 94%; margin: 0px auto; border-radius: 6px">
+    <div class="container linep" style="width: 94%; margin: 0px auto; border-radius: 6px">
       <detailItem
         :collectionItemLists="collectionItemLists"
         :approvalStatus="info.approvalStatus"
-        ref="detailItem"></detailItem>
+        ref="detailItem">
+        <!-- 活动扫码 -->
+        <ActivityQRCode
+          v-if="info.qrCodeCheck == '1'"
+          ref="ActivityQRCode"
+          :ActivityQRCodeData="ActivityQRCodeData"
+          :approvalStatus="info.approvalStatus"
+          :userSummaryId="info.userSummaryId"
+          :qrUuid="qrUuid"></ActivityQRCode>
+      </detailItem>
     </div>
     <div
       class="newCarList"
@@ -94,9 +101,10 @@ import deleteUploadImg from '@/components/deleteUploadImg';
 import detailItem from './detailItem';
 import { writeAgainCustomAnswer } from '@/api/week';
 import { changeApproval, getApprovalDetail } from '@/api/SUPTaskApproval.js';
+import ActivityQRCode from '../ActivityQRCode';
 export default {
   name: 'SUPTaskApprovalDetail',
-  components: { deleteUploadImg, detailItem },
+  components: { deleteUploadImg, detailItem, ActivityQRCode },
   data() {
     return {
       info: null,
@@ -125,10 +133,13 @@ export default {
       writeAgain: false,
       approvalMessage: '',
       tabVal: '1',
+      ActivityQRCodeData: {},
+      qrUuid: null,
       //
     };
   },
   activated() {
+    this.ActivityQRCodeData = {};
     this.powerGrade = localStorage.getItem('powerGrade');
     this.tabVal = this.$route.query.tabVal;
     this.getDetailById();
@@ -168,6 +179,13 @@ export default {
         summaryApprovalId: this.$route.query.summaryApprovalId,
       }).then((res) => {
         loading1.clear();
+        this.ActivityQRCodeData = {
+          summaryEventName: res.data.summaryEventName || '',
+          summaryEventDate: res.data.summaryEventDate || '',
+          qrStartTime: res.data.qrStartTime || '',
+          qrEndTime: res.data.qrEndTime || '',
+        };
+        this.qrUuid = res.data.qrUuid;
         this.reportTargetAll = res.data.reportTargetAll;
         this.info = res.data;
         this.type = res.data.userType;
@@ -294,7 +312,7 @@ export default {
 </script>
 <style scoped lang="scss">
 .container {
-  background-color: white;
+  // background-color: white;
 }
 
 .van-f-red {
@@ -493,5 +511,11 @@ export default {
     float: right;
     color: #0057ba;
   }
+
+  .linep .van-cell__title {
+    color: #646566;
+    font-weight: 500;
+    font-size: 14px;
+  }
 }
 </style>

+ 4 - 0
src/views/week/SUPTaskApproval/detailItem.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="componVisitSummary detailItem">
+    <slot></slot>
     <van-form ref="tabstoreVal">
       <div v-for="(item, index) in collectionItemList" :key="index">
         <div v-if="item.answerType == 'sz'" class="formLabel z-cell">
@@ -788,6 +789,9 @@ export default {
   .z-cell .van-cell__title {
     font-size: 16px;
   }
+  .van-form {
+    background-color: white;
+  }
 }
 </style>
 <style lang="scss">

+ 83 - 31
src/views/week/VisitSummaryAdd.vue

@@ -1,12 +1,8 @@
 <template>
   <div class="bgcolor VisitSummaryAdd">
-    <!--        顶部条-->
-
-    <!--        顶部条-->
     <div class="navBarTOP">
       <van-nav-bar class="navBar" left-arrow :title="title" @click-left="onClickLeft" />
     </div>
-    <!--        主体内容-->
     <div class="lineGrey"></div>
     <div class="lineGrey"></div>
     <div class="lineGrey"></div>
@@ -14,6 +10,11 @@
     <div class="lineGrey"></div>
     <div class="lineGrey" style="height: 6px"></div>
     <div class="container" style="width: 94%; margin: 0px auto; border-radius: 6px">
+      <!-- 活动扫码 -->
+      <ActivityQRCode
+        v-if="$route.query.qrCodeCheck == '1'"
+        @onSubmit="onStorage"
+        ref="ActivityQRCode"></ActivityQRCode>
       <van-form ref="tabstoreVal">
         <div v-for="(item, index) in collectionItemList" :key="index">
           <div v-if="item.answerType == 'sz'" class="formLabel z-cell">
@@ -215,7 +216,9 @@
     </div>
     <br />
     <div class="tc" style="padding: 0 16px">
-      <van-button class="submitBtn" block type="primary" @click="onStorage"> 暂存 </van-button>
+      <van-button class="submitBtn" block type="primary" @click="onStorage(null)">
+        暂存
+      </van-button>
       <van-button class="submitBtn" block type="info" color="#0057ba" @click="onSubmit">
         提交汇报
       </van-button>
@@ -317,10 +320,10 @@ import zCheckbox from '@/components/zCheckbox2';
 // import uploadImg from "@/components/uo";
 import uploadImg from '@/components/uploadVTask';
 import deleteUploadImg from '@/components/deleteUploadImg2';
-
+import ActivityQRCode from './ActivityQRCode';
 export default {
   name: 'MyHistoricalWeekly',
-  components: { zRadio, zCheckbox, uploadImg, deleteUploadImg },
+  components: { zRadio, zCheckbox, uploadImg, deleteUploadImg, ActivityQRCode },
   data() {
     return {
       timeico: timeico,
@@ -382,8 +385,14 @@ export default {
       chainName: '',
       chainCode: '',
       jxsList: [],
+      userSummaryId: null,
+      qrUuid: null,
     };
   },
+  activated() {
+    this.userSummaryId = null;
+    this.qrUuid = null;
+  },
   created() {
     this.activaFlag = true;
     // this.formData.startTime = this.GetPreMonthDay(this.parseTime(new Date(), '{y}-{m}-{d}'),2)
@@ -486,7 +495,57 @@ export default {
       return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);
     },
     onLoad() {},
+    // 暂存 不校验答案是否必填
+    onStorage(callback) {
+      let ActivityQRCodeData = this.$refs.ActivityQRCode ? this.$refs.ActivityQRCode.activityForm : {} || {};
+      this.setParams(() => {
+        temporarilyCustomAnswer({
+          userSummaryId: this.userSummaryId, //	Long	用户总结id,如果为新增则不填,编辑则必填
+          summaryId: this.$route.query.summaryId, //Long	主管任务id
+          customItemList: this.collectionItemList, //List<Object>	答案列表
+          ...ActivityQRCodeData, //任务名称、活动日期、签到时间
+          getQrCode: callback ? true : false, //是否需要反馈二维码(是:任务名称、活动日期、签到时间必填)
+          qrUuid: this.qrUuid || null,
+        })
+          .then((res) => {
+            if (res.code == 200) {
+              if (callback) {
+                this.userSummaryId = res.data.userSummaryId ? res.data.userSummaryId : null;
+                this.qrUuid = res.data.qrUuid ? res.data.qrUuid : null;
+                // 回传二维码
+                callback(res);
+              } else {
+                this.$router.go(-1);
+              }
+            } else {
+              this.$toast(res.msg);
+            }
+          })
+          .catch((err) => {
+            this.$toast(err.msg);
+          });
+      });
+    },
     onSubmit() {
+      if (this.$route.query.qrCodeCheck == '1') {
+        // 执行 ActivityQRCode from表单验证触发
+        this.$refs.ActivityQRCode.$refs.tabstoreVal
+          .validate()
+          .then(() => {
+            // 验证通过
+            let ActivityQRCodeData = this.$refs.ActivityQRCode ? this.$refs.ActivityQRCode.activityForm : {} || {};
+            this.onSubmitFun(ActivityQRCodeData);
+          })
+          .catch((errors) => {
+            //验证失败
+            window.scrollTo(0, 0);
+            return;
+          });
+      } else {
+        this.onSubmitFun();
+      }
+    },
+    onSubmitFun(ActivityQRCodeData = {}) {
       this.setParams(() => {
         if (this.flagclick) {
           this.flagclick = false;
@@ -495,9 +554,11 @@ export default {
             this.flagclick = true;
           }, 2000);
           insertCustomAnswer({
-            userSummaryId: '', //	Long	用户总结id,如果为新增则不填,编辑则必填
+            userSummaryId: this.userSummaryId, //	Long	用户总结id,如果为新增则不填,编辑则必填
             summaryId: this.$route.query.summaryId, //Long	主管任务id
             customItemList: this.collectionItemList, //List<Object>	答案列表
+            ...ActivityQRCodeData,
+            qrUuid: this.qrUuid || null,
           })
             .then((res) => {
               if (res.code == 200) {
@@ -959,32 +1020,12 @@ export default {
         }
       }
     },
-    // 暂存 不校验答案是否必填
-    onStorage() {
-      this.setParams(() => {
-        temporarilyCustomAnswer({
-          userSummaryId: '', //	Long	用户总结id,如果为新增则不填,编辑则必填
-          summaryId: this.$route.query.summaryId, //Long	主管任务id
-          customItemList: this.collectionItemList, //List<Object>	答案列表
-        })
-          .then((res) => {
-            if (res.code == 200) {
-              this.$router.go(-1);
-            } else {
-              this.$toast(res.msg);
-            }
-          })
-          .catch((err) => {
-            this.$toast(err.msg);
-          });
-      });
-    },
   },
 };
 </script>
 <style scoped lang="scss">
 .container {
-  background-color: white;
+  // background-color: white;
 }
 
 .van-f-red {
@@ -1046,6 +1087,9 @@ export default {
       border-radius: 20px;
     }
   }
+  .van-form {
+    background-color: white;
+  }
 }
 </style>
 <style lang="scss">
@@ -1146,6 +1190,11 @@ export default {
   margin-top: -10px;
 }
 .jxsBox {
+  .tips {
+    text-align: right;
+  }
+}
+.VisitSummaryAdd {
   .jxsContent {
     margin-bottom: 10px;
     .item {
@@ -1166,8 +1215,11 @@ export default {
       }
     }
   }
-  .tips {
-    text-align: right;
+
+  .linep .van-cell__title {
+    color: #646566;
+    font-weight: 500;
+    font-size: 14px;
   }
 }
 </style>

+ 0 - 360
src/views/week/VisitSummaryDetail copy.vue

@@ -1,360 +0,0 @@
-<template>
-  <div>
-    <!--        顶部条-->
-    <div class="navBarTOP">
-      <van-nav-bar class="navBar" :title="info.summaryTaskName" left-arrow @click-left="onClickLeft"/>
-      <!--      <p style="text-align: right;margin-right: 16px;color: #1e5398;">{{title}}</p>-->
-    </div>
-    <div class="lineGrey"></div>
-    <div class="lineGrey"></div>
-    <div class="lineGrey"></div>
-    <div class="lineGrey"></div>
-    <div class="lineGrey"></div>
-    <div class="lineGrey" style="height:6px;"></div>
-    <!--        主体内容-->
-    <div class="container linep" style="background-color: #fff;width: 94%; margin: 0px auto; border-radius: 6px;padding: 10px">
-      <div style="padding:4px 0">
-        <van-icon :name="ry" size="16"  style="float: left"/>
-        <span>&nbsp;{{info.nickName}} - {{info.postName}}</span>
-      </div>
-      <div style="padding:4px 0">
-        <van-icon :name="zw" size="16" style="float: left"/>
-        <span >&nbsp;所属部门:{{info.deptName}}</span>
-      </div>
-      <div style="padding:4px 0">
-        <van-icon :name="tm" size="16"  style="float: left"/>
-        <span >&nbsp;提交时间:{{info.createTime}}</span>
-      </div>
-    </div>
-    <div class="lineGrey"></div>
-    <div class="container linep" style="background-color: #fff;width: 94%; margin: 0px auto; border-radius: 6px;">
-      <van-form ref="tabstoreVal">
-        <div v-for="(item,index) in info.customItemList" :key="index">
-          <div class="formLabel z-cell z-cells z-celly" v-if="item.answerType=='sz' || item.answerType=='rq'||item.answerType=='gs'||item.answerType=='dq'||item.answerType=='xsb'">
-            <van-cell>
-              <template #title>{{ index + 1 }}.{{ item.customName }} <span style="color: #444;
-  font-size: 12px;
-  margin: 0;
-  padding:10px 0;text-align: right">{{ item.remark}}</span></template>
-            </van-cell>
-            <p class="mg0">{{ item.answerValue }}</p>
-          </div>
-          <div class="formLabel z-cell z-cells z-celly" v-if="item.answerType=='zp'">
-            <van-cell>
-              <template #title>{{ index + 1 }}.{{ item.customName }}</template>
-            </van-cell>
-            <delete-upload-img :imgs="item.fileInfoList"></delete-upload-img>
-          </div>
-          <div class="formLabel z-cell z-cells z-celly" v-if="item.answerType=='wb'">
-            <van-cell>
-              <template #title>{{ index + 1 }}.{{ item.customName }}</template>
-            </van-cell>
-            <div class="selesetText">
-              <p class="mg0">{{ item.answerValue }}</p>
-            </div>
-            <p style="color: #444;font-size: 12px;margin: 0;padding:10px 0;text-align: right">{{ item.remark }}</p>
-            <delete-upload-img :imgs="item.fileInfoList"></delete-upload-img>
-          </div>
-          <div class="formLabel z-cell z-cells z-celly" v-if="item.answerType=='duox'">
-            <van-cell>
-              <template #title>{{ index + 1 }}.{{ item.customName }}</template>
-            </van-cell>
-            <div class="selesetText">
-              <div class="mg0" v-for="(item1,index1) in item.customOptionList" :key="index1">
-              <p style="color:#0057ba" v-if="item1.checked">
-                <i style="border: 1px solid #0057ba;margin-right: 10px;border-radius:2px;padding: 2px" class="van-icon van-icon-success"></i>
-                <span >{{ item1.customOption }}</span>
-              </p>
-              <p v-if="!item1.checked">
-                <i style="border: 1px solid #ccc;margin-right: 10px;border-radius:2px;color:#fff;padding: 2px" class="van-icon van-icon-success"></i>
-                <span >{{ item1.customOption }}</span>
-              </p>
-              </div>
-            </div>
-          </div>
-          <div class="formLabel z-cell z-cells z-celly" v-if="item.answerType=='dx'">
-            <van-cell>
-              <template #title>
-                {{ index + 1 }}.{{ item.customName }}
-              </template>
-            </van-cell>
-            <div class="selesetText">
-              <div class="mg0" v-for="(item2,index2) in item.customOptionList" :key="index2">
-                <p style="color:#0057ba" v-if="item2.checked">
-                  <i style="border: 1px solid #0057ba;border-radius:40px;margin-right: 10px;padding: 2px" class="van-icon van-icon-success"></i>
-                  <span >{{ item2.customOption }}</span>
-                </p>
-                <p v-if="!item2.checked">
-                  <i style="border: 1px solid #ccc;border-radius:40px;margin-right: 10px;color:#fff;padding: 2px" class="van-icon van-icon-success"></i>
-                  <span >{{ item2.customOption }}</span>
-                </p>
-              </div>
-            </div>
-            <delete-upload-img :imgs="item.fileInfoList"></delete-upload-img>
-          </div>
-        </div>
-      </van-form>
-
-    </div>
-    <br>
-    <br>
-    <br>
-  </div>
-</template>
-
-<script>
-import history from "@/assets/Icon/history.png";
-import tm from "@/assets/Icon/tm.png";
-import zw from "@/assets/Icon/zw.png";
-import ry from "@/assets/Icon/ry.png";
-import {getSummaryMobilo} from "@/api/index";
-import {ImagePreview} from "vant";
-import deleteUploadImg from "@/components/deleteUploadImg";
-export default {
-  name: "daily",
-  components: {deleteUploadImg},
-  data() {
-    return {
-      info:{},
-      zw:zw,
-      tm:tm,
-      ry:ry,
-      show: true,
-      num: 0,
-      todayGoal: {},
-      progressWidth: 0,
-      history: history,
-      imgArr: [],
-      activeNames: ['1', '2', '3', '4', '5', '6', '7', '8', '10',"16","17"],
-      value: "2",
-      message: "",
-      powerGrade:"",
-      Content:"",
-      Content2:"",
-      reportTargetAll:{},
-      reportContents:[{dayContent:""}],
-      reportTarget:{},
-      successContent:"",
-      imgList:[],
-      type:"-1"
-      //
-    }
-  },
-  created() {
-    this.powerGrade= localStorage.getItem("powerGrade")
-    this.getDetailById()
-  },
-  watch:{
-    $route(to,from){
-      this.powerGrade= localStorage.getItem("powerGrade")
-      if(to.path=="/dailyDetails"){
-        this.getDetailById()
-      }
-      // &&from.path=="/dailyApprovalList"
-      // if(to.path=="/dailyDetails"&&from.path=="/myHistoricalDaily"){
-      //   this.getDetailById()
-      // }
-    }
-  },
-  activated() {
-    this.num = 0;
-    this.userTodayPlanNum()
-  },
-  methods: {
-    pviewFn(val,imgVal){
-      var imgList=[]
-      var photos=this.reportTarget.photos[val].photos
-      for(let i=0;i<photos.length;i++){imgList.push(photos[i].fileUrl)};
-      ImagePreview({images: imgList, startPosition: imgVal});
-    },
-    submint(){
-      this.$router.push({
-        path: "/daily",
-        query: {reportId:this.$route.query.reportId,temporaryShow:"N"}
-      })
-    },
-    getDetailById(){
-      let loading1=this.$toast.loading({
-        duration: 0,
-        message: '加载中...',
-        forbidClick: true,
-      });
-      getSummaryMobilo({userSummaryId:this.$route.query.userSummaryId}).then(res=>{
-        loading1.clear()
-        this.reportTargetAll=res.data.reportTargetAll
-        this.info=res.data
-        this.type=res.data.userType
-        if(res.data.status==3){
-          this.successContent=res.data.successContent
-        }else{
-          this.successContent=res.data.failContent
-        }
-        if(res.data.reportContents.length>0){
-          this.Content=res.data.reportContents[0].dayContent
-          if(res.data.reportContents.length>1){
-            this.Content2=res.data.reportContents[1].dayContent
-          }else{
-            this.Content2=""
-          }
-        }else{
-          this.Content=""
-          this.Content2=""
-        }
-        this.reportContents=res.data.reportContents
-        var imgList=[]
-        if(res.data.photos!=null){
-          for(var k=0;k<res.data.photos.length;k++){
-            imgList.push(res.data.photos[k].fileUrl+"")
-          }
-        }
-        this.imgList=imgList
-      })
-    },
-    userTodayPlanNum() {
-      userTodayPlanNum().then(res => {
-        if (res.code == 200) {
-          this.todayGoal = res.data
-          this.progressWidth = (this.todayGoal.finishNum / this.todayGoal.planNum) * 100 + "%"
-          localStorage.setItem("nickName", res.data.user.nickName)
-          localStorage.setItem("storeType", res.data.user.type)
-        } else {
-          this.$toast.fail(res.msg)
-        }
-      })
-    },
-    onClickLeft() {
-      this.$router.go(-1)
-    }
-  }
-}
-</script>
-<style scoped>
-.container {
-  background-color: white;
-}
-
-.van-f-red {
-  color: red;
-  width: 8px;
-  display: inline-block;
-  line-height: 26px;
-}
-
-.formLabel {
-  margin: 0 16px;
-  border-bottom: 1px solid #f1f1f1
-}
-
-.formLabel .van-cell {
-  padding: 10px 0
-}
-
-.formLabel .van-cell::after {
-  border: 0
-}
-
-.formLabel .van-field {
-  border: 1px solid #f1f1f1;
-  padding: 6px;
-  width: 100%;
-  border-radius: 4px;
-  overflow: hidden
-}
-
-.formLabel .van-field__control {
-  padding: 0 10px
-}
-
-.formLabel .formLabeltitle {
-  position: absolute;
-  top: 8px;
-}
-
-.z-checkbox .van-radio {
-  padding: 6px 0;
-}
-.z-celly .van-cell__title{
-  font-weight: initial;
-  font-size: 14px;
-}
-</style>
-<style>
-.table-headermd {
-  font-size: 1.2rem;
-  text-align: center;
-  position: initial;
-  width: 94% !important;
-  margin: 0 auto;
-  border-right: 0;
-}
-
-.table-headermd .el-table__header,
-.table-headermd .el-table__body {
-  width: 100% !important;
-}
-
-.table-headermd col {
-  width: 5.8rem;
-}
-
-.table-headermd col:nth-child(2),
-.table-headermd col:nth-child(4),
-.table-headermd col:nth-child(3) {
-  width: 5rem;
-}
-
-.table-headermd .van-cell {
-  padding: 0 4px;
-  height: 100%
-}
-
-.table-headermd th.el-table__cell > .cell {
-  padding: 0 4px
-}
-
-.table-headermd th.el-table__cell {
-  background-color: #1989fa;
-  color: #fff;
-}
-
-.table-headermd .el-table__cell {
-  padding: 4px 0;
-}
-
-.table-headermd .tipTitle {
-  overflow: hidden;
-  text-overflow: ellipsis;
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 2;
-}
-
-.table-headermd::before {
-  height: 0
-}
-
-.f-right {
-  text-align: right;
-  margin: 0
-}
-
-.mg0 {
-  margin: 6px 10px;
-  color: #909090;
-  font-size: 14px;
-}
-
-.selesetText {
-  margin-bottom: 16px;
-}
-
-.z-cells .van-cell__title {
-  font-weight: bold;
-  color: #4a4a4a;
-}
-
-.z-cells .van-cell {
-  padding-bottom: 0
-}
-
-</style>

+ 61 - 7
src/views/week/VisitSummaryDetail.vue

@@ -40,22 +40,38 @@
       </div>
     </div>
     <div class="lineGrey"></div>
-    <div
-      class="container linep"
-      style="background-color: #fff; width: 94%; margin: 0px auto; border-radius: 6px">
+    <div class="container linep" style="width: 94%; margin: 0px auto; border-radius: 6px">
       <!-- 退回待提交 summaryUpdate:Boolean类型,true-允许编辑,false-不允许编辑 -->
       <template v-if="info.approvalStatus == '3' && info.summaryUpdate">
         <componVisitSummary
           :collectionItemLists="collectionItemLists"
           :approvalStatus="info.approvalStatus"
-          ref="componVisitSummary"></componVisitSummary>
+          ref="componVisitSummary">
+          <!-- 活动扫码 -->
+          <ActivityQRCode
+            v-if="info.qrCodeCheck == '1'"
+            ref="ActivityQRCode"
+            :ActivityQRCodeData="ActivityQRCodeData"
+            :approvalStatus="info.approvalStatus"
+            :userSummaryId="$route.query.userSummaryId"
+            :qrUuid="qrUuid"></ActivityQRCode>
+        </componVisitSummary>
       </template>
       <!-- 补填、详情 -->
       <template v-else>
         <allowWriteAgainSummary
           :collectionItemLists="collectionItemLists"
           :approvalStatus="info.approvalStatus"
-          ref="allowWriteAgainSummary"></allowWriteAgainSummary>
+          ref="allowWriteAgainSummary">
+          <!-- 活动扫码 -->
+          <ActivityQRCode
+            v-if="info.qrCodeCheck == '1'"
+            ref="ActivityQRCode"
+            :ActivityQRCodeData="ActivityQRCodeData"
+            :approvalStatus="info.approvalStatus"
+            :userSummaryId="$route.query.userSummaryId"
+            :qrUuid="qrUuid"></ActivityQRCode>
+        </allowWriteAgainSummary>
       </template>
     </div>
     <div
@@ -104,9 +120,10 @@ import componVisitSummary from '@/views/week/componVisitSummary';
 import allowWriteAgainSummary from '@/views/week/allowWriteAgainSummary';
 import { writeAgainCustomAnswer } from '@/api/week';
 import { changeApproval } from '@/api/SUPTaskApproval.js';
+import ActivityQRCode from './ActivityQRCode';
 export default {
   name: 'daily',
-  components: { deleteUploadImg, componVisitSummary, allowWriteAgainSummary },
+  components: { deleteUploadImg, componVisitSummary, allowWriteAgainSummary, ActivityQRCode },
   data() {
     return {
       info: null,
@@ -135,10 +152,13 @@ export default {
       writeAgain: false,
       approvalMessage: '',
       source: '',
+      ActivityQRCodeData: {},
+      qrUuid: null,
       //
     };
   },
   activated() {
+    this.ActivityQRCodeData = {};
     this.source = this.$route.query.source || '';
     this.powerGrade = localStorage.getItem('powerGrade');
     this.getDetailById();
@@ -175,6 +195,13 @@ export default {
       });
       getSummaryMobilo({ userSummaryId: this.$route.query.userSummaryId }).then((res) => {
         loading1.clear();
+        this.ActivityQRCodeData = {
+          summaryEventName: res.data.summaryEventName || '',
+          summaryEventDate: res.data.summaryEventDate || '',
+          qrStartTime: res.data.qrStartTime || '',
+          qrEndTime: res.data.qrEndTime || '',
+        };
+        this.qrUuid = res.data.qrUuid;
         this.reportTargetAll = res.data.reportTargetAll;
         this.info = res.data;
         this.type = res.data.userType;
@@ -265,6 +292,25 @@ export default {
         });
     },
     submitApproval() {
+      if (this.info.qrCodeCheck == '1') {
+        // 执行 ActivityQRCode from表单验证触发
+        this.$refs.ActivityQRCode.$refs.tabstoreVal
+          .validate()
+          .then(() => {
+            // 验证通过
+            let ActivityQRCodeData = this.$refs.ActivityQRCode ? this.$refs.ActivityQRCode.activityForm : {} || {};
+            this.submitApprovalFun(ActivityQRCodeData);
+          })
+          .catch((errors) => {
+            //验证失败
+            window.scrollTo(0, 0);
+            return;
+          });
+      } else {
+        this.submitApprovalFun();
+      }
+    },
+    submitApprovalFun(ActivityQRCodeData = {}) {
       let collectionAnswerlisd = this.$refs.componVisitSummary.collectionAnswerlisd;
       let collectionItemList = this.$refs.componVisitSummary.collectionItemList;
       for (var c = 0; c < collectionAnswerlisd.length; c++) {
@@ -287,6 +333,8 @@ export default {
         userSummaryId: this.info.userSummaryId, //	Long	用户总结id,如果为新增则不填,编辑则必填
         summaryId: this.info.summaryId, //Long	主管任务id
         customItemList: collectionItemList,
+        ...ActivityQRCodeData,
+        qrUuid: this.qrUuid,
       })
         .then((res) => {
           if (res.code == 200) {
@@ -307,7 +355,7 @@ export default {
 </script>
 <style scoped lang="scss">
 .container {
-  background-color: white;
+  // background-color: white;
 }
 
 .van-f-red {
@@ -505,5 +553,11 @@ export default {
     float: right;
     color: #0057ba;
   }
+
+  .linep .van-cell__title {
+    color: #646566;
+    font-weight: 500;
+    font-size: 14px;
+  }
 }
 </style>

+ 66 - 12
src/views/week/VisitSummaryStorageDetail.vue

@@ -41,18 +41,26 @@
       </div>
     </div>
     <div class="lineGrey"></div>
-    <div
-      class="container linep"
-      style="background-color: #fff; width: 94%; margin: 0px auto; border-radius: 6px">
+    <div class="container linep" style="width: 94%; margin: 0px auto; border-radius: 6px">
       <!-- 编辑 -->
       <componVisitSummary
         :collectionItemLists="collectionItemLists"
         :approvalStatus="info.approvalStatus"
-        ref="componVisitSummary"></componVisitSummary>
+        ref="componVisitSummary">
+        <!-- 活动扫码 -->
+        <ActivityQRCode
+          v-if="info.qrCodeCheck == '1'"
+          @onSubmit="onStorage"
+          ref="ActivityQRCode"
+          :ActivityQRCodeData="ActivityQRCodeData"
+          :qrUuid="qrUuid"></ActivityQRCode>
+      </componVisitSummary>
     </div>
     <br />
     <div class="tc" style="padding: 0 16px">
-      <van-button class="submitBtn" block type="primary" @click="onStorage"> 暂存 </van-button>
+      <van-button class="submitBtn" block type="primary" @click="onStorage(null)">
+        暂存
+      </van-button>
       <van-button class="submitBtn" block type="info" color="#0057ba" @click="onSubmit">
         提交汇报
       </van-button>
@@ -77,9 +85,10 @@ import {
 import { ImagePreview } from 'vant';
 import deleteUploadImg from '@/components/deleteUploadImg';
 import componVisitSummary from '@/views/week/componVisitSummary';
+import ActivityQRCode from './ActivityQRCode';
 export default {
   name: 'daily',
-  components: { deleteUploadImg, componVisitSummary },
+  components: { deleteUploadImg, componVisitSummary, ActivityQRCode },
   data() {
     return {
       info: null,
@@ -108,10 +117,12 @@ export default {
       writeAgain: false,
       approvalMessage: '',
       source: '',
-      //
+      ActivityQRCodeData: {},
+      qrUuid: null,
     };
   },
   activated() {
+    this.ActivityQRCodeData = {};
     this.source = this.$route.query.source || '';
     this.powerGrade = localStorage.getItem('powerGrade');
     this.getDetailById();
@@ -148,6 +159,13 @@ export default {
       });
       getSummaryMobilo({ userSummaryId: this.$route.query.userSummaryId }).then((res) => {
         loading1.clear();
+        this.ActivityQRCodeData = {
+          summaryEventName: res.data.summaryEventName || '',
+          summaryEventDate: res.data.summaryEventDate || '',
+          qrStartTime: res.data.qrStartTime || '',
+          qrEndTime: res.data.qrEndTime || '',
+        };
+        this.qrUuid = res.data.qrUuid;
         this.reportTargetAll = res.data.reportTargetAll;
         this.info = res.data;
         this.type = res.data.userType;
@@ -198,19 +216,28 @@ export default {
       this.$router.go(-1);
     },
     // 暂存 不校验答案是否必填
-    onStorage() {
+    onStorage(callback) {
+      let ActivityQRCodeData = this.$refs.ActivityQRCode ? this.$refs.ActivityQRCode.activityForm : {} || {};
       this.setParams((collectionItemList) => {
         temporarilyCustomAnswer({
           userSummaryId: this.info.userSummaryId,
           summaryId: this.info.summaryId, //Long	主管任务id
           customItemList: collectionItemList, //List<Object>	答案列表
+          ...ActivityQRCodeData, //任务名称、活动日期、签到时间
+          getQrCode: callback ? true : false, //是否需要反馈二维码(是:任务名称、活动日期、签到时间必填)
+          qrUuid: this.qrUuid || null,
         })
           .then((res) => {
             if (res.code == 200) {
               this.$toast('操作成功!');
-              this.$router.replace({
-                path: this.source,
-              });
+              if (callback) {
+                // 回传二维码
+                callback(res);
+              } else {
+                this.$router.replace({
+                  path: this.source,
+                });
+              }
             } else {
               this.$toast(res.msg);
             }
@@ -221,11 +248,32 @@ export default {
       });
     },
     onSubmit() {
+      if (this.info.qrCodeCheck == '1') {
+        // 执行 ActivityQRCode from表单验证触发
+        this.$refs.ActivityQRCode.$refs.tabstoreVal
+          .validate()
+          .then(() => {
+            // 验证通过
+            let ActivityQRCodeData = this.$refs.ActivityQRCode ? this.$refs.ActivityQRCode.activityForm : {} || {};
+            this.onSubmitFun(ActivityQRCodeData);
+          })
+          .catch((errors) => {
+            //验证失败
+            window.scrollTo(0, 0);
+            return;
+          });
+      } else {
+        this.onSubmitFun();
+      }
+    },
+    onSubmitFun(ActivityQRCodeData = {}) {
       this.setParams((collectionItemList) => {
         insertCustomAnswer({
           userSummaryId: this.info.userSummaryId, //	Long	用户总结id,如果为新增则不填,编辑则必填
           summaryId: this.info.summaryId, //Long	主管任务id
           customItemList: collectionItemList,
+          ...ActivityQRCodeData,
+          qrUuid: this.qrUuid,
         })
           .then((res) => {
             if (res.code == 200) {
@@ -294,7 +342,7 @@ export default {
 </script>
 <style scoped lang="scss">
 .container {
-  background-color: white;
+  // background-color: white;
 }
 
 .van-f-red {
@@ -454,5 +502,11 @@ export default {
       border-radius: 20px;
     }
   }
+
+  .linep .van-cell__title {
+    color: #646566;
+    font-weight: 500;
+    font-size: 14px;
+  }
 }
 </style>

+ 4 - 0
src/views/week/allowWriteAgainSummary.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="componVisitSummary">
+    <slot></slot>
     <van-form ref="tabstoreVal">
       <div v-for="(item, index) in collectionItemList" :key="index">
         <div v-if="item.answerType == 'sz'" class="formLabel z-cell">
@@ -891,6 +892,9 @@ export default {
   .z-cell .van-cell__title {
     font-size: 16px;
   }
+  .van-form {
+    background-color: white;
+  }
 }
 </style>
 <style lang="scss">

+ 37 - 8
src/views/week/assignAwait/assignPage.vue

@@ -122,15 +122,15 @@ export default {
         if (val) this.getSelectUserListByCustomerType();
       },
     },
-    assignUserPostValue: {
+    'assignUserPostItem.postName': {
       handler(val) {
         if (val) this.getSelectUserListByPostName();
       },
+      deep: true,
     },
   },
   activated() {
     this.id = this.$route.query.id;
-    this.getDictOptionFun();
     this.getCustomerClueInfoById();
   },
   methods: {
@@ -154,9 +154,23 @@ export default {
           // 如果选择大型装企直接返回用户表列表
           if (this.activaAssignTypeItem.dictValue == 1) {
             if (res.data && res.data.userList.length) {
-              this.assignUserData = res.data.userList;
-              this.assignUserItem = this.assignUserData[0];
-              this.assignUserValue = this.assignUserItem.nickName;
+              let userList = res.data.userList;
+              if (this.assignTypeValue != '大型装企') {
+                let userListFilter = userList.filter(
+                  (item) => item.nickName.indexOf(this.infoData.companyName) != -1
+                );
+                this.assignUserData = userListFilter || [];
+              } else {
+                this.assignUserData = userList;
+              }
+              if (this.assignUserData.length) {
+                this.assignUserItem = this.assignUserData[0];
+                this.assignUserValue = this.assignUserItem.nickName;
+              } else {
+                this.assignUserData = [];
+                this.assignUserItem = null;
+                this.assignUserValue = '';
+              }
             } else {
               this.assignUserData = [];
               this.assignUserItem = null;
@@ -188,9 +202,23 @@ export default {
       selectUserListByPostName({ postName: this.assignUserPostValue }).then((res) => {
         if (res.code == 200) {
           if (res.data && res.data.userList.length) {
-            this.assignUserData = res.data.userList;
-            this.assignUserItem = this.assignUserData[0];
-            this.assignUserValue = this.assignUserItem.nickName;
+            let userList = res.data.userList;
+            if (this.assignTypeValue != '大型装企') {
+              let userListFilter = userList.filter(
+                (item) => item.nickName.indexOf(this.infoData.companyName) != -1
+              );
+              this.assignUserData = userListFilter || [];
+            } else {
+              this.assignUserData = userList;
+            }
+            if (this.assignUserData.length) {
+              this.assignUserItem = this.assignUserData[0];
+              this.assignUserValue = this.assignUserItem.nickName;
+            } else {
+              this.assignUserData = [];
+              this.assignUserItem = null;
+              this.assignUserValue = '';
+            }
           } else {
             this.assignUserData = [];
             this.assignUserItem = null;
@@ -226,6 +254,7 @@ export default {
                 window.location.replace(window.location.origin + '/mobile/assignAwait');
               });
           }
+          this.getDictOptionFun();
         } else {
           this.$toast(res.msg);
         }

+ 4 - 0
src/views/week/componVisitSummary.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="componVisitSummary">
+    <slot></slot>
     <van-form ref="tabstoreVal" v-if="collectionItemList">
       <div v-for="(item, index) in collectionItemList" :key="index">
         <div v-if="item.answerType == 'sz'" class="formLabel z-cell">
@@ -905,6 +906,9 @@ export default {
   .z-cell .van-cell__title {
     font-size: 16px;
   }
+  .van-form {
+    background-color: white;
+  }
 }
 </style>
 <style lang="scss">

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

@@ -629,7 +629,6 @@ export default {
   },
   methods: {
     // return value.replace(/[^\u4E00-\u9FA5|\d|\a-zA-Z|\r\n\s,.?!,。?!"…—()&_%【】{}:“”‘#~@;:;¥$=()-+-·——/*{}[\]]|\r\n\s/g, '');
-
     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,
@@ -720,9 +719,12 @@ export default {
       if (this.isclick) {
         this.reportContents[0].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
         this.reportContents[1].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
-        this.reportContents[2].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
-        this.reportContents[3].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
+        if (this.GZQuota) {
+          this.reportContents[2].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
+          this.reportContents[3].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
+        }
         this.reportTarget.reportContents = this.reportContents;
+        this.reportTarget.notVisitReason = this.notVisitReason;
         this.reportTarget.status = '1';
         this.isclick = false;
         tsContents(this.reportTarget).then((res) => {
@@ -769,7 +771,7 @@ export default {
           (this.$route.query.reportId && this.notVisitReason) ||
           this.reportTarget.showNotVisitReason
         ) {
-          if (this.notVisitReason === '') {
+          if (this.notVisitReason.trim() == '') {
             this.$toast('请输入今日拜访0家店的原因!');
             return false;
           }
@@ -890,6 +892,7 @@ export default {
             this.tucReportingSuccessNum = res.data.reportContents[3].tucReportingSuccessNum;
           }
         }
+        this.notVisitReason = res.data.notVisitReason;
         this.getskuDetailByIdFun();
       });
     },

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

@@ -910,7 +910,7 @@ export default {
       display: flex;
       flex-direction: column;
       justify-content: center;
-      align-items: start;
+      align-items: flex-start;
       z-index: 999999;
       span {
         line-height: 17px;

+ 1 - 1
src/views/week/dailyHistoricalDetails.vue

@@ -1124,7 +1124,7 @@ export default {
       display: flex;
       flex-direction: column;
       justify-content: center;
-      align-items: start;
+      align-items: flex-start;
       z-index: 999999;
       span {
         line-height: 17px;

+ 6 - 1
src/views/week/index.vue

@@ -187,7 +187,12 @@
               v-for="(item, index) in list"
               :key="index"
               :to="
-                '/VisitSummaryAdd?summaryId=' + item.summaryId + '&title=' + item.summaryTaskName
+                '/VisitSummaryAdd?summaryId=' +
+                item.summaryId +
+                '&title=' +
+                item.summaryTaskName +
+                '&qrCodeCheck=' +
+                item.qrCodeCheck
               ">
               <template #title>
                 <span class="custom-title">{{ item.summaryTaskName }}</span>