Merge remote-tracking branch 'origin/main'
This commit is contained in:
+12
-3
@@ -17,6 +17,7 @@ import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @ClassName preAuditController
|
||||
@@ -40,7 +41,7 @@ public class preAuditSchoolController {
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("reimbursementPreAudit.audit")
|
||||
public Object pageData(PageForm pageForm, String year, String notes, Integer auditState,String unitId,String unionId) {
|
||||
public Object pageData(PageForm pageForm, String year, String notes, Integer auditState, String unitId, String unionId) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT * FROM `reimbursement_pre_audit` $condition
|
||||
@@ -71,10 +72,18 @@ public class preAuditSchoolController {
|
||||
@ViReturn
|
||||
@SLog(tag = "报销预审", msg = "审核一条记录", param = true, result = true)
|
||||
@RequiresPermissions("reimbursementPreAudit.audit")
|
||||
public Object doSubmit(Audit audit, String id, Boolean flag) {
|
||||
public Object doSubmit(Audit audit, String id, @Param("flag") Integer flag) {
|
||||
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||
baseService.insert(audit);
|
||||
Chain chain = Chain.make("auditId", audit.getId()).add("auditState", flag ? 3 : 2);
|
||||
Integer auditState;
|
||||
if (flag == 1) {
|
||||
auditState = 2;
|
||||
} else if (flag == 2) {
|
||||
auditState = 3;
|
||||
} else {
|
||||
auditState = 4;
|
||||
}
|
||||
Chain chain = Chain.make("auditId", audit.getId()).add("auditState", auditState);
|
||||
baseService.dao().update(ReimbursementPreAudit.class, chain, Cnd.where("id", "=", id));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -67,6 +67,11 @@ public class ReimbursementPreAudit extends BaseModel {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String notes;
|
||||
|
||||
@Column
|
||||
@Comment("联系电话")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("申报时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
|
||||
@@ -16,10 +16,10 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item-label">年  度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year" v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year" v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,11 +35,13 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable>
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -47,10 +49,12 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
<el-option v-for="item in units" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -78,17 +82,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="操作"
|
||||
@@ -107,10 +112,10 @@ layout("/layouts/platform.html"){
|
||||
</guava>
|
||||
|
||||
<el-dialog
|
||||
title="报销预审信息"
|
||||
:visible.sync="dialogVisible"
|
||||
width="40%"
|
||||
:close-on-click-modal="false"
|
||||
title="预审材料信息"
|
||||
:visible.sync="dialogVisible"
|
||||
width="40%"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<info ref="auditInfo">
|
||||
<template #handle>
|
||||
@@ -143,26 +148,27 @@ layout("/layouts/platform.html"){
|
||||
</info>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||
<el-button type="danger" @click="doSubmit(false)">退回修改</el-button>
|
||||
<el-button type="primary" @click="doSubmit(true)">通 过</el-button>
|
||||
<el-button type="danger" @click="doSubmit(1)">退回修改</el-button>
|
||||
<el-button type="danger" @click="doSubmit(2)">退回修改并结束</el-button>
|
||||
<el-button type="primary" @click="doSubmit(3)">通 过</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="报销预审信息"
|
||||
:visible.sync="viewDialogVisible"
|
||||
width="40%"
|
||||
:close-on-click-modal="false">
|
||||
title="预审材料信息"
|
||||
:visible.sync="viewDialogVisible"
|
||||
width="50%"
|
||||
: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 {
|
||||
@@ -173,17 +179,17 @@ layout("/layouts/platform.html"){
|
||||
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: {},
|
||||
dialogVisible: false,
|
||||
viewDialogVisible: false,
|
||||
viewDialogVisible: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -200,8 +206,8 @@ layout("/layouts/platform.html"){
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
auditOpinion: "",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format("YYYY-MM-DD"),
|
||||
username: "${@shiro.getPrincipalProperty('username')}"
|
||||
}
|
||||
this.dialogVisible = true
|
||||
setTimeout(() => {
|
||||
@@ -211,18 +217,26 @@ layout("/layouts/platform.html"){
|
||||
doSubmit(flag) {
|
||||
this.$refs.form.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.$confirm('确定要' + (flag ? '通过' : '退回修改') + '吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
let msg = ""
|
||||
if (flag === 1) {
|
||||
msg = "退回修改"
|
||||
} else if (flag === 2) {
|
||||
msg = "退回修改并结束流程"
|
||||
} else {
|
||||
msg = "通过"
|
||||
}
|
||||
this.$confirm("确定要" + msg + "吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.formData.flag=flag
|
||||
this.formData.flag = flag
|
||||
$.post("/platform/reimbursementPreAudit/audit/doSubmit", this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功!'
|
||||
});
|
||||
type: "success",
|
||||
message: "操作成功!"
|
||||
})
|
||||
this.dialogVisible = false
|
||||
this.pageData()
|
||||
}
|
||||
@@ -234,12 +248,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)
|
||||
|
||||
@@ -25,11 +25,16 @@ let info = {
|
||||
{{viewData.unionName}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="摘要">
|
||||
{{viewData.notes}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系方式">
|
||||
{{viewData.mobile}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="材料" prop="files">
|
||||
<file-upload card :files.sync="viewData.files"
|
||||
|
||||
@@ -15,10 +15,10 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item-label">年  度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year" v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year" v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
@@ -39,7 +39,7 @@ layout("/layouts/platform.html"){
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="预审列表">
|
||||
<template #func>
|
||||
<el-button type="primary" @click="openAdd" size="small">新增报销预审</el-button>
|
||||
<el-button type="primary" @click="openAdd" size="small">新增预审材料</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
|
||||
@@ -50,17 +50,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="操作"
|
||||
@@ -82,10 +83,10 @@ layout("/layouts/platform.html"){
|
||||
</guava>
|
||||
|
||||
<el-dialog
|
||||
title="报销预审信息"
|
||||
:visible.sync="dialogVisible"
|
||||
width="40%"
|
||||
:close-on-click-modal="false"
|
||||
title="预审材料信息"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form :model="formData" :rules="rules" ref="form" label-width="100px" class="formData">
|
||||
<el-row>
|
||||
@@ -113,16 +114,30 @@ layout("/layouts/platform.html"){
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="摘要" prop="notes">
|
||||
<el-input v-model="formData.notes"
|
||||
placeholder="请选择或输入摘要" maxlength="50" show-word-limit>
|
||||
placeholder="请输入摘要" maxlength="50" show-word-limit>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="mobile">
|
||||
<el-input v-model="formData.mobile"
|
||||
placeholder="请输入联系电话" maxlength="50" show-word-limit>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="材料" prop="files">
|
||||
<file-upload card :files.sync="formData.files"></file-upload>
|
||||
<file-upload :files.sync="formData.files"
|
||||
:type="['jpg', 'jpeg', 'png', 'JPG', 'JPEG', 'PNG']" :max="30">
|
||||
<template #el-upload__tip>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
请上传类型为jpg/png/jpeg等格式的图片,最多上传30个文件
|
||||
</div>
|
||||
</template>
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -135,20 +150,20 @@ layout("/layouts/platform.html"){
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="报销预审信息"
|
||||
:visible.sync="viewDialogVisible"
|
||||
width="40%"
|
||||
:close-on-click-modal="false">
|
||||
title="预审材料信息"
|
||||
:visible.sync="viewDialogVisible"
|
||||
width="50%"
|
||||
: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"){}#-->
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
@@ -156,20 +171,21 @@ layout("/layouts/platform.html"){
|
||||
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: "状态" }
|
||||
],
|
||||
dialogVisible: false,
|
||||
viewDialogVisible: false,
|
||||
rules: {
|
||||
notes: [{required: true, message: '必填', trigger: 'blur'}],
|
||||
files: [{required: true, message: '必填', trigger: 'blur'}],
|
||||
},
|
||||
notes: [{ required: true, message: "必填", trigger: "blur" }],
|
||||
mobile: [{ required: true, message: "必填", trigger: "blur" }],
|
||||
files: [{ required: true, message: "必填", trigger: "blur" }]
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -178,11 +194,11 @@ layout("/layouts/platform.html"){
|
||||
methods: {
|
||||
openAdd() {
|
||||
this.formData = {
|
||||
applyDate: moment().format('YYYY-MM-DD'),
|
||||
applyDate: moment().format("YYYY-MM-DD"),
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}"
|
||||
}
|
||||
this.dialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
@@ -202,17 +218,17 @@ layout("/layouts/platform.html"){
|
||||
this.dialogVisible = true
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('确认删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
this.$confirm("确认删除?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
$.post("/platform/reimbursementPreAudit/manage/doDelete", {id}).then(res => {
|
||||
$.post("/platform/reimbursementPreAudit/manage/doDelete", { id }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
type: "success",
|
||||
message: "删除成功!"
|
||||
})
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
@@ -221,10 +237,10 @@ layout("/layouts/platform.html"){
|
||||
doSubmit(flag) {
|
||||
this.$refs.form.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.$confirm('确定要' + (flag ? '提交' : '保存') + '吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
this.$confirm("确定要" + (flag ? "提交" : "保存") + "吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.formLoading = true
|
||||
$.post("/platform/reimbursementPreAudit/manage/doSubmit", {
|
||||
@@ -233,9 +249,9 @@ layout("/layouts/platform.html"){
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功!'
|
||||
});
|
||||
type: "success",
|
||||
message: "操作成功!"
|
||||
})
|
||||
this.dialogVisible = false
|
||||
this.pageData()
|
||||
}
|
||||
@@ -245,7 +261,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
|
||||
@@ -13,20 +13,20 @@ layout("/layouts/platform.html"){
|
||||
<div class="search">
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年  度:</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)
|
||||
|
||||
Reference in New Issue
Block a user