| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228 |
- <template>
- <div class="bgcolor storeManagement">
- <div class="navBarTOP" style="background-color: #fff">
- <van-nav-bar class="navBar" title="客户信息" left-arrow @click-left="onClickLeft" />
- <!-- <van-row gutter="20" style="padding:0 16px;" v-if="addShow">
- <van-col span="12" v-if="addShow1">
- <van-button type="info" size="small" style="background: #0057ba;border-color: #0057ba;width: 100%;border-radius: 5px;
- margin-top: 10px;" @click="onSelect('A')"><van-icon name="guide-o" /> 新增专卖店/金牌店</van-button>
- </van-col>
- <van-col span="12" >
- <van-button type="info" size="small" style="margin-top: 10px;background: #0057ba;border-color: #0057ba;width: 100%;border-radius: 5px;" @click="onSelect('B')"><van-icon name="guide-o" /> {{addBTN}}</van-button>
- </van-col>
- </van-row> -->
- <div class="searchDiv">
- <van-search
- v-model="fromValue.storeName"
- show-action
- left-icon="search"
- placeholder="搜索名称/编号/地址">
- <template #action>
- <div @click="onSearch">搜索</div>
- </template>
- </van-search>
- <div class="selectFilter" v-if="tabVal == 1">
- <van-dropdown-menu :close-on-click-overlay="false">
- <van-dropdown-item :title="dropdownTitle" ref="dropdownItem" @open="dropdownOpen">
- <van-cell
- center
- :title="item.text"
- v-for="item in statusOption"
- @click.stop="dropdownItemClick(item)">
- <template #right-icon v-if="item.selectFlag">
- <van-icon name="success" color="red" />
- </template>
- </van-cell>
- <div style="padding: 5px 16px">
- <van-button type="danger" block round @click="onConfirm"> 确认 </van-button>
- </div>
- </van-dropdown-item>
- </van-dropdown-menu>
- </div>
- </div>
- <van-tabs class="myTab" type="card" v-model="tabVal" color="#0057ba" @change="tabChange">
- <van-tab title="销售部" name="0" :disabled="disabled"></van-tab>
- <van-tab :title="title" name="1" :disabled="disabled"></van-tab>
- </van-tabs>
- <div class="lineGrey"></div>
- </div>
- <!-- <div v-if="!addShow" style="padding-top: 154px"></div> -->
- <!-- <div v-if="addShow" style="padding-top: 160px"></div> -->
- <div style="padding-top: 160px"></div>
- <!-- 主体内容-->
- <div class="container">
- <van-list
- class="myList"
- v-model="loading"
- :finished="finished"
- finished-text="--已经到底了--"
- :immediate-check="false"
- @load="onLoad">
- <div class="cellcontent srore" v-for="(item, index) in list" :key="index">
- <van-cell>
- <div class="card">
- <div></div>
- <div class="title" style="padding-right: 74px">
- <template v-if="item.storeLabels">
- <!-- 金牌店ABC -->
- <img
- class="JPABC"
- :src="require('@/assets/Icon/storeA.png')"
- v-if="item.storeLabels.storeA" />
- <img
- class="JPABC"
- :src="require('@/assets/Icon/storeB.png')"
- v-if="item.storeLabels.storeB" />
- <img
- class="JPABC"
- :src="require('@/assets/Icon/storeC.png')"
- v-if="item.storeLabels.storeC" />
- <img
- class="JPABC"
- :src="require('@/assets/Icon/storeD.png')"
- v-if="item.storeLabels.storeD" />
- <img
- class="JPABC"
- :src="require('@/assets/Icon/storeE.png')"
- v-if="item.storeLabels.storeE" />
- </template>
- <span class="btn" :data-clipboard-text="item.storeCode">
- <span>{{ item.storeName }}</span>
- (<span style="color: #0057ba">{{ item.storeCode }}</span
- >)
- <van-icon
- :name="paste"
- color="#ee0a24"
- size="20"
- style="top: 6px; margin-left: 4px" />
- </span>
- <!-- validFlag: 0正常门店,1无效门店,2临时门店 -->
- <span
- v-if="item.validFlag == 2"
- style="
- display: inline-block;
- border-radius: 100px;
- width: 20px;
- text-align: center;
- color: orange;
- font-weight: normal;
- "
- >临</span
- >
- <!-- "approvalStatus": 1:已结案;0:未结案, -->
- <!-- "processApprovalStatus": 审批状态(0=未提交,1=已提交待审核,2=审批通过,3=审批拒绝) -->
- <template v-if="item.approvalStatus == 0 && item.validFlag == 0">
- <span class="statusIcon submit" v-if="item.processApprovalStatus == 1"
- >已提交</span
- >
- <span class="statusIcon noSubmit" v-if="item.processApprovalStatus == 0"
- >未提交</span
- >
- </template>
- </div>
- <van-button
- type="info"
- size="small"
- plain
- class="centerBtn ctns"
- @click="storeDetailFn(item)"
- >客户信息<van-icon name="arrow"
- /></van-button>
- <div class="info" style="position: relative">
- 联系人:{{ item.contactName }}
- <div style="position: absolute; bottom: 0px; right: 0px" v-if="item.storeLabels">
- <el-popover
- popper-class="zpover"
- placement="bottom"
- width="120"
- trigger="click"
- content="该客户为凤凰客户">
- <div
- v-if="item.storeLabels.fhCustomer"
- class="visitStoreIco"
- style="background-color: #fff"
- slot="reference">
- <van-icon :name="require('@/assets/Icon/fenghuangjihua.png')" size="26" />
- </div>
- </el-popover>
- <el-popover popper-class="zpover zpover6" placement="bottom" trigger="click">
- <div>
- <p>
- 本店{{ timeData }}下单SKU数:<a
- @click="linkList(item)"
- style="text-decoration: underline"
- >点击查看详情</a
- >
- </p>
- </div>
- <div
- class="visitStoreIco"
- v-if="item.storeLabels.zysslNums !== false"
- style="background-color: #fff; position: relative"
- slot="reference">
- <p
- style="
- width: 100%;
- position: absolute;
- z-index: 1;
- top: 0.2px;
- width: 22px;
- margin: 0;
- margin-left: 3.6px;
- text-align: center;
- font-size: 12px;
- ">
- {{ item.storeLabels.zysslNums }}
- </p>
- <van-icon :name="ord" size="26" />
- </div>
- </el-popover>
- <el-popover
- popper-class="zpover zpover5"
- placement="bottom"
- width="200"
- trigger="click">
- <div v-if="item.storeLabels">
- <p>已参加:</p>
- <p v-for="tt in (item.storeLabels.targetOne + '').split(';')">{{ tt }}</p>
- </div>
- <div
- class="visitStoreIco"
- v-if="item.storeLabels.targetOne"
- style="background-color: #fff"
- slot="reference">
- <van-icon :name="targetOne" size="26" />
- </div>
- </el-popover>
- <el-popover
- popper-class="zpover"
- placement="bottom"
- width="200"
- trigger="click"
- content="同城店近60天未下单">
- <div
- v-if="item.storeLabels.fxNoOrder"
- class="visitStoreIco"
- style="background-color: #fff"
- slot="reference">
- <van-icon :name="order60" size="26" />
- </div>
- </el-popover>
- <el-popover
- popper-class="zpover"
- placement="bottom"
- width="200"
- trigger="click"
- content="金牌店近30天未下单">
- <div
- v-if="item.storeLabels.noOrder"
- class="visitStoreIco"
- style="background-color: #fff"
- slot="reference">
- <van-icon :name="order" size="26" />
- </div>
- </el-popover>
- <el-popover
- popper-class="zpover"
- placement="bottom"
- width="200"
- trigger="click"
- content="本店本月进过专业时时丽">
- <div
- v-if="item.storeLabels.zyssl"
- class="visitStoreIco"
- style="background-color: #ed5c68"
- slot="reference">
- 专
- </div>
- </el-popover>
- <el-popover
- popper-class="zpover zpover1"
- placement="bottom"
- width="200"
- trigger="click"
- content="本店本月进过超好贴">
- <div
- v-if="item.storeLabels.chtczj"
- class="visitStoreIco"
- style="background-color: #0057ba"
- slot="reference">
- 超
- </div>
- </el-popover>
- <!-- <el-popover-->
- <!-- placement="bottom"-->
- <!-- width="200"-->
- <!-- popper-class="zpover zpover2"-->
- <!-- trigger="click"-->
- <!-- content="本月未被拜访的门店">-->
- <!-- <div v-if="item.storeLabels.noVisit" class="visitStoreIco" style="background-color: #fff" slot="reference">-->
- <!-- <van-icon :name="visitTimess" size="26" /></div>-->
- <!-- </el-popover>-->
- <el-popover
- placement="bottom"
- popper-class="zpover zpover1 zpover1sb"
- trigger="click"
- :content="'本店本月已拜访过' + item.storeLabels.visitTimes + '次'">
- <div
- v-if="item.storeLabels.visitTimes && item.storeLabels.visitTimes > 0"
- class="visitStoreIco"
- slot="reference"
- style="background-color: #fff; position: relative">
- <p
- style="
- width: 100%;
- position: absolute;
- z-index: 10;
- top: -2px;
- margin: 0;
- text-align: center;
- font-size: 12px;
- ">
- {{ item.storeLabels.visitTimes }}
- </p>
- <!-- A级金牌店拜访次数少于2 -->
- <van-icon
- :name="require('@/assets/ordernumRed.png')"
- size="26"
- v-if="
- item.storeLabels.storeA &&
- item.needVisitNum &&
- item.storeLabels.visitTimes < item.needVisitNum
- " />
- <van-icon :name="require('@/assets/ordernum.png')" size="26" v-else />
- </div>
- <p style="text-align: center; background: #fff; color: #000; padding: 5px 0">
- 本店本月已拜访过{{ item.storeLabels.visitTimes }}次
- </p>
- <p
- v-if="item.storeLabels.storeA && item.needVisitNum"
- style="text-align: center; background: #fff; color: red; padding: 5px 0">
- A级金牌店拜访标准:1月{{ item.needVisitNum }}次
- </p>
- <el-table :data="item.userVisitTimesMap" border max-height="180px">
- <el-table-column label="业务员" prop="userName" />
- <el-table-column label="拜访次数" prop="visitTimes" />
- </el-table>
- </el-popover>
- </div>
- </div>
- <div class="info">
- 类型:{{ item.storeCategoryName }}
- <el-popover popper-class="zpover zpover6" placement="bottom-start" trigger="click">
- <div>
- <p>
- 本店经营品项指导:
- <a @click="linkimg(item)" style="text-decoration: underline">点击查看</a>
- </p>
- </div>
- <van-icon name="question-o" size="18" slot="reference" />
- </el-popover>
- </div>
- <div class="info">联系电话:{{ item.telephone }}</div>
- <div class="info">地址:{{ item.addressLine }}</div>
- <!-- 分销店 -->
- <template
- v-if="
- item.sfaStoreType &&
- item.sfaStoreType.type == 'fxd' &&
- item.sfaStoreChainsContactList
- ">
- <div class="info" v-if="addShow1">
- 经销商:
- <div class="TCFXListItem" v-for="(item, index) in item.sfaStoreChainsContactList">
- <el-popover
- popper-class="zpover zpoverStoreztype"
- placement="bottom-start"
- trigger="click">
- <div>
- <div>{{ item.chainCode }}</div>
- <div>{{ item.chainName }}</div>
- </div>
- <div slot="reference" :key="index">
- {{ item.categoryDescribe }}
- </div>
- </el-popover>
- </div>
- </div>
- </template>
- <template v-else>
- <div class="info" v-if="addShow1">经销商:{{ item.chainName }}</div>
- </template>
- </div>
- </van-cell>
- <div class="lineGrey"></div>
- </div>
- <van-empty v-if="list.length == 0" />
- </van-list>
- <br />
- <br />
- <br />
- <br />
- </div>
- <van-popup v-model="showProvincePicker" position="bottom">
- <van-picker
- show-toolbar
- title="省(州)"
- :columns="provinceList"
- @confirm="onProvinceConfirm"
- @cancel="showProvincePicker = false" />
- </van-popup>
- <van-popup v-model="showCityPicker" position="bottom">
- <van-picker
- show-toolbar
- title="城市"
- :columns="cityList"
- @confirm="onCityConfirm"
- @cancel="showCityPicker = false" />
- </van-popup>
- <van-popup v-model="showDistrictPicker" position="bottom">
- <van-picker
- show-toolbar
- title="县区"
- :columns="districtList"
- @confirm="onDistrictConfirm"
- @cancel="showDistrictPicker = false" />
- </van-popup>
- <div class="positionContent" @click="rangeStoreFn()" v-if="mapShows">
- <van-icon class="img" :name="mpimg" size="50" />
- </div>
- </div>
- </template>
- <script>
- import {
- storeList,
- getStoreTypeList,
- storeMyList,
- getStoreyslTypeList,
- getstoreCoverPosition,
- streetQuery,
- buryingPoint,
- ProductItemImge,
- } from '@/api/index';
- import ord from '@/assets/ord.png';
- import paste from '@/assets/paste.png';
- import mpimg from '@/assets/mpimg.png';
- import order from '@/assets/order.png';
- import axios from 'axios';
- import order60 from '@/assets/order60.png';
- import targetOne from '@/assets/targetOne.png';
- import visitTimes from '@/assets/visitTimes.png';
- export default {
- data() {
- return {
- disabled: false,
- list: [],
- ord: ord,
- addShow: false,
- mapShows: false,
- visitTimess: visitTimes,
- paste: paste,
- storeTypeList: [],
- loading: false,
- finished: false,
- mpimg: mpimg,
- order: order,
- order60: order60,
- targetOne: targetOne,
- pageSize: 12,
- pageNum: 1,
- cont: 0,
- tabVal: '1',
- showProvincePicker: false,
- showCityPicker: false,
- showDistrictPicker: false,
- provinceList: [],
- cityList: [],
- districtList: [],
- validFlag: '',
- addShow1: false,
- addBTN: '新建工地',
- title: '我的',
- fromValue: {
- storeName: '',
- provinceName: '全部省',
- districtName: '全部县区',
- cityName: '全部市',
- province: '',
- city: '',
- pageSize: 12,
- pageNum: 1,
- district: '',
- timeData: '',
- },
- timeData: '',
- approvalStatus: '',
- processApprovalStatus: '',
- typeOption: [
- { text: '全部门店', value: '' },
- { text: '已结案', value: 1 },
- { text: '未结案', value: 0 },
- ],
- statusOption: [
- { text: '已结案', value: 1, selectFlag: false },
- { text: '已提交', value: 2, selectFlag: false },
- { text: '未提交', value: 3, selectFlag: false },
- ],
- storeTypeTitle: '门店类型',
- storeStatusTitle: '门店状态',
- activatedTitles: [],
- activatedValues: [],
- dropdownTitle: '门店状态',
- };
- },
- activated() {
- // 是否从下单成功页面跳转过来,下单成功后点击上传陈列照直接跳转到编辑页面
- let id = localStorage.getItem('successStoreId');
- if (this.$route.query.source == 'successPage' && id) {
- // 跳转到详情页
- this.storeDetailFn({ storeId: id });
- } else {
- this.initSelect();
- this.tabVal = localStorage.getItem('tabVal') || '1';
- if (localStorage.getItem('postType') == 'JZ' || localStorage.getItem('postType') == 'GZ') {
- this.mapShows = false;
- } else {
- this.mapShows = true;
- }
- this.getStoreTypeList();
- this.getstoreCoverPosition();
- this.getStreetQuery();
- this.getMonth();
- let storeStatus = localStorage.getItem('storeStatus');
- // 1:未完工;2:未结案
- if (storeStatus) {
- if (storeStatus == 2) {
- this.statusOption = [
- { text: '已结案', value: 1, selectFlag: false },
- { text: '已提交', value: 2, selectFlag: true },
- { text: '未提交', value: 3, selectFlag: true },
- ];
- }
- this.setOption();
- }
- this.onSearch();
- if (localStorage.getItem('postType') == 'JZ' || localStorage.getItem('postType') == 'GZ') {
- this.mapShows = false;
- } else {
- this.mapShows = true;
- }
- }
- },
- watch: {
- $route: {
- handler(to, from) {
- // if (to.path == '/storemanagement/index' && from.path == '/My/index') {
- // this.tabVal = '1';
- // }
- if (from.path == '/storemanagement/index') {
- // 离开当前页面时
- localStorage.removeItem('storeStatus');
- }
- },
- // immediate: true,
- },
- },
- methods: {
- initSelect() {
- this.activatedTitles = [];
- this.activatedValues = [];
- this.dropdownTitle = '门店状态';
- this.dropdownOpen();
- },
- linkList(val) {
- localStorage.setItem('tabVal', this.tabVal);
- this.$router.push({
- path: '/pItem',
- query: {
- id: val.storeId,
- detilId: 'a',
- storeCode: val.storeCode,
- showOrderButton: val.showOrderButton,
- },
- });
- },
- linkimg(val) {
- ProductItemImge({ storeId: val.storeId }).then((response) => {
- if (response.code == 200) {
- if (response.data != undefined) {
- window.open(response.data);
- } else {
- this.$toast(response.msg);
- }
- }
- });
- },
- getMonth() {
- // 获取当前日期
- var currentDate = new Date();
- // 获取当前月份
- var currentMonth = currentDate.getMonth();
- // 获取当前年份
- // var currentYear = currentDate.getFullYear();
- var previousMonthDate1 = new Date();
- if (currentDate.getDate() == 1) {
- previousMonthDate1.setMonth(currentMonth - 1);
- } else {
- }
- var previousMonth1 = previousMonthDate1.getMonth();
- var previousYear1 = previousMonthDate1.getFullYear();
- // 计算前三个月的年份和月份
- var previousMonthDate = new Date();
- if (currentDate.getDate() == 1) {
- previousMonthDate.setMonth(currentMonth - 3);
- } else {
- previousMonthDate.setMonth(currentMonth - 2);
- }
- var previousMonth = previousMonthDate.getMonth();
- var previousYear = previousMonthDate.getFullYear();
- //前三个月
- if (previousYear1 == previousYear) {
- var formattedPreviousMonth1 = previousYear1 + '-' + (previousMonth1 + 1);
- // 格式化年份和月份
- var formattedPreviousMonth = previousYear + '-' + (previousMonth + 1);
- this.timeData =
- formattedPreviousMonth.split('-')[1] + '-' + formattedPreviousMonth1.split('-')[1] + '月';
- } else {
- var formattedPreviousMonth1 = previousYear1 + '年' + (previousMonth1 + 1) + '月';
- // .toString().padStart(2, '0');
- // 格式化年份和月份
- var formattedPreviousMonth = previousYear + '年' + (previousMonth + 1) + '月';
- this.timeData = formattedPreviousMonth + '-' + formattedPreviousMonth1;
- }
- },
- rangeStoreFn() {
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- let url = window.location.href;
- let wx = this.wx;
- var that = this;
- let qiyeData;
- const instance = axios.create();
- instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
- instance
- .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
- params: {
- url: url,
- },
- })
- .then((response) => {
- if (response.status == 200) {
- this.cont = 3;
- var flat = true;
- var times = setInterval(() => {
- this.cont--;
- if (this.cont == '0') {
- if (flat) {
- loading1.clear();
- clearInterval(times);
- that.$dialog
- .alert({
- message: '定位失败,请开启企微定位权限',
- })
- .then(() => {});
- } else {
- clearInterval(times);
- }
- }
- }, 1000);
- qiyeData = response.data.data;
- wx.config({
- beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
- debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
- appId: qiyeData.appId, // 必填,企业微信的corpID
- timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
- nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
- signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
- jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
- });
- wx.ready(function () {
- wx.getLocation({
- type: 'gcj02',
- success: function (res) {
- flat = false;
- loading1.clear();
- var name = that.title;
- if (that.tabVal != 1) {
- name = '销售部';
- }
- buryingPoint({
- systemModel: '客户信息',
- buryingPointType: 3,
- buryingPointValue: name,
- buryingPointName: '地图',
- buryingPointPosition: '进入地图',
- });
- if (that.tabVal == 1) {
- localStorage.setItem('tabVal', this.tabVal);
- that.$router.push({
- path: '/rangeStore',
- query: {
- lat: '',
- lon: '',
- tabVal: 4,
- },
- });
- } else {
- localStorage.setItem('tabVal', this.tabVal);
- that.$router.push({
- path: '/rangeStore',
- query: {
- lat: '',
- lon: '',
- tabVal: 3,
- },
- });
- }
- },
- fail: function () {
- loading1.clear();
- that.$dialog.alert({
- message: 'GPS未开启',
- });
- },
- });
- });
- wx.error(function (res) {
- loading1.clear();
- that.$dialog
- .alert({
- message: '定位失败,请开启企微定位权限',
- })
- .then(() => {});
- });
- }
- });
- },
- 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';
- }
- },
- onProvinceConfirm(value) {
- this.fromValue.provinceName = value.text;
- this.fromValue.province = value.provinceCode;
- this.fromValue.cityName = '全部市';
- this.fromValue.city = '';
- this.fromValue.districtName = '全部县区';
- this.fromValue.district = '';
- this.fromValue.townName = '';
- this.fromValue.townCode = '';
- this.countyCode = '';
- this.cityCode = '';
- this.provinceCode = value.provinceCode;
- this.getStreetQuery('1');
- this.showProvincePicker = false;
- this.onSearch();
- },
- onCityConfirm(value) {
- this.fromValue.cityName = value.text;
- this.fromValue.city = value.cityCode;
- this.fromValue.districtName = '全部县区';
- this.fromValue.district = '';
- this.fromValue.townName = '';
- this.fromValue.townCode = '';
- this.countyCode = '';
- this.cityCode = value.cityCode;
- this.getStreetQuery('2');
- this.showCityPicker = false;
- this.onSearch();
- },
- onDistrictConfirm(value) {
- this.fromValue.districtName = value.text;
- this.fromValue.district = value.countyCode;
- this.fromValue.townName = '';
- this.fromValue.townCode = '';
- this.countyCode = value.countyCode;
- this.fromValue.cityLevel = value.countyLevel;
- this.getStreetQuery('3');
- this.showDistrictPicker = false;
- this.onSearch();
- },
- getStreetQuery(type) {
- var provinceCode = '';
- var cityCode = '';
- var countyCode = '';
- if (type == '1') {
- provinceCode = this.fromValue.province;
- cityCode = '';
- countyCode = '';
- } else if (type == '2') {
- provinceCode = this.fromValue.province;
- cityCode = this.fromValue.city;
- countyCode = '';
- } else if (type == '3') {
- provinceCode = this.fromValue.province;
- cityCode = this.fromValue.city;
- countyCode = this.fromValue.district;
- } else {
- provinceCode = '';
- cityCode = '';
- countyCode = '';
- }
- streetQuery({ provinceCode: provinceCode, cityCode: cityCode, countyCode: countyCode }).then(
- (res) => {
- var provinceList = [{ provinceCode: '', text: '全部省' }];
- var cityList = [{ cityCode: '', text: '全部市' }];
- var districtList = [{ countyCode: '', text: '全部县区' }];
- var townList = [];
- if (type == '1') {
- for (var z1 = 0; z1 < res.data.length; z1++) {
- cityList.push({ cityCode: res.data[z1].cityCode, text: res.data[z1].cityName });
- }
- this.cityList = cityList;
- } else if (type == '2') {
- for (var z2 = 0; z2 < res.data.length; z2++) {
- districtList.push({
- countyCode: res.data[z2].countyCode,
- text: res.data[z2].countyName,
- countyLevel: res.data[z2].countyLevel,
- });
- }
- this.districtList = districtList;
- } else if (type == '3') {
- for (var z3 = 0; z3 < res.data.length; z3++) {
- townList.push({ townCode: res.data[z3].townCode, text: res.data[z3].townName });
- }
- this.townList = townList;
- } else {
- for (var z = 0; z < res.data.length; z++) {
- provinceList.push({
- provinceCode: res.data[z].provinceCode,
- text: res.data[z].provinceName,
- });
- }
- this.provinceList = provinceList;
- }
- }
- );
- },
- 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;
- }
- }
- }
- });
- },
- tabChange(name) {
- window.scrollTo(0, 0);
- this.finished = true;
- this.disabled = true;
- this.pageNum = 1;
- this.list = [];
- this.tabVal = name;
- this.onLoad();
- },
- getStoreTypeList() {
- if (localStorage.getItem('storeType') == '2') {
- getStoreyslTypeList({}).then((res) => {
- this.storeTypeList = res.data;
- });
- } else {
- getStoreTypeList({}).then((res) => {
- this.storeTypeList = res.data;
- });
- }
- },
- onLoad() {
- if (this.tabVal == 1) {
- this.getUserMyStoreList();
- } else {
- this.getUserStoreList();
- }
- },
- getUserMyStoreList() {
- if (this.refreshing) {
- this.refreshing = false;
- }
- if (this.pageNum == 1) {
- this.list = [];
- }
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- var fromValue = this.fromValue;
- fromValue.pageNum = this.pageNum;
- fromValue.pageSize = this.pageSize;
- fromValue.storeName = this.fromValue.storeName.trim();
- storeMyList({
- ...fromValue,
- storeQueryStatus: this.activatedValues.join(','),
- }).then((res) => {
- loading1.clear();
- this.disabled = false;
- if (res.code == 200) {
- this.loading = false;
- this.list = this.list.concat(res.rows);
- if (this.list.length >= res.total) {
- this.finished = true;
- } else {
- this.finished = false;
- }
- this.pageNum = this.pageNum + 1;
- // this.list = res.rows
- } else {
- this.$toast.fail(res.msg);
- }
- });
- },
- getUserStoreList() {
- if (this.refreshing) {
- this.list = [];
- this.refreshing = false;
- }
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- var fromValue = this.fromValue;
- fromValue.pageNum = this.pageNum;
- fromValue.pageSize = this.pageSize;
- fromValue.storeName = this.fromValue.storeName.trim();
- storeList(fromValue).then((res) => {
- loading1.clear();
- this.disabled = false;
- if (res.code == 200) {
- this.loading = false;
- this.list = this.list.concat(res.rows);
- if (this.list.length >= res.total) {
- this.finished = true;
- } else {
- this.finished = false;
- }
- this.pageNum = this.pageNum + 1;
- // this.list = res.rows
- } else {
- this.$toast.fail(res.msg);
- }
- });
- },
- storeDetailFn(item) {
- localStorage.setItem('tabVal', this.tabVal);
- // FSQ 仿石漆服务商
- if (item.storeCategory == 'FSQ01') {
- this.$router.push({
- path: '/FSQStoreDetail',
- query: { id: item.storeId },
- });
- } else if (item.designerStore) {
- // designerStore 是否为设计师招募门店,true-是,false-否
- this.$router.push({
- path: '/addDesignerDetail',
- query: { id: item.storeId },
- });
- } else {
- this.$router.push({
- path: '/storeDetail',
- query: { id: item.storeId },
- });
- }
- },
- onClickRight() {
- this.$router.push('/storeAdd');
- },
- onClickLeft() {
- localStorage.setItem('tabVal', '1');
- let storeStatus = localStorage.getItem('storeStatus');
- if (storeStatus) {
- localStorage.removeItem('storeStatus');
- this.$router.go(-1);
- } else {
- this.$router.push('/My/index');
- }
- },
- onSearch() {
- window.scrollTo(0, 0);
- this.pageNum = 1;
- this.list = [];
- this.finished = true;
- this.onLoad();
- },
- // 门店类型下拉选change
- storeTypeChange(value) {
- let storeTypeItem = this.typeOption.find((item) => item.value == value);
- this.storeTypeTitle = storeTypeItem ? storeTypeItem.title : '门店类型';
- // 门店每次切换 门店状态重置
- this.processApprovalStatus = '';
- this.storeStatusTitle = '门店状态';
- this.pageNum = 1;
- this.getUserMyStoreList();
- },
- // 门店状态下拉选change
- storeStatusChange(value) {
- let storeStatusItem = this.statusOption.find((item) => item.value == value);
- this.storeStatusTitle = storeStatusItem ? storeStatusItem.title : '门店状态';
- this.pageNum = 1;
- this.getUserMyStoreList();
- },
- // 打开筛选项
- dropdownOpen() {
- // 重置选中
- this.statusOption.forEach((val) => {
- this.$set(val, 'selectFlag', false);
- });
- if (this.activatedValues.length) {
- for (let i = 0; i < this.activatedValues.length; i++) {
- let item = this.statusOption[this.activatedValues[i] - 1];
- this.$set(item, 'selectFlag', true);
- }
- }
- },
- // 点击筛选项
- dropdownItemClick(item) {
- this.$set(item, 'selectFlag', !item.selectFlag);
- },
- // 筛选项确认
- onConfirm() {
- this.setOption();
- this.$refs.dropdownItem.toggle();
- this.pageNum = 1;
- this.getUserMyStoreList();
- },
- setOption() {
- let titles = [];
- let values = [];
- this.statusOption.forEach((val) => {
- if (val.selectFlag) {
- titles.push(val.text);
- values.push(val.value);
- }
- });
- this.activatedTitles = titles;
- this.activatedValues = values;
- this.dropdownTitle = this.activatedTitles.length
- ? this.activatedTitles.join(',')
- : '门店状态';
- },
- },
- };
- </script>
- <style lang="scss">
- .searchDiv {
- .van-search {
- background: #fff;
- }
- .van-search__action {
- font-size: 14px;
- color: #0057ba;
- font-weight: bold;
- background: #f1f1f1;
- border-bottom-right-radius: 60px;
- border-top-right-radius: 60px;
- border: 1px solid #c1c1c1;
- padding: 0 20px;
- }
- .van-search--show-action {
- padding-right: 12px;
- }
- .van-search__content {
- border: 1px solid #c1c1c1;
- border-bottom-left-radius: 60px;
- border-top-left-radius: 60px;
- background: #f1f1f1;
- border-right: 0;
- }
- }
- .myList {
- .van-cell {
- padding: 0;
- &:after {
- border-bottom: none;
- }
- }
- }
- .myTab {
- .van-tabs__nav--card {
- margin: 0 !important;
- border-left: 0;
- border-right: 0;
- }
- .van-tabs__wrap,
- .van-tabs__nav--card {
- height: 39px;
- }
- .van-tab {
- line-height: 40px;
- }
- }
- .van-tabs__nav--card .van-tab.van-tab--active {
- background-color: #0057ba !important;
- }
- .storeManagement {
- .van-search {
- flex: 1;
- }
- .searchDiv {
- display: flex;
- background: #fff;
- align-items: center;
- .selectFilter {
- width: 30%;
- .van-dropdown-menu__bar {
- height: 40px !important;
- box-shadow: none;
- }
- }
- }
- .JPVisitNum {
- position: relative;
- top: -26px;
- font-size: 10px;
- }
- .TCFXListItem {
- display: inline-block;
- border: 1px solid #ccc;
- padding: 3px 5px;
- margin: 0 5px;
- border-radius: 6px;
- }
- }
- </style>
- <style lang="scss" scoped>
- .container {
- padding-bottom: 50px;
- }
- .card {
- padding: 10px 16px;
- box-sizing: border-box;
- .title {
- font-size: 16px;
- font-weight: bold;
- color: #333;
- line-height: 30px;
- }
- .info {
- font-size: 14px;
- color: #909090;
- line-height: 26px;
- }
- }
- .cellcontent .van-cell__right-icon {
- height: 144px;
- line-height: 144px;
- margin-right: 10px;
- }
- .srore .van-cell {
- padding: 0;
- }
- .contentpd16 .van-cell {
- background-color: #ebf4ff;
- margin: 8px 0;
- border-radius: 5px;
- padding: 4px 16px;
- }
- .visitStoreIco {
- float: left;
- float: left;
- width: 26px;
- text-align: center;
- background-color: #ffba13;
- color: #fff;
- border-radius: 100%;
- margin-left: 14px;
- line-height: 26px;
- height: 26px;
- }
- .centerBtn {
- margin: 0 auto 10px;
- display: block;
- width: 92%;
- color: #0057ba;
- border-radius: 5px;
- padding: 0 6px;
- height: 28px;
- }
- .ctns {
- position: absolute;
- top: 12px;
- right: 12px;
- width: 74px;
- }
- .positionContent {
- position: fixed;
- color: #666;
- display: inline-block;
- box-shadow: 0px 2px 7px -5px #000;
- border-radius: 100px;
- overflow: hidden;
- right: 14px;
- cursor: pointer;
- bottom: 60px;
- background-color: white;
- }
- .positionContent .img {
- border-radius: 100px;
- float: left;
- }
- .positionContent .img .van-icon__image {
- border-radius: 100px;
- }
- .JPABC {
- width: 20px;
- position: relative;
- top: 4px;
- margin-right: 3px;
- }
- .statusIcon {
- padding: 3px;
- font-size: 12px;
- margin: 0 3px;
- color: #fff;
- display: inline-block;
- height: 20px;
- line-height: 16px;
- vertical-align: -1px;
- }
- .submit {
- background: #ffba13;
- }
- .noSubmit {
- background: #f11818;
- }
- </style>
|