|
@@ -52,7 +52,7 @@
|
|
|
</el-col>
|
|
|
<el-col
|
|
|
:xs="24"
|
|
|
- :sm="8"
|
|
|
+ :sm="4"
|
|
|
>
|
|
|
<el-date-picker
|
|
|
v-model="yearData"
|
|
@@ -63,6 +63,25 @@
|
|
|
@change="choiceYear"
|
|
|
/>
|
|
|
</el-col>
|
|
|
+ <el-col
|
|
|
+ :xs="24"
|
|
|
+ :sm="4"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="feeGenre"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ value-on-clear=""
|
|
|
+ @change="changeFeeGenre"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in feeGenreData"
|
|
|
+ :key="item.ID"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.ID"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
<el-col
|
|
|
:xs="24"
|
|
|
:sm="6"
|
|
@@ -79,19 +98,24 @@
|
|
|
:data="projectMonthFee"
|
|
|
max-height="400px"
|
|
|
height="400px"
|
|
|
+ show-summary
|
|
|
+ table-layout="auto"
|
|
|
>
|
|
|
<el-table-column
|
|
|
prop="projectFeeGenre.name"
|
|
|
label="费用类型"
|
|
|
width="200"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
prop="totalExpenditure"
|
|
|
label="支出金额"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
prop="totalDeposit"
|
|
|
label="支入金额"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
</el-table>
|
|
|
</el-col>
|
|
@@ -103,19 +127,24 @@
|
|
|
:data="monthFee"
|
|
|
max-height="400px"
|
|
|
height="400px"
|
|
|
+ table-layout="auto"
|
|
|
+ show-summary
|
|
|
>
|
|
|
<el-table-column
|
|
|
prop="department.name"
|
|
|
label="部门"
|
|
|
width="200"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
prop="totalExpenditure"
|
|
|
label="支出金额"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
prop="totalDeposit"
|
|
|
label="支入金额"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
</el-table>
|
|
|
</el-col>
|
|
@@ -131,6 +160,7 @@ import { ref, onMounted } from 'vue'
|
|
|
import { getAllProject, queryProjectSum } from '@/api/project'
|
|
|
import * as echarts from 'echarts'
|
|
|
import { queryMonthExpenses, queryProjectMonthFee } from '@/api/cost'
|
|
|
+import { queryExpensesGenre } from '@/api/finance'
|
|
|
|
|
|
let myChart = null
|
|
|
|
|
@@ -170,11 +200,13 @@ const initChart = () => {
|
|
|
const monthData = ref('')
|
|
|
const yearData = ref('')
|
|
|
const project1 = ref('')
|
|
|
+const feeGenre = ref('')
|
|
|
|
|
|
const projectSum = ref()
|
|
|
const projectMonthFee = ref()
|
|
|
const monthFee = ref()
|
|
|
const projectData = ref()
|
|
|
+const feeGenreData = ref()
|
|
|
|
|
|
const xData = ref([])
|
|
|
const queryData = async() => {
|
|
@@ -185,15 +217,18 @@ const queryData = async() => {
|
|
|
xData.value.push(projectSum.value[key])
|
|
|
}
|
|
|
})
|
|
|
- await queryProjectMonthFee(monthData.value, yearData.value).then(res => {
|
|
|
+ await queryProjectMonthFee(monthData.value, yearData.value, project1.value).then(res => {
|
|
|
projectMonthFee.value = res.data
|
|
|
})
|
|
|
- await queryMonthExpenses(monthData.value, yearData.value).then(res => {
|
|
|
+ await queryMonthExpenses(monthData.value, yearData.value, feeGenre.value).then(res => {
|
|
|
monthFee.value = res.data
|
|
|
})
|
|
|
await getAllProject().then(res => {
|
|
|
projectData.value = res.data
|
|
|
})
|
|
|
+ await queryExpensesGenre().then(res => {
|
|
|
+ feeGenreData.value = res.data
|
|
|
+ })
|
|
|
initChart()
|
|
|
}
|
|
|
|
|
@@ -211,6 +246,10 @@ const changeCode = () => {
|
|
|
queryData()
|
|
|
}
|
|
|
|
|
|
+const changeFeeGenre = () => {
|
|
|
+ queryData()
|
|
|
+}
|
|
|
+
|
|
|
const choiceMonth = () => {
|
|
|
yearData.value = ''
|
|
|
queryData()
|