commit
This commit is contained in:
+2
-2
@@ -32,7 +32,7 @@ import java.util.List;
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
@Api(tags = "校工会审核年度预算申报")
|
||||
@Api(tags = "校工会审核-年度预算申报")
|
||||
@At("/platform/activity/budget/schoolAudit")
|
||||
public class ActivityBudgetSchoolAuditController {
|
||||
|
||||
@@ -89,7 +89,7 @@ public class ActivityBudgetSchoolAuditController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "b6f29037-972d-4b97-8677-c3b3672ef0dc");
|
||||
// cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.outlayManageSource", "=", outlayManageSource);
|
||||
cnd.andEX("info.budgetReimburseType", "=", budgetReimburseType);
|
||||
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
package com.budwk.app.zhgh.dayofficework.outlay.activityBudget.conteoller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.outlay.activityBudget.service.ActivityBudgetService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/12/9 17:12
|
||||
* @description 校工会预审核
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
@Api(tags = "校工会预审核-年度预算申报")
|
||||
@At("/platform/activity/budget/schoolPrincipal")
|
||||
public class ActivityBudgetSchoolPrincipalController {
|
||||
|
||||
@Inject
|
||||
private ActivityBudgetService activityBudgetService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/outlay/activityBudget/schoolPrincipal/index.html")
|
||||
@SaCheckPermission("activity.budget.schoolPrincipal")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("activity.budget.schoolPrincipal")
|
||||
public Result pageData(PageForm pageForm,
|
||||
Integer year,
|
||||
String unionId,
|
||||
String clubId,
|
||||
String budgetReimburseType,
|
||||
Boolean approval,
|
||||
String outlayManageSource,
|
||||
String activityMatter) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
YEAR(info.applyDate) year,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariale,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN activity_budget info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "0b6aea8c-9d24-4d6d-b10b-4c930c919093");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.outlayManageSource", "=", outlayManageSource);
|
||||
cnd.andEX("info.budgetReimburseType", "=", budgetReimburseType);
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("info.loginName", pageForm.getSearchKeyword());
|
||||
group.orLike("info.userName", pageForm.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
}
|
||||
|
||||
|
||||
cnd.andEX("YEAR(info.applyDate)", "=", year);
|
||||
cnd.and(Cnd.likeEX("info.activityMatter", activityMatter));
|
||||
cnd.groupBy("t.id");
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("t.createdAt").desc("info.applyDate");
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pageVO = activityBudgetService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pageVO);
|
||||
}
|
||||
}
|
||||
+235
@@ -0,0 +1,235 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@change="doSearch"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="申报人">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号/姓名"
|
||||
clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="活动项目">
|
||||
<el-input v-model="pageForm.activityMatter" placeholder="请输入活动项目"
|
||||
clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会"
|
||||
v-if="!pageForm.outlayManageSource||pageForm.outlayManageSource==='ACTIVITY_BUDGET_TYPE_TWO'">
|
||||
<el-select v-model="pageForm.unionId" filterable
|
||||
clearable
|
||||
placeholder="请选择所属工会" style="width: 100%;">
|
||||
<el-option v-for="item in unionList" :label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="预算条目">
|
||||
<dict-select v-model="pageForm.budgetReimburseType"
|
||||
code="ACTIVITY_BUDGET_REIMBURSE_TYPE"></dict-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="申报列表">
|
||||
<el-radio-group @change="budgetTypeCodeChange" size="small"
|
||||
style="margin-left: 10px;"
|
||||
v-model="pageForm.outlayManageSource">
|
||||
<el-radio-button :label="item.code"
|
||||
:key="item.code" v-for="item in budgetTypeOption">
|
||||
{{item.name}}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="year" label="年度"></el-table-column>
|
||||
<el-table-column prop="userName" label="申报人姓名"></el-table-column>
|
||||
<el-table-column prop="loginName" label="申报人工号"></el-table-column>
|
||||
<el-table-column prop="outlayManageSource" label="申报类型">
|
||||
<template slot-scope="{row}">
|
||||
<dict-tag :options="budgetTypeOption"
|
||||
:value="row.outlayManageSource"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="budgetReimburseType" label="预算条目">
|
||||
<template slot-scope="{row}">
|
||||
<dict-tag :options="budgetReimburseTypeOption"
|
||||
:value="row.budgetReimburseType"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="helpUnitName" label="申报单位"></el-table-column>
|
||||
<el-table-column prop="activityMatter" label="活动项目"></el-table-column>
|
||||
<el-table-column prop="declareTotalBudgetMoney" label="申报预算金额"></el-table-column>
|
||||
<el-table-column prop="applyDate" label="申报时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #edit>
|
||||
<activity-budget-info ref="activityBudgetInfo">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审核金额" prop="tf_totalBudgetMoney"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number :min="0" :precision="2"
|
||||
placeholder="请输入审核金额"
|
||||
style="width: 100%"
|
||||
v-model="formData.tf_totalBudgetMoney"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</activity-budget-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/activity/budget/schoolAudit/pageData",
|
||||
budgetTypeOption: [],
|
||||
budgetReimburseTypeOption: [],
|
||||
clubOption: [],
|
||||
unionList: [],
|
||||
pageForm: {
|
||||
year: moment().format("YYYY"),
|
||||
outlayManageSource: "",
|
||||
activityMatter: "",
|
||||
unionId: "",
|
||||
clubId: "",
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"activity-budget-info": ACTIVITY_BUDGET_INFO
|
||||
},
|
||||
methods: {
|
||||
budgetTypeCodeChange() {
|
||||
this.$set(this.pageForm, "unionId", '')
|
||||
this.$set(this.pageForm, "clubId", '')
|
||||
this.doSearch()
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.activityBudgetInfo.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
tf_totalBudgetMoney: 0,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.activityBudgetInfo.onOpen(row)
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
||||
this.budgetReimburseTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_REIMBURSE_TYPE")
|
||||
this.budgetTypeOption.unshift({name: "全部类型", code: ""})
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user