|
|
@@ -0,0 +1,285 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div class="padding top flex flex-center flex-justify-between">
|
|
|
+ <span>到位资金记录</span>
|
|
|
+ </div>
|
|
|
+ <div class="ml-20 mr-20 mt-20">
|
|
|
+ <avue-crud
|
|
|
+ :option="option"
|
|
|
+ :data="data"
|
|
|
+ ref="crud"
|
|
|
+ v-model="form"
|
|
|
+ @row-del="rowDel"
|
|
|
+ @row-save="handleRowSave"
|
|
|
+ @row-update="rowUpdate"
|
|
|
+ @on-load="onLoad"
|
|
|
+ >
|
|
|
+ <template #fileIds-form="{ row, type }">
|
|
|
+ <div v-if="type === 'view'">
|
|
|
+ <div
|
|
|
+ v-for="i in form.accountInformationFileList"
|
|
|
+ :key="i.id"
|
|
|
+ class="pointer"
|
|
|
+ >
|
|
|
+ {{ i.title }}
|
|
|
+ <el-button text type="primary" plain>查看</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="type === 'edit'">
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ form.accountInformationFileList &&
|
|
|
+ form.accountInformationFileList.length === 0
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <div v-for="item in fileList" :key="item.id">
|
|
|
+ {{ item.title }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-for="i in form.accountInformationFileList"
|
|
|
+ :key="i.id"
|
|
|
+ class="pointer"
|
|
|
+ >
|
|
|
+ {{ i.title }}
|
|
|
+ <el-button text type="primary" plain>删除</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <div v-for="item in fileList" :key="item.id">
|
|
|
+ {{ item.title }}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div v-for="item in fileList" :key="item.id">
|
|
|
+ {{ item.originalFileName }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: 'info',
|
|
|
+ components: {},
|
|
|
+ props: {
|
|
|
+ info: {
|
|
|
+ type: Object,
|
|
|
+ default: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ id: '',
|
|
|
+ preList: [],
|
|
|
+ show: false,
|
|
|
+ fileList: [],
|
|
|
+ form: {},
|
|
|
+ data: [],
|
|
|
+ option: {
|
|
|
+ align: 'center',
|
|
|
+ menuAlign: 'center',
|
|
|
+ menuWidth: 250,
|
|
|
+ height: 480,
|
|
|
+ size: 'mini',
|
|
|
+ addBtn: true,
|
|
|
+ editBtn: true,
|
|
|
+ viewBtn: true,
|
|
|
+ delBtn: true,
|
|
|
+ refreshBtn: false,
|
|
|
+ columnBtn: false,
|
|
|
+ labelWidth: 240,
|
|
|
+ border: true,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '中央预算内投资',
|
|
|
+ prop: 'investmentOfCentralBudget',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '中央预算内投资',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '银行贷款',
|
|
|
+ prop: 'bankLoans',
|
|
|
+ type: 'number',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '银行贷款',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '专项债券资金',
|
|
|
+ prop: 'specialBondFunds',
|
|
|
+ type: 'number',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '专项债券资金',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '抗疫特别国债资金',
|
|
|
+ prop: 'antiEpidemicSpecialTreasuryBondFund',
|
|
|
+ type: 'number',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '抗疫特别国债资金',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '其他地方财政性建设基金',
|
|
|
+ prop: 'otherLocalFiscalConstructionFunds',
|
|
|
+ type: 'number',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '其他地方财政性建设基金',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '政策性开发金融工具(基金)投资',
|
|
|
+ prop: 'policyBasedDevelopmentFinancialInvestment',
|
|
|
+ type: 'number',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '政策性开发金融工具(基金)投资',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '省级预算内投资',
|
|
|
+ prop: 'investmentWithinProvincialBudget',
|
|
|
+ type: 'number',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '省级预算内投资',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '市级预算内投资',
|
|
|
+ prop: 'investmentWithinMunicipalBudget',
|
|
|
+ type: 'number',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '市级预算内投资',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '县级预算内投资',
|
|
|
+ prop: 'investmentWithinCountyLevelBudget',
|
|
|
+ type: 'number',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '县级预算内投资',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.id = this.$route.query.id
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onLoad() {
|
|
|
+ this.$api.funds.fundsList({ projectId: this.id }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.data = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ rowUpdate(row, index, done, loading) {
|
|
|
+ loading()
|
|
|
+ const data = Object.assign(this.form, { projectId: this.id })
|
|
|
+ this.$api.funds.fundsSaveOrUpdate(data).then(
|
|
|
+ res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ done(row)
|
|
|
+ this.onLoad()
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ window.console.log(error)
|
|
|
+ loading()
|
|
|
+ }
|
|
|
+ )
|
|
|
+ },
|
|
|
+ handleRowSave(row, done, loading) {
|
|
|
+ loading()
|
|
|
+ const data = Object.assign(row, { projectId: this.id })
|
|
|
+ this.$confirm('请检查并确认所填写内容是否正确!', {
|
|
|
+ type: 'warning'
|
|
|
+ }).then(res => {
|
|
|
+ if (res === 'confirm') {
|
|
|
+ this.$api.funds.fundsSaveOrUpdate(data).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ done(row)
|
|
|
+ this.onLoad()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ rowDel(row, index, done) {
|
|
|
+ this.$confirm('请确认是否删除该条资金信息?', {
|
|
|
+ type: 'warning'
|
|
|
+ }).then(res => {
|
|
|
+ if (res === 'confirm') {
|
|
|
+ this.$api.funds.fundsRemove({ ids: row.id }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ this.onLoad()
|
|
|
+ done(row)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.top {
|
|
|
+ height: 35px;
|
|
|
+ border-radius: var(--el-card-border-radius);
|
|
|
+ background-color: #f5f5f3;
|
|
|
+}
|
|
|
+</style>
|