index.vue 14 KB

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