myWebsit.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. <template>
  2. <view style="width: 100%; height: 100vh; background: rgb(247, 248, 255)">
  3. <zj-page-container>
  4. <view class="toubuyangs">
  5. <view class="toubuyangsTab">
  6. <view class="toubuyangsTabItem" @click="tabQiehuan(0)">
  7. <view>未入驻</view>
  8. <view :class="{ hengxian: true, xuanzhong: tab == 0 }"> </view>
  9. </view>
  10. <view class="toubuyangsTabItem" @click="tabQiehuan(1)">
  11. <view>待审核</view>
  12. <view :class="{ hengxian: true, xuanzhong: tab == 1 }"></view>
  13. </view>
  14. <view class="toubuyangsTabItem" @click="tabQiehuan(2)">
  15. <view>已入驻</view>
  16. <view :class="{ hengxian: true, xuanzhong: tab == 2 }"></view>
  17. </view>
  18. </view>
  19. <view class="search-container">
  20. <u-search shape="round" :showAction="false" placeholder="输入网点名称搜索" v-model="keyword"> </u-search>
  21. </view>
  22. </view>
  23. <zj-page-fill>
  24. <zj-page-layout
  25. :isScroll="true"
  26. :refresherTriggered="refresherTriggered"
  27. @refresherrefresh="refresherrefresh"
  28. @scrolltolower="scrolltolower"
  29. >
  30. <view class="list-container" v-if="showDataList.length > 0">
  31. <view class="mode" @click="navToPage(item)" v-for="(item, index) in showDataList" :key="index">
  32. <view class="flex_asb order">
  33. <view class="title"></view>
  34. <view class="status">{{
  35. item.examineStatus == 'WAIT_WORKER'
  36. ? '待师傅购买'
  37. : item.examineStatus == 'POLICY_WAIT'
  38. ? '保险待审核'
  39. : item.examineStatus == 'OK'
  40. ? '状态正常'
  41. : item.examineStatus == 'FAIL'
  42. ? '已驳回'
  43. : item.examineStatus == 'EXPIRED'
  44. ? '证件快过期'
  45. : item.examineStatus == 'OVERDUE'
  46. ? '证件已过期'
  47. : item.examineStatus == 'STOP'
  48. ? '已经离职'
  49. : item.examineStatus == 'QUIT'
  50. ? '已经离职'
  51. : item.examineStatus == 'WAIT'
  52. ? '入驻申请待审核'
  53. : ''
  54. }}</view>
  55. </view>
  56. <view class="flex_asb" style="align-items: flex-start">
  57. <image class="img" src="/static/mine/workerEnter/order.png" mode="aspectFill"></image>
  58. <view class="content flex1">
  59. <view class="flex_asb">
  60. <view class="title">{{ item.name }}</view>
  61. </view>
  62. <view class="flex">
  63. <view class="hui">地址</view>
  64. <view class="text">{{ item.address || '无' }}</view>
  65. </view>
  66. <view class="flex_end">
  67. <u-button
  68. v-if="item.examineStatus == 'N' || item.examineStatus == 'FAIL'"
  69. style="width: 160rpx; height: 60rpx; margin: 0"
  70. shape="circle"
  71. type="primary"
  72. text="入驻"
  73. @tap="goEnter(item)"
  74. ></u-button>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. <Loading :loadStatus="loadStatus" :dataList="dataList" />
  81. <zjDialogPicker
  82. ref="websitDialog"
  83. :isShow="isShowWebsitDialog"
  84. :multiple="false"
  85. :styleType="2"
  86. :title="'选择对应网点购买保险'"
  87. :list="baoxiandangqianxianxitishi"
  88. :keyName="'websitName'"
  89. @cancel="isShowWebsitDialog = false"
  90. @confirm="confirmWebsitDialog"
  91. >
  92. </zjDialogPicker>
  93. </zj-page-layout>
  94. </zj-page-fill>
  95. <view class="quanjuanniu" v-if="!!baoxiandangqianxianxitishi.length">
  96. <u-button text="去购买" shape="circle" type="primary" @click="isShowWebsitDialog = true"> </u-button>
  97. </view>
  98. </zj-page-container>
  99. </view>
  100. </template>
  101. <script>
  102. import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
  103. import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
  104. import { getStorage } from '@/common/utils/storage.js'
  105. import zjDialogPicker from '@/components/zj-dialog/zj-dialog-picker.vue'
  106. export default {
  107. components: {
  108. zjPageContainer,
  109. zjPageFill,
  110. zjDialogPicker
  111. },
  112. data() {
  113. return {
  114. tab: 0,
  115. dataList: [],
  116. refresherTriggered: false,
  117. loadStatus: 0,
  118. keyword: '',
  119. baoxiandangqianxianxitishi: [],
  120. isShowWebsitDialog: false
  121. }
  122. },
  123. onShow() {
  124. this.refreshLish()
  125. },
  126. computed: {
  127. userInfo() {
  128. return getStorage('user')
  129. },
  130. showDataList() {
  131. return this.dataList.filter(item => !!~item.name.indexOf(this.keyword))
  132. }
  133. },
  134. methods: {
  135. confirmWebsitDialog(e) {
  136. this.isShowWebsitDialog = false
  137. this.$navToPage({
  138. url:
  139. '/packageEnter/pages/insurance/myInsuranceBuy/index?websitId=' +
  140. this?.baoxiandangqianxianxitishi?.[e[0]]?.websitId
  141. })
  142. },
  143. async getList() {
  144. this.loadStatus = 1
  145. var { latitude, longitude } = await this.$getLocation()
  146. this.$api
  147. .get('/user/apply/websit', {
  148. lat: latitude,
  149. lng: longitude,
  150. ...(() => {
  151. if (this.tab > 0) {
  152. return {
  153. examineStatus: [['WAIT'], ['OK', 'EXPIRED', 'EXPIRED', 'STOP', 'QUIT']][this.tab - 1]
  154. }
  155. } else {
  156. return {
  157. isAll: true
  158. }
  159. }
  160. })()
  161. })
  162. .then(res => {
  163. this.loadStatus = 2
  164. this.refresherTriggered = false
  165. this.dataList = res.data
  166. })
  167. },
  168. navToPage(url) {
  169. this.$navToPage({
  170. url
  171. })
  172. },
  173. // 触发下拉刷新
  174. refresherrefresh(e) {
  175. this.refresherTriggered = true
  176. this.refreshLish()
  177. },
  178. refreshLish() {
  179. this.dataList = []
  180. this.getList()
  181. },
  182. goEnter(item) {
  183. this.$navToPage({
  184. url: '/packageMine/pages/workerEnter?websitName=' + item.name + '&websitId=' + item.websitId
  185. })
  186. },
  187. tabQiehuan(index) {
  188. this.tab = index
  189. this.dataList = []
  190. this.getList()
  191. },
  192. // 滚动到底部
  193. scrolltolower(e) {},
  194. // 触发下拉刷新
  195. async refresherrefresh(e) {
  196. this.refresherTriggered = true
  197. this.dataList = []
  198. this.getList()
  199. }
  200. }
  201. }
  202. </script>
  203. <style lang="scss" scoped>
  204. .search-container {
  205. background: #ffffff;
  206. padding: 20rpx;
  207. ::v-deep .u-search {
  208. height: 60rpx;
  209. input {
  210. background: #f7f8ff !important;
  211. }
  212. .u-search__content {
  213. background: #f7f8ff !important;
  214. height: 60rpx;
  215. }
  216. }
  217. }
  218. .quanjuanniu {
  219. width: 100%;
  220. height: auto;
  221. padding: 30rpx;
  222. box-sizing: border-box;
  223. }
  224. .neirongquyu {
  225. width: 100%;
  226. height: auto;
  227. padding: 30rpx 30rpx 15rpx 30rpx;
  228. box-sizing: border-box;
  229. .zhegeshineirong {
  230. width: 100%;
  231. height: auto;
  232. padding: 30rpx;
  233. box-sizing: border-box;
  234. background: #fff;
  235. border-radius: 20rpx;
  236. margin-bottom: 30rpx;
  237. .neirongbiaot {
  238. width: 100%;
  239. height: auto;
  240. display: flex;
  241. align-items: center;
  242. justify-content: space-between;
  243. box-sizing: border-box;
  244. margin-bottom: 40rpx;
  245. text {
  246. font-size: 32rpx;
  247. font-weight: 700;
  248. }
  249. }
  250. .neironglieju {
  251. width: 100%;
  252. height: auto;
  253. display: flex;
  254. align-items: center;
  255. justify-content: flex-start;
  256. box-sizing: border-box;
  257. margin-bottom: 30rpx;
  258. text {
  259. font-size: 28rpx;
  260. }
  261. }
  262. .neironghengxin {
  263. width: 100%;
  264. border-bottom: 1rpx solid #aaa;
  265. margin-bottom: 30rpx;
  266. }
  267. .neironganniuqu {
  268. widows: 100%;
  269. text-align: right;
  270. }
  271. }
  272. }
  273. .toubuyangs {
  274. width: 100%;
  275. height: auto;
  276. box-sizing: border-box;
  277. padding: 30rpx 30rpx 15rpx 30rpx;
  278. .toubuyangsTab {
  279. width: 100%;
  280. height: auto;
  281. padding: 30rpx;
  282. box-sizing: border-box;
  283. background: #fff;
  284. border-radius: 20rpx;
  285. display: flex;
  286. align-items: center;
  287. justify-content: space-around;
  288. .toubuyangsTabItem {
  289. box-sizing: border-box;
  290. font-size: 32rpx;
  291. display: flex;
  292. align-items: center;
  293. justify-content: center;
  294. flex-direction: column;
  295. .hengxian {
  296. margin-top: 20rpx;
  297. width: 100rpx;
  298. }
  299. .xuanzhong {
  300. border-bottom: 4rpx solid #000;
  301. }
  302. }
  303. }
  304. }
  305. .flex {
  306. display: flex;
  307. align-items: center;
  308. }
  309. .flex_asb {
  310. display: flex;
  311. justify-content: space-between;
  312. align-items: center;
  313. }
  314. .flex_end {
  315. display: flex;
  316. align-items: center;
  317. justify-content: flex-end;
  318. margin-top: 30rpx;
  319. }
  320. .flex1 {
  321. flex: 1;
  322. }
  323. .list-container {
  324. box-sizing: border-box;
  325. padding: 0 30rpx;
  326. }
  327. .mode {
  328. @include zj-card;
  329. padding: 30rpx 20rpx;
  330. margin-top: 30rpx;
  331. border-radius: 20rpx;
  332. box-sizing: border-box;
  333. background-color: #ffffff;
  334. .order {
  335. margin-bottom: 20rpx;
  336. }
  337. .content {
  338. width: 450rpx;
  339. .title {
  340. font-weight: bold;
  341. font-size: 30rpx;
  342. }
  343. .text,
  344. .hui {
  345. font-size: 28rpx;
  346. margin-top: 16rpx;
  347. }
  348. .hui {
  349. color: #999999;
  350. margin-right: 20rpx;
  351. }
  352. }
  353. .status {
  354. font-size: 28rpx;
  355. color: #0379ff;
  356. }
  357. .zhihui {
  358. .text,
  359. .hui,
  360. .title,
  361. .status {
  362. color: #999999 !important;
  363. }
  364. }
  365. .img {
  366. width: 100rpx;
  367. height: 100rpx;
  368. margin-right: 30rpx;
  369. }
  370. }
  371. .search-container {
  372. background: #ffffff;
  373. padding: 20rpx;
  374. ::v-deep .u-search {
  375. height: 60rpx;
  376. input {
  377. background: #f7f8ff !important;
  378. }
  379. .u-search__content {
  380. background: #f7f8ff !important;
  381. height: 60rpx;
  382. }
  383. }
  384. }
  385. </style>