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("ins.id", "is not", null);
cnd.andEX("mi.type", "=", type);
cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
if(year != null) {
long startTime = DateUtil.parse(year + "-01-01").getTime();
long endTime = DateUtil.parse(year + "-12-31").getTime();
@@ -65,10 +65,12 @@ public class SiteRecordController {
ins.id AS instanceId,
ins.state instanceState,
ins.processDefineId instanceProcessDefineId,
t.displayName taskName
t.displayName taskName,
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName
FROM
site_apply info
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 (
SELECT
processInstanceId,
@@ -36,6 +36,9 @@ public class SiteApplyServiceImpl extends BaseServiceImpl<SiteApply> implements
@Override
public Map<Boolean, String> validateApply(SiteApply apply, String day) {
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("""
select
sa.*
@@ -49,6 +52,7 @@ public class SiteApplyServiceImpl extends BaseServiceImpl<SiteApply> implements
cnd.and(SiteApply::getApplyDay, "=", day);
cnd.and(SiteApply::getStartTime, "=", apply.getStartTime());
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());
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.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
@@ -97,10 +98,14 @@ public class SourceChangeManageController {
cnd.andEX("his.preparedBy", "=", pageForm.getPreparedBy());
cnd.andEX("his.userState", "=", pageForm.getUserState());
// cnd.andEX("his.changeType", "=", pageForm.getChangeType());
cnd.andEX("his.changeOrigin", "=", pageForm.getChangeOrigins());
cnd.andEX("his.changeOrigin", "=", pageForm.getChangeOrigin());
if (StrUtil.isNotBlank(pageForm.getChangeType())) {
cnd.and(new Static("JSON_CONTAINS(his.changeTypes, JSON_QUOTE('%s'), '$')".formatted(pageForm.getChangeType())));
if (Lang.isNotEmpty(pageForm.getChangeTypes())) {
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())) {
@@ -46,5 +46,5 @@ public class SourceChangePageForm extends PageForm {
private String changeDateEnd;
//变更来源
private List<Integer> changeOrigins;
private String changeOrigin;
}
@@ -664,10 +664,10 @@ layout("/layouts/platform.html"){
})
},
doMenu() {
if (this.searchText) {
this.$message.warning('请清空搜索条件后再提交')
return;
}
// if (this.searchText) {
// this.$message.warning('请清空搜索条件后再提交')
// return;
// }
const ids = this.$refs["doMenuTree"].getCheckedKeys()
if (!ids || ids.length === 0) {
@@ -679,6 +679,7 @@ layout("/layouts/platform.html"){
text: "正在提交...",
spinner: "el-icon-loading"
})
this.$axios
.post("/platform/sys/role/menuDo", {
roleId: this.roleId,
@@ -5,7 +5,10 @@ layout("/layouts/platform.html"){
<el-card shadow="never">
<search @search="doSearch">
<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>
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" @keyup.enter.native="doSearch">
@@ -294,7 +297,9 @@ layout("/layouts/platform.html"){
}
})
}
}
},
units: []
}
},
methods: {
@@ -303,11 +308,11 @@ layout("/layouts/platform.html"){
return ""
},
doSearch: function () {
let unit = this.parentUnitSearch[this.parentUnitSearch.length - 1]
if ("root" === unit) {
unit = ""
}
this.pageForm.searchUnit = unit
// let unit = this.parentUnitSearch[this.parentUnitSearch.length - 1]
// if ("root" === unit) {
// unit = ""
// }
// this.pageForm.searchUnit = unit
this.pageForm.pageNumber = 1
this.pageData()
},
@@ -452,8 +457,9 @@ layout("/layouts/platform.html"){
this.multipleSelection = val
}
},
created() {
async created() {
this.pageData()
this.units = await this.$businessTool.listUnit()
}
})
</script>
@@ -88,7 +88,9 @@ const apply = {
allowTimeList: [],
selectDayList: [],
dialogVisible: false,
formData: {},
formData: {
applyCause: ',',
},
formRules: {
applyUserId: [{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: 'endTime', label: '结束时间'},
{prop: 'applyMobile', label: '联系方式'},
{prop: 'taskName', label: '当前节点'},
{prop: 'curTaskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'},
],
}
@@ -128,7 +128,7 @@ layout("/layouts/platform.html"){
{prop: 'startTime', label: '开始时间'},
{prop: 'endTime', label: '结束时间'},
{prop: 'applyMobile', label: '联系方式'},
{prop: 'taskName', label: '当前节点'},
{prop: 'curTaskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'},
],
typeOptions: [],
@@ -1,6 +1,23 @@
<!--#
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>
<guava ref="guava">
<template>
@@ -35,10 +52,10 @@ layout("/layouts/platform.html"){
<dict-select v-model="pageForm.preparedBy" placeholder="编制类别" @change="doSearch"
code="USER_PREPARED_BY_TYPE"></dict-select>
</search-item>
<search-item label="变更类型">
<dict-select v-model="pageForm.changeType" placeholder="变更类型" @change="doSearch"
code="MEMBER_CHANGE_TYPE"></dict-select>
</search-item>
<!-- <search-item label="变更类型">-->
<!-- <dict-select v-model="pageForm.changeType" placeholder="变更类型" @change="doSearch"-->
<!-- code="MEMBER_CHANGE_TYPE"></dict-select>-->
<!-- </search-item>-->
<search-item label="变更来源">
<el-select clearable filterable placeholder="请选择变更来源" style="width: 100%"
v-model="pageForm.changeOrigin">
@@ -55,6 +72,29 @@ layout("/layouts/platform.html"){
</search-item>
</search>
</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">
<table-tool label="变更记录(默认查询当天变更记录,如需查询更多变更记录,请选择上方【变更日期】后点击搜索)">
</table-tool>
@@ -74,7 +114,7 @@ layout("/layouts/platform.html"){
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
</template>
<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)}}
</span>
</template>
@@ -86,24 +126,27 @@ layout("/layouts/platform.html"){
</el-table-column>
<el-table-column label="操作" width="130px">
<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>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<member-info ref="memberInfoRef"></member-info>
</template>
<template #public>
<member-audit-change-info ref="memberAuditChangeInfoRef"></member-audit-change-info>
<member-all-change-info ref="memberAllChangeInfoRef"></member-all-change-info>
</template>
</guava>
</div>
<script>
<!--#include("../../member/common/info/memberInfo.js"){}#-->
<!--#include("../../member/change/common/memberAllChangeInfo.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
@@ -148,7 +191,8 @@ layout("/layouts/platform.html"){
userState: "",
preparedBy: "",
personType: "",
changeDateRange: []
changeDateRange: [],
changeTypes: [],
},
tableColumns: [
{ prop: "loginname", label: "工号", sortable: true },
@@ -161,7 +205,7 @@ layout("/layouts/platform.html"){
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "changeTypes", label: "变更类型", sortable: true },
{ prop: "changeOrigin", label: "变更来源", sortable: true },
{ prop: "remark", label: "变更说明", sortable: true },
// { prop: "remark", label: "变更说明", sortable: true },
],
unions: [],
units: [],
@@ -174,6 +218,15 @@ layout("/layouts/platform.html"){
'member-all-change-info': MEMBER_ALL_CHANGE_INFO,
},
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() {
const end = new Date(); // 当前时间
const start = new Date();
@@ -201,16 +254,16 @@ layout("/layouts/platform.html"){
},
// 全部变更
openUserChangeInfo(row) {
this.$refs.guava.edit(() => {
return this.$refs.memberChangeInfoRef.onOpen(row.userId,null)
})
},
// 当前变更
openCurrentUserChangeInfo(row) {
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) {
const changeTypesList = JSON.parse(changeTypes)
if (changeTypesList) {
@@ -91,7 +91,7 @@ const apply = {
<div class="form-actions">
<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="onFinishTask" type="info" round>提交</van-button>
<van-button @click="onFinishTask" v-else type="info" round>提交</van-button>
</div>
</van-form>
</van-action-sheet>
@@ -112,7 +112,9 @@ const apply = {
weekdayCNMap: {0: '周日', 1: '周一', 2: '周二', 3: '周三', 4: '周四', 5: '周五', 6: '周六'},
formVisible: false,
formData: {},
formData: {
applyCause: '',
},
calendarVisible: false,
}
@@ -37,7 +37,7 @@ layout("/layouts/platform_h5.html"){
<table-column label="预约日期">{{row.applyDay}}</table-column>
<table-column label="开始时间">{{row.startTime}}</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 #actions="{index,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"
v-if="isFemale" required></van-field>
<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="请输入天数"
type="number" required></van-field>
type="number" ></van-field>
<van-field label="合计天数" :value="totalLeaveDays" readonly></van-field>
<van-field label="休假时间起"
@@ -195,8 +195,6 @@ layout("/layouts/platform_h5.html"){
extendLeave: [{ required: true, message: '请输入延长假天数' }],
birthsLeave: [{ required: true, message: '请输入多胞胎天数' }],
difficultLeave: [{ required: true, message: '请输入难产假天数' }],
winterLeave: [{ required: true, message: '请输入寒假天数' }],
summerLeave: [{ required: true, message: '请输入暑假天数' }],
startTime: [{ required: true, message: '请选择休假开始时间' }],
endTime: [{ 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) {
errors.push('请选择休假开始时间');
}