|
|
|
@ -69,7 +69,7 @@
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 右侧预算执行情况 -->
|
|
|
|
<!-- 右侧预算执行情况 -->
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="authShowStatic ? 11 : 12">
|
|
|
|
<el-card class="box-card top-card">
|
|
|
|
<el-card class="box-card top-card">
|
|
|
|
<div slot="header" class="card-header">
|
|
|
|
<div slot="header" class="card-header">
|
|
|
|
<div class="header-left">
|
|
|
|
<div class="header-left">
|
|
|
|
@ -205,6 +205,35 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 统计按钮区域 -->
|
|
|
|
|
|
|
|
<el-col v-if="authShowStatic" :span="1">
|
|
|
|
|
|
|
|
<div style="display: flex;flex-direction: column;height: 280px;padding-top: 20px;">
|
|
|
|
|
|
|
|
<div class="show-static-btn" @click="$refs['budgetStatic'].show()">
|
|
|
|
|
|
|
|
统计查看
|
|
|
|
|
|
|
|
<i class="el-icon-d-arrow-left"></i>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="show-static-btn"
|
|
|
|
|
|
|
|
@click="$confirm('选择统计的数据类型','提示',{
|
|
|
|
|
|
|
|
confirmButtonText: '预算类型',
|
|
|
|
|
|
|
|
cancelButtonText: '部门科室',
|
|
|
|
|
|
|
|
showClose: false,
|
|
|
|
|
|
|
|
callback:(action, instance) => {
|
|
|
|
|
|
|
|
if (action === 'cancel') {
|
|
|
|
|
|
|
|
$refs['carryStatic'].setType(1)
|
|
|
|
|
|
|
|
$refs['carryStatic'].show()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (action === 'confirm') {
|
|
|
|
|
|
|
|
$refs['carryStatic'].setType(2)
|
|
|
|
|
|
|
|
$refs['carryStatic'].show()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})">
|
|
|
|
|
|
|
|
执行统计
|
|
|
|
|
|
|
|
<i class="el-icon-d-arrow-left"></i>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 合同签订统计表 -->
|
|
|
|
<!-- 合同签订统计表 -->
|
|
|
|
@ -227,7 +256,7 @@
|
|
|
|
style="width: 100%"
|
|
|
|
style="width: 100%"
|
|
|
|
show-summary
|
|
|
|
show-summary
|
|
|
|
:summary-method="getSummaries"
|
|
|
|
:summary-method="getSummaries"
|
|
|
|
:max-height="300"
|
|
|
|
:max-height="400"
|
|
|
|
:header-cell-style="{
|
|
|
|
:header-cell-style="{
|
|
|
|
background: '#fafafa',
|
|
|
|
background: '#fafafa',
|
|
|
|
color: '#606266',
|
|
|
|
color: '#606266',
|
|
|
|
@ -246,20 +275,24 @@
|
|
|
|
width="120"
|
|
|
|
width="120"
|
|
|
|
align="center"
|
|
|
|
align="center"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<el-table-column label="政府采购" align="center">
|
|
|
|
|
|
|
|
<el-table-column prop="gov_goods" label="货物" align="center" />
|
|
|
|
|
|
|
|
<el-table-column prop="gov_service" label="服务" align="center" />
|
|
|
|
|
|
|
|
<el-table-column prop="gov_project" label="工程" align="center" />
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="小型项目" align="center">
|
|
|
|
|
|
|
|
<el-table-column prop="small_goods" label="货物" align="center" />
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column
|
|
|
|
prop="small_service"
|
|
|
|
v-for="purchaseTypeItem in purchaseType"
|
|
|
|
|
|
|
|
:key="purchaseTypeItem.id || purchaseTypeItem.value"
|
|
|
|
|
|
|
|
:label="purchaseTypeItem.value"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
:prop="`purchase_${purchaseTypeItem.id}_type_2`"
|
|
|
|
|
|
|
|
label="货物"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
:prop="`purchase_${purchaseTypeItem.id}_type_1`"
|
|
|
|
label="服务"
|
|
|
|
label="服务"
|
|
|
|
align="center"
|
|
|
|
align="center"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column
|
|
|
|
prop="small_project"
|
|
|
|
:prop="`purchase_${purchaseTypeItem.id}_type_3`"
|
|
|
|
label="工程"
|
|
|
|
label="工程"
|
|
|
|
align="center"
|
|
|
|
align="center"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
@ -281,6 +314,88 @@
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 合同到期待办清单 -->
|
|
|
|
|
|
|
|
<el-row :gutter="20" style="margin-top: 20px">
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<el-card class="box-card">
|
|
|
|
|
|
|
|
<div slot="header" class="card-header">
|
|
|
|
|
|
|
|
<div class="header-left">
|
|
|
|
|
|
|
|
<i
|
|
|
|
|
|
|
|
class="el-icon-check"
|
|
|
|
|
|
|
|
style="color: #409eff; margin-right: 5px"
|
|
|
|
|
|
|
|
></i>
|
|
|
|
|
|
|
|
<span>合同到期待办清单</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="header-right">
|
|
|
|
|
|
|
|
<i class="el-icon-more"></i>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
|
|
:data="contractDueList"
|
|
|
|
|
|
|
|
border
|
|
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
|
|
:max-height="400"
|
|
|
|
|
|
|
|
:header-cell-style="{
|
|
|
|
|
|
|
|
background: '#fafafa',
|
|
|
|
|
|
|
|
color: '#606266',
|
|
|
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
|
|
|
}"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="序号"
|
|
|
|
|
|
|
|
type="index"
|
|
|
|
|
|
|
|
width="60"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="name"
|
|
|
|
|
|
|
|
label="合同名称"
|
|
|
|
|
|
|
|
width="280"
|
|
|
|
|
|
|
|
align="left"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="money"
|
|
|
|
|
|
|
|
label="合同金额"
|
|
|
|
|
|
|
|
width="160"
|
|
|
|
|
|
|
|
align="right"
|
|
|
|
|
|
|
|
:formatter="formatMoneyWithSymbol"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="fund_log_total"
|
|
|
|
|
|
|
|
label="已付金额"
|
|
|
|
|
|
|
|
width="160"
|
|
|
|
|
|
|
|
align="right"
|
|
|
|
|
|
|
|
:formatter="formatMoneyWithSymbol"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="supply"
|
|
|
|
|
|
|
|
label="承包商/供货商"
|
|
|
|
|
|
|
|
min-width="160"
|
|
|
|
|
|
|
|
align="left"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="服务时间"
|
|
|
|
|
|
|
|
width="240"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template slot-scope="{ row }">
|
|
|
|
|
|
|
|
<span v-if="row.start_date && row.end_date">
|
|
|
|
|
|
|
|
{{ formatDate(row.start_date) }} 至 {{ formatDate(row.end_date) }}
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span v-else>-</span>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="department.name"
|
|
|
|
|
|
|
|
label="部门"
|
|
|
|
|
|
|
|
width="160"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 四个区块 -->
|
|
|
|
<!-- 四个区块 -->
|
|
|
|
<el-row :gutter="20" style="margin-top: 20px">
|
|
|
|
<el-row :gutter="20" style="margin-top: 20px">
|
|
|
|
<!-- 科室执行情况 -->
|
|
|
|
<!-- 科室执行情况 -->
|
|
|
|
@ -398,6 +513,7 @@
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
@change="handleMonthChange"
|
|
|
|
@change="handleMonthChange"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-button type="primary" size="small" @click="goDepPlanMoney">部门预算计划金额</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
@ -408,6 +524,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 合同详情弹窗 -->
|
|
|
|
<!-- 合同详情弹窗 -->
|
|
|
|
<detailContract ref="detailContract"></detailContract>
|
|
|
|
<detailContract ref="detailContract"></detailContract>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 统计组件 -->
|
|
|
|
|
|
|
|
<budgetStatic ref="budgetStatic"></budgetStatic>
|
|
|
|
|
|
|
|
<carryStatic ref="carryStatic" :departments="statistic.departmentList" :year="currentYear"></carryStatic>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
@ -415,15 +535,19 @@
|
|
|
|
import { parseTime, moneyFormatter } from "@/utils/index";
|
|
|
|
import { parseTime, moneyFormatter } from "@/utils/index";
|
|
|
|
import { Message } from "element-ui";
|
|
|
|
import { Message } from "element-ui";
|
|
|
|
import * as echarts from "echarts";
|
|
|
|
import * as echarts from "echarts";
|
|
|
|
import { getNotice, readNotice, statistic, carry,contractDetailDepartment } from "@/api/dashboard/notice";
|
|
|
|
import { getNotice, readNotice, statistic, carry, contractDetailDepartment, nopayTotal } from "@/api/dashboard/notice";
|
|
|
|
import detailContract from "@/views/contract/components/detailContract";
|
|
|
|
import detailContract from "@/views/contract/components/detailContract";
|
|
|
|
import lineChart from '@/views/dashboard/components/LineChart.vue';
|
|
|
|
import lineChart from '@/views/dashboard/components/LineChart.vue';
|
|
|
|
|
|
|
|
import budgetStatic from '@/views/dashboard/components/budgetStatic.vue';
|
|
|
|
|
|
|
|
import carryStatic from '@/views/dashboard/components/carryStatic.vue';
|
|
|
|
|
|
|
|
import { getparameter } from '@/api/system/dictionary'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Dashboard",
|
|
|
|
name: "Dashboard",
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
detailContract,
|
|
|
|
detailContract,
|
|
|
|
lineChart
|
|
|
|
lineChart,
|
|
|
|
|
|
|
|
budgetStatic,
|
|
|
|
|
|
|
|
carryStatic
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
@ -444,52 +568,11 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 合同统计
|
|
|
|
// 合同统计
|
|
|
|
contractStats: [
|
|
|
|
purchaseType: [],
|
|
|
|
{
|
|
|
|
contractStats: [],
|
|
|
|
department: "行政科室",
|
|
|
|
|
|
|
|
gov_goods: 1,
|
|
|
|
// 合同到期待办清单
|
|
|
|
gov_service: 1,
|
|
|
|
contractDueList: [],
|
|
|
|
gov_project: 1,
|
|
|
|
|
|
|
|
small_goods: 1,
|
|
|
|
|
|
|
|
small_service: 1,
|
|
|
|
|
|
|
|
small_project: 1,
|
|
|
|
|
|
|
|
month_total: 1,
|
|
|
|
|
|
|
|
year_total: 1,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
department: "质量保证科室",
|
|
|
|
|
|
|
|
gov_goods: 5,
|
|
|
|
|
|
|
|
gov_service: 5,
|
|
|
|
|
|
|
|
gov_project: 5,
|
|
|
|
|
|
|
|
small_goods: 5,
|
|
|
|
|
|
|
|
small_service: 5,
|
|
|
|
|
|
|
|
small_project: 5,
|
|
|
|
|
|
|
|
month_total: 5,
|
|
|
|
|
|
|
|
year_total: 5,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
department: "水环境监测科",
|
|
|
|
|
|
|
|
gov_goods: 1,
|
|
|
|
|
|
|
|
gov_service: 1,
|
|
|
|
|
|
|
|
gov_project: 1,
|
|
|
|
|
|
|
|
small_goods: 1,
|
|
|
|
|
|
|
|
small_service: 1,
|
|
|
|
|
|
|
|
small_project: 1,
|
|
|
|
|
|
|
|
month_total: 1,
|
|
|
|
|
|
|
|
year_total: 1,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
department: "大气环境监测科",
|
|
|
|
|
|
|
|
gov_goods: 3,
|
|
|
|
|
|
|
|
gov_service: 3,
|
|
|
|
|
|
|
|
gov_project: 3,
|
|
|
|
|
|
|
|
small_goods: 3,
|
|
|
|
|
|
|
|
small_service: 3,
|
|
|
|
|
|
|
|
small_project: 3,
|
|
|
|
|
|
|
|
month_total: 3,
|
|
|
|
|
|
|
|
year_total: 3,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 项目支出
|
|
|
|
// 项目支出
|
|
|
|
|
|
|
|
|
|
|
|
@ -607,14 +690,25 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
computed: {},
|
|
|
|
computed: {
|
|
|
|
|
|
|
|
allowAuth() {
|
|
|
|
|
|
|
|
return this.$store.state.user.min_allow_level !== 2;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
authShowStatic() {
|
|
|
|
|
|
|
|
return this.$store.state.user.myroles?.find(i => i.name === "首页统计");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.currentYear = new Date().getFullYear().toString();
|
|
|
|
this.currentYear = new Date().getFullYear().toString();
|
|
|
|
|
|
|
|
this.getContractSignDimension().then(() => {
|
|
|
|
|
|
|
|
this.getContractDetailDepartment();
|
|
|
|
|
|
|
|
});
|
|
|
|
this.getNotices();
|
|
|
|
this.getNotices();
|
|
|
|
this.getStatistic();
|
|
|
|
this.getStatistic();
|
|
|
|
this.getCarry();
|
|
|
|
this.getCarry();
|
|
|
|
this.getContractDetailDepartment()
|
|
|
|
this.getContractDueList();
|
|
|
|
|
|
|
|
this.getNopayTotal();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
@ -622,6 +716,20 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
// 跳转部门预算计划金额
|
|
|
|
|
|
|
|
goDepPlanMoney() {
|
|
|
|
|
|
|
|
this.$router.push('/contract/departmentPlanMoney/index');
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 获取未支付合计
|
|
|
|
|
|
|
|
async getNopayTotal() {
|
|
|
|
|
|
|
|
const res = await nopayTotal();
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 获取合同签订统计 维度
|
|
|
|
|
|
|
|
async getContractSignDimension() {
|
|
|
|
|
|
|
|
const res = await getparameter({ number: 'purchase_type' });
|
|
|
|
|
|
|
|
this.purchaseType = res?.detail || [];
|
|
|
|
|
|
|
|
},
|
|
|
|
// 格式化金额
|
|
|
|
// 格式化金额
|
|
|
|
formatMoney(amount) {
|
|
|
|
formatMoney(amount) {
|
|
|
|
if (!amount) return "0.00";
|
|
|
|
if (!amount) return "0.00";
|
|
|
|
@ -638,6 +746,24 @@ export default {
|
|
|
|
return parseTime(new Date(cellValue), "{y}-{m}-{d}");
|
|
|
|
return parseTime(new Date(cellValue), "{y}-{m}-{d}");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 格式化日期
|
|
|
|
|
|
|
|
formatDate(date) {
|
|
|
|
|
|
|
|
if (!date) return '';
|
|
|
|
|
|
|
|
return parseTime(new Date(date), "{y}-{m}-{d}");
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 格式化金额(带¥符号和千分位)
|
|
|
|
|
|
|
|
formatMoneyWithSymbol(row, column, cellValue) {
|
|
|
|
|
|
|
|
if (cellValue === null || cellValue === undefined || cellValue === '') {
|
|
|
|
|
|
|
|
return '¥ 0';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const value = Number(cellValue);
|
|
|
|
|
|
|
|
if (isNaN(value)) {
|
|
|
|
|
|
|
|
return '¥ 0';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 类型格式化
|
|
|
|
// 类型格式化
|
|
|
|
typeFormatter(row, column, cellValue) {
|
|
|
|
typeFormatter(row, column, cellValue) {
|
|
|
|
return cellValue === 1 ? "合同流程" : "付款计划";
|
|
|
|
return cellValue === 1 ? "合同流程" : "付款计划";
|
|
|
|
@ -717,13 +843,62 @@ export default {
|
|
|
|
Message.error("标记已读失败");
|
|
|
|
Message.error("标记已读失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 合同签订
|
|
|
|
// 合同签订统计
|
|
|
|
async getContractDetailDepartment(row) {
|
|
|
|
async getContractDetailDepartment() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const res = await contractDetailDepartment();
|
|
|
|
const res = await contractDetailDepartment();
|
|
|
|
console.log(res);
|
|
|
|
const data = res?.data || res || [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 按 sortnumber 从小到大排序
|
|
|
|
|
|
|
|
const sortedData = data.sort((a, b) => {
|
|
|
|
|
|
|
|
const sortA = a.sortnumber || 0;
|
|
|
|
|
|
|
|
const sortB = b.sortnumber || 0;
|
|
|
|
|
|
|
|
return sortA - sortB;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 转换为表格数据格式
|
|
|
|
|
|
|
|
this.contractStats = sortedData.map(item => {
|
|
|
|
|
|
|
|
const rowData = {
|
|
|
|
|
|
|
|
department: item.name || '',
|
|
|
|
|
|
|
|
month_total: item.month_total || 0,
|
|
|
|
|
|
|
|
year_total: item.year_total || 0
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理采购类型数据
|
|
|
|
|
|
|
|
if (item.purchase_type_list && Array.isArray(item.purchase_type_list)) {
|
|
|
|
|
|
|
|
item.purchase_type_list.forEach(purchaseType => {
|
|
|
|
|
|
|
|
const purchaseTypeId = purchaseType.id;
|
|
|
|
|
|
|
|
// 货物 (type 2)
|
|
|
|
|
|
|
|
rowData[`purchase_${purchaseTypeId}_type_2`] = purchaseType.huowu_total || 0;
|
|
|
|
|
|
|
|
// 服务 (type 1)
|
|
|
|
|
|
|
|
rowData[`purchase_${purchaseTypeId}_type_1`] = purchaseType.fuwu_total || 0;
|
|
|
|
|
|
|
|
// 工程 (type 3)
|
|
|
|
|
|
|
|
rowData[`purchase_${purchaseTypeId}_type_3`] = purchaseType.gongcheng_total || 0;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return rowData;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
|
|
console.error("获取合同签订统计失败:", error);
|
|
|
|
|
|
|
|
Message.error("获取合同签订统计失败");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 获取合同到期待办清单
|
|
|
|
|
|
|
|
async getContractDueList() {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
const res = await nopayTotal();
|
|
|
|
|
|
|
|
const data = res?.data || res || [];
|
|
|
|
|
|
|
|
this.contractDueList = data
|
|
|
|
|
|
|
|
.filter((i) => i.money != 0)
|
|
|
|
|
|
|
|
.sort((a, b) => {
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
new Date(a.end_date).getTime() - new Date(b.end_date).getTime()
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
});
|
|
|
|
} catch (error) {
|
|
|
|
} catch (error) {
|
|
|
|
console.error("获取合同签订失败:", error);
|
|
|
|
console.error("获取合同到期待办清单失败:", error);
|
|
|
|
|
|
|
|
Message.error("获取合同到期待办清单失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表格合计
|
|
|
|
// 表格合计
|
|
|
|
@ -1577,4 +1752,34 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 统计按钮样式
|
|
|
|
|
|
|
|
.show-static-btn {
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
background: #4d8bdc;
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
border: 1px solid #EBEEF5;
|
|
|
|
|
|
|
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
|
|
transition: all .2s;
|
|
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
& + & {
|
|
|
|
|
|
|
|
background: darkorange;
|
|
|
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
|
|
transform: scale(1.05, 1.05);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|