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

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