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.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  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.customerName}}</text>
  18. </view>
  19. <view class="details-item">
  20. <view>
  21. 用户证件类型:
  22. </view>
  23. <text>{{getCodeName('CERTIFICATE_TYPE',state.data.customerIdtype)}}</text>
  24. </view>
  25. <view class="details-item">
  26. <view>
  27. 用户证件号:
  28. </view>
  29. <text>{{state.data.customerIdnum}}</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
  94. } from "@/utils/utils"
  95. import {
  96. onLoad,
  97. onUnload
  98. } from "@dcloudio/uni-app";
  99. import {
  100. request
  101. } from "@/utils/network/request.js";
  102. import {
  103. orderDetail,
  104. cckChangejzCardJY
  105. } from "@/utils/network/api.js";
  106. import {
  107. stringToJson
  108. } from "@/utils/network/encryption";
  109. const state = reactive({
  110. data: {
  111. cardStatus: undefined,
  112. obuStatus: undefined,
  113. },
  114. type: undefined,
  115. cardType:""
  116. });
  117. /*视图进入后操作*/
  118. onLoad((option) => {
  119. queryOrderDetail(option.id).then((val : any) => {
  120. console.log("option", val)
  121. state.data = val
  122. state.cardType=val.cardId.substring(8,10)
  123. })
  124. });
  125. onUnload(() => {
  126. });
  127. /*下一步*/
  128. const nextACtion = () => {
  129. queryCckChangejzCardJY().then(val => {
  130. let obj = {
  131. type: state.type,
  132. customerIdnum: state.data.customerIdnum,
  133. mobile: state.data.customerTel,
  134. cardId: state.data.cardId,
  135. obuId: state.data.obuId,
  136. orderId: state.data.orderId,
  137. userType: state.data.userType == "PERSONAL_USER" ? 1 : 2
  138. }
  139. const params = encodeURIComponent(JSON.stringify(obj))
  140. navTo(
  141. `/subpackage/after-sale/ETC-log-off/etc-log-off?params=${params}`
  142. )
  143. })
  144. }
  145. const queryCckChangejzCardJY = () => {
  146. return new Promise(async (resolve, reject) => {
  147. const res = await request(cckChangejzCardJY, {
  148. type: 2,
  149. data: {
  150. cardId: state.data.cardId,
  151. obuId: state.data.obuId,
  152. orderId: state.data.orderId
  153. },
  154. method: "POST",
  155. showLoading: true,
  156. });
  157. const data = stringToJson(res.bizContent);
  158. resolve(data);
  159. }).catch((error) => {
  160. reject(error);
  161. });
  162. }
  163. const queryOrderDetail = (id) => {
  164. return new Promise(async (resolve, reject) => {
  165. const res = await request(orderDetail, {
  166. type: 2,
  167. data: {
  168. id: id
  169. },
  170. method: "POST",
  171. showLoading: true,
  172. });
  173. const data = stringToJson(res.bizContent);
  174. resolve(data);
  175. }).catch((error) => {
  176. reject(error);
  177. });
  178. }
  179. </script>
  180. <style>
  181. page {
  182. width: 100%;
  183. height: 100%;
  184. background-color: #fff;
  185. }
  186. </style>
  187. <style lang="scss" scoped>
  188. .selectCar-box {
  189. padding: 30rpx;
  190. .title {
  191. font-size: 30rpx;
  192. font-family: Microsoft YaHei UI;
  193. font-weight: 400;
  194. color: #333333;
  195. margin-bottom: 30rpx;
  196. }
  197. .details {
  198. .title {
  199. font-size: 30rpx;
  200. font-family: Microsoft YaHei UI;
  201. font-weight: 400;
  202. color: #333333;
  203. margin-bottom: 30rpx;
  204. }
  205. .details-item {
  206. display: flex;
  207. font-size: 26rpx;
  208. font-family: Noto Sans S Chinese;
  209. font-weight: 400;
  210. color: #999999;
  211. margin-bottom: 30rpx;
  212. text {
  213. font-size: 26rpx;
  214. font-family: Noto Sans S Chinese;
  215. font-weight: 400;
  216. color: #333333;
  217. }
  218. }
  219. }
  220. .card {
  221. height: 150rpx;
  222. background: #FFFFFF;
  223. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  224. border-radius: 20rpx;
  225. padding: 30rpx;
  226. display: flex;
  227. justify-content: space-between;
  228. align-items: center;
  229. margin-bottom: 60rpx;
  230. .card-left {
  231. display: flex;
  232. align-items: center;
  233. image {
  234. width: 100rpx;
  235. height: 90rpx;
  236. }
  237. .card-center {
  238. margin-left: 30rpx;
  239. .card-center-head {
  240. font-size: 32rpx;
  241. font-family: Noto Sans S Chinese;
  242. font-weight: 400;
  243. color: #333333;
  244. }
  245. .tips {
  246. font-size: 26rpx;
  247. font-family: Noto Sans S Chinese;
  248. font-weight: 400;
  249. color: #666666;
  250. .tips-card {
  251. width: 70rpx;
  252. height: 40rpx;
  253. background: #D3F2EF;
  254. border-radius: 6rpx;
  255. font-size: 20rpx;
  256. font-family: Noto Sans S Chinese;
  257. font-weight: 400;
  258. color: #0A8F8A;
  259. padding: 5rpx 10rpx;
  260. margin-left: 20rpx;
  261. }
  262. }
  263. }
  264. }
  265. .choose-item {
  266. margin-right: 20rpx;
  267. width: 50rpx;
  268. height: 50rpx;
  269. border: 1rpx solid #00B38B;
  270. border-radius: 50%;
  271. display: flex;
  272. justify-content: center;
  273. align-items: center;
  274. .active {
  275. width: 38rpx;
  276. height: 38rpx;
  277. background: #00B38B;
  278. border-radius: 50%;
  279. }
  280. }
  281. }
  282. .remark {
  283. font-size: 26rpx;
  284. font-family: Microsoft YaHei UI;
  285. font-weight: 400;
  286. color: #666666;
  287. text-indent: 30rpx;
  288. margin-bottom: 30rpx;
  289. }
  290. .submit {
  291. margin-top: 100rpx;
  292. width: 670rpx;
  293. height: 80rpx;
  294. background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
  295. border-radius: 40rpx;
  296. font-size: 32rpx;
  297. font-family: Noto Sans S Chinese;
  298. font-weight: 400;
  299. color: #FFFFFF;
  300. line-height: 80rpx;
  301. }
  302. }
  303. </style>