info4.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <template>
  2. <wt-card
  3. title="投资基本情况"
  4. class="mt-10"
  5. :edit-btn="true"
  6. @edit="change"
  7. @save="save"
  8. @on-load="getFundsList(this.type)"
  9. >
  10. <div
  11. class="full-width text-right main-color pointer"
  12. style="margin-top: -10px"
  13. :style="styleObject"
  14. @click="openFundsList"
  15. >
  16. 更多到位资金>>
  17. </div>
  18. <el-form class="mt-20" :disabled="disabled">
  19. <div style="display: flex; align-items: center">
  20. <el-button-group>
  21. <el-button type="primary" @click="getFundsList(1)"
  22. >到位资金</el-button
  23. >
  24. <el-button type="primary" @click="getFundsList(2)"
  25. >筹措资金<i class="el-icon-arrow-right el-icon--right"></i
  26. ></el-button>
  27. </el-button-group>
  28. <div style="margin-left: 20px">
  29. * 点击对应按钮,查看到位资金、筹措资金详情
  30. </div>
  31. </div>
  32. <div class="body_title">政策投资: {{ totalZC }}万元</div>
  33. <div class="flex flex-justify-center">
  34. <el-form-item class="full-width flex-child-average">
  35. <div class="flex flex-center full-width item">
  36. <span class="title">中央预算内投资:</span>
  37. <el-input
  38. class="input"
  39. placeholder="中央预算内投资"
  40. v-model="this.data.investmentOfCentralBudget"
  41. ></el-input>
  42. </div>
  43. </el-form-item>
  44. <el-form-item class="full-width flex-child-average">
  45. <div class="flex flex-center full-width item">
  46. <span class="title">银行贷款:</span>
  47. <el-input
  48. class="input"
  49. placeholder="银行贷款"
  50. v-model="this.data.bankLoans"
  51. ></el-input>
  52. </div>
  53. </el-form-item>
  54. </div>
  55. <div class="flex flex-justify-center">
  56. <el-form-item class="full-width flex-child-average">
  57. <div class="flex flex-center full-width item">
  58. <span class="title">专项债券资金:</span>
  59. <el-input
  60. class="input"
  61. placeholder="专项债券资金"
  62. v-model="this.data.specialBondFunds"
  63. ></el-input>
  64. </div>
  65. </el-form-item>
  66. <el-form-item class="full-width flex-child-average">
  67. <div class="flex flex-center full-width item">
  68. <span class="title">抗疫特别国债资金:</span>
  69. <el-input
  70. class="input"
  71. placeholder="抗疫特别国债资金"
  72. v-model="this.data.antiEpidemicSpecialTreasuryBondFund"
  73. ></el-input>
  74. </div>
  75. </el-form-item>
  76. </div>
  77. <div class="flex flex-justify-center">
  78. <el-form-item class="full-width flex-child-average">
  79. <div class="flex flex-center full-width item">
  80. <span class="title">其他地方财政性建设资金:</span>
  81. <el-input
  82. class="input"
  83. placeholder="其他地方财政性建设资金"
  84. v-model="this.data.otherLocalFiscalConstructionFunds"
  85. ></el-input>
  86. </div>
  87. </el-form-item>
  88. <el-form-item class="full-width flex-child-average">
  89. <div class="flex flex-center full-width item">
  90. <span class="title">政策性开发性金融工具(基金)投资:</span>
  91. <el-input
  92. class="input"
  93. placeholder="政策性开发性金融工具(基金)投资"
  94. v-model="this.data.policyBasedDevelopmentFinancialInvestment"
  95. ></el-input>
  96. </div>
  97. </el-form-item>
  98. </div>
  99. <div class="body_title">地方预算内投资: {{ totalDF }}万元</div>
  100. <div class="flex flex-justify-center">
  101. <el-form-item class="full-width flex-child-average">
  102. <div class="flex flex-center full-width item">
  103. <span class="title">省级预算内投资:</span>
  104. <el-input
  105. class="input"
  106. placeholder="省级预算内投资"
  107. v-model="this.data.investmentWithinProvincialBudget"
  108. ></el-input>
  109. </div>
  110. </el-form-item>
  111. <el-form-item class="full-width flex-child-average">
  112. <div class="flex flex-center full-width item">
  113. <span class="title">市级预算内投资:</span>
  114. <el-input
  115. class="input"
  116. placeholder="市级预算内投资"
  117. v-model="this.data.investmentWithinMunicipalBudget"
  118. ></el-input>
  119. </div>
  120. </el-form-item>
  121. </div>
  122. <div class="flex flex-justify-center">
  123. <el-form-item class="full-width flex-child-average">
  124. <div class="flex flex-center full-width item">
  125. <span class="title">县级预算内投资:</span>
  126. <el-input
  127. class="input"
  128. placeholder="县级预算内投资"
  129. v-model="this.data.investmentWithinCountyLevelBudget"
  130. ></el-input>
  131. </div>
  132. </el-form-item>
  133. <el-form-item class="full-width flex-child-average">
  134. <div class="flex flex-center full-width item"></div>
  135. </el-form-item>
  136. </div>
  137. </el-form>
  138. </wt-card>
  139. </template>
  140. <script>
  141. import wtCard from '@/components/wt-card/index.vue'
  142. export default {
  143. components: {
  144. wtCard
  145. },
  146. props: {
  147. projectId: {
  148. required: true,
  149. type: String,
  150. default: ''
  151. }
  152. },
  153. watch: {
  154. projectId: {
  155. handler(val) {
  156. if (val.length > 0) {
  157. this.getFundsList(1)
  158. }
  159. },
  160. immediate: true
  161. }
  162. },
  163. data() {
  164. return {
  165. styleObject: {
  166. visibility: 'visible'
  167. },
  168. type: 1,
  169. disabled: true,
  170. data: {},
  171. totalZC: 0,
  172. totalDF: 0,
  173. t1: 0,
  174. t2: 0,
  175. t3: 0,
  176. t4: 0,
  177. t5: 0,
  178. t6: 0,
  179. t7: 0,
  180. t8: 0,
  181. t9: 0
  182. }
  183. },
  184. methods: {
  185. getFundsList(type) {
  186. this.type = type
  187. this.totalDF = 0
  188. this.totalZC = 0
  189. this.t1 = 0
  190. this.t2 = 0
  191. this.t3 = 0
  192. this.t4 = 0
  193. this.t5 = 0
  194. this.t6 = 0
  195. this.t7 = 0
  196. this.t8 = 0
  197. this.t9 = 0
  198. if (type === 2) {
  199. this.styleObject.visibility = 'hidden'
  200. } else {
  201. this.styleObject.visibility = 'visible'
  202. }
  203. this.$api.funds
  204. .fundsList({ projectId: this.projectId, type: type })
  205. .then(res => {
  206. if (res.code === 200) {
  207. if (type === 1) {
  208. res.data.forEach(item => {
  209. this.t1 = this.t1 + (item.investmentOfCentralBudget - 0)
  210. this.t2 = this.t2 + (item.bankLoans - 0)
  211. this.t3 = this.t3 + (item.specialBondFunds - 0)
  212. this.t4 =
  213. this.t4 + (item.antiEpidemicSpecialTreasuryBondFund - 0)
  214. this.t5 = this.t5 + (item.otherLocalFiscalConstructionFunds - 0)
  215. this.t6 =
  216. this.t6 + (item.policyBasedDevelopmentFinancialInvestment - 0)
  217. this.t7 = this.t7 + (item.investmentWithinProvincialBudget - 0)
  218. this.t8 = this.t8 + (item.investmentWithinMunicipalBudget - 0)
  219. this.t9 = this.t9 + (item.investmentWithinCountyLevelBudget - 0)
  220. })
  221. this.data.investmentOfCentralBudget = this.t1
  222. this.data.bankLoans = this.t2
  223. this.data.specialBondFunds = this.t3
  224. this.data.antiEpidemicSpecialTreasuryBondFund = this.t4
  225. this.data.otherLocalFiscalConstructionFunds = this.t5
  226. this.data.policyBasedDevelopmentFinancialInvestment = this.t6
  227. this.data.investmentWithinProvincialBudget = this.t7
  228. this.data.investmentWithinMunicipalBudget = this.t8
  229. this.data.investmentWithinCountyLevelBudget = this.t9
  230. this.totalZC =
  231. this.t1 + this.t2 + this.t3 + this.t4 + this.t5 + this.t6
  232. this.totalDF = this.t7 + this.t8 + this.t9
  233. } else {
  234. this.data = res.data[0]
  235. this.totalZC =
  236. this.data.investmentOfCentralBudget +
  237. this.data.bankLoans +
  238. this.data.specialBondFunds +
  239. this.data.antiEpidemicSpecialTreasuryBondFund +
  240. this.data.otherLocalFiscalConstructionFunds +
  241. this.data.policyBasedDevelopmentFinancialInvestment
  242. this.totalDF =
  243. this.data.investmentWithinProvincialBudget +
  244. this.data.investmentWithinMunicipalBudget +
  245. this.data.investmentWithinCountyLevelBudget
  246. }
  247. }
  248. })
  249. },
  250. save() {
  251. if (this.type == 2) {
  252. this.$api.funds.fundsSaveOrUpdate(this.data).then(res => {
  253. if (res.code === 200) {
  254. this.$message.success(res.msg)
  255. } else {
  256. this.$message.error(res.msg)
  257. }
  258. })
  259. } else {
  260. this.$message.warning('到位资金合计不可编辑!')
  261. }
  262. },
  263. change(res) {
  264. this.disabled = res
  265. },
  266. openFundsList() {
  267. const data = this.$router.resolve({
  268. path: '/funds/detail',
  269. query: { id: this.projectId }
  270. })
  271. window.open(data.href, '_blank')
  272. }
  273. }
  274. }
  275. </script>
  276. <style lang="scss" scoped>
  277. .title {
  278. width: 240px;
  279. padding-right: 10px;
  280. text-align: right;
  281. }
  282. .body_title {
  283. margin-left: 5%;
  284. margin-top: 20px;
  285. margin-bottom: 20px;
  286. width: 90%;
  287. text-align: left;
  288. }
  289. .title-textarea {
  290. width: 85px;
  291. text-align: left;
  292. }
  293. .item {
  294. width: 90%;
  295. }
  296. .input {
  297. width: 50%;
  298. }
  299. </style>