Browse Source

Merge branch 'feature_20260209_质感日报同步首页指标' into uat(dev)

zhujindu 5 days ago
parent
commit
36e38a4065

+ 9 - 6
src/views/home/HomeTarget.vue

@@ -1,8 +1,8 @@
 <template>
 <template>
   <div class="ABtarage">
   <div class="ABtarage">
-    <p class="updataTime" v-if="updataTimeFlag">更新时间:{{ updataTime }}</p>
+    <p class="updataTime" v-if="updataTime">更新时间:{{ updataTime }}</p>
     <template>
     <template>
-      <div class="container linep" :style="{ margin: updataTimeFlag ? '10px' : '0px' }">
+      <div class="container linep" :style="{ margin: updataTime ? '10px' : '0px' }">
         <van-collapse v-model="activeNames">
         <van-collapse v-model="activeNames">
           <div v-for="(homePageItem, index) in homePageIndicatorList" :key="index">
           <div v-for="(homePageItem, index) in homePageIndicatorList" :key="index">
             <van-collapse-item
             <van-collapse-item
@@ -139,9 +139,8 @@ export default {
       type: [String, Number],
       type: [String, Number],
       default: '-1',
       default: '-1',
     },
     },
-    updataTimeFlag: {
-      type: Boolean,
-      default: false,
+    homePageIndicatorDate: {
+      type: Array,
     },
     },
   },
   },
   data() {
   data() {
@@ -242,7 +241,11 @@ export default {
     },
     },
     initData() {
     initData() {
       console.log(this.tabVal);
       console.log(this.tabVal);
-      this.getReportInfo();
+      if (!this.homePageIndicatorDate) {
+        this.getReportInfo();
+      } else {
+        this.homePageIndicatorList = this.homePageIndicatorDate;
+      }
       this.userTodayPlanNum();
       this.userTodayPlanNum();
     },
     },
     getReportInfo() {
     getReportInfo() {

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

@@ -16,7 +16,7 @@
           <ABtarget :tabVal="tabVal" ref="Btarget"></ABtarget>
           <ABtarget :tabVal="tabVal" ref="Btarget"></ABtarget>
         </van-tab>
         </van-tab>
         <van-tab title="首页指标" name="2" v-if="onlyShowHomeTarget == true">
         <van-tab title="首页指标" name="2" v-if="onlyShowHomeTarget == true">
-          <HomeTarget :tabVal="tabVal" ref="HomeTarget" :updataTimeFlag="true"></HomeTarget>
+          <HomeTarget :tabVal="tabVal" ref="HomeTarget"></HomeTarget>
         </van-tab>
         </van-tab>
       </van-tabs>
       </van-tabs>
       <div class="bottomBtn">
       <div class="bottomBtn">

+ 11 - 1
src/views/week/daily.vue

@@ -27,7 +27,10 @@
     <!--        主体内容-->
     <!--        主体内容-->
     <div class="container linepAdd">
     <div class="container linepAdd">
       <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
       <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
-        <HomeTarget :tabVal="2" ref="HomeTarget"></HomeTarget>
+        <HomeTarget
+          :tabVal="2"
+          ref="HomeTarget"
+          :homePageIndicatorDate="homePageIndicatorList"></HomeTarget>
       </template>
       </template>
       <template v-else>
       <template v-else>
         <van-collapse v-model="activeNames" v-if="!YFQuota">
         <van-collapse v-model="activeNames" v-if="!YFQuota">
@@ -607,12 +610,14 @@ export default {
       notVisitReason: '', //今日拜访0家店的原因;
       notVisitReason: '', //今日拜访0家店的原因;
       photoSkuImgSummaryeList: null,
       photoSkuImgSummaryeList: null,
       postName: '',
       postName: '',
+      homePageIndicatorList: null,
     };
     };
   },
   },
   created() {
   created() {
     this.powerGrade = localStorage.getItem('powerGrade');
     this.powerGrade = localStorage.getItem('powerGrade');
     this.temporaryShow = this.$route.query.temporaryShow;
     this.temporaryShow = this.$route.query.temporaryShow;
     this.postName = localStorage.getItem('postName');
     this.postName = localStorage.getItem('postName');
+    this.homePageIndicatorList = null;
     if (this.$route.query.reportId != undefined) {
     if (this.$route.query.reportId != undefined) {
       this.getDetailById();
       this.getDetailById();
     } else {
     } else {
@@ -691,6 +696,11 @@ export default {
                 window.location.replace(window.location.origin + '/mobile/home');
                 window.location.replace(window.location.origin + '/mobile/home');
               });
               });
           } else {
           } else {
+            if (this.postName == '质感销售负责人' || this.postName == '质感销售专员') {
+              this.homePageIndicatorList = res.data.homePageIndicatorList;
+            } else {
+              this.homePageIndicatorList = null;
+            }
             localStorage.setItem('powerGrade', res.data.positionId);
             localStorage.setItem('powerGrade', res.data.positionId);
             localStorage.setItem('userDeptLevel', res.data.userDeptLevel);
             localStorage.setItem('userDeptLevel', res.data.userDeptLevel);
             this.GZQuota = false;
             this.GZQuota = false;

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

@@ -12,7 +12,10 @@
     <!--        主体内容-->
     <!--        主体内容-->
     <div class="container linep" v-if="reportTargetAll">
     <div class="container linep" v-if="reportTargetAll">
       <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
       <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
-        <HomeTarget :tabVal="2" ref="HomeTarget"></HomeTarget>
+        <HomeTarget
+          :tabVal="2"
+          ref="HomeTarget"
+          :homePageIndicatorDate="homePageIndicatorList"></HomeTarget>
       </template>
       </template>
       <template v-else>
       <template v-else>
         <van-collapse v-model="activeNames" v-if="!YFQuota">
         <van-collapse v-model="activeNames" v-if="!YFQuota">
@@ -615,6 +618,7 @@ export default {
       titlejz: '',
       titlejz: '',
       visitIMG1Flag: false,
       visitIMG1Flag: false,
       postName: '',
       postName: '',
+      homePageIndicatorList: null,
       //
       //
     };
     };
   },
   },
@@ -739,6 +743,11 @@ export default {
       });
       });
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
         this.postName = res.data.postName;
         this.postName = res.data.postName;
+        if (this.postName == '质感销售负责人' || this.postName == '质感销售专员') {
+          this.homePageIndicatorList = res.data.homePageIndicatorList;
+        } else {
+          this.homePageIndicatorList = null;
+        }
         this.GZQuota = false;
         this.GZQuota = false;
         this.JZQuota = false;
         this.JZQuota = false;
         this.YFQuota = res.data.postType == 'YF' ? true : false;
         this.YFQuota = res.data.postType == 'YF' ? true : false;

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

@@ -26,7 +26,10 @@
       <!--        主体内容-->
       <!--        主体内容-->
       <div class="container linep">
       <div class="container linep">
         <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
         <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
-          <HomeTarget :tabVal="2" ref="HomeTarget"></HomeTarget>
+          <HomeTarget
+            :tabVal="2"
+            ref="HomeTarget"
+            :homePageIndicatorDate="homePageIndicatorList"></HomeTarget>
         </template>
         </template>
         <template v-else>
         <template v-else>
           <van-collapse v-model="activeNames" v-if="!YFQuota">
           <van-collapse v-model="activeNames" v-if="!YFQuota">
@@ -757,6 +760,7 @@ export default {
       shareReportConfig: null,
       shareReportConfig: null,
       managerRemarkContent: '',
       managerRemarkContent: '',
       postName: '',
       postName: '',
+      homePageIndicatorList: null,
     };
     };
   },
   },
   created() {
   created() {
@@ -908,6 +912,11 @@ export default {
       });
       });
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
         loading1.clear();
         loading1.clear();
+        if (this.postName == '质感销售负责人' || this.postName == '质感销售专员') {
+          this.homePageIndicatorList = res.data.homePageIndicatorList;
+        } else {
+          this.homePageIndicatorList = null;
+        }
         this.postName = res.data.postName;
         this.postName = res.data.postName;
         this.reportTargetAll = res.data.reportTargetAll;
         this.reportTargetAll = res.data.reportTargetAll;
         this.reportTarget = res.data;
         this.reportTarget = res.data;

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

@@ -39,7 +39,10 @@
           提交时间: {{ reportTarget.commitTime }}
           提交时间: {{ reportTarget.commitTime }}
         </p>
         </p>
         <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
         <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
-          <HomeTarget :tabVal="2" ref="HomeTarget"></HomeTarget>
+          <HomeTarget
+            :tabVal="2"
+            ref="HomeTarget"
+            :homePageIndicatorDate="homePageIndicatorList"></HomeTarget>
         </template>
         </template>
         <template v-else>
         <template v-else>
           <van-collapse v-model="activeNames" v-if="!YFQuota">
           <van-collapse v-model="activeNames" v-if="!YFQuota">
@@ -782,6 +785,7 @@ export default {
       visitIMG1Flag: false,
       visitIMG1Flag: false,
       shareReportConfig: null,
       shareReportConfig: null,
       postName: '',
       postName: '',
+      homePageIndicatorList: null,
     };
     };
   },
   },
   watch: {
   watch: {
@@ -1010,6 +1014,11 @@ export default {
               });
               });
             });
             });
         } else {
         } else {
+          if (this.postName == '质感销售负责人' || this.postName == '质感销售专员') {
+            this.homePageIndicatorList = res.data.homePageIndicatorList;
+          } else {
+            this.homePageIndicatorList = null;
+          }
           this.postName = res.data.postName;
           this.postName = res.data.postName;
           this.GZQuota = false;
           this.GZQuota = false;
           this.JZQuota = false;
           this.JZQuota = false;