選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

list.vue 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <template>
  2. <navBar title="ETC同行流水查询" :scrollTop="scrollTop" navbgClass="nav-bgXin" fontColor='#fff'></navBar>
  3. <view class="guding">
  4. <view class="bg-img">
  5. <image class="icon image" :src="`${$imgUrl}order/bg-order.png`" mode="scaleToFill"></image>
  6. </view>
  7. <view class="content">
  8. <view class="title">填写查询条件</view>
  9. <view style="line-height: 70rpx; color: #01243A; margin-bottom: 24rpx;">车牌:{{ state.searchForm.exVehPlate }}</view>
  10. <uni-datetime-picker ref="filterDate" v-model="state.range" type="daterange" :clear-icon="false"/>
  11. <view class="search-btns">
  12. <button type="default" class="ui-btn search-btn" @click="getList()" style="width: auto;">
  13. 查询
  14. </button>
  15. <button type="default" class="ui-btn search-btn" @click="apply(false)" style="width: auto;">
  16. 单独申请
  17. </button>
  18. <button type="default" class="ui-btn-normal search-btn" @click="exportData()" style="width: auto;">
  19. 导出
  20. </button>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="page-content">
  25. <view class="list-title">查询结果列表</view>
  26. <template v-if="state.list && state.list.length > 0">
  27. <view class="list">
  28. <view
  29. class="item"
  30. v-for="(item, index) in state.list"
  31. :key="index">
  32. <view class="head">
  33. {{ item.enTollStationName }} - {{ item.exTollStationName }}
  34. </view>
  35. <view class="list-main">
  36. <view class="left">
  37. <view class="money-out">金额:<text class="money"><text class="unit">¥</text>{{ item.tollAmount }}</text></view>
  38. <view class="start-time">入口时间:{{ item.enTime }}</view>
  39. <view>出口时间:{{ item.exTime }}</view>
  40. </view>
  41. </view>
  42. <view class="bottom">
  43. <view class="right-state" @click="apply(item)">申请退费</view>
  44. </view>
  45. </view>
  46. </view>
  47. <view style="text-align: center;margin: 20rpx;font-size: 30rpx; color: #999999;">我是有底线的~</view>
  48. </template>
  49. <no-data-view v-else :text="'暂无通行流水信息'"></no-data-view>
  50. </view>
  51. </template>
  52. <script setup lang="ts">
  53. import { reactive, ref } from "vue";
  54. import { onLoad,onPageScroll,onReachBottom} from "@dcloudio/uni-app";
  55. import { requestNew } from "@/utils/network/request.js";
  56. import { getProvinceEtcTransactionFlow, exportProvinceEtcTransactionFlow } from '@/utils/network/api.js'
  57. import navBar from "@/components/nav-bar/nav-bar2.vue";
  58. import FixedFooter from "@/components/common/FixedFooter";
  59. import { getFirstDayOfMonth, getLastDayOfMonth } from '@/utils/utils'
  60. const scrollTop = ref(0); //滚动距离
  61. const filterDate = ref(null)
  62. const showExpot = ref(false)
  63. const labelStyle = {
  64. color: "#004576",
  65. fontSize: "28rpx",
  66. }
  67. const state = reactive({
  68. vehicleNum: '',
  69. searchForm: {
  70. exVehPlate: '',
  71. start: '',
  72. end: '',
  73. // exVehPlate: '贵BXE005', 测试数据
  74. // start: '2024-04-02',
  75. // end: '2024-04-03'
  76. },
  77. vehiclePlateColor: '',
  78. range: [],
  79. list: []
  80. })
  81. /*
  82. ** 页面接受参数
  83. */
  84. interface pageParams {
  85. vehicleId: string, // 车牌号
  86. }
  87. onLoad((option: pageParams) => {
  88. let { vehicleId } = option
  89. if (vehicleId) {
  90. let vehicleArr = vehicleId.split('_')
  91. state.searchForm.exVehPlate = decodeURIComponent(vehicleArr[0])
  92. state.vehiclePlateColor = vehicleArr[1]
  93. state.searchForm.start = getFirstDayOfMonth()
  94. state.searchForm.end = getLastDayOfMonth()
  95. state.range = [getFirstDayOfMonth(), getLastDayOfMonth()]
  96. getList()
  97. }
  98. })
  99. const getList = () => {
  100. let option = {
  101. type: 2,
  102. data: state.searchForm,
  103. method: "POST",
  104. showLoading: true,
  105. }
  106. requestNew(getProvinceEtcTransactionFlow, option).then(res => {
  107. state.list = res.modelList
  108. })
  109. }
  110. const exportData = () => {
  111. uni.showModal({
  112. title: '数据到处',
  113. content: '确认到处当前筛选数据吗?',
  114. success: (res) => {
  115. if (res.confirm) {
  116. let params = {
  117. type: 2,
  118. data: state.searchForm,
  119. method: "POST",
  120. showLoading: true,
  121. }
  122. requestNew(exportProvinceEtcTransactionFlow, params).then(res => {
  123. })
  124. }
  125. }
  126. })
  127. }
  128. // aloneApply 1: 单独申请
  129. const apply = (item: any) => {
  130. if (item) {
  131. item.vehiclePlateColor = state.vehiclePlateColor
  132. uni.navigateTo({
  133. url: '/subpackage/search/refund-info-run-water/apply?jsonData=' + JSON.stringify(item)
  134. })
  135. } else { // 单独申请
  136. let data = {
  137. vehiclePlateColor: state.vehiclePlateColor,
  138. exVehPlate: state.searchForm.exVehPlate
  139. }
  140. // onlyApply: 1:单独申请
  141. uni.navigateTo({
  142. url: '/subpackage/search/refund-info-run-water/apply?onlyApply=1&jsonData=' + JSON.stringify(data)
  143. })
  144. }
  145. }
  146. const clearFilter = () => {
  147. filterDate.value.clear()
  148. this.getList()
  149. }
  150. //监听页面滚动
  151. onPageScroll((e) => {
  152. scrollTop.value = e.scrollTop;
  153. });
  154. </script>
  155. <style lang="scss" scoped>
  156. .guding{
  157. position: fixed;
  158. width: 100%;
  159. }
  160. .bg-img {
  161. width: 100%;
  162. position: absolute;
  163. z-index:0;
  164. .icon {
  165. width: 100%;
  166. height: 534rpx;
  167. }
  168. }
  169. .content {
  170. position: relative;
  171. color: white;
  172. padding:30rpx ;
  173. background-color: white;
  174. margin: 0 34rpx;
  175. margin-top: 200rpx;
  176. border-radius: 12rpx;
  177. box-sizing: border-box;
  178. .title {
  179. font-weight: 400;
  180. font-size: 30rpx;
  181. color: #01243A;
  182. margin-bottom: 20rpx;
  183. }
  184. }
  185. .search-btns{
  186. display: flex;
  187. justify-content: space-between;
  188. margin-top: 32rpx;
  189. .search-btn{
  190. flex: 1;
  191. margin: 0 12rpx;
  192. }
  193. .clear-form{
  194. color: #004576;
  195. line-height: 80rpx;
  196. text-align: center;
  197. font-size: 30rpx;
  198. border: 1px #004576 solid;
  199. border-radius: 80rpx;
  200. padding: 0 28rpx;
  201. }
  202. }
  203. .page-content{
  204. padding-top: 643rpx;
  205. }
  206. .list-title{
  207. padding: 0 32rpx;
  208. }
  209. .list{
  210. border-radius: 12rpx;
  211. .item{
  212. background-color: #FFFFFF;
  213. border-radius: 12rpx;
  214. margin: 0 32rpx 24rpx;
  215. font-size: 26rpx;
  216. }
  217. .head{
  218. background: linear-gradient(to bottom, #FFFFFF, #E1EDFF);
  219. height: 96rpx;
  220. display: flex;
  221. align-items: center;
  222. padding: 0 24rpx;
  223. border-radius: 12rpx 12rpx 0 0;
  224. font-size: 30rpx;
  225. color: #01243A;
  226. font-weight: bold;
  227. }
  228. .list-main{
  229. padding: 24rpx;
  230. color: #999999;
  231. font-size: 26rpx;
  232. display: flex;
  233. align-items: center;
  234. justify-content: space-between;
  235. .money-out{
  236. margin-bottom: 12rpx;
  237. }
  238. .start-time{
  239. margin-bottom: 12rpx;
  240. }
  241. .money{
  242. font-size: 36rpx;
  243. color: #01243A;
  244. .unit{
  245. font-size: 26rpx;
  246. }
  247. }
  248. }
  249. .right-state{
  250. width: 130rpx;
  251. height: 60rpx;
  252. border-radius: 60rpx;
  253. line-height: 60rpx;
  254. background: linear-gradient(90deg, #01253B 0%, #004576 100%);
  255. color: #FFFFFF;
  256. font-size: 26rpx;
  257. text-align: center;
  258. margin-left: 12rpx;
  259. padding: 0 28rpx;
  260. }
  261. .bottom{
  262. display: flex;
  263. flex-direction: row-reverse;
  264. border-top: 1px #DCDCDC solid;
  265. padding: 24rpx 0;
  266. margin: 0 24rpx;
  267. }
  268. }
  269. </style>