This commit is contained in:
JyuHsin
2025-04-21 14:12:46 +08:00
parent d3524f8e8e
commit ddc374613a
6 changed files with 108 additions and 66 deletions
@@ -50,7 +50,7 @@ public class preAuditManageController {
SELECT * FROM `reimbursement_pre_audit` $condition SELECT * FROM `reimbursement_pre_audit` $condition
"""); """);
cnd.andEX("YEAR(applyDate)", "=", year); cnd.andEX("YEAR(applyDate)", "=", year);
cnd.andEX("userId", "=", ShiroUtil.getUserId()); cnd.andEX("unionId", "=", Vi.getUnionId());
cnd.desc("applyDate").desc("opAt"); cnd.desc("applyDate").desc("opAt");
if (StrUtil.isNotEmpty(notes)) { if (StrUtil.isNotEmpty(notes)) {
cnd.andEX("notes", "like", "%" + notes + "%"); cnd.andEX("notes", "like", "%" + notes + "%");
@@ -37,23 +37,26 @@ public class preAuditQueryController {
@At @At
@ViReturn @ViReturn
@RequiresPermissions("reimbursementPreAudit.manage") @RequiresPermissions("reimbursementPreAudit.manage")
public Object pageData(PageForm pageForm, String startDate, String endDate, String notes,String unitId,String unionId) { public Object pageData(PageForm pageForm, String startDate, String endDate, String notes, String unitId, String unionId) {
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT * FROM `reimbursement_pre_audit` $condition SELECT * FROM `reimbursement_pre_audit` $condition
"""); """);
cnd.andEX("applyDate", ">=", startDate); cnd.andEX("applyDate", ">=", startDate);
cnd.andEX("applyDate", "<=", endDate); cnd.andEX("applyDate", "<=", endDate);
cnd.andEX("userId", "=", ShiroUtil.getUserId()); cnd.andEX("auditState", ">=", 3);
cnd.andEX("auditState", "=", 3);
cnd.andEX("unitId", "=", unitId); cnd.andEX("unitId", "=", unitId);
cnd.andEX("unionId", "=", unionId); cnd.andEX("unionId", "=", unionId);
cnd.desc("applyDate").desc("opAt");
if (StrUtil.isNotEmpty(notes)) { if (StrUtil.isNotEmpty(notes)) {
cnd.andEX("notes", "like", "%" + notes + "%"); cnd.andEX("notes", "like", "%" + notes + "%");
} }
if (StrUtil.isAllNotEmpty(pageForm.getSearchName(), pageForm.getSearchKeyword())) {
cnd.and(Cnd.likeEX(pageForm.getSearchName(), pageForm.getSearchKeyword()));
}
if (StrUtil.isAllNotEmpty(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) { if (StrUtil.isAllNotEmpty(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.orderBy(pageForm.getPageOrderName(), pageForm.getPageOrderBy()); cnd.orderBy(pageForm.getPageOrderName(), pageForm.getPageOrderBy());
}else{
cnd.desc("applyDate").desc("opAt");
} }
sql.setCondition(cnd); sql.setCondition(cnd);
return baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); return baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
@@ -57,11 +57,14 @@ public class preAuditSchoolController {
if (StrUtil.isNotEmpty(notes)) { if (StrUtil.isNotEmpty(notes)) {
cnd.andEX("notes", "like", "%" + notes + "%"); cnd.andEX("notes", "like", "%" + notes + "%");
} }
cnd.andEX("userId", "=", ShiroUtil.getUserId());
cnd.desc("applyDate").desc("opAt");
if (StrUtil.isAllNotEmpty(pageForm.getSearchName(), pageForm.getSearchKeyword())) {
cnd.and(Cnd.likeEX(pageForm.getSearchName(), pageForm.getSearchKeyword()));
}
if (StrUtil.isAllNotEmpty(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) { if (StrUtil.isAllNotEmpty(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.orderBy(pageForm.getPageOrderName(), pageForm.getPageOrderBy()); cnd.orderBy(pageForm.getPageOrderName(), pageForm.getPageOrderBy());
}else{
cnd.desc("applyDate").desc("opAt");
} }
sql.setCondition(cnd); sql.setCondition(cnd);
return baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); return baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
@@ -25,13 +25,31 @@ layout("/layouts/platform.html"){
</div> </div>
<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-input v-model="pageForm.notes" placeholder="请选择或输入摘要" clearable> <el-input @keyup.enter.native="doSearch" clearable
placeholder="请输入内容"
v-model="pageForm.searchKeyword">
<el-select clearable placeholder="查询类型"
slot="prepend"
style="width: 100px;"
v-model="pageForm.searchName">
<el-option label="姓名" value="userName"></el-option>
<el-option label="工号" value="loginName"></el-option>
</el-select>
</el-input> </el-input>
</div> </div>
</div> </div>
<div class="search-item">
<div class="search-item-label">摘要:</div>
<div class="search-item-option">
<el-input v-model="pageForm.notes" placeholder="请输入摘要" clearable>
</el-input>
</div>
</div>
<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">
@@ -176,16 +194,17 @@ layout("/layouts/platform.html"){
unions: [], unions: [],
pageForm: { pageForm: {
auditState: 0, auditState: 0,
searchName: "userName",
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,
@@ -32,9 +32,26 @@ layout("/layouts/platform.html"){
</div> </div>
<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-input v-model="pageForm.notes" placeholder="请选择或输入摘要" clearable> <el-input @keyup.enter.native="doSearch" clearable
placeholder="请输入内容"
v-model="pageForm.searchKeyword">
<el-select clearable placeholder="查询类型"
slot="prepend"
style="width: 100px;"
v-model="pageForm.searchName">
<el-option label="姓名" value="userName"></el-option>
<el-option label="工号" value="loginName"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">摘要:</div>
<div class="search-item-option">
<el-input v-model="pageForm.notes" placeholder="请输入摘要" clearable>
</el-input> </el-input>
</div> </div>
</div> </div>
@@ -136,13 +153,13 @@ 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: {},
viewDialogVisible: false, viewDialogVisible: false,
@@ -126,7 +126,7 @@ layout("/layouts/platform.html"){
@click="doExport">导出 @click="doExport">导出
</el-button> </el-button>
<el-button size="medium" <el-button size="medium"
@click="$refs.guava.view()"> @click="$refs.guava.view();$refs.unionCadreAudit.pageData()">
<i <i
class="el-icon-s-check"></i> class="el-icon-s-check"></i>
基层干部审核 基层干部审核
@@ -938,7 +938,7 @@ layout("/layouts/platform.html"){
<template #view> <template #view>
<union-cadre-audit :key="time"></union-cadre-audit> <union-cadre-audit :key="time" ref="unionCadreAudit"></union-cadre-audit>
</template> </template>