FinanceInfo.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="finance-info">
  3. <view class="info-card">
  4. <view class="info-row radio-row">
  5. <text class="label">是否国有及国有投资:</text>
  6. <radio-group class="radio-group">
  7. <label class="radio">
  8. <radio :value="0" :checked="financeInfo.sfgykg === 0" />
  9. <text>是</text>
  10. </label>
  11. <label class="radio">
  12. <radio :value="1" :checked="financeInfo.sfgykg === 0" />
  13. <text>否</text>
  14. </label>
  15. </radio-group>
  16. </view>
  17. <view class="info-row">
  18. <text class="label">上一年总资产(万元):</text>
  19. <text class="value">{{ financeInfo.syndzzc }}</text>
  20. </view>
  21. <view
  22. class="year-info"
  23. v-for="(year, index) in financeInfo.cnxxList"
  24. :key="index"
  25. >
  26. <view class="info-row">
  27. <text class="label">{{ year.cn }}年营业收入(万元):</text>
  28. <text class="value">{{ year.yysr }}</text>
  29. </view>
  30. <view class="info-row">
  31. <text class="label">{{ year.cn }}年净利润(万元):</text>
  32. <text class="value">{{ year.jlr }}</text>
  33. </view>
  34. <view class="info-row">
  35. <text class="label">{{ year.cn }}年总负债(万元):</text>
  36. <text class="value">{{ year.zfz }}</text>
  37. </view>
  38. </view>
  39. </view>
  40. <view style="height: 140rpx"></view>
  41. </view>
  42. </template>
  43. <script>
  44. import { getFinanceInfoApi } from "@/api/task";
  45. export default {
  46. name: "FinanceInfo",
  47. props: {
  48. taskInfo: {
  49. type: Object, // 根据实际数据类型调整
  50. default: () => ({}), // 默认值
  51. },
  52. },
  53. data() {
  54. return {
  55. years: [2024, 2023, 2022],
  56. financeInfo: {
  57. sfgykg: null,
  58. syndzzc: null,
  59. cnxxList: [],
  60. },
  61. };
  62. },
  63. mounted() {
  64. this.getFinanceInfo();
  65. },
  66. methods: {
  67. getFinanceInfo() {
  68. getFinanceInfoApi({
  69. kqId: this.taskInfo.kqId,
  70. }).then((res) => {
  71. if (res.code === 0 && res.data && res.data.length > 0) {
  72. this.financeInfo = res.data;
  73. }
  74. });
  75. },
  76. },
  77. };
  78. </script>
  79. <style lang="scss" scoped>
  80. .finance-info {
  81. padding: 20rpx;
  82. height: 100%;
  83. overflow: auto;
  84. .info-card {
  85. background-color: #fff;
  86. border-radius: 10rpx;
  87. padding: 20rpx;
  88. box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1);
  89. .info-row {
  90. display: flex;
  91. align-items: center;
  92. justify-content: space-between;
  93. margin-bottom: 20rpx;
  94. &.radio-row {
  95. display: flex;
  96. align-items: center;
  97. justify-content: space-between;
  98. }
  99. .label {
  100. color: #666;
  101. font-size: 28rpx;
  102. }
  103. .value {
  104. color: #000;
  105. font-size: 28rpx;
  106. }
  107. }
  108. .radio-group {
  109. width: 240rpx;
  110. display: flex;
  111. align-items: center;
  112. justify-content: flex-end;
  113. }
  114. .year-info {
  115. margin-top: 20rpx;
  116. padding-top: 20rpx;
  117. border-top: 1rpx solid #eee;
  118. }
  119. }
  120. }
  121. </style>