|
|
@@ -5,7 +5,7 @@
|
|
|
:edit-btn="true"
|
|
|
@edit="change"
|
|
|
@save="save"
|
|
|
- @on-load="getFundsList(this.type)"
|
|
|
+ @on-load="getFundsList"
|
|
|
>
|
|
|
<div
|
|
|
class="full-width text-right main-color pointer"
|
|
|
@@ -19,12 +19,14 @@
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
<div style="display: flex; align-items: center">
|
|
|
- <el-button-group>
|
|
|
- <el-button type="primary" @click="getFundsList(1)">到位资金</el-button>
|
|
|
- <el-button type="primary" @click="getFundsList(2)"
|
|
|
- >筹措资金<i class="el-icon-arrow-right el-icon--right"></i
|
|
|
- ></el-button>
|
|
|
- </el-button-group>
|
|
|
+ <el-tabs
|
|
|
+ v-model="type"
|
|
|
+ class="ml-20 demo-tabs"
|
|
|
+ @tab-change="getFundsList"
|
|
|
+ >
|
|
|
+ <el-tab-pane label="到位资金" name="1"></el-tab-pane>
|
|
|
+ <el-tab-pane label="筹措资金" name="2"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
<div style="margin-left: 20px">
|
|
|
* 点击对应按钮,查看到位资金、筹措资金详情
|
|
|
</div>
|
|
|
@@ -138,7 +140,6 @@
|
|
|
</el-form>
|
|
|
</wt-card>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
import wtCard from '@/components/wt-card/index.vue'
|
|
|
import info from '@/views/funds/component/info.vue'
|
|
|
@@ -158,8 +159,8 @@ export default {
|
|
|
watch: {
|
|
|
projectId: {
|
|
|
handler(val) {
|
|
|
- if (val.length > 0) {
|
|
|
- this.getFundsList(1)
|
|
|
+ if (this.type === '1') {
|
|
|
+ this.getFundsList()
|
|
|
}
|
|
|
},
|
|
|
immediate: true
|
|
|
@@ -167,12 +168,12 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- canUpdate: false,
|
|
|
+ canUpdate: true,
|
|
|
show: false,
|
|
|
styleObject: {
|
|
|
visibility: 'visible'
|
|
|
},
|
|
|
- type: 1,
|
|
|
+ type: '1',
|
|
|
disabled: true,
|
|
|
data: {},
|
|
|
totalZC: 0,
|
|
|
@@ -189,8 +190,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getFundsList(type) {
|
|
|
- if (type === 1) {
|
|
|
+ getFundsList() {
|
|
|
+ if (this.type === '1') {
|
|
|
this.disabled = true
|
|
|
} else {
|
|
|
if (this.canUpdate) {
|
|
|
@@ -200,7 +201,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- this.type = type
|
|
|
this.totalDF = 0
|
|
|
this.totalZC = 0
|
|
|
this.t1 = 0
|
|
|
@@ -212,16 +212,16 @@ export default {
|
|
|
this.t7 = 0
|
|
|
this.t8 = 0
|
|
|
this.t9 = 0
|
|
|
- if (type === 2) {
|
|
|
+ if (this.type === '2') {
|
|
|
this.styleObject.visibility = 'hidden'
|
|
|
} else {
|
|
|
this.styleObject.visibility = 'visible'
|
|
|
}
|
|
|
this.$api.funds
|
|
|
- .fundsList({ projectId: this.projectId, type: type })
|
|
|
+ .fundsList({ projectId: this.projectId, type: this.type })
|
|
|
.then(res => {
|
|
|
if (res.code === 200) {
|
|
|
- if (type === 1) {
|
|
|
+ if (this.type === '1') {
|
|
|
res.data.forEach(item => {
|
|
|
this.t1 = this.t1 + (item.investmentOfCentralBudget - 0)
|
|
|
this.t2 = this.t2 + (item.bankLoans - 0)
|
|
|
@@ -283,10 +283,11 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
save() {
|
|
|
- if (this.type == 2) {
|
|
|
+ if (this.type === '2') {
|
|
|
this.$api.funds.fundsSaveOrUpdate(this.data).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message.success(res.msg)
|
|
|
+ this.getFundsList()
|
|
|
} else {
|
|
|
this.$message.error(res.msg)
|
|
|
}
|
|
|
@@ -297,7 +298,7 @@ export default {
|
|
|
},
|
|
|
change(res) {
|
|
|
this.canUpdate = res
|
|
|
- if (this.type === 2) {
|
|
|
+ if (this.type === '2') {
|
|
|
this.disabled = res
|
|
|
}
|
|
|
},
|
|
|
@@ -339,4 +340,10 @@ export default {
|
|
|
.input {
|
|
|
width: 50%;
|
|
|
}
|
|
|
+.demo-tabs > .el-tabs__content {
|
|
|
+ padding: 32px;
|
|
|
+ color: #6b778c;
|
|
|
+ font-size: 32px;
|
|
|
+ font-weight: 600;
|
|
|
+}
|
|
|
</style>
|