feeDetail.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view>
  3. <view class="cmain" v-for="(item,index) in feeItemList">
  4. <view class="box order_detail">
  5. <view class="item">
  6. <text class="label">收费企业:</text>
  7. <text class="desc">{{ item.companyName }}</text>
  8. </view>
  9. <view class="item">
  10. <text class="label">收费类型:</text>
  11. <text class="desc" v-if="item.feeType ==1">按交易额收取</text>
  12. <text class="desc" v-if="item.feeType ==2">按次收取</text>
  13. </view>
  14. <view class="item" v-if="item.feeType ==1">
  15. <text class="label">收费%(按交易额):</text>
  16. <text class="desc"><span style="color: coral;">{{ item.percent }} %</span></text>
  17. </view>
  18. <view class="item" v-if="item.feeType ==2">
  19. <text class="label">收费金额(按次收):</text>
  20. <text class="desc"><span style="color: coral;">{{ item.feeMoney }} 元</span></text>
  21. </view>
  22. <view class="item">
  23. <text class="label">当前订单收取金额:</text>
  24. <text class="desc" v-if="item.feeType ==1"><span style="color: coral;">{{ (item.percent * resalePrice)/100}} 元</span></text>
  25. <text class="desc" v-if="item.feeType ==2"><span style="color: coral;">{{ item.feeMoney }} 元</span></text>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="mfooter">
  30. <view class="flex">
  31. <view class="f">
  32. <button class="btn" @click="pay()">立即缴费</button>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. data() {
  41. return {
  42. resalePrice: '',// 金额
  43. id: '',// 订单id
  44. feeItemList: [],
  45. };
  46. },
  47. onLoad(e) {
  48. if (e.id && e.resalePrice) {
  49. this.resalePrice = e.resalePrice;
  50. this.id = e.id;
  51. this.http.request({
  52. url: '/level-two-server/app/TbFeeItem/getList',
  53. success: res => {
  54. this.feeItemList = res.data.data
  55. }
  56. });
  57. }
  58. },
  59. methods: {
  60. pay() {
  61. uni.showModal({
  62. title: '提示',
  63. content: '确定缴费?',
  64. success: res => {
  65. if (res.confirm) {
  66. this.http.request({
  67. url: '/level-two-server/app/TbOrders/payTax?id=' + this.id,
  68. success: res => {
  69. uni.showToast({ title: '缴费成功' });
  70. uni.navigateBack();
  71. }
  72. });
  73. }
  74. }
  75. });
  76. }
  77. }
  78. };
  79. </script>
  80. <style lang="scss">
  81. page {
  82. background-color: $pg;
  83. }
  84. </style>