Selaa lähdekoodia

Merge branch 'feature_20250331_日报分享' into uat(dev)

# Conflicts:
#	src/views/week/dailyDetails.vue
zhujindu 5 kuukautta sitten
vanhempi
commit
9bbcf14761

+ 35 - 20
src/components/share.vue

@@ -60,25 +60,32 @@
           <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 urlList">
+        <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"
@@ -86,7 +93,8 @@
               alt=""
               style="display: block" />
           </template> -->
-        </div>
+          </div>
+        </template>
       </div>
       <div class="footerShare">
         <div class="right-text">
@@ -153,6 +161,11 @@ export default {
         return [];
       },
     },
+    // 是否显示 今日总结&明日规划
+    checkedPlan: {
+      type: Boolean,
+      default: true,
+    },
   },
   data() {
     return {
@@ -324,6 +337,7 @@ export default {
     background-size: cover;
     background-attachment: local;
     width: 100%;
+    min-height: 100%;
     padding: vw(30);
     position: absolute;
     padding-bottom: vw(190);
@@ -449,6 +463,7 @@ export default {
   }
 
   .footerShare {
+    // position: absolute;
     display: flex;
     // align-items: center;
     justify-content: flex-end;

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

@@ -118,7 +118,7 @@
               >
             </van-row>
           </van-collapse-item>
-          <van-collapse-item v-if="GZdata" name="41" title="公装客户开发">
+          <van-collapse-item v-if="GZdata" name="41" title="累计出货有效客户">
             <van-row>
               <!--            <van-col span="12"><span class="leftTitle">全年开户</span></van-col><van-col span="12"><span class="rightTitle">本月报备</span></van-col>-->
               <van-col span="12"

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

@@ -118,7 +118,7 @@
             >
           </van-row>
         </van-collapse-item>
-        <van-collapse-item v-if="GZQuota" name="41" title="公装客户开发">
+        <van-collapse-item v-if="GZQuota" name="41" title="累计出货有效客户">
           <van-row>
             <!--            <van-col span="12"><span class="leftTitle">全年开户</span></van-col><van-col span="12"><span class="rightTitle">本月报备</span></van-col>-->
             <van-col span="12"
@@ -750,10 +750,20 @@ export default {
             if (res.code == 200) {
               this.$dialog
                 .alert({
-                  title: '系统提示',
-                  message: '提交成功',
+                  message: '已提交,是否分享',
+                  showCancelButton: true,
+                  confirmButtonText: '分享',
+                  cancelButtonText: '返回首页',
+                  className: 'dailyShareBtn',
                 })
                 .then(() => {
+                  // 跳转历史汇报详情 分享汇报
+                  this.$router.replace({
+                    path: 'dailyDetails',
+                    query: { reportId: res.data, source: 'daily' },
+                  });
+                })
+                .catch(() => {
                   if (this.$route.query.reportId != undefined) {
                     window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
                   } else {
@@ -877,7 +887,7 @@ export default {
   border-radius: 2px;
 }
 </style>
-<style>
+<style lang="scss">
 .linepAdd .van-cell__title {
   color: #1e5398;
   font-weight: 500;
@@ -912,4 +922,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>

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

@@ -106,7 +106,7 @@
             >
           </van-row>
         </van-collapse-item>
-        <van-collapse-item v-if="GZQuota" name="41" title="公装客户开发">
+        <van-collapse-item v-if="GZQuota" name="41" title="累计出货有效客户">
           <van-row>
             <!--            <van-col span="12"><span class="leftTitle">全年开户</span></van-col><van-col span="12"><span class="rightTitle">本月报备</span></van-col>-->
             <van-col span="12"

+ 64 - 17
src/views/week/dailyDetails.vue

@@ -524,7 +524,8 @@
       @setShareImg="setShareImg"
       @setDailyDetailsBox="setDailyDetailsBox"
       :urlList="urlList"
-      :reportRemarksIndex="reportRemarksIndex"></share>
+      :reportRemarksIndex="reportRemarksIndex"
+      :checkedPlan="checkedPlan"></share>
     <!--分享图片列表 -->
     <el-dialog
       title="选择分享的图片"
@@ -536,30 +537,33 @@
       custom-class="shareImgFlag">
       <div v-if="reportTarget.photos">
         <div v-for="(item, index) in reportTarget.photos" :key="index">
+          <p style="margin-bottom: 10px; margin-top: 0; display: flex">
+            今日总结&明日规划<van-checkbox
+              v-model="checkedPlan"
+              style="margin-left: 10px"></van-checkbox>
+          </p>
           <p style="margin-bottom: 10px; margin-top: 0">{{ item.taskName }}</p>
-          <van-row gutter="10" class="visitIMG1">
-            <van-col
-              span="6"
-              style="padding-bottom: 10px; position: relative"
-              v-for="(itemImg, indexImg) in item.photos"
-              :key="indexImg">
+          <div class="shareVisitImg">
+            <div v-for="(itemImg, indexImg) in item.photos" :key="indexImg">
               <img :src="itemImg.fileUrl" alt="" @click="selectImg(itemImg)" />
               <van-icon
                 @click.stop
                 name="success"
                 class="activaImg"
-                color="red"
-                size="30"
+                color="#fff"
+                size="15"
                 style="
                   position: absolute;
-                  top: 50%;
-                  left: 50%;
-                  margin: -15px 0 0 -15px;
+                  right: 0;
+                  bottom: 0;
+                  /* margin: -15px 0 0 -15px; */
                   pointer-events: none;
+                  background: #2b73cf;
+                  border: 2px solid #fff;
                 "
                 v-if="itemImg.checked" />
-            </van-col>
-          </van-row>
+            </div>
+          </div>
         </div>
       </div>
       <span slot="footer" class="footer-btn">
@@ -656,10 +660,13 @@ export default {
       urlList: [],
       title: '',
       setDailyDetailsBoxFlag: true,
+      source: '',
+      checkedPlan: true, //今日总结&明日规划
       //
     };
   },
   created() {
+    this.source = this.$route.query.source || '';
     this.powerGrade = localStorage.getItem('powerGrade');
     this.getDetailById();
   },
@@ -706,12 +713,16 @@ export default {
     },
     // 确认分享
     confirmShare() {
-      this.shareImgFlag = false;
       this.reportTarget.photos.forEach((item) => {
         item.photos.forEach((val) => {
           if (val.checked) this.urlList.push(val.fileUrl);
         });
       });
+      if (this.urlList.length == 0 && !this.checkedPlan) {
+        this.$notify({ type: 'warning', message: '请选择分享内容!', className: 'notifyIndex' });
+        return;
+      }
+      this.shareImgFlag = false;
       this.setShareFlag = true;
     },
     pviewFn(val, imgVal) {
@@ -781,6 +792,11 @@ export default {
           }
         }
         this.imgList = imgList;
+        if (this.source == 'daily') {
+          this.$nextTick(() => {
+            this.clickShareFlag(-1);
+          });
+        }
       });
     },
     userTodayPlanNum() {
@@ -796,7 +812,9 @@ export default {
       });
     },
     onClickLeft() {
-      this.$router.go(-1);
+      this.$router.replace({
+        path: 'myHistoricalDaily',
+      });
     },
     wuliaoTableClose() {
       this.shareImgFlag = false;
@@ -895,7 +913,7 @@ export default {
   }
 }
 </style>
-<style>
+<style lang="scss">
 .linep .van-cell__title {
   color: #1e5398;
   font-weight: 500;
@@ -970,4 +988,33 @@ export default {
     }
   }
 }
+.shareImgFlag {
+  .shareVisitImg {
+    display: flex;
+    flex-wrap: wrap;
+    div {
+      width: 22%;
+      height: 80px;
+      margin-right: 3%;
+      margin-top: 10px;
+      position: relative;
+      img {
+        width: 100%;
+        height: 100%;
+      }
+    }
+  }
+  .el-dialog__header {
+    display: flex;
+    .el-dialog__title {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+  }
+}
+.notifyIndex {
+  z-index: 999999 !important;
+}
 </style>

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

@@ -122,7 +122,7 @@
               >
             </van-row>
           </van-collapse-item>
-          <van-collapse-item v-if="GZQuota" name="41" title="公装客户开发">
+          <van-collapse-item v-if="GZQuota" name="41" title="累计出货有效客户">
             <van-row>
               <van-col span="12"
                 ><p>