Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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