master
xy 2 years ago
parent 467ab531ca
commit 7b6faa16a8

@ -0,0 +1,41 @@
import request from "@/utils/request";
export function index (params) {
return request({
url: '/api/admin/property-plan/index',
method: 'get',
params
})
}
export function show (params) {
return request({
url: '/api/admin/property-plan/show',
method: 'get',
params
})
}
export function store (data) {
return request({
url: '/api/admin/property-plan/store',
method: 'post',
data
})
}
export function save (data) {
return request({
url: '/api/admin/property-plan/save',
method: 'post',
data
})
}
export function destroy (params) {
return request({
url: '/api/admin/property-plan/destroy',
method: 'get',
params
})
}

@ -2,54 +2,6 @@
<div class="app-container">
<div>当前登录人{{ user.name }}</div>
<el-card class="box-card" style="margin: 20px 0">
<div slot="header" class="clearfix">
<span>预算总体进展情况</span>
<DatePicker
:value="select.year"
placeholder="选择所属年份"
placement="bottom"
style="width: 130px; float: right"
type="year"
@on-change="changeYear"
></DatePicker>
</div>
<router-link :to="`/statisticalReport/budgetProgress`">
<div class="progress-card">
<div class="progress-card-item">
<div class="progress-card-item__num">
{{ moneyFormat(statistic.progress.money_total_1) }}
</div>
<div class="progress-card-item__label">年初预算数</div>
</div>
<div class="progress-card-item">
<div class="progress-card-item__num">
{{ moneyFormat(statistic.progress.money_total_2) }}
</div>
<div class="progress-card-item__label">调整后预算数</div>
</div>
<div class="progress-card-item">
<div class="progress-card-item__num">
{{ moneyFormat(statistic.progress.use_money_total) }}
</div>
<div class="progress-card-item__label">已支付金额</div>
</div>
<div class="progress-card-item">
<div class="progress-card-item__num">
{{
toper(
statistic.progress.money_total_1,
statistic.progress.money_total_2,
statistic.progress.use_money_total
)
}}%
</div>
<div class="progress-card-item__label">进展率</div>
</div>
</div>
</router-link>
</el-card>
<div ref="lxHeader">
<LxHeader
icon="md-apps"
@ -93,7 +45,7 @@
>
<template slot-scope="{ row, $index }">
<el-link v-if="row.read_count" type="success" :underline="false"
>已读</el-link
>已读</el-link
>
<Button
v-else
@ -102,7 +54,7 @@
style="margin-left: 10px"
ghost
@click="readIt(row, $index)"
>未读</Button
>未读</Button
>
</template>
</el-table-column>
@ -119,7 +71,7 @@
style="margin-left: 10px"
ghost
@click="toContract(row)"
>查看</Button
>查看</Button
>
</template>
</el-table-column>
@ -129,6 +81,55 @@
<Page :total="total" show-elevator @on-change="pageChange" />
</div>
</div>
<el-card class="box-card" style="margin: 20px 0">
<div slot="header" class="clearfix">
<span>预算总体进展情况</span>
<DatePicker
:value="select.year"
placeholder="选择所属年份"
placement="bottom"
style="width: 130px; float: right"
type="year"
@on-change="changeYear"
></DatePicker>
</div>
<router-link :to="`/statisticalReport/budgetProgress`">
<div class="progress-card">
<div class="progress-card-item">
<div class="progress-card-item__num">
{{ moneyFormat(statistic.progress.money_total_1) }}
</div>
<div class="progress-card-item__label">年初预算数</div>
</div>
<div class="progress-card-item">
<div class="progress-card-item__num">
{{ moneyFormat(statistic.progress.money_total_2) }}
</div>
<div class="progress-card-item__label">调整后预算数</div>
</div>
<div class="progress-card-item">
<div class="progress-card-item__num">
{{ moneyFormat(statistic.progress.use_money_total) }}
</div>
<div class="progress-card-item__label">已支付金额</div>
</div>
<div class="progress-card-item">
<div class="progress-card-item__num">
{{
toper(
statistic.progress.money_total_1,
statistic.progress.money_total_2,
statistic.progress.use_money_total
)
}}%
</div>
<div class="progress-card-item__label">进展率</div>
</div>
</div>
</router-link>
</el-card>
<div class="demo-split">
<div v-for="(sitem, index) in this.typeList">
<Split v-model="split" style="height: 580px">

@ -0,0 +1,200 @@
<template>
<div>
<xy-dialog
ref="dialog"
:is-show.sync="isShow"
type="form"
:title="type === 'add' ? '新增财评评审' : '编辑财评评审'"
:form="form"
:rules="rules"
@submit="submit"
>
<template v-slot:project_id>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>
项目
</div>
<div class="xy-table-item-content">
<el-input
readonly
v-model="form.project_id"
clearable
placeholder="请输入项目"
style="width: 300px"
@focus="isShowModal = true"
></el-input>
</div>
</div>
</template>
<template v-slot:plan_date>
<div class="xy-table-item">
<div class="xy-table-item-label">计划评审时间 </div>
<div class="xy-table-item-content">
<el-date-picker
v-model="form.plan_date"
placeholder="请选择计划评审时间"
style="width: 300px"
value-format="yyyy-MM-dd"
></el-date-picker>
</div>
</div>
</template>
<template v-slot:actually_date>
<div class="xy-table-item">
<div class="xy-table-item-label">实际评审时间 </div>
<div class="xy-table-item-content">
<el-date-picker
v-model="form.actually_date"
placeholder="请选择实际评审时间"
style="width: 300px"
value-format="yyyy-MM-dd"
></el-date-picker>
</div>
</div>
</template>
</xy-dialog>
<Modal title="项目" v-model="isShowModal" footer-hide>
<div>213</div>
</Modal>
</div>
</template>
<script>
import { getContract } from "@/api/contract/contract"
import { show, save } from "@/api/propertyPlan";
export default {
props: {},
data() {
return {
isShowModal: false,
isShow: false,
id: "",
type: "",
form: {
project_id: "",
plan_date: "",
actually_date: "",
},
rules: {
project_id: [
{
required: true,
message: "请填写项目",
},
],
},
contracts: [],
};
},
methods: {
show() {
this.isShow = true;
},
hidden() {
this.isShow = false;
},
init() {
for (let key in this.form) {
if (this.form[key] instanceof Array) {
this.form[key] = [];
} else {
this.form[key] = "";
}
}
this.$refs["dialog"].clearValidate();
},
setId(id) {
if (typeof id == "number") {
this.id = id;
} else {
console.error("error typeof id: " + typeof id);
}
},
getId() {
return this.id;
},
setType(type = "add") {
let types = ["add", "editor"];
if (types.includes(type)) {
this.type = type;
} else {
console.warn("Unknown type: " + type);
}
},
setForm(key = [], value = []) {
if (key instanceof Array) {
key.forEach((key, index) => {
this.form[key] = value[index] ?? "";
});
}
if (typeof key === "string") {
this.form[key] = value;
}
if (!key) {
this.init();
}
},
async getDetail() {
const res = await show({ id: this.id });
this.$integrateData(this.form, res);
},
submit() {
if (this.type === "add") {
if (this.form.hasOwnProperty("id")) {
delete this.form.id;
}
}
if (this.type === "editor") {
Object.defineProperty(this.form, "id", {
value: this.id,
enumerable: true,
configurable: true,
writable: true,
});
}
save(this.form).then((res) => {
this.$message({
type: "success",
message:
this.type === "add" ? "新增财评评审" : "编辑财评评审" + "成功",
});
this.isShow = false;
this.$emit("refresh");
});
},
},
watch: {
isShow(val) {
if (val) {
if (this.type === "editor") {
this.getDetail();
}
} else {
this.id = "";
this.type = "";
this.init();
this.$refs["dialog"].clearValidate();
delete this.form.id;
}
},
},
};
</script>
<style scoped lang="scss">
::v-deep .el-input__inner {
text-align: left;
}
.xy-table-item-label {
width: 150px;
}
</style>

@ -0,0 +1,108 @@
<template>
<div style="padding: 0 20px">
<lx-header
icon="md-apps"
:text="$route.meta.title"
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
>
<div slot="content"></div>
<slot>
<span style="padding: 0 6px; word-break: keep-all">关键字</span>
<span>
<Input
v-model="select.keyword"
placeholder="请输入关键字"
style="width: 180px"
></Input>
</span>
<Button type="primary" style="margin-left: 10px" ghost @click=""
>重置</Button
>
<Button type="primary" style="margin-left: 10px" @click="">查询</Button>
<Button
v-if="type === 0"
type="primary"
style="margin-left: 10px"
@click="
$refs['addPropertyPlan'].setType('add'),
$refs['addPropertyPlan'].show()
"
>新增</Button
>
</slot>
</lx-header>
<xy-table :list="list" :table-item="table" @editor="(e) => {}">
<template v-if="type !== 0" #btns> </template>
</xy-table>
<div style="display: flex; justify-content: flex-end; margin-top: 10px">
<Page
:total="total"
show-elevator
@on-change="
(e) => {
select.page = e;
getList();
}
"
/>
</div>
<addPropertyPlan ref="addPropertyPlan"></addPropertyPlan>
</div>
</template>
<script>
import { index, destroy } from "@/api/propertyPlan";
import addPropertyPlan from "@/views/finance/components/addPropertyPlan.vue";
export default {
components: {
addPropertyPlan,
},
data() {
return {
type: 0,
select: {
page: 1,
page_size: 10,
},
list: [],
table: [
{
label: "项目名称",
width: 220,
align: "left",
},
{
prop: "",
label: "计划评审时间",
width: 200,
},
{
prop: "",
label: "实际评审时间",
width: 200,
},
],
total: 0,
};
},
methods: {
async getList() {
const res = await index(this.select);
this.total = res.total;
this.list = res.data;
},
},
computed: {},
beforeRouteEnter(to, from, next) {
next((vm) => {
this.type = to.path.split("_")[1];
});
},
};
</script>
<style scoped lang="scss"></style>

@ -1,451 +1,531 @@
<template>
<div style="padding: 0 20px;">
<lx-header icon="md-apps" text="付款登记" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<span style="padding: 0 6px;word-break: keep-all;">创建日期</span>
<span>
<DatePicker :value="selectDate" placeholder="请选择日期" type="date" placement="bottom-start" style="width: 180px"
@on-change="(e)=>selectDate = e"></DatePicker>
</span>
<span style="padding: 0 6px;word-break: keep-all;">关键字</span>
<span>
<Input v-model="keyword" placeholder="请输入关键字" style="width: 180px"></Input>
</span>
<span style="padding: 0 6px;word-break: keep-all;">预算计划</span>
<span>
<Input v-model="select.plan_name" clearable placeholder="请选择预算计划" @on-focus="showPlanForSearch"
style="width: 200px" @on-clear="clearSelectForSearch" />
</span>
<span style="padding: 0 6px;word-break: keep-all;">
状态
</span>
<Select v-model="status" clearable placeholder="请选择" style="width:100px;">
<Option v-for="item in [{label:'待审核',value:0},{label:'已审核',value:1}]" :key="item.value" :value="item.value">
{{ item.label }}
</Option>
</Select>
<Button type="primary" style="margin-left: 10px" ghost>重置</Button>
<Button type="primary" style="margin-left: 10px" @click="doSearch()"></Button>
<Button type="primary" @click="toExport()" style="margin-left: 10px">导出</Button>
</slot>
</lx-header>
<!-- 搜索使用 预算计划 -->
<xy-dialog :is-show.sync="isShowPlanForSearch" title="预算计划" :width="720" @on-ok="planSelectForSearch">
<template v-slot:normalContent>
<Input v-model="planSearch.name" search enter-button=" " placeholder="搜索预算计划.." @on-search="searchBudgets" />
<div style="margin: 10px 0;display: flex;justify-content: space-between;
align-items: center;">
<div>已选择<span style="margin-right:10px">{{select.plan_name}}</span> </div>
<el-link type="success" @click="clearSelectForSearch"></el-link>
</div>
<xy-table :list="plans" @rowClick="selectPlanForSearch" :show-index="false" :table-item="planTableSearch"
:height="310" style="margin-top: 10px;" ref="singlePlanTable">
<template v-slot:btns>
</template>
</xy-table>
<div style="display: flex;justify-content: flex-end;">
<Page :total="planTotal" show-elevator @on-change="planPageChange" />
</div>
<el-tag type="warning">点击行进行选择</el-tag>
</template>
<template v-slot:footerContent>
<Button type="primary" @click="confirmPlanForSearch"></Button>
</template>
</xy-dialog>
<xy-table :list="list" :table-item="table">
<template v-slot:btns>
<el-table-column label="操作" fixed="right" width="160" header-align="center">
<template slot-scope="scope">
<template v-if="scope.row.status === 0">
<Button size="small" type="primary" style="margin-left: 10px;margin-bottom: 4px"
@click="$refs['examineRegistration'].isShow = true,$refs['examineRegistration'].getRegistration(scope.row.id)">审核确认</Button>
</template>
<template v-else>
<Button size="small" type="error" ghost style="margin-left: 10px;margin-bottom: 4px"
@click="cancelExamine(scope.row)">审核撤销</Button>
</template>
</template>
</el-table-column>
</template>
</xy-table>
<div style="display: flex;justify-content: flex-end;">
<Page :total="total" show-elevator @on-change="pageChange" show-sizer @on-page-size-change="pageSizeChange" />
</div>
<examineRegistration ref="examineRegistration" @refresh="getFundLogs"></examineRegistration>
</div>
</template>
<script>
import {
getFundLog,
delFundLog,
editorFundLog
} from "@/api/paymentRegistration/fundLog"
import {
getToken
} from '@/utils/auth'
import {
parseTime
} from "@/utils"
import {
Message
} from "element-ui";
import {
getBudget
} from "@/api/budget/budget"
import {
getparameter
} from "@/api/system/dictionary"
import examineRegistration from "./components/examineRegistration";
export default {
components: {
examineRegistration
},
data() {
return {
moneyWay: [],
plan: [],
planTableSearch: [{
label: "分类",
prop: 'type',
formatter: (cell, data, value) => {
let res = this.moneyWay.filter(item => {
return item.id === value
})
return res[0]?.value || '未知'
},
width: 120
},
{
label: "年份",
prop: 'year',
align: 'center',
width: 90
},
{
label: "名称",
prop: 'name',
width: 200,
align: 'left'
},
{
label: "计划金额",
prop: 'money',
align: 'right',
width: 160
}
],
plans: [], //
planSearch: {
name: "",
plan_department_id: ""
},
planTotal: 0,
plansPageIndex: 1,
isShowPlanForSearch: false,
status: 0,
keyword: '',
select: {
plan_id: "",
plan_name: ""
},
selectDate: '',
list: [],
total: 0,
pageIndex: 1,
pageSize: 10,
table: [{
label: "项目名称",
minWidth: 300,
prop: 'contract.name',
fixed: 'left',
align: 'left'
},
{
label: "付款申请金额(元)",
prop: "apply_money",
align: 'right',
width: 170,
formatter: (v1, v2, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
label: '实际付款金额(元)',
prop: "act_money",
align: 'right',
width: 170,
formatter: (v1, v2, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
label: "预算计划",
width: 320,
align: "left",
customFn: (row) => {
{
if (row.act_plan_link.length > 0) {
return row.act_plan_link.map(item => {
return ( < div > [{
item.plan.year
}] - {
item.plan.name
} < br / > [使用金额] {
item.use_money
}
< /div>)
})
}
}
}
},
{
label: "款项类型",
prop: "type",
width: 120
},
{
prop: 'status',
label: '状态',
width: 100,
formatter: (cell, data, value) => {
if (value === 0) return '待审核'
else return '已审核'
}
},
{
label: "次数",
prop: "pay_count",
width: 95,
formatter: (cell, data, value) => {
return value + 1;
}
},
{
label: "最后一笔",
prop: "is_end",
width: 125,
formatter: (cell, data, value) => {
return value == 1 ? "是" : "否"
}
},
{
label: "经办人",
minWidth: 120,
prop: 'admin.name',
align: 'center'
},
{
label: "业务科室",
minWidth: 140,
prop: 'department.name',
align: 'center'
},
{
label: "备注",
minWidth: 360,
prop: 'remark',
align: 'left'
},
{
label: "创建信息",
prop: "created_at",
width: 160,
formatter: (cell, data, value) => {
return parseTime(new Date(value), '{y}-{m}-{d}')
}
}
]
}
},
methods: {
planPageChange(e) {
this.plansPageIndex = e
this.getBudgets()
},
//
async getMoneyWay() {
this.moneyWay = (await getparameter({
number: 'money_way'
})).detail
},
clearSelectForSearch() {
this.select.plan_id = "";
this.select.plan_name = "请选择预算计划";
},
//
searchBudgets() {
this.plansPageIndex = 1;
this.getBudgets();
},
doSearch() {
this.pageIndex = 0;
this.getFundLogs();
},
confirmPlanForSearch() {
this.isShowPlanForSearch = false;
this.getFundLogs();
},
//
toggleSelection(plans, type) {
if (plans) {
this.plans.filter(plan => {
if (plans.includes(plan.id)) {
plan.useMoney = this.plan[plans.indexOf(plan.id)].value.use_money
return true
}
}).map(row => {
this.$refs.planTable.toggleRowSelection(row)
})
} else {
this.$refs.planTable.clearSelection()
}
},
//
async getBudgets() {
await getBudget({
name: this.planSearch.name,
page_size: 10,
page: this.plansPageIndex,
plan_department_id: this.planSearch.plan_department_id,
top_pid: 1
}).then(res => {
this.plans = res.list.data
this.planTotal = res.list.total;
this.toggleSelection(this.plan.map(item => {
return item.value.plan_id
}), 1)
})
},
async showPlanForSearch() {
this.isShowPlanForSearch = true
await this.getBudgets();
},
//
selectPlanForSearch(sel) {
console.log(sel)
if (sel) {
this.select.plan_id = sel.id;
this.select.plan_name = "[" + sel.year + "]-" + sel.name;
} else {
this.select.plan_id = "";
this.select.plan_name = "";
}
},
//
planSelectForSearch() {
if (this.select.plan_id == "") {
Message({
type: 'warning',
message: '选择计划不能为空'
})
return
}
this.isShowPlanForSearch = false
},
pageSizeChange(e) {
this.pageSize = e
this.pageIndex = 1
this.getFundLogs()
},
pageChange(e) {
this.pageIndex = e
this.getFundLogs()
},
toExport() {
this.is_export = 1;
this.getFundLogs(true);
},
async getFundLogs(is_export) {
await getFundLog({
page_size: this.pageSize,
page: this.pageIndex,
keyword: this.keyword,
date: this.selectDate,
status: this.status,
act_plan_link_id: this.select.plan_id
}).then(res => {
let tokens = getToken();
if (is_export) {
var url = "/api/admin/fund_log/index?token=" + tokens
if (this.selectDate)
url += "&date=" + this.selectDate;
if (this.keyword)
url += "&keyword=" + this.keyword;
if (typeof(this.status) != "undefined")
url += "&status=" + this.status;
if (this.select.plan_id)
url += "&act_plan_link_id=" + this.select.plan_id;
url += "&is_export=" + this.is_export;
url = location.host + url;
console.log(url)
window.open("http://" + url, '_blank')
this.select.is_export = 0
return;
}
this.list = res.data
this.total = res.total
})
},
deleteFundLog(row) {
delFundLog({
id: row.id
}).then(res => {
Message({
type: 'success',
message: '操作成功'
})
this.getFundLogs()
})
},
cancelExamine(row) {
editorFundLog({
id: row.id,
contract_id: row.contract_id,
status: 0
}).then(res => {
this.getFundLogs()
Message({
type: "success",
message: "操作成功"
})
})
}
},
mounted() {
this.getMoneyWay();
this.getFundLogs()
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<div style="padding: 0 20px">
<lx-header
icon="md-apps"
text="付款登记"
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
>
<div slot="content"></div>
<slot>
<span style="padding: 0 6px; word-break: keep-all">创建日期</span>
<span>
<DatePicker
:value="selectDate"
placeholder="请选择日期"
type="date"
placement="bottom-start"
style="width: 180px"
@on-change="(e) => (selectDate = e)"
></DatePicker>
</span>
<span style="padding: 0 6px; word-break: keep-all">关键字</span>
<span>
<Input
v-model="keyword"
placeholder="请输入关键字"
style="width: 180px"
></Input>
</span>
<span style="padding: 0 6px; word-break: keep-all">预算计划</span>
<span>
<Input
v-model="select.plan_name"
clearable
placeholder="请选择预算计划"
@on-focus="showPlanForSearch"
style="width: 200px"
@on-clear="clearSelectForSearch"
/>
</span>
<span style="padding: 0 6px; word-break: keep-all"> 状态 </span>
<Select
v-model="status"
clearable
placeholder="请选择"
style="width: 100px"
>
<Option
v-for="item in [
{ label: '待审核', value: 0 },
{ label: '已审核', value: 1 },
]"
:key="item.value"
:value="item.value"
>
{{ item.label }}
</Option>
</Select>
<Button type="primary" style="margin-left: 10px" ghost>重置</Button>
<Button type="primary" style="margin-left: 10px" @click="doSearch()"
>查询</Button
>
<Button type="primary" @click="toExport()" style="margin-left: 10px"
>导出</Button
>
</slot>
</lx-header>
<!-- 搜索使用 预算计划 -->
<xy-dialog
:is-show.sync="isShowPlanForSearch"
title="预算计划"
:width="720"
@on-ok="planSelectForSearch"
>
<template v-slot:normalContent>
<Input
v-model="planSearch.name"
search
enter-button="搜 索"
placeholder="搜索预算计划.."
@on-search="searchBudgets"
/>
<div
style="
margin: 10px 0;
display: flex;
justify-content: space-between;
align-items: center;
"
>
<div>
已选择<span style="margin-right: 10px">{{
select.plan_name
}}</span>
</div>
<el-link type="success" @click="clearSelectForSearch"
>清空选择</el-link
>
</div>
<xy-table
:list="plans"
@rowClick="selectPlanForSearch"
:show-index="false"
:table-item="planTableSearch"
:height="310"
style="margin-top: 10px"
ref="singlePlanTable"
>
<template v-slot:btns> </template>
</xy-table>
<div style="display: flex; justify-content: flex-end">
<Page :total="planTotal" show-elevator @on-change="planPageChange" />
</div>
<el-tag type="warning">点击行进行选择</el-tag>
</template>
<template v-slot:footerContent>
<Button type="primary" @click="confirmPlanForSearch"></Button>
</template>
</xy-dialog>
<xy-table :list="list" :table-item="table">
<template v-slot:btns>
<el-table-column
label="操作"
fixed="right"
width="160"
header-align="center"
>
<template slot-scope="scope">
<template v-if="scope.row.status === 0">
<Button
size="small"
type="primary"
style="margin-left: 10px; margin-bottom: 4px"
@click="
($refs['examineRegistration'].isShow = true),
$refs['examineRegistration'].getRegistration(scope.row.id)
"
>审核确认</Button
>
</template>
<template v-else>
<Button
size="small"
type="error"
ghost
style="margin-left: 10px; margin-bottom: 4px"
@click="cancelExamine(scope.row)"
>审核撤销</Button
>
</template>
</template>
</el-table-column>
</template>
</xy-table>
<div style="display: flex; justify-content: flex-end">
<Page
:total="total"
show-elevator
@on-change="pageChange"
show-sizer
@on-page-size-change="pageSizeChange"
/>
</div>
<examineRegistration
ref="examineRegistration"
@refresh="getFundLogs"
></examineRegistration>
</div>
</template>
<script>
import {
getFundLog,
delFundLog,
editorFundLog,
} from "@/api/paymentRegistration/fundLog";
import { getToken } from "@/utils/auth";
import { parseTime } from "@/utils";
import { Message } from "element-ui";
import { getBudget } from "@/api/budget/budget";
import { getparameter } from "@/api/system/dictionary";
import examineRegistration from "./components/examineRegistration";
export default {
components: {
examineRegistration,
},
data() {
return {
moneyWay: [],
plan: [],
planTableSearch: [
{
label: "分类",
prop: "type",
formatter: (cell, data, value) => {
let res = this.moneyWay.filter((item) => {
return item.id === value;
});
return res[0]?.value || "未知";
},
width: 120,
},
{
label: "年份",
prop: "year",
align: "center",
width: 90,
},
{
label: "名称",
prop: "name",
width: 200,
align: "left",
},
{
label: "计划金额",
prop: "money",
align: "right",
width: 160,
},
],
plans: [], //
planSearch: {
name: "",
plan_department_id: "",
},
planTotal: 0,
plansPageIndex: 1,
isShowPlanForSearch: false,
status: 0,
keyword: "",
select: {
plan_id: "",
plan_name: "",
},
selectDate: "",
list: [],
total: 0,
pageIndex: 1,
pageSize: 10,
table: [
{
label: "项目名称",
minWidth: 300,
prop: "contract.name",
fixed: "left",
align: "left",
},
{
label: "付款申请金额(元)",
prop: "apply_money",
align: "right",
width: 170,
formatter: (v1, v2, value) => {
return Number(value)
.toFixed(2)
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
},
},
{
label: "实际付款金额(元)",
prop: "act_money",
align: "right",
width: 170,
formatter: (v1, v2, value) => {
return Number(value)
.toFixed(2)
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
},
},
{
label: "预算计划",
width: 320,
align: "left",
customFn: (row) => {
{
if (row.act_plan_link.length > 0) {
return row.act_plan_link.map((item) => {
return (
<div>
{" "}
[{item.plan.year}] - {item.plan.name} <br /> [使用金额]{" "}
{item.use_money}{" "}
</div>
);
});
}
}
},
},
{
label: "款项类型",
prop: "type",
width: 120,
},
{
prop: "status",
label: "状态",
width: 100,
formatter: (cell, data, value) => {
if (value === 0) return "待审核";
else return "已审核";
},
},
{
label: "次数",
prop: "pay_count",
width: 95,
formatter: (cell, data, value) => {
return value + 1;
},
},
{
label: "最后一笔",
prop: "is_end",
width: 125,
formatter: (cell, data, value) => {
return value == 1 ? "是" : "否";
},
},
{
label: "经办人",
minWidth: 120,
prop: "admin.name",
align: "center",
},
{
label: "业务科室",
minWidth: 140,
prop: "department.name",
align: "center",
},
{
label: "备注",
minWidth: 360,
prop: "remark",
align: "left",
},
{
label: "创建信息",
prop: "created_at",
width: 160,
formatter: (cell, data, value) => {
return parseTime(new Date(value), "{y}-{m}-{d}");
},
},
],
};
},
methods: {
planPageChange(e) {
this.plansPageIndex = e;
this.getBudgets();
},
//
async getMoneyWay() {
this.moneyWay = (
await getparameter({
number: "money_way",
})
).detail;
},
clearSelectForSearch() {
this.select.plan_id = "";
this.select.plan_name = "请选择预算计划";
},
//
searchBudgets() {
this.plansPageIndex = 1;
this.getBudgets();
},
doSearch() {
this.pageIndex = 0;
this.getFundLogs();
},
confirmPlanForSearch() {
this.isShowPlanForSearch = false;
this.getFundLogs();
},
//
toggleSelection(plans, type) {
if (plans) {
this.plans
.filter((plan) => {
if (plans.includes(plan.id)) {
plan.useMoney = this.plan[plans.indexOf(plan.id)].value.use_money;
return true;
}
})
.map((row) => {
this.$refs.planTable.toggleRowSelection(row);
});
} else {
this.$refs.planTable.clearSelection();
}
},
//
async getBudgets() {
await getBudget({
name: this.planSearch.name,
page_size: 10,
page: this.plansPageIndex,
plan_department_id: this.planSearch.plan_department_id,
top_pid: 1,
}).then((res) => {
this.plans = res.list.data;
this.planTotal = res.list.total;
this.toggleSelection(
this.plan.map((item) => {
return item.value.plan_id;
}),
1
);
});
},
async showPlanForSearch() {
this.isShowPlanForSearch = true;
await this.getBudgets();
},
//
selectPlanForSearch(sel) {
console.log(sel);
if (sel) {
this.select.plan_id = sel.id;
this.select.plan_name = "[" + sel.year + "]-" + sel.name;
} else {
this.select.plan_id = "";
this.select.plan_name = "";
}
},
//
planSelectForSearch() {
if (this.select.plan_id == "") {
Message({
type: "warning",
message: "选择计划不能为空",
});
return;
}
this.isShowPlanForSearch = false;
},
pageSizeChange(e) {
this.pageSize = e;
this.pageIndex = 1;
this.getFundLogs();
},
pageChange(e) {
this.pageIndex = e;
this.getFundLogs();
},
toExport() {
this.is_export = 1;
this.getFundLogs(true);
},
async getFundLogs(is_export) {
await getFundLog({
page_size: this.pageSize,
page: this.pageIndex,
keyword: this.keyword,
date: this.selectDate,
status: this.status,
act_plan_link_id: this.select.plan_id,
}).then((res) => {
let tokens = getToken();
if (is_export) {
var url = "/api/admin/fund_log/index?token=" + tokens;
if (this.selectDate) url += "&date=" + this.selectDate;
if (this.keyword) url += "&keyword=" + this.keyword;
if (typeof this.status != "undefined")
url += "&status=" + this.status;
if (this.select.plan_id)
url += "&act_plan_link_id=" + this.select.plan_id;
url += "&is_export=" + this.is_export;
url = location.host + url;
console.log(url);
window.open("http://" + url, "_blank");
this.select.is_export = 0;
return;
}
this.list = res.data;
this.total = res.total;
});
},
deleteFundLog(row) {
delFundLog({
id: row.id,
}).then((res) => {
Message({
type: "success",
message: "操作成功",
});
this.getFundLogs();
});
},
cancelExamine(row) {
editorFundLog({
id: row.id,
contract_id: row.contract_id,
status: 0,
}).then((res) => {
this.getFundLogs();
Message({
type: "success",
message: "操作成功",
});
});
},
},
mounted() {
this.getMoneyWay();
this.getFundLogs();
},
};
</script>
<style scoped lang="scss"></style>

@ -6,11 +6,11 @@
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
>
<div slot="content"></div>
<slot>
<span style="padding: 0 6px;word-break: keep-all;">年份</span>
<span>
<DatePicker :value="select.year" placeholder="请选择年份" type="year" placement="bottom-start" style="width: 160px"
@on-change="(e)=>select.year = e"></DatePicker>
<slot>
<span style="padding: 0 6px;word-break: keep-all;">年份</span>
<span>
<DatePicker :value="select.year" placeholder="请选择年份" type="year" placement="bottom-start" style="width: 160px"
@on-change="(e)=>select.year = e"></DatePicker>
</span>
<span style="padding: 0 6px; word-break: keep-all">关键字</span>
<span>
@ -76,10 +76,10 @@ export default {
<p class="split split__department">{row.department.name}</p>
</el-tooltip>
{
row.plan?.map(i => {
row.plan?.map((i,index) => {
return (
<el-tooltip class="item" effect="dark" content={i.name} placement="top">
<p class="split">{i.name}</p>
<p class="split" style={{"background":index%2===0?'#ff000015':''}}>{i.name}</p>
</el-tooltip>
)
})
@ -106,9 +106,9 @@ export default {
},0)
}</p>
{
row.plan?.map(i => {
row.plan?.map((i,index) => {
return (
<p class="split" style="text-align: right;">{ i.money }</p>
<p class="split" style={{"text-align": "right","background":index%2===0?'#ff000015':''}}>{ i.money }</p>
)
})
}
@ -146,9 +146,9 @@ export default {
},0)
}</p>
{
row.plan?.map(i => {
row.plan?.map((i,index) => {
return (
<p class="split" style="text-align: right;">{ i.detail[z].plan_total }</p>
<p class="split" style={{"text-align": "right","background":index%2===0?'#ff000015':''}}>{ i.detail[z].plan_total }</p>
)
})
}
@ -169,9 +169,9 @@ export default {
},0)
}</p>
{
row.plan?.map(i => {
row.plan?.map((i,index) => {
return (
<p class="split" style="text-align: right;">{ i.detail[z].act_total }</p>
<p class="split" style={{"text-align": "right","background":index%2===0?'#ff000015':''}}>{ i.detail[z].act_total }</p>
)
})
}
@ -194,9 +194,9 @@ export default {
},0))
}%</p>
{
row.plan?.map(i => {
row.plan?.map((i,index) => {
return (
<p class="split" style="text-align: right;" style="text-align: right;">{ this.percent(i.detail[z].act_total,i.detail[z].plan_total) }%</p>
<p class="split" style={{"text-align": "right","background":index%2===0?'#ff000015':''}}>{ this.percent(i.detail[z].act_total,i.detail[z].plan_total) }%</p>
)
})
}
@ -219,9 +219,9 @@ export default {
'/'
}</p>
{
row.plan?.map(i => {
row.plan?.map((i,index) => {
return (
<p class="split" style="text-align: right;">{
<p class="split" style={{"text-align": "right","background":index%2===0?'#ff000015':''}}>{
i.detail?.reduce((a,b) => {
return a + parseInt(b.plan_total)
},0)
@ -250,7 +250,7 @@ export default {
},
},
computed: {},
created() {
created() {
this.select.year = this.$moment().format('YYYY');
this.getList();
},
@ -258,6 +258,9 @@ export default {
</script>
<style scoped lang="scss">
::v-deep .cell {
padding: 0;
}
::v-deep .v-table .el-table__body td {
padding: 0!important;
}
@ -268,7 +271,7 @@ export default {
text-align: left;
border-top: 1px solid #EBEEF5;
padding: 5px 0;
padding: 5px;
&:nth-child(1) {
border-top: none;

Loading…
Cancel
Save