選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

transfer-confirm.vue 6.7KB

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="aspectFill"></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="aspectFill"></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. console.log("val", val)
  130. navTo(
  131. `/subpackage/after-sale/transfer-ownership/card-result`
  132. )
  133. });
  134. })
  135. });
  136. onUnload(() => {
  137. /*移除监听*/
  138. uni.$off('queryCardlossStatus')
  139. });
  140. /*下一步*/
  141. const nextACtion = () => {
  142. uni.showModal({
  143. title: 'ETC过户',
  144. content: '确认是否ETC过户操作',
  145. success: function (res) {
  146. if (res.confirm) {
  147. navTo(
  148. `/subpackage/after-sale/transfer-ownership/transfer-verification?mobile=${state.data.customerTel}`
  149. )
  150. }
  151. }
  152. });
  153. }
  154. const queryOrderDetail = (id) => {
  155. return new Promise(async (resolve, reject) => {
  156. const res = await request(orderDetail, {
  157. type: 2,
  158. data: {
  159. id: id
  160. },
  161. method: "POST",
  162. showLoading: true,
  163. });
  164. const data = stringToJson(res.bizContent);
  165. resolve(data);
  166. }).catch((error) => {
  167. reject(error);
  168. });
  169. }
  170. const queryCardlossStatusType = (val : any) => {
  171. var data = {
  172. openId: getItem(StorageKeys.OpenId),
  173. orderSource: 'WECHAT',
  174. serviceType: val,
  175. orderId: state.data.orderId
  176. };
  177. const options = {
  178. type: 2,
  179. data: data,
  180. method: "POST",
  181. showLoading: true,
  182. };
  183. return new Promise(async (resolve, reject) => {
  184. const res = await request(queryGuoHu, options);
  185. const data = stringToJson(res.bizContent);
  186. resolve(data);
  187. }).catch((error) => {
  188. reject(error);
  189. });
  190. }
  191. </script>
  192. <style>
  193. page {
  194. width: 100%;
  195. height: 100%;
  196. background-color: #fff;
  197. }
  198. </style>
  199. <style lang="scss" scoped>
  200. .selectCar-box {
  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>