surePay.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <view>
  3. <view class="box">
  4. <view class="item">
  5. <view class="l">业务费用:</view>
  6. <view class="r">
  7. {{form.itemPrice}}元
  8. </view>
  9. </view>
  10. <view class="item">
  11. <view class="l">停车费用:</view>
  12. <view class="r">
  13. <text v-if="form.partMoney">{{form.partMoney}}</text>
  14. <text v-else>-</text>
  15. </view>
  16. </view>
  17. <view class="item">
  18. <view class="l">合计费用:</view>
  19. <view class="r">
  20. {{form.totalMoney}}元
  21. </view>
  22. </view>
  23. <view class="item">
  24. <view class="l">支付凭据:</view>
  25. <view class="r">
  26. <view class="img">
  27. <u-upload max-count="3" ref="license" :file-list="imgList" :action="uploadImageUrl" width="300" height="200"></u-upload>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <u-button type="primary" @click="confirmFn">确认</u-button>
  33. </view>
  34. </template>
  35. <script>
  36. import request from '../../utils/request.js'
  37. export default {
  38. data() {
  39. return {
  40. id: '',
  41. form: {
  42. partMoney: 0
  43. },
  44. imgList: [],
  45. uploadImageUrl: request.server + '/upload/image',
  46. }
  47. },
  48. onLoad(options) {
  49. this.id = options.id;
  50. },
  51. onShow() {
  52. this.getBusinessById();
  53. },
  54. methods: {
  55. getBusinessById() {
  56. this.$api.getBusinessById({
  57. id: this.id
  58. }).then(resp => {
  59. this.form = resp.data;
  60. })
  61. },
  62. confirmFn(){
  63. this.$api.confirmPay({id:this.form.id}).then(Resp=>{
  64. this.$common.toast('已支付');
  65. setTimeout(()=>{
  66. this.$common.back()
  67. },500)
  68. })
  69. }
  70. }
  71. }
  72. </script>
  73. <style lang="scss">
  74. page {
  75. background-color: #fff;
  76. }
  77. @import '@/common/common.scss'
  78. </style>