commit
This commit is contained in:
+123
@@ -0,0 +1,123 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.condolence.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaMode;
|
||||||
|
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.staffbenefit.condolence.model.Condolence;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
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 org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/12/23 14:13
|
||||||
|
* @description 校工会预审
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/condolence/schoolPrincipalApproval")
|
||||||
|
@Api("职工慰问校工会预审")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class CondolenceSchoolPrincipalApprovalController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private CondolenceService condolenceService;
|
||||||
|
|
||||||
|
@At("/")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/schoolPrincipalApproval/index.html")
|
||||||
|
@SaCheckPermission("condolence.schoolPrincipalApproval")
|
||||||
|
public void index() {}
|
||||||
|
|
||||||
|
@At("/h5")
|
||||||
|
@Ok("beetl:/platform/zhghh5/staffbenefit/condolence/schoolPrincipalApproval/index.html")
|
||||||
|
@SaCheckPermission("h5.condolence.schoolPrincipalApproval")
|
||||||
|
public void h5Index() {}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission(value = {"condolence.schoolPrincipalApproval", "h5.condolence.schoolPrincipalApproval"}, mode = SaMode.OR)
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
@Param(value = "year") Integer year,
|
||||||
|
@Param(value = "type") String type,
|
||||||
|
@Param(value = "unionId") String unionId,
|
||||||
|
@Param(value = "unitId") String unitId,
|
||||||
|
@Param(value = "approval") Boolean approval) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
type.name as typeName,
|
||||||
|
ins.id AS instanceId,
|
||||||
|
ins.businessNo,
|
||||||
|
ins.state instanceState,
|
||||||
|
ins.variable instanceVariable,
|
||||||
|
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 condolence info ON info.id = ins.businessNo
|
||||||
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
|
LEFT JOIN condolence_type type ON info.type = type.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();
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.or(Condolence::getHelpUserName, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
|
seg.or(Condolence::getHelpLoginName, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
cnd.andEX("info.type", "=", type);
|
||||||
|
cnd.andEX("YEAR(info.createTime)", "=", year);
|
||||||
|
cnd.andEX("info.applyUnionId", "=", unionId);
|
||||||
|
cnd.andEX("info.applyUnitId", "=", unitId);
|
||||||
|
|
||||||
|
cnd.and("t.taskName", "=", "34f7938e-47a3-4b3a-b4e0-92b7a3f47865");
|
||||||
|
// cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
|
|
||||||
|
if (approval) {
|
||||||
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
|
} else {
|
||||||
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("info.createTime");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
cnd.groupBy("t.id");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination<NutMap> pageVO = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pageVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,20 +16,20 @@ layout("/layouts/platform.html"){
|
|||||||
<el-descriptions-item label="慰问对象">
|
<el-descriptions-item label="慰问对象">
|
||||||
<el-form-item prop="helpUserId" label="慰问对象">
|
<el-form-item prop="helpUserId" label="慰问对象">
|
||||||
<el-select
|
<el-select
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="formData.helpUserId"
|
v-model="formData.helpUserId"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
remote
|
remote
|
||||||
reserve-keyword
|
reserve-keyword
|
||||||
placeholder="请输入姓名或工号查询"
|
placeholder="请输入姓名或工号查询"
|
||||||
:remote-method="createRemoteMethod(helpUserOptions)"
|
:remote-method="createRemoteMethod(helpUserOptions)"
|
||||||
@change="helpUserChange">
|
@change="helpUserChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in helpUserOptions"
|
v-for="item in helpUserOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'"
|
:label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -37,33 +37,35 @@ layout("/layouts/platform.html"){
|
|||||||
<el-descriptions-item label="收款人">
|
<el-descriptions-item label="收款人">
|
||||||
<el-form-item prop="payUserId" label="慰问对象">
|
<el-form-item prop="payUserId" label="慰问对象">
|
||||||
<el-select
|
<el-select
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="formData.payUserId"
|
v-model="formData.payUserId"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
remote
|
remote
|
||||||
reserve-keyword
|
reserve-keyword
|
||||||
placeholder="请输入姓名或工号查询"
|
placeholder="请输入姓名或工号查询"
|
||||||
:remote-method="createRemoteMethod(payUserOptions)"
|
:remote-method="createRemoteMethod(payUserOptions)"
|
||||||
@change="payUserChange">
|
@change="payUserChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in payUserOptions"
|
v-for="item in payUserOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'"
|
:label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="慰问类型">
|
<el-descriptions-item label="慰问类型">
|
||||||
<el-select v-model="formData.type" @change="typeChange" style="width: 100%"
|
<el-form-item prop="type" label="慰问类型">
|
||||||
placeholder="请选择慰问类型">
|
<el-select v-model="formData.type" @change="typeChange" style="width: 100%"
|
||||||
<el-option v-for="item in typeOptions"
|
placeholder="请选择慰问类型">
|
||||||
:value="item.id"
|
<el-option v-for="item in typeOptions"
|
||||||
:key="item.id"
|
:value="item.id"
|
||||||
:disabled="!item.enable"
|
:key="item.id"
|
||||||
:label="item.name"></el-option>
|
:disabled="!item.enable"
|
||||||
</el-select>
|
:label="item.name"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="慰问方式">
|
<el-descriptions-item label="慰问方式">
|
||||||
<el-form-item prop="way" label="慰问方式">
|
<el-form-item prop="way" label="慰问方式">
|
||||||
@@ -92,12 +94,12 @@ layout("/layouts/platform.html"){
|
|||||||
<el-descriptions-item label="慰问时间">
|
<el-descriptions-item label="慰问时间">
|
||||||
<el-form-item label="慰问时间" prop="occurTime">
|
<el-form-item label="慰问时间" prop="occurTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="formData.occurTime"
|
v-model="formData.occurTime"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
placeholder="请选择慰问时间">
|
placeholder="请选择慰问时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@@ -174,11 +176,11 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
<el-form-item prop="files" label="附件">
|
<el-form-item prop="files" label="附件">
|
||||||
<file-upload
|
<file-upload
|
||||||
:value.sync="formData.files"
|
:value.sync="formData.files"
|
||||||
:upload_number="5"
|
:upload_number="5"
|
||||||
upload_result_category="array"
|
upload_result_category="array"
|
||||||
complete_result
|
complete_result
|
||||||
upload_mode="drag"
|
upload_mode="drag"
|
||||||
></file-upload>
|
></file-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@@ -208,21 +210,21 @@ layout("/layouts/platform.html"){
|
|||||||
taskId: GetQueryString("taskId"),
|
taskId: GetQueryString("taskId"),
|
||||||
formData: {},
|
formData: {},
|
||||||
formRules: {
|
formRules: {
|
||||||
helpUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
helpUserId: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
payUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
payUserId: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
type: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
type: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
way: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
way: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
money: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
money: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
occurTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
occurTime: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
child: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
child: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
hospital: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
hospital: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
hospitalHouseNum: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
hospitalHouseNum: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
hospitalHouseBedNum: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
hospitalHouseBedNum: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
hospitalBy: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
hospitalBy: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
deadImmediateFamily: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
deadImmediateFamily: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
remark: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
remark: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
files: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
files: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
// signature: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
|
signature: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
|
||||||
},
|
},
|
||||||
chooseType: {},
|
chooseType: {},
|
||||||
payUserOptions: [],
|
payUserOptions: [],
|
||||||
@@ -238,7 +240,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
selectQueryUser(keyword, options) {
|
selectQueryUser(keyword, options) {
|
||||||
options.length = 0
|
options.length = 0
|
||||||
this.$axios.post("/platform/condolence/apply/listUser", { keyword: keyword }).then((res) => {
|
this.$axios.post("/platform/condolence/apply/listUser", {keyword: keyword}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
options.push(...res.data)
|
options.push(...res.data)
|
||||||
}
|
}
|
||||||
@@ -247,7 +249,7 @@ layout("/layouts/platform.html"){
|
|||||||
helpUserChange(val) {
|
helpUserChange(val) {
|
||||||
const user = this.helpUserOptions.find(o => o.id === val)
|
const user = this.helpUserOptions.find(o => o.id === val)
|
||||||
if (user) {
|
if (user) {
|
||||||
const { userName, loginName, unitId, unitName, unionId, unionName } = user
|
const {userName, loginName, unitId, unitName, unionId, unionName} = user
|
||||||
this.$set(this.formData, "helpUserName", userName)
|
this.$set(this.formData, "helpUserName", userName)
|
||||||
this.$set(this.formData, "helpLoginName", loginName)
|
this.$set(this.formData, "helpLoginName", loginName)
|
||||||
this.$set(this.formData, "helpUnitId", unitId)
|
this.$set(this.formData, "helpUnitId", unitId)
|
||||||
@@ -259,7 +261,7 @@ layout("/layouts/platform.html"){
|
|||||||
payUserChange(val) {
|
payUserChange(val) {
|
||||||
const user = this.payUserOptions.find(o => o.id === val)
|
const user = this.payUserOptions.find(o => o.id === val)
|
||||||
if (user) {
|
if (user) {
|
||||||
const { userName, loginName } = user
|
const {userName, loginName} = user
|
||||||
this.$set(this.formData, "payUserName", userName)
|
this.$set(this.formData, "payUserName", userName)
|
||||||
this.$set(this.formData, "payLoginName", loginName)
|
this.$set(this.formData, "payLoginName", loginName)
|
||||||
}
|
}
|
||||||
@@ -277,7 +279,7 @@ layout("/layouts/platform.html"){
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post("/platform/condolence/apply/save", { data: JSON.stringify(this.formData) }).then(res => {
|
this.$axios.post("/platform/condolence/apply/save", {data: JSON.stringify(this.formData)}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
commonUtil.pjaxPush("/platform/condolence/mine")
|
commonUtil.pjaxPush("/platform/condolence/mine")
|
||||||
@@ -328,7 +330,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
if (this.bizId) {
|
if (this.bizId) {
|
||||||
this.$axios.post("/platform/condolence/mine/info", { id: this.bizId }).then((res) => {
|
this.$axios.post("/platform/condolence/mine/info", {id: this.bizId}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.formData = res.data
|
this.formData = res.data
|
||||||
this.selectQueryUser(this.formData.helpLoginName, this.helpUserOptions)
|
this.selectQueryUser(this.formData.helpLoginName, this.helpUserOptions)
|
||||||
@@ -337,7 +339,7 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const { username, loginname, id, unit, union, mobile } = this.$store.state.user
|
const {username, loginname, id, unit, union, mobile} = this.$store.state.user
|
||||||
this.formData = {
|
this.formData = {
|
||||||
applyUserName: username,
|
applyUserName: username,
|
||||||
applyLoginName: loginname,
|
applyLoginName: loginname,
|
||||||
|
|||||||
-46
@@ -1,46 +0,0 @@
|
|||||||
<div id="condolence-apply-form" v-cloak>
|
|
||||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
|
||||||
<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>
|
|
||||||
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script nonce="${cspNonce!}">
|
|
||||||
new Vue({
|
|
||||||
el: "#condolence-apply-form",
|
|
||||||
store,
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
businessId: GetQueryString("businessId"),
|
|
||||||
formData: {},
|
|
||||||
formRules: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleTaskAction(val) {
|
|
||||||
this.$axios
|
|
||||||
.post("/flow/common/executeTask", {
|
|
||||||
data: JSON.stringify({
|
|
||||||
...val,
|
|
||||||
...this.formData
|
|
||||||
})
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
// 发送完成消息
|
|
||||||
window.parent.postMessage(
|
|
||||||
{
|
|
||||||
type: "task-complete"
|
|
||||||
},
|
|
||||||
"*"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleCancel(val) {}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
+218
@@ -0,0 +1,218 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<guava ref="guava">
|
||||||
|
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="pageForm.year"
|
||||||
|
type="year"
|
||||||
|
value-format="yyyy"
|
||||||
|
placeholder="请选择年度"
|
||||||
|
style="width: 100%"
|
||||||
|
@change="doSearch"
|
||||||
|
></el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="姓名/工号">
|
||||||
|
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
|
||||||
|
@keyup.enter.native="doSearch">
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="慰问类型">
|
||||||
|
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
|
||||||
|
placeholder="请选择慰问类型" filterable clearable>
|
||||||
|
<el-option v-for="item in typeOptions"
|
||||||
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
|
||||||
|
@change="doSearch" style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in unionList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属单位">
|
||||||
|
<el-select @change="doSearch"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择单位" style="width: 100%" v-model="pageForm.unitId">
|
||||||
|
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitList"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never">
|
||||||
|
<table-tool label="申请列表">
|
||||||
|
<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
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:width="column.width"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
|
<template v-slot="{ row }" v-if="column.prop === 'instanceState'">
|
||||||
|
<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="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button v-if="row.taskState === 10" @click="onAudit(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>
|
||||||
|
<condolence-info ref="condolenceInfoRef">
|
||||||
|
<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_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>
|
||||||
|
</condolence-info>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script nonce="${cspNonce!}">
|
||||||
|
<!--#include('../common/info.js'){}#-->
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
store,
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {
|
||||||
|
"condolence-info": condolenceInfo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageForm: {
|
||||||
|
approval: false
|
||||||
|
},
|
||||||
|
typeOptions: [],
|
||||||
|
tableColumns: [
|
||||||
|
{prop: 'helpUserName', label: '慰问对象'},
|
||||||
|
{prop: 'helpLoginName', label: '慰问对象工号'},
|
||||||
|
{prop: 'applyUserName', label: '申请人'},
|
||||||
|
{prop: 'applyUnionName', label: '所属工会'},
|
||||||
|
{prop: 'applyUnitName', label: '所属单位'},
|
||||||
|
{prop: 'typeName', label: '慰问类型'},
|
||||||
|
{prop: 'curTaskName', label: '当前节点'},
|
||||||
|
{prop: 'instanceState', label: '流程状态'},
|
||||||
|
],
|
||||||
|
unionList: [],
|
||||||
|
unitList: [],
|
||||||
|
formData: {},
|
||||||
|
showApprovalForm: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onView(row) {
|
||||||
|
this.$refs.guava.edit(()=>{
|
||||||
|
this.showApprovalForm = false
|
||||||
|
this.$refs.condolenceInfoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onAudit(row) {
|
||||||
|
this.$refs.guava.edit(()=>{
|
||||||
|
this.showApprovalForm = true
|
||||||
|
this.formData = {
|
||||||
|
processTaskId: row.taskId,
|
||||||
|
taskName: row.curTaskName
|
||||||
|
}
|
||||||
|
this.$refs.condolenceInfoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleTaskAction(val) {
|
||||||
|
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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
queryCondolenceType() {
|
||||||
|
this.$axios.post('/platform/condolence/type/queryCondolenceType')
|
||||||
|
.then((resp) => {
|
||||||
|
this.typeOptions = resp.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.unionList = await this.$businessTool.listUnion()
|
||||||
|
this.unitList = await this.$businessTool.listUnit()
|
||||||
|
this.queryCondolenceType()
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
-46
@@ -1,46 +0,0 @@
|
|||||||
<div id="condolence-apply-form" v-cloak>
|
|
||||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
|
||||||
<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>
|
|
||||||
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script nonce="${cspNonce!}">
|
|
||||||
new Vue({
|
|
||||||
el: "#condolence-apply-form",
|
|
||||||
store,
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
businessId: GetQueryString("businessId"),
|
|
||||||
formData: {},
|
|
||||||
formRules: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleTaskAction(val) {
|
|
||||||
this.$axios
|
|
||||||
.post("/flow/common/executeTask", {
|
|
||||||
data: JSON.stringify({
|
|
||||||
...val,
|
|
||||||
...this.formData
|
|
||||||
})
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
// 发送完成消息
|
|
||||||
window.parent.postMessage(
|
|
||||||
{
|
|
||||||
type: "task-complete"
|
|
||||||
},
|
|
||||||
"*"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleCancel(val) {}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
+1
-1
@@ -154,7 +154,7 @@ layout("/layouts/platform.html"){
|
|||||||
<script nonce="${cspNonce!}">
|
<script nonce="${cspNonce!}">
|
||||||
<!--#include("schoolViewAndHandle.js"){}#-->
|
<!--#include("schoolViewAndHandle.js"){}#-->
|
||||||
<!--#include("viewChangeTypeUser.js"){}#-->
|
<!--#include("viewChangeTypeUser.js"){}#-->
|
||||||
<!--#include("../../../common/change/memberChange.js"){}#-->
|
<!--#include("../../../change/common/memberChange.js"){}#-->
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
|
|||||||
+190
@@ -0,0 +1,190 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform_h5.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<van-nav-bar title="校工会审核" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||||
|
|
||||||
|
<van-sticky offset-top="46px">
|
||||||
|
<van-search
|
||||||
|
v-model="pageForm.searchKeyword"
|
||||||
|
:show-action="false"
|
||||||
|
:reverse-color="false"
|
||||||
|
input-align="left"
|
||||||
|
placeholder="请输入姓名或者工号搜索"
|
||||||
|
@search="doSearch"
|
||||||
|
></van-search>
|
||||||
|
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||||
|
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||||
|
<van-dropdown-item v-model="pageForm.type" :options="typeOptions" :multiple="false"
|
||||||
|
@change="doSearch"></van-dropdown-item>
|
||||||
|
</van-dropdown-menu>
|
||||||
|
<van-tabs v-model="pageForm.approvalText"
|
||||||
|
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||||
|
<van-tab title="已审核" name="1"></van-tab>
|
||||||
|
<van-tab title="未审核" name="0"></van-tab>
|
||||||
|
</van-tabs>
|
||||||
|
</van-sticky>
|
||||||
|
|
||||||
|
<table-list api="/platform/condolence/schoolPrincipalApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" @ready="onReady">
|
||||||
|
<template v-slot="{index,row}">
|
||||||
|
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
|
||||||
|
<table-column label="慰问对象工号">{{row.helpLoginName}}</table-column>
|
||||||
|
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
||||||
|
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
||||||
|
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||||
|
<table-column label="慰问类型">{{row.typeName}}</table-column>
|
||||||
|
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||||
|
</template>
|
||||||
|
<template #actions="{index,row}">
|
||||||
|
<div class="action-btn" @click="onView(row)">
|
||||||
|
<i class="fa fa-eye"></i>
|
||||||
|
<span>查看</span>
|
||||||
|
</div>
|
||||||
|
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||||
|
<i class="fa fa-edit"></i>
|
||||||
|
<span>审核</span>
|
||||||
|
</div>
|
||||||
|
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||||
|
<i class="fa fa-reply"></i>
|
||||||
|
<span>撤回</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</table-list>
|
||||||
|
|
||||||
|
<info ref="infoRef">
|
||||||
|
<div v-if="showApprovalForm">
|
||||||
|
<div class="process-title">{{formData.taskName}}</div>
|
||||||
|
<van-form ref="formRef">
|
||||||
|
<van-field
|
||||||
|
v-model="formData.tf_opinion"
|
||||||
|
name="tf_opinion"
|
||||||
|
label="审批意见"
|
||||||
|
placeholder="请输入审批意见"
|
||||||
|
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||||
|
required
|
||||||
|
maxlength="100"
|
||||||
|
show-word-limit
|
||||||
|
></van-field>
|
||||||
|
</van-form>
|
||||||
|
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||||
|
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||||
|
<van-button type="danger" block @click="handleTaskAction(20)">不同意</van-button>
|
||||||
|
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</info>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script nonce="${cspNonce!}">
|
||||||
|
<!--#include('../common/info.js'){}#-->
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
store,
|
||||||
|
components: {
|
||||||
|
info: condolenceInfo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageForm: {
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
totalCount: 0,
|
||||||
|
searchKeyword: '',
|
||||||
|
approvalText: "0",
|
||||||
|
approval: false,
|
||||||
|
year: new Date().getFullYear(),
|
||||||
|
type: null,
|
||||||
|
},
|
||||||
|
typeOptions: [],
|
||||||
|
formData: {},
|
||||||
|
showApprovalForm: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async onReady() {
|
||||||
|
const typeList = await this.queryCondolenceType()
|
||||||
|
this.typeOptions = [
|
||||||
|
{
|
||||||
|
text: "全部慰问类型",
|
||||||
|
value: null
|
||||||
|
}
|
||||||
|
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
|
||||||
|
if (this.typeOptions.length > 0) {
|
||||||
|
this.pageForm.type = this.typeOptions[0].value
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onView(row) {
|
||||||
|
this.showApprovalForm = false
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
},
|
||||||
|
onApproval(row) {
|
||||||
|
this.showApprovalForm = true
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
this.formData = {
|
||||||
|
processTaskId: row.taskId,
|
||||||
|
taskName: row.curTaskName
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleTaskAction(val) {
|
||||||
|
try {
|
||||||
|
await this.$refs.formRef.validate();
|
||||||
|
this.$dialog.confirm({
|
||||||
|
title: "提示",
|
||||||
|
message: "您确定要提交吗?"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
|
})
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$refs.infoRef.onClose()
|
||||||
|
this.$toast.success(res.msg)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onRevoke(row){
|
||||||
|
this.$dialog.confirm({
|
||||||
|
title: "提示",
|
||||||
|
message: "您确定要撤回吗?"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$toast.success(res.msg)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async queryCondolenceType() {
|
||||||
|
const res = await this.$axios.post('/platform/condolence/type/queryCondolenceType')
|
||||||
|
return res.data
|
||||||
|
},
|
||||||
|
doSearch() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.pageForm.pageNumber = 1
|
||||||
|
this.pageForm.totalCount = 0
|
||||||
|
this.$refs.tableListRef.doSearch()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
Reference in New Issue
Block a user