FinanceInfo.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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 class="year-info">
  22. <view class="info-row">
  23. <text class="label"
  24. >{{ financeInfo.cnxxList[0]?.cn || 2024 }}年营业收入(万元):</text
  25. >
  26. <text class="value">{{ financeInfo.cnxxList[0]?.yysr || "-" }}</text>
  27. </view>
  28. <view class="info-row">
  29. <text class="label"
  30. >{{ financeInfo.cnxxList[0]?.cn || 2024 }}年净利润(万元):</text
  31. >
  32. <text class="value">{{ financeInfo.cnxxList[0]?.jlr || "-" }}</text>
  33. </view>
  34. <view class="info-row">
  35. <text class="label"
  36. >{{ financeInfo.cnxxList[0]?.cn || 2024 }}年总负债(万元):</text
  37. >
  38. <text class="value">{{ financeInfo.cnxxList[0]?.zfz || "-" }}</text>
  39. </view>
  40. </view>
  41. <view class="year-info">
  42. <view class="info-row">
  43. <text class="label"
  44. >{{ financeInfo.cnxxList[1]?.cn || 2023 }}年营业收入(万元):</text
  45. >
  46. <text class="value">{{ financeInfo.cnxxList[1]?.yysr || "-" }}</text>
  47. </view>
  48. <view class="info-row">
  49. <text class="label"
  50. >{{ financeInfo.cnxxList[1]?.cn || 2023 }}年净利润(万元):</text
  51. >
  52. <text class="value">{{ financeInfo.cnxxList[1]?.jlr || "-" }}</text>
  53. </view>
  54. <view class="info-row">
  55. <text class="label"
  56. >{{ financeInfo.cnxxList[1]?.cn || 2023 }}年总负债(万元):</text
  57. >
  58. <text class="value">{{ financeInfo.cnxxList[1]?.zfz || "-" }}</text>
  59. </view>
  60. </view>
  61. <view class="year-info">
  62. <view class="info-row">
  63. <text class="label"
  64. >{{ financeInfo.cnxxList[2]?.cn || 2022 }}年营业收入(万元):</text
  65. >
  66. <text class="value">{{ financeInfo.cnxxList[2]?.yysr || "-" }}</text>
  67. </view>
  68. <view class="info-row">
  69. <text class="label"
  70. >{{ financeInfo.cnxxList[2]?.cn || 2022 }}年净利润(万元):</text
  71. >
  72. <text class="value">{{ financeInfo.cnxxList[2]?.jlr || "-" }}</text>
  73. </view>
  74. <view class="info-row">
  75. <text class="label"
  76. >{{ financeInfo.cnxxList[2]?.cn || 2022 }}年总负债(万元):</text
  77. >
  78. <text class="value">{{ financeInfo.cnxxList[2]?.zfz || "-" }}</text>
  79. </view>
  80. </view>
  81. </view>
  82. <view style="height: 140rpx"></view>
  83. </view>
  84. </template>
  85. <script>
  86. import { getFinanceInfoApi } from "@/api/task";
  87. export default {
  88. name: "FinanceInfo",
  89. props: {
  90. taskInfo: {
  91. type: Object, // 根据实际数据类型调整
  92. default: () => ({}), // 默认值
  93. },
  94. },
  95. data() {
  96. return {
  97. years: [2024, 2023, 2022],
  98. financeInfo: {
  99. sfgykg: null,
  100. syndzzc: null,
  101. cnxxList: [],
  102. },
  103. };
  104. },
  105. mounted() {
  106. this.getFinanceInfo();
  107. },
  108. methods: {
  109. getFinanceInfo() {
  110. getFinanceInfoApi({
  111. kqId: this.taskInfo.kqId,
  112. }).then((res) => {
  113. if (res.code === 0 && res.data) {
  114. this.financeInfo = res.data;
  115. console.log(this.financeInfo, "financeInfo");
  116. }
  117. });
  118. },
  119. },
  120. };
  121. </script>
  122. <style lang="scss" scoped>
  123. .finance-info {
  124. padding: 20rpx;
  125. height: 100%;
  126. overflow: auto;
  127. .info-card {
  128. background-color: #fff;
  129. border-radius: 10rpx;
  130. padding: 20rpx;
  131. box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1);
  132. .info-row {
  133. display: flex;
  134. align-items: center;
  135. justify-content: space-between;
  136. margin-bottom: 20rpx;
  137. &.radio-row {
  138. display: flex;
  139. align-items: center;
  140. justify-content: space-between;
  141. }
  142. .label {
  143. color: #666;
  144. font-size: 28rpx;
  145. }
  146. .value {
  147. color: #000;
  148. font-size: 28rpx;
  149. }
  150. }
  151. .radio-group {
  152. width: 240rpx;
  153. display: flex;
  154. align-items: center;
  155. justify-content: flex-end;
  156. }
  157. .year-info {
  158. margin-top: 20rpx;
  159. padding-top: 20rpx;
  160. border-top: 1rpx solid #eee;
  161. }
  162. }
  163. }
  164. </style>