Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

confirm.vue 6.1KB

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