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.3KB

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