tabsAbout.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view class="detail-contract-about">
  3. <about-product
  4. :list="productList"
  5. :discount-rate="discount_rate"
  6. :total="totalMoney"
  7. :config="getConfigs('product')"
  8. class="about-section" />
  9. <about-group
  10. :list="teamList"
  11. :config="getConfigs('group')"
  12. class="about-section" />
  13. <about-receivables-plan
  14. :list="receivablesPlanList"
  15. :config="getConfigs('receivablesPlan')"
  16. class="about-section" />
  17. <about-receivables
  18. :list="receivablesList"
  19. :config="getConfigs('receivables')"
  20. class="about-section" />
  21. <about-file
  22. v-if="batchId"
  23. :batch-id="batchId"
  24. :detail-id="detailId"
  25. type="crm_contract"
  26. class="about-section" />
  27. <about-operation
  28. :detail-id="detailId"
  29. type="crm_contract"
  30. class="about-section" />
  31. </view>
  32. </template>
  33. <script>
  34. import {
  35. QueryProduct,
  36. QueryReceivables,
  37. QueryReceivablesPlanList,
  38. GetMembers
  39. } from 'API/crm/contract'
  40. import AboutProduct from '../../components/tabAbout/aboutProduct.vue'
  41. import AboutGroup from '../../components/tabAbout/aboutGroup.vue'
  42. import AboutReceivables from '../../components/tabAbout/aboutReceivables.vue'
  43. import AboutReceivablesPlan from '../../components/tabAbout/aboutReceivablesPlan.vue'
  44. import AboutFile from '../../components/tabAbout/aboutFile.vue'
  45. import AboutOperation from '../../components/tabAbout/aboutOperation.vue'
  46. export default {
  47. name: 'DetailContractAbout',
  48. components: {
  49. AboutProduct,
  50. AboutGroup,
  51. AboutReceivables,
  52. AboutReceivablesPlan,
  53. AboutFile,
  54. AboutOperation
  55. },
  56. props: {
  57. detailId: {
  58. type: [String, Number],
  59. default: null,
  60. required: true
  61. },
  62. detailData: {
  63. type: Object,
  64. default: () => {}
  65. },
  66. batchId: {
  67. type: String,
  68. default: null
  69. }
  70. },
  71. data() {
  72. return {
  73. productList: [],
  74. contractList: [],
  75. teamList: [],
  76. receivablesList: [],
  77. receivablesPlanList: [],
  78. discount_rate: 0,
  79. totalMoney: 0
  80. }
  81. },
  82. created() {
  83. this.getList()
  84. },
  85. methods: {
  86. getList() {
  87. QueryProduct({contractId: this.detailId, pageType: 0}).then(response => {
  88. console.log('productList: ', response)
  89. this.productList = response.list
  90. this.totalMoney = response.money
  91. this.discount_rate = response.discountRate || 0
  92. }).catch()
  93. GetMembers({ id: this.detailId }).then(res => {
  94. console.log('teamList: ', res)
  95. this.teamList = res
  96. }).catch(() => {})
  97. // 回款计划
  98. QueryReceivablesPlanList({
  99. contractId: this.detailId,
  100. pageType: 0
  101. }).then(response => {
  102. console.log('ReceivedPlan', response);
  103. this.receivablesPlanList = response.list
  104. }).catch()
  105. // 回款
  106. QueryReceivables({
  107. contractId: this.detailId,
  108. pageType: 0
  109. }).then(response => {
  110. console.log('Received', response);
  111. this.receivablesList = response.list
  112. }).catch()
  113. },
  114. getConfigs() {
  115. return {
  116. detail: this.detailData,
  117. type: 'contract'
  118. }
  119. }
  120. }
  121. }
  122. </script>
  123. <style scoped lang="scss">
  124. </style>