| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- <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() {
- 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"></style>
|