You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

etcFlowingWater.vue 9.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  1. <template>
  2. <view class="wrapper">
  3. <!-- 背景颜色充满屏 -->
  4. <view class="bg-color"></view>
  5. <!-- 补卡额订单列表-->
  6. <view class="search-box">
  7. <image :src="`${$imgUrl}service/icon-search.png`" class="icon"></image>
  8. <input class="search" placeholder="请输入充车牌/ETC卡号" v-model="state.keywords" @input="keywordsInput" />
  9. </view>
  10. <view class="search-time">
  11. <view class="search-time-box">
  12. <view class="show-info">
  13. <view class="show-text">
  14. <picker class="picker date" mode="date" :value="dataTime.startDate" @change="bindDateStart">
  15. <text class="date-text text-val">{{dataTime.startDate?dataTime.startDate:'开始时间'}}</text>
  16. </picker>
  17. <text class="line"></text>
  18. <picker class="picker date" mode="date" :value="dataTime.endDate" @change="bindDateEnd">
  19. <text class="date-text text-val">{{dataTime.endDate?dataTime.endDate:'结束时间'}}</text>
  20. </picker>
  21. </view>
  22. <u-icon name="calendar" :custom-style="{color:'#999999', size: '28rpx'}"></u-icon>
  23. </view>
  24. </view>
  25. <view class="time-btn" @click="search">查询</view>
  26. </view>
  27. <view class="total-num"><text>金额合计:XXXXXX</text> <text class="total-space">通行次数:XXXXXX</text></view>
  28. <view class="list-wrap">
  29. <view v-for="item in listData" :key="item.id"
  30. :class="item.status === 3 ? ' card-info finished' : 'card-info'">
  31. <view class="info-wrap">
  32. <view class="info-left">
  33. <view class="info-left-text">
  34. <text class="label">流水单号:</text>
  35. <text class="val">MA89200010</text>
  36. </view>
  37. <view>
  38. <text class="label">ETC卡号:</text>
  39. <text class="val">0110200001</text>
  40. </view>
  41. </view>
  42. <view class="info-right">
  43. <view class="price-label">
  44. 交易金额
  45. </view>
  46. <view class="price-val">
  47. <u-icon name="rmb"></u-icon>
  48. <text class="price-val-text">104.00</text>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="card-text-wrap">
  53. <view class="text-box">
  54. <text class="name-text">贵阳西</text>
  55. <text class="time-text">12:09</text>
  56. <text class="date-text">2023-01-08</text>
  57. </view>
  58. <view class="arrow-wrap">
  59. <text class="arrow-text">粤A12345</text>
  60. <image class="d-img" :src="`${$imgUrl}order/arrowCard.png`"></image>
  61. </view>
  62. <view class="text-box">
  63. <text class="name-text">XXXXX</text>
  64. <text class="time-text">18:52</text>
  65. <text class="date-text">2023-01-08</text>
  66. </view>
  67. </view>
  68. <view class="btn-wrap">
  69. <view>
  70. <text v-if="item.status === 2" class="status-wrap">审核进度:<text
  71. class="status-text">审核中</text></text>
  72. <text v-if="item.status === 3" class="status-wrap">审核进度:<text>已完成</text></text>
  73. </view>
  74. <view class="btn-1 btn" v-if="item.status === 1" @click="toApply(item)">补卡额申请</view>
  75. <view class="btn-1 btn" v-if="item.status === 2" @click="toView(item)">查看进度</view>
  76. <view class="btn-1 btn" v-if="item.status === 3" @click="toEvaluate(item)">去评价</view>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. </template>
  82. <script lang="ts" setup>
  83. import {
  84. reactive,
  85. ref
  86. } from "vue";
  87. import {
  88. request
  89. } from "../../utils/network/request.js";
  90. import {
  91. stringToJson
  92. } from "../../utils/network/encryption.js";
  93. import { orderDetail, passBills } from "../../utils/network/api.js";
  94. import {
  95. onLoad
  96. } from '@dcloudio/uni-app'
  97. const dataTime = reactive({
  98. startDate: "开始时间",
  99. endDate: "结束时间"
  100. })
  101. const listData = reactive([
  102. {
  103. id: 1,
  104. status: 1 // 补卡
  105. },
  106. {
  107. id: 2,
  108. status: 2 // 查看进度
  109. },
  110. {
  111. id: 3,
  112. status: 3 // 去评价
  113. },
  114. ])
  115. const state = reactive({
  116. list: [],
  117. keywords: null,
  118. })
  119. onLoad((option) => {
  120. queryOrderDetail(option.id);
  121. })
  122. const keywordsInput = (e) => {
  123. console.log(e)
  124. }
  125. const search = () => {
  126. console.log(state);
  127. const options = {
  128. type: 2,
  129. data: {
  130. cardId:"52011640230202987050",
  131. vehiclePlate:null,
  132. beforeDate: dataTime.startDate,
  133. afterDate:dataTime.endDate,
  134. pageNo:null,
  135. pageSize:null,
  136. },
  137. method: "POST",
  138. showLoading: true,
  139. };
  140. request(passBills, options).then((res) => {
  141. console.log(res);
  142. // let orderInfo = JSON.parse(res.bizContent);
  143. })
  144. }
  145. const queryOrderDetail = (id) => {
  146. const options = {
  147. type: 2,
  148. data: {
  149. id: id,
  150. },
  151. method: "POST",
  152. showLoading: true,
  153. };
  154. request(orderDetail, options).then((res) => {
  155. console.log(res);
  156. // let orderInfo = JSON.parse(res.bizContent);
  157. })
  158. }
  159. // 展示日历
  160. const bindDateStart = (e) => {
  161. console.log(e);
  162. // show.value = true
  163. dataTime.startDate = e.detail.value
  164. }
  165. // 展示日历
  166. const bindDateEnd = (e) => {
  167. console.log(e);
  168. dataTime.endDate = e.detail.value
  169. // show.value = true
  170. }
  171. // 补卡申请
  172. const toApply = (item) => {
  173. uni.navigateTo({
  174. // url: `/orders/cardAmount?id=${item.id}`
  175. url: ""
  176. });
  177. }
  178. // 去评价
  179. const toEvaluate = (item) => {
  180. uni.navigateTo({
  181. // url: `/orders/order-evaluate?id=${item.id}`
  182. url: ""
  183. });
  184. }
  185. // 查看进度
  186. const toView = (item) => {
  187. uni.navigateTo({
  188. // url: `/orders/cardAmountDetail?id=${item.id}`
  189. url: ""
  190. });
  191. }
  192. </script>
  193. <style lang="scss" scoped>
  194. .u-btn--primary {
  195. background: #00B38B;
  196. }
  197. .bg-color {
  198. position: fixed;
  199. top: 0;
  200. left: 0;
  201. right: 0;
  202. bottom: 0;
  203. background: #EEF7F7;
  204. z-index: -1;
  205. }
  206. .search-box {
  207. margin: 30rpx 30rpx 20rpx 30rpx;
  208. height: 72rpx;
  209. height: 81rpx;
  210. background: #FFFFFF;
  211. border: 1px solid #DCDCDC;
  212. border-radius: 40rpx;
  213. display: flex;
  214. justify-content: center;
  215. align-items: center;
  216. box-sizing: border-box;
  217. }
  218. .search-time-box {
  219. flex: 1;
  220. }
  221. .search-box .icon {
  222. width: 48rpx;
  223. height: 48rpx;
  224. margin: 0 20rpx;
  225. }
  226. .search-box .search {
  227. flex: 1;
  228. margin-right: 20rpx;
  229. height: 100%;
  230. padding: 0 10rpx;
  231. font-size: 28rpx;
  232. color: #00b38b;
  233. }
  234. .scroll-view {
  235. white-space: nowrap;
  236. position: sticky;
  237. top: 0;
  238. background: #ffffff;
  239. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  240. }
  241. .search-time {
  242. display: flex;
  243. margin: 20rpx 30rpx 48rpx 30rpx;
  244. .time-btn {
  245. width: 130rpx;
  246. height: 80rpx;
  247. background: #00B38B;
  248. border-radius: 40rpx;
  249. color: #FFFFFF;
  250. font-size: 32rpx;
  251. line-height: 80rpx;
  252. text-align: center;
  253. margin-left: 19rpx;
  254. }
  255. .show-info {
  256. height: 80rpx;
  257. padding: 0 31rpx;
  258. background: #FFFFFF;
  259. border: 1px solid #DCDCDC;
  260. border-radius: 40rpx;
  261. display: flex;
  262. justify-content: space-between;
  263. align-items: center;
  264. .show-text {
  265. display: flex;
  266. align-items: center;
  267. }
  268. .date-text {
  269. color: #999999;
  270. font-size: 28rpx;
  271. }
  272. .text-val {
  273. color: #333
  274. }
  275. .line {
  276. width: 25rpx;
  277. height: 1rpx;
  278. background: #999999;
  279. margin: 0 24rpx;
  280. }
  281. }
  282. }
  283. .total-num {
  284. font-size: 28rpx;
  285. color: #999999;
  286. margin-left: 30rpx;
  287. .total-space {
  288. margin-left: 41rpx;
  289. }
  290. }
  291. .list-wrap {
  292. margin: 30rpx;
  293. padding-bottom: 20rpx;
  294. }
  295. .card-info {
  296. background: #FFFFFF;
  297. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  298. border-radius: 20rpx;
  299. margin-bottom: 30rpx;
  300. padding: 30rpx 30px 13rpx 30rpx;
  301. .info-wrap {
  302. display: flex;
  303. justify-content: space-between;
  304. align-items: center;
  305. border-bottom: 1px solid #dcdcdc;
  306. padding-bottom: 30rpx;
  307. .info-left-text {
  308. margin-bottom: 39rpx;
  309. }
  310. .label {
  311. color: #999999;
  312. font-size: 26rpx;
  313. font-weight: 400;
  314. }
  315. .val {
  316. color: #333333;
  317. font-size: 26rpx;
  318. font-weight: 400;
  319. }
  320. .price-label {
  321. color: #999999;
  322. font-size: 24rpx;
  323. font-weight: 400;
  324. margin-bottom: 22rpx;
  325. text-align: center;
  326. }
  327. .price-val-text {
  328. font-size: 36rpx;
  329. font-weight: 700;
  330. color: #333333;
  331. margin-left: 9rpx;
  332. }
  333. .price-val {
  334. font-size: 26rpx;
  335. color: #333333;
  336. }
  337. }
  338. .card-text-wrap {
  339. display: flex;
  340. justify-content: space-between;
  341. align-items: center;
  342. margin: 38rpx 0 46rpx 0;
  343. .text-box {
  344. display: flex;
  345. flex-direction: column;
  346. align-items: center;
  347. .name-text {
  348. font-size: 30rpx;
  349. font-weight: 400;
  350. color: #333333;
  351. }
  352. .time-text {
  353. font-size: 30rpx;
  354. color: #333333;
  355. font-weight: 400;
  356. margin-top: 8rpx;
  357. }
  358. .date-text {
  359. font-size: 24rpx;
  360. color: #999999;
  361. font-weight: 400;
  362. margin-top: 8rpx;
  363. }
  364. }
  365. .arrow-wrap {
  366. display: flex;
  367. flex-direction: column;
  368. align-items: center;
  369. .d-img {
  370. width: 186rpx;
  371. height: 12rpx;
  372. }
  373. .arrow-text {
  374. color: #666666;
  375. font-size: 26rpx;
  376. }
  377. }
  378. }
  379. .btn-wrap {
  380. margin-top: 30rpx;
  381. display: flex;
  382. justify-content: space-between;
  383. align-items: center;
  384. .status-wrap {
  385. color: #999999;
  386. font-size: 26rpx;
  387. margin-right: 23rpx;
  388. }
  389. .status-text {
  390. color: #00B38B;
  391. }
  392. .btn {
  393. background: #FFFFFF;
  394. border: 1px solid #00B38B;
  395. border-radius: 30rpx;
  396. line-height: 61rpx;
  397. text-align: center;
  398. color: #00B38B;
  399. font-size: 26rpx;
  400. }
  401. .btn-1 {
  402. width: 171rpx;
  403. height: 61rpx;
  404. }
  405. .btn-2 {
  406. width: 141rpx;
  407. height: 61rpx;
  408. }
  409. .btn-3 {
  410. width: 121rpx;
  411. height: 61rpx;
  412. }
  413. }
  414. }
  415. .finished .info-wrap,
  416. .finished .card-text-wrap {
  417. .price-val,
  418. .price-val-text,
  419. .val,
  420. .text-box .time-text,
  421. .text-box .name-text,
  422. .arrow-wrap .arrow-text {
  423. color: #999999;
  424. }
  425. }
  426. </style>