您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

replace-equipment-confirm.vue 7.6KB

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