unCreateStore.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. <template>
  2. <div class="noVisit">
  3. <div class="header">
  4. <van-nav-bar class="navBar" title="建店" left-arrow @click-left="onClickLeft" />
  5. </div>
  6. <div class="content">
  7. <van-collapse v-model="activeName" accordion @change="collapseCange">
  8. <van-collapse-item v-for="(val, key, ind) in list" :key="ind" :name="key">
  9. <template #title>
  10. <div class="title">{{ key | storeType }}</div>
  11. <div class="num">{{ val.storeNum }}家</div>
  12. </template>
  13. <div class="itemContent">
  14. <template v-if="val.storeList && val.storeList.length">
  15. <div class="item" v-for="(item, index) in val.storeList" :key="index">
  16. <van-cell>
  17. <div class="card">
  18. <div></div>
  19. <div class="title" style="padding-right: 74px">
  20. <span class="btn" :data-clipboard-text="item.storeCode">
  21. <span>{{ item.storeName }}</span>
  22. (<span style="color: #0057ba">{{ item.storeCode }}</span
  23. >)
  24. <van-icon
  25. :name="require('@/assets/paste.png')"
  26. color="#ee0a24"
  27. size="20"
  28. style="top: 6px; margin-left: 4px" />
  29. </span>
  30. <!-- validFlag: 0正常门店,1无效门店,2临时门店 -->
  31. <span
  32. v-if="item.validFlag == 2"
  33. style="
  34. display: inline-block;
  35. border-radius: 100px;
  36. width: 20px;
  37. text-align: center;
  38. color: orange;
  39. font-weight: normal;
  40. "
  41. >临</span
  42. >
  43. <!-- "approvalStatus": 1:已结案;0:未结案, -->
  44. <!-- "processApprovalStatus": 审批状态(0=未提交,1=已提交待审核,2=审批通过,3=审批拒绝) -->
  45. <template v-if="item.approvalStatus == 0 && item.validFlag == 0">
  46. <span class="statusIcon submit" v-if="item.processApprovalStatus == 1"
  47. >已提交</span
  48. >
  49. <span class="statusIcon noSubmit" v-if="item.processApprovalStatus == 0"
  50. >未提交</span
  51. >
  52. </template>
  53. </div>
  54. <van-button
  55. type="info"
  56. size="small"
  57. plain
  58. class="centerBtn ctns"
  59. @click="storeDetailFn(item.storeId)"
  60. >客户信息<van-icon name="arrow"
  61. /></van-button>
  62. <div class="info" style="position: relative">
  63. 联系人:{{ item.contactName }}
  64. <div
  65. style="position: absolute; bottom: 0px; right: 0px"
  66. v-if="item.storeLabels">
  67. <el-popover
  68. popper-class="zpover zpover6"
  69. placement="bottom"
  70. trigger="click">
  71. <div>
  72. <p>
  73. 本店{{ timeData }}下单SKU数:<a
  74. @click="linkList(item)"
  75. style="text-decoration: underline"
  76. >点击查看详情</a
  77. >
  78. </p>
  79. </div>
  80. <div
  81. class="visitStoreIco"
  82. v-if="item.storeLabels.zysslNums"
  83. style="background-color: #fff; position: relative"
  84. slot="reference">
  85. <p
  86. style="
  87. width: 100%;
  88. position: absolute;
  89. z-index: 1;
  90. top: 0.2px;
  91. width: 22px;
  92. margin: 0;
  93. margin-left: 3.6px;
  94. text-align: center;
  95. font-size: 12px;
  96. ">
  97. {{ item.storeLabels.zysslNums }}
  98. </p>
  99. <van-icon :name="ord" size="26" />
  100. </div>
  101. </el-popover>
  102. <el-popover
  103. popper-class="zpover zpover5"
  104. placement="bottom"
  105. width="200"
  106. trigger="click">
  107. <div v-if="item.storeLabels">
  108. <p>已参加:</p>
  109. <p v-for="tt in (item.storeLabels.targetOne + '').split(';')">
  110. {{ tt }}
  111. </p>
  112. </div>
  113. <div
  114. class="visitStoreIco"
  115. v-if="item.storeLabels.targetOne"
  116. style="background-color: #fff"
  117. slot="reference">
  118. <van-icon :name="targetOne" size="26" />
  119. </div>
  120. </el-popover>
  121. <el-popover
  122. popper-class="zpover"
  123. placement="bottom"
  124. width="200"
  125. trigger="click"
  126. content="同城店近60天未下单">
  127. <div
  128. v-if="item.storeLabels.fxNoOrder"
  129. class="visitStoreIco"
  130. style="background-color: #fff"
  131. slot="reference">
  132. <van-icon :name="order60" size="26" />
  133. </div>
  134. </el-popover>
  135. <el-popover
  136. popper-class="zpover"
  137. placement="bottom"
  138. width="200"
  139. trigger="click"
  140. content="金牌店近30天未下单">
  141. <div
  142. v-if="item.storeLabels.noOrder"
  143. class="visitStoreIco"
  144. style="background-color: #fff"
  145. slot="reference">
  146. <van-icon :name="order" size="26" />
  147. </div>
  148. </el-popover>
  149. <el-popover
  150. popper-class="zpover"
  151. placement="bottom"
  152. width="200"
  153. trigger="click"
  154. content="本店本月进过专业时时丽">
  155. <div
  156. v-if="item.storeLabels.zyssl"
  157. class="visitStoreIco"
  158. style="background-color: #ed5c68"
  159. slot="reference">
  160. </div>
  161. </el-popover>
  162. <el-popover
  163. popper-class="zpover zpover1"
  164. placement="bottom"
  165. width="200"
  166. trigger="click"
  167. content="本店本月进过超好贴">
  168. <div
  169. v-if="item.storeLabels.chtczj"
  170. class="visitStoreIco"
  171. style="background-color: #0057ba"
  172. slot="reference">
  173. </div>
  174. </el-popover>
  175. <el-popover
  176. placement="bottom"
  177. popper-class="zpover zpover1 zpover1sb"
  178. trigger="click"
  179. :content="'本店本月已拜访过' + item.storeLabels.visitTimes + '次'">
  180. <div
  181. v-if="item.storeLabels.visitTimes && item.storeLabels.visitTimes > 0"
  182. class="visitStoreIco"
  183. slot="reference"
  184. style="background-color: #fff; position: relative">
  185. <p
  186. style="
  187. width: 100%;
  188. position: absolute;
  189. z-index: 10;
  190. top: -2px;
  191. margin: 0;
  192. text-align: center;
  193. font-size: 12px;
  194. ">
  195. {{ item.storeLabels.visitTimes }}
  196. </p>
  197. <van-icon :name="ordernum" size="26" />
  198. </div>
  199. <el-table :data="item.userVisitTimesMap" border max-height="180px">
  200. <el-table-column label="业务员" prop="userName" />
  201. <el-table-column label="拜访次数" prop="visitTimes" />
  202. </el-table>
  203. </el-popover>
  204. </div>
  205. </div>
  206. <div class="info">
  207. 类型:{{ item.storeCategoryName }}&nbsp;
  208. <el-popover
  209. popper-class="zpover zpover6"
  210. placement="bottom-start"
  211. trigger="click">
  212. <div>
  213. <p>
  214. 本店经营品项指导:
  215. <a @click="linkimg(item)" style="text-decoration: underline"
  216. >点击查看</a
  217. >
  218. </p>
  219. </div>
  220. <van-icon name="question-o" size="18" slot="reference" />
  221. </el-popover>
  222. </div>
  223. <div class="info">联系电话:{{ item.telephone }}</div>
  224. <div class="info">地址:{{ item.addressLine }}</div>
  225. <!-- 分销店 -->
  226. <template
  227. v-if="
  228. item.sfaStoreType &&
  229. item.sfaStoreType.type == 'fxd' &&
  230. item.sfaStoreChainsContactList
  231. ">
  232. <div class="info">
  233. 经销商:
  234. <div
  235. class="TCFXListItem"
  236. v-for="(item, index) in item.sfaStoreChainsContactList">
  237. <el-popover
  238. popper-class="zpover zpoverStoreztype"
  239. placement="bottom-start"
  240. trigger="click">
  241. <div>
  242. <div>{{ item.chainCode }}</div>
  243. <div>{{ item.chainName }}</div>
  244. </div>
  245. <div slot="reference" :key="index">
  246. {{ item.categoryDescribe }}
  247. </div>
  248. </el-popover>
  249. </div>
  250. </div>
  251. </template>
  252. <template v-else>
  253. <div class="info">经销商:{{ item.chainName }}</div>
  254. </template>
  255. </div>
  256. </van-cell>
  257. </div>
  258. </template>
  259. <template v-else><div style="text-align: center">暂无数据</div></template>
  260. </div>
  261. </van-collapse-item>
  262. </van-collapse>
  263. </div>
  264. </div>
  265. </template>
  266. <script>
  267. import { selectUserStoreNoVisits } from '@/api/index';
  268. import { getPosition, getTicketFun } from '@/utils/TXApiFun';
  269. import { mapState } from 'vuex';
  270. import store from '@/store';
  271. export default {
  272. name: 'unCreateStore',
  273. computed: {
  274. ...mapState({
  275. activaTypeStore: (state) => state.user.activaTypeStore,
  276. }),
  277. },
  278. data() {
  279. return {
  280. activeName: '',
  281. list: {},
  282. TXPiont: {}, //腾讯定位数据
  283. TXisBD: {}, // 腾讯定位数据转百度
  284. activatStoreVal: {}, //当前点击门店数据
  285. visitRoutePath: '', //拜访页面路径
  286. clickIsFlage: true,
  287. };
  288. },
  289. filters: {
  290. storeType(value) {
  291. let type = '';
  292. if (value == 'keKong') {
  293. type = '可控店';
  294. } else if (value == 'jinPai') {
  295. type = '金牌店';
  296. } else if (value == 'TuLiao') {
  297. type = '同城分销-涂料店';
  298. } else if (value == 'QiTa') {
  299. type = '同城分销-其他店';
  300. }
  301. return type;
  302. },
  303. },
  304. created() {
  305. this.toastLoading(0, '加载中...', true);
  306. // 授权
  307. getTicketFun()
  308. .then(() => {
  309. // 获取定位
  310. getPosition()
  311. .then((res) => {
  312. let { TXisBD } = res;
  313. this.getList(TXisBD);
  314. })
  315. .catch((error) => {
  316. this.$dialog.alert({
  317. message: error,
  318. });
  319. });
  320. })
  321. .catch(() => {
  322. this.toastLoading().clear();
  323. });
  324. this.activeName = this.activaTypeStore || '';
  325. },
  326. methods: {
  327. collapseCange(value) {
  328. store.dispatch('setActivaTypeStore', value);
  329. },
  330. getList(TXisBD) {
  331. selectUserStoreNoVisits({
  332. lat: TXisBD.lat,
  333. lon: TXisBD.lon,
  334. })
  335. .then((res) => {
  336. this.toastLoading().clear();
  337. this.list = res.data;
  338. console.log(this.list);
  339. })
  340. .catch(() => {
  341. this.toastLoading().clear();
  342. });
  343. },
  344. storeDetailFn(id) {
  345. this.$router.push({
  346. path: '/storeDetail',
  347. query: { id: id },
  348. });
  349. },
  350. onClickLeft() {
  351. this.$router.go(-1);
  352. },
  353. },
  354. };
  355. </script>
  356. <style lang="scss" scoped>
  357. .noVisit {
  358. height: 100%;
  359. width: 100%;
  360. /* overflow-y: auto; */
  361. .content {
  362. padding: 8px 10px;
  363. .item {
  364. padding: 8px 10px;
  365. margin: 10px 0;
  366. background: #fff;
  367. .van-cell__right-icon {
  368. height: 144px;
  369. line-height: 144px;
  370. margin-right: 10px;
  371. }
  372. .van-cell {
  373. padding: 0;
  374. }
  375. .card {
  376. box-sizing: border-box;
  377. .title {
  378. font-size: 16px;
  379. font-weight: bold;
  380. color: #333;
  381. line-height: 30px;
  382. }
  383. .info {
  384. font-size: 14px;
  385. color: #909090;
  386. line-height: 26px;
  387. }
  388. }
  389. .visitStoreIco {
  390. float: left;
  391. float: left;
  392. width: 26px;
  393. text-align: center;
  394. background-color: #ffba13;
  395. color: #fff;
  396. border-radius: 100%;
  397. margin-left: 14px;
  398. line-height: 26px;
  399. height: 26px;
  400. }
  401. .centerBtn {
  402. margin: 0 auto 10px;
  403. display: block;
  404. width: 92%;
  405. color: #0057ba;
  406. border-radius: 5px;
  407. padding: 0 6px;
  408. height: 28px;
  409. }
  410. .ctns {
  411. position: absolute;
  412. top: 12px;
  413. right: 12px;
  414. width: 74px;
  415. }
  416. .statusIcon {
  417. padding: 3px;
  418. font-size: 12px;
  419. margin: 0 3px;
  420. color: #fff;
  421. display: inline-block;
  422. height: 20px;
  423. line-height: 16px;
  424. vertical-align: -1px;
  425. }
  426. .submit {
  427. background: #ffba13;
  428. }
  429. .noSubmit {
  430. background: #f11818;
  431. }
  432. }
  433. }
  434. .van-collapse-item {
  435. border-bottom: 1px solid #dcdcdc;
  436. }
  437. }
  438. </style>
  439. <style lang="scss">
  440. .noVisit {
  441. .van-cell__title {
  442. font-size: 15px;
  443. font-weight: bold;
  444. color: #333;
  445. display: flex;
  446. justify-content: space-between;
  447. .num {
  448. color: #909090;
  449. margin-right: 5px;
  450. }
  451. }
  452. .van-collapse-item__wrapper {
  453. border-top: 1px solid #dcdcdc;
  454. }
  455. .van-collapse-item__title--expanded {
  456. position: sticky;
  457. top: 0px;
  458. z-index: 10;
  459. }
  460. .van-collapse-item__content {
  461. background-color: unset;
  462. padding: 0;
  463. }
  464. }
  465. </style>