contractCollection.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <view class="todo-list">
  3. <u-empty mode="list" text="暂无记录" v-if="collectList.length == 0"></u-empty>
  4. <view v-else v-for="(v, i) in collectList" :key="i" class="todo-item">
  5. <view class="cust-name">
  6. <u-text :bold="true" size="28rpx" :text="v.custName"></u-text>
  7. </view>
  8. <u-row>
  9. <u-col span="12">
  10. <view class="header">
  11. <view class="content flex">
  12. <text>回款金额:{{ formatPrice(v.collectionAmount) }}</text>
  13. </view>
  14. <view class="content flex">
  15. <text>回款方式:{{ collectionTypeOption.filter((item) => item.key == v.collectionType)[0].value || '-' }}</text>
  16. </view>
  17. <view class="content flex">
  18. <text>合同编号:{{ v.contractCode }}</text>
  19. </view>
  20. <view class="content-footer flex1">
  21. <text class="date">{{ v.collectionDatetime }}</text>
  22. <view class="flex flex-middle">
  23. <text>审核状态:{{ v.approStatus == '10' ? '未回款' : '已回款' }}</text>
  24. </view>
  25. </view>
  26. </view>
  27. </u-col>
  28. </u-row>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import to from 'await-to-js'
  34. import api from '@/api/contract'
  35. export default {
  36. name: 'OmsContractCollection',
  37. props: {
  38. contractId: {
  39. type: [String, Number],
  40. default: '0',
  41. },
  42. },
  43. data() {
  44. return {
  45. collectList: [],
  46. collectionTypeOption: [], //,回款方式
  47. }
  48. },
  49. created() {
  50. this.getOptions()
  51. },
  52. mounted() {
  53. this.fetchData()
  54. },
  55. methods: {
  56. async getOptions() {
  57. Promise.all([this.getDicts('collection_type')])
  58. .then(([collectionType]) => {
  59. this.collectionTypeOption = collectionType.data.values || []
  60. })
  61. .catch((err) => console.log(err))
  62. },
  63. async fetchData() {
  64. const [err, res] = await to(api.getRePay({
  65. contractId: this.contractId,
  66. pageNum: 0
  67. }))
  68. if (err) return
  69. this.collectList = res.data.list
  70. }
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .todo-list {
  76. height: 100%;
  77. overflow: auto;
  78. .cust-name {
  79. font-size: 28rpx;
  80. }
  81. .todo-item {
  82. padding: 12rpx 40rpx 12rpx 46rpx;
  83. background: #f2f3f5;
  84. border-radius: 15rpx;
  85. margin-bottom: 32rpx;
  86. .tit-txt {
  87. font-size: 28rpx;
  88. font-weight: bold;
  89. color: #323232;
  90. }
  91. .content {
  92. margin-top: 10rpx;
  93. font-size: 28rpx;
  94. color: #646464;
  95. }
  96. .content-footer {
  97. padding: 10rpx 0 12rpx 0;
  98. font-size: 24rpx;
  99. .date {
  100. color: #969696;
  101. }
  102. .user-img {
  103. width: 46rpx;
  104. height: 46rpx;
  105. border-radius: 50%;
  106. margin-right: 15rpx;
  107. }
  108. }
  109. }
  110. }
  111. </style>