Merge remote-tracking branch 'origin/main'

This commit is contained in:
JyuHsin
2025-04-19 11:44:01 +08:00
6 changed files with 209 additions and 159 deletions
@@ -17,6 +17,7 @@ import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok; import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
/** /**
* @ClassName preAuditController * @ClassName preAuditController
@@ -71,10 +72,18 @@ public class preAuditSchoolController {
@ViReturn @ViReturn
@SLog(tag = "报销预审", msg = "审核一条记录", param = true, result = true) @SLog(tag = "报销预审", msg = "审核一条记录", param = true, result = true)
@RequiresPermissions("reimbursementPreAudit.audit") @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()); audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
baseService.insert(audit); 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)); baseService.dao().update(ReimbursementPreAudit.class, chain, Cnd.where("id", "=", id));
return null; return null;
} }
@@ -67,6 +67,11 @@ public class ReimbursementPreAudit extends BaseModel {
@ColDefine(type = ColType.VARCHAR, width = 100) @ColDefine(type = ColType.VARCHAR, width = 100)
private String notes; private String notes;
@Column
@Comment("联系电话")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String mobile;
@Column @Column
@Comment("申报时间") @Comment("申报时间")
@ColDefine(type = ColType.VARCHAR, width = 32) @ColDefine(type = ColType.VARCHAR, width = 32)
@@ -35,11 +35,13 @@ layout("/layouts/platform.html"){
<div class="search-item"> <div class="search-item">
<div class="search-item-label">所属工会:</div> <div class="search-item-label">所属工会:</div>
<div class="search-item-option"> <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" clearable="true"
@change="flushUnits" @clear="flushUnits" @change="flushUnits" @clear="flushUnits"
filterable> 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> </el-select>
</div> </div>
</div> </div>
@@ -47,10 +49,12 @@ layout("/layouts/platform.html"){
<div class="search-item"> <div class="search-item">
<div class="search-item-label">所属单位:</div> <div class="search-item-label">所属单位:</div>
<div class="search-item-option"> <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" clearable="true"
filterable="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> </el-select>
</div> </div>
</div> </div>
@@ -88,7 +92,8 @@ layout("/layouts/platform.html"){
<el-tag v-if="row.auditState===0" type="info">保存中</el-tag> <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-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===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> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" header-align="center" label="操作" <el-table-column align="center" header-align="center" label="操作"
@@ -107,7 +112,7 @@ layout("/layouts/platform.html"){
</guava> </guava>
<el-dialog <el-dialog
title="报销预审信息" title="预审材料信息"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="40%" width="40%"
:close-on-click-modal="false" :close-on-click-modal="false"
@@ -143,26 +148,27 @@ layout("/layouts/platform.html"){
</info> </info>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">关 闭</el-button> <el-button @click="dialogVisible = false">关 闭</el-button>
<el-button type="danger" @click="doSubmit(false)">退回修改</el-button> <el-button type="danger" @click="doSubmit(1)">退回修改</el-button>
<el-button type="primary" @click="doSubmit(true)">通 过</el-button> <el-button type="danger" @click="doSubmit(2)">退回修改并结束</el-button>
<el-button type="primary" @click="doSubmit(3)">通 过</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="报销预审信息" title="预审材料信息"
:visible.sync="viewDialogVisible" :visible.sync="viewDialogVisible"
width="40%" width="50%"
:close-on-click-modal="false"> :close-on-click-modal="false">
<info ref="info"></info> <info ref="info"></info>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="viewDialogVisible = false">关 闭</el-button> <el-button @click="viewDialogVisible = false" type="primary">关 闭</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
<script> <script>
<!--#include("info.js"){}#--> <!--#include("info.js"){}#-->
new Vue({ new Vue({
el: '#app', el: "#app",
mixins: [initTableMixins], mixins: [initTableMixins],
data() { data() {
return { return {
@@ -173,17 +179,17 @@ layout("/layouts/platform.html"){
year: new Date().getFullYear() + "" year: new Date().getFullYear() + ""
}, },
tableColumns: [ tableColumns: [
{prop: 'loginName', label: '工号'}, { prop: "loginName", label: "工号" },
{prop: 'userName', label: '姓名'}, { prop: "userName", label: "姓名" },
{prop: 'unitName', label: '单位'}, { prop: "unitName", label: "单位" },
{prop: 'unionName', label: '工会'}, { prop: "unionName", label: "工会" },
{prop: 'notes', label: '事由'}, { prop: "notes", label: "事由" },
{prop: 'applyDate', label: '填写时间'}, { prop: "applyDate", label: "填写时间" },
{prop: 'auditState', label: '状态'}, { prop: "auditState", label: "状态" }
], ],
formRules: {}, formRules: {},
dialogVisible: false, dialogVisible: false,
viewDialogVisible: false, viewDialogVisible: false
} }
}, },
components: { components: {
@@ -200,8 +206,8 @@ layout("/layouts/platform.html"){
this.formData = { this.formData = {
id: row.id, id: row.id,
auditOpinion: "", auditOpinion: "",
auditTime: moment().format('YYYY-MM-DD'), auditTime: moment().format("YYYY-MM-DD"),
username: "${@shiro.getPrincipalProperty('username')}", username: "${@shiro.getPrincipalProperty('username')}"
} }
this.dialogVisible = true this.dialogVisible = true
setTimeout(() => { setTimeout(() => {
@@ -211,18 +217,26 @@ layout("/layouts/platform.html"){
doSubmit(flag) { doSubmit(flag) {
this.$refs.form.validate(async (valid) => { this.$refs.form.validate(async (valid) => {
if (valid) { if (valid) {
this.$confirm('确定要' + (flag ? '通过' : '退回修改') + '吗?', '提示', { let msg = ""
confirmButtonText: '确定', if (flag === 1) {
cancelButtonText: '取消', msg = "退回修改"
type: 'warning' } else if (flag === 2) {
msg = "退回修改并结束流程"
} else {
msg = "通过"
}
this.$confirm("确定要" + msg + "吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => { }).then(() => {
this.formData.flag = flag this.formData.flag = flag
$.post("/platform/reimbursementPreAudit/audit/doSubmit", this.formData).then(res => { $.post("/platform/reimbursementPreAudit/audit/doSubmit", this.formData).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message({ this.$message({
type: 'success', type: "success",
message: '操作成功!' message: "操作成功!"
}); })
this.dialogVisible = false this.dialogVisible = false
this.pageData() this.pageData()
} }
@@ -234,12 +248,12 @@ layout("/layouts/platform.html"){
}, },
async flushUnits() { async flushUnits() {
this.$set(this.pageForm, "unitId", "") 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) this.units = await getUnits(this.pageForm.unionId)
} else { } else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}") this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
} }
}, }
}, },
async created() { async created() {
this.unions = await getUnions(null) this.unions = await getUnions(null)
@@ -25,11 +25,16 @@ let info = {
{{viewData.unionName}} {{viewData.unionName}}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="12">
<el-form-item label="摘要"> <el-form-item label="摘要">
{{viewData.notes}} {{viewData.notes}}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="联系方式">
{{viewData.mobile}}
</el-form-item>
</el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="材料" prop="files"> <el-form-item label="材料" prop="files">
<file-upload card :files.sync="viewData.files" <file-upload card :files.sync="viewData.files"
@@ -39,7 +39,7 @@ layout("/layouts/platform.html"){
<el-card class="mt10" shadow="never"> <el-card class="mt10" shadow="never">
<table-tool :app="this" label="预审列表"> <table-tool :app="this" label="预审列表">
<template #func> <template #func>
<el-button type="primary" @click="openAdd" size="small">新增报销预审</el-button> <el-button type="primary" @click="openAdd" size="small">新增预审材料</el-button>
</template> </template>
</table-tool> </table-tool>
<el-table :data="tableData" @sort-change="pageOrder" row-key="id" <el-table :data="tableData" @sort-change="pageOrder" row-key="id"
@@ -60,7 +60,8 @@ layout("/layouts/platform.html"){
<el-tag v-if="row.auditState===0" type="info">保存中</el-tag> <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-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===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> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" header-align="center" label="操作" <el-table-column align="center" header-align="center" label="操作"
@@ -82,9 +83,9 @@ layout("/layouts/platform.html"){
</guava> </guava>
<el-dialog <el-dialog
title="报销预审信息" title="预审材料信息"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="40%" width="60%"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-form :model="formData" :rules="rules" ref="form" label-width="100px" class="formData"> <el-form :model="formData" :rules="rules" ref="form" label-width="100px" class="formData">
@@ -113,16 +114,30 @@ layout("/layouts/platform.html"){
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="12">
<el-form-item label="摘要" prop="notes"> <el-form-item label="摘要" prop="notes">
<el-input v-model="formData.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-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="材料" prop="files"> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -135,20 +150,20 @@ layout("/layouts/platform.html"){
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="报销预审信息" title="预审材料信息"
:visible.sync="viewDialogVisible" :visible.sync="viewDialogVisible"
width="40%" width="50%"
:close-on-click-modal="false"> :close-on-click-modal="false">
<info ref="info"></info> <info ref="info"></info>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="viewDialogVisible = false">关 闭</el-button> <el-button @click="viewDialogVisible = false" type="primary">关 闭</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
<script> <script>
<!--#include("info.js"){}#--> <!--#include("info.js"){}#-->
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [initTableMixins], mixins: [initTableMixins],
data() { data() {
return { return {
@@ -156,20 +171,21 @@ layout("/layouts/platform.html"){
year: new Date().getFullYear() + "" year: new Date().getFullYear() + ""
}, },
tableColumns: [ tableColumns: [
{prop: 'loginName', label: '工号'}, { prop: "loginName", label: "工号" },
{prop: 'userName', label: '姓名'}, { prop: "userName", label: "姓名" },
{prop: 'unitName', label: '单位'}, { prop: "unitName", label: "单位" },
{prop: 'unionName', label: '工会'}, { prop: "unionName", label: "工会" },
{prop: 'notes', label: '事由'}, { prop: "notes", label: "摘要" },
{prop: 'applyDate', label: '填写时间'}, { prop: "applyDate", label: "填写时间" },
{prop: 'auditState', label: '状态'}, { prop: "auditState", label: "状态" }
], ],
dialogVisible: false, dialogVisible: false,
viewDialogVisible: false, viewDialogVisible: false,
rules: { rules: {
notes: [{required: true, message: '必填', trigger: 'blur'}], notes: [{ required: true, message: "必填", trigger: "blur" }],
files: [{required: true, message: '必填', trigger: 'blur'}], mobile: [{ required: true, message: "必填", trigger: "blur" }],
}, files: [{ required: true, message: "必填", trigger: "blur" }]
}
} }
}, },
components: { components: {
@@ -178,11 +194,11 @@ layout("/layouts/platform.html"){
methods: { methods: {
openAdd() { openAdd() {
this.formData = { this.formData = {
applyDate: moment().format('YYYY-MM-DD'), applyDate: moment().format("YYYY-MM-DD"),
userName: "${@shiro.getPrincipalProperty('username')}", userName: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}", loginName: "${@shiro.getPrincipalProperty('loginname')}",
unitName: "${@shiro.getPrincipalProperty('unit').getName()}", unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}", unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}"
} }
this.dialogVisible = true this.dialogVisible = true
this.$nextTick(() => { this.$nextTick(() => {
@@ -202,17 +218,17 @@ layout("/layouts/platform.html"){
this.dialogVisible = true this.dialogVisible = true
}, },
doDelete(id) { doDelete(id) {
this.$confirm('确认删除?', '提示', { this.$confirm("确认删除?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning"
}).then(() => { }).then(() => {
$.post("/platform/reimbursementPreAudit/manage/doDelete", { id }).then(res => { $.post("/platform/reimbursementPreAudit/manage/doDelete", { id }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message({ this.$message({
type: 'success', type: "success",
message: '删除成功!' message: "删除成功!"
}); })
this.pageData() this.pageData()
} }
}) })
@@ -221,10 +237,10 @@ layout("/layouts/platform.html"){
doSubmit(flag) { doSubmit(flag) {
this.$refs.form.validate(async (valid) => { this.$refs.form.validate(async (valid) => {
if (valid) { if (valid) {
this.$confirm('确定要' + (flag ? '提交' : '保存') + '吗?', '提示', { this.$confirm("确定要" + (flag ? "提交" : "保存") + "吗?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning"
}).then(() => { }).then(() => {
this.formLoading = true this.formLoading = true
$.post("/platform/reimbursementPreAudit/manage/doSubmit", { $.post("/platform/reimbursementPreAudit/manage/doSubmit", {
@@ -233,9 +249,9 @@ layout("/layouts/platform.html"){
}).then(res => { }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message({ this.$message({
type: 'success', type: "success",
message: '操作成功!' message: "操作成功!"
}); })
this.dialogVisible = false this.dialogVisible = false
this.pageData() this.pageData()
} }
@@ -245,7 +261,7 @@ layout("/layouts/platform.html"){
} }
}) })
}, }
}, },
async created() { async created() {
this.pageData() this.pageData()
@@ -13,7 +13,7 @@ layout("/layouts/platform.html"){
<div class="search"> <div class="search">
<div class="search-item"> <div class="search-item">
<div class="search-item-label">年&emsp;&emsp;度:</div> <div class="search-item-label">时间段:</div>
<div class="search-item-option"> <div class="search-item-option">
<el-date-picker <el-date-picker
v-model="pageForm.date" v-model="pageForm.date"
@@ -95,7 +95,8 @@ layout("/layouts/platform.html"){
<el-tag v-if="row.auditState===0" type="info">保存中</el-tag> <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-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===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> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" header-align="center" label="操作" <el-table-column align="center" header-align="center" label="操作"
@@ -111,67 +112,67 @@ layout("/layouts/platform.html"){
</guava> </guava>
<el-dialog <el-dialog
title="报销预审信息" title="预审材料信息"
:visible.sync="viewDialogVisible" :visible.sync="viewDialogVisible"
width="40%" width="40%"
:close-on-click-modal="false"> :close-on-click-modal="false">
<info ref="info"></info> <info ref="info"></info>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="viewDialogVisible = false">关 闭</el-button> <el-button @click="viewDialogVisible = false" type="primary">关 闭</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
<script> <script>
<!--#include("info.js"){}#--> <!--#include("info.js"){}#-->
new Vue({ new Vue({
el: '#app', el: "#app",
mixins: [initTableMixins], mixins: [initTableMixins],
data() { data() {
return { return {
units: [], units: [],
unions: [], unions: [],
pageForm: { pageForm: {
date: [moment().subtract(1, 'months')._d, new Date()], date: [moment().subtract(1, "months")._d, new Date()],
year: new Date().getFullYear() + "" year: new Date().getFullYear() + ""
}, },
tableColumns: [ tableColumns: [
{prop: 'loginName', label: '工号'}, { prop: "loginName", label: "工号" },
{prop: 'userName', label: '姓名'}, { prop: "userName", label: "姓名" },
{prop: 'unitName', label: '单位'}, { prop: "unitName", label: "单位" },
{prop: 'unionName', label: '工会'}, { prop: "unionName", label: "工会" },
{prop: 'notes', label: '事由'}, { prop: "notes", label: "事由" },
{prop: 'applyDate', label: '填写时间'}, { prop: "applyDate", label: "填写时间" },
{prop: 'auditState', label: '状态'}, { prop: "auditState", label: "状态" }
], ],
formRules: {}, formRules: {},
viewDialogVisible: false, viewDialogVisible: false,
pickerOptions: { pickerOptions: {
shortcuts: [{ shortcuts: [{
text: '最近一周', text: "最近一周",
onClick(picker) { onClick(picker) {
const end = new Date(); const end = new Date()
const start = new Date(); const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', [start, end]); picker.$emit("pick", [start, end])
} }
}, { }, {
text: '最近一个月', text: "最近一个月",
onClick(picker) { onClick(picker) {
const end = new Date(); const end = new Date()
const start = new Date(); const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
picker.$emit('pick', [start, end]); picker.$emit("pick", [start, end])
} }
}, { }, {
text: '最近三个月', text: "最近三个月",
onClick(picker) { onClick(picker) {
const end = new Date(); const end = new Date()
const start = new Date(); const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
picker.$emit('pick', [start, end]); picker.$emit("pick", [start, end])
} }
}] }]
}, }
} }
}, },
components: { components: {
@@ -180,11 +181,11 @@ layout("/layouts/platform.html"){
methods: { methods: {
dateChange(val) { dateChange(val) {
if (val && val.length > 0) { if (val && val.length > 0) {
this.$set(this.pageForm, 'startDate', val[0]) this.$set(this.pageForm, "startDate", val[0])
this.$set(this.pageForm, 'endDate', val[1]) this.$set(this.pageForm, "endDate", val[1])
} else { } else {
this.$set(this.pageForm, 'startDate', '') this.$set(this.pageForm, "startDate", "")
this.$set(this.pageForm, 'endDate', '') this.$set(this.pageForm, "endDate", "")
} }
}, },
@@ -196,12 +197,12 @@ layout("/layouts/platform.html"){
}, },
async flushUnits() { async flushUnits() {
this.$set(this.pageForm, "unitId", "") 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) this.units = await getUnits(this.pageForm.unionId)
} else { } else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}") this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
} }
}, }
}, },
async created() { async created() {
this.unions = await getUnions(null) this.unions = await getUnions(null)