| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- <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" 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="reportType == 3 && showButton"
- class="Btn1"
- plain
- size="small"
- type="info"
- @click="doubleWeeklyLink"
- >填写半月报</van-button
- >
- <van-button
- v-if="reportType == 2 && showButton"
- class="Btn1"
- plain
- size="small"
- type="info"
- @click="weeklyLink"
- >填写周报</van-button
- >
- <van-button
- v-if="reportType == 1 && showButton"
- class="Btn1"
- plain
- size="small"
- type="info"
- @click="dailyLink"
- >填写日报</van-button
- >
- <van-button
- v-if="reportType < 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 class="ownerBirthdayReminds" v-if="ownerBirthdayBoxFlag && ownerBirthdayReminds">
- <div class="ownerBirthdayBox">
- <div class="title"><img :src="require('@/assets/hua.png')" />金牌店生日提醒</div>
- <div class="content">{{ this.ownerBirthdayReminds }},将在3日后生日,请及时送上生日祝福!</div>
- <img class="dangao" :src="require('@/assets/dangao.png')" />
- </div>
- <div class="close" @click="ownerBirthdayBoxFlag = false">
- <img :src="require('@/assets/close.png')" />
- </div>
- </div>
- </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',
- ownerBirthdayBoxFlag: false,
- ownerBirthdayReminds: null,
- reportType: null,
- };
- },
- activated() {
- this.getReportInfo();
- },
- methods: {
- getReportInfo() {
- 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;
- }
- localStorage.setItem('powerGrade', res.data.positionId);
- localStorage.setItem('userDeptLevel', res.data.userDeptLevel);
- 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);
- localStorage.setItem('reportType', res.data.reportType);
- this.proccessPendingNum = res.data.proccessPendingNum;
- this.reportInfoData = res.data;
- this.approvalButton = res.data.approvalButton;
- this.powerGrade = res.data.positionId;
- this.showButton = res.data.showButton;
- this.reportType = res.data.reportType;
- if (res.data.reportTargetAll != null) {
- this.updataTime = res.data.reportTargetAll.updateTime;
- }
- this.approvalPendingNum = res.data.approvalPendingNum;
- this.type = res.data.userType;
- // 金牌店老板生日提醒
- if (res.data.ownerBirthdayReminds && res.data.ownerBirthdayReminds.length) {
- this.ownerBirthdayBoxFlag = true;
- this.ownerBirthdayReminds = res.data.ownerBirthdayReminds.join(',');
- }
- } else {
- this.$toast(res.msg);
- }
- });
- },
- dailyLink() {
- if (!this.isAllow()) return;
- this.$router.push('/daily');
- },
- weeklyLink() {
- if (!this.isAllow()) return;
- this.$router.push('/weekly');
- },
- doubleWeeklyLink() {
- if (!this.isAllow()) return;
- this.$router.push('/doubleWeekly');
- },
- dailyLinks() {
- if (!this.isAllow()) return;
- this.$router.push('/myHistoricalDaily');
- },
- // 是否允许填写汇报
- isAllow() {
- let reportRemark = this.reportInfoData.reportRemark;
- if (reportRemark) {
- this.$dialog
- .alert({
- message: reportRemark,
- })
- .then(() => {});
- return false;
- } else {
- return true;
- }
- },
- },
- };
- </script>
- <style scoped lang="scss">
- .bottomBtn {
- .ownerBirthdayReminds {
- width: 100%;
- height: 100%;
- position: fixed;
- top: 0;
- z-index: 999999;
- background: rgba(0, 0, 0, 0.5);
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- .ownerBirthdayBox {
- width: 90%;
- // height: 369px;
- background: url('../../assets/ownerBirthdayBG.png') no-repeat center center;
- background-size: 100% 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
- .title {
- text-align: center;
- font-size: 20px;
- color: #99443b;
- font-weight: bold;
- display: flex;
- align-items: flex-end;
- padding-top: 40px;
- position: relative;
- img {
- width: 35px;
- height: 35px;
- position: absolute;
- left: -55px;
- }
- }
- .content {
- width: 80%;
- line-height: 30px;
- font-size: 16px;
- color: #555555;
- text-align: center;
- margin-top: 20px;
- }
- .dangao {
- width: 80%;
- height: 160px;
- margin-top: 20px;
- margin-bottom: 35px;
- }
- }
- .close {
- img {
- width: 35px;
- height: 35px;
- margin-top: 20px;
- }
- }
- }
- }
- </style>
|