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

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