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.

confirm.vue 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  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>{{getCodeName('ID_TYPE',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>{{state.cardType=="23"?'记账卡':'储值卡'}}</text>
  57. <text class="tips-card">{{getCodeName('CARD_STATE_TYPE',state.data.cardStatus)}}</text>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. <button class="submit" @click="nextACtion">下一步</button>
  64. </view>
  65. </template>
  66. <script lang="ts" setup>
  67. import {
  68. reactive,
  69. ref
  70. } from "vue"
  71. import {
  72. navTo
  73. } from "@/utils/utils"
  74. import {
  75. onLoad,
  76. onUnload
  77. } from "@dcloudio/uni-app";
  78. import {
  79. request
  80. } from "@/utils/network/request.js";
  81. import {
  82. orderDetail,
  83. cckChangejzCard
  84. } from "@/utils/network/api.js";
  85. import {
  86. getCodeName
  87. } from "@/datas/queryKey.js";
  88. import {
  89. stringToJson
  90. } from "@/utils/network/encryption";
  91. const state = reactive({
  92. data: {
  93. cardStatus: undefined,
  94. obuStatus: undefined,
  95. },
  96. type: undefined,
  97. cardType:""
  98. });
  99. /*视图进入后操作*/
  100. onLoad((option) => {
  101. queryOrderDetail(option.id).then((val : any) => {
  102. console.log("订单详情", val)
  103. state.data = val
  104. state.cardType=val.cardId.substring(8,10)
  105. })
  106. });
  107. /*下一步*/
  108. const nextACtion = () => {
  109. uni.showModal({
  110. title: '提示',
  111. content: '转记账卡后无法转回储值卡,请知悉',
  112. success: function (res) {
  113. if (res.confirm) {
  114. queryCckChangejzCardAction().then(val => {
  115. navTo(
  116. `/subpackage/after-sale/to-bookkeeping-card/choice-product-new?orderId=${state.data.orderId}&&applyId=${val.applyId}&&type=${state.data.type}&&userType=${state.data.userType}`
  117. )
  118. })
  119. } else if (res.cancel) {
  120. console.log('用户点击取消');
  121. }
  122. }
  123. });
  124. }
  125. //申请
  126. const queryCckChangejzCardAction = () => {
  127. var data = {
  128. orderId: state.data.orderId,
  129. };
  130. const options = {
  131. type: 2,
  132. data: data,
  133. method: "POST",
  134. showLoading: true,
  135. };
  136. return new Promise(async (resolve, reject) => {
  137. const res = await request(cckChangejzCard, options);
  138. const data = stringToJson(res.bizContent);
  139. resolve(data);
  140. }).catch((error) => {
  141. reject(error);
  142. });
  143. }
  144. const queryOrderDetail = (id) => {
  145. return new Promise(async (resolve, reject) => {
  146. const res = await request(orderDetail, {
  147. type: 2,
  148. data: {
  149. id: id
  150. },
  151. method: "POST",
  152. showLoading: true,
  153. });
  154. const data = stringToJson(res.bizContent);
  155. resolve(data);
  156. }).catch((error) => {
  157. reject(error);
  158. });
  159. }
  160. </script>
  161. <style>
  162. page {
  163. width: 100%;
  164. height: 100%;
  165. background-color: #fff;
  166. }
  167. </style>
  168. <style lang="scss" scoped>
  169. .selectCar-box {
  170. padding: 30rpx;
  171. .title {
  172. font-size: 30rpx;
  173. font-family: Microsoft YaHei UI;
  174. font-weight: 400;
  175. color: #333333;
  176. margin-bottom: 30rpx;
  177. }
  178. .details {
  179. .title {
  180. font-size: 30rpx;
  181. font-family: Microsoft YaHei UI;
  182. font-weight: 400;
  183. color: #333333;
  184. margin-bottom: 30rpx;
  185. }
  186. .details-item {
  187. display: flex;
  188. font-size: 26rpx;
  189. font-family: Noto Sans S Chinese;
  190. font-weight: 400;
  191. color: #999999;
  192. margin-bottom: 30rpx;
  193. text {
  194. font-size: 26rpx;
  195. font-family: Noto Sans S Chinese;
  196. font-weight: 400;
  197. color: #333333;
  198. }
  199. }
  200. }
  201. .card {
  202. height: 150rpx;
  203. background: #FFFFFF;
  204. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  205. border-radius: 20rpx;
  206. padding: 30rpx;
  207. display: flex;
  208. justify-content: space-between;
  209. align-items: center;
  210. margin-bottom: 60rpx;
  211. .card-left {
  212. display: flex;
  213. align-items: center;
  214. image {
  215. width: 100rpx;
  216. height: 90rpx;
  217. }
  218. .card-center {
  219. margin-left: 30rpx;
  220. .card-center-head {
  221. font-size: 32rpx;
  222. font-family: Noto Sans S Chinese;
  223. font-weight: 400;
  224. color: #333333;
  225. }
  226. .tips {
  227. font-size: 26rpx;
  228. font-family: Noto Sans S Chinese;
  229. font-weight: 400;
  230. color: #666666;
  231. .tips-card {
  232. width: 70rpx;
  233. height: 40rpx;
  234. background: #D3F2EF;
  235. border-radius: 6rpx;
  236. font-size: 20rpx;
  237. font-family: Noto Sans S Chinese;
  238. font-weight: 400;
  239. color: #0A8F8A;
  240. padding: 5rpx 10rpx;
  241. margin-left: 20rpx;
  242. }
  243. }
  244. }
  245. }
  246. .choose-item {
  247. margin-right: 20rpx;
  248. width: 50rpx;
  249. height: 50rpx;
  250. border: 1rpx solid #00B38B;
  251. border-radius: 50%;
  252. display: flex;
  253. justify-content: center;
  254. align-items: center;
  255. .active {
  256. width: 38rpx;
  257. height: 38rpx;
  258. background: #00B38B;
  259. border-radius: 50%;
  260. }
  261. }
  262. }
  263. .remark {
  264. font-size: 26rpx;
  265. font-family: Microsoft YaHei UI;
  266. font-weight: 400;
  267. color: #666666;
  268. text-indent: 30rpx;
  269. margin-bottom: 30rpx;
  270. }
  271. .submit {
  272. margin-top: 100rpx;
  273. width: 670rpx;
  274. height: 80rpx;
  275. background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
  276. border-radius: 40rpx;
  277. font-size: 32rpx;
  278. font-family: Noto Sans S Chinese;
  279. font-weight: 400;
  280. color: #FFFFFF;
  281. line-height: 80rpx;
  282. }
  283. }
  284. </style>