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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <template>
  2. <navBar title="黑名单查询" :scrollTop="scrollTop" navbgClass="nav-bgXin" fontColor='#fff'></navBar>
  3. <view class="guding">
  4. <view class="bg-img">
  5. <image :src="`${$imgUrl}order/bg-order.png`" mode="scaleToFill" class="icon"></image>
  6. </view>
  7. <view class="content">
  8. <view class="title">填写查询条件</view>
  9. <uni-datetime-picker v-model="state.range" type="daterange" />
  10. <u-form label-width="230" ref="uForm" :label-style='labelStyle'>
  11. <u-form-item label="黑名单类型">
  12. <u-input v-model="state.typeStr" type="select" @click="show1 = true" input-align='right'/>
  13. </u-form-item>
  14. </u-form>
  15. <button type="default" class="ui-btn" @click="list(1)" style="width: auto;">
  16. 查询
  17. </button>
  18. </view>
  19. </view>
  20. <view class="list-title">查询结果列表</view>
  21. <view style="margin-top: 550rpx;">
  22. <view class="list" v-for="(item,index) in state.tableData" :key="index">
  23. <view class="title" :style="{'--bgimg':`url(${$imgUrl}etcbg.png)`}">
  24. <view class="title_left" v-if="item.status==1">
  25. <image :src="`${$imgUrl}type.png`" mode=""></image>
  26. <text class="question">类型:{{item.typeC}}</text>
  27. </view>
  28. <view class="title_left" v-else>
  29. <image :src="`${$imgUrl}typefb.png`" mode=""></image>
  30. <text class="questionfb">类型:{{item.typeC}}</text>
  31. </view>
  32. <text class="statuszh" v-if="item.status==1">下黑</text>
  33. <text class="statusdbc" v-else>反白</text>
  34. </view>
  35. <view class="bot">
  36. <view class="details">
  37. <view><text>卡号:</text><view :class="item.status==1?'hei':'fb'">{{item.cardId}}</view></view>
  38. <view><text>下黑时间:</text><view :class="item.status==1?'hei':'fb'">{{item.creationTime}}</view></view>
  39. <view><text>下黑原因:</text><view :class="item.status==1?'hei':'fb'">{{item.reason}}</view></view>
  40. <view v-if="item.fbCreationTime"><text>反白时间:</text><view :class="item.status==1?'hei':'fb'">{{item.fbCreationTime}}</view></view>
  41. <view v-if="item.fbReason"><text>反白原因:</text><view :class="item.status==1?'hei':'fb'">{{item.fbReason}}</view></view>
  42. <view><text>解决方案:</text><view :class="item.status==1?'hei':'fb'">{{item.solution}}</view></view>
  43. </view>
  44. <view style="display: flex;justify-content: flex-end;align-items: flex-end;">
  45. <text class="button">车辆信息变更</text>
  46. </view>
  47. </view>
  48. </view>
  49. <view style="text-align: center;margin: 20rpx;font-size: 30rpx;" v-if="state.flags">我是有底线的~</view>
  50. <view class="no" v-if="state.tableData.length==0">暂无黑名单</view>
  51. </view>
  52. <!-- 选择车牌颜色 -->
  53. <u-select v-model="show1" :list="state.blackStatus" @confirm="changeBlackStatus"></u-select>
  54. </template>
  55. <script setup lang="ts">
  56. import { reactive,ref } from "vue";
  57. import { onLoad,onPageScroll,onReachBottom} from "@dcloudio/uni-app";
  58. import {cardBlackListQuery } from "@/utils/network/api.js";
  59. import {requestNew } from "@/utils/network/request.js";
  60. import {getItem } from "@/utils/storage";
  61. import navBar from "@/components/nav-bar/nav-bar2.vue";
  62. import {msg} from "@/utils/utils";
  63. const state = reactive({
  64. tableData: [],
  65. blackStatus: [],
  66. range: ['', ''],
  67. type:"",
  68. typeStr:"",
  69. colorRange:[],
  70. vehicleId:"",
  71. pageNo:1,
  72. pageSize:10,
  73. totalCount:"",
  74. flags: false,
  75. });
  76. const labelStyle = {
  77. color: "#004576",
  78. fontSize: "28rpx",
  79. }
  80. const show1 = ref(false)
  81. const scrollTop = ref(0); //滚动距离
  82. //监听页面滚动
  83. onPageScroll((e) => {
  84. scrollTop.value = e.scrollTop;
  85. });
  86. onLoad((option : any) => {
  87. console.log("option", option)
  88. let black = getItem('key')['BLACKLIST_TYPE'];
  89. for (var k = 0; k < black.length; k++) {
  90. let obj = {};
  91. obj['value'] = black[k]['code']
  92. obj['label'] = black[k]['name']
  93. state.blackStatus.push(obj)
  94. }
  95. state.vehicleId=option.vehicleId
  96. list(2)
  97. console.log("state.blackStatus",state.blackStatus)
  98. })
  99. const changeBlackStatus = (item) => {
  100. state.type = item[0].value
  101. state.typeStr = item[0].label
  102. console.log(item)
  103. }
  104. const list = (params) => {
  105. if (params == 1) {
  106. state.pageNo = 1
  107. state.flags=false
  108. }
  109. if (state.pageNo == 1 && state.tableData.length > 0) {
  110. state.tableData = []
  111. }
  112. const options = {
  113. type: 2,
  114. data: {
  115. "startTime":state.range[0]?state.range[0]+" 00:00:00":"",
  116. "endTime":state.range[1]?state.range[1]+" 00:00:00":"",
  117. "vehicleId":state.vehicleId,
  118. "type":state.type,
  119. "pageNo":state.pageNo,
  120. "pageSize":state.pageSize
  121. },
  122. method: 'POST',
  123. showLoading: true,
  124. }
  125. requestNew(cardBlackListQuery, options).then((res) => {
  126. console.log("res==",res)
  127. const data =[...state.tableData,...res.result] ;
  128. state.totalCount = res.totalCount
  129. // status 1 下黑 2反白
  130. for (var i = 0; i < data.length; i++) {
  131. for (var m = 0; m < state.blackStatus.length; m++) {
  132. if (data[i]['type'] == state.blackStatus[m]['value']) {
  133. data[i]['typeC'] = state.blackStatus[m]['label']
  134. break;
  135. }
  136. }
  137. }
  138. state.tableData = data
  139. console.log("圈存金额查询2", state.tableData)
  140. })
  141. }
  142. onReachBottom(() => {
  143. console.log("触底了", state.pageNo * 10)
  144. if (Number(state.totalCount) == state.tableData.length) return state.flags = true
  145. if (state.tableData.length < state.pageNo * 10) return state.flags = true
  146. console.log("触底了")
  147. state.pageNo++
  148. list(2)
  149. })
  150. </script>
  151. <style>
  152. page {
  153. position: absolute;
  154. }
  155. </style>
  156. <style scoped lang="scss">
  157. .list{
  158. background: #FFFFFF;
  159. border-radius: 12rpx;
  160. border: 1px solid #FFFFFF;
  161. width: 90%;
  162. margin: 0 auto;
  163. font-weight: 400;
  164. margin-bottom: 30rpx;
  165. .title{
  166. padding: 0 20rpx;
  167. display: flex;
  168. justify-content: space-between;
  169. align-items: center;
  170. height: 80rpx;
  171. background-image: var(--bgimg);
  172. background-size: 100% 100%;
  173. background-repeat: no-repeat;
  174. .title_left{
  175. display: flex;
  176. align-items: center;
  177. }
  178. image{
  179. width: 50rpx;
  180. height: 50rpx;
  181. }
  182. .question{
  183. font-size: 30rpx;
  184. color: #01243A;
  185. margin-left: 10rpx;
  186. }
  187. .questionfb{
  188. font-size: 30rpx;
  189. color: #666666;
  190. margin-left: 10rpx;
  191. }
  192. // 在黑
  193. .statuszh{
  194. font-size: 26rpx;
  195. color: #CCB375;
  196. }
  197. // 已反白
  198. .statusdbc{
  199. font-size: 26rpx;
  200. color: #999999;
  201. }
  202. }
  203. .bot{
  204. padding: 0 20rpx;
  205. .details{
  206. font-size: 26rpx;
  207. padding: 10rpx 0;
  208. border-bottom: 1rpx solid #DCDCDC;
  209. view{
  210. display: flex;
  211. margin-bottom: 8rpx;
  212. text{
  213. color: #999999;
  214. width: 21%;
  215. }
  216. .hei{
  217. color: #002025;
  218. width: 79%;
  219. }
  220. .fb{
  221. color: #666666;
  222. width: 79%;
  223. }
  224. }
  225. }
  226. .time{
  227. font-size: 24rpx;
  228. color: #999999;
  229. padding:20rpx 0;
  230. border-top: 1rpx solid #DCDCDC;
  231. }
  232. }
  233. }
  234. </style>
  235. <style scoped>
  236. .bg-img {
  237. width: 100%;
  238. position: absolute;
  239. z-index:0;
  240. }
  241. .icon {
  242. width: 100%;
  243. height: 534rpx;
  244. }
  245. .content {
  246. position: relative;
  247. color: white;
  248. padding:30rpx ;
  249. background-color: white;
  250. width: 90%;
  251. margin: 0 auto;
  252. margin-top: 200rpx;
  253. border-radius: 12px;
  254. box-sizing: border-box;
  255. }
  256. .title {
  257. font-weight: 400;
  258. font-size: 30rpx;
  259. color: #01243A;
  260. margin-bottom: 20rpx;
  261. }
  262. .no {
  263. text-align: center;
  264. padding-top: 100rpx;
  265. }
  266. /deep/.uni-date-editor--x{
  267. background: #ECF1F4;
  268. }
  269. /deep/.uni-date-x {
  270. background: #ECF1F4 ;
  271. height: 68rpx !important;
  272. }
  273. /deep/.uni-date__x-input {
  274. font-size: 12px;
  275. }
  276. /deep/.u-form-item--right{
  277. background: #ECF1F4;
  278. padding: 4rpx 10rpx;
  279. border-radius: 10rpx;
  280. }
  281. .list-title{
  282. font-weight: bold;
  283. margin: 30rpx 40rpx;
  284. }
  285. .button{
  286. background: linear-gradient(90deg, #CCB375 0%, #E7D398 100%);
  287. border-radius: 40rpx;
  288. font-size: 30rpx;
  289. font-weight: 400;
  290. color: #fff !important;
  291. padding: 15rpx 25rpx;
  292. margin: 10rpx 0;
  293. }
  294. .guding{
  295. position: fixed;
  296. width: 100%;
  297. }
  298. </style>