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.

transfer-confirm.vue 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  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="title">
  45. 卡信息
  46. </view>
  47. <view class="card">
  48. <view class="card-left">
  49. <image :src="`${$imgUrl}card2.png`" mode=""></image>
  50. <view class="card-center">
  51. <view class="card-center-head">
  52. {{state.data.cardId}}
  53. </view>
  54. <view class="tips">
  55. <text>储蓄卡</text>
  56. <text class="tips-card">{{getCodeName('CARD_STATE_TYPE',state.data.cardStatus)}}</text>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="title">
  62. OBU设备信息
  63. </view>
  64. <view class="card">
  65. <view class="card-left">
  66. <image :src="`${$imgUrl}card1.png`" mode=""></image>
  67. <view class="card-center">
  68. <view class="card-center-head">
  69. {{state.data.obuId}}
  70. </view>
  71. <view class="tips">
  72. <!-- <text>储蓄卡</text> -->
  73. <text class="tips-card">{{getCodeName('OBU_STATE_TYPE',state.data.obuStatus)}}</text>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <button class="submit" @click="nextACtion">下一步</button>
  79. </view>
  80. </template>
  81. <script lang="ts" setup>
  82. import {
  83. reactive,
  84. ref
  85. } from "vue"
  86. import {
  87. navTo
  88. } from "@/utils/utils"
  89. import {
  90. onLoad,
  91. onUnload
  92. } from "@dcloudio/uni-app";
  93. import {
  94. request
  95. } from "@/utils/network/request.js";
  96. import {
  97. orderDetail,
  98. queryGuoHu
  99. } from "@/utils/network/api.js";
  100. import {
  101. msg
  102. } from "@/utils/utils";
  103. import {
  104. getCodeName
  105. } from "@/datas/queryKey.js";
  106. import {
  107. stringToJson
  108. } from "@/utils/network/encryption";
  109. import {
  110. getItem,
  111. StorageKeys,
  112. } from "@/utils/storage";
  113. const state = reactive({
  114. data: {
  115. cardStatus: undefined,
  116. obuStatus: undefined,
  117. }
  118. });
  119. /*视图进入后操作*/
  120. onLoad((option) => {
  121. queryOrderDetail(option.id).then((val: any) => {
  122. state.data = val
  123. })
  124. /*监听手机号验证后的回调*/
  125. uni.$on('queryCardlossStatus', function(type) {
  126. console.log(type)
  127. queryCardlossStatusType(type.type).then((val: any) => {
  128. navTo(
  129. `/after-sale/transfer-ownership/card-result`
  130. )
  131. });
  132. })
  133. });
  134. onUnload(() => {
  135. /*移除监听*/
  136. uni.$off('queryCardlossStatus')
  137. });
  138. /*下一步*/
  139. const nextACtion = () => {
  140. wx.showModal({
  141. title: 'ETC过户',
  142. content: '确认是否ETC过户操作',
  143. success: function(res) {
  144. if (res.confirm) {
  145. navTo(
  146. `/after-sale/transfer-ownership/transfer-verification?mobile=${state.data.customerTel}`
  147. )
  148. }
  149. }
  150. });
  151. }
  152. const queryOrderDetail = (id) => {
  153. return new Promise(async (resolve, reject) => {
  154. const res = await request(orderDetail, {
  155. type: 2,
  156. data: {
  157. id: id
  158. },
  159. method: "POST",
  160. showLoading: true,
  161. });
  162. const data = stringToJson(res.bizContent);
  163. resolve(data);
  164. }).catch((error) => {
  165. reject(error);
  166. });
  167. }
  168. const queryCardlossStatusType = (val: any) => {
  169. var data = {
  170. openId: getItem(StorageKeys.OpenId),
  171. orderSource: 'WECHAT',
  172. serviceType: val,
  173. orderId: state.data.orderId
  174. };
  175. const options = {
  176. type: 2,
  177. data: data,
  178. method: "POST",
  179. showLoading: true,
  180. };
  181. return new Promise(async (resolve, reject) => {
  182. const res = await request(queryGuoHu, options);
  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. // width: 100%;
  200. // height: 100%;
  201. padding: 30rpx;
  202. .title {
  203. font-size: 30rpx;
  204. font-family: Microsoft YaHei UI;
  205. font-weight: 400;
  206. color: #333333;
  207. margin-bottom: 30rpx;
  208. }
  209. .details {
  210. .title {
  211. font-size: 30rpx;
  212. font-family: Microsoft YaHei UI;
  213. font-weight: 400;
  214. color: #333333;
  215. margin-bottom: 30rpx;
  216. }
  217. .details-item {
  218. display: flex;
  219. font-size: 26rpx;
  220. font-family: Noto Sans S Chinese;
  221. font-weight: 400;
  222. color: #999999;
  223. margin-bottom: 30rpx;
  224. text {
  225. font-size: 26rpx;
  226. font-family: Noto Sans S Chinese;
  227. font-weight: 400;
  228. color: #333333;
  229. }
  230. }
  231. }
  232. .card {
  233. height: 150rpx;
  234. background: #FFFFFF;
  235. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  236. border-radius: 20rpx;
  237. padding: 30rpx;
  238. display: flex;
  239. justify-content: space-between;
  240. align-items: center;
  241. margin-bottom: 60rpx;
  242. .card-left {
  243. display: flex;
  244. align-items: center;
  245. image {
  246. width: 100rpx;
  247. height: 90rpx;
  248. }
  249. .card-center {
  250. margin-left: 30rpx;
  251. .card-center-head {
  252. font-size: 32rpx;
  253. font-family: Noto Sans S Chinese;
  254. font-weight: 400;
  255. color: #333333;
  256. }
  257. .tips {
  258. font-size: 26rpx;
  259. font-family: Noto Sans S Chinese;
  260. font-weight: 400;
  261. color: #666666;
  262. .tips-card {
  263. width: 70rpx;
  264. height: 40rpx;
  265. background: #D3F2EF;
  266. border-radius: 6rpx;
  267. font-size: 20rpx;
  268. font-family: Noto Sans S Chinese;
  269. font-weight: 400;
  270. color: #0A8F8A;
  271. padding: 5rpx 10rpx;
  272. margin-left: 20rpx;
  273. }
  274. }
  275. }
  276. }
  277. .choose-item {
  278. margin-right: 20rpx;
  279. width: 50rpx;
  280. height: 50rpx;
  281. border: 1rpx solid #00B38B;
  282. border-radius: 50%;
  283. display: flex;
  284. justify-content: center;
  285. align-items: center;
  286. .active {
  287. width: 38rpx;
  288. height: 38rpx;
  289. background: #00B38B;
  290. border-radius: 50%;
  291. }
  292. }
  293. }
  294. .remark {
  295. font-size: 26rpx;
  296. font-family: Microsoft YaHei UI;
  297. font-weight: 400;
  298. color: #666666;
  299. text-indent: 30rpx;
  300. margin-bottom: 30rpx;
  301. }
  302. .submit {
  303. margin-top: 100rpx;
  304. width: 670rpx;
  305. height: 80rpx;
  306. background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
  307. border-radius: 40rpx;
  308. font-size: 32rpx;
  309. font-family: Noto Sans S Chinese;
  310. font-weight: 400;
  311. color: #FFFFFF;
  312. line-height: 80rpx;
  313. }
  314. }
  315. </style>