master
xy 2 years ago
parent da4d344d59
commit 93f48bcc50

@ -43,3 +43,11 @@ export function carry (params) {
})
}
export function typeCarry (params) {
return request({
method: 'get',
url: '/api/admin/notice/type-carry',
params
})
}

@ -23,11 +23,12 @@ export function getparameter(param) {
})
}
export function getparameterTree(param) {
export function getparameterTree(param,noloading) {
return request({
url: '/api/admin/parameter/show-child',
method: 'get',
params: param
params: param,
noloading
})
}

@ -78,7 +78,7 @@
<div
style="width: 100%; height: 100%; padding-top: 50px; overflow-x: hidden"
>
<iframe ref="oldIframe" :src="oldUrl">你的浏览器不支持该iframe</iframe>
<iframe ref="oldIframe" style="width: 100%;" :src="oldUrl">你的浏览器不支持该iframe</iframe>
</div>
</template>
<!-- <template v-else-if="$route.path === '/goods'">-->

@ -4,6 +4,7 @@
<template>
<template v-if="isSign">
<el-button size="small" type="primary" icon="el-icon-plus" style="margin-bottom: 10px;" @click="isShowAddPlan = true">新增付款计划</el-button>
<p style="font-weight: 600;zoom: .9;color: red;">如需分期付款请分条填报付款计划</p>
</template>
<xy-table :height="300" :list="list" :table-item="table">
<template v-slot:btns>

@ -317,8 +317,8 @@ export default {
isShowPaymentRegistration: false,
paymentRegistrationForm: {
applyMoney: "",
deductionMoney: "",
audit_money: "",
//deductionMoney: "",
//audit_money: "",
type: "",
isLast: false,
plan: [],
@ -483,11 +483,13 @@ export default {
let data = {
contract_id: this.contract.id,
apply_money: this.paymentRegistrationForm.applyMoney,
discount_money: this.paymentRegistrationForm.deductionMoney,
discount_money: '',
//discount_money: this.paymentRegistrationForm.deductionMoney,
type: this.paymentRegistrationForm.type,
is_end: this.paymentRegistrationForm.isLast ? 1 : 0,
remark: this.paymentRegistrationForm.remark,
audit_money: this.paymentRegistrationForm.audit_money,
audit_money: '',
//audit_money: this.paymentRegistrationForm.audit_money,
files:this.fileList? this.fileList.map(i => i?.response?.id):[]
};
addFundLog(data).then((res) => {
@ -626,7 +628,7 @@ export default {
}
.xy-table-item-label {
width: 140px;
width: 200px;
}
.xy-table-item-price {

@ -2,23 +2,117 @@
<div>
<el-drawer
size="1050px"
size="800px"
title="执行统计"
:visible.sync="drawer"
direction="rtl">
<div style="padding: 0 10px;">
{{type}}
<div style="padding: 0 20px;">
<template v-if="type === 1">
<Card>
<el-checkbox :indeterminate="isIndeterminate"
v-model="checkAll"
@change="e => {
departmentSelect = e ? departments.map(i => (i.plan_department_id)) : [];
isIndeterminate = false;
}">全选</el-checkbox>
<el-checkbox-group v-model="departmentSelect"
size="small"
@change="e => {
let count = e.length;
checkAll = count === departments.length;
isIndeterminate = count > 0 && count < departments.length;
}">
<el-checkbox v-for="item in departments" :label="item.plan_department_id" :key="item.plan_department_id">{{item.plan_department ? item.plan_department.name : item.plan_department_id}}</el-checkbox>
</el-checkbox-group>
</Card>
<Card style="margin-top: 20px;">
<div class="content">
<div class="item">
<p class="item__title">年初预算合计金额</p>
<div class="item__value">{{totalMoneyTotal1.toFixed(2)}}</div>
</div>
<div class="item">
<p class="item__title">调整后预算合计金额</p>
<div class="item__value">{{totalMoneyTotal2.toFixed(2)}}</div>
</div>
<div class="item">
<p class="item__title">已使用</p>
<div class="item__value">{{totalUseMoneyTotal.toFixed(2)}}</div>
</div>
<div class="item">
<p class="item__title">执行情况</p>
<el-progress class="item__value" :percentage="totalPercent"></el-progress>
</div>
</div>
</Card>
</template>
<template v-else>
<Card>
<el-checkbox :indeterminate="isIndeterminate2"
v-model="checkAll2"
@change="e => {
typeSelect = e ? types.map(i => (i.id)) : [];
isIndeterminate = false;
}">全选</el-checkbox>
<el-checkbox-group v-model="typeSelect"
size="small"
@change="e => {
let count = e.length;
checkAll2 = count === types.length;
isIndeterminate2 = count > 0 && count < types.length;
}">
<el-checkbox v-for="item in types" :label="item.id" :key="item.id">{{item.name}}</el-checkbox>
</el-checkbox-group>
</Card>
<Card style="margin-top: 20px;">
<div class="content">
<div class="item">
<p class="item__title">年初预算合计金额</p>
<div class="item__value">{{totalMoneyTotal1Type.toFixed(2)}}</div>
</div>
<div class="item">
<p class="item__title">调整后预算合计金额</p>
<div class="item__value">{{totalMoneyTotal2Type.toFixed(2)}}</div>
</div>
<div class="item">
<p class="item__title">已使用</p>
<div class="item__value">{{totalUseMoneyTotalType.toFixed(2)}}</div>
</div>
<div class="item">
<p class="item__title">执行情况</p>
<el-progress class="item__value" :percentage="totalPercent"></el-progress>
</div>
</div>
</Card>
</template>
</div>
</el-drawer>
</div>
</template>
<script>
import { typeCarry } from "@/api/dashboard/notice"
export default {
props: {
departments: Array,
year: [Number,String]
},
data() {
return {
type: 1,//12
drawer: false
drawer: false,
isIndeterminate: false,
checkAll: false,
departmentSelect: [],
isIndeterminate2: false,
checkAll2: false,
types: [],
typeSelect: [],
}
},
methods: {
@ -29,13 +123,91 @@ export default {
this.drawer = false
},
setType (type) {
console.log(type)
this.type = type
}
},
computed: {}
computed: {
selectedDepartments () {
return this.departments.filter(i => this.departmentSelect.find(j => j === i.plan_department_id))
},
totalMoneyTotal1 () {
return this.selectedDepartments.reduce((pre,cur)=>(pre+Number(cur.money_total_1||0)),0) || 0
},
totalMoneyTotal2 () {
return this.selectedDepartments.reduce((pre,cur)=>(pre+Number(cur.money_total_2||0)),0) || 0
},
totalUseMoneyTotal () {
return this.selectedDepartments.reduce((pre,cur)=>(pre+Number(cur.use_money_total||0)),0) || 0
},
totalPercent () {
if (this.type === 1) {
return (Number(this.totalMoneyTotal2 !== 0) ? (Math.round(Number(this.totalUseMoneyTotal) / Number(this.totalMoneyTotal2) * 10000)/100) : (Math.round(Number(this.totalUseMoneyTotal) / Number(this.totalMoneyTotal1) * 10000)/100)) || 0
} else {
return (Number(this.totalMoneyTotal2Type !== 0) ? (Math.round(Number(this.totalUseMoneyTotalType) / Number(this.totalMoneyTotal2Type) * 10000)/100) : (Math.round(Number(this.totalUseMoneyTotalType) / Number(this.totalMoneyTotal1Type) * 10000)/100)) || 0
}
},
selectedTypes () {
return this.types.filter(i => this.typeSelect.find(j => j === i.id))
},
totalMoneyTotal1Type () {
return this.selectedTypes.reduce((pre,cur)=>(pre+Number(cur.money_total||0)),0) || 0
},
totalMoneyTotal2Type () {
return this.selectedTypes.reduce((pre,cur)=>(pre+Number(cur.update_money||0)),0) || 0
},
totalUseMoneyTotalType () {
return this.selectedTypes.reduce((pre,cur)=>(pre+Number(cur.use_money_total||0)),0) || 0
},
},
watch: {
year: {
handler:function(val) {
typeCarry({
year: val
}).then(res => {
this.types = res
console.log(res)
})
},
immediate: true
}
}
}
</script>
<style scoped lang="scss">
.content {
padding: 0 20px;
.item {
display: flex;
padding: 10px 0;
&__title {
width: 200px;
font-weight: 600;
padding-right: 20px;
}
&__value {
flex: 1;
}
& + & {
margin-top: 20px;
}
}
}
::v-deep .el-checkbox {
display: block;
margin-bottom: 6px;
}
::v-deep .el-checkbox-group {
max-height: 300px;
overflow-y: scroll;
margin-left: 20px;
}
</style>

@ -300,7 +300,7 @@
<budgetStatic ref="budgetStatic"></budgetStatic>
<carryStatic ref="carryStatic"></carryStatic>
<carryStatic ref="carryStatic" :departments="statistic.departmentList" :year="select.year"></carryStatic>
</div>
</template>
@ -340,7 +340,9 @@ export default {
month: this.$moment().format('YYYY-MM')
},
lineChartData: {},
statistic: "",
statistic: {
departmentList: []
},
department_id: [],
userIds: [],
list: [],
@ -508,7 +510,6 @@ export default {
async getCarry () {
const res = await carry(this.carrySelect);
this.lineChartData = {
//legendArr: [`${this.carrySelect.month}`,`${this.carrySelect.month}`,`${this.$moment(this.carrySelect.month).add(1,'months').format('YYYY-MM')}`],
rotate: 54,
xArr: res?.map(i => i.plan_department?.name),
series: [
@ -519,6 +520,9 @@ export default {
emphasis: {
focus: 'series'
},
itemStyle: {
color: '#4d8bdc'
},
data: res?.map(i => {
const { use_money_total,money_total_1 } = i
return Math.round((Number(use_money_total||0) / Number(money_total_1||0)) * 10000) / 100
@ -531,6 +535,9 @@ export default {
emphasis: {
focus: 'series'
},
itemStyle: {
color: '#7ab384'
},
data: res?.map(i => {
const { use_money_total,money_total_2 } = i
return Math.round((Number(use_money_total||0) / Number(money_total_2||0)) * 10000) / 100
@ -543,6 +550,9 @@ export default {
emphasis: {
focus: 'series'
},
itemStyle: {
color: '#f7cb56'
},
data: res?.map(i => {
const { use_money_total_next,money_total } = i
return Math.round((Number(use_money_total_next||0) / Number(money_total||0)) * 10000) / 100

Loading…
Cancel
Save