This commit is contained in:
那些花儿
2025-09-25 19:29:28 +08:00
14 changed files with 116 additions and 53 deletions
@@ -117,7 +117,6 @@ public class MeetingLeaveController {
cnd.and("info.userId", "=", SecurityUtil.getUserId()); cnd.and("info.userId", "=", SecurityUtil.getUserId());
cnd.and("ins.id", "is not", null); cnd.and("ins.id", "is not", null);
cnd.andEX("mi.type", "=", type); cnd.andEX("mi.type", "=", type);
cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
if(year != null) { if(year != null) {
long startTime = DateUtil.parse(year + "-01-01").getTime(); long startTime = DateUtil.parse(year + "-01-01").getTime();
long endTime = DateUtil.parse(year + "-12-31").getTime(); long endTime = DateUtil.parse(year + "-12-31").getTime();
@@ -65,10 +65,12 @@ public class SiteRecordController {
ins.id AS instanceId, ins.id AS instanceId,
ins.state instanceState, ins.state instanceState,
ins.processDefineId instanceProcessDefineId, ins.processDefineId instanceProcessDefineId,
t.displayName taskName t.displayName taskName,
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName
FROM FROM
site_apply info site_apply info
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN ( LEFT JOIN (
SELECT SELECT
processInstanceId, processInstanceId,
@@ -36,6 +36,9 @@ public class SiteApplyServiceImpl extends BaseServiceImpl<SiteApply> implements
@Override @Override
public Map<Boolean, String> validateApply(SiteApply apply, String day) { public Map<Boolean, String> validateApply(SiteApply apply, String day) {
SiteInfo siteInfo = dao().fetch(SiteInfo.class, apply.getSiteId()); SiteInfo siteInfo = dao().fetch(SiteInfo.class, apply.getSiteId());
if(apply.getJoinCount() > siteInfo.getMaxNum()) {
return Map.of(false, "预约人数最多为%s人".formatted(siteInfo.getMaxNum()));
}
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
select select
sa.* sa.*
@@ -49,6 +52,7 @@ public class SiteApplyServiceImpl extends BaseServiceImpl<SiteApply> implements
cnd.and(SiteApply::getApplyDay, "=", day); cnd.and(SiteApply::getApplyDay, "=", day);
cnd.and(SiteApply::getStartTime, "=", apply.getStartTime()); cnd.and(SiteApply::getStartTime, "=", apply.getStartTime());
cnd.and(SiteApply::getEndTime, "=", apply.getEndTime()); cnd.and(SiteApply::getEndTime, "=", apply.getEndTime());
cnd.andEX("sa.id", "!=", apply.getId());
List<Integer> stateList = List.of(ProcessInstanceStateEnum.DOING.getCode(), ProcessInstanceStateEnum.FINISHED.getCode(), ProcessInstanceStateEnum.PENDING.getCode()); List<Integer> stateList = List.of(ProcessInstanceStateEnum.DOING.getCode(), ProcessInstanceStateEnum.FINISHED.getCode(), ProcessInstanceStateEnum.PENDING.getCode());
cnd.and(ProcessInstance::getState, "in", stateList); cnd.and(ProcessInstance::getState, "in", stateList);
@@ -21,6 +21,7 @@ import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.dao.util.cri.Static; import org.nutz.dao.util.cri.Static;
import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.lang.util.NutMap; import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok; import org.nutz.mvc.annotation.Ok;
@@ -97,10 +98,14 @@ public class SourceChangeManageController {
cnd.andEX("his.preparedBy", "=", pageForm.getPreparedBy()); cnd.andEX("his.preparedBy", "=", pageForm.getPreparedBy());
cnd.andEX("his.userState", "=", pageForm.getUserState()); cnd.andEX("his.userState", "=", pageForm.getUserState());
// cnd.andEX("his.changeType", "=", pageForm.getChangeType()); // cnd.andEX("his.changeType", "=", pageForm.getChangeType());
cnd.andEX("his.changeOrigin", "=", pageForm.getChangeOrigins()); cnd.andEX("his.changeOrigin", "=", pageForm.getChangeOrigin());
if (StrUtil.isNotBlank(pageForm.getChangeType())) { if (Lang.isNotEmpty(pageForm.getChangeTypes())) {
cnd.and(new Static("JSON_CONTAINS(his.changeTypes, JSON_QUOTE('%s'), '$')".formatted(pageForm.getChangeType()))); SqlExpressionGroup seg = new SqlExpressionGroup();
for (String type : pageForm.getChangeTypes()) {
seg.or(new Static("JSON_CONTAINS(his.changeTypes, JSON_QUOTE('%s'), '$')".formatted(type)));
}
cnd.and(seg);
} }
if (StrUtil.isAllNotBlank(pageForm.getChangeDateBefore(), pageForm.getChangeDateEnd())) { if (StrUtil.isAllNotBlank(pageForm.getChangeDateBefore(), pageForm.getChangeDateEnd())) {
@@ -46,5 +46,5 @@ public class SourceChangePageForm extends PageForm {
private String changeDateEnd; private String changeDateEnd;
//变更来源 //变更来源
private List<Integer> changeOrigins; private String changeOrigin;
} }
@@ -664,10 +664,10 @@ layout("/layouts/platform.html"){
}) })
}, },
doMenu() { doMenu() {
if (this.searchText) { // if (this.searchText) {
this.$message.warning('请清空搜索条件后再提交') // this.$message.warning('请清空搜索条件后再提交')
return; // return;
} // }
const ids = this.$refs["doMenuTree"].getCheckedKeys() const ids = this.$refs["doMenuTree"].getCheckedKeys()
if (!ids || ids.length === 0) { if (!ids || ids.length === 0) {
@@ -679,6 +679,7 @@ layout("/layouts/platform.html"){
text: "正在提交...", text: "正在提交...",
spinner: "el-icon-loading" spinner: "el-icon-loading"
}) })
this.$axios this.$axios
.post("/platform/sys/role/menuDo", { .post("/platform/sys/role/menuDo", {
roleId: this.roleId, roleId: this.roleId,
@@ -5,7 +5,10 @@ layout("/layouts/platform.html"){
<el-card shadow="never"> <el-card shadow="never">
<search @search="doSearch"> <search @search="doSearch">
<search-item label="单位"> <search-item label="单位">
<el-cascader :props="props" v-model="parentUnitSearch" placeholder="请选择单位" clearable filterable></el-cascader> <el-select clearable filterable placeholder="请选择" style="width: 100%" v-model="pageForm.searchUnit" @change="doSearch">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in units"></el-option>
</el-select>
<!-- <el-cascader :props="props" v-model="parentUnitSearch" placeholder="请选择单位" clearable filterable></el-cascader>-->
</search-item> </search-item>
<search-item> <search-item>
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" @keyup.enter.native="doSearch"> <el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" @keyup.enter.native="doSearch">
@@ -294,7 +297,9 @@ layout("/layouts/platform.html"){
} }
}) })
} }
} },
units: []
} }
}, },
methods: { methods: {
@@ -303,11 +308,11 @@ layout("/layouts/platform.html"){
return "" return ""
}, },
doSearch: function () { doSearch: function () {
let unit = this.parentUnitSearch[this.parentUnitSearch.length - 1] // let unit = this.parentUnitSearch[this.parentUnitSearch.length - 1]
if ("root" === unit) { // if ("root" === unit) {
unit = "" // unit = ""
} // }
this.pageForm.searchUnit = unit // this.pageForm.searchUnit = unit
this.pageForm.pageNumber = 1 this.pageForm.pageNumber = 1
this.pageData() this.pageData()
}, },
@@ -452,8 +457,9 @@ layout("/layouts/platform.html"){
this.multipleSelection = val this.multipleSelection = val
} }
}, },
created() { async created() {
this.pageData() this.pageData()
this.units = await this.$businessTool.listUnit()
} }
}) })
</script> </script>
@@ -88,7 +88,9 @@ const apply = {
allowTimeList: [], allowTimeList: [],
selectDayList: [], selectDayList: [],
dialogVisible: false, dialogVisible: false,
formData: {}, formData: {
applyCause: ',',
},
formRules: { formRules: {
applyUserId: [{required: true, message: '必填', trigger: ['blur', 'change']}], applyUserId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
applyUserName: [{required: true, message: '必填', trigger: ['blur', 'change']}], applyUserName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
@@ -102,7 +102,7 @@ layout("/layouts/platform.html"){
{prop: 'startTime', label: '开始时间'}, {prop: 'startTime', label: '开始时间'},
{prop: 'endTime', label: '结束时间'}, {prop: 'endTime', label: '结束时间'},
{prop: 'applyMobile', label: '联系方式'}, {prop: 'applyMobile', label: '联系方式'},
{prop: 'taskName', label: '当前节点'}, {prop: 'curTaskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'}, {prop: 'instanceState', label: '流程状态'},
], ],
} }
@@ -128,7 +128,7 @@ layout("/layouts/platform.html"){
{prop: 'startTime', label: '开始时间'}, {prop: 'startTime', label: '开始时间'},
{prop: 'endTime', label: '结束时间'}, {prop: 'endTime', label: '结束时间'},
{prop: 'applyMobile', label: '联系方式'}, {prop: 'applyMobile', label: '联系方式'},
{prop: 'taskName', label: '当前节点'}, {prop: 'curTaskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'}, {prop: 'instanceState', label: '流程状态'},
], ],
typeOptions: [], typeOptions: [],
@@ -1,6 +1,23 @@
<!--# <!--#
layout("/layouts/platform.html"){ layout("/layouts/platform.html"){
#--> #-->
<style>
.query-row {
height: 55px;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}
.query-row:not(:last-child) {
border-bottom: 1px dashed rgb(230, 230, 230);
}
.query-row-title {
width: 120px;
}
</style>
<div id="app" v-cloak> <div id="app" v-cloak>
<guava ref="guava"> <guava ref="guava">
<template> <template>
@@ -35,10 +52,10 @@ layout("/layouts/platform.html"){
<dict-select v-model="pageForm.preparedBy" placeholder="编制类别" @change="doSearch" <dict-select v-model="pageForm.preparedBy" placeholder="编制类别" @change="doSearch"
code="USER_PREPARED_BY_TYPE"></dict-select> code="USER_PREPARED_BY_TYPE"></dict-select>
</search-item> </search-item>
<search-item label="变更类型"> <!-- <search-item label="变更类型">-->
<dict-select v-model="pageForm.changeType" placeholder="变更类型" @change="doSearch" <!-- <dict-select v-model="pageForm.changeType" placeholder="变更类型" @change="doSearch"-->
code="MEMBER_CHANGE_TYPE"></dict-select> <!-- code="MEMBER_CHANGE_TYPE"></dict-select>-->
</search-item> <!-- </search-item>-->
<search-item label="变更来源"> <search-item label="变更来源">
<el-select clearable filterable placeholder="请选择变更来源" style="width: 100%" <el-select clearable filterable placeholder="请选择变更来源" style="width: 100%"
v-model="pageForm.changeOrigin"> v-model="pageForm.changeOrigin">
@@ -55,6 +72,29 @@ layout("/layouts/platform.html"){
</search-item> </search-item>
</search> </search>
</el-card> </el-card>
<el-card shadow="never" class="mt10">
<el-row type="flex" align="middle" class="query-row">
<el-col class="query-row-title">异动类型:</el-col>
<el-col class="query-row-content">
<el-tag
style="margin-right: 10px;margin-top: 5px;cursor: pointer"
v-for="item in changeTypeData"
:key="item.code"
:type="item.name"
:effect="pageForm.changeTypes.includes(item.type)?'dark':'plain'"
@click="tagClick('changeTypes',item.type)">
{{ item.changeTypeName }}
</el-tag>
<el-link type="danger"
v-if="changeTypeData.length && pageForm.changeTypes.length"
:underline="false"
@click="pageForm.changeTypes=[];doSearch()">清空
</el-link>
</el-col>
</el-row>
</el-card>
<el-card shadow="never" class="mt10"> <el-card shadow="never" class="mt10">
<table-tool label="变更记录(默认查询当天变更记录,如需查询更多变更记录,请选择上方【变更日期】后点击搜索)"> <table-tool label="变更记录(默认查询当天变更记录,如需查询更多变更记录,请选择上方【变更日期】后点击搜索)">
</table-tool> </table-tool>
@@ -74,7 +114,7 @@ layout("/layouts/platform.html"){
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link> <el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
</template> </template>
<template scope="{row}" v-else-if="column.prop == 'changeTypes'"> <template scope="{row}" v-else-if="column.prop == 'changeTypes'">
<span style="color: #0e78c5;cursor: pointer" @click="openCurrentUserChangeInfo(row)"> <span style="color: #0e78c5;cursor: pointer" @click="openUserChangeInfo(row)">
{{getChangeTypes(row.changeTypes)}} {{getChangeTypes(row.changeTypes)}}
</span> </span>
</template> </template>
@@ -86,24 +126,27 @@ layout("/layouts/platform.html"){
</el-table-column> </el-table-column>
<el-table-column label="操作" width="130px"> <el-table-column label="操作" width="130px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button @click="openUserChangeInfo(row)" size="mini" type="primary">查看全部变更</el-button> <el-button @click="openUserChangeInfo(row)" size="mini" type="primary">查看变更</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!--#include("/layouts/pagination.html"){}#--> <!--#include("/layouts/pagination.html"){}#-->
</el-card> </el-card>
</template> </template>
<template #view> <template #view>
<member-info ref="memberInfoRef"></member-info> <member-info ref="memberInfoRef"></member-info>
</template> </template>
<template #public> <template #public>
<member-audit-change-info ref="memberAuditChangeInfoRef"></member-audit-change-info> <member-all-change-info ref="memberAllChangeInfoRef"></member-all-change-info>
</template> </template>
</guava> </guava>
</div> </div>
<script> <script>
<!--#include("../../member/common/info/memberInfo.js"){}#--> <!--#include("../../member/common/info/memberInfo.js"){}#-->
<!--#include("../../member/change/common/memberAllChangeInfo.js"){}#--> <!--#include("../../member/change/common/memberAllChangeInfo.js"){}#-->
new Vue({ new Vue({
el: "#app", el: "#app",
mixins: [initTableMixins], mixins: [initTableMixins],
@@ -148,7 +191,8 @@ layout("/layouts/platform.html"){
userState: "", userState: "",
preparedBy: "", preparedBy: "",
personType: "", personType: "",
changeDateRange: [] changeDateRange: [],
changeTypes: [],
}, },
tableColumns: [ tableColumns: [
{ prop: "loginname", label: "工号", sortable: true }, { prop: "loginname", label: "工号", sortable: true },
@@ -161,7 +205,7 @@ layout("/layouts/platform.html"){
{ prop: "unitName", label: "所属单位", sortable: true }, { prop: "unitName", label: "所属单位", sortable: true },
{ prop: "changeTypes", label: "变更类型", sortable: true }, { prop: "changeTypes", label: "变更类型", sortable: true },
{ prop: "changeOrigin", label: "变更来源", sortable: true }, { prop: "changeOrigin", label: "变更来源", sortable: true },
{ prop: "remark", label: "变更说明", sortable: true }, // { prop: "remark", label: "变更说明", sortable: true },
], ],
unions: [], unions: [],
units: [], units: [],
@@ -174,6 +218,15 @@ layout("/layouts/platform.html"){
'member-all-change-info': MEMBER_ALL_CHANGE_INFO, 'member-all-change-info': MEMBER_ALL_CHANGE_INFO,
}, },
methods: { methods: {
tagClick(key, val) {
let idx = this.pageForm[key].indexOf(val)
if (idx !== -1) {
this.pageForm[key].splice(idx, 1)
} else {
this.pageForm[key].push(val)
}
this.pageData()
},
setDefaultDateRange() { setDefaultDateRange() {
const end = new Date(); // 当前时间 const end = new Date(); // 当前时间
const start = new Date(); const start = new Date();
@@ -201,16 +254,16 @@ layout("/layouts/platform.html"){
}, },
// 全部变更 // 全部变更
openUserChangeInfo(row) { openUserChangeInfo(row) {
this.$refs.guava.edit(() => {
return this.$refs.memberChangeInfoRef.onOpen(row.userId,null)
})
},
// 当前变更
openCurrentUserChangeInfo(row) {
this.$refs.guava.public(() => { this.$refs.guava.public(() => {
this.$refs.memberAuditChangeInfoRef.onOpen({userId:row.userId, recordId:row.id}) return this.$refs.memberAllChangeInfoRef.onOpen(row.userId)
}) })
}, },
// // 当前变更
// openCurrentUserChangeInfo(row) {
// this.$refs.guava.public(() => {
// this.$refs.memberAuditChangeInfoRef.onOpen({userId:row.userId, recordId:row.id})
// })
// },
getChangeTypes(changeTypes) { getChangeTypes(changeTypes) {
const changeTypesList = JSON.parse(changeTypes) const changeTypesList = JSON.parse(changeTypes)
if (changeTypesList) { if (changeTypesList) {
@@ -91,7 +91,7 @@ const apply = {
<div class="form-actions"> <div class="form-actions">
<van-button @click="formVisible = false" type="info" plain round>关闭</van-button> <van-button @click="formVisible = false" type="info" plain round>关闭</van-button>
<van-button @click="onSubmit" v-if="!taskId" type="info" round>提交</van-button> <van-button @click="onSubmit" v-if="!taskId" type="info" round>提交</van-button>
<van-button @click="onFinishTask" type="info" round>提交</van-button> <van-button @click="onFinishTask" v-else type="info" round>提交</van-button>
</div> </div>
</van-form> </van-form>
</van-action-sheet> </van-action-sheet>
@@ -112,7 +112,9 @@ const apply = {
weekdayCNMap: {0: '周日', 1: '周一', 2: '周二', 3: '周三', 4: '周四', 5: '周五', 6: '周六'}, weekdayCNMap: {0: '周日', 1: '周一', 2: '周二', 3: '周三', 4: '周四', 5: '周五', 6: '周六'},
formVisible: false, formVisible: false,
formData: {}, formData: {
applyCause: '',
},
calendarVisible: false, calendarVisible: false,
} }
@@ -37,7 +37,7 @@ layout("/layouts/platform_h5.html"){
<table-column label="预约日期">{{row.applyDay}}</table-column> <table-column label="预约日期">{{row.applyDay}}</table-column>
<table-column label="开始时间">{{row.startTime}}</table-column> <table-column label="开始时间">{{row.startTime}}</table-column>
<table-column label="结束时间">{{row.endTime}}</table-column> <table-column label="结束时间">{{row.endTime}}</table-column>
<table-column label="当前节点">{{row.taskName}}</table-column> <table-column label="当前节点">{{row.curTaskName}}</table-column>
</template> </template>
<template #actions="{index,row}"> <template #actions="{index,row}">
<div class="action-btn" @click="onView(row)"> <div class="action-btn" @click="onView(row)">
@@ -86,9 +86,9 @@ layout("/layouts/platform_h5.html"){
<van-field label="难产假" v-model="formData.difficultLeave" placeholder="请输入天数" type="number" <van-field label="难产假" v-model="formData.difficultLeave" placeholder="请输入天数" type="number"
v-if="isFemale" required></van-field> v-if="isFemale" required></van-field>
<van-field label="寒假" v-model="formData.winterLeave" placeholder="请输入天数" <van-field label="寒假" v-model="formData.winterLeave" placeholder="请输入天数"
type="number" required></van-field> type="number" ></van-field>
<van-field label="暑假" v-model="formData.summerLeave" placeholder="请输入天数" <van-field label="暑假" v-model="formData.summerLeave" placeholder="请输入天数"
type="number" required></van-field> type="number" ></van-field>
<van-field label="合计天数" :value="totalLeaveDays" readonly></van-field> <van-field label="合计天数" :value="totalLeaveDays" readonly></van-field>
<van-field label="休假时间起" <van-field label="休假时间起"
@@ -195,8 +195,6 @@ layout("/layouts/platform_h5.html"){
extendLeave: [{ required: true, message: '请输入延长假天数' }], extendLeave: [{ required: true, message: '请输入延长假天数' }],
birthsLeave: [{ required: true, message: '请输入多胞胎天数' }], birthsLeave: [{ required: true, message: '请输入多胞胎天数' }],
difficultLeave: [{ required: true, message: '请输入难产假天数' }], difficultLeave: [{ required: true, message: '请输入难产假天数' }],
winterLeave: [{ required: true, message: '请输入寒假天数' }],
summerLeave: [{ required: true, message: '请输入暑假天数' }],
startTime: [{ required: true, message: '请选择休假开始时间' }], startTime: [{ required: true, message: '请选择休假开始时间' }],
endTime: [{ required: true, message: '请选择休假结束时间' }], endTime: [{ required: true, message: '请选择休假结束时间' }],
childrenBirthday: [{ required: true, message: '请选择子女出生日期' }] childrenBirthday: [{ required: true, message: '请选择子女出生日期' }]
@@ -380,15 +378,6 @@ layout("/layouts/platform_h5.html"){
} }
} }
// 所有人需要填写的字段
if (!this.formData.winterLeave && this.formData.winterLeave !== 0) {
errors.push('请输入寒假天数');
}
if (!this.formData.summerLeave && this.formData.summerLeave !== 0) {
errors.push('请输入暑假天数');
}
if (!this.formData.startTime) { if (!this.formData.startTime) {
errors.push('请选择休假开始时间'); errors.push('请选择休假开始时间');
} }