commit
This commit is contained in:
+3
-1
@@ -175,7 +175,7 @@ public class HealthCheckupListController {
|
|||||||
@ApiOperation("体检名单管理员编辑选择记录")
|
@ApiOperation("体检名单管理员编辑选择记录")
|
||||||
@SLog(type = "healthCheckup", tag = "体检管理", msg = "管理员编辑了一条选择记录")
|
@SLog(type = "healthCheckup", tag = "体检管理", msg = "管理员编辑了一条选择记录")
|
||||||
@SaCheckPermission("healthCheckup.list.mange")
|
@SaCheckPermission("healthCheckup.list.mange")
|
||||||
public Result doEditHealthCheckupData(String subjectId, String campus, String projectId, String userId) {
|
public Result doEditHealthCheckupData(String subjectId, String campus, String projectId, String userId, String bz) {
|
||||||
|
|
||||||
//查询用户有没有选择过套餐
|
//查询用户有没有选择过套餐
|
||||||
HealthCheckupUserSelection userSelection = healthCheckupProjectService.dao().fetch(HealthCheckupUserSelection.class,
|
HealthCheckupUserSelection userSelection = healthCheckupProjectService.dao().fetch(HealthCheckupUserSelection.class,
|
||||||
@@ -184,6 +184,7 @@ public class HealthCheckupListController {
|
|||||||
if (Lang.isNotEmpty(userSelection)) {
|
if (Lang.isNotEmpty(userSelection)) {
|
||||||
userSelection.setSubjectId(subjectId);
|
userSelection.setSubjectId(subjectId);
|
||||||
userSelection.setCampus(campus);
|
userSelection.setCampus(campus);
|
||||||
|
userSelection.setBz(bz);
|
||||||
healthCheckupProjectService.update(userSelection);
|
healthCheckupProjectService.update(userSelection);
|
||||||
} else {
|
} else {
|
||||||
//如果没有选择过套餐添加一条记录
|
//如果没有选择过套餐添加一条记录
|
||||||
@@ -193,6 +194,7 @@ public class HealthCheckupListController {
|
|||||||
checkupUserSelection.setSubjectId(subjectId);
|
checkupUserSelection.setSubjectId(subjectId);
|
||||||
checkupUserSelection.setCampus(campus);
|
checkupUserSelection.setCampus(campus);
|
||||||
checkupUserSelection.setSelectTime(new Date());
|
checkupUserSelection.setSelectTime(new Date());
|
||||||
|
checkupUserSelection.setBz(bz);
|
||||||
healthCheckupProjectService.insert(checkupUserSelection);
|
healthCheckupProjectService.insert(checkupUserSelection);
|
||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
|
|||||||
+32
-3
@@ -19,6 +19,7 @@ import org.nutz.dao.util.Daos;
|
|||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Lang;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
@@ -88,7 +89,9 @@ public class HealthCheckupProjectMangeController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("healthCheckup.projectMange")
|
@SaCheckPermission("healthCheckup.projectMange")
|
||||||
@SLog(type = "healthCheckup", tag = "体检管理", msg = "提交体检项目")
|
@SLog(type = "healthCheckup", tag = "体检管理", msg = "提交体检项目")
|
||||||
public Result doAdd(HealthCheckupProject healthCheckupProject, @Param(value = "deleteRowIds") String[] deleteRowIds) {
|
public Result doAdd(HealthCheckupProject healthCheckupProject,
|
||||||
|
@Param(value = "deleteRowIds") String[] deleteRowIds,
|
||||||
|
@Param(value = "deleteSubjectIds") String[] deleteSubjectIds) {
|
||||||
|
|
||||||
|
|
||||||
String projectId;
|
String projectId;
|
||||||
@@ -96,12 +99,37 @@ public class HealthCheckupProjectMangeController {
|
|||||||
if (StrUtil.isBlank(healthCheckupProject.getId())) {
|
if (StrUtil.isBlank(healthCheckupProject.getId())) {
|
||||||
healthCheckupProject.setYear(DateUtil.thisYear());
|
healthCheckupProject.setYear(DateUtil.thisYear());
|
||||||
HealthCheckupProject checkupProject = healthCheckupProjectService.insertWith(healthCheckupProject, "healthCheckupProjectSubjects");
|
HealthCheckupProject checkupProject = healthCheckupProjectService.insertWith(healthCheckupProject, "healthCheckupProjectSubjects");
|
||||||
|
healthCheckupProject.getHealthCheckupProjectSubjects().forEach(v -> {
|
||||||
|
v.getSubjectMoneys().forEach(m -> {
|
||||||
|
m.setProjectId(checkupProject.getId());
|
||||||
|
m.setSubjectId(v.getId());
|
||||||
|
});
|
||||||
|
if (Lang.isNotEmpty(v.getSubjectMoneys())) {
|
||||||
|
healthCheckupProjectService.insert(v.getSubjectMoneys());
|
||||||
|
}
|
||||||
|
});
|
||||||
projectId = checkupProject.getId();
|
projectId = checkupProject.getId();
|
||||||
} else {
|
} else {
|
||||||
projectId = healthCheckupProject.getId();
|
projectId = healthCheckupProject.getId();
|
||||||
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubject.class, Cnd.where("id", "in", deleteRowIds));
|
//如果删除了医院
|
||||||
|
if (Lang.isNotEmpty(deleteSubjectIds)) {
|
||||||
|
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubject.class, Cnd.where("id", "in", deleteSubjectIds));
|
||||||
|
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubjectMoney.class, Cnd.where("subjectId", "in", deleteSubjectIds));
|
||||||
|
}
|
||||||
|
//如果删除了项目
|
||||||
|
if (Lang.isNotEmpty(deleteRowIds)) {
|
||||||
|
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubjectMoney.class, Cnd.where("id", "in", deleteRowIds));
|
||||||
|
}
|
||||||
|
healthCheckupProjectService.dao().insertOrUpdate(healthCheckupProject.getHealthCheckupProjectSubjects());
|
||||||
healthCheckupProject.getHealthCheckupProjectSubjects().forEach(v -> {
|
healthCheckupProject.getHealthCheckupProjectSubjects().forEach(v -> {
|
||||||
v.setProjectId(healthCheckupProject.getId());
|
v.setProjectId(projectId);
|
||||||
|
v.getSubjectMoneys().forEach(m -> {
|
||||||
|
m.setProjectId(projectId);
|
||||||
|
m.setSubjectId(v.getId());
|
||||||
|
});
|
||||||
|
if (Lang.isNotEmpty(v.getSubjectMoneys())) {
|
||||||
|
healthCheckupProjectService.insertOrUpdate(v.getSubjectMoneys());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
healthCheckupProjectService.dao().insertOrUpdate(healthCheckupProject.getHealthCheckupProjectSubjects());
|
healthCheckupProjectService.dao().insertOrUpdate(healthCheckupProject.getHealthCheckupProjectSubjects());
|
||||||
healthCheckupProjectService.update(healthCheckupProject);
|
healthCheckupProjectService.update(healthCheckupProject);
|
||||||
@@ -136,6 +164,7 @@ public class HealthCheckupProjectMangeController {
|
|||||||
public Result doDelete(String id) {
|
public Result doDelete(String id) {
|
||||||
healthCheckupProjectService.delete(id);
|
healthCheckupProjectService.delete(id);
|
||||||
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubject.class, Cnd.where("projectId", "=", id));
|
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubject.class, Cnd.where("projectId", "=", id));
|
||||||
|
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubjectMoney.class, Cnd.where("projectId", "=", id));
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+96
-7
@@ -5,14 +5,18 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
|
|||||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import com.budwk.app.base.annotation.SLog;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.param.PageForm;
|
import com.budwk.app.base.param.PageForm;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
|
import com.budwk.app.base.utils.ConditionGroupUtil;
|
||||||
import com.budwk.app.base.utils.ManyAddOrRenewUtil;
|
import com.budwk.app.base.utils.ManyAddOrRenewUtil;
|
||||||
|
import com.budwk.app.sys.views.View_user;
|
||||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject;
|
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject;
|
||||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubject;
|
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubject;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubjectMoney;
|
||||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection;
|
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection;
|
||||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupSingleService;
|
import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupSingleService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -30,6 +34,7 @@ import org.nutz.mvc.annotation.At;
|
|||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -113,14 +118,14 @@ public class HealthCheckupSingleController {
|
|||||||
add(new ExcelExportEntity("职工号", "loginName", 20));
|
add(new ExcelExportEntity("职工号", "loginName", 20));
|
||||||
add(new ExcelExportEntity("姓名", "userName", 20));
|
add(new ExcelExportEntity("姓名", "userName", 20));
|
||||||
add(new ExcelExportEntity("性别", "sex", 20));
|
add(new ExcelExportEntity("性别", "sex", 20));
|
||||||
add(new ExcelExportEntity("出生年月", "birthday", 20));
|
// add(new ExcelExportEntity("出生年月", "birthday", 20));
|
||||||
add(new ExcelExportEntity("年龄", "age", 20));
|
add(new ExcelExportEntity("年龄", "age", 20));
|
||||||
add(new ExcelExportEntity("婚姻状况", "marriage", 20));
|
add(new ExcelExportEntity("婚姻状况", "marriage", 20));
|
||||||
add(new ExcelExportEntity("证件号", "idCard", 20));
|
add(new ExcelExportEntity("身份证号", "idCard", 20));
|
||||||
add(new ExcelExportEntity("部门", "unitName", 20));
|
add(new ExcelExportEntity("部门", "unitName", 20));
|
||||||
add(new ExcelExportEntity("部门编码", "unitCode", 20));
|
// add(new ExcelExportEntity("部门编码", "unitCode", 20));
|
||||||
add(new ExcelExportEntity("自选项目", "subjectName", 20));
|
add(new ExcelExportEntity("医院", "subjectName", 20));
|
||||||
add(new ExcelExportEntity("自选院区", "campusName", 50));
|
// add(new ExcelExportEntity("自选院区", "campusName", 50));
|
||||||
}};
|
}};
|
||||||
|
|
||||||
List<NutMap> list;
|
List<NutMap> list;
|
||||||
@@ -234,7 +239,6 @@ public class HealthCheckupSingleController {
|
|||||||
public Result doSelectByAdmin(String projectId, String optionId, String campus) {
|
public Result doSelectByAdmin(String projectId, String optionId, String campus) {
|
||||||
Dao dao = healthCheckupSingleService.dao();
|
Dao dao = healthCheckupSingleService.dao();
|
||||||
HealthCheckupProject project = dao.fetch(HealthCheckupProject.class, projectId);
|
HealthCheckupProject project = dao.fetch(HealthCheckupProject.class, projectId);
|
||||||
HealthCheckupProjectSubject subject = dao.fetch(HealthCheckupProjectSubject.class, optionId);
|
|
||||||
|
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
@@ -271,7 +275,92 @@ public class HealthCheckupSingleController {
|
|||||||
selection.setSelectTime(new Date());
|
selection.setSelectTime(new Date());
|
||||||
return selection;
|
return selection;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
manyAddOrRenewUtil.asyncExecuteFastInsert(selections,null);
|
manyAddOrRenewUtil.asyncExecuteFastInsert(selections, null);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("管理员一键选择去年数据")
|
||||||
|
@Ok("json:full")
|
||||||
|
@SaCheckPermission("healthCheckup.statisticsSingle")
|
||||||
|
@SLog(type = "healthCheckup", tag = "体检管理", msg = "管理员给没选的人统一选择去年的数据")
|
||||||
|
public Result selectOptionByLastYear(String projectId) {
|
||||||
|
|
||||||
|
Dao dao = healthCheckupSingleService.dao();
|
||||||
|
//获取去年项目
|
||||||
|
HealthCheckupProject lastYearProject = dao.fetch(HealthCheckupProject.class, Cnd.where("YEAR(year)", "=", DateUtil.thisYear() - 1));
|
||||||
|
if (lastYearProject == null) {
|
||||||
|
return Result.error("请先创建去年的体检项目");
|
||||||
|
}
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
u.id
|
||||||
|
FROM
|
||||||
|
health_checkup_user hcu
|
||||||
|
LEFT JOIN `vw_user` u ON u.id = hcu.userId
|
||||||
|
$projectCnd $condition
|
||||||
|
""");
|
||||||
|
cnd.and("hcu.projectId", "=", projectId);
|
||||||
|
sql.setVar("projectCnd", "AND u.id NOT IN ( SELECT selectUserId FROM `health_checkup_user_selection` WHERE projectId = '" + projectId + "' AND selectUserId IS NOT NULL )");
|
||||||
|
cnd.groupBy("u.loginname");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> mapList = healthCheckupSingleService.listMap(sql);
|
||||||
|
|
||||||
|
List<String> userIds = mapList.stream().map(v -> v.getString("id")).toList();
|
||||||
|
|
||||||
|
//去年项目的人
|
||||||
|
List<HealthCheckupUserSelection> lastYearSelectionList = dao.query(HealthCheckupUserSelection.class, Cnd.where(HealthCheckupUserSelection::getProjectId, "=", lastYearProject.getId())
|
||||||
|
.and(HealthCheckupUserSelection::getSelectUserId, "in", userIds));
|
||||||
|
|
||||||
|
//去年项目下的医院
|
||||||
|
List<HealthCheckupProjectSubject> lastYearSubjectList = dao.query(HealthCheckupProjectSubject.class,
|
||||||
|
Cnd.where(HealthCheckupProjectSubject::getProjectId, "=", lastYearProject.getId()));
|
||||||
|
|
||||||
|
//今年项目下的医院
|
||||||
|
List<HealthCheckupProjectSubject> thisYearSubjectList = dao.query(HealthCheckupProjectSubject.class,
|
||||||
|
Cnd.where(HealthCheckupProjectSubject::getProjectId, "=", projectId));
|
||||||
|
|
||||||
|
List<HealthCheckupUserSelection> selections = new ArrayList<>();
|
||||||
|
userIds.forEach(v -> {
|
||||||
|
//获取去年这个人选择的记录
|
||||||
|
HealthCheckupUserSelection userSelection = lastYearSelectionList.stream().filter(item -> item.getSelectUserId().equals(v)).findFirst().orElse(null);
|
||||||
|
//去年这个人选择的选项是什么
|
||||||
|
HealthCheckupProjectSubject lastYearSubject = lastYearSubjectList.stream().filter(last -> last.getId().equals(userSelection.getSubjectId())).findFirst().orElse(null);
|
||||||
|
//今年项目下的选项
|
||||||
|
HealthCheckupProjectSubject thisYearSubject = thisYearSubjectList.stream().filter(thisYear -> thisYear.getOptionName().equals(lastYearSubject.getOptionName())).findFirst().orElse(null);
|
||||||
|
if (userSelection != null && thisYearSubject != null) {
|
||||||
|
//获取今年这个选项的收费
|
||||||
|
List<HealthCheckupProjectSubjectMoney> list = dao.query(HealthCheckupProjectSubjectMoney.class,
|
||||||
|
Cnd.where(HealthCheckupProjectSubjectMoney::getSubjectId, "=", thisYearSubject.getId()));
|
||||||
|
BigDecimal money = BigDecimal.valueOf(0.00);
|
||||||
|
String subjectMoneyId = null;
|
||||||
|
for (HealthCheckupProjectSubjectMoney subject : list) {
|
||||||
|
//找出这个人符合哪个项目
|
||||||
|
Cnd cndUser = Cnd.where("id", "=", v);
|
||||||
|
ConditionGroupUtil.applyConditionGroup(cndUser, subject.getMatchCnd());
|
||||||
|
int count = dao.count(View_user.class, cndUser);
|
||||||
|
if (count > 0) {
|
||||||
|
money = subject.getMoney();
|
||||||
|
subjectMoneyId = subject.getId();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//如果有符合的就添加
|
||||||
|
if (subjectMoneyId != null){
|
||||||
|
HealthCheckupUserSelection selection = new HealthCheckupUserSelection();
|
||||||
|
selection.setProjectId(projectId);
|
||||||
|
selection.setSelectUserId(v);
|
||||||
|
selection.setSubjectId(thisYearSubject.getId());
|
||||||
|
selection.setSubjectMoneyId(subjectMoneyId);
|
||||||
|
selection.setMoney(money);
|
||||||
|
selection.setSelectTime(new Date());
|
||||||
|
selections.add(selection);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+35
-1
@@ -8,16 +8,21 @@ import com.budwk.app.base.page.Pagination;
|
|||||||
import com.budwk.app.base.param.PageForm;
|
import com.budwk.app.base.param.PageForm;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.base.service.BaseService;
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.base.utils.ConditionGroupUtil;
|
||||||
|
import com.budwk.app.sys.views.View_user;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupCampus;
|
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupCampus;
|
||||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject;
|
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubjectMoney;
|
||||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection;
|
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection;
|
||||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupProjectService;
|
import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupProjectService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.Static;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
@@ -26,9 +31,11 @@ import org.nutz.lang.util.NutMap;
|
|||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
import org.nutz.trans.Trans;
|
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : hongqiwei
|
* @author : hongqiwei
|
||||||
@@ -41,6 +48,8 @@ import java.util.Date;
|
|||||||
@At("/platform/healthCheckup/h5")
|
@At("/platform/healthCheckup/h5")
|
||||||
public class H5HealthCheckupController {
|
public class H5HealthCheckupController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
@Inject
|
@Inject
|
||||||
private BaseService baseService;
|
private BaseService baseService;
|
||||||
|
|
||||||
@@ -84,6 +93,8 @@ public class H5HealthCheckupController {
|
|||||||
// 已结束的项目:结束时间小于当前时间
|
// 已结束的项目:结束时间小于当前时间
|
||||||
cnd.and("p.choiceTimeEnd", "<", DateUtil.now());
|
cnd.and("p.choiceTimeEnd", "<", DateUtil.now());
|
||||||
}
|
}
|
||||||
|
cnd.and(new Static("(select count(*) from health_checkup_user where projectId=p.id and userId='%s')>0".formatted(SecurityUtil.getUserId())));
|
||||||
|
|
||||||
|
|
||||||
// 只有当name参数不为空时才添加名称查询条件
|
// 只有当name参数不为空时才添加名称查询条件
|
||||||
if (StrUtil.isNotBlank(name)) {
|
if (StrUtil.isNotBlank(name)) {
|
||||||
@@ -173,6 +184,7 @@ public class H5HealthCheckupController {
|
|||||||
} else {
|
} else {
|
||||||
nutMap.put("isFamily", "否");
|
nutMap.put("isFamily", "否");
|
||||||
}
|
}
|
||||||
|
|
||||||
return Result.success(nutMap);
|
return Result.success(nutMap);
|
||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
@@ -191,5 +203,27 @@ public class H5HealthCheckupController {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission(value = {"h5.healthCheckup.list", "h5.healthCheckup.mine"}, mode = SaMode.OR)
|
||||||
|
public Result getSubjectMoney(String id, String marriage) {
|
||||||
|
List<HealthCheckupProjectSubjectMoney> list = healthCheckupProjectService.dao().query(HealthCheckupProjectSubjectMoney.class, Cnd.where(HealthCheckupProjectSubjectMoney::getSubjectId, "=", id));
|
||||||
|
BigDecimal money = BigDecimal.valueOf(0.00);
|
||||||
|
String subjectMoneyId = null;
|
||||||
|
for (HealthCheckupProjectSubjectMoney subject : list) {
|
||||||
|
// 是否满足条件
|
||||||
|
Cnd cnd = Cnd.where("id", "=", SecurityUtil.getUserId());
|
||||||
|
ConditionGroupUtil.applyConditionGroup(cnd, subject.getMatchCnd());
|
||||||
|
int count = dao.count(View_user.class, cnd);
|
||||||
|
if (count > 0) {
|
||||||
|
money = subject.getMoney();
|
||||||
|
subjectMoneyId = subject.getId();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Result.success().addData(Map.of("money", money,"subjectMoneyId",subjectMoneyId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
@@ -7,6 +7,7 @@ import org.nutz.dao.entity.annotation.*;
|
|||||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName HealthCheckupProjectSubject
|
* @ClassName HealthCheckupProjectSubject
|
||||||
@@ -51,4 +52,8 @@ public class HealthCheckupProjectSubject extends BaseModel implements Serializab
|
|||||||
@Comment("说明描述")
|
@Comment("说明描述")
|
||||||
@ColDefine(type = ColType.TEXT)
|
@ColDefine(type = ColType.TEXT)
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
@Many(field = "subjectId")
|
||||||
|
private List<HealthCheckupProjectSubjectMoney> subjectMoneys;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+60
@@ -0,0 +1,60 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.healthCheckup.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import com.budwk.app.base.param.ConditionGroup;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/10/14 17:12
|
||||||
|
* @description 套餐金额表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("health_checkup_project_subject_money")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("体检套餐金额表")
|
||||||
|
public class HealthCheckupProjectSubjectMoney extends BaseModel implements Serializable {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("所属项目")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("所属项目")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String subjectId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("金额")
|
||||||
|
@ColDefine(customType = "decimal(10,2)")
|
||||||
|
private BigDecimal money;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("名称")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String subjectMoneyName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("条件")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private ConditionGroup matchCnd;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("选项排序")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
private String sort;
|
||||||
|
}
|
||||||
+5
@@ -73,4 +73,9 @@ public class HealthCheckupUser extends BaseModel implements Serializable {
|
|||||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
private String unitId;
|
private String unitId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("在职状态")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
private String userState;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+16
@@ -7,6 +7,7 @@ import org.nutz.dao.entity.annotation.*;
|
|||||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -39,6 +40,16 @@ public class HealthCheckupUserSelection extends BaseModel implements Serializabl
|
|||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
private String subjectId;
|
private String subjectId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("所属选项")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String subjectMoneyId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("金额")
|
||||||
|
@ColDefine(customType = "decimal(10,2)")
|
||||||
|
private BigDecimal money;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("选择用户")
|
@Comment("选择用户")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
@@ -54,6 +65,11 @@ public class HealthCheckupUserSelection extends BaseModel implements Serializabl
|
|||||||
@ColDefine(type = ColType.DATETIME)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
private Date selectTime;
|
private Date selectTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("备注")
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 100)
|
||||||
|
private String bz;
|
||||||
|
|
||||||
@Many(field = "userSelectionId")
|
@Many(field = "userSelectionId")
|
||||||
private List<HealthCheckupUserCompanion> companionList;
|
private List<HealthCheckupUserCompanion> companionList;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -4,10 +4,7 @@ import com.budwk.app.base.service.impl.BaseServiceImpl;
|
|||||||
import com.budwk.app.base.utils.ManyAddOrRenewUtil;
|
import com.budwk.app.base.utils.ManyAddOrRenewUtil;
|
||||||
import com.budwk.app.sys.views.View_user;
|
import com.budwk.app.sys.views.View_user;
|
||||||
import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope;
|
import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope;
|
||||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject;
|
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.*;
|
||||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUser;
|
|
||||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserCompanion;
|
|
||||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection;
|
|
||||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupProjectService;
|
import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupProjectService;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
@@ -49,6 +46,9 @@ public class HealthCheckupProjectServiceImpl extends BaseServiceImpl<HealthCheck
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
HealthCheckupProject project = fetchLinks(fetch(id), "healthCheckupProjectSubjects", Cnd.NEW().asc("optionSort"));
|
HealthCheckupProject project = fetchLinks(fetch(id), "healthCheckupProjectSubjects", Cnd.NEW().asc("optionSort"));
|
||||||
|
project.getHealthCheckupProjectSubjects().forEach(v -> {
|
||||||
|
v.setSubjectMoneys(dao().query(HealthCheckupProjectSubjectMoney.class, Cnd.where("subjectId", "=", v.getId())));
|
||||||
|
});
|
||||||
return project;
|
return project;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+158
@@ -0,0 +1,158 @@
|
|||||||
|
const CONDITION_STRUCTURE_DIALOG = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
title="高级查询构造器"
|
||||||
|
width="50%"
|
||||||
|
>
|
||||||
|
<div class="process-title">过滤条件匹配</div>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-select v-model="formData.method" placeholder="请选择匹配方式" style="width: 100%">
|
||||||
|
<el-option label="AND(所有条件都要求匹配)" value="AND"></el-option>
|
||||||
|
<el-option label="OR(条件中的任意一个匹配)" value="OR"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="formData.conditions.push({})">添加条件
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20" v-for="(cnd,idx) in formData.conditions" :key="idx" style="margin-top: 20px">
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-tag>条件{{idx+1}}</el-tag>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-select v-model="cnd.field" placeholder="请选择字段" style="width: 100%"
|
||||||
|
@change="(v)=>fieldChange(v,cnd)">
|
||||||
|
<el-option
|
||||||
|
v-for="item in fields"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-select v-model="cnd.operational" placeholder="请选择" style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in operationalOption"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-date-picker
|
||||||
|
v-if="cnd.fieldObj&&cnd.fieldObj.type=='date'"
|
||||||
|
v-model="cnd.value"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择日期" style="width: 100%">
|
||||||
|
</el-date-picker>
|
||||||
|
|
||||||
|
|
||||||
|
<el-select v-else-if="cnd.fieldObj&&cnd.fieldObj.type=='select'" v-model="cnd.value"
|
||||||
|
placeholder="请选择值"
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cnd.fieldObj.options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
<el-input v-else v-model="cnd.value" clearable placeholder="请输入值"
|
||||||
|
style="width: 100%"></el-input>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-button type="danger" icon="el-icon-minus" @click="formData.conditions.splice(idx, 1)">
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<span slot="footer">
|
||||||
|
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||||
|
<el-button type="primary" @click="doSubmit">确 认</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
formData: {
|
||||||
|
method: "",
|
||||||
|
conditions: []
|
||||||
|
},
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
"label": "性别",
|
||||||
|
"value": "sex",
|
||||||
|
"type": "select",
|
||||||
|
"options": [{"value": "男", "label": "男"}, {"value": "女", "label": "女"}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "出生日期",
|
||||||
|
"value": "birthday",
|
||||||
|
"type": "date",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "婚姻状况",
|
||||||
|
"value": "marriage",
|
||||||
|
"type": "select",
|
||||||
|
"options": [{"value": "未婚", "label": "未婚"}, {"value": "已婚", "label": "已婚"}]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
operationalOption: [
|
||||||
|
{"label": "等于(=)", "value": "="},
|
||||||
|
{"label": "不等于(!=)", "value": "!="},
|
||||||
|
{"label": "小于(<)", "value": "<"},
|
||||||
|
{"label": "小于等于(<=)", "value": "<="},
|
||||||
|
{"label": "大于(>)", "value": ">"},
|
||||||
|
{"label": "大于等于(>=)", "value": ">="},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async onOpen(formData) {
|
||||||
|
console.log(formData)
|
||||||
|
if (formData) {
|
||||||
|
this.formData = formData
|
||||||
|
}else{
|
||||||
|
this.formData = {
|
||||||
|
method: "",
|
||||||
|
conditions: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
fieldChange(val, cnd) {
|
||||||
|
this.$set(cnd, "fieldObj", this.fields.find(v => v.value === val))
|
||||||
|
this.$set(cnd, "value", null)
|
||||||
|
this.$forceUpdate()
|
||||||
|
|
||||||
|
},
|
||||||
|
doSubmit() {
|
||||||
|
if (!this.formData.method) {
|
||||||
|
this.$message.error("请选择匹配方式")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.formData.conditions.length === 0) {
|
||||||
|
this.$message.error("请添加条件")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.formData.conditions.some(v => !v.field || !v.operational || !v.value)) {
|
||||||
|
this.$message.error("请填写完整条件")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$emit("confirm", this.formData)
|
||||||
|
this.dialogVisible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+9
-4
@@ -146,14 +146,19 @@ layout("/layouts/platform.html"){
|
|||||||
:label="item.optionName"></el-option>
|
:label="item.optionName"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="院区"
|
<el-form-item label="备注"
|
||||||
|
prop="bz">
|
||||||
|
<el-input v-model="editHealthCheckupData.bz" type="textarea" rows="5"
|
||||||
|
placeholder="请输入备注"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="院区"
|
||||||
prop="campus"
|
prop="campus"
|
||||||
:rules="[{required:true,message:'请选择',trigger:['change','blur']}]">
|
:rules="[{required:true,message:'请选择',trigger:['change','blur']}]">
|
||||||
<el-select v-model="editHealthCheckupData.campus" style="width: 100%">
|
<el-select v-model="editHealthCheckupData.campus" style="width: 100%">
|
||||||
<el-option v-for="item in campusOptions" :key="item.id" :value="item.id"
|
<el-option v-for="item in campusOptions" :key="item.id" :value="item.id"
|
||||||
:label="item.campusName"></el-option>
|
:label="item.campusName"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>-->
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row type="flex" justify="end">
|
<el-row type="flex" justify="end">
|
||||||
<el-button @click="exportHealthCheckupDialog=false" type="primary" plain>取消</el-button>
|
<el-button @click="exportHealthCheckupDialog=false" type="primary" plain>取消</el-button>
|
||||||
@@ -197,10 +202,10 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: 'unionName', label: '所属工会', sortable: true},
|
{prop: 'unionName', label: '所属工会', sortable: true},
|
||||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||||
{prop: 'optionName', label: '所选套餐'},
|
{prop: 'optionName', label: '所选套餐'},
|
||||||
{prop: 'campusName', label: '所选院区'},
|
|
||||||
{prop: 'selectTime', label: '选择时间', width: "160px"},
|
{prop: 'selectTime', label: '选择时间', width: "160px"},
|
||||||
{prop: 'isAudit', label: '是否确认'},
|
{prop: 'isAudit', label: '是否确认'},
|
||||||
{prop: 'auditTime', label: '确认时间'},
|
{prop: 'auditTime', label: '确认时间'},
|
||||||
|
{prop: 'bz', label: '备注',width: "200px"},
|
||||||
],
|
],
|
||||||
exportHealthCheckupDialog: false,
|
exportHealthCheckupDialog: false,
|
||||||
editHealthCheckupData: {},
|
editHealthCheckupData: {},
|
||||||
@@ -225,7 +230,7 @@ layout("/layouts/platform.html"){
|
|||||||
this.notifyWarning("当前分工会没有名单,暂不需要提交")
|
this.notifyWarning("当前分工会没有名单,暂不需要提交")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const confirm = await this.$confirm(flag?'您确定名单都已核实,准确无误?':'您确定取消确认?', '提示', {
|
const confirm = await this.$confirm(flag ? '您确定名单都已核实,准确无误?' : '您确定取消确认?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
|
|||||||
+161
-79
@@ -131,26 +131,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item prop="activityGroupId" label="可报名人员范围">
|
<el-form-item prop="activityGroupId" label="可报名人员范围">
|
||||||
<div style="display: flex; justify-content: space-between">
|
<permission-group :value.sync="formData.activityGroupId"></permission-group>
|
||||||
<div style="width: 99%">
|
|
||||||
<el-select prop="activityGroupId" placeholder="参加人员范围"
|
|
||||||
v-model="formData.activityGroupId"
|
|
||||||
style="width: 99%;"
|
|
||||||
clearable
|
|
||||||
filterable>
|
|
||||||
<el-option v-for="item in activityGroupList"
|
|
||||||
:label="item.groupName"
|
|
||||||
:value="item.groupId"
|
|
||||||
:key="item.groupId"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<el-button
|
|
||||||
@click="$refs.drawerUserScope.userScopeDialog = true"
|
|
||||||
type="primary">设置
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
@@ -163,79 +144,98 @@ layout("/layouts/platform.html"){
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="体检套餐" prop="healthCheckupProjectSubjects">
|
<el-form-item label="体检套餐" prop="healthCheckupProjectSubjects">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover" v-for="(item,index) in formData.healthCheckupProjectSubjects"
|
||||||
<div class="s-options-list" style="margin-top: 10px;">
|
:key="index">
|
||||||
<el-table :data="formData.healthCheckupProjectSubjects" border>
|
<el-row :gutter="20">
|
||||||
<el-table-column
|
<el-col :span="4">
|
||||||
align="center"
|
医院名称:
|
||||||
header-align="center"
|
<el-input v-model="item.optionName"></el-input>
|
||||||
label="套餐名称">
|
</el-col>
|
||||||
<template slot-scope="{row}">
|
<el-col :span="4">
|
||||||
<el-input v-model="row.optionName" autosize
|
排序:
|
||||||
class="text-input"
|
<el-input v-model="item.optionSort"></el-input>
|
||||||
data-type="option"
|
</el-col>
|
||||||
></el-input>
|
<!--<el-col :span="4">
|
||||||
</template>
|
封面图<file-upload :upload_number="1" :value.sync="item.imgUrl"
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
align="center"
|
|
||||||
header-align="center"
|
|
||||||
label="排序">
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
<el-input v-model="row.optionSort" autosize
|
|
||||||
class="text-input"
|
|
||||||
data-type="option"
|
|
||||||
></el-input>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
align="center"
|
|
||||||
header-align="center"
|
|
||||||
label="图片" width="130px">
|
|
||||||
<template slot-scope="{row,$index}">
|
|
||||||
<file-upload :upload_number="1" :value.sync="row.imgUrl"
|
|
||||||
accept=".jpg,.jpeg,.png"
|
accept=".jpg,.jpeg,.png"
|
||||||
class="imgUrl"
|
class="imgUrl"
|
||||||
upload_result_type="url"
|
upload_result_type="url"
|
||||||
complete_result upload_mode="file"></file-upload>
|
complete_result upload_mode="file"></file-upload>
|
||||||
|
</el-col>-->
|
||||||
|
<el-col :span="4">
|
||||||
|
编辑说明:
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" size="small"
|
||||||
|
@click="openDescRichText(item.description,index)">编辑说明
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
操作:
|
||||||
|
<div>
|
||||||
|
<el-button type="danger" size="small"
|
||||||
|
:disabled="formData.healthCheckupProjectSubjects.length===1"
|
||||||
|
@click="deleteSubject(item,index)">删除
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<div class="s-options-list" style="margin-top: 10px;">
|
||||||
|
<el-table :data="item.subjectMoneys" border size="small">
|
||||||
|
<el-table-column label="名称">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-input v-model="row.subjectMoneyName" autosize
|
||||||
|
class="text-input"
|
||||||
|
data-type="option"
|
||||||
|
></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center"
|
<el-table-column label="金额">
|
||||||
header-align="center"
|
<template slot-scope="{row}">
|
||||||
label="说明">
|
<el-input v-model="row.money" autosize
|
||||||
<template slot-scope="{row,$index}">
|
class="text-input"
|
||||||
<el-link type="primary"
|
data-type="option"
|
||||||
@click="openDescRichText(row.description,$index)">
|
></el-input>
|
||||||
编辑说明
|
|
||||||
</el-link>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column label="操作" width="200px">
|
||||||
align="center"
|
<template slot-scope="{row,$index}" slot="header">
|
||||||
header-align="center"
|
<el-button size="mini" type="primary"
|
||||||
label="操作"
|
@click="item.subjectMoneys.push({
|
||||||
width="100px">
|
money:'',
|
||||||
|
subjectMoneyName:'',
|
||||||
|
marriage:'',
|
||||||
|
})">添加
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
<template slot-scope="{row,$index}">
|
<template slot-scope="{row,$index}">
|
||||||
<div class="option-delete">
|
<div class="option-delete">
|
||||||
<el-button circle
|
<el-button size="mini" type="primary"
|
||||||
icon="el-icon-delete"
|
@click="openCnd(row,$index,index)">设置可选条件
|
||||||
size="mini" type="danger"
|
</el-button>
|
||||||
@click="deleteRow(row,$index)"></el-button>
|
<el-button size="mini" type="danger"
|
||||||
|
@click="deleteRow(row,$index,index)">删除
|
||||||
|
</el-button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<div class="s-operation">
|
|
||||||
<el-button size="small" type="primary"
|
|
||||||
@click="formData.healthCheckupProjectSubjects.push({optionNameId:'',optionName:'套餐'+(formData.healthCheckupProjectSubjects.length+1),optionSort:formData.healthCheckupProjectSubjects.length+1,imgUrl:null})">
|
|
||||||
添加项目
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<div class="s-operation">
|
||||||
|
<el-button size="small" type="primary"
|
||||||
|
@click="formData.healthCheckupProjectSubjects.push({optionNameId:'',
|
||||||
|
optionName:'套餐'+(formData.healthCheckupProjectSubjects.length+1),
|
||||||
|
optionSort:formData.healthCheckupProjectSubjects.length+1,
|
||||||
|
imgUrl:null,
|
||||||
|
subjectMoneys:[]})">
|
||||||
|
添加医院
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目封面" prop="cover">
|
<el-form-item label="项目封面" prop="cover">
|
||||||
@@ -303,7 +303,7 @@ layout("/layouts/platform.html"){
|
|||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
width="30%">
|
width="30%">
|
||||||
<div style=" display: flex;justify-content: center;">
|
<div style=" display: flex;justify-content: center;">
|
||||||
<qrcode :options="{ width: 400 }" :value="activityUrl" ></qrcode>
|
<qrcode :options="{ width: 400 }" :value="activityUrl"></qrcode>
|
||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="codeDialogVisible = false" type="primary">关 闭</el-button>
|
<el-button @click="codeDialogVisible = false" type="primary">关 闭</el-button>
|
||||||
@@ -330,9 +330,32 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="subjectMoneyDialog"
|
||||||
|
title="套餐"
|
||||||
|
width="50%"
|
||||||
|
>
|
||||||
|
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<condition-structure-dialog ref="conditionStructureDialog" @confirm="addCondition"></condition-structure-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<el-dialog :visible.sync="conditionStructureDialogVisible" title="条件构造器">
|
||||||
|
<condition-group :group="conditionGroup" :field_options="fieldOptions"
|
||||||
|
@remove="removeRootGroup"></condition-group>
|
||||||
|
<div slot="footer">
|
||||||
|
<el-button @click="conditionStructureDialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirmCnd">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
<!--#include("../common/ConditionStructure.js"){}#-->
|
||||||
const vue = new Vue({
|
const vue = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
@@ -374,10 +397,37 @@ layout("/layouts/platform.html"){
|
|||||||
description: "",
|
description: "",
|
||||||
codeDialogVisible: false,
|
codeDialogVisible: false,
|
||||||
activityUrl: '',
|
activityUrl: '',
|
||||||
|
|
||||||
|
rowData: {},
|
||||||
|
subjectRowData: {},
|
||||||
|
subjectMoneyDialog: false,
|
||||||
|
subjectMoneyIndex: null,
|
||||||
|
hospitalIndex: null,
|
||||||
|
deleteSubjectIds: {},
|
||||||
|
|
||||||
|
// 条件构造器相关
|
||||||
|
conditionStructureDialogVisible: false,
|
||||||
|
// 可选字段列表
|
||||||
|
fieldOptions: [
|
||||||
|
{label: "姓名", value: "username"},
|
||||||
|
{label: "工号", value: "loginname"},
|
||||||
|
{label: "性别", value: "sex"},
|
||||||
|
{label: "年龄", value: "age"},
|
||||||
|
{label: "婚姻状况", value: "marriage"},
|
||||||
|
{label: "在职状态", value: "userState"},
|
||||||
|
{label: "编制类别", value: "preparedBy"},
|
||||||
|
{label: "教职工类别", value: "personType"},
|
||||||
|
],
|
||||||
|
conditionGroup: {
|
||||||
|
logic: "AND",
|
||||||
|
conditions: [],
|
||||||
|
groups: []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
"drawer-user-scope": httpVueLoader("/components/module/activity/DrawerUserScope.vue"),
|
"drawer-user-scope": httpVueLoader("/components/module/activity/DrawerUserScope.vue"),
|
||||||
|
"condition-structure-dialog": CONDITION_STRUCTURE_DIALOG
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
dropdownCommand(command) {
|
dropdownCommand(command) {
|
||||||
@@ -398,6 +448,31 @@ layout("/layouts/platform.html"){
|
|||||||
this.openCode(data.id)
|
this.openCode(data.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
openAddSubjectMoney(row, index) {
|
||||||
|
row.index = index
|
||||||
|
this.subjectRowData = row
|
||||||
|
this.subjectMoneyDialog = true
|
||||||
|
},
|
||||||
|
addCondition(val) {
|
||||||
|
this.$set(this.formData.healthCheckupProjectSubjects[this.subjectMoneyIndex].subjectMoneys[this.rowData.index], 'matchCnd', val)
|
||||||
|
},
|
||||||
|
openCnd(row, subjectIndex, hospitalIndex) {
|
||||||
|
this.rowData = row
|
||||||
|
this.subjectMoneyIndex = subjectIndex
|
||||||
|
this.hospitalIndex = hospitalIndex
|
||||||
|
this.conditionStructureDialogVisible = true
|
||||||
|
if(row.matchCnd){
|
||||||
|
this.conditionGroup = row.matchCnd
|
||||||
|
}
|
||||||
|
// this.$refs.conditionStructureDialog.onOpen(row.matchCnd ? row.matchCnd : null)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 条件构造器确认
|
||||||
|
confirmCnd(){
|
||||||
|
this.conditionStructureDialogVisible = false
|
||||||
|
this.$set(this.formData.healthCheckupProjectSubjects[this.hospitalIndex].subjectMoneys[this.subjectMoneyIndex], 'matchCnd', this.conditionGroup)
|
||||||
|
},
|
||||||
|
|
||||||
async createUserList(row) {
|
async createUserList(row) {
|
||||||
const msg = '您确定要生成【' + row.name + '】体检名单吗?(该名单生成是按照创建时选择的可报名人员范围来生成)'
|
const msg = '您确定要生成【' + row.name + '】体检名单吗?(该名单生成是按照创建时选择的可报名人员范围来生成)'
|
||||||
const confirm = await this.$confirm(msg, '提示', {
|
const confirm = await this.$confirm(msg, '提示', {
|
||||||
@@ -475,8 +550,13 @@ layout("/layouts/platform.html"){
|
|||||||
this.codeDialogVisible = true
|
this.codeDialogVisible = true
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteRow(row, index) {
|
deleteSubject(row, index) {
|
||||||
this.formData.healthCheckupProjectSubjects.splice(index, 1)
|
this.formData.healthCheckupProjectSubjects.splice(index, 1)
|
||||||
|
if (row.id) this.deleteSubjectIds.push(row.id)
|
||||||
|
},
|
||||||
|
|
||||||
|
deleteRow(row, index, subjectMoneyIndex) {
|
||||||
|
this.formData.healthCheckupProjectSubjects[subjectMoneyIndex].subjectMoneys.splice(index, 1)
|
||||||
if (row.id) this.deleteRowIds.push(row.id)
|
if (row.id) this.deleteRowIds.push(row.id)
|
||||||
},
|
},
|
||||||
async doDelete(id) {
|
async doDelete(id) {
|
||||||
@@ -523,19 +603,20 @@ layout("/layouts/platform.html"){
|
|||||||
formData.healthCheckupProjectSubjects = JSON.stringify(this.formData.healthCheckupProjectSubjects)
|
formData.healthCheckupProjectSubjects = JSON.stringify(this.formData.healthCheckupProjectSubjects)
|
||||||
formData.activityGroupName = this.activityGroupList.find(v => v.groupId === this.formData.activityGroupId).groupName
|
formData.activityGroupName = this.activityGroupList.find(v => v.groupId === this.formData.activityGroupId).groupName
|
||||||
formData.deleteRowIds = JSON.stringify(this.deleteRowIds)
|
formData.deleteRowIds = JSON.stringify(this.deleteRowIds)
|
||||||
|
formData.deleteSubjectIds = JSON.stringify(this.deleteSubjectIds)
|
||||||
const resp = await $.post(loc() + "/doAdd", formData)
|
const resp = await $.post(loc() + "/doAdd", formData)
|
||||||
loading.close()
|
loading.close()
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.pageData()
|
this.pageData()
|
||||||
this.$refs.guava.index()
|
this.$refs.guava.index()
|
||||||
this.deleteRowIds = []
|
this.deleteRowIds = []
|
||||||
|
this.deleteSubjectIds = []
|
||||||
} else {
|
} else {
|
||||||
this.notifyWarning(resp.msg)
|
this.notifyWarning(resp.msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openAdd() {
|
openAdd() {
|
||||||
|
|
||||||
this.formData = {
|
this.formData = {
|
||||||
name: null,
|
name: null,
|
||||||
activityGroupId: null,
|
activityGroupId: null,
|
||||||
@@ -545,7 +626,8 @@ layout("/layouts/platform.html"){
|
|||||||
optionName: '套餐1',
|
optionName: '套餐1',
|
||||||
optionNameId: '',
|
optionNameId: '',
|
||||||
optionSort: '1',
|
optionSort: '1',
|
||||||
imgUrl: ''
|
imgUrl: '',
|
||||||
|
subjectMoneys: []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+33
-5
@@ -19,7 +19,7 @@ layout("/layouts/platform.html"){
|
|||||||
value-format="yyyy">
|
value-format="yyyy">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="年度">
|
<search-item label="体检项目">
|
||||||
<el-select @change="getHealthCheckupSubject();"
|
<el-select @change="getHealthCheckupSubject();"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
v-model="pageForm.projectId">
|
v-model="pageForm.projectId">
|
||||||
@@ -68,11 +68,17 @@ layout("/layouts/platform.html"){
|
|||||||
type="primary"
|
type="primary"
|
||||||
v-if="projectInfo.healthCheckupType==='jzg'">导出教职工未选名单
|
v-if="projectInfo.healthCheckupType==='jzg'">导出教职工未选名单
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="selectOptionByAdmin"
|
<!-- <el-button @click="selectOptionByAdmin"
|
||||||
icon="el-icon-printer"
|
icon="el-icon-printer"
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">管理员代选择
|
v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">管理员代选择
|
||||||
|
</el-button>-->
|
||||||
|
<el-button @click="selectOptionByLastYear"
|
||||||
|
icon="el-icon-printer"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">一键选择去年数据
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -260,7 +266,7 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
const {optionName} = this.projectSubjectOptions.find(v => v.id === this.noSelectOptionId)
|
const {optionName} = this.projectSubjectOptions.find(v => v.id === this.noSelectOptionId)
|
||||||
|
|
||||||
const confirm = await this.$confirm('请确定是否把【' + optionName + '】福利赋给未选择的教职工?', '提示', {
|
const confirm = await this.$confirm('请确定是否把【' + optionName + '】套餐赋给未选择的教职工?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
@@ -273,18 +279,40 @@ layout("/layouts/platform.html"){
|
|||||||
projectId: this.pageForm.projectId
|
projectId: this.pageForm.projectId
|
||||||
})
|
})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.selectByAdminDialogVisible = false
|
this.selectByAdminDialogVisible = false
|
||||||
this.notifySuccess(resp.msg)
|
this.notifySuccess(resp.msg)
|
||||||
},2000)
|
}, 2000)
|
||||||
} else {
|
} else {
|
||||||
this.notifyWarning(resp.msg)
|
this.notifyWarning(resp.msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
async selectOptionByLastYear() {
|
||||||
|
const confirm = await this.$confirm('请确定是否把没有选择的教职工统一选择去年的数据?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
if (confirm === "confirm") {
|
||||||
|
this.loading = true
|
||||||
|
const resp = await $.get(loc() + '/selectOptionByLastYear', {
|
||||||
|
projectId: this.pageForm.projectId
|
||||||
|
})
|
||||||
|
if (resp.code === 0) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.doSearch()
|
||||||
|
this.loading = false
|
||||||
|
this.notifySuccess(resp.msg)
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
this.notifyWarning(resp.msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
selectOptionByAdmin() {
|
selectOptionByAdmin() {
|
||||||
this.noSelectOptionId = null
|
this.noSelectOptionId = null
|
||||||
this.selectByAdminDialogVisible = true
|
this.selectByAdminDialogVisible = true
|
||||||
|
|||||||
+3
-3
@@ -91,7 +91,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<van-image
|
<van-image
|
||||||
height="76"
|
height="76"
|
||||||
radius="8"
|
radius="8"
|
||||||
:src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+row.cover"
|
:src="row.cover"
|
||||||
width="100"
|
width="100"
|
||||||
fit="cover">
|
fit="cover">
|
||||||
<template #loading>
|
<template #loading>
|
||||||
@@ -162,13 +162,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
},
|
},
|
||||||
|
|
||||||
onView(row) {
|
onView(row) {
|
||||||
if(row.selectCount > 0) {
|
/* if(row.selectCount > 0) {
|
||||||
vant.Dialog.alert({
|
vant.Dialog.alert({
|
||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
message: '此项活动您已选择',
|
message: '此项活动您已选择',
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}*/
|
||||||
// 检查项目是否已结束
|
// 检查项目是否已结束
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const endTime = new Date(row.choiceTimeEnd);
|
const endTime = new Date(row.choiceTimeEnd);
|
||||||
|
|||||||
+85
-13
@@ -3,7 +3,32 @@ let H5_PROJECT_MANAGE_FROM = {
|
|||||||
<van-action-sheet v-model="visible" title="体检套餐选择">
|
<van-action-sheet v-model="visible" title="体检套餐选择">
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<van-form ref="formRef" @submit="doSubmit">
|
<van-form ref="formRef" @submit="doSubmit">
|
||||||
<van-cell-group title="体检套餐">
|
<van-cell-group title="基础信息">
|
||||||
|
<van-field
|
||||||
|
input-align="right"
|
||||||
|
label="身份证号"
|
||||||
|
name="idCard"
|
||||||
|
readonly
|
||||||
|
required
|
||||||
|
placeholder="请选择身份证号"
|
||||||
|
v-model="formData.idCard"
|
||||||
|
:rules="[{ required: true, message: '请输入身份证号' }]">
|
||||||
|
</van-field>
|
||||||
|
<van-cell title="人员类型">{{formData.userState}}</van-cell>
|
||||||
|
<van-field
|
||||||
|
input-align="right"
|
||||||
|
readonly
|
||||||
|
required
|
||||||
|
label="婚姻状况"
|
||||||
|
name="marriage"
|
||||||
|
placeholder="请联系校工会补充婚姻状况"
|
||||||
|
v-model="formData.marriage"
|
||||||
|
:rules="[{ required: true, message: '请选择婚姻状况' }]"></van-field>
|
||||||
|
|
||||||
|
<van-cell title="出生年月">{{$moment(formData.birthday).format('YYYY-MM-DD')}}</van-cell>
|
||||||
|
<van-cell title="单位">{{formData.unitName}}</van-cell>
|
||||||
|
</van-cell-group>
|
||||||
|
<van-cell-group title="本年度预约体检医院">
|
||||||
<div class="van-card-body">
|
<div class="van-card-body">
|
||||||
<van-radio-group v-model="formData.subjectId" class="basic">
|
<van-radio-group v-model="formData.subjectId" class="basic">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
@@ -14,19 +39,29 @@ let H5_PROJECT_MANAGE_FROM = {
|
|||||||
<template #label>
|
<template #label>
|
||||||
<div style="display: flex; justify-content: space-between; margin-left: 8px">
|
<div style="display: flex; justify-content: space-between; margin-left: 8px">
|
||||||
<div>{{ item.optionName }}</div>
|
<div>{{ item.optionName }}</div>
|
||||||
<div @click="viewDesc(item)" style="color: #0e78c5">查看说明</div>
|
<div @click.stop="viewDesc(item)" style="color: #0e78c5">查看说明</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #right-icon>
|
<template #right-icon>
|
||||||
<van-radio :name="item.id"></van-radio>
|
<van-radio :name="item.id" @click.stop="clickRadio(item)"></van-radio>
|
||||||
</template>
|
</template>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
</div>
|
</div>
|
||||||
|
<van-field
|
||||||
|
input-align="right"
|
||||||
|
readonly
|
||||||
|
required
|
||||||
|
label="所选医院额度"
|
||||||
|
name="marriage"
|
||||||
|
placeholder="请选择医院"
|
||||||
|
v-model="formData.money"
|
||||||
|
:rules="[{ required: true, message: '请选择医院' }]"></van-field>
|
||||||
|
</van-cell>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
|
|
||||||
<van-cell-group title="基础信息">
|
<!-- <van-cell-group title="基础信息">
|
||||||
<div class="van-card-body">
|
<div class="van-card-body">
|
||||||
<van-field
|
<van-field
|
||||||
@click="campusVisible = true"
|
@click="campusVisible = true"
|
||||||
@@ -50,7 +85,7 @@ let H5_PROJECT_MANAGE_FROM = {
|
|||||||
</template>
|
</template>
|
||||||
</van-field>
|
</van-field>
|
||||||
</div>
|
</div>
|
||||||
</van-cell-group>
|
</van-cell-group>-->
|
||||||
|
|
||||||
<van-cell-group title="家属信息" v-if="formData.isFamily === '是'">
|
<van-cell-group title="家属信息" v-if="formData.isFamily === '是'">
|
||||||
<div style="padding: 10px;">
|
<div style="padding: 10px;">
|
||||||
@@ -158,7 +193,8 @@ let H5_PROJECT_MANAGE_FROM = {
|
|||||||
<div v-html="desc" class="pre_text"></div>
|
<div v-html="desc" class="pre_text"></div>
|
||||||
</van-popup>
|
</van-popup>
|
||||||
</van-action-sheet>
|
</van-action-sheet>
|
||||||
`, dicts: ["ASSET_USAGE_STATE"], data() {
|
`
|
||||||
|
, store, dicts: ["ASSET_USAGE_STATE"], data() {
|
||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
viewData: {},
|
viewData: {},
|
||||||
@@ -176,28 +212,57 @@ let H5_PROJECT_MANAGE_FROM = {
|
|||||||
campusVisible: false,
|
campusVisible: false,
|
||||||
descVisible: false,
|
descVisible: false,
|
||||||
desc: '',
|
desc: '',
|
||||||
project: {}
|
project: {},
|
||||||
|
|
||||||
|
marriageList: ["已婚", "未婚"],
|
||||||
|
marriageVisible: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 打开表单
|
// 打开表单
|
||||||
async onOpen(row) {
|
async onOpen(row) {
|
||||||
|
this.formData = {}
|
||||||
this.row = row;
|
this.row = row;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
await this.getCampus()
|
await this.getCampus()
|
||||||
await this.findSubject(row.projectId)
|
await this.findSubject(row.projectId)
|
||||||
if (row.projectId) {
|
if (row.projectId) {
|
||||||
this.selectInfo(row);
|
await this.selectInfo(row);
|
||||||
|
const {idCard, userState, marriage, birthday, unit} = this.$store.state.user
|
||||||
|
this.$set(this.formData, 'idCard', idCard)
|
||||||
|
this.$set(this.formData, 'userState', userState)
|
||||||
|
this.$set(this.formData, 'marriage', marriage)
|
||||||
|
this.$set(this.formData, 'birthday', birthday)
|
||||||
|
this.$set(this.formData, 'unitName', unit.name)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
clickRadio(item) {
|
||||||
|
const toast = this.$toast.loading({
|
||||||
|
duration: 0, // 持续展示 toast
|
||||||
|
forbidClick: true,
|
||||||
|
message: '查询中....',
|
||||||
|
});
|
||||||
|
$.post("/platform/healthCheckup/h5/getSubjectMoney", {
|
||||||
|
id: item.id,
|
||||||
|
marriage: this.formData.marriage
|
||||||
|
}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$set(this.formData, 'subjectId', item.id)
|
||||||
|
this.$set(this.formData, 'money', resp.data.money)
|
||||||
|
this.$set(this.formData, 'subjectMoneyId', resp.data.subjectMoneyId)
|
||||||
|
} else {
|
||||||
|
this.$set(this.formData, 'money', 0)
|
||||||
|
}
|
||||||
|
toast.clear();
|
||||||
|
})
|
||||||
|
},
|
||||||
async selectInfo(row) {
|
async selectInfo(row) {
|
||||||
//this.formData.projectId = row.projectId;
|
//this.formData.projectId = row.projectId;
|
||||||
const resp = await $.post('/platform/healthCheckup/h5/selectInfo', {projectId: row.projectId});
|
const resp = await $.post('/platform/healthCheckup/h5/selectInfo', {projectId: row.projectId});
|
||||||
if (resp.data !== null) {
|
if (resp.data !== null) {
|
||||||
this.formData = resp.data;
|
this.formData = resp.data;
|
||||||
const o = this.campusList.find(o => o.id === this.formData.campus)
|
/* const o = this.campusList.find(o => o.id === this.formData.campus)
|
||||||
this.formData.campusName = o.campusName
|
this.formData.campusName = o.campusName*/
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -221,12 +286,12 @@ let H5_PROJECT_MANAGE_FROM = {
|
|||||||
})
|
})
|
||||||
const formData = clone(this.formData);
|
const formData = clone(this.formData);
|
||||||
formData.projectId = this.row.projectId;
|
formData.projectId = this.row.projectId;
|
||||||
if (formData.isFamily === '否') {
|
/* if (formData.isFamily === '否') {
|
||||||
formData.companionList = [];
|
formData.companionList = [];
|
||||||
} else {
|
} else {
|
||||||
// 过滤空的家属信息
|
// 过滤空的家属信息
|
||||||
formData.companionList = formData.companionList.filter(item => item.userName && item.userName.trim() !== '');
|
formData.companionList = formData.companionList.filter(item => item.userName && item.userName.trim() !== '');
|
||||||
}
|
}*/
|
||||||
|
|
||||||
const resp = await $.post('/platform/healthCheckup/h5/doSubmit', {
|
const resp = await $.post('/platform/healthCheckup/h5/doSubmit', {
|
||||||
userSelection: JSON.stringify(formData),
|
userSelection: JSON.stringify(formData),
|
||||||
@@ -275,6 +340,13 @@ let H5_PROJECT_MANAGE_FROM = {
|
|||||||
this.campusVisible = false;
|
this.campusVisible = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 婚姻状况确认
|
||||||
|
onMarriageConfirm(value) {
|
||||||
|
this.$set(this.formData, 'marriage', value)
|
||||||
|
this.$set(this.formData, 'subjectId', null)
|
||||||
|
this.marriageVisible = false;
|
||||||
|
},
|
||||||
|
|
||||||
// 查询体检套餐
|
// 查询体检套餐
|
||||||
async findSubject(id) {
|
async findSubject(id) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user