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

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