| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502 |
- <template>
- <div class="userPage">
- <div class="navBarTOP">
- <van-nav-bar class="navBar" title="我的" />
- </div>
- <div class="content">
- <div class="myHeader">
- <van-row>
- <van-col span="7">
- <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>
- </div>
- </van-col>
- </van-row>
- </div>
- <!-- 主体内容-->
- <div class="container">
- <!-- 门店及拜访-->
- <van-cell-group inset class="mtb10" v-if="reportInfo">
- <!-- <van-cell
- title="设计师招募"
- is-link
- to="/addDesignerPage"
- v-if="reportInfo.designerRecruitButton">
- <template #icon>
- <van-icon :name="addShop" class="zicon" />
- </template>
- </van-cell> -->
- <van-cell :title="addBTN" is-link @click="onSelect('B')" v-if="addShow">
- <template #icon>
- <van-icon :name="addShop" class="zicon" />
- </template>
- </van-cell>
- <van-cell title="新增专卖店/金牌店" is-link @click="onSelect('A')" v-if="addShow1">
- <template #icon>
- <van-icon :name="addShop" class="zicon" />
- </template>
- </van-cell>
- <van-cell :title="title" is-link to="/storemanagementlist">
- <template #icon>
- <van-icon :name="storeselect" class="zicon" />
- </template>
- </van-cell>
- <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">
- <van-cell title="设置" is-link to="/systemSettings">
- <template #icon>
- <van-icon name="setting-o" class="zicon" color="#0158ba" />
- </template>
- </van-cell>
- </van-cell-group>
- <!-- 客资类-->
- <van-cell-group inset class="mtb10">
- <van-cell title="客资&投诉任务" to="/clew" v-if="customerClueButton" is-link>
- <template #icon>
- <van-icon :name="history" class="zicon" />
- </template>
- <template #title>
- <span>客资&投诉任务</span>
- <van-tag type="danger" v-if="customerClueNum > 0">{{
- customerClueNum
- }}</van-tag>
- </template>
- </van-cell>
- <van-cell title="待分配客资" to="/assignAwait" v-if="isAssignFlag" is-link>
- <template #icon>
- <van-icon :name="history" class="zicon" />
- </template>
- <template #title>
- <span>待分配客资</span>
- <van-tag type="danger" v-if="notAllocationNum > 0">{{
- notAllocationNum
- }}</van-tag>
- </template>
- </van-cell>
- </van-cell-group>
- <!--拜访照片识别异常反馈 部主管及以上-->
- <van-cell-group inset class="mtb10">
- <van-cell title="拜访照片识别异常反馈" to="/AIImage" is-link>
- <template #icon>
- <van-icon :name="history" class="zicon" />
- </template>
- <template #title>
- <span>拜访照片识别异常反馈</span>
- <span
- style="font-weight: 600; font-size: 16px; color: red; margin-left: 15px"
- v-if="photoApprovalNum">
- <van-tag type="danger">{{ photoApprovalNum }}</van-tag>
- </span>
- </template>
- </van-cell>
- </van-cell-group>
- <!-- 汇报类-->
- <van-cell-group inset class="mtb10">
- <van-cell
- title="我的历史汇报"
- v-if="historyButton"
- is-link
- to="/myHistoricalDaily"
- class="MYTile">
- <template #title>
- <span class="custom-title">我的历史汇报 </span>
- </template>
- <template #icon>
- <van-icon :name="daily" class="zicon" />
- </template>
- <template #right-icon>
- <van-tag type="danger" v-if="existReject">退回待处理</van-tag>
- <van-icon name="arrow" />
- </template>
- </van-cell>
- <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">
- <van-tag type="danger">{{ thisWeekRemarkNum }}/5</van-tag>
- </span>
- <template #icon>
- <van-icon :name="daily" class="zicon" />
- </template>
- </van-cell>
- <van-cell
- title="下属部主管历史周报"
- v-if="showWeekly || isDiy == 'true'"
- is-link
- to="/subordinateHistoricalWeekly">
- <template #icon>
- <van-icon :name="daily" class="zicon" />
- </template>
- </van-cell>
- <van-cell
- title="下属大区主管历史半月报"
- v-if="showDouble || isDiy == 'true'"
- is-link
- to="/doubleWeeklyHistorical">
- <template #icon>
- <van-icon :name="daily" class="zicon" />
- </template>
- </van-cell>
- <van-cell
- title="下属汇报率审批率统计"
- v-if="showDaily || showWeekly || showDouble || isDiy == 'true'"
- is-link
- to="/reportingRate">
- <template #icon>
- <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">我的物料库存 </span>
- </template>
- <template #icon>
- <van-icon :name="daily" class="zicon" />
- </template>
- </van-cell>
- </van-cell-group>
- <!-- <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
- ">
- <template #title>
- <span class="custom-title">{{ item.summaryTaskName }}</span>
- </template>
- <template #icon>
- <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" />
- </template>
- <template #title>
- <span>主管任务查询</span>
- <span
- style="font-weight: 600; font-size: 16px; color: red; margin-left: 15px"
- v-if="summaryApprovalFeedbackNum">
- <van-tag type="danger">{{ summaryApprovalFeedbackNum }}</van-tag>
- </span>
- </template>
- </van-cell>
- <van-cell
- title="主管任务审批"
- is-link
- to="/SUPTaskApproval"
- v-if="summaryApprovalButton">
- <template #icon>
- <van-icon :name="history" class="zicon" />
- </template>
- <template #title>
- <span>主管任务审批</span>
- <span
- style="font-weight: 600; font-size: 16px; color: red; margin-left: 15px"
- v-if="summaryPendingApprovalNum">
- <van-tag type="danger">{{ summaryPendingApprovalNum }}</van-tag>
- </span>
- </template>
- </van-cell>
- <van-cell
- title="家装推广会历史提报查询"
- is-link
- to="/VisitSummaryMy"
- v-if="jzTaskButton">
- <template #icon>
- <van-icon :name="history" class="zicon" />
- </template>
- <template #title>
- <span>家装推广会历史提报查询</span>
- <span
- style="font-weight: 600; font-size: 16px; color: red; margin-left: 15px"
- v-if="summaryApprovalFeedbackNum">
- <van-tag type="danger">{{ summaryApprovalFeedbackNum }}</van-tag>
- </span>
- </template>
- </van-cell>
- </div>
- </van-cell-group>
- </div>
- </div>
- <tab-bar tabBarActive="MyList"></tab-bar>
- </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 { selectAllocationPermission } from '@/api/week';
- export default {
- name: 'MyList',
- components: { tabBar },
- data() {
- return {
- history: history,
- avatar: avatar,
- addShow: false,
- doubleWeekly: doubleWeekly,
- Weekly: Weekly,
- daily: daily,
- storeselect: storeselect,
- 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,
- thisWeekRemarkNum: null,
- notAllocationNum: 0, //待分配客资数量
- isAssignFlag: false,
- photoApprovalNum: 0,
- summaryApprovalButton: false,
- summaryPendingApprovalNum: 0,
- summaryApprovalFeedbackNum: 0,
- reportInfo: 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();
- }
- },
- },
- 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();
- },
- 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 = '我的客户';
- }
- 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 },
- });
- },
- getReportInfo() {
- this.deptLevel = localStorage.getItem('deptLevel');
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- // 如果有客资分配权限,获取待分配客资数量
- this.getSelectAllocationPermission();
- getReportInfo({ isContent: false }).then((res) => {
- loading1.clear();
- this.reportInfo = res.data;
- this.list = res.data.summaryTasks;
- this.historyButton = res.data.historyButton;
- localStorage.setItem('powerGrade', res.data.positionId);
- localStorage.setItem('userDeptLevel', res.data.userDeptLevel);
- 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.summaryApprovalButton = res.data.summaryApprovalButton;
- this.customerClueButton = res.data.customerClueButton;
- this.customerClueNum = res.data.customerClueNum;
- this.updataTime = res.data.reportTargetAll.updateTime;
- this.thisWeekRemarkNum = res.data.thisWeekRemarkNum; //查询本周点评的数量,null不需要展示
- this.photoApprovalNum = res.data.photoApprovalNum; //首页照片异常待反馈数量
- this.summaryPendingApprovalNum = res.data.summaryPendingApprovalNum;
- this.summaryApprovalFeedbackNum = res.data.summaryApprovalFeedbackNum;
- if (res.data.deptLevel === 0) {
- this.showDaily = false;
- this.showWeekly = false;
- this.showDouble = false;
- }
- if (res.data.deptLevel === 1) {
- this.showDaily = true;
- this.showWeekly = false;
- this.showDouble = false;
- }
- if (res.data.deptLevel === 2) {
- this.showDaily = true;
- this.showWeekly = true;
- this.showDouble = false;
- }
- if (res.data.deptLevel === 3) {
- this.showDaily = true;
- this.showWeekly = true;
- this.showDouble = true;
- }
- });
- },
- getSelectAllocationPermission() {
- selectAllocationPermission()
- .then((res) => {
- this.isAssignFlag = res.data.isAllocationPermission;
- this.notAllocationNum = res.data.notAllocationNum;
- })
- .catch((error) => {
- console.log(error);
- });
- },
- login() {
- if (this.num > 10) {
- 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';
- }
- },
- },
- };
- </script>
- <style scoped lang="scss">
- .userPage {
- height: 100%;
- width: 100%;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- .content {
- flex: 1;
- margin-top: 46px;
- overflow-y: auto;
- }
- .tabBar {
- height: 50px;
- }
- }
- .myHeader {
- background-color: #1c84c6;
- padding: 24px 30px;
- background: url('../../assets/bg.png');
- background-size: cover;
- }
- .mtb10 {
- margin: 10px 16px;
- }
- .container {
- margin: 16px 0;
- }
- .zicon {
- margin-top: 4px;
- padding-right: 8px;
- }
- .avatarContent {
- padding: 10px 0;
- }
- .avatarContent .nickName {
- color: white;
- font-size: 14px;
- margin-top: 0;
- }
- .avatarContent .postName {
- display: inline-block;
- padding: 4px 6px;
- background-color: white;
- border-radius: 4px;
- color: #1c84c6;
- font-size: 12px;
- }
- .MYTile .van-tag--danger {
- border-radius: 20px;
- padding: 0 6px;
- }
- .MYTile .van-icon-arrow {
- font-size: 16px;
- line-height: 24px;
- color: #969799;
- margin-left: 6px;
- }
- </style>
|