浏览代码

首页增加提示类tab,B类指标页优化,我的-增加业务员日常工作统计

zhujindu 1 年之前
父节点
当前提交
961e11d7d3

+ 0 - 93
src/views/home/ABtarget.vue

@@ -667,99 +667,6 @@
           </van-collapse-item>
         </van-collapse>
       </div>
-      <div style="color: #999; font-size: 12px; margin: 0 10px">
-        <!--      昨日新增的数据统一在上午9点更新.-->
-        <span v-if="reportInfoData.newUser"
-          ><van-icon name="info-o" />&nbsp;新人入职后5个工作日不用提交日报.</span
-        >
-      </div>
-      <div class="lineGrey"></div>
-      <div v-if="approvalButton && !GZdata" class="contentborder">
-        <van-cell class="homeTitle" title="汇报审批" to="/dailyApprovalList">
-          <template #title>
-            <span class="custom-title">汇报审批&nbsp;&nbsp;</span>
-            <van-tag v-if="approvalPendingNum > 0" type="danger">{{ approvalPendingNum }}</van-tag>
-          </template>
-          <template #right-icon>
-            <van-icon class="homeCellIcon" name="arrow" size="16" />
-          </template>
-        </van-cell>
-        <div class="lineGrey"></div>
-      </div>
-      <!-- <div  class="contentborder"  v-if="todayGoal.storeAddressCheckNum>0">
-      <van-cell class="homeTitle" title="待规范门店地址" to="/storeAddress">
-        <template #title><span class="custom-title">待规范门店地址</span>&nbsp<van-tag type="danger">{{ todayGoal.storeAddressCheckNum }}</van-tag></template>
-        <template #right-icon><van-icon class="homeCellIcon" name="arrow" size="16"/></template>
-      </van-cell>
-      <div class="lineGrey"></div>
-    </div> -->
-      <div class="contentborder">
-        <van-cell class="homeTitle" title="流程审批" to="/signApprovalList">
-          <template #title
-            ><span class="custom-title">流程审批</span>&nbsp<van-tag
-              v-if="proccessPendingNum > 0"
-              type="danger"
-              >{{ proccessPendingNum }}</van-tag
-            ></template
-          >
-          <template #right-icon><van-icon class="homeCellIcon" name="arrow" size="16" /></template>
-        </van-cell>
-        <div class="lineGrey"></div>
-      </div>
-      <!-- 同城店建店审批 -->
-      <div
-        class="contentborder"
-        v-if="reportInfoData.storeApprovalNum != null && reportInfoData.storeApprovalNum > 0">
-        <van-cell class="homeTitle" title="同城店建店审批" to="/newStoreApprovalList">
-          <template #title>
-            <span class="custom-title">同城店建店审批&nbsp;&nbsp;</span>
-            <van-tag type="danger">{{ reportInfoData.storeApprovalNum }}</van-tag>
-          </template>
-          <template #right-icon>
-            <van-icon class="homeCellIcon" name="arrow" size="16" />
-          </template>
-        </van-cell>
-        <div class="lineGrey"></div>
-      </div>
-      <div class="contentborder">
-        <van-button
-          v-if="powerGrade == 3 && showButton"
-          class="Btn1"
-          plain
-          size="small"
-          type="info"
-          @click="doubleWeeklyLink"
-          >填写半月报</van-button
-        >
-        <van-button
-          v-if="powerGrade == 2 && showButton"
-          class="Btn1"
-          plain
-          size="small"
-          type="info"
-          @click="weeklyLink"
-          >填写周报</van-button
-        >
-        <van-button
-          v-if="powerGrade == 1 && showButton"
-          class="Btn1"
-          plain
-          size="small"
-          type="info"
-          @click="dailyLink"
-          >填写日报</van-button
-        >
-        <van-button
-          v-if="powerGrade < 4 && isCommit"
-          class="Btn1"
-          plain
-          size="small"
-          type="info"
-          @click="dailyLinks"
-          >查看我的历史汇报</van-button
-        >
-      </div>
-      <p class="updataTime" v-if="type != 4">更新时间:{{ updataTime }}</p>
       <a
         class="feedback"
         href="https://qiweitest.nipponpaint.com.cn/weixin/ecoRules/redirect/1064/0"

+ 181 - 0
src/views/home/bottomBtn.vue

@@ -0,0 +1,181 @@
+<template>
+  <div class="bottomBtn">
+    <div style="color: #999; font-size: 12px; margin: 0 10px">
+      <!--      昨日新增的数据统一在上午9点更新.-->
+      <span v-if="reportInfoData.newUser"
+        ><van-icon name="info-o" />&nbsp;新人入职后5个工作日不用提交日报.</span
+      >
+    </div>
+    <div class="lineGrey"></div>
+    <div v-if="approvalButton && !GZdata" class="contentborder">
+      <van-cell class="homeTitle" title="汇报审批" to="/dailyApprovalList">
+        <template #title>
+          <span class="custom-title">汇报审批&nbsp;&nbsp;</span>
+          <van-tag v-if="approvalPendingNum > 0" type="danger">{{ approvalPendingNum }}</van-tag>
+        </template>
+        <template #right-icon>
+          <van-icon class="homeCellIcon" name="arrow" size="16" />
+        </template>
+      </van-cell>
+      <div class="lineGrey"></div>
+    </div>
+    <!-- <div  class="contentborder"  v-if="todayGoal.storeAddressCheckNum>0">
+      <van-cell class="homeTitle" title="待规范门店地址" to="/storeAddress">
+        <template #title><span class="custom-title">待规范门店地址</span>&nbsp<van-tag type="danger">{{ todayGoal.storeAddressCheckNum }}</van-tag></template>
+        <template #right-icon><van-icon class="homeCellIcon" name="arrow" size="16"/></template>
+      </van-cell>
+      <div class="lineGrey"></div>
+    </div> -->
+    <div class="contentborder">
+      <van-cell class="homeTitle" title="流程审批" to="/signApprovalList">
+        <template #title
+          ><span class="custom-title">流程审批</span>&nbsp<van-tag
+            v-if="proccessPendingNum > 0"
+            type="danger"
+            >{{ proccessPendingNum }}</van-tag
+          ></template
+        >
+        <template #right-icon><van-icon class="homeCellIcon" name="arrow" size="16" /></template>
+      </van-cell>
+      <div class="lineGrey"></div>
+    </div>
+    <!-- 同城店建店审批 -->
+    <div
+      class="contentborder"
+      v-if="reportInfoData.storeApprovalNum != null && reportInfoData.storeApprovalNum > 0">
+      <van-cell class="homeTitle" title="同城店建店审批" to="/newStoreApprovalList">
+        <template #title>
+          <span class="custom-title">同城店建店审批&nbsp;&nbsp;</span>
+          <van-tag type="danger">{{ reportInfoData.storeApprovalNum }}</van-tag>
+        </template>
+        <template #right-icon>
+          <van-icon class="homeCellIcon" name="arrow" size="16" />
+        </template>
+      </van-cell>
+      <div class="lineGrey"></div>
+    </div>
+    <div class="contentborder">
+      <van-button
+        v-if="powerGrade == 3 && showButton"
+        class="Btn1"
+        plain
+        size="small"
+        type="info"
+        @click="doubleWeeklyLink"
+        >填写半月报</van-button
+      >
+      <van-button
+        v-if="powerGrade == 2 && showButton"
+        class="Btn1"
+        plain
+        size="small"
+        type="info"
+        @click="weeklyLink"
+        >填写周报</van-button
+      >
+      <van-button
+        v-if="powerGrade == 1 && showButton"
+        class="Btn1"
+        plain
+        size="small"
+        type="info"
+        @click="dailyLink"
+        >填写日报</van-button
+      >
+      <van-button
+        v-if="powerGrade < 4 && isCommit"
+        class="Btn1"
+        plain
+        size="small"
+        type="info"
+        @click="dailyLinks"
+        >查看我的历史汇报</van-button
+      >
+    </div>
+    <p class="updataTime" v-if="type != 4 && tabVal != '-1'">更新时间:{{ updataTime }}</p>
+  </div>
+</template>
+<script>
+import { getReportInfo } from '@/api/index';
+export default {
+  props: {
+    tabVal: {
+      type: [String, Number],
+      default: '-1',
+    },
+  },
+  data() {
+    return {
+      reportInfoData: {},
+      approvalButton: false,
+      JZQuota: false,
+      GZdata: false,
+      approvalPendingNum: 0,
+      proccessPendingNum: 0,
+      powerGrade: '2',
+      showButton: false,
+      isCommit: null,
+      updataTime: '',
+      type: '-1',
+    };
+  },
+  activated() {
+    this.getReportInfo();
+  },
+  methods: {
+    getReportInfo() {
+      let loading1 = this.$toast.loading({
+        duration: 0,
+        message: '加载中...',
+        forbidClick: true,
+      });
+      getReportInfo({ isContent: false }).then((res) => {
+        if (res.code == 200) {
+          if (res.data.postType == 'GZ') {
+            this.GZdata = true;
+          } else {
+            this.GZdata = false;
+          }
+          if (res.data.postType == 'JZ') {
+            this.JZQuota = true;
+          } else {
+            this.JZQuota = false;
+          }
+          loading1.clear();
+          localStorage.setItem('powerGrade', res.data.positionId);
+          localStorage.setItem('isDiy', res.data.diy);
+          localStorage.setItem('uType', res.data.userType);
+          localStorage.setItem('jzType', res.data.jzType);
+          localStorage.setItem('customerVisits', res.data.customerManagerVisits);
+          localStorage.setItem('postType', res.data.postType);
+          this.proccessPendingNum = res.data.proccessPendingNum;
+          this.reportInfoData = res.data;
+          this.approvalButton = res.data.approvalButton;
+          this.powerGrade = res.data.positionId;
+          this.showButton = res.data.showButton;
+          if (res.data.reportTargetAll != null) {
+            this.updataTime = res.data.reportTargetAll.updateTime;
+          }
+          this.approvalPendingNum = res.data.approvalPendingNum;
+          this.type = res.data.userType;
+        } else {
+          this.$toast(res.msg);
+        }
+      });
+    },
+    dailyLink() {
+      this.$router.push('/daily');
+    },
+    weeklyLink() {
+      this.$router.push('/weekly');
+    },
+    doubleWeeklyLink() {
+      this.$router.push('/doubleWeekly');
+    },
+    dailyLinks() {
+      this.$router.push('/myHistoricalDaily');
+    },
+  },
+};
+</script>
+<style scoped lang="scss"></style>

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

@@ -515,7 +515,7 @@ export default {
     /* background: #fff; */
     padding: 8px;
     /* padding: 10px; */
-    margin-bottom: 10px;
+    /* margin-bottom: 10px; */
     border-radius: 5px;
     .itemHeader {
       /* width: 150px; */

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

@@ -420,6 +420,8 @@ export default {
           color: #fff;
           width: 60px;
           margin-right: -8px;
+          /* overflow: hidden; */
+          white-space: nowrap;
           .van-icon__image {
             height: 0.7em;
           }
@@ -432,6 +434,8 @@ export default {
           display: flex;
           align-items: center;
           justify-content: end;
+          /* overflow: hidden; */
+          white-space: nowrap;
         }
       }
     }

+ 12 - 5
src/views/home/index.vue

@@ -18,6 +18,9 @@
         ><ABtarget :tabVal="tabVal" ref="Btarget"></ABtarget
       ></van-tab>
     </van-tabs>
+    <div class="bottomBtn">
+      <bottomBtn :tabVal="tabVal"></bottomBtn>
+    </div>
     <!-- <van-dialog v-model="shows" @confirm="titleconfirm">
       <div class="tipTitleBox" style="padding: 10px">
         <p class="p">系统提示</p>
@@ -43,9 +46,10 @@ import hintTabPage from './hintTabPage/index.vue';
 import tabBar from '@/components/tabBar';
 import ABtarget from './ABtarget.vue';
 import { mapState } from 'vuex';
+import bottomBtn from './bottomBtn.vue';
 export default {
   name: 'home',
-  components: { tabBar, hintTabPage, ABtarget },
+  components: { tabBar, hintTabPage, ABtarget, bottomBtn },
   computed: {
     ...mapState({
       userInfo: (state) => state.user.userInfo,
@@ -64,7 +68,7 @@ export default {
       handler(val) {
         if (val) {
           this.getDict();
-          this.getReportInfo();
+          // this.getReportInfo();
         }
       },
       immediete: true,
@@ -163,8 +167,8 @@ export default {
     flex: 1;
     display: flex;
     flex-direction: column;
-    position: sticky;
-    top: 0px;
+    /* position: sticky; */
+    /* top: 0px; */
     .van-tabs__wrap {
       position: sticky;
       top: 0px;
@@ -172,7 +176,7 @@ export default {
     }
     .van-tabs__content {
       flex: 1;
-      margin-bottom: 50px;
+      /* margin-bottom: 50px; */
     }
   }
   .myTab .van-tabs__nav--card {
@@ -187,5 +191,8 @@ export default {
   .myTab .van-tab {
     line-height: 40px;
   }
+  .bottomBtn {
+    margin-bottom: 55px;
+  }
 }
 </style>