工会干部培训、健身卡、省级互助保障
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@ public class CadreTrainingMineController {
|
||||
@SaCheckPermission(value = {"cadreTraining.mine", "h5.cadreTraining.mine"}, mode = SaMode.OR)
|
||||
public Result pageData(@Valid PageForm pageForm, Integer year) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
SELECT DISTINCT
|
||||
info.*,
|
||||
ct.name,
|
||||
ct.signUpStartTime,
|
||||
|
||||
+26
-16
@@ -3,7 +3,7 @@ package com.budwk.app.zhgh.dayofficework.cadreTraining.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 java.util.ArrayList;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
@@ -17,12 +17,10 @@ import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.activity.culture.models.ActivityTissuePerson;
|
||||
import com.budwk.app.zhgh.dayofficework.cadreTraining.model.CadreTrainingAct;
|
||||
import com.budwk.app.zhgh.dayofficework.cadreTraining.model.CadreTrainingSignUp;
|
||||
import com.budwk.app.zhgh.dayofficework.cadreTraining.service.CadreTrainingActService;
|
||||
import com.budwk.app.zhgh.dayofficework.cadreTraining.service.CadreTrainingSignUpService;
|
||||
import com.budwk.app.zhgh.dayofficework.rest.models.RestActSignUp;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.dao.Cnd;
|
||||
@@ -93,24 +91,33 @@ public class CadreTrainingSignUpController {
|
||||
@At
|
||||
@ApiOperation("提交申请")
|
||||
@SaCheckPermission(value = {"cadreTraining.branchUnionSignUp", "h5.cadreTraining.branchUnionSignUp"}, mode = SaMode.OR)
|
||||
public Result submit(@Param("data") CadreTrainingSignUp cadreTrainingSignUp) {
|
||||
if (StrUtil.isBlank(cadreTrainingSignUp.getId())) cadreTrainingSignUp.setApplyTime(new Date());
|
||||
public Result submit(@Param("data") CadreTrainingSignUp[] cadreTrainingSignUps) {
|
||||
List<ProcessInstance> instances = new ArrayList<>();
|
||||
|
||||
dao.insertOrUpdate(cadreTrainingSignUp);
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, cadreTrainingSignUp);
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("GHGBPX", cadreTrainingSignUp.getId(), SecurityUtil.getUserId(), args);
|
||||
for (CadreTrainingSignUp signUp : cadreTrainingSignUps) {
|
||||
if (StrUtil.isBlank(signUp.getId())) {
|
||||
signUp.setApplyTime(new Date());
|
||||
}
|
||||
dao.insertOrUpdate(signUp);
|
||||
|
||||
// 自动完成第一个申请任务
|
||||
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||
for (ProcessTask task : doingTaskList) {
|
||||
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, signUp);
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("GHGBPX", signUp.getId(), SecurityUtil.getUserId(), args);
|
||||
instances.add(instance);
|
||||
|
||||
// 自动完成第一个申请任务
|
||||
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||
for (ProcessTask task : doingTaskList) {
|
||||
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||
}
|
||||
}
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation(value = "队友搜索")
|
||||
@@ -131,11 +138,14 @@ public class CadreTrainingSignUpController {
|
||||
@SaCheckPermission("cadreTraining.branchUnionSignUp")
|
||||
@ApiOperation("查询报名用户")
|
||||
public Result listSignUser(@Param("activityId") String activityId) {
|
||||
List<CadreTrainingSignUp> list = dao.query(CadreTrainingSignUp.class, Cnd.where(CadreTrainingSignUp::getCadreTrainingActId, "=", activityId).and(CadreTrainingSignUp::getUnionId, "=", SecurityUtil.getUnionId()));
|
||||
List<CadreTrainingSignUp> list = dao.query(CadreTrainingSignUp.class,
|
||||
Cnd.where(CadreTrainingSignUp::getCadreTrainingActId, "=", activityId)
|
||||
.and(CadreTrainingSignUp::getUnionId, "=", SecurityUtil.getUnionId()));
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("cadreTraining.branchUnionSignUp")
|
||||
@ApiOperation("查询本分工会名额")
|
||||
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
package com.budwk.app.zhgh.dayofficework.exerciseCard.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
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.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.web.commons.base.Globals;
|
||||
import com.budwk.app.zhgh.dayofficework.exerciseCard.model.ExerciseCard;
|
||||
import com.budwk.app.zhgh.dayofficework.exerciseCard.service.ExerciseCardService;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
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.AdaptBy;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.mvc.upload.TempFile;
|
||||
import org.nutz.mvc.upload.UploadAdaptor;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/10/13 15:11
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/exerciseCard/mine")
|
||||
@Api("查询条件")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class ExerciseCardMineController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private ExerciseCardService exerciseCardService;
|
||||
@Inject
|
||||
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/exerciseCard/mine/index.html")
|
||||
@SaCheckPermission("exerciseCard.mine")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"exerciseCard.mine", "h5.exerciseCard.mine"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm,
|
||||
Integer year,
|
||||
String unionId,
|
||||
String unitId,
|
||||
String searchKeyword,
|
||||
String sex) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
// 年度查询条件
|
||||
cnd.andEX("year(applyTime)", "=", year);
|
||||
cnd.andEX("userID", "=", SecurityUtil.getUserId());
|
||||
|
||||
cnd.desc("applyTime");
|
||||
Pagination pagination = exerciseCardService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
@At
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"exerciseCard.mine", "h5.exerciseCard.mine"}, mode = SaMode.OR)
|
||||
@SLog( tag = "删除工会报销", msg = "删除工会报销")
|
||||
public Result delete(@Param("id") String id) {
|
||||
exerciseCardService.delete(id);
|
||||
return Result.success();
|
||||
}
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission(value = {"exerciseCard.mine", "h5.exerciseCard.mine"}, mode = SaMode.OR)
|
||||
@SLog(tag = "健身卡", msg = "导出证明模板")
|
||||
public void doExportApply(@Valid String id, HttpServletResponse response) {
|
||||
ExerciseCard info = dao.fetch(ExerciseCard.class, id);
|
||||
Map<String, Object> docData = BeanUtil.beanToMap(info);
|
||||
docData.put("time", DateUtil.format(new java.util.Date(), "yyyy年MM月dd日"));
|
||||
String fileName = Globals.AppName + "【" + info.getUserName() + "】健身卡充值证明.docx";
|
||||
|
||||
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
||||
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("exercise_card_proof")).render(docData).writeAndClose(byteArrayOutputStream);
|
||||
CommonDownloadUtil.download(fileName, byteArrayOutputStream.toByteArray(), response);
|
||||
} catch (IOException e) {
|
||||
log.error("健身卡充值证明,id:{},错误信息:{}", id, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+37
-13
@@ -6,11 +6,14 @@ 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.alibaba.excel.EasyExcel;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
@@ -19,11 +22,13 @@ import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.exerciseCard.vo.ExercisePeopleImportVo;
|
||||
import com.budwk.app.zhgh.staffbenefit.maternityLeave.models.MaternityLeave;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceProject;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceUserInfo;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceProjectService;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -43,8 +48,10 @@ import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
@@ -70,6 +77,8 @@ public class MutualInsuranceApplyController {
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
@Inject
|
||||
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
|
||||
@Inject
|
||||
private MutualInsuranceProjectService mutualInsuranceProjectService;
|
||||
@Inject
|
||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
||||
@@ -91,17 +100,6 @@ public class MutualInsuranceApplyController {
|
||||
@SLog(tag = "生育休假-休假申请", msg = "保存休假申请")
|
||||
public Result save(@Param("data") MutualInsuranceUserInfo mutualInsuranceUserInfo) {
|
||||
if (StrUtil.isBlank(mutualInsuranceUserInfo.getId())) mutualInsuranceUserInfo.setApplyTime(new Date());
|
||||
mutualInsuranceUserInfo.setIsSubmit("未提交");
|
||||
dao.insertOrUpdate(mutualInsuranceUserInfo);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("提交申请")
|
||||
@SaCheckPermission(value = {"mutualInsurance.apply", "h5.mutualInsurance.apply"}, mode = SaMode.OR)
|
||||
public Result submit(@Param("data") MutualInsuranceUserInfo mutualInsuranceUserInfo) {
|
||||
if (StrUtil.isBlank(mutualInsuranceUserInfo.getId())) mutualInsuranceUserInfo.setApplyTime(new Date());
|
||||
mutualInsuranceUserInfo.setIsSubmit("已提交");
|
||||
dao.insertOrUpdate(mutualInsuranceUserInfo);
|
||||
return Result.success();
|
||||
}
|
||||
@@ -164,5 +162,31 @@ public class MutualInsuranceApplyController {
|
||||
Pagination pagination = mutualInsuranceUserService.listPageMap(1, 10, sql);
|
||||
return Result.success().addData(pagination.getList());
|
||||
}
|
||||
@At
|
||||
@Ok("void")
|
||||
@ApiOperation("导入模板下载")
|
||||
@SaCheckPermission("mutualInsurance.apply")
|
||||
public void downloadTemplate(HttpServletResponse response) {
|
||||
try {
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
String fileName = "省级互助保障给付申请书模板.docx";
|
||||
String encodedFileName = URLEncoder.encode("省级互助保障给付申请书模板", "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + encodedFileName + "\"");
|
||||
Map<String, Object> docData = new HashMap<>();
|
||||
|
||||
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
||||
XWPFTemplate template = XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("mutual_insurance_user_info1"));
|
||||
template.render(docData);
|
||||
template.writeAndClose(byteArrayOutputStream);
|
||||
CommonDownloadUtil.download(fileName, byteArrayOutputStream.toByteArray(), response);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("模板下载失败", e);
|
||||
throw new RuntimeException("导出失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+7
-30
@@ -75,34 +75,13 @@ public class MutualInsuranceCollectController {
|
||||
String searchKeyword,
|
||||
String sex) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
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,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
|
||||
FROM
|
||||
mutual_insurance_user_info info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
SELECT
|
||||
info.*
|
||||
FROM
|
||||
mutual_insurance_user_info info
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
// 年度查询条件
|
||||
// cnd.andEX("year(info.applyTime)", "=", year);
|
||||
|
||||
//事项id查询
|
||||
cnd.andEX("info.projectId", "=", projectId);
|
||||
@@ -122,15 +101,13 @@ public class MutualInsuranceCollectController {
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
// 只查询流程实例状态为20的数据(已完成状态)
|
||||
// cnd.and("ins.state", "=", 20);
|
||||
|
||||
cnd.desc("info.applyTime");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
|
||||
+1
-20
@@ -92,28 +92,9 @@ public class MutualInsuranceMineController {
|
||||
public Result pageData(PageForm pageForm, @Param(value = "year") Integer year) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
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,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
|
||||
info.*
|
||||
FROM
|
||||
mutual_insurance_user_info info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
+8
@@ -1,13 +1,16 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.model;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
@@ -183,6 +186,11 @@ public class MutualInsuranceUserInfo extends BaseModel implements Serializable {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String sign;
|
||||
|
||||
@Column
|
||||
@Comment("附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> files;
|
||||
|
||||
@Column
|
||||
@Comment("申请时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
|
||||
+8
-2
@@ -47,7 +47,7 @@ layout("/layouts/platform.html"){
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="openSign(row)"
|
||||
:disabled="getStatusText(row) !== '报名中'">
|
||||
v-if="getStatusText(row) === '报名中'">
|
||||
报名
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -55,16 +55,17 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<sign-form ref="signFormRef" @refresh="doSearch"></sign-form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("signForm.js"){}#-->
|
||||
<!--#include('/platform/zhgh/dayofficework/cadreTraining/common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"cadre-training-info": cadreTrainingInfo,
|
||||
"sign-form": signForm
|
||||
},
|
||||
data() {
|
||||
@@ -78,6 +79,11 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.cadreTrainingInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.now = new Date().getTime()
|
||||
this.pageData()
|
||||
|
||||
+46
-47
@@ -2,10 +2,10 @@ const signForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog title="活动报名" :visible.sync="dialogVisible" width="70%" @open="handleDialogOpen">
|
||||
<div class="process-title">
|
||||
<snaker-start slot="header" define_key="GBPX" label="活动报名"></snaker-start>
|
||||
<snaker-start slot="header" define_key="GBPX" label="活动报名"></snaker-start>
|
||||
</div>
|
||||
<el-descriptions :column="2" border class="margin-top" style="margin: 10px" title="">
|
||||
<el-descriptions-item label="活动名称" >
|
||||
<el-descriptions-item label="活动名称">
|
||||
<span class="item-center"> {{ viewData.name }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="分工会名额">
|
||||
@@ -31,7 +31,7 @@ const signForm = {
|
||||
<!-- 个人报名信息 -->
|
||||
<div class="process-title">选择报名人员</div>
|
||||
<el-select
|
||||
|
||||
v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')"
|
||||
v-model="searchTeammateUserId"
|
||||
filterable
|
||||
clearable
|
||||
@@ -46,8 +46,10 @@ const signForm = {
|
||||
:value="item.userId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button class="ml5" type="primary" icon="el-icon-plus"
|
||||
@click="addTeamUser">添加
|
||||
<el-button
|
||||
v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')"
|
||||
class="ml5" type="primary" icon="el-icon-plus"
|
||||
@click="addTeamUser">添加
|
||||
</el-button>
|
||||
<el-table :data="teamUsers" class="mt10">
|
||||
<el-table-column label="序号" type="index" width="60px"></el-table-column>
|
||||
@@ -72,7 +74,8 @@ const signForm = {
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onConfirm" :loading="submitLoading"
|
||||
:disabled="isSignUp || remainingQuota === 0">确认报名</el-button>
|
||||
:disabled="teamUsers.length === 0 ">确认报名
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
`,
|
||||
@@ -84,7 +87,6 @@ const signForm = {
|
||||
teammateOptions: [],
|
||||
dialogVisible: false,
|
||||
viewData: {},
|
||||
formData: {},
|
||||
id: null,
|
||||
//表格用户(实际上只包含当前用户)
|
||||
teamUsers: [],
|
||||
@@ -97,7 +99,7 @@ const signForm = {
|
||||
computed: {
|
||||
remainingQuota() {
|
||||
// 如果 quota 为 null 或 undefined,显示"不限"
|
||||
if (this.quota == null) return "不限"
|
||||
if (this.quota == null || this.quota === 0) return "不限"
|
||||
// 如果 quota 为具体数值(包括0),则计算剩余名额
|
||||
const remaining = Math.max(0, this.quota - this.signedUsers.length)
|
||||
return remaining
|
||||
@@ -141,8 +143,8 @@ const signForm = {
|
||||
this.$message.error("请勿重复添加")
|
||||
return
|
||||
}
|
||||
if (this.teamUsers.length >= this.viewData.teamNum) {
|
||||
this.$message.error("已满员")
|
||||
if (this.quota > 0 && (this.signedUsers.length + this.teamUsers.length) >= this.quota) {
|
||||
this.$message.error("已达到报名人数上限")
|
||||
return
|
||||
}
|
||||
this.teamUsers.push(this.teammateOptions.find((v) => v.userId === this.searchTeammateUserId))
|
||||
@@ -168,7 +170,7 @@ const signForm = {
|
||||
|
||||
// 显示当前用户信息
|
||||
if (currentUser) {
|
||||
this.teamUsers = [currentUser]
|
||||
this.teamUsers = this.signedUsers;
|
||||
} else {
|
||||
// 如果当前用户未报名,显示当前用户信息用于报名
|
||||
this.teamUsers = [{
|
||||
@@ -184,35 +186,12 @@ const signForm = {
|
||||
remark: ''
|
||||
}]
|
||||
}
|
||||
|
||||
// 初始化表单数据
|
||||
this.initFormData();
|
||||
}
|
||||
} catch (error) {
|
||||
this.$message.error("获取用户数据失败")
|
||||
}
|
||||
},
|
||||
|
||||
// 初始化表单数据
|
||||
initFormData() {
|
||||
if (this.teamUsers.length > 0) {
|
||||
const user = this.teamUsers[0];
|
||||
this.formData = {
|
||||
cadreTrainingActId: this.id,
|
||||
userId: user.userId,
|
||||
userName: user.userName,
|
||||
loginName: user.loginName,
|
||||
unitId: user.unitId,
|
||||
unitName: user.unitName,
|
||||
unionId: user.unionId,
|
||||
unionName: user.unionName,
|
||||
sex: user.sex,
|
||||
mobile: user.mobile,
|
||||
remark: user.remark || ''
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
// 获取名额限制
|
||||
async getQuota(id) {
|
||||
try {
|
||||
@@ -236,38 +215,59 @@ const signForm = {
|
||||
|
||||
//提交报名
|
||||
async onConfirm() {
|
||||
// 检查是否已报名
|
||||
if (this.isSignUp) {
|
||||
// 检查是否已报名(仅当当前用户已报名时)
|
||||
if (this.isSignUp && this.teamUsers.some(user => user.userId === this.$store.state.user.id)) {
|
||||
this.$message.warning("您已报名该活动!")
|
||||
return
|
||||
}
|
||||
|
||||
// 检查名额限制
|
||||
if (this.quota > 0 && this.signedUsers.length >= this.quota) {
|
||||
this.$message.warning("该活动报名名额已满!")
|
||||
// 检查是否有报名人员
|
||||
if (this.teamUsers.length === 0) {
|
||||
this.$message.warning("请至少添加一名报名人员!")
|
||||
return
|
||||
}
|
||||
|
||||
// 更新表单数据中的备注信息
|
||||
if (this.teamUsers.length > 0) {
|
||||
this.formData.remark = this.teamUsers[0].remark || '';
|
||||
// 检查名额是否足够
|
||||
if (this.quota > 0 && (this.signedUsers.length + this.teamUsers.length) > this.quota) {
|
||||
// 添加空值检查
|
||||
const remaining = this.quota ? this.quota - this.signedUsers.length : 0;
|
||||
this.$message.warning('报名人数超过限额!当前还可报名' + remaining + '人');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
this.submitLoading = true;
|
||||
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
this.$confirm('您确定要为' + this.teamUsers.length + '人报名吗?', "提示", { confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
try {
|
||||
// 构造报名数据数组
|
||||
const signUpDataArray = this.teamUsers.map(user => {
|
||||
return {
|
||||
cadreTrainingActId: this.id,
|
||||
userId: user.userId,
|
||||
userName: user.userName,
|
||||
loginName: user.loginName,
|
||||
unitId: user.unitId,
|
||||
unitName: user.unitName,
|
||||
unionId: user.unionId,
|
||||
unionName: user.unionName,
|
||||
sex: user.sex,
|
||||
mobile: user.mobile,
|
||||
remark: user.remark || ''
|
||||
}
|
||||
})
|
||||
|
||||
const { code, msg } = await this.$axios.post('/platform/cadreTraining/branchUnionSignUp/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
data: JSON.stringify(signUpDataArray)
|
||||
})
|
||||
|
||||
if (code === 0) {
|
||||
this.$message.success("报名成功")
|
||||
// 更新状态
|
||||
this.isSignUp = true
|
||||
this.dialogVisible = false
|
||||
this.$emit("refresh", null)
|
||||
@@ -286,7 +286,6 @@ const signForm = {
|
||||
this.$message.error("操作失败")
|
||||
this.submitLoading = false;
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ layout("/layouts/platform.html"){
|
||||
placeholder="请输入职工姓名后自动填充"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
|
||||
|
||||
<!-- <el-input :value="formatDate(formData.birthday)" readonly size="small" placeholder="请输入职工姓名后自动填充"></el-input>-->
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
@@ -278,7 +278,7 @@ layout("/layouts/platform.html"){
|
||||
this.$axios.post('/platform/exerciseCard/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush('/platform/exerciseCard/query/index')
|
||||
commonUtil.pjaxPush('/platform/exerciseCard/mine/index')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--#
|
||||
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%"></el-date-picker>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
</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="loginName" label="工号"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="initMoney" label="初始额度"></el-table-column>
|
||||
<el-table-column prop="money" label="剩余额度"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="录入时间"></el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" width="350px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
<el-button @click="doExportApply(row)" size="mini" type="primary" >证明模板导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<exercise-card-info ref="exerciseCardInfoRef"></exercise-card-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"exercise-card-info": EXERCISECARD_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/exerciseCard/mine/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
importDialog: false,
|
||||
checkedFields: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"exercise-card-info": EXERCISECARD_INFO,
|
||||
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue?v=" + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
// 导出示例
|
||||
doExportApply(row){
|
||||
this.$downLoad('/platform/exerciseCard/mine/doExportApply?id=' + row.id)
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.exerciseCardInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
commonUtil.pjaxPush('/platform/exerciseCard/apply/index', { bizId: row.id})
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/exerciseCard/mine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -16,6 +16,7 @@ layout("/layouts/platform.html"){
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
|
||||
+104
-85
@@ -5,7 +5,10 @@ layout("/layouts/platform.html"){
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<h3 style="color: var(--color-primary)" slot="header">省级互助保障</h3>
|
||||
<div slot="header" style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<h3 style="color: var(--color-primary)">省级互助保障</h3>
|
||||
<el-button type="primary" size="small" @click="onDownloadTemplate">下载模板</el-button>
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="140px" label-position="right"
|
||||
label-suffix=":">
|
||||
<el-row :gutter="20">
|
||||
@@ -26,10 +29,12 @@ layout("/layouts/platform.html"){
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="mode" label="申请模式">
|
||||
<el-select v-model="formData.mode" placeholder="申请模式" @change="modeChange" style="width: 100%">
|
||||
<el-select v-model="formData.mode" placeholder="申请模式" @change="modeChange"
|
||||
style="width: 100%">
|
||||
<el-option label="本人申请" value="本人申请"></el-option>
|
||||
<el-option v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
|
||||
label="替他人申请" value="替他人申请"></el-option>
|
||||
<el-option
|
||||
v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
|
||||
label="替他人申请" value="替他人申请"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -42,7 +47,8 @@ layout("/layouts/platform.html"){
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="proxyLoginName" label="填写人工号">
|
||||
<el-input readonly v-model="formData.proxyLoginName" placeholder="请输入工号"></el-input>
|
||||
<el-input readonly v-model="formData.proxyLoginName"
|
||||
placeholder="请输入工号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -109,48 +115,48 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item prop="planNumber" label="计划书号码">-->
|
||||
<!-- <el-input v-model="formData.planNumber" placeholder="请输入计划书号码"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item prop="planNumber" label="计划书号码">-->
|
||||
<!-- <el-input v-model="formData.planNumber" placeholder="请输入计划书号码"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item prop="isRenewal" label="是否续保">-->
|
||||
<!-- <el-select v-model="formData.isRenewal" placeholder="请选择是否续保" style="width: 100%">-->
|
||||
<!-- <el-option label="是" value="1"></el-option>-->
|
||||
<!-- <el-option label="否" value="0"></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item prop="isRenewal" label="是否续保">-->
|
||||
<!-- <el-select v-model="formData.isRenewal" placeholder="请选择是否续保" style="width: 100%">-->
|
||||
<!-- <el-option label="是" value="1"></el-option>-->
|
||||
<!-- <el-option label="否" value="0"></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item prop="guaranteedStartTime" label="保障开始时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="formData.guaranteedStartTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- format="yyyy-MM-dd"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请选择保障开始时间"-->
|
||||
<!-- @change="calculateEndTime">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item prop="guaranteedStartTime" label="保障开始时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="formData.guaranteedStartTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- format="yyyy-MM-dd"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请选择保障开始时间"-->
|
||||
<!-- @change="calculateEndTime">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item prop="guaranteedEndTime" label="保障结束时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="formData.guaranteedEndTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- format="yyyy-MM-dd"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请选择保障结束时间"-->
|
||||
<!-- :readonly="true">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item prop="guaranteedEndTime" label="保障结束时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="formData.guaranteedEndTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- format="yyyy-MM-dd"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请选择保障结束时间"-->
|
||||
<!-- :readonly="true">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
@@ -193,7 +199,8 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="bankCardNumber" label="银行卡账号">
|
||||
<el-input v-model="formData.bankCardNumber" placeholder="请输入银行卡账号" type="number"></el-input>
|
||||
<el-input v-model="formData.bankCardNumber" placeholder="请输入银行卡账号"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -202,17 +209,20 @@ layout("/layouts/platform.html"){
|
||||
<text-editor v-model="formData.dangerEvent"></text-editor>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
<el-form-item prop="files" label="附件">
|
||||
<file-upload :value.sync="formData.files"
|
||||
upload_mode="drag"
|
||||
:upload_number="10" upload_result_category="array"
|
||||
accept=".doc, .docx, .xls, .xlsx, .pdf, .ppt, .jpg, .jpeg, .png"
|
||||
complete_result></file-upload>
|
||||
</el-form-item>
|
||||
<el-form-item prop="sign" label="签字">
|
||||
<pc-signature v-model="formData.sign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||
<el-button type="primary" plain @click="onSave">提交</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
@@ -242,19 +252,42 @@ layout("/layouts/platform.html"){
|
||||
// 替他人申请相关
|
||||
subsidizedList: [],
|
||||
formRules: {
|
||||
projectId: [{ required: true, message: '请选择所属事项', trigger: 'change' }],
|
||||
mode: [{ required: true, message: '请选择申请模式', trigger: 'change' }],
|
||||
proxyUserName: [{ required: true, message: '请填写填写人姓名', trigger: 'blur' }],
|
||||
proxyLoginName: [{ required: true, message: '请填写填写人工号', trigger: 'blur' }],
|
||||
userId: [{ required: true, message: '请选择申请人', trigger: 'change' }],
|
||||
loginName: [{ required: true, message: '请填写工号', trigger: 'blur' }],
|
||||
unitName: [{ required: true, message: '请填写所属单位', trigger: 'blur' }],
|
||||
unionName: [{ required: true, message: '请填写所属工会', trigger: 'blur' }],
|
||||
sex: [{ required: true, message: '请填写性别', trigger: 'blur' }],
|
||||
mobile: [{ required: true, message: '请填写手机号', trigger: 'blur' },{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }],
|
||||
idCard: [{ required: true, message: '请填写身份证号', trigger: 'blur' }, {pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '请输入正确的身份证号码', trigger: 'blur'}],
|
||||
age: [{ required: true, message: '请输入年龄', trigger: 'blur' }, { type: 'number', min: 16, max: 60, message: '年龄必须在16-60岁之间', trigger: 'blur', transform: (value) => Number(value) }],
|
||||
bankCardNumber: [ { pattern: /^([1-9]{1})(\d{15}|\d{18})$/, message: '请输入正确的银行卡号', trigger: 'blur' }],
|
||||
projectId: [{required: true, message: '请选择所属事项', trigger: 'change'}],
|
||||
mode: [{required: true, message: '请选择申请模式', trigger: 'change'}],
|
||||
proxyUserName: [{required: true, message: '请填写填写人姓名', trigger: 'blur'}],
|
||||
proxyLoginName: [{required: true, message: '请填写填写人工号', trigger: 'blur'}],
|
||||
userId: [{required: true, message: '请选择申请人', trigger: 'change'}],
|
||||
loginName: [{required: true, message: '请填写工号', trigger: 'blur'}],
|
||||
unitName: [{required: true, message: '请填写所属单位', trigger: 'blur'}],
|
||||
unionName: [{required: true, message: '请填写所属工会', trigger: 'blur'}],
|
||||
sex: [{required: true, message: '请填写性别', trigger: 'blur'}],
|
||||
mobile: [{required: true, message: '请填写手机号', trigger: 'blur'}, {
|
||||
pattern: /^1[3-9]\d{9}$/,
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
idCard: [{
|
||||
required: true,
|
||||
message: '请填写身份证号',
|
||||
trigger: 'blur'
|
||||
}, {
|
||||
pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
|
||||
message: '请输入正确的身份证号码',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
age: [{required: true, message: '请输入年龄', trigger: 'blur'}, {
|
||||
type: 'number',
|
||||
min: 16,
|
||||
max: 60,
|
||||
message: '年龄必须在16-60岁之间',
|
||||
trigger: 'blur',
|
||||
transform: (value) => Number(value)
|
||||
}],
|
||||
bankCardNumber: [{
|
||||
pattern: /^([1-9]{1})(\d{15}|\d{18})$/,
|
||||
message: '请输入正确的银行卡号',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
},
|
||||
projectList: [],
|
||||
}
|
||||
@@ -364,7 +397,7 @@ layout("/layouts/platform.html"){
|
||||
// 查询受助人
|
||||
queryRecipients(key) {
|
||||
this.$axios.get("/platform/mutualInsurance/apply/queryRecipients", {
|
||||
params: { key }
|
||||
params: {key}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.subsidizedList = res.data;
|
||||
@@ -373,8 +406,11 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?(提交后方可打印)", "提示", {
|
||||
async onSave() {
|
||||
const isValid = await this.validateBeforeSubmit();
|
||||
if (!isValid) return;
|
||||
|
||||
this.$confirm("您确定要提交吗?(需准备证明材料、伤残、入、出院记录、病理报告或交通事故责任认定书等)", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
@@ -400,25 +436,8 @@ layout("/layouts/platform.html"){
|
||||
});
|
||||
});
|
||||
},
|
||||
// 提交
|
||||
async onSubmit() {
|
||||
const isValid = await this.validateBeforeSubmit();
|
||||
if (!isValid) return;
|
||||
|
||||
this.$confirm("您确定要提交吗?(需准备证明材料、伤残、入、出院记录、病理报告或交通事故责任认定书等)", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/mutualInsurance/apply/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/mine/index')
|
||||
}
|
||||
})
|
||||
})
|
||||
onDownloadTemplate() {
|
||||
window.open('/platform/mutualInsurance/apply/downloadTemplate');
|
||||
},
|
||||
onView() {
|
||||
if (!this.formData.projectId) {
|
||||
|
||||
+9
-19
@@ -15,18 +15,21 @@ const userInfo = {
|
||||
<el-descriptions-item label="手机号">{{viewData.mobile}}</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号">{{viewData.idCard}}</el-descriptions-item>
|
||||
<el-descriptions-item label="年龄">{{viewData.age}}</el-descriptions-item>
|
||||
<el-descriptions-item label="计划书号码">{{viewData.planNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="是否续保">{{viewData.isRenewal}}</el-descriptions-item>
|
||||
<el-descriptions-item label="保障开始时间">{{viewData.guaranteedStartTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="保障结束时间">{{viewData.guaranteedEndTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出险时间">{{viewData.dangerTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出险地点">{{viewData.dangerAddress}}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="计划书号码">{{viewData.planNumber}}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="是否续保">{{viewData.isRenewal}}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="保障开始时间">{{viewData.guaranteedStartTime}}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="保障结束时间">{{viewData.guaranteedEndTime}}</el-descriptions-item>-->
|
||||
<el-descriptions-item label="入院时间">{{viewData.dangerTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="入院地点">{{viewData.dangerAddress}}</el-descriptions-item>
|
||||
<el-descriptions-item label="住址">{{viewData.address}}</el-descriptions-item>
|
||||
<el-descriptions-item label="开户名">{{viewData.bankUserName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="开户支行">{{viewData.bankOfDeposit}}</el-descriptions-item>
|
||||
<el-descriptions-item label="银行卡账号" >{{viewData.bankCardNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="赔付金额" :span="2">{{viewData.amount}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出险原因、经过、结果" :span="2">{{viewData.dangerEvent}}</el-descriptions-item>
|
||||
<el-descriptions-item :span="3" label="附件">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" >
|
||||
<el-image v-if="viewData.sign"
|
||||
:src="viewData.sign"
|
||||
@@ -80,19 +83,6 @@ const userInfo = {
|
||||
})
|
||||
},
|
||||
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查看流程图
|
||||
openChart(){
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+3
-18
@@ -23,12 +23,12 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="projectName" label="所属事项" width="300px"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<el-table-column label="操作" fixed="right" width="350px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="onEdit(row)" size="mini" type="primary" v-if="row.isSubmit =='未提交'">编辑</el-button>
|
||||
<el-button @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="onDelete(row.id)" size="mini" type="danger" >删除</el-button>
|
||||
<el-button @click="doExportApply(row)" size="mini" type="primary" v-if="row.isSubmit =='已提交'">申请表导出</el-button>
|
||||
<el-button @click="doExportApply(row)" size="mini" type="primary" >申请表导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -73,21 +73,6 @@ layout("/layouts/platform.html"){
|
||||
onEdit(row) {
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
|
||||
Reference in New Issue
Block a user