index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view>
  3. <z-navbar title="收款明细" back></z-navbar>
  4. <view class="totalmoney shadow-2">
  5. 累计收款:{{totalmoney}} 元
  6. </view>
  7. <view class="ml-20" style="margin-top: 108rpx;">
  8. <z-timeline class="mt-24" align="top" v-if="dataList.length">
  9. <z-timeline-item :timestamp="item.createTime" v-for="(item,index) in dataList" :key="index">
  10. <z-card class="back_card mtb-20 " width="593">
  11. <view class="flex-n fac">
  12. <image class="back_card_img" :src="item.headImageSrc||'../../../static/touxiang_1.png'"></image>
  13. <view class="back_card_content">
  14. <view class="flex-n fac">
  15. <view class="back_card_text">{{item.roleName||'匿名'}}</view>
  16. <view class="back_card_text ml-49">收款金额:{{item.confirmMoney||0}}元</view>
  17. </view>
  18. <view class="back_card_text">{{item.confirmName}}</view>
  19. </view>
  20. </view>
  21. <view class="back_card_text2">{{item.remark}}</view>
  22. </z-card>
  23. </z-timeline-item>
  24. </z-timeline>
  25. <z-nodata v-if="dataList.length==0"></z-nodata>
  26. <u-toast ref="uToast"></u-toast>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. data() {
  33. return {
  34. dataList: [],
  35. type: 0,
  36. totalmoney: 0
  37. };
  38. },
  39. onLoad(option) {
  40. this.type = option.type;
  41. if (option.type == 0)
  42. this.getData(option.id);
  43. else {
  44. this.getWedData(option.id)
  45. }
  46. },
  47. methods: {
  48. getData(orderId) {
  49. this.$axios.get('app/orderFinanceConfirm/financeConfirmDetail/' + orderId).then(res => {
  50. console.log(res)
  51. this.dataList = res.data.list;
  52. var money = 0;
  53. for (var i in this.dataList) {
  54. money += Number(this.dataList[i].confirmType == 0 ? '' : '-') + Number(this.dataList[i].confirmMoney);
  55. }
  56. this.totalmoney = money;
  57. }).catch(err => {
  58. this.$refs.uToast.error(err.msg);
  59. })
  60. },
  61. getWedData(orderId) {
  62. this.$axios.get('app/weddingFinanceConfirm/financeWeddingConfirmDetail/' + orderId).then(res => {
  63. console.log(res)
  64. this.dataList = res.data.list;
  65. var money = 0;
  66. for (var i in this.dataList) {
  67. money += Number(this.dataList[i].confirmType == 0 ? '' : '-') + Number(this.dataList[i].confirmMoney);
  68. }
  69. this.totalmoney = money;
  70. }).catch(err => {
  71. this.$refs.uToast.error(err.msg);
  72. })
  73. }
  74. }
  75. }
  76. </script>
  77. <style scoped lang="scss">
  78. .totalmoney {
  79. position: fixed;
  80. width: 100%;
  81. padding: 0 30rpx;
  82. line-height: 88rpx;
  83. top: calc(var(--status-bar-height) + 84rpx);
  84. z-index: 200;
  85. font-size: 28rpx;
  86. color: #555555;
  87. }
  88. .back_card {
  89. margin-left: 0 !important;
  90. font-size: 24rpx;
  91. padding: 26rpx;
  92. .back_card_img {
  93. width: 89rpx;
  94. min-width: 89rpx;
  95. height: 89rpx;
  96. border-radius: 45rpx;
  97. overflow: hidden;
  98. margin-right: 19rpx;
  99. }
  100. .back_card_text {
  101. color: #555555;
  102. line-height: 30rpx;
  103. }
  104. .back_card_text2 {
  105. color: #888888;
  106. margin-left: 108rpx;
  107. }
  108. }
  109. </style>