index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. <template>
  2. <view class="content">
  3. <!-- 自定义导航 -->
  4. <view class="zdyNavBox">
  5. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  6. <view class="zdyNav">
  7. <view class="zdyNavLeft">
  8. <image src="../../static/img/nav_icon_back.png" mode="aspectFit" class="backImg" @click="goback">
  9. </image>
  10. </view>
  11. <view class="zdyNavTitle">网约车优享申请</view>
  12. <view style="width: 50px;"></view>
  13. </view>
  14. </view>
  15. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  16. <view style="height: 44px;"></view>
  17. <view class="top">
  18. <view class="topLeft">
  19. <view class="topMs">网约车优享认证入口</view>
  20. <image src="../../static/img/icon_arrow@2x.png" mode="" class="topImg"></image>
  21. </view>
  22. <view class="topRzBtn" @click="rzBtn">去认证</view>
  23. </view>
  24. <view class="searchBox">
  25. <view class="searchView">
  26. <image src="../../static/img/icon_search.png" class="searchImg"></image>
  27. <input type="text" class="searchInput" v-model="name" @confirm="search" placeholder="请输入电话、姓名搜索"/>
  28. </view>
  29. </view>
  30. <view class="listBox">
  31. <view class="line" v-for="(item,index) in items">
  32. <view class="lineZt lineState1" v-if="item.applyState==1">未审</view>
  33. <view class="lineZt lineState2" v-if="item.applyState==2">通过</view>
  34. <view class="lineZt lineState3" v-if="item.applyState==0">退回</view>
  35. <view class="lineName">
  36. <view >
  37. <view class="lineNameBox">
  38. <span>{{item.customerName}}</span> <span style="padding-left: 10rpx;">{{item.mobilePhone}}</span>
  39. </view>
  40. <view class="plateNumberBox">
  41. <span>{{item.plateNumber}}</span>
  42. <span style="padding-left: 10rpx;" v-if="item.carmodelType==1">丰田网约车</span>
  43. <span style="padding-left: 10rpx;" v-if="item.carmodelType==2">其他网约车</span>
  44. </view>
  45. </view>
  46. <view class="examine" v-if="item.applyState==1" @click="examine(2,item.id)">审核</view>
  47. </view>
  48. <view class="lineBottom">
  49. <view class="lineTime"> {{item.createTime}} </view>
  50. <view class="lineBottomBtnBox">
  51. <view class="returnBtn" v-if="item.applyState==1" @click="examine(0,item.id)">退回</view>
  52. <view class="seeBtn" @click="seeImg(item.imgs)">查看凭证</view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="carBox" @click="goapply">
  58. <image src="../../static/img/wyc.png" mode="" class="wycImg"></image>
  59. <view class="carMs">网约车优享申请</view>
  60. </view>
  61. <!-- 认证 -->
  62. <view class="authentication" @click="rzHide()" v-if="rzShow">
  63. <view class="rzBox" @click.stop="">
  64. <view class="rzTitle">认证</view>
  65. <view class="wxsm">微信扫码填写认证信息</view>
  66. <view class="wxImgBox">
  67. <!-- <canvas canvas-id="qrcode" style="width: 437rpx;height: 437rpx;" /> -->
  68. <canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}" />
  69. </view>
  70. <view class="rzBottom">
  71. <view class="tzBottomBtn" @click="rzHide()">关闭</view>
  72. </view>
  73. </view>
  74. </view>
  75. <!-- <canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}" /> -->
  76. </view>
  77. </template>
  78. <script>
  79. import uQRCode from '@/utils/uqrcode.js'
  80. export default {
  81. data() {
  82. return {
  83. iStatusBarHeight:'',
  84. rzShow:false,
  85. page:1,
  86. name:'',
  87. items:'',
  88. shopID:'86B933FF-3782-4F82-A192-176E7A45AA13',
  89. shopName:'fzh123',
  90. sourceUserID:'00958045-3341-4AF7-9460-801F5B52E3E2',
  91. sourceName:'姜国远',
  92. qrcodeSrc: '',
  93. qrcodeSize:200,
  94. qrcodeText: '',
  95. url:'',
  96. token:'',
  97. uid:'',
  98. }
  99. },
  100. onLoad(opt) {
  101. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  102. this.getList();
  103. console.log(opt)
  104. this.token=opt.token;
  105. this.uid=opt.uid
  106. },
  107. created() {
  108. },
  109. methods: {
  110. make() {
  111. uni.showLoading({
  112. title: '二维码生成中',
  113. mask: true
  114. })
  115. this.qrcodeText=this.url+'/#/pages/wyCar/apply'+'?shopID='+this.shopID+'&shopName='+this.shopName+'&sourceUserID='+this.sourceUserID+'&sourceName='+this.sourceName+'&token='+this.token+'&uid='+this.uid
  116. //console.log(this.qrcodeText)
  117. uQRCode.make({
  118. canvasId: 'qrcode',
  119. text: this.qrcodeText,
  120. size: this.qrcodeSize,
  121. margin: 10,
  122. success: res => {
  123. this.qrcodeSrc = res
  124. console.log('qrcodeSrc = ' + this.qrcodeSrc);
  125. },
  126. complete: () => {
  127. uni.hideLoading()
  128. }
  129. })
  130. },
  131. seeImg(imgs){
  132. if(imgs){
  133. var arr=imgs.split(',')
  134. uni.previewImage({
  135. urls: arr,
  136. longPressActions: {
  137. itemList: ['发送给朋友', '保存图片',],
  138. success: function(data) {},
  139. fail: function(err) {}
  140. }
  141. });
  142. }else{
  143. uni.showToast({
  144. title: '暂无凭证',
  145. icon: 'none',
  146. duration: 3000
  147. });
  148. }
  149. },
  150. examine(num,sheetId){
  151. var that = this;
  152. if(num==2){
  153. var content='确认审核通过?'
  154. }else{
  155. var content='确认退回?'
  156. }
  157. uni.showModal({
  158. title: '提示',
  159. content: content,
  160. success: function(res) {
  161. if (res.confirm) {
  162. uni.showLoading({
  163. title: '加载中'
  164. });
  165. that.$http('api/online-apply/state', {
  166. sheetId: sheetId,
  167. state: num
  168. }, 'POST').then(res => {
  169. uni.showToast({
  170. title: '操作成功',
  171. icon: 'none',
  172. duration: 3000
  173. });
  174. that.page = 1;
  175. that.getList()
  176. })
  177. } else if (res.cancel) {
  178. }
  179. }
  180. });
  181. },
  182. search(){
  183. this.page = 1
  184. this.getList()
  185. },
  186. getList(){
  187. uni.showLoading({
  188. title: '加载中'
  189. });
  190. this.isload = false;
  191. this.$http('api/online-apply/data', {
  192. input:this.name,
  193. page:this.page,
  194. limit:20,
  195. }, 'GET').then(res => {
  196. uni.hideLoading();
  197. this.isload = true;
  198. var list = res.data.data.Items;
  199. this.shopID=res.data.data.shopID;
  200. this.shopName=res.data.data.shopName;
  201. this.sourceName=res.data.data.sourceName;
  202. this.sourceUserID=res.data.data.sourceUserID
  203. this.url=res.data.data.url
  204. if (this.page == 1) {
  205. this.items = list
  206. } else {
  207. this.items = this.items.concat(list)
  208. }
  209. })
  210. },
  211. goapply(){
  212. uni.navigateTo({
  213. url:'/pages/wyCar/apply?shopID='+this.shopID+'&shopName='+this.shopName+'&sourceUserID='+this.sourceUserID+'&sourceName='+this.sourceName+'&token='+this.token+'&uid='+this.uid
  214. })
  215. },
  216. rzHide(){
  217. this.rzShow=false;
  218. },
  219. rzBtn(){
  220. this.rzShow=true;
  221. this.make();
  222. },
  223. goback(){
  224. //app交互
  225. var standalone = window.navigator.standalone
  226. var userAgent = window.navigator.userAgent.toLowerCase()
  227. var safari = /safari/.test(userAgent)
  228. var ios = /iphone|ipod|ipad|mac/.test(userAgent)
  229. var android = /android/.test(userAgent)
  230. if (ios) {
  231. if ( true) {//!standalone&& !safari
  232. window.webkit.messageHandlers.goMyNav.postMessage(null)
  233. }
  234. } else if (android) {
  235. window.android.postMessage()
  236. }
  237. },
  238. },
  239. onPullDownRefresh() {
  240. this.page = 1;
  241. this.getList()
  242. setTimeout(function() {
  243. uni.stopPullDownRefresh();
  244. }, 1000);
  245. }
  246. }
  247. </script>
  248. <style scoped>
  249. .authentication{
  250. width: 100vw;height: 100vh;
  251. background: rgba(0,0,0,0.6);
  252. position: fixed;
  253. left: 0;
  254. bottom: 0;
  255. }
  256. .tzBottomBtn{
  257. width: 682rpx;color: #FEFFFE;font-weight: 500;
  258. height: 74rpx;font-size: 28rpx;line-height:74rpx ;
  259. background: #3F90F7;text-align: center;
  260. border-radius: 37rpx;margin-top: 13rpx;
  261. }
  262. .rzBottom{
  263. background: #FFFFFF;
  264. box-shadow: 0rpx -2rpx 20rpx 0rpx rgba(153,153,153,0.2);
  265. height: 100rpx;
  266. width: 100vw;
  267. position: fixed;
  268. left: 0;
  269. bottom: 0;
  270. }
  271. .wxsm{
  272. font-weight: 400;font-size: 28rpx;padding-top: 100rpx;
  273. color: #3C3C3C;text-align: center;
  274. }
  275. .wxImgBox{
  276. width: 200px;
  277. height: 200px;
  278. background: #EDEDED;
  279. margin: 0 auto;
  280. margin-top: 30rpx;
  281. }
  282. .rzBox{
  283. width: 100vw;
  284. height: 60vh;
  285. background: #FFFFFF;
  286. margin-top: 40vh;
  287. border-radius: 32rpx 32rpx 0rpx 0rpx;
  288. }
  289. .rzTitle{
  290. font-weight: 500;font-size: 30rpx;padding-left: 24rpx;
  291. color: #3C3C3C;padding-top: 30rpx;
  292. }
  293. .carBox{
  294. position: fixed;left: 50rpx;bottom: 200rpx;text-align: center;
  295. }
  296. .wycImg{
  297. width: 68rpx;height: 68rpx;
  298. }
  299. .carMs{
  300. font-weight: 500;
  301. color: #333333;
  302. line-height: 33rpx;
  303. width: 104rpx;
  304. font-size: 24rpx;
  305. }
  306. .listBox{
  307. padding:0 24rpx;
  308. }
  309. .lineState2{
  310. background: #00A040;
  311. }
  312. .lineState3{
  313. background: #FF3B30;
  314. }
  315. .lineBottom{
  316. display: flex;justify-content: space-between;
  317. padding:16rpx 20rpx ;
  318. }
  319. .lineBottomBtnBox{
  320. display: flex;
  321. }
  322. .lineTime{
  323. color: #999999;
  324. font-size: 24rpx;
  325. line-height: 50rpx;
  326. }
  327. .returnBtn{
  328. width: 96rpx;color: #FF8130;
  329. height: 48rpx;text-align: center;line-height: 48rpx;
  330. border-radius: 6rpx;
  331. border: 1rpx solid #FF8130;
  332. }
  333. .seeBtn{
  334. width: 136rpx;font-size: 24rpx;
  335. height: 48rpx;line-height: 48rpx;
  336. border-radius: 6rpx;text-align: center;
  337. border: 1rpx solid #DDDDDD;
  338. color: #3C3C3C;margin-left: 24rpx;
  339. }
  340. .lineName{
  341. display: flex;justify-content: space-between;
  342. padding: 10rpx 20rpx;
  343. border-bottom: 1px solid #DDDDDD;
  344. }
  345. .lineNameBox{
  346. font-weight: 500;font-size: 30rpx;
  347. color: #3C3C3C;line-height: 42rpx;
  348. }
  349. .plateNumberBox{
  350. color: #666666;font-size: 24rpx;
  351. line-height: 33rpx;padding-top: 10rpx;
  352. }
  353. .examine{
  354. width: 96rpx;color: #FFFFFF;
  355. height: 56rpx;font-size: 24rpx;
  356. background: #3F90F7;
  357. border-radius: 6rpx;
  358. line-height: 56rpx;
  359. text-align: center;
  360. margin-top: 18rpx;
  361. }
  362. .line{
  363. background: #FFFFFF;
  364. border-radius: 6rpx;
  365. margin-top: 20rpx;
  366. }
  367. .lineZt{
  368. width: 69rpx;line-height: 32rpx;
  369. height: 32rpx;font-size: 22rpx;
  370. text-align: center;color: #FFFFFF;
  371. border-radius: 10rpx 0rpx 10rpx 0rpx;
  372. }
  373. .lineState1{
  374. background: #FF8130;
  375. }
  376. .top{
  377. width: 750rpx;
  378. height: 72rpx;
  379. background: #FF8130;
  380. display: flex;
  381. justify-content: space-between;
  382. }
  383. .topLeft{
  384. font-size: 26rpx;
  385. display: flex;padding-left: 35rpx;padding-top: 17rpx;color: #FFFFFF;
  386. }
  387. .topImg{
  388. width: 24rpx;height: 24rpx;margin-left: 8rpx;margin-top: 6rpx;
  389. }
  390. .topRzBtn{
  391. width: 110rpx;font-size: 26rpx;
  392. height: 52rpx;line-height: 52rpx;text-align: center;
  393. background: #FFFFFF;
  394. border-radius: 6rpx;
  395. color: #FF8130;
  396. margin-top: 10rpx;
  397. margin-right: 24rpx;
  398. }
  399. .searchBox{
  400. background: #FFFFFF;
  401. padding: 24rpx;
  402. }
  403. .searchView{
  404. width: 702rpx;
  405. height: 36rpx;
  406. background: #F4F5F7;
  407. border-radius: 36rpx;
  408. display: flex;
  409. padding: 18rpx 0;
  410. }
  411. .searchImg{
  412. width: 36rpx;height: 36rpx;margin-left: 24rpx;
  413. }
  414. .searchInput{
  415. line-height: 36rpx;height: 36rpx;font-size: 26rpx;
  416. padding-left: 16rpx;
  417. }
  418. .content{
  419. min-height: 100vh;
  420. background: #F6F6F6;
  421. }
  422. .zdyNavBox {
  423. width: 100vw;
  424. background: #FFFFFF;
  425. position: fixed;
  426. top: 0;
  427. left: 0;
  428. z-index: 99;
  429. }
  430. .zdyNav {
  431. height: 44px;
  432. display: flex;
  433. justify-content: space-between;
  434. align-items: center;
  435. }
  436. .backImg {
  437. width: 44rpx;
  438. height: 44rpx;
  439. margin-left: 10rpx;
  440. margin-right: 20rpx;
  441. }
  442. .homeImg {
  443. width: 44rpx;
  444. height: 44rpx;
  445. }
  446. .zdyNavLeft {
  447. display: flex;
  448. align-items: center;
  449. }
  450. .zdyNavTitle {
  451. height: 44px;
  452. background: #FFFFFF;
  453. text-align: center;
  454. font-size: 34rpx;
  455. line-height: 44px;
  456. }
  457. .tab {
  458. background: #FFFFFF;
  459. display: flex;
  460. justify-content: space-between;
  461. line-height: 92rpx;
  462. /* position: fixed; */
  463. width: calc(100vw - 100rpx);
  464. padding-left: 50rpx;
  465. padding-right: 50rpx;
  466. height: 92rpx;
  467. z-index: 11;
  468. border-top: 1px solid #EEEEEE;
  469. }
  470. .tabLine {
  471. font-size: 28rpx;
  472. color: #333333;
  473. text-align: center;
  474. }
  475. .tabActive {
  476. color: #FF0000;
  477. font-weight: bold;
  478. border-bottom: 4rpx solid #FF0000;
  479. }
  480. .main {
  481. padding-top: 260rpx;
  482. padding-bottom: 20rpx;
  483. background-color: #F4F5F7;
  484. }
  485. .itemBg {
  486. margin: 20rpx 24rpx;
  487. background-color: #FFFFFF;
  488. border-radius: 10rpx;
  489. padding: 20rpx;
  490. }
  491. .itemTop {
  492. display: flex;
  493. justify-content: space-between;
  494. }
  495. .itemType {
  496. color: #999999;
  497. font-size: 24rpx;
  498. }
  499. .itemSheetState {
  500. font-size: 24rpx;
  501. color: #999999
  502. }
  503. .redColor {
  504. color: #FF0000;
  505. }
  506. .orangeColor {
  507. color: #F19D01;
  508. }
  509. .greenColor {
  510. color: #00A040;
  511. }
  512. .itemShopBg {
  513. display: flex;
  514. justify-content: space-between;
  515. margin-top: 20rpx;
  516. }
  517. .shopName {
  518. color: #333333;
  519. font-size: 30rpx;
  520. font-weight: bold;
  521. /* 隐藏文字显示 ...不换行 */
  522. overflow: hidden;
  523. text-overflow: ellipsis;
  524. white-space: nowrap;
  525. }
  526. .price {
  527. color: #333333;
  528. font-weight: bold;
  529. font-size: 32rpx;
  530. }
  531. .itemName {
  532. color: #666666;
  533. font-size: 24rpx;
  534. padding-top: 16rpx;
  535. height: 30rpx;
  536. overflow: hidden;
  537. text-overflow: ellipsis;
  538. white-space: nowrap;
  539. }
  540. .plateBg {
  541. display: flex;
  542. justify-content: space-between;
  543. align-items: center;
  544. }
  545. .plateNumber {
  546. color: #666666;
  547. font-size: 24rpx;
  548. margin-bottom: 20rpx;
  549. display: flex;
  550. }
  551. .itemLineBottom {
  552. display: flex;
  553. justify-content: flex-end;
  554. }
  555. .itemBtn1 {
  556. width: 150rpx;
  557. height: 56rpx;
  558. border-radius: 36rpx;
  559. border: 2rpx solid #DDDDDD;
  560. text-align: center;
  561. line-height: 56rpx;
  562. font-size: 28rpx;
  563. color: #3C3C3C;
  564. margin-left: 40rpx;
  565. }
  566. .itemBtn2 {
  567. width: 150rpx;
  568. height: 56rpx;
  569. border-radius: 36rpx;
  570. border: 2rpx solid #FF4F00;
  571. text-align: center;
  572. line-height: 56rpx;
  573. font-size: 28rpx;
  574. color: #FF4F00;
  575. margin-left: 40rpx;
  576. }
  577. .orderState {
  578. color: #F19D01;
  579. font-size: 24rpx;
  580. padding-left: 20rpx;
  581. }
  582. .renBox{
  583. color: #1A1A1A;
  584. background: #F7F7F7;
  585. border-radius: 10rpx;
  586. display: flex;
  587. padding: 20rpx;font-size: 24rpx;
  588. line-height: 30rpx;
  589. margin-top: 16rpx;
  590. }
  591. .renimg{
  592. width: 30rpx;height: 30rpx;
  593. }
  594. .renMobilePhone{
  595. padding-left: 13rpx;
  596. }
  597. .itemaddress{
  598. font-size: 24rpx;display: flex;
  599. color: #3C3C3C;padding-top: 16rpx;
  600. line-height: 33rpx;
  601. }
  602. .addressDD{
  603. width: 10rpx;
  604. height: 10rpx;
  605. background: #FF0000;
  606. border-radius: 50%;
  607. margin-top: 10rpx;
  608. margin-right: 5rpx;
  609. }
  610. .sschahao{
  611. width: 40rpx;
  612. height: 40rpx;
  613. padding-top: 16rpx;
  614. }
  615. </style>