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

replace-equipment-confirm.vue 7.2KB

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