预算付款计划查看显示

master
xy 1 year ago
parent cd138195ed
commit a654df2522

@ -2,10 +2,10 @@
ENV = 'development'
# base api
VUE_APP_DOMIAN=http://192.168.60.99:9003/
#VUE_APP_DOMIAN=http://hdcontract.ali251.langye.net/
#VUE_APP_DOMIAN=http://192.168.60.99:9003/
VUE_APP_DOMIAN=http://192.168.60.99:8003/
VUE_APP_BASE_API = ''
VUE_APP_UPLOAD=http://hdcontract.ali251.langye.net/api/admin/upload-file
VUE_APP_UPLOAD=http://192.168.60.99:8003/api/admin/upload-file
#VUE_APP_UPLOAD=http://192.168.60.99:9003/api/admin/upload-file
VUE_APP_OUT_URL = http://192.168.60.18:2021

@ -1,6 +1,7 @@
<template>
<div>
<xy-dialog
:width="64"
ref="dialog"
:is-show.sync="isShow"
type="form"
@ -11,15 +12,45 @@
>
<template v-slot:plan_id>
<div class="xy-table-item">
<div class="xy-table-item-label">项目 </div>
<div class="xy-table-item-label">隶属项目 </div>
<div class="xy-table-item-content">
<el-input
readonly
:value="rowName"
clearable
placeholder="请输入项目"
style="width: 300px"
></el-input>
{{ plan.pid_info_name }}
</div>
</div>
<div class="xy-table-item">
<div class="xy-table-item-label">项目名称 </div>
<div class="xy-table-item-content">
{{ plan.name }}
</div>
</div>
<div class="xy-table-item">
<div class="xy-table-item-label">预算类型 </div>
<div class="xy-table-item-content">
{{ types.find(i => i.id === plan.type) ? types.find(i => i.id === plan.type).value : '' }}
</div>
</div>
<div class="xy-table-item">
<div class="xy-table-item-label">所属年份 </div>
<div class="xy-table-item-content">
{{ plan.year }}
</div>
</div>
<div class="xy-table-item">
<div class="xy-table-item-label">年初预算金额 </div>
<div class="xy-table-item-content">
{{ isNaN(Number(plan.money)) ? '0.00' : Number(plan.money).toFixed(2) }}
</div>
</div>
<div class="xy-table-item">
<div class="xy-table-item-label">调整后预算金额 </div>
<div class="xy-table-item-content">
{{ isNaN(Number(plan.update_money)) ? '0.00' : Number(plan.update_money).toFixed(2) }}
</div>
</div>
<div class="xy-table-item">
<div class="xy-table-item-label">描述 </div>
<div class="xy-table-item-content">
{{ plan.content }}
</div>
</div>
</template>
@ -56,7 +87,9 @@
import { paidSave, paidIndex, paidStore, paidDestroy } from "@/api/budget/budget"
import { statistic } from "@/api/dashboard/notice";
export default {
props: {},
props: {
types: Array
},
data() {
return {
rowType: "",
@ -67,6 +100,23 @@ export default {
type: "",
itemTable: [
{
width: 200,
label: "占比",
sortable: false,
customFn: row => {
row._total = this.formList.reduce((pre, cur) => {
if (cur.paid_plan_date === row.paid_plan_date) {
return pre + (isNaN(Number(cur.paid_money)) ? 0 : Number(cur.paid_money))
} else {
return pre
}
},0)
return (
<el-progress percentage={(isNaN(Number(row.paid_money)) || row._total === 0) ? 0 : Math.round((Number(row.paid_money) / row._total * 100)*100)/100 }></el-progress>
)
}
},
{
prop: "paid_money",
label: "付款金额",
@ -150,43 +200,57 @@ export default {
sortable: false,
customFn: (row, scope) => {
return (
<Poptip
confirm={true}
transfer={true}
placement="bottom"
title="确认要删除吗"
on={{
["on-ok"]: (_) => {
if (!row.id) {
this.formList.splice(scope.$index, 1);
} else {
paidDestroy({
id: row.id
}).then(res => {
this.$message({
type: 'success',
message: '删除成功'
<div>
<Poptip
confirm={true}
transfer={true}
placement="bottom"
title="确认要删除吗"
on={{
["on-ok"]: (_) => {
if (!row.id) {
this.formList.splice(scope.$index, 1);
} else {
paidDestroy({
id: row.id
}).then(res => {
this.$message({
type: 'success',
message: '删除成功'
})
this.getDetail();
})
this.getDetail();
})
}
},
}}
>
<Button
}
},
}}
>
<Button
style="margin-left: 4px;"
ghost
size="small"
type="error"
>
删除
</Button>
</Poptip>
{
/*
<Button
style="margin-left: 4px;"
ghost
size="small"
type="error"
type="primary"
>
删除
确认
</Button>
</Poptip>
*/
}
</div>
);
},
},
],
rowName: "",
plan: {},
formList: [],
editId: [],
form: {
@ -338,7 +402,6 @@ export default {
this.typeList = arr;
}
//this.split = Array.from({ length: Math.ceil(this.typeList/2) },() => 0.5)
console.log(123, this.typeList);
},
},
watch: {
@ -368,8 +431,13 @@ export default {
::v-deep .el-input__inner {
text-align: left;
}
::v-deep .el-progress {
white-space: nowrap;
}
.xy-table-item-label {
width: 150px;
width: 200px;
font-weight: 600;
text-align: right;
}
.select {

@ -43,7 +43,7 @@
<template v-slot:btns>
<el-table-column header-align="center" align="left" :width="130" label="操作" >
<template #default="{ row }">
<Button size="small" type="primary" @click="$refs['payPlan'].rowType = row.type,$refs['payPlan'].plan_department_id = row.plan_department_id,$refs['payPlan'].rowName = row.name,$refs['payPlan'].setId(row.id),$refs['payPlan'].show()">付款计划</Button>
<Button size="small" type="primary" @click="$refs['payPlan'].rowType = row.type,$refs['payPlan'].plan_department_id = row.plan_department_id,$refs['payPlan'].plan = row,$refs['payPlan'].setId(row.id),$refs['payPlan'].show()">付款计划</Button>
</template>
</el-table-column>
</template>
@ -53,7 +53,7 @@
<Page :total="total" show-elevator @on-change="pageChange" show-sizer @on-page-size-change="pageSizeChange" />
</div>
<payPlan ref="payPlan"></payPlan>
<payPlan ref="payPlan" :types="types"></payPlan>
</div>
</template>

@ -43,7 +43,7 @@
</span>
<i-switch size="large" style="margin-left: 12px;" v-model="switch1" @on-change="pageChange" >
<span slot="open">分页</span>
<span slot="close">不分</span>
<span slot="close">不分</span>
</i-switch>
<Button
type="primary"
@ -122,13 +122,13 @@ export default {
},
data() {
return {
switch1: true,//
switch1: false,//
type: -1, //01
departments: [],
select: {
department_id: "",
page: 1,
page_size: 10,
page_size: 9999,
keyword: "",
year:"",
is_auth: 1
@ -280,6 +280,9 @@ export default {
methods: {
pageChange (e) {
this.select.page_size = e ? 10 : 9999;
if (!e) {
this.select.page = 1;
}
this.getList();
},
@ -299,6 +302,20 @@ export default {
async getList() {
const res = await index(this.select);
this.total = res.total;
if (!this.switch1) {
res.data.sort((a, b) => {
let aNums = 0 ,bNums = 0;
a.public_act_date ? "" : aNums++;
a.invite_act_date ? "" : aNums++;
a.open_act_date ? "" : aNums++;
b.public_act_date ? "" : bNums++;
b.invite_act_date ? "" : bNums++;
b.open_act_date ? "" : bNums++;
return bNums - aNums;
})
}
this.list = res.data;
},

Loading…
Cancel
Save