Переглянути джерело

Merge branch 'master' into feature_20250704_陈列SKU图片识别

# Conflicts:
#	src/views/week/dailyDetails.vue
#	src/views/week/dailyHistoricalDetails.vue
zhujindu 4 місяців тому
батько
коміт
7fc6111af3
57 змінених файлів з 3912 додано та 1568 видалено
  1. 1 4
      .env.development
  2. 2 2
      .env.production
  3. 4 7
      .env.test
  4. 3 0
      package.json
  5. 40 31
      public/index.html
  6. 10 0
      src/api/digest.js
  7. 26 0
      src/api/index.js
  8. 0 0
      src/assets/Icon/storeA.png
  9. 0 0
      src/assets/Icon/storeB.png
  10. 0 0
      src/assets/Icon/storeC.png
  11. BIN
      src/assets/Icon/storeD.png
  12. BIN
      src/assets/Icon/storeE.png
  13. BIN
      src/assets/QRcode.png
  14. BIN
      src/assets/comment.png
  15. BIN
      src/assets/shareBack.webp
  16. BIN
      src/assets/shareBack1.png
  17. BIN
      src/assets/shareLeft.png
  18. BIN
      src/assets/shareRight.png
  19. BIN
      src/assets/shareTips.png
  20. BIN
      src/assets/summaryDay.png
  21. BIN
      src/assets/testQRcode.png
  22. BIN
      src/assets/textBack.png
  23. BIN
      src/assets/titleBack.png
  24. 582 0
      src/components/share copy.vue
  25. 638 0
      src/components/share.vue
  26. 63 34
      src/components/uploadVTask.vue
  27. 2 0
      src/main.js
  28. 4 0
      src/permission.js
  29. 5 0
      src/router/index.js
  30. 9 2
      src/utils/TXApiFun.js
  31. 0 22
      src/utils/ali-oss.js
  32. 26 0
      src/utils/digest.js
  33. 35 0
      src/utils/index.js
  34. 0 50
      src/utils/uploadAliOss copy.js
  35. 23 45
      src/views/deviceOutside/index.vue
  36. 23 48
      src/views/deviceOutside/rangeStore.vue
  37. 1 0
      src/views/deviceOutside/suishenbangOutstoreVisit.vue
  38. 22 47
      src/views/deviceOutside/topStore.vue
  39. 22 45
      src/views/deviceWithin/index.vue
  40. 2 0
      src/views/home/index.vue
  41. 22 45
      src/views/storeManagement/index.vue
  42. 3 10
      src/views/week/SUPTaskApproval/detailItem.vue
  43. 65 53
      src/views/week/VisitSummary.vue
  44. 72 33
      src/views/week/VisitSummaryAdd.vue
  45. 2 2
      src/views/week/VisitSummaryDetail.vue
  46. 52 22
      src/views/week/VisitSummaryMy.vue
  47. 458 0
      src/views/week/VisitSummaryStorageDetail.vue
  48. 3 10
      src/views/week/allowWriteAgainSummary.vue
  49. 3 10
      src/views/week/componVisitSummary.vue
  50. 58 16
      src/views/week/daily.vue
  51. 2 2
      src/views/week/dailyApproval.vue
  52. 750 481
      src/views/week/dailyDetails.vue
  53. 855 547
      src/views/week/dailyHistoricalDetails.vue
  54. 6 0
      src/views/week/weekly.vue
  55. 6 0
      src/views/week/weeklyApproval.vue
  56. 6 0
      src/views/week/weeklyApprovalDetils.vue
  57. 6 0
      src/views/week/weeklyHistoricalDetils.vue

+ 1 - 4
.env.development

@@ -4,11 +4,8 @@ VUE_APP_TITLE = 门店拜访
 # 开发环境配置
 ENV = 'development'
 VUE_APP_Target=https://ssbsfatest.nipponpaint.com.cn
-VUE_APP_SSB_LINK=http://suishenbangtest.nipponpaint.com.cn
+VUE_APP_SSB_LINK=https://suishenbangtest.nipponpaint.com.cn
 VUE_APP_XD_LINK=http://b2btest.nipponpaint.com.cn
-# ali-oss 配置
-VUE_APP_OSS_ACCESS_KEY_ID="LTAI5tG1DTJFA16BHkzHVxjz"
-VUE_APP_OSS_ACCESS_KEY_SECRET="5brWKKEACiUsKPJeUXlB7r2iZGQHNF"
 
 # 门店拜访/开发环境
 #VUE_APP_BASE_API = '/dev-api/'

+ 2 - 2
.env.production

@@ -7,11 +7,11 @@ ENV = 'production'
 
 # 正式环境
 VUE_APP_Target=https://ssbsfa.nipponpaint.com.cn
-VUE_APP_SSB_LINK=http://suishenbang.nipponpaint.com.cn
+VUE_APP_SSB_LINK=https://suishenbang.nipponpaint.com.cn
 VUE_APP_XD_LINK=http://b2b.nipponpaint.com.cn
 # 测试环境
 # VUE_APP_Target=https://ssbsfatest.nipponpaint.com.cn 
-# VUE_APP_SSB_LINK=http://suishenbangtest.nipponpaint.com.cn
+# VUE_APP_SSB_LINK=https://suishenbangtest.nipponpaint.com.cn
 # VUE_APP_XD_LINK=http://b2btest.nipponpaint.com.cn
 VUE_APP_BASE_API='/ssbsfa/'
 devtool=cheap-module-source-map

+ 4 - 7
.env.test

@@ -3,22 +3,19 @@ VUE_APP_TITLE = 门店拜访
 ENV = 'test'
 
 # 本地开发环境配置
-# VUE_APP_Target=http://192.168.100.191:9560/
-# VUE_APP_SSB_LINK=http://suishenbangtest.nipponpaint.com.cn
+# VUE_APP_Target=https://192.168.100.191:9560/
+# VUE_APP_SSB_LINK=https://suishenbangtest.nipponpaint.com.cn
 # VUE_APP_XD_LINK=http://b2btest.nipponpaint.com.cn
 # VUE_APP_BASE_API = '/'
 #测试环境
 VUE_APP_Target=https://ssbsfatest.nipponpaint.com.cn
-VUE_APP_SSB_LINK=http://suishenbangtest.nipponpaint.com.cn
+VUE_APP_SSB_LINK=https://suishenbangtest.nipponpaint.com.cn
 VUE_APP_XD_LINK=http://b2btest.nipponpaint.com.cn
 VUE_APP_BASE_API = '/ssbsfa/'
-# ali-oss 配置
-VUE_APP_OSS_ACCESS_KEY_ID="LTAI5tG1DTJFA16BHkzHVxjz"
-VUE_APP_OSS_ACCESS_KEY_SECRET="5brWKKEACiUsKPJeUXlB7r2iZGQHNF"
 
 # 正式环境
 # VUE_APP_Target=https://ssbsfa.nipponpaint.com.cn
-# VUE_APP_SSB_LINK=http://suishenbang.nipponpaint.com.cn
+# VUE_APP_SSB_LINK=https://suishenbang.nipponpaint.com.cn
 # VUE_APP_XD_LINK=http://b2b.nipponpaint.com.cn
 # VUE_APP_BASE_API='/ssbsfa/'
 # 路由懒加载

+ 3 - 0
package.json

@@ -19,11 +19,14 @@
     "coordtransform": "^2.1.2",
     "core-js": "^3.6.5",
     "element-ui": "^2.15.6",
+    "html2canvas": "^1.0.0-rc.4",
+    "qrcodejs2": "^0.0.2",
     "vant": "^2.12.37",
     "vconsole": "^3.15.1",
     "vue": "^2.6.11",
     "vue-baidu-map": "^0.21.22",
     "vue-jsonp": "^2.0.0",
+    "vue-qr": "^4.0.9",
     "vue-router": "^3.5.3",
     "vuex": "^3.6.0",
     "watermark-dom": "^2.3.0",

+ 40 - 31
public/index.html

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

+ 10 - 0
src/api/digest.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request';
+
+// 获取阿里云oss STS token
+export function wxLogin(query) {
+  return request({
+    url: '/mobile/wx/wxLogin',
+    method: 'get',
+    params: query,
+  });
+}

+ 26 - 0
src/api/index.js

@@ -1013,3 +1013,29 @@ export function chainsList(query) {
     params: query,
   });
 }
+
+// 主管任务答案暂存接口(同主管任务答案保存接口一致,但是接口不校验答案是否必填)
+export function temporarilyCustomAnswer(data) {
+  return request({
+    url: 'mobile/summaryMobile/temporarilyCustomAnswer',
+    method: 'post',
+    data: data,
+  });
+}
+
+// 删除主管任务暂存
+export function deleteSummaryMobile(query) {
+  return request({
+    url: '/mobile/summaryMobile/' + query.userSummaryId,
+    method: 'delete',
+  });
+}
+
+// 根据日报id查询汇报当天拜访照片base64格式
+export function imgToBase64(data) {
+  return request({
+    url: '/mobile/reportMobile/imgToBase64',
+    method: 'post',
+    data,
+  });
+}

src/assets/Icon/JPA.png → src/assets/Icon/storeA.png


src/assets/Icon/JPB.png → src/assets/Icon/storeB.png


src/assets/Icon/JPC.png → src/assets/Icon/storeC.png


BIN
src/assets/Icon/storeD.png


BIN
src/assets/Icon/storeE.png


BIN
src/assets/QRcode.png


BIN
src/assets/comment.png


BIN
src/assets/shareBack.webp


BIN
src/assets/shareBack1.png


BIN
src/assets/shareLeft.png


BIN
src/assets/shareRight.png


BIN
src/assets/shareTips.png


BIN
src/assets/summaryDay.png


BIN
src/assets/testQRcode.png


BIN
src/assets/textBack.png


BIN
src/assets/titleBack.png


+ 582 - 0
src/components/share copy.vue

@@ -0,0 +1,582 @@
+<template>
+  <div class="share" :style="{ 'z-index': zIndex }">
+    <div class="share-content" ref="shareContent">
+      <div class="header">
+        <div class="left-icon">
+          <img :src="require('@/assets/shareLeft.png')" />
+        </div>
+        <div class="right-icon">
+          <img :src="require('@/assets/shareRight.png')" />
+        </div>
+      </div>
+      <!-- 点评 -->
+      <!-- <template v-for="item in reportTarget.reportRemarks"> -->
+      <div
+        class="comment summaryDay"
+        v-if="
+          reportRemarksIndex != -1 &&
+          reportTarget.reportRemarks &&
+          reportTarget.reportRemarks.length
+        ">
+        <div class="title-box">
+          <div class="title">
+            <div class="name">
+              {{ reportTarget.reportRemarks[reportRemarksIndex].nickName }}点评
+            </div>
+            <div class="date">
+              {{
+                reportTarget.reportRemarks[reportRemarksIndex].createTime
+                  ? formatChineseDate(
+                      reportTarget.reportRemarks[reportRemarksIndex].createTime.split(' ')[0]
+                    )
+                  : ''
+              }}
+            </div>
+          </div>
+        </div>
+        <div class="commentMessage">
+          {{ reportTarget.reportRemarks[reportRemarksIndex].remarkContent }}
+        </div>
+      </div>
+      <!-- </template> -->
+      <!-- 内容 -->
+      <div class="summaryDay">
+        <div class="title-box">
+          <div class="title">
+            <div class="name">{{ reportTarget.nickName }}的日报</div>
+            <div class="date">
+              {{
+                reportTarget.commitTime
+                  ? formatChineseDate(reportTarget.commitTime.split(' ')[0])
+                  : ''
+              }}
+            </div>
+          </div>
+        </div>
+        <!-- <template
+          v-for="(item, index) in reportTarget.reportContents"
+          v-if="reportTarget.reportContents && reportTarget.reportContents.length > 0">
+          <div :class="['text']">{{ filterText(index) }}</div>
+          <div class="content">{{ item.dayContent }}</div>
+        </template> -->
+        <div :class="['text']">今日机会与挑战总结</div>
+        <div class="content">
+          {{ reportTarget.reportContents.length ? reportTarget.reportContents[0].dayContent : '' }}
+        </div>
+        <div :class="['text']">明日工作计划</div>
+        <div class="content">
+          {{ reportTarget.reportContents.length ? reportTarget.reportContents[1].dayContent : '' }}
+        </div>
+        <div class="text">今日拜访照片</div>
+        <div class="content-photos">
+          <template v-for="item in photosData">
+            <img
+              :src="'data:image/jpg;base64,' + item"
+              crossorigin="anonymous"
+              referrerpolicy="no-referrer"
+              alt=""
+              style="display: block" />
+          </template>
+          <!-- <template v-for="item in photosData">
+            <img
+              :src="'data:image/jpg;base64,' + item"
+              crossorigin="anonymous"
+              referrerpolicy="no-referrer"
+              alt=""
+              style="display: block" />
+          </template> -->
+        </div>
+      </div>
+      <div class="footerShare">
+        <div class="QRcodes" ref="QRcodes">
+          <div class="logo">
+            <img :src="require('@/assets/logo1.png')" />
+          </div>
+        </div>
+        <div class="right-text">
+          <div>长按识别二维码查看详情&点评</div>
+          <div></div>
+        </div>
+      </div>
+    </div>
+    <div
+      class="share-mask"
+      style="background: #fff; position: fixed; top: 0; width: 100%; height: 100%"></div>
+    <div class="html2canvasBox">
+      <div class="shareHeader">
+        <div class="shareTips">
+          长按图片可下载、收藏、转发
+          <!-- <img :src="require('@/assets/shareTips.png')" alt="" /> -->
+        </div>
+        <div class="closeShare" @click="closeShare"><van-icon name="close" /></div>
+      </div>
+      <div id="html2canvas" ref="html2canvas">
+        <div class="scroll-container">
+          <img :src="canvasImageUrl" width="100%" />
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import html2canvas from 'html2canvas';
+import QRCode from 'qrcodejs2';
+import { imgToBase64 } from '@/api/index';
+export default {
+  name: 'share',
+  props: {
+    // 日报数据
+    reportTarget: {
+      type: Object,
+      default() {
+        return {};
+      },
+    },
+    //日报id
+    reportId: {
+      type: [String, Number],
+    },
+    // 点评数据
+    reportRemarksIndex: {
+      type: Number,
+      default: -1,
+    },
+    // 图片转换列表
+    urlList: {
+      type: Array,
+      default() {
+        return [];
+      },
+    },
+  },
+  data() {
+    return {
+      canvasImageUrl: '',
+      retryCount: 0,
+      photosData: [],
+      zIndex: -1,
+    };
+  },
+  created() {
+    this.zIndex = -1;
+    this.canvasImageUrl = '';
+  },
+  mounted() {
+    this.toastLoading(0, '生成中...', true);
+    // 二维码
+    this.creatQrCode();
+    if (this.urlList.length) {
+      imgToBase64({ urlList: this.urlList }).then((res) => {
+        if (res.data && res.code == 200) {
+          this.photosData = res.data;
+          this.$nextTick(async () => {
+            await this.htmlToCanvas();
+          });
+        } else {
+          this.$toast(res.msg);
+          this.$nextTick(async () => {
+            await this.htmlToCanvas();
+          });
+        }
+      });
+    } else {
+      this.$nextTick(async () => {
+        await this.htmlToCanvas();
+      });
+    }
+  },
+  methods: {
+    //异步执行
+    imageUrlToBase64(imageUrl) {
+      return new Promise((resolve, reject) => {
+        //一定要设置为let,不然图片不显示
+        let image = new Image();
+        //解决跨域问题
+        image.setAttribute('crossOrigin', 'anonymous');
+        image.src = imageUrl;
+        image.onload = () => {
+          var canvas = document.createElement('canvas');
+          canvas.width = image.width;
+          canvas.height = image.height;
+          var context = canvas.getContext('2d');
+          context.drawImage(image, 0, 0, image.width, image.height);
+          var quality = 1;
+          //这里的dataurl就是base64类型
+          let dataURL = canvas.toDataURL('image/png', quality); //使用toDataUrl将图片转换成jpeg的格式,不要把图片压缩成png,因为压缩成png后base64的字符串可能比不转换前的长!
+          resolve(dataURL);
+        };
+
+        image.onerror = () => {
+          reject(new Error('图像加载失败'));
+        };
+      });
+    },
+    filterText(index) {
+      if (index == 0) {
+        return '明日工作计划';
+      } else {
+        return '今日机会与挑战总结';
+      }
+    },
+    htmlToCanvas() {
+      html2canvas(this.$refs.shareContent, {
+        scale: window.devicePixelRatio || 1,
+        useCORS: true,
+        allowTaint: false,
+        backgroundColor: null,
+        logging: false, // 关闭日志提升性能
+        onclone: (clonedDoc) => {
+          // 确保克隆的DOM保持原始样式
+          clonedDoc.getElementById('html2canvas').style.overflow = 'auto';
+        },
+      })
+        .then((canvas) => {
+          this.toastLoading().clear();
+          let imageUrl = canvas.toDataURL('image/png');
+          this.canvasImageUrl = imageUrl;
+
+          // 图片加载完成后设置滚动容器高度
+          const img = new Image();
+          img.onload = () => {
+            const scrollContainer = this.$refs.html2canvas.querySelector('.scroll-container');
+            // 根据图片实际高度设置容器高度(增加20px缓冲)
+            // 根据设备像素比调整图片高度
+            // 使用实际渲染高度而非原始图片高度
+            const imgHeight = img.offsetHeight + 20;
+            // 设置容器最小高度保证内容显示,同时允许自动扩展
+            scrollContainer.style.minHeight = `${imgHeight}px`;
+            // 保持父容器为可见滚动
+            scrollContainer.parentElement.style.overflow = 'visible';
+            // 强制浏览器重排
+            scrollContainer.style.display = 'none';
+            scrollContainer.offsetHeight; // 触发重排
+            scrollContainer.style.display = 'block';
+
+            // 添加移动端滚动优化
+            requestAnimationFrame(() => {
+              scrollContainer.style.overflow = 'auto';
+              scrollContainer.style.overflowScrolling = 'touch';
+              scrollContainer.style.webkitOverflowScrolling = 'touch';
+              scrollContainer.style.overscrollBehavior = 'contain';
+              scrollContainer.style.touchAction = 'pan-y';
+            });
+          };
+          img.src = imageUrl;
+          this.zIndex = 9;
+          this.$emit('setShareImg', true);
+        })
+        .catch((error) => {
+          this.toastLoading().clear();
+          console.error('html2canvas error:', error);
+          this.$toast('生成分享图失败,请稍后重试');
+        });
+    },
+    creatQrCode() {
+      // let proText = 'https://suishenbang.nipponpaint.com.cn';
+      let path =
+        process.env.VUE_APP_Target +
+          '/mobile/dailyHistoricalDetails&source=share&reportId=' +
+          this.reportId || '';
+      var qrcode = new QRCode(this.$refs.QRcodes, {
+        text: process.env.VUE_APP_SSB_LINK + '/homeIndex?path=' + path,
+        colorDark: '#000000',
+        colorLight: 'rgba(255,255,255,0)', // 完全透明背景
+        correctLevel: QRCode.CorrectLevel.H,
+        width: 140, // 固定尺寸保证安卓一致性
+        height: 140,
+        margin: 2,
+        render: 'canvas',
+        onRenderingEnd: () => {
+          const canvas = this.$refs.QRcodes.querySelector('canvas');
+          // 显式设置物理像素尺寸
+          const dpr = window.devicePixelRatio || 1;
+          canvas.width = 200 * dpr;
+          canvas.height = 200 * dpr;
+
+          // 设置CSS显示尺寸保持200x200
+          canvas.style.width = '200px';
+          canvas.style.height = '200px';
+
+          // 优化安卓设备显示
+          canvas.style.imageRendering = 'pixelated';
+          canvas.style.transform = 'translateZ(0)'; // 触发硬件加速
+          canvas.style.backgroundColor = '#fff';
+
+          // 调整画布缩放比例
+          const ctx = canvas.getContext('2d');
+          ctx.scale(dpr, dpr);
+        },
+      });
+    },
+    closeShare() {
+      this.canvasImageUrl = '';
+      this.$emit('setShareImg', false);
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.share {
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  background: #fff;
+  position: fixed;
+  top: 0;
+
+  .share-content {
+    background: url('../assets/shareBack.png') no-repeat center center;
+    background-size: cover;
+    background-attachment: local;
+    width: 100%;
+    padding: vw(30);
+    position: absolute;
+    padding-bottom: vw(190);
+    top: 0;
+    z-index: -10;
+  }
+
+  .header {
+    display: flex;
+    justify-content: space-between;
+    padding-bottom: vw(40);
+
+    .left-icon {
+      width: vw(114);
+      height: vw(71);
+    }
+
+    .right-icon {
+      width: vw(230);
+      height: vw(78);
+    }
+
+    img {
+      width: 100%;
+      height: 100%;
+    }
+  }
+  .title-box {
+    position: relative;
+    width: 100%;
+    height: auto;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    top: -6px;
+    .title {
+      // width: vw(262);
+      // height: vw(115);
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      align-items: center;
+      color: #600d0e;
+      font-weight: bold;
+      text-align: center;
+      // background: url('../assets/titleBack.png') no-repeat;
+      // background-size: 100% 100%;
+      padding: vw(20) vw(30);
+      background-color: #ecdd9a;
+      border-radius: 6px 6px 25px 25px;
+      .name {
+        font-size: vw(36);
+      }
+      .date {
+        font-size: vw(28);
+      }
+    }
+  }
+
+  .summaryDay {
+    background: url('../assets/summaryDay.png') no-repeat;
+    background-size: 100%;
+    padding: vw(24);
+    position: relative;
+    margin-top: vw(55);
+    border-radius: 0 0 vw(35) vw(35);
+    padding-top: 0;
+    .text {
+      background: url('../assets/textBack.png') no-repeat;
+      width: 100%;
+      height: vw(94);
+      background-size: cover;
+      color: #7d0207;
+      font-size: vw(36);
+      text-align: center;
+      line-height: vw(94);
+      // margin-top: vw(152);
+      // margin-bottom: vw(45);
+      margin: vw(35) 0;
+      font-weight: bold;
+    }
+
+    .content {
+      font-size: vw(28);
+      font-weight: bold;
+      color: #ffff;
+      line-height: vw(63);
+      white-space: pre-wrap;
+    }
+
+    .content-photos {
+      display: flex;
+      flex-wrap: wrap;
+      //   justify-content: space-between;
+
+      img {
+        width: 30%;
+        height: vw(188);
+        margin-bottom: 15px;
+        margin-right: 5%;
+        background-color: rgba(255, 255, 255, 0.1);
+        &:nth-child(3n) {
+          margin-right: 0;
+        }
+      }
+    }
+  }
+  .comment {
+    .title {
+      // background: url('../assets/comment.png') no-repeat;
+      // background-size: 100% 100%;
+      background-color: #032371;
+      border-radius: 6px 6px 25px 25px;
+      color: #e6cd78;
+    }
+    .commentMessage {
+      padding: vw(60) 0;
+      font-family: PingFang-SC-Medium;
+      font-size: vw(28);
+      font-weight: bold;
+      color: #ffffff;
+    }
+  }
+
+  .footerShare {
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    margin-top: vw(100);
+
+    .right-text {
+      // margin-left: vw(12.5);
+      display: flex;
+      // flex-direction: column;
+      // justify-content: space-between;
+      align-items: center;
+      justify-content: center;
+      padding: vw(10) 0;
+      div {
+        color: #ffffff;
+        font-size: vw(30);
+        font-weight: bold;
+      }
+    }
+  }
+  .html2canvasBox {
+    width: 100%;
+    height: 100%;
+    min-height: auto;
+    min-height: 100vh;
+    overflow: hidden !important;
+    display: flex;
+    flex-direction: column;
+    .shareHeader {
+      position: absolute;
+      z-index: 1;
+      top: 10px;
+      width: 100%;
+      display: flex;
+      align-items: center;
+      padding: 0 vw(30);
+      .closeShare {
+        // position: absolute;
+        // z-index: 1;
+        // right: 10px;
+        // top: 10px;
+        color: #fff;
+        .van-icon {
+          font-size: vw(40);
+        }
+      }
+      .shareTips {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        color: #f8f8fa;
+        width: 90%;
+        // flex: 1;
+        margin-right: 10px;
+        background: rgba(157, 157, 188, 0.8);
+        height: vw(60);
+        font-weight: 600;
+        font-size: vw(26);
+        img {
+          width: 100%;
+          // height: vw(60);
+        }
+      }
+    }
+  }
+  #html2canvas {
+    width: 100%;
+    height: 100%;
+    position: static; /* 改为静态定位 */
+
+    .scroll-container {
+      width: 100%;
+      height: 100%;
+      flex: 1;
+      overflow-y: auto !important;
+      -webkit-overflow-scrolling: touch;
+      overscroll-behavior: contain;
+      touch-action: pan-y;
+      // padding: 20px 0;
+      box-sizing: border-box;
+      /* 修复iOS弹性滚动 */
+      overflow-scrolling: touch;
+      max-height: 100vh; /* 添加最大高度限制 */
+      position: relative; /* 修复定位上下文 */
+      img {
+        width: 100%;
+        display: block;
+      }
+    }
+  }
+}
+</style>
+<style lang="scss">
+.share {
+  .QRcodes {
+    width: 140px; /* 固定像素尺寸 */
+    height: 140px;
+    margin-right: 12px;
+    position: relative;
+    background: #ffffff;
+    image-rendering: crisp-edges;
+    image-rendering: -webkit-optimize-contrast; /* 安卓浏览器兼容 */
+    // padding: 2px;
+    .logo {
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%, -50%);
+      width: 40px;
+      height: 40px;
+      img {
+        width: 100% !important;
+        height: 100% !important;
+        object-fit: contain;
+      }
+      z-index: 3;
+    }
+
+    img {
+      width: 100%;
+      height: 100%;
+    }
+  }
+}
+</style>

+ 638 - 0
src/components/share.vue

@@ -0,0 +1,638 @@
+<template>
+  <div class="share" :style="{ 'z-index': zIndex }">
+    <!-- canvasImageUrl canvase 渲染成功后删除原始元素,避免当前页面元素太多出现卡顿 -->
+    <div class="share-content" ref="shareContent">
+      <!-- <div class="share-content" ref="shareContent" v-if="!canvasImageUrl"> -->
+      <div class="header">
+        <div class="left-icon">
+          <img :src="require('@/assets/shareLeft.png')" />
+        </div>
+        <div class="right-icon">
+          <img :src="require('@/assets/shareRight.png')" />
+        </div>
+      </div>
+      <!-- 点评 -->
+      <!-- <template v-for="item in reportTarget.reportRemarks"> -->
+      <div
+        class="comment summaryDay"
+        v-if="
+          reportRemarksIndex != -1 &&
+          reportTarget.reportRemarks &&
+          reportTarget.reportRemarks.length
+        ">
+        <div class="title-box">
+          <div class="title">
+            <div class="name">
+              {{ reportTarget.reportRemarks[reportRemarksIndex].nickName }}点评
+            </div>
+            <div class="date">
+              {{
+                reportTarget.reportRemarks[reportRemarksIndex].createTime
+                  ? formatChineseDate(
+                      reportTarget.reportRemarks[reportRemarksIndex].createTime.split(' ')[0]
+                    )
+                  : ''
+              }}
+            </div>
+          </div>
+        </div>
+        <div class="commentMessage">
+          {{ reportTarget.reportRemarks[reportRemarksIndex].remarkContent }}
+        </div>
+      </div>
+      <!-- </template> -->
+      <!-- 内容 -->
+      <div class="summaryDay">
+        <div class="title-box">
+          <div class="title">
+            <div class="name">{{ reportTarget.nickName }}的日报</div>
+            <div class="date">
+              {{
+                reportTarget.commitTime
+                  ? formatChineseDate(reportTarget.commitTime.split(' ')[0])
+                  : ''
+              }}
+            </div>
+          </div>
+        </div>
+        <!-- <template
+          v-for="(item, index) in reportTarget.reportContents"
+          v-if="reportTarget.reportContents && reportTarget.reportContents.length > 0">
+          <div :class="['text']">{{ filterText(index) }}</div>
+          <div class="content">{{ item.dayContent }}</div>
+        </template> -->
+        <template v-if="checkedPlan">
+          <div :class="['text']">今日机会与挑战总结</div>
+          <div class="content">
+            {{
+              reportTarget.reportContents.length ? reportTarget.reportContents[0].dayContent : ''
+            }}
+          </div>
+          <div :class="['text']">明日工作计划</div>
+          <div class="content">
+            {{
+              reportTarget.reportContents.length ? reportTarget.reportContents[1].dayContent : ''
+            }}
+          </div>
+        </template>
+        <template v-if="photosData && photosData.length">
+          <div class="text">今日拜访照片</div>
+          <div class="content-photos">
+            <template v-for="item in photosData">
+              <img
+                :src="'data:image/jpg;base64,' + item"
+                crossorigin="anonymous"
+                referrerpolicy="no-referrer"
+                alt=""
+                style="display: block" />
+            </template>
+            <!-- <template v-for="item in urlList">
+            <img
+              :src="item + '&' + new Date().getTime()"
+              crossOrigin="anonymous"
+              referrerpolicy="no-referrer"
+              alt=""
+              style="display: block" />
+          </template> -->
+          </div>
+        </template>
+      </div>
+      <div class="footerShare">
+        <div class="right-text">
+          <div>长按识别二维码查看详情&点评</div>
+          <div></div>
+        </div>
+        <vue-qr
+          class="QRcodes"
+          :callback="QRCallback"
+          :text="vueQrText"
+          :dotScale="0.8"
+          :margin="8"
+          :logoSrc="require('@/assets/logo1.png')"
+          :logoMargin="2"></vue-qr>
+      </div>
+    </div>
+    <div
+      class="share-mask"
+      style="background: #000; position: fixed; top: 0; width: 100%; height: 100%"></div>
+    <div class="html2canvasBox">
+      <div id="html2canvas" ref="html2canvas">
+        <div class="scroll-container">
+          <div style="position: relative">
+            <div class="shareHeader">
+              <div class="shareTips">
+                长按图片可下载、收藏、转发
+                <!-- <img :src="require('@/assets/shareTips.png')" alt="" /> -->
+              </div>
+              <!-- <div class="closeShare" @click="closeShare"><van-icon name="close" /></div> -->
+              <div class="closeShare" @click="closeShare">返回</div>
+            </div>
+            <img :src="canvasImageUrl" width="100%" class="canvasImage" />
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import html2canvas from 'html2canvas';
+import { imgToBase64 } from '@/api/index';
+import VueQr from 'vue-qr';
+export default {
+  name: 'share',
+  components: { VueQr },
+  props: {
+    // 日报数据
+    reportTarget: {
+      type: Object,
+      default() {
+        return {};
+      },
+    },
+    //日报id
+    reportId: {
+      type: [String, Number],
+    },
+    // 点评数据
+    reportRemarksIndex: {
+      type: Number,
+      default: -1,
+    },
+    // 图片转换列表
+    urlList: {
+      type: Array,
+      default() {
+        return [];
+      },
+    },
+    // 是否显示 今日总结&明日规划
+    checkedPlan: {
+      type: Boolean,
+      default: true,
+    },
+  },
+  data() {
+    return {
+      canvasImageUrl: '',
+      retryCount: 0,
+      photosData: [],
+      zIndex: -1,
+      qrcode: null,
+      vueQrText: '',
+      heightFlag: 'start', //图片高度不足,居中显示
+    };
+  },
+  created() {
+    this.zIndex = -1;
+    this.canvasImageUrl = '';
+    let links = process.env.NODE_ENV == 'production' ? ' http://1.npz.cn/3/' : 'http://1.npz.cn/2/';
+    this.vueQrText = links + this.reportId;
+    this.toastLoading(0, '生成中...', true);
+  },
+  methods: {
+    // 初始化会先执行二维码生成,成功后回调
+    QRCallback() {
+      // 二维码
+      if (this.urlList.length) {
+        imgToBase64({ urlList: this.urlList }).then((res) => {
+          if (res.data && res.code == 200) {
+            this.photosData = res.data;
+            this.$nextTick(async () => {
+              await this.htmlToCanvas();
+            });
+          } else {
+            this.$toast(res.msg);
+            this.$nextTick(async () => {
+              await this.htmlToCanvas();
+            });
+          }
+        });
+      } else {
+        this.$nextTick(async () => {
+          await this.htmlToCanvas();
+        });
+      }
+    },
+    //异步执行
+    imageUrlToBase64(imageUrl) {
+      return new Promise((resolve, reject) => {
+        //一定要设置为let,不然图片不显示
+        let image = new Image();
+        //解决跨域问题
+        image.setAttribute('crossOrigin', 'anonymous');
+        image.src = imageUrl;
+        image.onload = () => {
+          var canvas = document.createElement('canvas');
+          canvas.width = image.width;
+          canvas.height = image.height;
+          var context = canvas.getContext('2d');
+          context.drawImage(image, 0, 0, image.width, image.height);
+          var quality = 1;
+          //这里的dataurl就是base64类型
+          let dataURL = canvas.toDataURL('image/png', quality); //使用toDataUrl将图片转换成jpeg的格式,不要把图片压缩成png,因为压缩成png后base64的字符串可能比不转换前的长!
+          resolve(dataURL);
+        };
+
+        image.onerror = () => {
+          reject(new Error('图像加载失败'));
+        };
+      });
+    },
+    filterText(index) {
+      if (index == 0) {
+        return '明日工作计划';
+      } else {
+        return '今日机会与挑战总结';
+      }
+    },
+    htmlToCanvas() {
+      html2canvas(this.$refs.shareContent, {
+        scale: window.devicePixelRatio || 1,
+        useCORS: true,
+        allowTaint: false,
+        backgroundColor: null,
+        logging: false, // 关闭日志提升性能
+        // onclone: (clonedDoc) => {
+        //   // 确保克隆的DOM保持原始样式
+        //   clonedDoc.getElementById('html2canvas').style.overflow = 'auto';
+        // },
+        // ignoreElements: (e) => {
+        //   if (
+        //     e.contains(element) ||
+        //     element.contains(e) ||
+        //     e.tagName === 'STYLE' ||
+        //     e.tagName === 'LINK' ||
+        //     e.getAttribute('data-html2canvas') != null // header里面的样式不能筛掉
+        //   ) {
+        //     console.log(e);
+        //     return false;
+        //   }
+        //   return true;
+        // },
+      })
+        .then((canvas) => {
+          this.toastLoading().clear();
+          let imageUrl = canvas.toDataURL('image/png');
+          this.canvasImageUrl = imageUrl;
+
+          // 图片加载完成后设置滚动容器高度
+          const img = new Image();
+          img.onload = () => {
+            const canvasImage = this.$refs.html2canvas.querySelector('.canvasImage');
+            const scrollContainer = this.$refs.html2canvas.querySelector('.scroll-container');
+            const shareHeader = this.$refs.html2canvas.querySelector('.shareHeader');
+            console.log(scrollContainer.style);
+            if (canvasImage.height < window.innerHeight) {
+              scrollContainer.style.alignItems = 'center';
+              shareHeader.style.position = 'absolute';
+            } else {
+              scrollContainer.style.alignItems = 'start';
+              shareHeader.style.position = 'fixed';
+            }
+            this.$forceUpdate();
+            // // 根据图片实际高度设置容器高度(增加20px缓冲)
+            // // 根据设备像素比调整图片高度
+            // // 使用实际渲染高度而非原始图片高度
+            // const imgHeight = img.offsetHeight + 20;
+            // // 设置容器最小高度保证内容显示,同时允许自动扩展
+            // scrollContainer.style.minHeight = `${imgHeight}px`;
+            // // 保持父容器为可见滚动
+            // scrollContainer.parentElement.style.overflow = 'visible';
+            // // 强制浏览器重排
+            // scrollContainer.style.display = 'none';
+            // scrollContainer.offsetHeight; // 触发重排
+            // scrollContainer.style.display = 'block';
+
+            // // 添加移动端滚动优化
+            // requestAnimationFrame(() => {
+            //   scrollContainer.style.overflow = 'auto';
+            //   scrollContainer.style.overflowScrolling = 'touch';
+            //   scrollContainer.style.webkitOverflowScrolling = 'touch';
+            //   scrollContainer.style.overscrollBehavior = 'contain';
+            //   scrollContainer.style.touchAction = 'pan-y';
+            // });
+          };
+          img.src = imageUrl;
+          this.zIndex = 9;
+          this.$emit('setShareImg', true);
+          this.$emit('setDailyDetailsBox', false);
+        })
+        .catch((error) => {
+          this.toastLoading().clear();
+          console.error('html2canvas error:', error);
+          this.$toast('生成分享图失败,请稍后重试');
+        });
+    },
+    closeShare() {
+      this.canvasImageUrl = '';
+      this.$emit('setShareImg', false);
+      this.$emit('setDailyDetailsBox', true);
+    },
+  },
+  beforeDestroy() {
+    // 组件销毁时清除实例
+    if (this.qrcode) {
+      this.$refs.qrcode.innerHTML = '';
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.share {
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  background: #fff;
+  position: fixed;
+  top: 0;
+
+  .share-content {
+    background: url('../assets/shareBack.webp') no-repeat center;
+    background-size: 100% 100%;
+    // background-attachment: local;
+    width: 100%;
+    // min-height: 100%;
+    padding: vw(30);
+    position: absolute;
+    // padding-bottom: vw(30);
+    top: 0;
+    z-index: -10;
+  }
+
+  .header {
+    display: flex;
+    justify-content: space-between;
+    padding-bottom: vw(40);
+
+    .left-icon {
+      width: vw(114);
+      height: vw(71);
+    }
+
+    .right-icon {
+      width: vw(230);
+      height: vw(78);
+    }
+
+    img {
+      width: 100%;
+      height: 100%;
+    }
+  }
+  .title-box {
+    position: relative;
+    width: 100%;
+    height: auto;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    top: -6px;
+    .title {
+      // width: vw(262);
+      // height: vw(115);
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      align-items: center;
+      color: #600d0e;
+      font-weight: bold;
+      text-align: center;
+      // background: url('../assets/titleBack.png') no-repeat;
+      // background-size: 100% 100%;
+      padding: vw(20) vw(30);
+      background-color: #ecdd9a;
+      border-radius: 6px 6px 25px 25px;
+      .name {
+        font-size: vw(36);
+      }
+      .date {
+        font-size: vw(28);
+      }
+    }
+  }
+
+  .summaryDay {
+    background: url('../assets/summaryDay.png') no-repeat;
+    background-size: 100%;
+    padding: vw(24);
+    position: relative;
+    margin-top: vw(55);
+    border-radius: 0 0 vw(35) vw(35);
+    padding-top: 0;
+    .text {
+      background: url('../assets/textBack.png') no-repeat;
+      width: 100%;
+      height: vw(94);
+      background-size: cover;
+      color: #7d0207;
+      font-size: vw(36);
+      text-align: center;
+      line-height: vw(94);
+      // margin-top: vw(152);
+      // margin-bottom: vw(45);
+      margin: vw(35) 0;
+      font-weight: bold;
+    }
+
+    .content {
+      font-size: vw(28);
+      font-weight: bold;
+      color: #ffff;
+      line-height: vw(63);
+      white-space: pre-wrap;
+    }
+
+    .content-photos {
+      display: flex;
+      flex-wrap: wrap;
+      //   justify-content: space-between;
+
+      img {
+        // width: 47.5%;
+        // height: 42vw;
+        width: 30%;
+        height: vw(188);
+        margin-bottom: 15px;
+        margin-right: 5%;
+        background-color: rgba(255, 255, 255, 0.1);
+        &:nth-child(3n) {
+          margin-right: 0;
+        }
+      }
+    }
+  }
+  .comment {
+    .title {
+      // background: url('../assets/comment.png') no-repeat;
+      // background-size: 100% 100%;
+      background-color: #032371;
+      border-radius: 6px 6px 25px 25px;
+      color: #e6cd78;
+    }
+    .commentMessage {
+      padding: vw(60) 0;
+      font-family: PingFang-SC-Medium;
+      font-size: vw(28);
+      font-weight: bold;
+      color: #ffffff;
+    }
+  }
+
+  .footerShare {
+    // position: absolute;
+    display: flex;
+    // align-items: center;
+    justify-content: flex-end;
+    margin-top: vw(30);
+    margin-right: 2px;
+
+    .right-text {
+      // margin-left: vw(12.5);
+      display: flex;
+      flex-direction: column;
+      justify-content: space-between;
+      margin-right: vw(24);
+
+      div {
+        color: #ffffff;
+        font-size: vw(26);
+        // font-weight: bold;
+        padding: 6px 0;
+      }
+    }
+    // display: flex;
+    // flex-direction: column;
+    // justify-content: center;
+    // align-items: center;
+    // margin-top: vw(100);
+
+    // .right-text {
+    //   // margin-left: vw(12.5);
+    //   display: flex;
+    //   // flex-direction: column;
+    //   // justify-content: space-between;
+    //   align-items: center;
+    //   justify-content: center;
+    //   padding: vw(10) 0;
+    //   div {
+    //     color: #ffffff;
+    //     font-size: vw(30);
+    //     font-weight: bold;
+    //   }
+    // }
+  }
+  .html2canvasBox {
+    width: 100%;
+    height: 100%;
+    min-height: auto;
+    min-height: 100vh;
+    overflow: hidden !important;
+    display: flex;
+    flex-direction: column;
+  }
+  #html2canvas {
+    width: 100%;
+    height: 100%;
+    position: static; /* 改为静态定位 */
+
+    .scroll-container {
+      width: 100%;
+      height: 100%;
+      flex: 1;
+      overflow-y: auto !important;
+      -webkit-overflow-scrolling: touch;
+      overscroll-behavior: contain;
+      touch-action: pan-y;
+      // padding: 20px 0;
+      box-sizing: border-box;
+      /* 修复iOS弹性滚动 */
+      overflow-scrolling: touch;
+      max-height: 100vh; /* 添加最大高度限制 */
+      position: relative; /* 修复定位上下文 */
+      display: flex;
+      // align-items: start;
+      img {
+        width: 100%;
+        display: block;
+      }
+      .shareHeader {
+        position: absolute;
+        z-index: 1;
+        top: 10px;
+        width: 100%;
+        display: flex;
+        align-items: center;
+        padding: 0 vw(30);
+        .closeShare {
+          // position: absolute;
+          // z-index: 1;
+          // right: 10px;
+          // top: 10px;
+          color: #fff;
+          font-size: vw(30);
+          background: #a2819c;
+          text-align: center;
+          line-height: 28px;
+          border-radius: 6px;
+          padding: 0 7px;
+          border: 2px solid #11224e;
+          .van-icon {
+            font-size: vw(40);
+          }
+        }
+        .shareTips {
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          color: #f8f8fa;
+          width: 82%;
+          // flex: 1;
+          margin-right: 10px;
+          background: rgba(157, 157, 188, 0.8);
+          height: vw(60);
+          font-weight: 600;
+          font-size: vw(26);
+          img {
+            width: 100%;
+            // height: vw(60);
+          }
+        }
+      }
+    }
+  }
+}
+</style>
+<style lang="scss">
+.share {
+  .QRcodes {
+    width: 45px; /* 固定像素尺寸 */
+    height: 45px;
+    position: relative;
+    background: #ffffff;
+    image-rendering: crisp-edges;
+    image-rendering: -webkit-optimize-contrast; /* 安卓浏览器兼容 */
+    // padding: 2px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    border-radius: 3px;
+    .logo {
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%, -50%);
+      width: 10px;
+      height: 10px;
+      img {
+        object-fit: contain;
+      }
+      z-index: 3;
+    }
+
+    img {
+      width: 100%;
+      height: 100%;
+    }
+  }
+}
+</style>

+ 63 - 34
src/components/uploadVTask.vue

@@ -56,11 +56,17 @@ export default {
       type: Boolean,
       default: false,
     },
+    item: {
+      type: Object,
+      default: {},
+    },
   },
   data() {
     return {
       shows: false,
       url: '',
+      addressesRemark: '',
+      localIdsArr: [],
     };
   },
   methods: {
@@ -72,7 +78,7 @@ export default {
       let that = this;
       let wx = this.wx;
       let qiyeData;
-      let addressesRemark = '';
+      this.addressesRemark = '';
       var map = new TMap.Map('allmap', {
         zoom: 14,
         center: new TMap.LatLng(39.986785, 116.301012),
@@ -119,10 +125,10 @@ export default {
                   geocoder.getAddress({ location: location }).then(
                     function (result) {
                       var addresses = result.result.formatted_addresses;
-                      addressesRemark = addresses.recommend;
+                      that.addressesRemark = addresses.recommend;
                     },
                     function (err) {
-                      addressesRemark = '';
+                      that.addressesRemark = '';
                     }
                   );
                 },
@@ -133,42 +139,53 @@ export default {
                 },
               });
               wx.chooseImage({
-                count: 1,
+                count: 5,
                 sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
                 sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
                 defaultCameraMode: 'normal', //表示进入拍照界面的默认模式,目前有normal与batch两种选择,normal表示普通单拍模式,batch表示连拍模式,不传该参数则为normal模式。从3.0.26版本开始支持front和batch_front两种值,其中front表示默认为前置摄像头单拍模式,batch_front表示默认为前置摄像头连拍模式。(注:用户进入拍照界面仍然可自由切换两种模式)
                 isSaveToAlbum: 0,
                 success: function (res) {
-                  var localIds = '';
-                  if (res.localIds != undefined) {
-                    localIds = res.localIds[0];
-                  } else {
-                    localIds = res.localId;
-                  }
+                  let localIds = res.localIds;
                   // andriod中localId可以作为img标签的src属性显示图片;
                   // iOS应当使用 getLocalImgData 获取图片base64数据,从而用于img标签的显示(在img标签内使用 wx.chooseImage 的 localid 显示可能会不成功)
-                  wx.uploadImage({
-                    localId: localIds, // 需要上传的图片的本地ID,由chooseImage接口获得
-                    isShowProgressTips: 1, // 默认为1,显示进度提示
-                    success: function (res) {
-                      that.uploadImagev(res.serverId, addressesRemark);
-                    },
-                  });
+                  that.localIdsArr = [];
+                  that.syncUpload(localIds);
+                  // wx.uploadImage({
+                  //   localId: localIds, // 需要上传的图片的本地ID,由chooseImage接口获得
+                  //   isShowProgressTips: 1, // 默认为1,显示进度提示
+                  //   success: function (res) {
+                  //     that.uploadImagev(res.serverId, addressesRemark);
+                  //   },
+                  // });
                 },
               });
             });
           }
         });
     },
-    uploadImagev(meidaId, addressesRemark) {
-      var that = this;
+    syncUpload(localIds) {
+      if (!localIds.length) {
+        this.uploadImagev(this.localIdsArr);
+      } else {
+        var localId = localIds.pop();
+        wx.uploadImage({
+          localId: localId,
+          isShowProgressTips: 1, // 默认为1,显示进度提示
+          success: (res) => {
+            this.localIdsArr.push(res.serverId);
+            this.syncUpload(localIds);
+          },
+        });
+      }
+    },
+    uploadImagev(meidaIds) {
       var form = {
-        mediaId: meidaId,
-        customId: that.customId,
-        summaryId: that.summaryId,
-        locationRemark: addressesRemark,
+        mediaIds: meidaIds,
+        customId: this.customId,
+        summaryId: this.summaryId,
+        locationRemark: this.addressesRemark,
       };
-      var loind1 = that.$toast.loading({
+      var loind1 = this.$toast.loading({
         duration: 0,
         message: '上传中...',
         forbidClick: true,
@@ -179,19 +196,31 @@ export default {
       }
       addPhotov(form).then((res) => {
         if (res.code == 200) {
-          that.imgArr = res.data.url;
+          // that.imgArr = res.data.url;
           loind1.clear();
-          that.$toast('上传成功!');
-          that.$emit('newimgarr', {
-            fileUrl: res.data.url,
-            id: res.data.fileId,
-            fileType: res.fileType,
-            fileName: res.fileName,
-            type: that.type,
-            index: that.indexImg,
+          this.$toast('上传成功!');
+          let urlArr = [];
+          let idArr = [];
+          res.data.forEach((val) => {
+            urlArr.push({
+              fileUrl: val.url,
+              id: val.fileId,
+              // fileType: val.fileType,
+              // fileName: val.fileName,
+              type: this.type,
+              index: this.indexImg,
+            });
+            idArr.push(val.fileId);
           });
+          if (this.item.fileInfoList == null || this.item.fileInfoList == undefined) {
+            this.item.fileInfoList = [];
+            this.item.fileIdList = [];
+          }
+          this.item.fileInfoList = this.item.fileInfoList.concat(urlArr);
+          this.item.fileIdList = this.item.fileIdList.concat(idArr);
+          this.$emit('newimgarr');
         } else {
-          that.$toast('上传失败!');
+          this.$toast('上传失败!');
         }
       });
     },

+ 2 - 0
src/main.js

@@ -17,6 +17,7 @@ import {
   gcj02BD,
   verifyStoreType,
   validatePhone,
+  formatChineseDate,
 } from '@/utils/index';
 import { toastLoading } from '@/utils/commonVant';
 import '@vant/touch-emulator';
@@ -62,6 +63,7 @@ Vue.prototype.parseTimeParagraph = parseTimeParagraph;
 Vue.prototype.Micrometer = Micrometer;
 Vue.prototype.verifyStoreType = verifyStoreType;
 Vue.prototype.validatePhone = validatePhone;
+Vue.prototype.formatChineseDate = formatChineseDate;
 Vue.prototype.Toast = Toast;
 Vue.prototype.notify = Notify;
 var clipboard = new ClipboardJS('.btn');

+ 4 - 0
src/permission.js

@@ -4,6 +4,10 @@ import store from './store';
 const whiteList = ['/login', '/auth-redirect', '/bind', '/register'];
 
 router.beforeEach((to, from, next) => {
+  let queryLoginName = to.query.loginName || null;
+  if (queryLoginName) {
+    localStorage.setItem('loginName', queryLoginName);
+  }
   const username = localStorage.getItem('loginName');
   if (username) {
     /* has token*/

+ 5 - 0
src/router/index.js

@@ -435,6 +435,11 @@ const router = new VueRouter({
           name: 'VisitSummaryDetail',
           component: () => import('@/views/week/VisitSummaryDetail.vue'),
         },
+        {
+          path: '/VisitSummaryStorageDetail',
+          name: 'VisitSummaryStorageDetail',
+          component: () => import('@/views/week/VisitSummaryStorageDetail.vue'),
+        },
         {
           path: '/assignAwait',
           name: 'assignAwait',

+ 9 - 2
src/utils/TXApiFun.js

@@ -96,8 +96,14 @@ export function getTicketFun(jsApiList = ['getLocation'], configType = 'config')
   return new Promise((resolve, reject) => {
     // 当前页面
     let url = window.location.href;
+    let params = {
+      url: url,
+    };
+    if (configType == 'agentConfig') {
+      params.agent = 1;
+    }
     //  获取签名
-    getTicket({ url: url }).then((response) => {
+    getTicket(params).then((response) => {
       console.log(response);
       toastLoading().clear();
       if (response.code == 200) {
@@ -124,9 +130,10 @@ export function getTicketFun(jsApiList = ['getLocation'], configType = 'config')
             jsApiList: [...jsApiList], //必填,传入需要使用的接口名称
             success: function (res) {
               console.log('获取签名成功');
-              resolve('获取签名成功');
+              resolve(qiyeData);
             },
             fail: function (res) {
+              console.log(res);
               if (res.errMsg.indexOf('function not exist') > -1) {
                 alert('版本过低请升级');
               }

+ 0 - 22
src/utils/ali-oss.js

@@ -1,22 +0,0 @@
-const OSS = require('ali-oss');
-
-// aliyun:
-//   oss:
-//     endpoint: oss-cn-shanghai-internal.aliyuncs.com # oss对外服务的访问域名
-//     cdnpoint: cdn-svs-test.nipponpaint.com.cn
-//     accessKeyId: LTAI5tG1DTJFA16BHkzHVxjz # 访问身份验证中用到用户标识
-//     accessKeySecret: 5brWKKEACiUsKPJeUXlB7r2iZGQHNF # 用户用于加密签名字符串和oss用来验证签名字符串的密钥
-//     bucketName: svs-test
-//     publicRead: false
-const client = new OSS({
-  // 从环境变量中获取访问凭证。运行本代码示例之前,请确保已设置环境变量OSS_ACCESS_KEY_ID和OSS_ACCESS_KEY_SECRET。
-  accessKeyId: process.env.VUE_APP_OSS_ACCESS_KEY_ID,
-  accessKeySecret: process.env.VUE_APP_OSS_ACCESS_KEY_SECRET,
-  // yourRegion填写Bucket所在地域。以华东1(杭州)为例,Region填写为oss-cn-hangzhou。
-  region: 'cdn-svs-test.nipponpaint.com.cn',
-  authorizationV4: true,
-  // yourBucketName填写Bucket名称。
-  bucket: 'svs-test',
-});
-
-export default client;

+ 26 - 0
src/utils/digest.js

@@ -0,0 +1,26 @@
+import Vue from 'vue';
+import { getTicketFun } from '@/utils/TXApiFun';
+// 微信JSSDK实例
+const wx = Vue.prototype.wx;
+import { wxLogin } from '@/api/digest';
+
+export function WXdigest() {
+  getTicketFun(['getCurExternalContact'], 'agentConfig')
+    .then((res) => {
+      // 获取用户code
+      // getWeChatCode();
+    })
+    .catch((err) => {
+      console.log(err);
+    });
+}
+
+function getWeChatCode() {
+  wx.invoke('getCurExternalContact', {}, (res) => {
+    if (res.err_msg === 'getCurExternalContact:ok') {
+      console.log(res);
+    } else {
+      console.log(res);
+    }
+  });
+}

+ 35 - 0
src/utils/index.js

@@ -52,6 +52,41 @@ export function parseTime(time, pattern) {
   }
 }
 // 千分号
+// 中文日期格式(年-月-日)
+export function formatChineseDate(time) {
+  // 统一处理日期格式
+  const formatDate = (dateObj) => {
+    const year = dateObj.getFullYear();
+    const month = (dateObj.getMonth() + 1).toString().padStart(2, '0');
+    const day = dateObj.getDate().toString().padStart(2, '0');
+    return `${year}年${month}月${day}日`;
+  };
+
+  // 处理字符串格式(支持多种分隔符)
+  if (typeof time === 'string') {
+    // 清理日期字符串中的时间部分(如果有)
+    const dateString = time.split(' ')[0];
+    // 匹配 yyyy-mm-dd 或 yyyy/m/d 等格式
+    if (/^\d{4}[-\/]\d{1,2}[-\/]\d{1,2}$/.test(dateString)) {
+      const separator = dateString.includes('-') ? '-' : '/';
+      const [year, month, day] = dateString.split(separator);
+      return formatDate(new Date(year, month - 1, day));
+    }
+  }
+
+  // 处理时间戳和Date对象
+  try {
+    const date = new Date(time);
+    if (!isNaN(date)) {
+      return formatDate(date);
+    }
+  } catch (e) {
+    console.error('Invalid date format:', time);
+  }
+
+  return '无效日期格式';
+}
+
 export function Micrometer(num) {
   if (num != null) {
     let numt = (num || 0).toString().split('.');

+ 0 - 50
src/utils/uploadAliOss copy.js

@@ -1,50 +0,0 @@
-import client from '@/utils/ali-oss';
-
-// 自定义请求头
-const headers = {
-  // 指定Object的存储类型。
-  'x-oss-storage-class': 'Standard',
-  // 指定Object的访问权限。
-  'x-oss-object-acl': 'private',
-  // 通过文件URL访问文件时,指定以附件形式下载文件,下载后的文件名称定义为example.txt。
-  'Content-Disposition': 'attachment; filename="example.txt"',
-  // 设置Object的标签,可同时设置多个标签。
-  'x-oss-tagging': 'Tag1=1&Tag2=2',
-  // 指定PutObject操作时是否覆盖同名目标Object。此处设置为true,表示禁止覆盖同名Object。
-  'x-oss-forbid-overwrite': 'true',
-};
-
-async function uploadAliOss(data) {
-  try {
-    // 填写OSS文件完整路径和本地文件的完整路径。OSS文件完整路径中不能包含Bucket名称。
-    // 如果本地文件的完整路径中未指定本地路径,则默认从示例程序所属项目对应本地路径中上传文件。
-    console.log(blobToFile(base64ToBlob(data), 'h5UploadAliOss'));
-    const result = await client.put(
-      'h5UploadAliOss', //获取一个随机的文件名
-      blobToFile(base64ToBlob(data), 'h5UploadAliOss') //base64转file对象
-      // { 'Content-Type': 'image/jpeg' } //设置Content-Type
-    );
-    console.log(result);
-  } catch (e) {
-    console.log(e);
-  }
-}
-export function base64ToBlob(base64Data) {
-  let arr = base64Data.split(','),
-    fileType = arr[0].match(/:(.*?);/)[1],
-    bstr = atob(arr[1]),
-    l = bstr.length,
-    u8Arr = new Uint8Array(l);
-  while (l--) {
-    u8Arr[l] = bstr.charCodeAt(l);
-  }
-  return new Blob([u8Arr], {
-    type: fileType,
-  });
-}
-export function blobToFile(newBlob, fileName) {
-  newBlob.lastModifiedDate = new Date();
-  newBlob.name = fileName;
-  return newBlob;
-}
-export default uploadAliOss;

+ 23 - 45
src/views/deviceOutside/index.vue

@@ -40,16 +40,24 @@
                   <!-- 金牌店ABC -->
                   <img
                     class="JPABC"
-                    :src="require('@/assets/Icon/JPA.png')"
-                    v-if="item.storeLabels.jpA" />
+                    :src="require('@/assets/Icon/storeA.png')"
+                    v-if="item.storeLabels.storeA" />
                   <img
                     class="JPABC"
-                    :src="require('@/assets/Icon/JPB.png')"
-                    v-if="item.storeLabels.jpB" />
+                    :src="require('@/assets/Icon/storeB.png')"
+                    v-if="item.storeLabels.storeB" />
                   <img
                     class="JPABC"
-                    :src="require('@/assets/Icon/JPC.png')"
-                    v-if="item.storeLabels.jpC" />
+                    :src="require('@/assets/Icon/storeC.png')"
+                    v-if="item.storeLabels.storeC" />
+                  <img
+                    class="JPABC"
+                    :src="require('@/assets/Icon/storeD.png')"
+                    v-if="item.storeLabels.storeD" />
+                  <img
+                    class="JPABC"
+                    :src="require('@/assets/Icon/storeE.png')"
+                    v-if="item.storeLabels.storeE" />
                 </template>
                 <span @click="goOtherSystem(item)" :style="setStroeNameStyle(item)">
                   <span>{{ item.storeName }}</span>
@@ -77,22 +85,6 @@
               <div class="info" style="position: relative">
                 联系人:{{ item.contactName }}
                 <div style="position: absolute; bottom: 0px; right: 0px">
-                  <!-- 金牌店ABC -->
-                  <!-- <el-popover
-                    popper-class="zpover"
-                    placement="bottom"
-                    width="120"
-                    trigger="click"
-                    :content="setJPABCContent(item)">
-                    <div
-                      v-if="setJPABCFlag(item)"
-                      class="visitStoreIco"
-                      style="background-color: #fff"
-                      slot="reference">
-                      <van-icon :name="require('@/assets/Icon/visitJPNum.png')" size="26" />
-                      <div class="JPVisitNum">{{ item.visitNum }}/{{ item.needVisitNum }}</div>
-                    </div>
-                  </el-popover> -->
                   <!-- 凤凰客户 -->
                   <el-popover
                     popper-class="zpover"
@@ -254,20 +246,25 @@
                         ">
                         {{ item.storeLabels.visitTimes }}
                       </p>
-                      <!-- A级金牌店拜访次数少于2 -->
+                      <!-- A级金牌店拜访次数少于needVisitNum 需要拜访的次数 -->
                       <van-icon
                         :name="require('@/assets/ordernumRed.png')"
                         size="26"
-                        v-if="item.storeLabels.jpA && item.storeLabels.visitTimes < 2" />
+                        v-if="
+                          item.storeLabels.storeA &&
+                          item.needVisitNum &&
+                          item.storeLabels.visitTimes < item.needVisitNum
+                        " />
+                      <!-- 其他门店拜访 -->
                       <van-icon :name="require('@/assets/ordernum.png')" size="26" v-else />
                     </div>
                     <p style="text-align: center; background: #fff; color: #000; padding: 5px 0">
                       本店本月己拜访过{{ item.storeLabels.visitTimes }}次
                     </p>
                     <p
-                      v-if="item.storeLabels.jpA"
+                      v-if="item.storeLabels.storeA && item.needVisitNum"
                       style="text-align: center; background: #fff; color: red; padding: 5px 0">
-                      A级金牌店拜访标准:1月2
+                      A级金牌店拜访标准:1月{{ item.needVisitNum }}
                     </p>
                     <el-table :data="item.userVisitTimesMap" border max-height="180px">
                       <el-table-column label="业务员" prop="userName" />
@@ -813,25 +810,6 @@ export default {
     );
   },
   methods: {
-    setJPABCFlag(item) {
-      // needVisitNum:需要拜访的次数;visitNum:本月已拜访次数
-      if (item.storeLabels.jpA && item.visitNum < item.needVisitNum) {
-        return true;
-      } else {
-        return false;
-      }
-    },
-    setJPABCContent(item) {
-      if (item.storeLabels.jpA) {
-        return 'A级金牌店拜访标准1月2次';
-      } else if (item.storeLabels.jpB) {
-        return 'B级金牌店拜访标准1月1次';
-      } else if (item.storeLabels.jpC) {
-        return 'C级金牌店拜访标准1月1次';
-      } else {
-        return '';
-      }
-    },
     handleTouch(e) {
       e._isScroller = true;
     },

+ 23 - 48
src/views/deviceOutside/rangeStore.vue

@@ -179,16 +179,24 @@
                 <!-- 金牌店ABC -->
                 <img
                   class="JPABC"
-                  :src="require('@/assets/Icon/JPA.png')"
-                  v-if="info.storeLabels.jpA" />
+                  :src="require('@/assets/Icon/storeA.png')"
+                  v-if="info.storeLabels.storeA" />
                 <img
                   class="JPABC"
-                  :src="require('@/assets/Icon/JPB.png')"
-                  v-if="info.storeLabels.jpB" />
+                  :src="require('@/assets/Icon/storeB.png')"
+                  v-if="info.storeLabels.storeB" />
                 <img
                   class="JPABC"
-                  :src="require('@/assets/Icon/JPC.png')"
-                  v-if="info.storeLabels.jpC" />
+                  :src="require('@/assets/Icon/storeC.png')"
+                  v-if="info.storeLabels.storeC" />
+                <img
+                  class="JPABC"
+                  :src="require('@/assets/Icon/storeD.png')"
+                  v-if="info.storeLabels.storeD" />
+                <img
+                  class="JPABC"
+                  :src="require('@/assets/Icon/storeE.png')"
+                  v-if="info.storeLabels.storeE" />
               </template>
               <span @click="goOtherSystem(info)" :style="setStroeNameStyle(info)">
                 <span>{{ info.storeName }}</span>
@@ -223,22 +231,6 @@
             <div class="text" style="position: relative">
               联系人:{{ info.contactName }}
               <div style="position: absolute; bottom: 0px; right: 10px; display: inline-block">
-                <!-- 金牌店ABC -->
-                <!-- <el-popover
-                  popper-class="zpover"
-                  placement="bottom"
-                  width="120"
-                  trigger="click"
-                  :content="setJPABCContent(info)">
-                  <div
-                    v-if="setJPABCFlag(info)"
-                    class="visitStoreIco"
-                    style="background-color: #fff"
-                    slot="reference">
-                    <van-icon :name="require('@/assets/Icon/visitJPNum.png')" size="26" />
-                    <div class="JPVisitNum">{{ info.visitNum }}/{{ info.needVisitNum }}</div>
-                  </div>
-                </el-popover> -->
                 <el-popover
                   popper-class="zpover"
                   placement="bottom"
@@ -391,7 +383,7 @@
                   :disabled="!info.userVisitTimesMap"
                   :content="'本店本月已拜访过' + info.storeLabels.visitTimes + '次'">
                   <div
-                    v-if="false && info.storeLabels.visitTimes && info.storeLabels.visitTimes > 0"
+                    v-if="info.storeLabels.visitTimes && info.storeLabels.visitTimes > 0"
                     class="visitStoreIco"
                     slot="reference"
                     style="background-color: #fff; position: relative">
@@ -411,16 +403,20 @@
                     <van-icon
                       :name="require('@/assets/ordernumRed.png')"
                       size="26"
-                      v-if="info.storeLabels.jpA && info.storeLabels.visitTimes < 2" />
+                      v-if="
+                        info.storeLabels.storeA &&
+                        info.needVisitNum &&
+                        info.storeLabels.visitTimes < info.needVisitNum
+                      " />
                     <van-icon :name="require('@/assets/ordernum.png')" size="26" v-else />
                   </div>
                   <p style="text-align: center; background: #fff; color: #000; padding: 5px 0">
                     本店本月己拜访过{{ info.storeLabels.visitTimes }}次
                   </p>
                   <p
-                    v-if="info.storeLabels.jpA"
+                    v-if="info.storeLabels.storeA && info.needVisitNum"
                     style="text-align: center; background: #fff; color: red; padding: 5px 0">
-                    A级金牌店拜访标准:1月2
+                    A级金牌店拜访标准:1月{{ info.needVisitNum }}
                   </p>
                   <el-table :data="info.userVisitTimesMap" border max-height="180px">
                     <el-table-column label="业务员" prop="userName" />
@@ -893,25 +889,6 @@ export default {
     this.getposition();
   },
   methods: {
-    setJPABCFlag(item) {
-      // needVisitNum:需要拜访的次数;visitNum:本月已拜访次数
-      if (item.storeLabels.jpA && item.visitNum < item.needVisitNum) {
-        return true;
-      } else {
-        return false;
-      }
-    },
-    setJPABCContent(item) {
-      if (item.storeLabels.jpA) {
-        return 'A级金牌店拜访标准1月2次';
-      } else if (item.storeLabels.jpB) {
-        return 'B级金牌店拜访标准1月1次';
-      } else if (item.storeLabels.jpC) {
-        return 'C级金牌店拜访标准1月1次';
-      } else {
-        return '';
-      }
-    },
     setStroeNameStyle(item) {
       // 家装或工装 approvalStatus:是否结案 0:未结案,1:已结案
       if (
@@ -2239,7 +2216,7 @@ export default {
   font-weight: 600;
 }
 </style>
-<style>
+<style lang="scss">
 .icoImgMAP {
   background-color: #fff;
   text-align: center;
@@ -2289,8 +2266,6 @@ export default {
   line-height: 26px;
   height: 26px;
 }
-</style>
-<style lang="scss">
 .van-tabs__nav--card .van-tab.van-tab--active {
   background-color: #0057ba !important;
 }

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

@@ -274,6 +274,7 @@ export default {
         .then(() => {
           stopVisit({ visitsId: this.visitId }).then((res) => {
             if (res.code == 200) {
+              localStorage.removeItem('visitId');
               this.$dialog
                 .alert({
                   title: '系统提示',

+ 22 - 47
src/views/deviceOutside/topStore.vue

@@ -81,16 +81,24 @@
                     <!-- 金牌店ABC -->
                     <img
                       class="JPABC"
-                      :src="require('@/assets/Icon/JPA.png')"
-                      v-if="item.storeLabels.jpA" />
+                      :src="require('@/assets/Icon/storeA.png')"
+                      v-if="item.storeLabels.storeA" />
                     <img
                       class="JPABC"
-                      :src="require('@/assets/Icon/JPB.png')"
-                      v-if="item.storeLabels.jpB" />
+                      :src="require('@/assets/Icon/storeB.png')"
+                      v-if="item.storeLabels.storeB" />
                     <img
                       class="JPABC"
-                      :src="require('@/assets/Icon/JPC.png')"
-                      v-if="item.storeLabels.jpC" />
+                      :src="require('@/assets/Icon/storeC.png')"
+                      v-if="item.storeLabels.storeC" />
+                    <img
+                      class="JPABC"
+                      :src="require('@/assets/Icon/storeD.png')"
+                      v-if="item.storeLabels.storeD" />
+                    <img
+                      class="JPABC"
+                      :src="require('@/assets/Icon/storeE.png')"
+                      v-if="item.storeLabels.storeE" />
                   </template>
                   <span class="btn" :data-clipboard-text="item.storeCode">
                     <span>{{ item.storeName }}</span>
@@ -116,22 +124,6 @@
                 <div class="info" style="position: relative">
                   联系人:{{ item.contactName }}
                   <div style="position: absolute; bottom: 0px; right: 0px">
-                    <!-- 金牌店ABC -->
-                    <!-- <el-popover
-                      popper-class="zpover"
-                      placement="bottom"
-                      width="120"
-                      trigger="click"
-                      :content="setJPABCContent(item)">
-                      <div
-                        v-if="setJPABCFlag(item)"
-                        class="visitStoreIco"
-                        style="background-color: #fff"
-                        slot="reference">
-                        <van-icon :name="require('@/assets/Icon/visitJPNum.png')" size="26" />
-                        <div class="JPVisitNum">{{ item.visitNum }}/{{ item.needVisitNum }}</div>
-                      </div>
-                    </el-popover> -->
                     <el-popover
                       popper-class="zpover"
                       placement="bottom"
@@ -263,9 +255,7 @@
                       :disabled="!item.userVisitTimesMap"
                       :content="'本店本月已拜访过' + item.storeLabels.visitTimes + '次'">
                       <div
-                        v-if="
-                          false && item.storeLabels.visitTimes && item.storeLabels.visitTimes > 0
-                        "
+                        v-if="item.storeLabels.visitTimes && item.storeLabels.visitTimes > 0"
                         class="visitStoreIco"
                         slot="reference"
                         style="background-color: #fff; position: relative">
@@ -285,16 +275,20 @@
                         <van-icon
                           :name="require('@/assets/ordernumRed.png')"
                           size="26"
-                          v-if="item.storeLabels.jpA && item.storeLabels.visitTimes < 2" />
+                          v-if="
+                            item.storeLabels.storeA &&
+                            item.needVisitNum &&
+                            item.storeLabels.visitTimes < item.needVisitNum
+                          " />
                         <van-icon :name="require('@/assets/ordernum.png')" size="26" v-else />
                       </div>
                       <p style="text-align: center; background: #fff; color: #000; padding: 5px 0">
                         本店本月己拜访过{{ item.storeLabels.visitTimes }}次
                       </p>
                       <p
-                        v-if="item.storeLabels.jpA"
+                        v-if="item.storeLabels.storeA && item.needVisitNum"
                         style="text-align: center; background: #fff; color: red; padding: 5px 0">
-                        A级金牌店拜访标准:1月2
+                        A级金牌店拜访标准:1月{{ item.needVisitNum }}
                       </p>
                       <el-table :data="item.userVisitTimesMap" border max-height="180px">
                         <el-table-column label="业务员" prop="userName" />
@@ -962,25 +956,6 @@ export default {
     this.getMonth();
   },
   methods: {
-    setJPABCFlag(item) {
-      // needVisitNum:需要拜访的次数;visitNum:本月已拜访次数
-      if (item.storeLabels.jpA && item.visitNum < item.needVisitNum) {
-        return true;
-      } else {
-        return false;
-      }
-    },
-    setJPABCContent(item) {
-      if (item.storeLabels.jpA) {
-        return 'A级金牌店拜访标准1月2次';
-      } else if (item.storeLabels.jpB) {
-        return 'B级金牌店拜访标准1月1次';
-      } else if (item.storeLabels.jpC) {
-        return 'C级金牌店拜访标准1月1次';
-      } else {
-        return '';
-      }
-    },
     linkapp(val) {
       var poind = this.gcj02BD(val.lat, val.lon);
       let url = window.location.href;

+ 22 - 45
src/views/deviceWithin/index.vue

@@ -58,16 +58,24 @@
                 <!-- 金牌店ABC -->
                 <img
                   class="JPABC"
-                  :src="require('@/assets/Icon/JPA.png')"
-                  v-if="item.storeLabels.jpA" />
+                  :src="require('@/assets/Icon/storeA.png')"
+                  v-if="item.storeLabels.storeA" />
                 <img
                   class="JPABC"
-                  :src="require('@/assets/Icon/JPB.png')"
-                  v-if="item.storeLabels.jpB" />
+                  :src="require('@/assets/Icon/storeB.png')"
+                  v-if="item.storeLabels.storeB" />
                 <img
                   class="JPABC"
-                  :src="require('@/assets/Icon/JPC.png')"
-                  v-if="item.storeLabels.jpC" />
+                  :src="require('@/assets/Icon/storeC.png')"
+                  v-if="item.storeLabels.storeC" />
+                <img
+                  class="JPABC"
+                  :src="require('@/assets/Icon/storeD.png')"
+                  v-if="item.storeLabels.storeD" />
+                <img
+                  class="JPABC"
+                  :src="require('@/assets/Icon/storeE.png')"
+                  v-if="item.storeLabels.storeE" />
               </template>
               <span @click="goOtherSystem(item)" style="color: #0057ba; text-decoration: underline">
                 <span>{{ item.storeName }}</span>
@@ -105,22 +113,6 @@
             <div class="info" style="position: relative">
               联系人:{{ item.contactName }}
               <div style="position: absolute; bottom: 0; right: 14px">
-                <!-- 金牌店ABC -->
-                <!-- <el-popover
-                  popper-class="zpover"
-                  placement="bottom"
-                  width="120"
-                  trigger="click"
-                  :content="setJPABCContent(item)">
-                  <div
-                    v-if="setJPABCFlag(item)"
-                    class="visitStoreIco"
-                    style="background-color: #fff"
-                    slot="reference">
-                    <van-icon :name="require('@/assets/Icon/visitJPNum.png')" size="26" />
-                    <div class="JPVisitNum">{{ item.visitNum }}/{{ item.needVisitNum }}</div>
-                  </div>
-                </el-popover> -->
                 <el-popover
                   popper-class="zpover"
                   placement="bottom"
@@ -245,7 +237,7 @@
                   :disabled="!item.userVisitTimesMap"
                   :content="'本店本月已拜访过' + item.storeLabels.visitTimes + '次'">
                   <div
-                    v-if="false && item.storeLabels.visitTimes && item.storeLabels.visitTimes > 0"
+                    v-if="item.storeLabels.visitTimes && item.storeLabels.visitTimes > 0"
                     class="visitStoreIco"
                     slot="reference"
                     style="background-color: #fff; position: relative">
@@ -265,16 +257,20 @@
                     <van-icon
                       :name="require('@/assets/ordernumRed.png')"
                       size="26"
-                      v-if="item.storeLabels.jpA && item.storeLabels.visitTimes < 2" />
+                      v-if="
+                        item.storeLabels.storeA &&
+                        item.needVisitNum &&
+                        item.storeLabels.visitTimes < item.needVisitNum
+                      " />
                     <van-icon :name="require('@/assets/ordernum.png')" size="26" v-else />
                   </div>
                   <p style="text-align: center; background: #fff; color: #000; padding: 5px 0">
                     本店本月己拜访过{{ item.storeLabels.visitTimes }}次
                   </p>
                   <p
-                    v-if="item.storeLabels.jpA"
+                    v-if="item.storeLabels.storeA && item.needVisitNum"
                     style="text-align: center; background: #fff; color: red; padding: 5px 0">
-                    A级金牌店拜访标准:1月2
+                    A级金牌店拜访标准:1月{{ item.needVisitNum }}
                   </p>
                   <el-table :data="item.userVisitTimesMap" border max-height="180px">
                     <el-table-column label="业务员" prop="userName" />
@@ -531,25 +527,6 @@ export default {
     );
   },
   methods: {
-    setJPABCFlag(item) {
-      // needVisitNum:需要拜访的次数;visitNum:本月已拜访次数
-      if (item.storeLabels.jpA && item.visitNum < item.needVisitNum) {
-        return true;
-      } else {
-        return false;
-      }
-    },
-    setJPABCContent(item) {
-      if (item.storeLabels.jpA) {
-        return 'A级金牌店拜访标准1月2次';
-      } else if (item.storeLabels.jpB) {
-        return 'B级金牌店拜访标准1月1次';
-      } else if (item.storeLabels.jpC) {
-        return 'C级金牌店拜访标准1月1次';
-      } else {
-        return '';
-      }
-    },
     closePopup(flag, filterParams) {
       this.showFilter = false;
       if (flag) {

+ 2 - 0
src/views/home/index.vue

@@ -48,6 +48,7 @@ import tabBar from '@/components/tabBar';
 import ABtarget from './ABtarget.vue';
 import { mapState } from 'vuex';
 import bottomBtn from './bottomBtn.vue';
+import { WXdigest } from '@/utils/digest';
 export default {
   name: 'home',
   components: { tabBar, hintTabPage, ABtarget, bottomBtn },
@@ -81,6 +82,7 @@ export default {
     },
   },
   activated() {
+    WXdigest();
     if (this.tabVal == '-1') {
       // 从其他页面跳转过来如果;要重新获取对应tab数据
       // if (this.$refs.hintTabPage) this.$refs.hintTabPage.initData();

+ 22 - 45
src/views/storeManagement/index.vue

@@ -67,16 +67,24 @@
                   <!-- 金牌店ABC -->
                   <img
                     class="JPABC"
-                    :src="require('@/assets/Icon/JPA.png')"
-                    v-if="item.storeLabels.jpA" />
+                    :src="require('@/assets/Icon/storeA.png')"
+                    v-if="item.storeLabels.storeA" />
                   <img
                     class="JPABC"
-                    :src="require('@/assets/Icon/JPB.png')"
-                    v-if="item.storeLabels.jpB" />
+                    :src="require('@/assets/Icon/storeB.png')"
+                    v-if="item.storeLabels.storeB" />
                   <img
                     class="JPABC"
-                    :src="require('@/assets/Icon/JPC.png')"
-                    v-if="item.storeLabels.jpC" />
+                    :src="require('@/assets/Icon/storeC.png')"
+                    v-if="item.storeLabels.storeC" />
+                  <img
+                    class="JPABC"
+                    :src="require('@/assets/Icon/storeD.png')"
+                    v-if="item.storeLabels.storeD" />
+                  <img
+                    class="JPABC"
+                    :src="require('@/assets/Icon/storeE.png')"
+                    v-if="item.storeLabels.storeE" />
                 </template>
                 <span class="btn" :data-clipboard-text="item.storeCode">
                   <span>{{ item.storeName }}</span>
@@ -123,22 +131,6 @@
               <div class="info" style="position: relative">
                 联系人:{{ item.contactName }}
                 <div style="position: absolute; bottom: 0px; right: 0px" v-if="item.storeLabels">
-                  <!-- 金牌店ABC -->
-                  <!-- <el-popover
-                    popper-class="zpover"
-                    placement="bottom"
-                    width="120"
-                    trigger="click"
-                    :content="setJPABCContent(item)">
-                    <div
-                      v-if="setJPABCFlag(item)"
-                      class="visitStoreIco"
-                      style="background-color: #fff"
-                      slot="reference">
-                      <van-icon :name="require('@/assets/Icon/visitJPNum.png')" size="26" />
-                      <div class="JPVisitNum">{{ item.visitNum }}/{{ item.needVisitNum }}</div>
-                    </div>
-                  </el-popover> -->
                   <el-popover
                     popper-class="zpover"
                     placement="bottom"
@@ -273,7 +265,7 @@
                     trigger="click"
                     :content="'本店本月已拜访过' + item.storeLabels.visitTimes + '次'">
                     <div
-                      v-if="false && item.storeLabels.visitTimes && item.storeLabels.visitTimes > 0"
+                      v-if="item.storeLabels.visitTimes && item.storeLabels.visitTimes > 0"
                       class="visitStoreIco"
                       slot="reference"
                       style="background-color: #fff; position: relative">
@@ -293,16 +285,20 @@
                       <van-icon
                         :name="require('@/assets/ordernumRed.png')"
                         size="26"
-                        v-if="item.storeLabels.jpA && item.storeLabels.visitTimes < 2" />
+                        v-if="
+                          item.storeLabels.storeA &&
+                          item.needVisitNum &&
+                          item.storeLabels.visitTimes < item.needVisitNum
+                        " />
                       <van-icon :name="require('@/assets/ordernum.png')" size="26" v-else />
                     </div>
                     <p style="text-align: center; background: #fff; color: #000; padding: 5px 0">
                       本店本月己拜访过{{ item.storeLabels.visitTimes }}次
                     </p>
                     <p
-                      v-if="item.storeLabels.jpA"
+                      v-if="item.storeLabels.storeA && item.needVisitNum"
                       style="text-align: center; background: #fff; color: red; padding: 5px 0">
-                      A级金牌店拜访标准:1月2
+                      A级金牌店拜访标准:1月{{ item.needVisitNum }}
                     </p>
                     <el-table :data="item.userVisitTimesMap" border max-height="180px">
                       <el-table-column label="业务员" prop="userName" />
@@ -529,25 +525,6 @@ export default {
     },
   },
   methods: {
-    setJPABCFlag(item) {
-      // needVisitNum:需要拜访的次数;visitNum:本月已拜访次数
-      if (item.storeLabels.jpA && item.visitNum < item.needVisitNum) {
-        return true;
-      } else {
-        return false;
-      }
-    },
-    setJPABCContent(item) {
-      if (item.storeLabels.jpA) {
-        return 'A级金牌店拜访标准1月2次';
-      } else if (item.storeLabels.jpB) {
-        return 'B级金牌店拜访标准1月1次';
-      } else if (item.storeLabels.jpC) {
-        return 'C级金牌店拜访标准1月1次';
-      } else {
-        return '';
-      }
-    },
     initSelect() {
       this.activatedTitles = [];
       this.activatedValues = [];

+ 3 - 10
src/views/week/SUPTaskApproval/detailItem.vue

@@ -59,6 +59,7 @@
               :customId="item.customId"
               :summaryId="item.summaryId"
               :allowWriteAgain="false"
+              :item="item"
               @click="imgClick(item, index)"></upload-img>
           </van-row>
         </div>
@@ -370,16 +371,8 @@ export default {
       this.indeximg = index;
       this.show = true;
     },
-    newimgarr1(val) {
-      if (
-        this.collectionItemList[val.index].fileInfoList == null ||
-        this.collectionItemList[val.index].fileInfoList == undefined
-      ) {
-        this.collectionItemList[val.index].fileInfoList = [];
-        this.collectionItemList[val.index].fileIdList = [];
-      }
-      this.collectionItemList[val.index].fileInfoList.push(val);
-      this.collectionItemList[val.index].fileIdList.push(val.id);
+    newimgarr1() {
+      this.$forceUpdate();
     },
     dateFn(val) {
       return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);

+ 65 - 53
src/views/week/VisitSummary.vue

@@ -46,6 +46,13 @@
             @click="approvalStatusShow = true"
             arrow-direction="down" />
         </van-col>
+        <van-col span="12">
+          <van-cell
+            :title="storageStatus.text"
+            is-link
+            @click="storageStatusShow = true"
+            arrow-direction="down" />
+        </van-col>
       </van-row>
       <br />
       <van-button type="info" size="small" plain class="Btn100" @click="searchBtn">查找</van-button>
@@ -72,15 +79,20 @@
                 <p class="textLeft">{{ item.nickName }}的{{ item.summaryTaskName }}</p>
                 <div class="approvalStatusBtn" v-if="item.approvalStatus">
                   <span class="approvalStatusBtn1" v-if="item.approvalStatus == '2'">审批通过</span>
-                  <span class="approvalStatusBtn2" v-if="item.approvalStatus == '1'"
-                    >提交待审批</span
-                  >
-                  <span class="approvalStatusBtn3" v-if="item.approvalStatus == '3'"
-                    >拒绝待提交</span
-                  >
+                  <span class="approvalStatusBtn2" v-if="item.approvalStatus == '1'">
+                    提交待审批
+                  </span>
+                  <span class="approvalStatusBtn3" v-if="item.approvalStatus == '3'">
+                    拒绝待提交
+                  </span>
                 </div>
+                <div class="approvalStatusBtn" v-if="item.status == '0'">
+                  <span class="status0">暂存</span>
+                </div>
+              </div>
+              <div class="info">
+                部门:{{ item.deptName || item.regionName || item.companyName }}
               </div>
-              <div class="info">部门:{{ item.deptName }}</div>
               <div class="info">提交时间:{{ item.createTime }}</div>
             </div>
           </van-cell>
@@ -151,6 +163,14 @@
         @confirm="onSalesApprovalStatus"
         @cancel="approvalStatusShow = false" />
     </van-popup>
+    <!-- status:状态:1-待审批 2-审批通过 3-拒绝待提交 -->
+    <van-popup v-model="storageStatusShow" capture position="bottom">
+      <van-picker
+        show-toolbar
+        :columns="storageStatusList"
+        @confirm="onStorageStatus"
+        @cancel="storageStatusShow = false" />
+    </van-popup>
   </div>
 </template>
 
@@ -212,10 +232,17 @@ export default {
         { text: '拒绝待提交', value: '3' },
       ],
       approvalStatus: { text: '审批状态(全部)', value: '' },
+      storageStatus: { text: '提交状态(全部)', value: '' },
+      storageStatusList: [
+        // 0-暂存,1-已提交
+        { text: '提交状态(全部)', value: '' },
+        { text: '已提交', value: '1' },
+        { text: '暂存', value: '0' },
+      ],
+      storageStatusShow: false,
     };
   },
   activated() {
-    this.approvalStatus = this.approvalStatusList[0];
     this.userList = [];
     this.formData.startTime = this.getThreeDaysAgo();
     // this.formData.startTime = this.GetPreMonthDay(this.parseTime(new Date(), '{y}-{m}-{d}'),2)
@@ -273,46 +300,10 @@ export default {
   },
   watch: {
     $route(to, from) {
-      // if(to.path=="/VisitSummary"&&from.path!="/My/index"){
-      //     this.userList=[]
-      //     this.formData.pageNum=1
-      //     this.list = [];
-      //     this.tableList=[];
-      //     this.regionName="全部大区"
-      //     this.regionCode=""
-      //     this.deptName="全部销售部"
-      //     this.deptCode=""
-      //     this.userCode=""
-      //     this.userName="全部业务员"
-      //     this.powerGrade = localStorage.getItem("powerGrade")
-      //     this.getDeptInfo("dept")
-      //     if(this.powerGrade==5){
-      //       setTimeout(()=>{
-      //         if(this.$route.query.userCode==undefined){
-      //           this.companyName=this.companyList[0].deptName;
-      //           this.companyCode=this.companyList[0].deptId;}
-      //         this.getDeptInfo("dept",1)
-      //       },1000)
-      //     }
-      //     if(this.powerGrade==4){
-      //       setTimeout(()=>{
-      //         this.getDeptInfo("dept",1)
-      //       },1000)
-      //     }
-      //     if(this.powerGrade==3){
-      //       setTimeout(()=>{
-      //         this.getDeptInfo("dept",2)
-      //       },1000)
-      //     }
-      //     if(this.powerGrade==2||this.powerGrade==1){
-      //       setTimeout(()=>{
-      //         this.getDeptInfo("user")
-      //       },2000)
-      //     }
-      //     setTimeout(()=>{
-      //       this.searchBtn()
-      //     },1000)
-      //   }
+      if (from.path == '/My/index') {
+        this.approvalStatus = this.approvalStatusList[0];
+        this.storageStatus = this.storageStatusList[0];
+      }
     },
   },
   methods: {
@@ -346,6 +337,7 @@ export default {
       this.formData.deptId = this.deptCode; // 部门id,如果为周报或日报为必传  Long类型
       this.formData.userId = this.userCode; // 业务员id,如果为日报为必传      Long类型
       this.formData.approvalStatus = this.approvalStatus.value;
+      this.formData.status = this.storageStatus.value;
       queryHistorySummaryList(this.formData).then((res) => {
         loading1.clear();
         if (res.code == 200) {
@@ -487,13 +479,23 @@ export default {
       });
     },
     dailyFn(row) {
-      this.$router.push({
-        path: '/VisitSummaryDetail',
-        query: { userSummaryId: row.userSummaryId, source: 'VisitSummary' },
-      });
+      // 暂存
+      if (row.status == '0') {
+        this.$router.push({
+          path: '/VisitSummaryStorageDetail',
+          query: { userSummaryId: row.userSummaryId, source: '/VisitSummary' },
+        });
+      } else {
+        this.$router.push({
+          path: '/VisitSummaryDetail',
+          query: { userSummaryId: row.userSummaryId, source: '/VisitSummary' },
+        });
+      }
     },
     onClickLeft() {
-      this.$router.go(-1);
+      this.$router.replace({
+        path: '/My/index',
+      });
     },
     regionClick() {
       // if(this.powerGrade>4){
@@ -585,6 +587,10 @@ export default {
       this.approvalStatus = val;
       this.approvalStatusShow = false;
     },
+    onStorageStatus(val) {
+      this.storageStatus = val;
+      this.storageStatusShow = false;
+    },
   },
 };
 </script>
@@ -701,6 +707,12 @@ export default {
     .approvalStatusBtn3 {
       background-color: red;
     }
+    .status1 {
+      background-color: #07c160;
+    }
+    .status0 {
+      background-color: #ff976a;
+    }
   }
   .van-cell__title {
     overflow: hidden;

+ 72 - 33
src/views/week/VisitSummaryAdd.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="bgcolor">
+  <div class="bgcolor VisitSummaryAdd">
     <!--        顶部条-->
 
     <!--        顶部条-->
@@ -66,6 +66,7 @@
                 :indexImg="index"
                 :customId="item.customId"
                 :summaryId="item.summaryId"
+                :item="item"
                 @click="imgClick(item, index)"></upload-img>
             </van-row>
           </div>
@@ -194,6 +195,7 @@
     </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="info" color="#0057ba" @click="onSubmit">
         提交汇报
       </van-button>
@@ -288,6 +290,7 @@ import {
   getSummaryMobileDeptInfo,
   getDeptsByUser,
   chainsList,
+  temporarilyCustomAnswer,
 } from '@/api/index';
 import zRadio from '@/components/zRadio2';
 import zCheckbox from '@/components/zCheckbox2';
@@ -447,22 +450,49 @@ export default {
       this.indeximg = index;
       this.show = true;
     },
-    newimgarr1(val) {
-      if (
-        this.collectionItemList[val.index].fileInfoList == null ||
-        this.collectionItemList[val.index].fileInfoList == undefined
-      ) {
-        this.collectionItemList[val.index].fileInfoList = [];
-        this.collectionItemList[val.index].fileIdList = [];
-      }
-      this.collectionItemList[val.index].fileInfoList.push(val);
-      this.collectionItemList[val.index].fileIdList.push(val.id);
+    newimgarr1() {
+      this.$forceUpdate();
+      // if (
+      //   this.collectionItemList[val.index].fileInfoList == null ||
+      //   this.collectionItemList[val.index].fileInfoList == undefined
+      // ) {
+      //   this.collectionItemList[val.index].fileInfoList = [];
+      //   this.collectionItemList[val.index].fileIdList = [];
+      // }
+      // this.collectionItemList[val.index].fileInfoList.push(val);
+      // this.collectionItemList[val.index].fileIdList.push(val.id);
     },
     dateFn(val) {
       return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);
     },
     onLoad() {},
     onSubmit() {
+      this.setParams(() => {
+        if (this.flagclick) {
+          this.flagclick = false;
+          this.timer = null;
+          this.timer = setTimeout(() => {
+            this.flagclick = true;
+          }, 2000);
+          insertCustomAnswer({
+            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);
+            });
+        }
+      });
+    },
+    setParams(callback) {
       for (var c = 0; c < this.collectionAnswerlisd.length; c++) {
         for (var b = 0; b < this.collectionItemList.length; b++) {
           if (this.collectionAnswerlisd[c].id == this.collectionItemList[b].customId) {
@@ -491,28 +521,7 @@ export default {
       //   });
       //   JXSSataList.chainList = fileIdList;
       // }
-      if (this.flagclick) {
-        this.flagclick = false;
-        this.timer = null;
-        this.timer = setTimeout(() => {
-          this.flagclick = true;
-        }, 2000);
-        insertCustomAnswer({
-          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);
-          });
-      }
+      callback && callback();
     },
     getReportInfo() {
       let loading1 = this.$toast.loading({
@@ -929,6 +938,26 @@ 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>
@@ -987,6 +1016,16 @@ export default {
 .z-cell .van-cell__title {
   font-size: 16px;
 }
+.VisitSummaryAdd {
+  .tc {
+    display: flex;
+    justify-content: space-between;
+    .submitBtn {
+      width: 45%;
+      border-radius: 20px;
+    }
+  }
+}
 </style>
 <style lang="scss">
 .table-headermd {

+ 2 - 2
src/views/week/VisitSummaryDetail.vue

@@ -254,7 +254,7 @@ export default {
           if (res.code == 200) {
             this.$toast('操作成功!');
             this.$router.replace({
-              path: '/VisitSummary',
+              path: this.source,
             });
           } else {
             this.$toast(res.msg);
@@ -292,7 +292,7 @@ export default {
           if (res.code == 200) {
             this.$toast('操作成功!');
             this.$router.replace({
-              path: '/VisitSummary',
+              path: this.source,
             });
           } else {
             this.$toast(res.msg);

+ 52 - 22
src/views/week/VisitSummaryMy.vue

@@ -42,20 +42,21 @@
             <div class="cardContent" @click="dailyFn(item)">
               <div class="title">
                 <p class="textLeft">{{ item.nickName }}的{{ item.summaryTaskName }}</p>
+                <div class="approvalStatusBtn" v-if="item.approvalStatus">
+                  <span class="approvalStatusBtn1" v-if="item.approvalStatus == '2'">审批通过</span>
+                  <span class="approvalStatusBtn2" v-if="item.approvalStatus == '1'">
+                    提交待审批
+                  </span>
+                  <span class="approvalStatusBtn3" v-if="item.approvalStatus == '3'">
+                    拒绝待提交
+                  </span>
+                </div>
+                <div class="approvalStatusBtn" v-if="item.status == '0'">
+                  <span class="status0">暂存</span>
+                </div>
               </div>
               <div class="info">提交时间:{{ item.createTime }}</div>
             </div>
-            <div class="approvalStatusBtn" v-if="item.approvalStatus">
-              <van-button type="primary" size="small" v-if="item.approvalStatus == '2'"
-                >审批通过</van-button
-              >
-              <van-button type="info" size="small" v-if="item.approvalStatus == '1'"
-                >提交待审批</van-button
-              >
-              <van-button color="red" size="small" v-if="item.approvalStatus == '3'"
-                >拒绝待提交</van-button
-              >
-            </div>
           </van-cell>
         </div>
         <van-empty v-if="list.length == 0" />
@@ -116,7 +117,7 @@ export default {
     };
   },
 
-  created() {
+  activated() {
     this.userList = [];
     this.formData.startTime = this.getThreeDaysAgo();
     this.strtcurrentDate = new Date(this.getThreeDaysAgo());
@@ -233,13 +234,23 @@ export default {
       return days;
     },
     dailyFn(row) {
-      this.$router.push({
-        path: '/VisitSummaryDetail',
-        query: { userSummaryId: row.userSummaryId },
-      });
+      // 暂存
+      if (row.status == '0') {
+        this.$router.push({
+          path: '/VisitSummaryStorageDetail',
+          query: { userSummaryId: row.userSummaryId, source: '/VisitSummaryMy' },
+        });
+      } else {
+        this.$router.push({
+          path: '/VisitSummaryDetail',
+          query: { userSummaryId: row.userSummaryId, source: '/VisitSummaryMy' },
+        });
+      }
     },
     onClickLeft() {
-      this.$router.go(-1);
+      this.$router.replace({
+        path: '/My/index',
+      });
     },
     StartTimeClick() {
       this.StartTimeShow = true;
@@ -282,6 +293,8 @@ export default {
   font-weight: bold;
   color: #333;
   line-height: 22px;
+  display: flex;
+  justify-content: space-between;
 }
 
 .cardContent .title p {
@@ -362,12 +375,29 @@ export default {
     position: relative;
   }
   .approvalStatusBtn {
-    position: absolute;
-    bottom: 4px;
-    right: 1px;
-    .van-button {
+    span {
+      color: #fff;
       border-radius: 5px;
-      width: 78px;
+      display: inline-block;
+      padding: 3px 5px;
+      font-size: 14px;
+      width: 80px;
+      text-align: center;
+    }
+    .approvalStatusBtn1 {
+      background-color: #12ea7a;
+    }
+    .approvalStatusBtn2 {
+      background-color: rgb(112, 33, 239);
+    }
+    .approvalStatusBtn3 {
+      background-color: red;
+    }
+    .status1 {
+      background-color: #07c160;
+    }
+    .status0 {
+      background-color: #ff976a;
     }
   }
 }

+ 458 - 0
src/views/week/VisitSummaryStorageDetail.vue

@@ -0,0 +1,458 @@
+<template>
+  <div v-if="info" class="VisitSummaryStorageDetail">
+    <div class="navBarTOP">
+      <van-nav-bar
+        class="navBar"
+        :title="info.summaryTaskName"
+        left-arrow
+        @click-left="onClickLeft"
+        right-text="删除"
+        @click-right="onDelete" />
+    </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 style="font-size: 13px; margin-left: 8px"
+          >&nbsp;{{ info.nickName }} - {{ info.postName }}</span
+        >
+      </div>
+      <div style="padding: 4px 0">
+        <van-icon :name="zw" size="16" style="float: left" />
+        <span style="font-size: 13px; margin-left: 8px">&nbsp;所属部门:{{ info.deptName }}</span>
+      </div>
+      <div style="padding: 4px 0">
+        <van-icon :name="tm" size="16" style="float: left" />
+        <span style="font-size: 13px; margin-left: 8px">&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">
+      <!-- 编辑 -->
+      <componVisitSummary
+        :collectionItemLists="collectionItemLists"
+        :approvalStatus="info.approvalStatus"
+        ref="componVisitSummary"></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="info" color="#0057ba" @click="onSubmit">
+        提交汇报
+      </van-button>
+    </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,
+  insertCustomAnswer,
+  temporarilyCustomAnswer,
+  deleteSummaryMobile,
+} from '@/api/index';
+import { ImagePreview } from 'vant';
+import deleteUploadImg from '@/components/deleteUploadImg';
+import componVisitSummary from '@/views/week/componVisitSummary';
+export default {
+  name: 'daily',
+  components: { deleteUploadImg, componVisitSummary },
+  data() {
+    return {
+      info: null,
+      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',
+      collectionItemLists: [],
+      writeAgain: false,
+      approvalMessage: '',
+      source: '',
+      //
+    };
+  },
+  activated() {
+    this.source = this.$route.query.source || '';
+    this.powerGrade = localStorage.getItem('powerGrade');
+    this.getDetailById();
+    this.num = 0;
+    this.userTodayPlanNum();
+  },
+  methods: {
+    setApprovalStatus(status) {
+      if (status == '1') {
+        return '通过';
+      } else if (status == '2') {
+        return '拒绝';
+      }
+    },
+    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 && 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;
+        this.writeAgain = res.data.customItemList.some((item) => {
+          return item.allowWriteAgain;
+        });
+
+        this.collectionItemLists = res.data.customItemList;
+      });
+    },
+    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);
+    },
+    // 暂存 不校验答案是否必填
+    onStorage() {
+      this.setParams((collectionItemList) => {
+        temporarilyCustomAnswer({
+          userSummaryId: this.info.userSummaryId,
+          summaryId: this.info.summaryId, //Long	主管任务id
+          customItemList: collectionItemList, //List<Object>	答案列表
+        })
+          .then((res) => {
+            if (res.code == 200) {
+              this.$toast('操作成功!');
+              this.$router.replace({
+                path: this.source,
+              });
+            } else {
+              this.$toast(res.msg);
+            }
+          })
+          .catch((err) => {
+            this.$toast(err.msg);
+          });
+      });
+    },
+    onSubmit() {
+      this.setParams((collectionItemList) => {
+        insertCustomAnswer({
+          userSummaryId: this.info.userSummaryId, //	Long	用户总结id,如果为新增则不填,编辑则必填
+          summaryId: this.info.summaryId, //Long	主管任务id
+          customItemList: collectionItemList,
+        })
+          .then((res) => {
+            if (res.code == 200) {
+              this.$toast('操作成功!');
+              this.$router.replace({
+                path: this.source,
+              });
+            } else {
+              this.$toast(res.msg);
+            }
+          })
+          .catch((err) => {
+            this.$toast(err.msg);
+          });
+      });
+    },
+    setParams(callback) {
+      let collectionAnswerlisd = this.$refs.componVisitSummary.collectionAnswerlisd;
+      let collectionItemList = this.$refs.componVisitSummary.collectionItemList;
+      for (var c = 0; c < collectionAnswerlisd.length; c++) {
+        for (var b = 0; b < collectionItemList.length; b++) {
+          if (collectionAnswerlisd[c].id == collectionItemList[b].customId) {
+            collectionItemList[b].customOptionList = collectionAnswerlisd[c].value;
+          }
+        }
+      }
+      // // 照片
+      let zpDataList = collectionItemList.find((item) => item.answerType == 'zp');
+      if (zpDataList) {
+        let fileIdList = [];
+        zpDataList.fileInfoList.forEach((item) => {
+          fileIdList.push(item.id);
+        });
+        zpDataList.fileIdList = fileIdList;
+      }
+      callback && callback(collectionItemList);
+    },
+    // 删除
+    onDelete() {
+      this.$dialog
+        .confirm({
+          title: '提示',
+          message: '确定要删除吗?',
+          showCancelButton: true,
+        })
+        .then(() => {
+          deleteSummaryMobile({ userSummaryId: this.$route.query.userSummaryId })
+            .then((res) => {
+              if (res.code == 200) {
+                this.$toast('操作成功!');
+                this.$router.replace({
+                  path: this.source,
+                });
+              } else {
+                this.$toast(res.msg);
+              }
+            })
+            .catch((err) => {
+              this.$toast(err.msg);
+            });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.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;
+}
+.bottomBtn {
+  position: fixed;
+  bottom: 0;
+  z-index: 10;
+  height: 50px;
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+  .van-button {
+    /* flex: 1; */
+    width: 40%;
+  }
+}
+.approvalRemarh {
+  width: 94%;
+  margin: 0px auto;
+  border-radius: 6px;
+  margin-bottom: 40px;
+  .approvalLabel {
+    font-size: 14px;
+    padding: 5px 0;
+  }
+}
+</style>
+<style lang="scss">
+.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;
+}
+
+.VisitSummaryStorageDetail {
+  .tc {
+    display: flex;
+    justify-content: space-between;
+    .submitBtn {
+      width: 45%;
+      border-radius: 20px;
+    }
+  }
+}
+</style>

+ 3 - 10
src/views/week/allowWriteAgainSummary.vue

@@ -64,6 +64,7 @@
               :customId="item.customId"
               :summaryId="item.summaryId"
               :allowWriteAgain="item.allowWriteAgain"
+              :item="item"
               @click="imgClick(item, index)"></upload-img>
           </van-row>
         </div>
@@ -416,16 +417,8 @@ export default {
       this.indeximg = index;
       this.show = true;
     },
-    newimgarr1(val) {
-      if (
-        this.collectionItemList[val.index].fileInfoList == null ||
-        this.collectionItemList[val.index].fileInfoList == undefined
-      ) {
-        this.collectionItemList[val.index].fileInfoList = [];
-        this.collectionItemList[val.index].fileIdList = [];
-      }
-      this.collectionItemList[val.index].fileInfoList.push(val);
-      this.collectionItemList[val.index].fileIdList.push(val.id);
+    newimgarr1() {
+      this.$forceUpdate();
     },
     dateFn(val) {
       return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);

+ 3 - 10
src/views/week/componVisitSummary.vue

@@ -52,6 +52,7 @@
               :indexImg="index"
               :customId="item.customId"
               :summaryId="item.summaryId"
+              :item="item"
               @click="imgClick(item, index)"></upload-img>
           </van-row>
         </div>
@@ -437,16 +438,8 @@ export default {
       this.indeximg = index;
       this.show = true;
     },
-    newimgarr1(val) {
-      if (
-        this.collectionItemList[val.index].fileInfoList == null ||
-        this.collectionItemList[val.index].fileInfoList == undefined
-      ) {
-        this.collectionItemList[val.index].fileInfoList = [];
-        this.collectionItemList[val.index].fileIdList = [];
-      }
-      this.collectionItemList[val.index].fileInfoList.push(val);
-      this.collectionItemList[val.index].fileIdList.push(val.id);
+    newimgarr1() {
+      this.$forceUpdate();
     },
     dateFn(val) {
       return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);

+ 58 - 16
src/views/week/daily.vue

@@ -140,7 +140,7 @@
             <van-col span="12"><p>&nbsp;</p></van-col>
             <van-col span="12"
               ><p>
-                开户达成率:<span class="colorbalck"
+                目标达成率:<span class="colorbalck"
                   >{{ Micrometer(reportTargetAll.gzKhljSuccessRate) }}%</span
                 >
               </p></van-col
@@ -453,6 +453,7 @@ import {
   getReportInfo,
   getDetailById,
   tsContents,
+  buryingPoint,
 } from '@/api/index';
 import visitedRealTime from '@/views/componentsTarget/visitedRealTime';
 import createStoreBJ from '@/views/componentsTarget/createStoreBJ';
@@ -748,19 +749,50 @@ export default {
             loading1.clear();
             this.isclick = true;
             if (res.code == 200) {
-              this.$dialog
-                .alert({
-                  title: '系统提示',
-                  message: '提交成功',
-                })
-                .then(() => {
-                  if (this.$route.query.reportId != undefined) {
-                    window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
-                  } else {
-                    this.onClickLeft();
-                    // window.location.replace(window.location.origin + '/mobile/home');
-                  }
-                });
+              if (this.reportTarget.reportPostType == 'fx') {
+                this.$dialog
+                  .alert({
+                    message: '已提交,是否分享',
+                    showCancelButton: true,
+                    confirmButtonText: '分享',
+                    cancelButtonText: '返回首页',
+                    className: 'dailyShareBtn',
+                  })
+                  .then(() => {
+                    buryingPoint({
+                      systemModel: '日报审核',
+                      buryingPointType: 2,
+                      buryingPointValue: this.$route.query.reportId,
+                      buryingPointName: '日报提交分享',
+                      buryingPointPosition: '日报提交',
+                    });
+                    // 跳转历史汇报详情 分享汇报
+                    this.$router.replace({
+                      path: 'dailyDetails',
+                      query: { reportId: res.data, sourceType: 'daily' },
+                    });
+                  })
+                  .catch(() => {
+                    if (this.$route.query.reportId != undefined) {
+                      window.location.replace(window.location.origin + '/mobile/home');
+                    } else {
+                      this.onClickLeft();
+                    }
+                  });
+              } else {
+                this.$dialog
+                  .alert({
+                    title: '系统提示',
+                    message: '提交成功',
+                  })
+                  .then(() => {
+                    if (this.$route.query.reportId != undefined) {
+                      window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
+                    } else {
+                      this.onClickLeft();
+                    }
+                  });
+              }
             } else {
               this.$toast.fail(res.msg);
             }
@@ -818,7 +850,7 @@ export default {
       });
     },
     onClickLeft() {
-      this.$router.go(-1);
+      this.$router.push('/home');
     },
   },
 };
@@ -877,7 +909,7 @@ export default {
   border-radius: 2px;
 }
 </style>
-<style>
+<style lang="scss">
 .linepAdd .van-cell__title {
   color: #1e5398;
   font-weight: 500;
@@ -912,4 +944,14 @@ export default {
 .linepAdd .contentContainer .contentContainerTitle .colorRed {
   color: red;
 }
+.dailyShareBtn {
+  .van-dialog__confirm {
+    // border: 1px solid #ccc;
+    // border-bottom: none;
+  }
+  .van-hairline--left {
+    background: #0057ba;
+    color: #fff;
+  }
+}
 </style>

+ 2 - 2
src/views/week/dailyApproval.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="dailyApproval">
     <!--        顶部条-->
     <div class="navBarTOP">
       <van-nav-bar class="navBar" title="日报审批" left-arrow @click-left="onClickLeft" />
@@ -777,7 +777,7 @@ export default {
   },
 };
 </script>
-<style scoped>
+<style scoped lang="scss">
 .container {
   margin: 10px;
 }

Різницю між файлами не показано, бо вона завелика
+ 750 - 481
src/views/week/dailyDetails.vue


Різницю між файлами не показано, бо вона завелика
+ 855 - 547
src/views/week/dailyHistoricalDetails.vue


+ 6 - 0
src/views/week/weekly.vue

@@ -257,6 +257,7 @@ export default {
       type: '-1',
       JZQuota: false,
       YFQuota: false, //应用服务
+      GZdata: false,
     };
   },
   created() {
@@ -296,6 +297,11 @@ export default {
           if (res.data.postType == 'JZ') {
             this.JZQuota = true;
           }
+          if (res.data.postType == 'GZ') {
+            this.GZdata = true;
+          } else {
+            this.GZdata = false;
+          }
           var dayTime = res.data.date;
           this.type = res.data.userType;
           this.timeList = this.parseTimeParagraph(

+ 6 - 0
src/views/week/weeklyApproval.vue

@@ -257,6 +257,7 @@ export default {
       type: '-1',
       JZQuota: false,
       YFQuota: false, //应用服务
+      GZdata: false,
     };
   },
   created() {
@@ -369,6 +370,11 @@ export default {
           if (res.data.postType == 'JZ') {
             this.JZQuota = true;
           }
+          if (res.data.postType == 'GZ') {
+            this.GZdata = true;
+          } else {
+            this.GZdata = false;
+          }
           var dayTime = res.data.date;
           this.type = res.data.userType;
           this.timeList = this.parseTimeParagraph(

+ 6 - 0
src/views/week/weeklyApprovalDetils.vue

@@ -275,6 +275,7 @@ export default {
       ptitle: '',
       JZQuota: false,
       YFQuota: false, //应用服务
+      GZdata: false,
     };
   },
   created() {
@@ -310,6 +311,11 @@ export default {
           if (res.data.postType == 'JZ') {
             this.JZQuota = true;
           }
+          if (res.data.postType == 'GZ') {
+            this.GZdata = true;
+          } else {
+            this.GZdata = false;
+          }
           var dayTime = res.data.date;
           this.type = res.data.userType;
           this.ptitle = res.data.pdeptName + '-' + res.data.ppostName + '-' + res.data.pnickName;

+ 6 - 0
src/views/week/weeklyHistoricalDetils.vue

@@ -289,6 +289,7 @@ export default {
       type: '-1',
       JZQuota: false,
       YFQuota: false, //应用服务
+      GZdata: false,
     };
   },
   created() {
@@ -413,6 +414,11 @@ export default {
           if (res.data.postType == 'JZ') {
             this.JZQuota = true;
           }
+          if (res.data.postType == 'GZ') {
+            this.GZdata = true;
+          } else {
+            this.GZdata = false;
+          }
           var dayTime = res.data.date;
           this.type = res.data.userType;
           this.title =