Преглед на файлове

Merge branch 'feature_20241016_我的-下属业务员历史日报增加数量'

zhujindu преди 1 година
родител
ревизия
80d0952a71
променени са 1 файла, в които са добавени 187 реда и са изтрити 154 реда
  1. 187 154
      src/views/week/index.vue

+ 187 - 154
src/views/week/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="navBarTOP">
-      <van-nav-bar class="navBar" title="我的"/>
+      <van-nav-bar class="navBar" title="我的" />
     </div>
     <div class="lineGrey"></div>
     <div class="lineGrey"></div>
@@ -11,21 +11,23 @@
     <div class="myHeader">
       <van-row>
         <van-col span="7">
-          <van-image round width="8rem" height="8rem" :src="avatar" @click="login"/>
+          <van-image round width="8rem" height="8rem" :src="avatar" @click="login" />
         </van-col>
         <van-col span="17">
           <div class="avatarContent">
             <p class="nickName">{{ nickName }}</p>
-            <p><span class="postName">{{ postName }}</span></p>
+            <p>
+              <span class="postName">{{ postName }}</span>
+            </p>
           </div>
         </van-col>
       </van-row>
     </div>
     <!--        主体内容-->
     <div class="container">
-<!--      门店及拜访-->
+      <!--      门店及拜访-->
       <van-cell-group inset class="mtb10">
-        <van-cell :title="addBTN" is-link @click="onSelect('B')" v-if="addShow" >
+        <van-cell :title="addBTN" is-link @click="onSelect('B')" v-if="addShow">
           <template #icon>
             <van-icon :name="addShop" class="zicon" />
           </template>
@@ -37,290 +39,321 @@
         </van-cell>
         <van-cell :title="title" is-link to="/storemanagementlist">
           <template #icon>
-            <van-icon :name="storeselect" class="zicon"/>
+            <van-icon :name="storeselect" class="zicon" />
           </template>
         </van-cell>
-        <van-cell title="历史拜访" is-link to="/historAllVisit" >
+        <van-cell title="历史拜访" is-link to="/historAllVisit">
           <template #icon>
             <van-icon :name="history" class="zicon" />
           </template>
         </van-cell>
       </van-cell-group>
-<!--      客资类-->
+      <!--      客资类-->
       <van-cell-group inset class="mtb10" v-if="customerClueButton">
-        <van-cell  title="客资任务" to="/clew">
+        <van-cell title="客资任务" to="/clew">
           <template #icon>
             <van-icon :name="history" class="zicon" />
           </template>
           <template #title>
-            <span >客资任务</span>
-            &nbsp;<van-tag type="danger" v-if="customerClueNum>0">{{customerClueNum}}</van-tag>
+            <span>客资任务</span>
+            &nbsp;<van-tag type="danger" v-if="customerClueNum > 0">{{ customerClueNum }}</van-tag>
           </template>
           <template #right-icon>
-            <van-icon  name="arrow" size="16"/>
+            <van-icon name="arrow" size="16" />
           </template>
         </van-cell>
       </van-cell-group>
-<!--      汇报类-->
+      <!--      汇报类-->
       <van-cell-group inset class="mtb10">
-        <van-cell title="我的历史汇报" v-if="historyButton" is-link to="/myHistoricalDaily" class="MYTile">
+        <van-cell
+          title="我的历史汇报"
+          v-if="historyButton"
+          is-link
+          to="/myHistoricalDaily"
+          class="MYTile">
           <template #title>
             <span class="custom-title">我的历史汇报&nbsp;&nbsp;</span>
           </template>
           <template #icon>
-            <van-icon :name="daily" class="zicon"/>
+            <van-icon :name="daily" class="zicon" />
           </template>
           <template #right-icon>
             <van-tag type="danger" v-if="existReject">退回待处理</van-tag>
-            <van-icon name="arrow"/>
+            <van-icon name="arrow" />
           </template>
         </van-cell>
-        <van-cell title="下属业务员历史日报" v-if="showDaily||isDiy=='true'" is-link to="/subordinateHistoricalDaily">
+        <van-cell v-if="showDaily || isDiy == 'true'" is-link to="/subordinateHistoricalDaily">
+          下属业务员历史日报
+          <span
+            style="font-weight: 600; font-size: 16px; color: red; margin-left: 15px"
+            v-if="thisWeekRemarkNum != null"
+            >{{ thisWeekRemarkNum }}/5</span
+          >
           <template #icon>
-            <van-icon :name="daily" class="zicon"/>
+            <van-icon :name="daily" class="zicon" />
           </template>
         </van-cell>
-        <van-cell title="下属部主管历史周报" v-if="showWeekly||isDiy=='true'" is-link to="/subordinateHistoricalWeekly">
+        <van-cell
+          title="下属部主管历史周报"
+          v-if="showWeekly || isDiy == 'true'"
+          is-link
+          to="/subordinateHistoricalWeekly">
           <template #icon>
-            <van-icon :name="daily" class="zicon"/>
+            <van-icon :name="daily" class="zicon" />
           </template>
         </van-cell>
-        <van-cell title="下属大区主管历史半月报" v-if="showDouble||isDiy=='true'" is-link to="/doubleWeeklyHistorical">
+        <van-cell
+          title="下属大区主管历史半月报"
+          v-if="showDouble || isDiy == 'true'"
+          is-link
+          to="/doubleWeeklyHistorical">
           <template #icon>
-            <van-icon :name="daily" class="zicon"/>
+            <van-icon :name="daily" class="zicon" />
           </template>
         </van-cell>
-        <van-cell title="下属汇报率审批率统计" v-if="(showDaily||showWeekly||showDouble)||isDiy=='true'" is-link to="/reportingRate">
+        <van-cell
+          title="下属汇报率审批率统计"
+          v-if="showDaily || showWeekly || showDouble || isDiy == 'true'"
+          is-link
+          to="/reportingRate">
           <template #icon>
-            <van-icon :name="daily" class="zicon"/>
+            <van-icon :name="daily" class="zicon" />
           </template>
         </van-cell>
       </van-cell-group>
-<!--      物料类-->
+      <!--      物料类-->
       <van-cell-group inset class="mtb10">
         <van-cell title="我的物料库存" is-link to="/myInventory" class="MYTile">
           <template #title>
             <span class="custom-title">我的物料库存&nbsp;&nbsp;</span>
           </template>
           <template #icon>
-            <van-icon :name="daily" class="zicon"/>
+            <van-icon :name="daily" class="zicon" />
           </template>
         </van-cell>
       </van-cell-group>
-<!--      <p style="margin: -8px 16px 8px;color: #888;" v-if="list">主管任务</p>-->
+      <!--      <p style="margin: -8px 16px 8px;color: #888;" v-if="list">主管任务</p>-->
       <van-cell-group inset>
-        <div style="border-radius: 6px;overflow: hidden;">
-          <van-cell is-link v-for="(item,index) in list" :key="index" :to="'/VisitSummaryAdd?summaryId='+item.summaryId+'&title='+item.summaryTaskName">
+        <div style="border-radius: 6px; overflow: hidden">
+          <van-cell
+            is-link
+            v-for="(item, index) in list"
+            :key="index"
+            :to="'/VisitSummaryAdd?summaryId=' + item.summaryId + '&title=' + item.summaryTaskName">
             <template #title>
-              <span class="custom-title">{{item.summaryTaskName}}</span>
+              <span class="custom-title">{{ item.summaryTaskName }}</span>
             </template>
             <template #icon>
-              <van-icon :name="daily" class="zicon"/>
+              <van-icon :name="daily" class="zicon" />
             </template>
           </van-cell>
           <van-cell title="主管任务查询" is-link to="/VisitSummary" v-if="summaryTaskButton">
             <template #icon>
-              <van-icon :name="history" class="zicon"/>
+              <van-icon :name="history" class="zicon" />
             </template>
           </van-cell>
           <van-cell title="家装推广会历史提报查询" is-link to="/VisitSummaryMy" v-if="jzTaskButton">
             <template #icon>
-              <van-icon :name="history" class="zicon"/>
+              <van-icon :name="history" class="zicon" />
             </template>
           </van-cell>
         </div>
       </van-cell-group>
-    <br><br>
-    <br><br>
-    <br><br>
-    <tab-bar tabBarActive="MyList"></tab-bar>
+      <br /><br />
+      <br /><br />
+      <br /><br />
+      <tab-bar tabBarActive="MyList"></tab-bar>
     </div>
   </div>
 </template>
 
 <script>
-import history from "@/assets/Icon/history.png";
-import addShop from "@/assets/Icon/addShop.png";
-import avatar from "@/assets/avatar2.png";
-import doubleWeekly from "@/assets/doubleWeekly.png";
-import daily from "@/assets/daily.png";
-import Weekly from "@/assets/Weekly.png";
-import storeselect from "@/assets/Icon/storeselect.png";
-import tabBar from "@/components/tabBar";
-import {getReportInfo, getstoreCoverPosition} from "@/api/index";
+import history from '@/assets/Icon/history.png';
+import addShop from '@/assets/Icon/addShop.png';
+import avatar from '@/assets/avatar2.png';
+import doubleWeekly from '@/assets/doubleWeekly.png';
+import daily from '@/assets/daily.png';
+import Weekly from '@/assets/Weekly.png';
+import storeselect from '@/assets/Icon/storeselect.png';
+import tabBar from '@/components/tabBar';
+import { getReportInfo, getstoreCoverPosition } from '@/api/index';
 export default {
-  name: "MyList",
-  components: {tabBar},
+  name: 'MyList',
+  components: { tabBar },
   data() {
     return {
       history: history,
       avatar: avatar,
-      addShow:false,
+      addShow: false,
       doubleWeekly: doubleWeekly,
       Weekly: Weekly,
       daily: daily,
       storeselect: storeselect,
-      addShop:addShop,
-      powerGrade: "1",
+      addShop: addShop,
+      powerGrade: '1',
       num: 0,
-      nickName: "",
-      postName: "",
-      showDaily: false, showWeekly: false, showDouble: false,
-      existReject:false,
-      isDiy:false,
-      historyButton:false,
-      deptLevel:0,
-      list:[],
-      addBTN:"新建工地",
-      title:"我的",
-      addShow1:false,
-      result:"",
-      jzTaskButton:false,
-      summaryTaskButton:false,
-      customerClueButton:false,
-      customerClueNum:0,
-    }
+      nickName: '',
+      postName: '',
+      showDaily: false,
+      showWeekly: false,
+      showDouble: false,
+      existReject: false,
+      isDiy: false,
+      historyButton: false,
+      deptLevel: 0,
+      list: [],
+      addBTN: '新建工地',
+      title: '我的',
+      addShow1: false,
+      result: '',
+      jzTaskButton: false,
+      summaryTaskButton: false,
+      customerClueButton: false,
+      customerClueNum: 0,
+      thisWeekRemarkNum: null,
+    };
   },
   watch: {
     $route(to, from) {
       this.num = 0;
-      if (to.path == "/My/index") {
-        this.nickName = localStorage.getItem("nickName")
-        this.postName = localStorage.getItem("postName")
-        this.powerGrade = localStorage.getItem("powerGrade")
-        this.isDiy= localStorage.getItem("isDiy")
-        this.getstoreCoverPosition()
-        this.getReportInfo()
+      if (to.path == '/My/index') {
+        this.nickName = localStorage.getItem('nickName');
+        this.postName = localStorage.getItem('postName');
+        this.powerGrade = localStorage.getItem('powerGrade');
+        this.isDiy = localStorage.getItem('isDiy');
+        this.getstoreCoverPosition();
+        this.getReportInfo();
       }
-    }
+    },
   },
   created() {
-    this.powerGrade = localStorage.getItem("powerGrade")
-    this.postName = localStorage.getItem("postName")
-    this.isDiy= localStorage.getItem("isDiy")
-    this.nickName = localStorage.getItem("nickName")
-    this.getstoreCoverPosition()
-    this.getReportInfo()
+    this.powerGrade = localStorage.getItem('powerGrade');
+    this.postName = localStorage.getItem('postName');
+    this.isDiy = localStorage.getItem('isDiy');
+    this.nickName = localStorage.getItem('nickName');
+    this.getstoreCoverPosition();
+    this.getReportInfo();
   },
   methods: {
-
-    getstoreCoverPosition(){
-      getstoreCoverPosition({}).then(res => {
-        var postName=localStorage.getItem("postName")
-        var postType=localStorage.getItem("postType")
-        if(postType=="DIY"){
-          this.addBTN="新建同城分销店"
-          this.title="我的"
-          this.addShow1=true
-        }else if(postType=="JZ"){
-          this.addBTN="新建家装店"
-          this.addShow1=true
-          this.title="我的"
-        }else if(postType=="GZ"){
-          this.addBTN="新建工地/潜在客户/公装客户仓库"
-          this.addShow1=false
-          this.title="我的"
+    getstoreCoverPosition() {
+      getstoreCoverPosition({}).then((res) => {
+        var postName = localStorage.getItem('postName');
+        var postType = localStorage.getItem('postType');
+        if (postType == 'DIY') {
+          this.addBTN = '新建同城分销店';
+          this.title = '我的';
+          this.addShow1 = true;
+        } else if (postType == 'JZ') {
+          this.addBTN = '新建家装店';
+          this.addShow1 = true;
+          this.title = '我的';
+        } else if (postType == 'GZ') {
+          this.addBTN = '新建工地/潜在客户/公装客户仓库';
+          this.addShow1 = false;
+          this.title = '我的';
         }
-        postName=postName.split(",")
-        for(let i=0;i<res.data.length;i++){
-              for(let j=0;j<postName.length;j++){
-                  if(res.data[i].dictLabel==postName[j]){
-                    this.addShow=true;
-                    return false;
-                  }
-              }
+        postName = postName.split(',');
+        for (let i = 0; i < res.data.length; i++) {
+          for (let j = 0; j < postName.length; j++) {
+            if (res.data[i].dictLabel == postName[j]) {
+              this.addShow = true;
+              return false;
+            }
+          }
         }
-      })
+      });
     },
     dailyFn(row) {
       this.$router.push({
-        path: "/VisitSummaryAdd",
-        query: {summaryId: row.summaryId,title:row.summaryTaskName}
-      })
+        path: '/VisitSummaryAdd',
+        query: { summaryId: row.summaryId, title: row.summaryTaskName },
+      });
     },
     getReportInfo() {
-      this.deptLevel = localStorage.getItem("deptLevel")
+      this.deptLevel = localStorage.getItem('deptLevel');
       let loading1 = this.$toast.loading({
         duration: 0,
         message: '加载中...',
         forbidClick: true,
       });
-      getReportInfo({isContent: false}).then(res => {
-        loading1.clear()
-        this.list = res.data.summaryTasks
-        this.historyButton=res.data.historyButton
-        localStorage.setItem("powerGrade", res.data.positionId)
-        this.existReject=res.data.existReject
-        this.powerGrade = res.data.positionId
-        this.showButton = res.data.showButton
-        this.deptLevel = res.data.deptLevel
-        this.reportTargetAll = res.data.reportTargetAll
-        this.jzTaskButton=res.data.jzTaskButton
-        this.summaryTaskButton=res.data.summaryTaskButton
-        this.customerClueButton=res.data.customerClueButton
-        this.customerClueNum=res.data.customerClueNum
-        this.updataTime = res.data.reportTargetAll.updateTime
+      getReportInfo({ isContent: false }).then((res) => {
+        loading1.clear();
+        this.list = res.data.summaryTasks;
+        this.historyButton = res.data.historyButton;
+        localStorage.setItem('powerGrade', res.data.positionId);
+        this.existReject = res.data.existReject;
+        this.powerGrade = res.data.positionId;
+        this.showButton = res.data.showButton;
+        this.deptLevel = res.data.deptLevel;
+        this.reportTargetAll = res.data.reportTargetAll;
+        this.jzTaskButton = res.data.jzTaskButton;
+        this.summaryTaskButton = res.data.summaryTaskButton;
+        this.customerClueButton = res.data.customerClueButton;
+        this.customerClueNum = res.data.customerClueNum;
+        this.updataTime = res.data.reportTargetAll.updateTime;
+        this.thisWeekRemarkNum = res.data.thisWeekRemarkNum; //查询本周点评的数量,null不需要展示
         if (res.data.deptLevel === 0) {
-          this.showDaily = false
-          this.showWeekly = false
-          this.showDouble = false
+          this.showDaily = false;
+          this.showWeekly = false;
+          this.showDouble = false;
         }
         if (res.data.deptLevel === 1) {
-          this.showDaily = true
-          this.showWeekly = false
-          this.showDouble = false
+          this.showDaily = true;
+          this.showWeekly = false;
+          this.showDouble = false;
         }
         if (res.data.deptLevel === 2) {
-          this.showDaily = true
-          this.showWeekly = true
-          this.showDouble = false
+          this.showDaily = true;
+          this.showWeekly = true;
+          this.showDouble = false;
         }
         if (res.data.deptLevel === 3) {
-          this.showDaily = true
-          this.showWeekly = true
-          this.showDouble = true
+          this.showDaily = true;
+          this.showWeekly = true;
+          this.showDouble = true;
         }
-      })
+      });
     },
     login() {
       if (this.num > 10) {
-        this.$router.push("/login")
+        this.$router.push('/login');
       } else {
         this.num = this.num + 1;
       }
     },
     onSelect(action) {
-      if(action=="B"){
-        this.$router.push("/storeAdd")
-      }else{
-        window.location.href="https://weboa.nipponpaint.com.cn/4825836600585B0C/68488309EEFAC9044825805F0059C65B/_fi12rtp156lortal9ue32ww78_r_t4r5rr_09tu0qq19k09_npchina_sfs2g_?open&portalunid=AFECD3A3682ED7494825886F00242F0C&mainid=63C98CD1C79B608C4825886F0007F001"
+      if (action == 'B') {
+        this.$router.push('/storeAdd');
+      } else {
+        window.location.href =
+          'https://weboa.nipponpaint.com.cn/4825836600585B0C/68488309EEFAC9044825805F0059C65B/_fi12rtp156lortal9ue32ww78_r_t4r5rr_09tu0qq19k09_npchina_sfs2g_?open&portalunid=AFECD3A3682ED7494825886F00242F0C&mainid=63C98CD1C79B608C4825886F0007F001';
       }
     },
-  }
-}
+  },
+};
 </script>
 <style scoped>
 .myHeader {
   background-color: #1c84c6;
   padding: 24px 30px;
-  background: url("../../assets/bg.png");
+  background: url('../../assets/bg.png');
   background-size: cover;
 }
 .mtb10 {
-  margin: 10px 16px
+  margin: 10px 16px;
 }
 
 .container {
-  margin: 16px 0
+  margin: 16px 0;
 }
 
 .zicon {
   margin-top: 4px;
-  padding-right: 8px
+  padding-right: 8px;
 }
 
 .avatarContent {
-  padding: 10px 0
+  padding: 10px 0;
 }
 
 .avatarContent .nickName {
@@ -335,7 +368,7 @@ export default {
   background-color: white;
   border-radius: 4px;
   color: #1c84c6;
-  font-size: 12px
+  font-size: 12px;
 }
 
 .MYTile .van-tag--danger {
@@ -349,4 +382,4 @@ export default {
   color: #969799;
   margin-left: 6px;
 }
-</style>
+</style>