Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

transfer-confirm.vue 7.1KB

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