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

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="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. orderId: undefined,
  118. }
  119. });
  120. /*视图进入后操作*/
  121. onLoad((option) => {
  122. queryOrderDetail(option.id).then((val: any) => {
  123. state.data = val
  124. })
  125. /*监听手机号验证后的回调*/
  126. uni.$on('queryCardlossStatus', function(type) {
  127. console.log(type)
  128. queryCardlossStatusType(type.type).then((val: any) => {
  129. navTo(
  130. `/after-sale/transfer-ownership/card-result`
  131. )
  132. });
  133. })
  134. });
  135. onUnload(() => {
  136. /*移除监听*/
  137. uni.$off('queryCardlossStatus')
  138. });
  139. /*下一步*/
  140. const nextACtion = () => {
  141. wx.showModal({
  142. title: 'ETC过户',
  143. content: '确认是否ETC过户操作',
  144. success: function(res) {
  145. if (res.confirm) {
  146. navTo(
  147. `/after-sale/transfer-ownership/transfer-verification?mobile=${state.data.customerTel}`
  148. )
  149. }
  150. }
  151. });
  152. }
  153. const queryOrderDetail = (id) => {
  154. return new Promise(async (resolve, reject) => {
  155. const res = await request(orderDetail, {
  156. type: 2,
  157. data: {
  158. id: id
  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 queryCardlossStatusType = (val: any) => {
  170. var data = {
  171. openId: getItem(StorageKeys.OpenId),
  172. orderSource: 'WECHAT',
  173. serviceType: val,
  174. orderId: state.data.orderId
  175. };
  176. const options = {
  177. type: 2,
  178. data: data,
  179. method: "POST",
  180. showLoading: true,
  181. };
  182. return new Promise(async (resolve, reject) => {
  183. const res = await request(queryGuoHu, options);
  184. const data = stringToJson(res.bizContent);
  185. resolve(data);
  186. }).catch((error) => {
  187. reject(error);
  188. });
  189. }
  190. </script>
  191. <style>
  192. page {
  193. width: 100%;
  194. height: 100%;
  195. background-color: #fff;
  196. }
  197. </style>
  198. <style lang="scss" scoped>
  199. .selectCar-box {
  200. // width: 100%;
  201. // height: 100%;
  202. padding: 30rpx;
  203. .title {
  204. font-size: 30rpx;
  205. font-family: Microsoft YaHei UI;
  206. font-weight: 400;
  207. color: #333333;
  208. margin-bottom: 30rpx;
  209. }
  210. .details {
  211. .title {
  212. font-size: 30rpx;
  213. font-family: Microsoft YaHei UI;
  214. font-weight: 400;
  215. color: #333333;
  216. margin-bottom: 30rpx;
  217. }
  218. .details-item {
  219. display: flex;
  220. font-size: 26rpx;
  221. font-family: Noto Sans S Chinese;
  222. font-weight: 400;
  223. color: #999999;
  224. margin-bottom: 30rpx;
  225. text {
  226. font-size: 26rpx;
  227. font-family: Noto Sans S Chinese;
  228. font-weight: 400;
  229. color: #333333;
  230. }
  231. }
  232. }
  233. .card {
  234. height: 150rpx;
  235. background: #FFFFFF;
  236. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  237. border-radius: 20rpx;
  238. padding: 30rpx;
  239. display: flex;
  240. justify-content: space-between;
  241. align-items: center;
  242. margin-bottom: 60rpx;
  243. .card-left {
  244. display: flex;
  245. align-items: center;
  246. image {
  247. width: 100rpx;
  248. height: 90rpx;
  249. }
  250. .card-center {
  251. margin-left: 30rpx;
  252. .card-center-head {
  253. font-size: 32rpx;
  254. font-family: Noto Sans S Chinese;
  255. font-weight: 400;
  256. color: #333333;
  257. }
  258. .tips {
  259. font-size: 26rpx;
  260. font-family: Noto Sans S Chinese;
  261. font-weight: 400;
  262. color: #666666;
  263. .tips-card {
  264. width: 70rpx;
  265. height: 40rpx;
  266. background: #D3F2EF;
  267. border-radius: 6rpx;
  268. font-size: 20rpx;
  269. font-family: Noto Sans S Chinese;
  270. font-weight: 400;
  271. color: #0A8F8A;
  272. padding: 5rpx 10rpx;
  273. margin-left: 20rpx;
  274. }
  275. }
  276. }
  277. }
  278. .choose-item {
  279. margin-right: 20rpx;
  280. width: 50rpx;
  281. height: 50rpx;
  282. border: 1rpx solid #00B38B;
  283. border-radius: 50%;
  284. display: flex;
  285. justify-content: center;
  286. align-items: center;
  287. .active {
  288. width: 38rpx;
  289. height: 38rpx;
  290. background: #00B38B;
  291. border-radius: 50%;
  292. }
  293. }
  294. }
  295. .remark {
  296. font-size: 26rpx;
  297. font-family: Microsoft YaHei UI;
  298. font-weight: 400;
  299. color: #666666;
  300. text-indent: 30rpx;
  301. margin-bottom: 30rpx;
  302. }
  303. .submit {
  304. margin-top: 100rpx;
  305. width: 670rpx;
  306. height: 80rpx;
  307. background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
  308. border-radius: 40rpx;
  309. font-size: 32rpx;
  310. font-family: Noto Sans S Chinese;
  311. font-weight: 400;
  312. color: #FFFFFF;
  313. line-height: 80rpx;
  314. }
  315. }
  316. </style>