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.

log-off-confirm.vue 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <template>
  2. <view class="selectCar-box">
  3. <view class="details">
  4. <view class="title">
  5. 基础信息
  6. </view>
  7. <!-- <view class="details-item">
  8. <view>
  9. 订单编号:
  10. </view>
  11. <text>{{state.data.orderId}}</text>
  12. </view> -->
  13. <view class="details-item">
  14. <view>
  15. 用户名称:
  16. </view>
  17. <text>{{state.data.name}}</text>
  18. </view>
  19. <view class="details-item">
  20. <view>
  21. 用户证件类型:
  22. </view>
  23. <text>{{getCodeName('ID_TYPE',state.data.idType)}}</text>
  24. </view>
  25. <view class="details-item">
  26. <view>
  27. 用户证件号:
  28. </view>
  29. <text>{{desensitization(state.data.idNum)}}</text>
  30. </view>
  31. <view class="details-item">
  32. <view>
  33. 订单车牌号:
  34. </view>
  35. <text style="color: #00B38B;;">{{state.data.vehiclePlate}}</text>
  36. </view>
  37. <view class="details-item">
  38. <view>
  39. 收费车型:
  40. </view>
  41. <text>{{state.data.vehicleType}}</text>
  42. </view>
  43. </view>
  44. <view class="">
  45. <view class="title">
  46. 卡信息
  47. </view>
  48. <view class="card">
  49. <view class="card-left">
  50. <image :src="`${$imgUrl}card2.png`" mode=""></image>
  51. <view class="card-center">
  52. <view class="card-center-head">
  53. {{state.data.cardId}}
  54. </view>
  55. <view class="tips">
  56. <text>{{state.cardType=="23"?'记账卡':'储值卡'}}</text>
  57. <text class="tips-card">{{getCodeName('CARD_STATE_TYPE',state.data.cardStatus)}}</text>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. <view class="">
  64. <view class="title">
  65. OBU设备信息
  66. </view>
  67. <view class="card">
  68. <view class="card-left">
  69. <image :src="`${$imgUrl}card1.png`" mode=""></image>
  70. <view class="card-center">
  71. <view class="card-center-head">
  72. {{state.data.obuId}}
  73. </view>
  74. <view class="tips">
  75. <text class="tips-card">{{getCodeName('OBU_STATE_TYPE',state.data.obuStatus)}}</text>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. <button class="submit" @click="nextACtion">下一步</button>
  82. </view>
  83. </template>
  84. <script lang="ts" setup>
  85. import {
  86. getCodeName
  87. } from "@/datas/queryKey.js";
  88. import {
  89. reactive,
  90. ref
  91. } from "vue"
  92. import {
  93. navTo,desensitization
  94. } from "@/utils/utils"
  95. import {
  96. onLoad,
  97. onUnload
  98. } from "@dcloudio/uni-app";
  99. import {requestNew} from "@/utils/network/request.js";
  100. import {
  101. commGetDetail,
  102. cancelValid
  103. } from "@/utils/network/api.js";
  104. const state = reactive({
  105. data: {
  106. cardStatus: undefined,
  107. obuStatus: undefined,
  108. },
  109. type: undefined,
  110. cardType:""
  111. });
  112. /*视图进入后操作*/
  113. onLoad((option) => {
  114. queryOrderDetail(option.vehicleId).then((val : any) => {
  115. console.log("option", val)
  116. state.data = val
  117. state.cardType=val.cardId.substring(8,10)
  118. })
  119. });
  120. onUnload(() => {
  121. });
  122. /*下一步*/
  123. const nextACtion = () => {
  124. queryCckChangejzCardJY().then(val => {
  125. let obj = {
  126. type: state.type,
  127. customerIdnum: state.data.customerIdnum,
  128. mobile: state.data.customerTel,
  129. cardId: state.data.cardId,
  130. obuId: state.data.obuId,
  131. orderId: state.data.orderId,
  132. userType: state.data.userType == "PERSONAL_USER" ? 1 : 2
  133. }
  134. const params = encodeURIComponent(JSON.stringify(obj))
  135. navTo(
  136. `/subpackage/after-sale/ETC-log-off/etc-log-off?params=${params}`
  137. )
  138. })
  139. }
  140. const queryCckChangejzCardJY = () => {
  141. return new Promise(async (resolve, reject) => {
  142. const res = await requestNew(cancelValid, {
  143. type: 2,
  144. data: {
  145. cardId: state.data.cardId,
  146. obuId: state.data.obuId,
  147. vehiclePlate: state.data.vehiclePlate,
  148. vehiclePlateColor: state.data.vehiclePlateColor
  149. },
  150. method: "POST",
  151. showLoading: true,
  152. });
  153. const data = res;
  154. resolve(data);
  155. }).catch((error) => {
  156. reject(error);
  157. });
  158. }
  159. const queryOrderDetail = (vehicleId) => {
  160. return new Promise(async (resolve, reject) => {
  161. const res = await requestNew(commGetDetail, {
  162. type: 2,
  163. data: {
  164. vehicleId
  165. },
  166. method: "POST",
  167. showLoading: true,
  168. });
  169. const data = res;
  170. resolve(data);
  171. }).catch((error) => {
  172. reject(error);
  173. });
  174. }
  175. </script>
  176. <style>
  177. page {
  178. width: 100%;
  179. height: 100%;
  180. background-color: #fff;
  181. }
  182. </style>
  183. <style lang="scss" scoped>
  184. .selectCar-box {
  185. padding: 30rpx;
  186. .title {
  187. font-size: 30rpx;
  188. font-family: Microsoft YaHei UI;
  189. font-weight: 400;
  190. color: #333333;
  191. margin-bottom: 30rpx;
  192. }
  193. .details {
  194. .title {
  195. font-size: 30rpx;
  196. font-family: Microsoft YaHei UI;
  197. font-weight: 400;
  198. color: #333333;
  199. margin-bottom: 30rpx;
  200. }
  201. .details-item {
  202. display: flex;
  203. font-size: 26rpx;
  204. font-family: Noto Sans S Chinese;
  205. font-weight: 400;
  206. color: #999999;
  207. margin-bottom: 30rpx;
  208. text {
  209. font-size: 26rpx;
  210. font-family: Noto Sans S Chinese;
  211. font-weight: 400;
  212. color: #333333;
  213. }
  214. }
  215. }
  216. .card {
  217. height: 150rpx;
  218. background: #FFFFFF;
  219. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  220. border-radius: 20rpx;
  221. padding: 30rpx;
  222. display: flex;
  223. justify-content: space-between;
  224. align-items: center;
  225. margin-bottom: 60rpx;
  226. .card-left {
  227. display: flex;
  228. align-items: center;
  229. image {
  230. width: 100rpx;
  231. height: 90rpx;
  232. }
  233. .card-center {
  234. margin-left: 30rpx;
  235. .card-center-head {
  236. font-size: 32rpx;
  237. font-family: Noto Sans S Chinese;
  238. font-weight: 400;
  239. color: #333333;
  240. }
  241. .tips {
  242. font-size: 26rpx;
  243. font-family: Noto Sans S Chinese;
  244. font-weight: 400;
  245. color: #666666;
  246. .tips-card {
  247. width: 70rpx;
  248. height: 40rpx;
  249. background: #D3F2EF;
  250. border-radius: 6rpx;
  251. font-size: 20rpx;
  252. font-family: Noto Sans S Chinese;
  253. font-weight: 400;
  254. color: #0A8F8A;
  255. padding: 5rpx 10rpx;
  256. margin-left: 20rpx;
  257. }
  258. }
  259. }
  260. }
  261. .choose-item {
  262. margin-right: 20rpx;
  263. width: 50rpx;
  264. height: 50rpx;
  265. border: 1rpx solid #00B38B;
  266. border-radius: 50%;
  267. display: flex;
  268. justify-content: center;
  269. align-items: center;
  270. .active {
  271. width: 38rpx;
  272. height: 38rpx;
  273. background: #00B38B;
  274. border-radius: 50%;
  275. }
  276. }
  277. }
  278. .remark {
  279. font-size: 26rpx;
  280. font-family: Microsoft YaHei UI;
  281. font-weight: 400;
  282. color: #666666;
  283. text-indent: 30rpx;
  284. margin-bottom: 30rpx;
  285. }
  286. .submit {
  287. margin-top: 100rpx;
  288. width: 670rpx;
  289. height: 80rpx;
  290. background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
  291. border-radius: 40rpx;
  292. font-size: 32rpx;
  293. font-family: Noto Sans S Chinese;
  294. font-weight: 400;
  295. color: #FFFFFF;
  296. line-height: 80rpx;
  297. }
  298. }
  299. </style>