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

order.vue 6.0KB

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