|
|
@@ -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" /> 新人入职后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">汇报审批 </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> <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> <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">同城店建店审批 </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>
|