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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <template>
  2. <!-- 补卡额申请 -->
  3. <view class="wrapper">
  4. <!-- 背景颜色充满屏 -->
  5. <view class="bg-color"></view>
  6. <view class="card-info">
  7. <view class="info-wrap">
  8. <view class="info-left">
  9. <view class="info-left-text">
  10. <text class="label">流水单号:</text>
  11. <text class="val">MA89200010</text>
  12. </view>
  13. <view>
  14. <text class="label">ETC卡号:</text>
  15. <text class="val">0110200001</text>
  16. </view>
  17. </view>
  18. <view class="info-right">
  19. <view class="price-label">
  20. 交易金额
  21. </view>
  22. <view class="price-val">
  23. <u-icon name="rmb"></u-icon>
  24. <text class="price-val-text">104.00</text>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="card-text-wrap">
  29. <view class="text-box">
  30. <text class="name-text">贵阳西</text>
  31. <text class="time-text">12:09</text>
  32. <text class="date-text">2023-01-08</text>
  33. </view>
  34. <view class="arrow-wrap">
  35. <text class="arrow-text">粤A12345</text>
  36. <image class="d-img" :src="`${$imgUrl}order/arrowCard.png`"></image>
  37. </view>
  38. <view class="text-box">
  39. <text class="name-text">XXXXX</text>
  40. <text class="time-text">18:52</text>
  41. <text class="date-text">2023-01-08</text>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="form-wrap">
  46. <u-form :model="form" ref="uForm">
  47. <u-form-item label="补卡金额" prop="price" label-width="130" required>
  48. <u-input v-model="form.price" />
  49. </u-form-item>
  50. <u-form-item label="上传凭证" prop="fileList" label-width="130" required label-position="top">
  51. <view class="tips-wrap">
  52. <text class="tips-pos">(最多上传3张)</text>
  53. </view>
  54. <u-upload :action="action" :file-list="form.fileList" upload-text="" :custom-btn="true">
  55. <view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
  56. <view class="v-bord">
  57. <image class="addImg" :src="`${$imgUrl}order/addBtn.png`"></image>
  58. </view>
  59. </view>
  60. </u-upload>
  61. </u-form-item>
  62. </u-form>
  63. </view>
  64. <view class="btn" @click="submitHandle">补卡额申请</view>
  65. </view>
  66. </template>
  67. <script lang="ts">
  68. import {
  69. onReady
  70. } from "@dcloudio/uni-app";
  71. import {
  72. defineComponent,
  73. reactive,
  74. ref
  75. } from "vue";
  76. export default defineComponent({
  77. setup() {
  78. const action = "";
  79. const uForm = ref(null);
  80. const form = reactive({
  81. price: "",
  82. fileList: []
  83. })
  84. const rules = {
  85. price: [{
  86. required: true,
  87. type: "number",
  88. message: '请输入补卡额',
  89. trigger: ['change', 'blur'],
  90. }],
  91. fileList: [{
  92. required: true,
  93. type: "array",
  94. message: '请上传凭证',
  95. trigger: ['change', 'blur'],
  96. }],
  97. }
  98. onReady(() => {
  99. console.log("uform", uForm.value)
  100. uForm.value.setRules(rules);
  101. })
  102. const submitHandle = () =>{
  103. console.log("uForm", uForm);
  104. uForm.value.validate(valid => {
  105. if (valid) {
  106. console.log('验证通过');
  107. } else {
  108. console.log('验证失败');
  109. }
  110. });
  111. }
  112. return {
  113. form,
  114. uForm,
  115. action,
  116. submitHandle
  117. }
  118. }
  119. })
  120. </script>
  121. <style lang="scss" scoped>
  122. .bg-color {
  123. position: fixed;
  124. top: 0;
  125. left: 0;
  126. right: 0;
  127. bottom: 0;
  128. background: #EEF7F7;
  129. z-index: -1;
  130. }
  131. .card-info {
  132. background: #FFFFFF;
  133. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  134. border-radius: 20rpx;
  135. margin: 30rpx;
  136. .info-wrap {
  137. display: flex;
  138. justify-content: space-between;
  139. align-items: center;
  140. padding: 30px;
  141. border-bottom: 1px solid #dcdcdc;
  142. .info-left-text {
  143. margin-bottom: 39rpx;
  144. }
  145. .label {
  146. color: #999999;
  147. font-size: 26rpx;
  148. font-weight: 400;
  149. }
  150. .val {
  151. color: #333333;
  152. font-size: 26rpx;
  153. font-weight: 400;
  154. }
  155. .price-label {
  156. color: #999999;
  157. font-size: 24rpx;
  158. font-weight: 400;
  159. margin-bottom: 22rpx;
  160. text-align: center;
  161. }
  162. .price-val-text {
  163. font-size: 36rpx;
  164. font-weight: 700;
  165. color: #333333;
  166. margin-left: 9rpx;
  167. }
  168. .price-val {
  169. font-size: 26rpx;
  170. color: #333333;
  171. }
  172. }
  173. .card-text-wrap {
  174. display: flex;
  175. justify-content: space-between;
  176. align-items: center;
  177. padding: 39rpx 60rpx;
  178. .text-box {
  179. display: flex;
  180. flex-direction: column;
  181. align-items: center;
  182. .name-text {
  183. font-size: 30rpx;
  184. font-weight: 400;
  185. color: #333333;
  186. }
  187. .time-text {
  188. font-size: 30rpx;
  189. color: #333333;
  190. font-weight: 400;
  191. margin-top: 8rpx;
  192. }
  193. .date-text {
  194. font-size: 24rpx;
  195. color: #999999;
  196. font-weight: 400;
  197. margin-top: 8rpx;
  198. }
  199. }
  200. .arrow-wrap {
  201. display: flex;
  202. flex-direction: column;
  203. align-items: center;
  204. .d-img {
  205. width: 186rpx;
  206. height: 12rpx;
  207. }
  208. .arrow-text {
  209. color: #666666;
  210. font-size: 26rpx;
  211. }
  212. }
  213. }
  214. }
  215. .form-wrap {
  216. height: 450rpx;
  217. background: #FFFFFF;
  218. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  219. border-radius: 20rpx;
  220. margin: 30rpx 30rpx 0 30rpx;
  221. padding: 30rpx;
  222. .slot-btn {
  223. width: 161rpx;
  224. height: 161rpx;
  225. background: #F3F3F3;
  226. border: 1px solid #DCDCDC;
  227. border-radius: 6rpx;
  228. display: flex;
  229. align-items: center;
  230. justify-content: center;
  231. .v-bord {
  232. width: 74rpx;
  233. height: 74rpx;
  234. border: 1px dashed #dcdcdc;
  235. }
  236. .addImg {
  237. width: 74rpx;
  238. height: 74rpx;
  239. }
  240. }
  241. }
  242. .btn {
  243. margin: 60rpx auto 0;
  244. width: 670rpx;
  245. height: 80rpx;
  246. background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
  247. box-shadow: 0rpx 4rpx 11rpx 1rpx rgba(223, 223, 223, 0.5);
  248. border-radius: 40rpx;
  249. text-align: center;
  250. line-height: 80rpx;
  251. color: #FFFFFF;
  252. font-size: 32rpx;
  253. }
  254. .tips-wrap {
  255. position: relative;
  256. .tips-pos {
  257. position: absolute;
  258. left: 110rpx;
  259. top: -75rpx;
  260. color: #999999;
  261. font-size: 22rpx;
  262. }
  263. }
  264. </style>