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

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