unCreateStore.vue 17 KB

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