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.

car-submit-record.vue 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. <!-- 车辆提交记录 -->
  2. <template>
  3. <!-- <view class="hint">电子标签请到线下网点领取</view> -->
  4. <view class="list">
  5. <view class="item" v-for="(item, index) in state.list" :key="item.name">
  6. <view class="head">
  7. <view class="name">
  8. <image :src="`${$imgUrl}issueActivation/icon-car.png`" class="icon"></image>
  9. <text class="title">{{ item.fvehPlateNo }}</text>
  10. </view>
  11. <view class="status text-green">{{ item.describe }}</view>
  12. </view>
  13. <view class="detail">
  14. <view class="orders">
  15. <view class="order-text">
  16. <text class="type">卡类型:</text>
  17. <text class="value">{{ cardType(item.fcardItemType) }}</text>
  18. </view>
  19. <view class="order-text">
  20. <text class="type">申请时间:</text>
  21. <text class="value">{{ item.fregisterDate }}</text>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="btns" v-if="item.handleStatus === 4 || item.handleStatus === 5">
  26. <view class="btn btn-primary as-gravity-center" @click="btnClick(item)" v-if="item.handleStatus === 4">
  27. 增补OBU
  28. </view>
  29. <view class="btn btn-primary as-gravity-center" @click="btnClick(item)" v-if="item.handleStatus === 5">
  30. 增补OBU
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. <!-- 支付承诺popup -->
  36. <u-popup v-model="state.showPayPopup" mode="center">
  37. <pay-undertake @paySuccess="state.showPayPopup = false"></pay-undertake>
  38. </u-popup>
  39. </template>
  40. <script setup lang="ts">
  41. import {
  42. reactive
  43. } from "vue";
  44. import {
  45. onLoad
  46. } from "@dcloudio/uni-app";
  47. import {
  48. msg,
  49. navTo
  50. } from '@/utils/utils';
  51. import {
  52. request
  53. } from "@/utils/network/request.js";
  54. import {
  55. gongWuCheTiJiaoJiLu
  56. } from "@/utils/network/api.js";
  57. import {
  58. stringToJson
  59. } from "@/utils/network/encryption";
  60. import {
  61. getVehiclePlateColor
  62. } from "@/datas/vehiclePlateColor.js";
  63. import payUndertake from "./components/popup-pay-undertake";
  64. const state = reactive({
  65. //显示支付承诺弹窗
  66. showPayPopup: false,
  67. deptId: 0,
  68. //记录列表 status: 1-审核中 2-制卡中 3-待支付 4-待激活 5-已完成
  69. list: [],
  70. });
  71. onLoad((option) => {
  72. state.deptId = option.deptId ? option.deptId : null;
  73. getListByDeptId(state.deptId)
  74. })
  75. const btnClick = (item : any) => {
  76. console.log(item);
  77. //去增补OBU
  78. if (item.handleStatus === 4 || item.handleStatus === 5) {
  79. navTo("/subpackage/personal-center/address?deptId=" + item.funitID + "&vehicleId=" + item.fvehPlateNo + "_" + item.fvehPlateColor);
  80. }
  81. };
  82. const cardType = (type : number) => {
  83. if (type == 51) {
  84. return "制式警车卡";
  85. } else if (type == 52) {
  86. return "路政执法卡";
  87. } else if (type == 53) {
  88. return "应急通行卡";
  89. } else if (type == 55) {
  90. return "国安特通卡";
  91. } else {
  92. return "未知卡类型";
  93. }
  94. }
  95. /* 搜索 */
  96. const getListByDeptId = (id : number) => {
  97. if (!state.deptId) {
  98. msg("请输入搜索关键字");
  99. return
  100. }
  101. // msg(state.searchInput);
  102. const options = {
  103. type: 2,
  104. data: {
  105. deptId: id,
  106. },
  107. method: "POST",
  108. showLoading: true,
  109. };
  110. request(gongWuCheTiJiaoJiLu, options).then((res) => {
  111. const result = stringToJson(res.bizContent)
  112. if (result.vehicleS && result.vehicleS.length > 0) {
  113. state.list = result.vehicleS
  114. }
  115. })
  116. }
  117. </script>
  118. <style>
  119. page {
  120. background-color: #eef7f7;
  121. }
  122. :deep(.u-mode-center-box) {
  123. border-radius: 20rpx;
  124. }
  125. </style>
  126. <style lang="scss" scoped>
  127. .hint {
  128. font-size: 26rpx;
  129. color: #ff8000;
  130. padding: 37rpx 34rpx 8rpx;
  131. }
  132. .list {
  133. padding: 30rpx 30rpx 0rpx;
  134. display: flex;
  135. flex-direction: column;
  136. }
  137. .list .item {
  138. background: #ffffff;
  139. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  140. border-radius: 20rpx;
  141. box-sizing: border-box;
  142. display: flex;
  143. flex-direction: column;
  144. margin-bottom: 30rpx;
  145. min-height: 260rpx;
  146. }
  147. .list .item .head {
  148. display: flex;
  149. justify-content: space-between;
  150. align-items: center;
  151. padding: 20rpx 28rpx;
  152. border-bottom: 1px solid #dcdcdc;
  153. }
  154. .list .item .head .icon {
  155. width: 48rpx;
  156. height: 48rpx;
  157. }
  158. .list .item .head .name {
  159. display: flex;
  160. align-items: center;
  161. }
  162. .list .text-green {
  163. font-size: 26rpx;
  164. color: #00b38b;
  165. }
  166. .list .text-orange {
  167. font-size: 26rpx;
  168. color: #ff8000;
  169. }
  170. .list .title {
  171. font-size: 30rpx;
  172. color: #333;
  173. padding-left: 13rpx;
  174. }
  175. .list .detail {
  176. display: flex;
  177. justify-content: space-between;
  178. align-items: center;
  179. padding: 30rpx 32rpx;
  180. }
  181. .list .detail .type {
  182. font-size: 26rpx;
  183. color: #999;
  184. }
  185. .list .detail .value {
  186. font-size: 26rpx;
  187. color: #333;
  188. }
  189. .list .finished .detail .value {
  190. color: #999;
  191. }
  192. .list .detail .odd {
  193. margin: 20rpx 0;
  194. }
  195. .list .cny {
  196. font-size: 26rpx;
  197. color: #333;
  198. }
  199. .list .finished .cny {
  200. color: #999;
  201. }
  202. .list .amount {
  203. font-size: 40rpx;
  204. font-weight: bold;
  205. }
  206. .list .finished .amount {
  207. color: #999;
  208. }
  209. .list .btns {
  210. display: flex;
  211. align-items: center;
  212. justify-content: flex-end;
  213. border-top: 1px solid #dcdcdc;
  214. margin: 0 30rpx;
  215. padding: 20rpx 0;
  216. }
  217. .list .btn {
  218. height: 60rpx;
  219. // line-height: 60rpx;
  220. border-radius: 30rpx;
  221. padding: 0 24rpx;
  222. font-size: 26rpx;
  223. box-sizing: border-box;
  224. margin-right: 20rpx;
  225. }
  226. .list .btns .btn:last-child {
  227. margin: 0;
  228. }
  229. .list .btn-primary {
  230. border: 1px solid #00b38b;
  231. color: #00b38b;
  232. }
  233. .list .btn-normal {
  234. border: 1px solid #dcdcdc;
  235. color: #333;
  236. }
  237. </style>