经费预审系统

This commit is contained in:
2025-04-19 11:32:19 +08:00
parent 71f1c4162d
commit 2419d6bee5
6 changed files with 209 additions and 159 deletions
@@ -13,20 +13,20 @@ layout("/layouts/platform.html"){
<div class="search">
<div class="search-item">
<div class="search-item-label">年&emsp;&emsp;度:</div>
<div class="search-item-label">时间段:</div>
<div class="search-item-option">
<el-date-picker
v-model="pageForm.date"
type="daterange"
@change="dateChange"
align="right"
unlink-panels
value-format="yyyy-MM-dd"
style="width: 100%"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions">
v-model="pageForm.date"
type="daterange"
@change="dateChange"
align="right"
unlink-panels
value-format="yyyy-MM-dd"
style="width: 100%"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions">
</el-date-picker>
</div>
</div>
@@ -85,17 +85,18 @@ layout("/layouts/platform.html"){
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns">
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop==='auditState'">
<el-tag v-if="row.auditState===0" type="info">保存中</el-tag>
<el-tag v-if="row.auditState===1" type="info">待审核</el-tag>
<el-tag v-else-if="row.auditState===2" type="danger">退回修改</el-tag>
<el-tag v-else-if="row.auditState===3" type="success">已通过</el-tag>
<el-tag v-else-if="row.auditState===3" type="danger">退回修改并结束</el-tag>
<el-tag v-else-if="row.auditState===4" type="success">已通过</el-tag>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
@@ -111,67 +112,67 @@ layout("/layouts/platform.html"){
</guava>
<el-dialog
title="报销预审信息"
:visible.sync="viewDialogVisible"
width="40%"
:close-on-click-modal="false">
title="预审材料信息"
:visible.sync="viewDialogVisible"
width="40%"
:close-on-click-modal="false">
<info ref="info"></info>
<span slot="footer" class="dialog-footer">
<el-button @click="viewDialogVisible = false">关 闭</el-button>
<el-button @click="viewDialogVisible = false" type="primary">关 闭</el-button>
</span>
</el-dialog>
</div>
<script>
<!--#include("info.js"){}#-->
new Vue({
el: '#app',
el: "#app",
mixins: [initTableMixins],
data() {
return {
units: [],
unions: [],
pageForm: {
date: [moment().subtract(1, 'months')._d, new Date()],
date: [moment().subtract(1, "months")._d, new Date()],
year: new Date().getFullYear() + ""
},
tableColumns: [
{prop: 'loginName', label: '工号'},
{prop: 'userName', label: '姓名'},
{prop: 'unitName', label: '单位'},
{prop: 'unionName', label: '工会'},
{prop: 'notes', label: '事由'},
{prop: 'applyDate', label: '填写时间'},
{prop: 'auditState', label: '状态'},
{ prop: "loginName", label: "工号" },
{ prop: "userName", label: "姓名" },
{ prop: "unitName", label: "单位" },
{ prop: "unionName", label: "工会" },
{ prop: "notes", label: "事由" },
{ prop: "applyDate", label: "填写时间" },
{ prop: "auditState", label: "状态" }
],
formRules: {},
viewDialogVisible: false,
pickerOptions: {
shortcuts: [{
text: '最近一周',
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit("pick", [start, end])
}
}, {
text: '最近一个月',
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
picker.$emit("pick", [start, end])
}
}, {
text: '最近三个月',
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
picker.$emit("pick", [start, end])
}
}]
},
}
}
},
components: {
@@ -180,11 +181,11 @@ layout("/layouts/platform.html"){
methods: {
dateChange(val) {
if (val && val.length > 0) {
this.$set(this.pageForm, 'startDate', val[0])
this.$set(this.pageForm, 'endDate', val[1])
this.$set(this.pageForm, "startDate", val[0])
this.$set(this.pageForm, "endDate", val[1])
} else {
this.$set(this.pageForm, 'startDate', '')
this.$set(this.pageForm, 'endDate', '')
this.$set(this.pageForm, "startDate", "")
this.$set(this.pageForm, "endDate", "")
}
},
@@ -196,12 +197,12 @@ layout("/layouts/platform.html"){
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === "true") {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
}
},
async created() {
this.unions = await getUnions(null)