文化活动活动时间可以选择时分秒;职工慰问收款人固定为申请人
This commit is contained in:
+4
-9
@@ -3,7 +3,6 @@ package com.budwk.app.zhgh.staffbenefit.condolence.controller;
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
@@ -26,7 +25,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
@@ -52,8 +50,6 @@ import java.util.List;
|
||||
@Ok("json:full")
|
||||
public class CondolenceApplyController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
@@ -75,9 +71,9 @@ public class CondolenceApplyController {
|
||||
@ApiOperation("保存申请")
|
||||
@SaCheckPermission(value = {"condolence.apply", "h5.condolence.apply"}, mode = SaMode.OR)
|
||||
@SLog(tag = "职工慰问系统-慰问申请", msg = "保存申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result save(@Param("data") Condolence condolence) {
|
||||
if(StrUtil.isBlank(condolence.getId())) condolence.setCreateTime(DateUtil.now());
|
||||
dao.insertOrUpdate(condolence);
|
||||
condolenceService.saveApplication(condolence);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@@ -87,8 +83,7 @@ public class CondolenceApplyController {
|
||||
@SLog(tag = "职工慰问系统-慰问申请", msg = "提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result submit(@Param("data") Condolence condolence) {
|
||||
if(StrUtil.isBlank(condolence.getId())) condolence.setCreateTime(DateUtil.now());
|
||||
dao.insertOrUpdate(condolence);
|
||||
condolenceService.saveApplication(condolence);
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
@@ -108,7 +103,7 @@ public class CondolenceApplyController {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"condolence.apply", "h5.condolence.apply"}, mode = SaMode.OR)
|
||||
public Result submitAgain(@Param("data") Condolence condolence, @Param("taskId") Long taskId) {
|
||||
dao.insertOrUpdate(condolence);
|
||||
condolenceService.saveApplication(condolence);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
|
||||
+6
@@ -14,6 +14,12 @@ import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
||||
* @Description TODO
|
||||
*/
|
||||
public interface CondolenceService extends BaseService<Condolence> {
|
||||
/**
|
||||
* 保存慰问申请,并使收款人始终与申请人一致;返回类型为 void,无返回数据。
|
||||
* @param condolence 表单中的慰问申请,申请人 ID、姓名和工号用于确定收款人
|
||||
*/
|
||||
void saveApplication(Condolence condolence);
|
||||
|
||||
/**
|
||||
* 按工会备案节点查询慰问任务,节点尚未配置时返回空分页。
|
||||
* @param pageForm 页码、每页条数、姓名/工号关键字及排序参数
|
||||
|
||||
+15
@@ -20,6 +20,8 @@ import org.nutz.lang.util.NutMap;
|
||||
import java.util.List;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
@@ -37,6 +39,19 @@ public class CondolenceServiceImpl extends BaseServiceImpl<Condolence> implement
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void saveApplication(Condolence condolence) {
|
||||
// 收款人以申请表中的申请人为准,覆盖旧草稿及请求中单独提交的收款人信息。
|
||||
condolence.setPayUserId(condolence.getApplyUserId());
|
||||
condolence.setPayUserName(condolence.getApplyUserName());
|
||||
condolence.setPayLoginName(condolence.getApplyLoginName());
|
||||
if (StrUtil.isBlank(condolence.getId())) {
|
||||
condolence.setCreateTime(DateUtil.now());
|
||||
}
|
||||
dao().insertOrUpdate(condolence);
|
||||
}
|
||||
|
||||
// 工会备案的 wf 节点代码,与流程定义中的 taskName 保持一致。
|
||||
private static final String UNION_RECORD_TASK_KEY = "80c3d6f8-978a-4f00-816e-338005240c7e";
|
||||
|
||||
|
||||
@@ -116,14 +116,17 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="实际活动时间" prop="time">
|
||||
<!-- 三类文化活动共用此表单,活动起止时间均保留到秒。 -->
|
||||
<el-date-picker
|
||||
end-placeholder="结束日期"
|
||||
align="right"
|
||||
end-placeholder="结束时间"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
start-placeholder="开始时间"
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
v-model="formData.time"
|
||||
value-format="yyyy-MM-dd">
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -3,7 +3,7 @@ layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<custom-card>
|
||||
<snaker-start slot="header" label="职工慰问" define_key="ZGWW"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
@@ -89,24 +89,7 @@ layout("/layouts/platform.html"){
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="收款人">
|
||||
<el-form-item prop="payUserId" label="收款人">
|
||||
<el-select style="width: 100%"
|
||||
v-model="formData.payUserId"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请输入姓名或工号查询"
|
||||
:remote-method="createRemoteMethod(payUserOptions)"
|
||||
@change="payUserChange">
|
||||
<el-option
|
||||
v-for="item in payUserOptions"
|
||||
:key="item.id"
|
||||
:label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
{{formData.applyUserName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问类型">
|
||||
<el-form-item prop="type" label="慰问类型">
|
||||
@@ -239,7 +222,7 @@ layout("/layouts/platform.html"){
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<template slot="footer">
|
||||
<el-button type="primary" plain @click="onSave" :loading="submitLoading">
|
||||
{{ submitLoading ? "提交中..." : "保存" }}
|
||||
</el-button>
|
||||
@@ -249,8 +232,8 @@ layout("/layouts/platform.html"){
|
||||
<el-button type="primary" @click="onFinishTask" :loading="submitLoading" v-else>
|
||||
{{ submitLoading ? "提交中..." : "提交" }}
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
</custom-card>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
@@ -267,7 +250,6 @@ layout("/layouts/platform.html"){
|
||||
submitLoading: false,
|
||||
formRules: {
|
||||
helpUserId: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
payUserId: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
type: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
way: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
money: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
@@ -291,7 +273,6 @@ layout("/layouts/platform.html"){
|
||||
hospitalizationTime: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
},
|
||||
chooseType: {},
|
||||
payUserOptions: [],
|
||||
helpUserOptions: [],
|
||||
typeOptions: [],
|
||||
|
||||
@@ -350,14 +331,6 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.formData, "certifierUnionName", unionName)
|
||||
}
|
||||
},
|
||||
payUserChange(val) {
|
||||
const user = this.payUserOptions.find(o => o.id === val)
|
||||
if (user) {
|
||||
const {userName, loginName} = user
|
||||
this.$set(this.formData, "payUserName", userName)
|
||||
this.$set(this.formData, "payLoginName", loginName)
|
||||
}
|
||||
},
|
||||
typeChange(id) {
|
||||
this.chooseType = this.typeOptions.find(o => o.id === id)
|
||||
if (this.chooseType) {
|
||||
@@ -436,7 +409,6 @@ layout("/layouts/platform.html"){
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
this.selectQueryUser(this.formData.helpLoginName, this.helpUserOptions)
|
||||
this.selectQueryUser(this.formData.payLoginName, this.payUserOptions)
|
||||
this.selectQueryUser(this.formData.certifierLoginName, this.certifierUserOptions)
|
||||
this.selectQueryUser(this.formData.handlerLoginName, this.handlerUserOptions)
|
||||
this.chooseType = this.typeOptions.find(o => o.id === this.formData.type)
|
||||
|
||||
@@ -150,39 +150,13 @@ layout("/layouts/platform_h5.html"){
|
||||
<!-- </van-action-sheet>-->
|
||||
|
||||
<van-field
|
||||
v-model="formData.payUserName"
|
||||
:value="formData.applyUserName"
|
||||
name="payUserName"
|
||||
label="收款人"
|
||||
required
|
||||
readonly
|
||||
:rules="[{ required: true }]"
|
||||
placeholder="请点击选择收款人"
|
||||
@click="payUserSelectShow = true"
|
||||
is-link
|
||||
></van-field>
|
||||
<van-action-sheet v-model="payUserSelectShow" title="收款人" class="height100">
|
||||
<van-search
|
||||
v-model="searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入工号或姓名选择收款人"
|
||||
@input="(val) => {userRemoteMethod(val, 'pay')}"
|
||||
@clear="(val) => {userRemoteMethod(val, 'pay')}"
|
||||
shape="round"
|
||||
></van-search>
|
||||
<div class="van-action-sheet__content mt5" v-if="userOptions && userOptions.length>0">
|
||||
<template>
|
||||
<template v-for="item in userOptions">
|
||||
<van-button native-type="button" @click="payUserChange(item)"
|
||||
class="van-action-sheet__item van-hairline--bottom">
|
||||
<span class="van-action-sheet__name">{{item.userName}}({{item.loginName}})</span>
|
||||
</van-button>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<van-empty description="暂无数据" v-else></van-empty>
|
||||
</van-action-sheet>
|
||||
|
||||
<van-field
|
||||
v-model="formData.typeName"
|
||||
@@ -409,7 +383,6 @@ layout("/layouts/platform_h5.html"){
|
||||
typeOptions: [],
|
||||
|
||||
helpUserSelectShow: false,
|
||||
payUserSelectShow: false,
|
||||
showTypePicker: false,
|
||||
typeColumns: [],
|
||||
searchKeyword: "",
|
||||
@@ -498,8 +471,6 @@ layout("/layouts/platform_h5.html"){
|
||||
this.certifierUserSelectShow = true
|
||||
} else if (type === "handler") {
|
||||
this.handlerUserSelectShow = true
|
||||
}else if (type === "pay") {
|
||||
this.payUserSelectShow = true
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -521,15 +492,6 @@ layout("/layouts/platform_h5.html"){
|
||||
this.searchKeyword = ""
|
||||
this.userOptions = []
|
||||
},
|
||||
payUserChange(user) {
|
||||
const { id, userName, loginName } = user
|
||||
this.$set(this.formData, "payUserId", id)
|
||||
this.$set(this.formData, "payUserName", userName)
|
||||
this.$set(this.formData, "payLoginName", loginName)
|
||||
this.payUserSelectShow = false
|
||||
this.searchKeyword = ""
|
||||
this.userOptions = []
|
||||
},
|
||||
typeChange(id) {
|
||||
this.chooseType = this.typeOptions.find(o => o.id === id)
|
||||
if (this.chooseType) {
|
||||
@@ -615,7 +577,6 @@ layout("/layouts/platform_h5.html"){
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
this.selectQueryUser(this.formData.helpLoginName, this.helpUserOptions)
|
||||
this.selectQueryUser(this.formData.payLoginName, this.payUserOptions)
|
||||
this.chooseType = this.typeOptions.find(o => o.id === this.formData.type)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user