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.

replace-equipment-confirm.vue 7.2KB

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