需求开发

This commit is contained in:
liang.chao 2025-06-30 15:59:55 +08:00
parent 41305fdda5
commit 2bb6f4d5ae
45 changed files with 3732 additions and 19 deletions

View File

@ -38,6 +38,10 @@ public class OrganizationalBean {
private String status;
private String keyWorld;
private String workType;
private String teamType;
private String faceUrl;
private Integer isTeamLeader;
private String parentUserName;

View File

@ -0,0 +1,23 @@
package com.bonus.gs.sub.evaluate.evaluate.beans;
import lombok.Data;
/**
* @Authorliang.chao
* @Date2025/6/24 - 14:19
*/
@Data
public class ProjectBean {
private String id;
// 项目名称
private String projectName;
// 所属事业部
private String department;
// 项目经理
private String projectManager;
// 参与分包商数量
private Integer subcontractorNum;
private Integer evaluateDeptId;
private Integer personInChargeId;
private String keyWord;
}

View File

@ -0,0 +1,40 @@
package com.bonus.gs.sub.evaluate.evaluate.beans;
import lombok.Data;
/**
* @Authorliang.chao
* @Date2025/6/26 - 10:13
*/
@Data
public class TeamGroupBean {
// id
private String id;
// 所属分包商
private String subContractor;
// 所属项目
private String project;
// 班组名称
private String teamGroupName;
// 班组长
private String teamLeader;
// 班组类型id
private String teamTypeId;
// 班组类型
private String teamType;
// 班组状态
private Integer status;
// 班组人数
private String teamPersonNum;
private String keyWord;
private String name;
private String idCard;
private String phone;
private String sex;
private String workTypeId;
private String workType;
private String faceUrl;
private String isTeamLeader;
}

View File

@ -9,19 +9,20 @@ import com.bonus.gs.sub.evaluate.manager.controller.BaseController;
import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes;
import com.bonus.gs.sub.evaluate.manager.utils.GlobalConst;
import io.swagger.annotations.Api;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.io.File;
import java.util.List;
/**
*
* 外包单位组织架构控制层
*
* @author 黑子
*/
@Api(tags = "外包单位组织架")
@ -35,8 +36,13 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
@Resource
private OrganizationalDao dao;
@Value("${upload.dir}")
private String uploadDir;
/**
* 树拆线呢
*
* @param bean
* @return
*/
@ -53,6 +59,7 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
}
return ar;
}
@RequestMapping(value = "/getEvaluatePersonList", method = RequestMethod.GET)
@ResponseBody
public AjaxRes getEvaluatePersonList(EvaluatePersonBean bean) {
@ -70,6 +77,7 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
/**
* 项目下拉选
*
* @param bean
* @return
*/
@ -90,6 +98,7 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
/**
* 负责人下拉选
*
* @param bean
* @return
*/
@ -106,8 +115,10 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
}
return ar;
}
/**
* 外包商下拉选
*
* @param bean
* @return
*/
@ -125,10 +136,91 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
return ar;
}
/**
* 所有外包商下拉选
*
* @param
* @return
*/
@RequestMapping(value = "getSubContractorSelected", method = RequestMethod.POST)
@ResponseBody
public AjaxRes getSubContractorSelected() {
AjaxRes ar = getAjaxRes();
try {
List<OrganizationalBean> list = service.getSubContractorSelected();
ar.setSucceed(list);
} catch (Exception e) {
logger.error(e.toString(), e);
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
/**
* 根据外包商获取项目下拉框数据
*
* @param
* @return
*/
@RequestMapping(value = "getProjectBySubContractor", method = RequestMethod.POST)
@ResponseBody
public AjaxRes getProjectBySubContractor(OrganizationalBean bean) {
AjaxRes ar = getAjaxRes();
try {
List<OrganizationalBean> list = service.getProjectBySubContractor(bean);
ar.setSucceed(list);
} catch (Exception e) {
logger.error(e.toString(), e);
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
/**
* 获取班组类型下拉框
*
* @param
* @return
*/
@RequestMapping(value = "getTeamGroupType", method = RequestMethod.POST)
@ResponseBody
public AjaxRes getTeamGroupType(OrganizationalBean bean) {
AjaxRes ar = getAjaxRes();
try {
List<OrganizationalBean> list = service.getTeamGroupType(bean);
ar.setSucceed(list);
} catch (Exception e) {
logger.error(e.toString(), e);
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
/**
* 获取工种类型下拉框
*
* @param
* @return
*/
@RequestMapping(value = "getWorkType", method = RequestMethod.POST)
@ResponseBody
public AjaxRes getWorkType(OrganizationalBean bean) {
AjaxRes ar = getAjaxRes();
try {
List<OrganizationalBean> list = service.getWorkType(bean);
ar.setSucceed(list);
} catch (Exception e) {
logger.error(e.toString(), e);
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
/**
* 新增人员下拉选(isAdd==1
* 修改 不传
*
* @param bean
* @return
*/
@ -157,19 +249,58 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
public AjaxRes addData(@RequestBody OrganizationalBean bean) {
AjaxRes ar = getAjaxRes();
try {
ar = service.addData(bean);
ar = service.addData(bean);
} catch (Exception e) {
logger.error(e.toString(), e);
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
/**
* 根据外包商id(project_assignment)和项目id获取组织架构(pm_org_info)中外包商id
* 修改 不传
*
* @param bean
* @return
*/
@RequestMapping(value = "addTeamGroup", method = RequestMethod.POST)
@ResponseBody
public AjaxRes getsubcontractorId(@ModelAttribute OrganizationalBean bean,
@RequestParam("file") MultipartFile file) {
AjaxRes ar = getAjaxRes();
try {
if (file != null && !file.isEmpty()) {
// 验证文件类型
String originalFileName = file.getOriginalFilename();
String fileExtension = originalFileName != null ? originalFileName.split("\\.")[1] : "";
if (!"jpg".equalsIgnoreCase(fileExtension) && !"png".equalsIgnoreCase(fileExtension)) {
ar.setFailMsg("文件类型错误请上传jpg或png格式的文件");
return ar;
}
}
File targetDir = new File(uploadDir);
if (!targetDir.exists()) {
targetDir.mkdirs();
}
String fileName = System.currentTimeMillis() + "_" + file.getOriginalFilename();
File targetFile = new File(uploadDir, fileName);
file.transferTo(targetFile);
bean.setFaceUrl(fileName);
ar = service.addTeamGroup(bean);
} catch (Exception e) {
logger.error(e.toString(), e);
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
@RequestMapping(value = "addDept", method = RequestMethod.POST)
@ResponseBody
public AjaxRes addDept(@RequestBody OrganizationalBean bean) {
AjaxRes ar = getAjaxRes();
try {
ar = service.addDept(bean);
ar = service.addDept(bean);
} catch (Exception e) {
logger.error(e.toString(), e);
ar.setFailMsg(GlobalConst.DATA_FAIL);
@ -178,10 +309,10 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
}
/**
* 更换班组长
* 更换班组长
*
* @param bean
* @return
*/
@ -201,6 +332,7 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
/**
* 查询详情
*
* @param bean
* @return
*/
@ -216,14 +348,16 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
}
return ar;
}
/**
* 退场
*
* @param bean
* @return
*/
@RequestMapping(value = "userOutData", method = RequestMethod.POST)
@ResponseBody
public AjaxRes userOutData(OrganizationalBean bean) {
public AjaxRes userOutData(@RequestBody OrganizationalBean bean) {
AjaxRes ar = getAjaxRes();
try {
ar = service.userOutData(bean);
@ -246,6 +380,7 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
}
return ar;
}
@RequestMapping(value = "updateName", method = RequestMethod.POST)
@ResponseBody
public AjaxRes updateName(@RequestBody OrganizationalBean bean) {

View File

@ -0,0 +1,84 @@
package com.bonus.gs.sub.evaluate.evaluate.controller;
import com.bonus.gs.sub.evaluate.evaluate.beans.NodeBean;
import com.bonus.gs.sub.evaluate.evaluate.beans.PersonBean;
import com.bonus.gs.sub.evaluate.evaluate.beans.ProjectBean;
import com.bonus.gs.sub.evaluate.evaluate.service.ProjectService;
import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes;
import com.bonus.gs.sub.evaluate.manager.utils.GlobalConst;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @Authorliang.chao
* @Date2025/6/24 - 14:15
*/
@RestController
@RequestMapping("/project")
@Slf4j
public class ProjectController {
@Autowired
private ProjectService service;
@GetMapping("list")
public AjaxRes getProjectList(ProjectBean projectBean) {
AjaxRes ar = new AjaxRes();
try {
List<ProjectBean> projectList = service.getProjectList(projectBean);
ar.setListSucceed(projectList);
} catch (Exception e) {
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
@PostMapping("updateName")
public AjaxRes updateName(@RequestBody ProjectBean projectBean) {
AjaxRes ar = new AjaxRes();
try {
Integer i = service.updateName(projectBean);
if (i > 0) {
ar.setSucceedMsg("修改成功");
} else {
ar.setFailMsg("修改失败");
}
} catch (Exception e) {
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
@PostMapping("delProject")
public AjaxRes delProject(@RequestBody ProjectBean projectBean) {
AjaxRes ar = new AjaxRes();
try {
Integer i = service.delProject(projectBean);
if (i > 0) {
ar.setSucceedMsg("删除成功");
} else {
ar.setFailMsg("删除失败");
}
} catch (Exception e) {
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
@PostMapping("addProject")
public AjaxRes addProject(@RequestBody ProjectBean projectBean) {
AjaxRes ar = new AjaxRes();
try {
Integer i = service.addProject(projectBean);
if (i > 0) {
ar.setSucceedMsg("新增成功");
} else {
ar.setFailMsg("新增失败");
}
} catch (Exception e) {
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
}

View File

@ -0,0 +1,147 @@
package com.bonus.gs.sub.evaluate.evaluate.controller;
import com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean;
import com.bonus.gs.sub.evaluate.evaluate.beans.ProjectBean;
import com.bonus.gs.sub.evaluate.evaluate.beans.TeamGroupBean;
import com.bonus.gs.sub.evaluate.evaluate.service.TeamGroupService;
import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes;
import com.bonus.gs.sub.evaluate.manager.utils.GlobalConst;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.util.List;
/**
* @Authorliang.chao
* @Date2025/6/26 - 10:11
*/
@RestController
@RequestMapping("/teamGroup")
public class TeamGroupController {
@Autowired
private TeamGroupService teamGroupService;
@Value("${upload.dir}")
private String uploadDir;
@GetMapping("list")
public AjaxRes getProjectList(TeamGroupBean teamGroupBean) {
AjaxRes ar = new AjaxRes();
try {
List<TeamGroupBean> teamGroupList = teamGroupService.getTeamGroupList(teamGroupBean);
ar.setListSucceed(teamGroupList);
} catch (Exception e) {
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
@PostMapping("delTeamGroup")
public AjaxRes delTeamGroup(@RequestBody TeamGroupBean teamGroupBean) {
AjaxRes ar = new AjaxRes();
try {
Integer i = teamGroupService.delTeamGroup(teamGroupBean);
if (i > 0) {
ar.setSucceedMsg("删除成功");
} else {
ar.setFailMsg("删除失败");
}
} catch (Exception e) {
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
// 获取班组人员
@GetMapping("getTeamGroupPerson")
public AjaxRes getTeamGroupPerson(TeamGroupBean teamGroupBean) {
AjaxRes ar = new AjaxRes();
try {
List<TeamGroupBean> teamGroupList = teamGroupService.getTeamGroupPerson(teamGroupBean);
ar.setListSucceed(teamGroupList);
} catch (Exception e) {
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
@PostMapping("addTeamGroupPerson")
public AjaxRes addTeamGroupPerson(@ModelAttribute TeamGroupBean bean,
@RequestParam("file") MultipartFile file) {
AjaxRes ar = new AjaxRes();
try {
if (file != null && !file.isEmpty()) {
// 验证文件类型
String originalFileName = file.getOriginalFilename();
String fileExtension = originalFileName != null ? originalFileName.split("\\.")[1] : "";
if (!"jpg".equalsIgnoreCase(fileExtension) && !"png".equalsIgnoreCase(fileExtension)) {
ar.setFailMsg("文件类型错误请上传jpg或png格式的文件");
return ar;
}
}
File targetDir = new File(uploadDir);
if (!targetDir.exists()) {
targetDir.mkdirs();
}
String fileName = System.currentTimeMillis() + "_" + file.getOriginalFilename();
File targetFile = new File(uploadDir, fileName);
file.transferTo(targetFile);
bean.setFaceUrl(fileName);
return teamGroupService.addTeamGroupPerson(bean);
} catch (Exception e) {
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
@PostMapping("updateTeamPerson")
public AjaxRes updateTeamPerson(@ModelAttribute TeamGroupBean bean,
@RequestParam(value = "file", required = false)MultipartFile file) {
AjaxRes ar = new AjaxRes();
try {
if (file != null && !file.isEmpty()) {
// 验证文件类型
String originalFileName = file.getOriginalFilename();
String fileExtension = originalFileName != null ? originalFileName.split("\\.")[1] : "";
if (!"jpg".equalsIgnoreCase(fileExtension) && !"png".equalsIgnoreCase(fileExtension)) {
ar.setFailMsg("文件类型错误请上传jpg或png格式的文件");
return ar;
}
File targetDir = new File(uploadDir);
if (!targetDir.exists()) {
targetDir.mkdirs();
}
String fileName = System.currentTimeMillis() + "_" + file.getOriginalFilename();
File targetFile = new File(uploadDir, fileName);
file.transferTo(targetFile);
bean.setFaceUrl(fileName);
}
return teamGroupService.updateTeamPerson(bean);
} catch (Exception e) {
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
@PostMapping("delTeamPerson")
public AjaxRes delTeamPerson(@RequestBody TeamGroupBean teamGroupBean) {
AjaxRes ar = new AjaxRes();
try {
Integer i = teamGroupService.delTeamPerson(teamGroupBean);
if (i > 0) {
ar.setSucceedMsg("删除成功");
} else {
ar.setFailMsg("班组长无法删除!");
}
} catch (Exception e) {
ar.setFailMsg(GlobalConst.DATA_FAIL);
}
return ar;
}
}

View File

@ -169,4 +169,18 @@ public interface OrganizationalDao{
int getConsIsExistByPro(OrganizationalBean bean);
int updateName(OrganizationalBean bean);
List<OrganizationalBean> getSubContractorSelected();
List<OrganizationalBean> getProjectBySubContractor(OrganizationalBean bean);
List<OrganizationalBean> getTeamGroupType(OrganizationalBean bean);
String getsubcontractorId(OrganizationalBean bean);
Integer insetTeamGroupType(OrganizationalBean bean);
Integer insetTeamPerson(OrganizationalBean bean);
List<OrganizationalBean> getWorkType(OrganizationalBean bean);
}

View File

@ -0,0 +1,24 @@
package com.bonus.gs.sub.evaluate.evaluate.dao;
import com.bonus.gs.sub.evaluate.evaluate.beans.ProjectBean;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @Authorliang.chao
* @Date2025/6/24 - 14:29
*/
@Mapper
public interface ProjectDao {
List<ProjectBean> getProjectList(ProjectBean projectBean);
Integer getSubcontractorNum(ProjectBean projectBean);
Integer updateName(ProjectBean projectBean);
Integer delProject(ProjectBean projectBean);
Integer addProject(ProjectBean projectBean);
}

View File

@ -0,0 +1,42 @@
package com.bonus.gs.sub.evaluate.evaluate.dao;
import com.bonus.gs.sub.evaluate.evaluate.beans.ProjectBean;
import com.bonus.gs.sub.evaluate.evaluate.beans.TeamGroupBean;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @Authorliang.chao
* @Date2025/6/24 - 14:29
*/
@Mapper
public interface TeamGroupDao {
List<TeamGroupBean> getTeamGroupList(TeamGroupBean teamGroupBean);
Integer updaTeteamGroup(TeamGroupBean teamGroupBean);
Integer updaTeteamType(TeamGroupBean teamGroupBean);
Integer selectTeteamType(TeamGroupBean teamGroupBean);
Integer addTeamType(TeamGroupBean teamGroupBean);
Integer delTeamGroup(TeamGroupBean teamGroupBean);
Integer delTeamGroupType(TeamGroupBean teamGroupBean);
List<TeamGroupBean> getTeamGroupPerson(TeamGroupBean teamGroupBean);
Integer addTeamGroupPerson(TeamGroupBean teamGroupBean);
Integer getUserNumByIdCard(TeamGroupBean teamGroupBean);
Integer getUserNumByPhone(TeamGroupBean teamGroupBean);
Integer updateTeamPerson(TeamGroupBean teamGroupBean);
Integer isTeamLeader(TeamGroupBean teamGroupBean);
Integer delTeamPerson(TeamGroupBean teamGroupBean);
}

View File

@ -68,4 +68,14 @@ public interface OrganizationalService{
AjaxRes userOutDataFail(OrganizationalBean bean);
AjaxRes updateName(OrganizationalBean bean);
List<OrganizationalBean> getSubContractorSelected();
List<OrganizationalBean> getProjectBySubContractor(OrganizationalBean bean);
List<OrganizationalBean> getTeamGroupType(OrganizationalBean bean);
AjaxRes addTeamGroup(OrganizationalBean bean);
List<OrganizationalBean> getWorkType(OrganizationalBean bean);
}

View File

@ -329,6 +329,63 @@ public class OrganizationalServiceImpl implements OrganizationalService {
return ar;
}
@Override
public List<OrganizationalBean> getSubContractorSelected() {
return mapper.getSubContractorSelected();
}
@Override
public List<OrganizationalBean> getProjectBySubContractor(OrganizationalBean bean) {
return mapper.getProjectBySubContractor(bean);
}
@Override
public List<OrganizationalBean> getTeamGroupType(OrganizationalBean bean) {
return mapper.getTeamGroupType(bean);
}
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxRes addTeamGroup(OrganizationalBean bean) {
AjaxRes ar = new AjaxRes();
try {
// 根据外包商id(project_assignment)和项目id获取组织架构(pm_org_info)中外包商id
String id = mapper.getsubcontractorId(bean);
bean.setParentId(id);
int userNum = mapper.getUserNum(bean);
if (userNum > 0) {
ar.setFailMsg("该人员已存在");
return ar;
}
int teamName = mapper.getTeamName(bean);
if (teamName > 0) {
ar.setFailMsg("该班组名称已存在");
return ar;
}
int num = mapper.addData(bean);
if (num > 0) {
// 新增班组类型
mapper.insetTeamGroupType(bean);
// 新增班组类型
mapper.insetTeamPerson(bean);
ar.setSucceed("新增成功");
return ar;
}
ar.setFailMsg("新增失败,请联系管理员");
return ar;
} catch (Exception e) {
logger.error(e.toString(), e);
ar.setFailMsg("新增失败,请联系管理员");
}
return ar;
}
@Override
public List<OrganizationalBean> getWorkType(OrganizationalBean bean) {
return mapper.getWorkType(bean);
}
public static List<OrganizationalBean> buildTree(List<OrganizationalBean> nodes) {
// 根节点是没有父节点的节点
List<OrganizationalBean> rootNodes = nodes.stream()

View File

@ -0,0 +1,20 @@
package com.bonus.gs.sub.evaluate.evaluate.service;
import com.bonus.gs.sub.evaluate.evaluate.beans.ProjectBean;
import java.util.List;
/**
* @Authorliang.chao
* @Date2025/6/24 - 14:16
*/
public interface ProjectService {
List<ProjectBean> getProjectList(ProjectBean projectBean);
Integer updateName(ProjectBean projectBean);
Integer delProject(ProjectBean projectBean);
Integer addProject(ProjectBean projectBean);
}

View File

@ -0,0 +1,43 @@
package com.bonus.gs.sub.evaluate.evaluate.service;
import com.bonus.gs.sub.evaluate.evaluate.beans.ProjectBean;
import com.bonus.gs.sub.evaluate.evaluate.dao.ProjectDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Authorliang.chao
* @Date2025/6/24 - 14:17
*/
@Service
public class ProjectServiceImpl implements ProjectService {
@Autowired
private ProjectDao projectDao;
@Override
public List<ProjectBean> getProjectList(ProjectBean projectBean) {
List<ProjectBean> projectList = projectDao.getProjectList(projectBean);
for (ProjectBean bean : projectList) {
Integer num = projectDao.getSubcontractorNum(bean);
bean.setSubcontractorNum(num);
}
return projectList;
}
@Override
public Integer updateName(ProjectBean projectBean) {
return projectDao.updateName(projectBean);
}
@Override
public Integer delProject(ProjectBean projectBean) {
return projectDao.delProject(projectBean);
}
@Override
public Integer addProject(ProjectBean projectBean) {
return projectDao.addProject(projectBean);
}
}

View File

@ -0,0 +1,27 @@
package com.bonus.gs.sub.evaluate.evaluate.service;
import com.bonus.gs.sub.evaluate.evaluate.beans.ProjectBean;
import com.bonus.gs.sub.evaluate.evaluate.beans.TeamGroupBean;
import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes;
import java.util.List;
/**
* @Authorliang.chao
* @Date2025/6/26 - 10:12
*/
public interface TeamGroupService {
List<TeamGroupBean> getTeamGroupList(TeamGroupBean teamGroupBean);
void updaTeteamGroup(TeamGroupBean teamGroupBean);
Integer delTeamGroup(TeamGroupBean teamGroupBean);
List<TeamGroupBean> getTeamGroupPerson(TeamGroupBean teamGroupBean);
AjaxRes addTeamGroupPerson(TeamGroupBean teamGroupBean);
AjaxRes updateTeamPerson(TeamGroupBean teamGroupBean);
Integer delTeamPerson(TeamGroupBean teamGroupBean);
}

View File

@ -0,0 +1,99 @@
package com.bonus.gs.sub.evaluate.evaluate.service;
import com.bonus.gs.sub.evaluate.evaluate.beans.TeamGroupBean;
import com.bonus.gs.sub.evaluate.evaluate.dao.TeamGroupDao;
import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Authorliang.chao
* @Date2025/6/26 - 10:12
*/
@Service
public class TeamGroupServiceImpl implements TeamGroupService {
@Autowired
private TeamGroupDao teamGroupDao;
@Override
public List<TeamGroupBean> getTeamGroupList(TeamGroupBean teamGroupBean) {
return teamGroupDao.getTeamGroupList(teamGroupBean);
}
@Override
public void updaTeteamGroup(TeamGroupBean teamGroupBean) {
teamGroupDao.updaTeteamGroup(teamGroupBean);
Integer i = teamGroupDao.selectTeteamType(teamGroupBean);
if (i > 0) {
// 有的话执行修改 没有执行新增
teamGroupDao.updaTeteamType(teamGroupBean);
} else {
teamGroupDao.addTeamType(teamGroupBean);
}
}
@Override
public Integer delTeamGroup(TeamGroupBean teamGroupBean) {
Integer i = teamGroupDao.delTeamGroup(teamGroupBean);
Integer i1 = teamGroupDao.delTeamGroupType(teamGroupBean);
if (i > 0 || i1 > 0) {
return 1;
}
return 0;
}
@Override
public List<TeamGroupBean> getTeamGroupPerson(TeamGroupBean teamGroupBean) {
return teamGroupDao.getTeamGroupPerson(teamGroupBean);
}
@Override
public AjaxRes addTeamGroupPerson(TeamGroupBean teamGroupBean) {
AjaxRes ar = new AjaxRes();
int idCardNum = teamGroupDao.getUserNumByIdCard(teamGroupBean);
if (idCardNum > 0) {
ar.setFailMsg("该人员身份证已注册,请重新输入");
return ar;
}
int phoneNum = teamGroupDao.getUserNumByPhone(teamGroupBean);
if (phoneNum > 0) {
ar.setFailMsg("该人员手机号已注册,请重新输入");
return ar;
}
Integer i = teamGroupDao.addTeamGroupPerson(teamGroupBean);
if (i > 0) {
ar.setSucceed("新增成功");
return ar;
} else {
ar.setFailMsg("新增失败");
return ar;
}
}
@Override
public AjaxRes updateTeamPerson(TeamGroupBean teamGroupBean) {
AjaxRes ar = new AjaxRes();
Integer i = teamGroupDao.updateTeamPerson(teamGroupBean);
if (i > 0) {
ar.setSucceed("修改成功");
return ar;
} else {
ar.setFailMsg("修改失败");
return ar;
}
}
@Override
public Integer delTeamPerson(TeamGroupBean teamGroupBean) {
// 判断是否是班组长如果是的话不能删除
Integer isLeader = teamGroupDao.isTeamLeader(teamGroupBean);
if (isLeader == 0) {
return 0;
} else {
return teamGroupDao.delTeamPerson(teamGroupBean);
}
}
}

View File

@ -49,6 +49,8 @@ public class ViolationBean {
private String url;
private String userName;
private String deptId;
@ApiModelProperty("单位地址")
private String address;
@ApiModelProperty("企业名称")
private String enterpriseName;
@ApiModelProperty("统一社会信用代码")

View File

@ -356,12 +356,14 @@ public class ViolationController extends BaseController<ViolationBean> {
String corporateName = getValue(sheetRow.getCell(3)).trim();
String idCard = getValue(sheetRow.getCell(4)).trim();
String phone = translateToPlainStr(getValue(sheetRow.getCell(5)).trim());
String address = translateToPlainStr(getValue(sheetRow.getCell(6)).trim());
bean.setEnterpriseName(enterpriseName);
bean.setSocialCreditCode(socialCreditCode);
bean.setSetTime(setTime);
bean.setCorporateName(corporateName);
bean.setIdCard(idCard);
bean.setPhone(phone);
bean.setAddress(address);
ar=service.updateShopBaseInfo(bean,row);
} catch (Exception e) {
logger.error(e.toString(), e);
@ -514,6 +516,7 @@ public class ViolationController extends BaseController<ViolationBean> {
maps.put("idCard", bean.getIdCard());
maps.put("phone", bean.getPhone());
maps.put("proNum", bean.getProNum());
maps.put("address", bean.getAddress());
break;
case"人员违章记录表":
maps.put("name", bean.getName());
@ -571,6 +574,7 @@ public class ViolationController extends BaseController<ViolationBean> {
list.add("法人身份证号码");
list.add("法人手机号码");
list.add("项目数量");
list.add("单位地址");
break;
case"人员违章记录表":
list.add("姓名");

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.bonus.gs.sub.evaluate.evaluate.dao.OrganizationalDao">
<insert id="addData">
<insert id="addData" useGeneratedKeys="true" keyProperty="id">
insert into pm_org_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,</if>
@ -225,6 +225,14 @@
#{userName}, #{orgRelId})
</insert>
<insert id="insetTeamGroupType">
insert into team_group_type(team_group_id,team_type)
values (#{id}, #{teamType})
</insert>
<insert id="insetTeamPerson">
insert into team_person(team_id, name, id_card, phone,sex,work_type,face_url,is_team_leader)
values (#{id}, #{userName},#{idCard}, #{userPhone}, #{sex}, #{workType}, #{faceUrl}, #{isTeamLeader})
</insert>
<select id="getUserList" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
select NAME userName, LOGIN_NAME idCard, SEX, TELPHONE userPhone, dept_id tableId
FROM gs_exam.pm_user
@ -267,4 +275,38 @@
where parent_id = #{parentId} and name = #{name}
and status = 1
</select>
<select id="getSubContractorSelected"
resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
select id,
enterpriseName as name
from project_assignment where is_active = 1
</select>
<select id="getProjectBySubContractor"
resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
SELECT
poi2.id,
poi2.NAME
FROM
pm_org_info poi
LEFT JOIN pm_org_info poi2 ON poi.parent_id = poi2.id
WHERE
poi.STATUS = 1
AND poi.LEVEL = 4
AND poi.lk_id = #{id}
</select>
<select id="getTeamGroupType" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
select id,
val name
from t_dict
where type = 'teamType'
</select>
<select id="getsubcontractorId" resultType="java.lang.String">
select id from pm_org_info where parent_id = #{parentId} and lk_id = #{id} and status = 1
</select>
<select id="getWorkType" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
select id,
val name
from t_dict
where type = 'workType'
</select>
</mapper>

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.bonus.gs.sub.evaluate.evaluate.dao.ProjectDao">
<insert id="addProject">
INSERT INTO pm_org_info(
name,
parent_id,
level,
status,
table_source,
user_id,
user_name)
VALUES(
#{projectName},
#{parentId},
3,
1,
'pm_dept'
#{userId},
#{userName}
)
</insert>
<update id="updateName">
UPDATE pm_org_info
SET
name = #{projectName}
WHERE
id = #{id}
</update>
<delete id="delProject">
DELETE FROM pm_org_info
WHERE
id = #{id}
</delete>
<select id="getProjectList" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.ProjectBean">
SELECT
poi1.id,
poi1.name as projectName,
poi2.name as department,
poi1.user_name as projectManager
FROM
pm_org_info poi1
LEFT JOIN pm_org_info poi2 ON poi1.parent_id = poi2.id
WHERE
poi1.LEVEL = 3
AND poi1.`status` = 1
<if test="keyWord != null and keyWord != ''">
and poi1.name like concat('%', #{keyWord}, '%')
</if>
<if test="evaluateDeptId != null">
and poi2.id = #{evaluateDeptId}
</if>
<if test="personInChargeId != null">
and poi1.user_id = #{personInChargeId}
</if>
</select>
<select id="getSubcontractorNum" resultType="java.lang.Integer">
SELECT
COUNT(1)
FROM
pm_org_info
WHERE
status = 1 and parent_id = #{id}
</select>
</mapper>

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.bonus.gs.sub.evaluate.evaluate.dao.TeamGroupDao">
<insert id="addTeamType">
insert into team_group_type(team_group_id,team_type) values(#{id},#{teamType})
</insert>
<insert id="addTeamGroupPerson">
insert into team_person(team_id,name,id_card,phone,sex,work_type,face_url,is_team_leader)
values
(#{id},#{name},#{idCard},#{phone},#{sex},#{workTypeId},#{faceUrl},#{isTeamLeader})
</insert>
<update id="updaTeteamType">
update team_group_type set team_type = #{teamType} where team_group_id = #{id}
</update>
<update id="updaTeteamGroup">
update pm_org_info set name = #{teamGroupName} where id = #{id}
</update>
<update id="updateTeamPerson">
update team_person set name = #{name},id_card = #{idCard},phone = #{phone},sex = #{sex},work_type = #{workType},face_url = #{faceUrl}
where id = #{id}
</update>
<delete id="delTeamGroup">
delete from pm_org_info where id = #{id}
</delete>
<delete id="delTeamGroupType">
delete from team_group_type where team_group_id = #{id}
</delete>
<delete id="delTeamPerson">
delete from team_person where id = #{id}
</delete>
<select id="getTeamGroupList" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.TeamGroupBean">
SELECT
poi2.NAME subContractor,
poi3.NAME project,
poi.NAME teamGroupName,
poi.id as id,
poi.status as status,
CONCAT( poi.user_name, '/', poi.user_phone ) teamLeader,
td.id as teamTypeId,
td.val teamType,
count( tp.team_id ) teamPersonNum
FROM
pm_org_info poi
LEFT JOIN pm_org_info poi2 ON poi.parent_id = poi2.id
LEFT JOIN pm_org_info poi3 ON poi2.parent_id = poi3.id
left join team_group_type tgt on poi.id = tgt.team_group_id
left join t_dict td on tgt.team_type = td.id
left join team_person tp on poi.id = tp.team_id
WHERE
poi.`level` = 5
AND poi.`status` IN (1,2)
<if test="keyWord != null and keyWord != ''">
AND (
poi2.NAME like concat('%',#{keyWord},'%') or
poi3.NAME like concat('%',#{keyWord},'%') or
poi.NAME like concat('%',#{keyWord},'%')
)
</if>
<if test="status != null ">
and poi.status = #{status}
</if>
group by poi.id
</select>
<select id="selectTeteamType" resultType="java.lang.Integer">
select count(1) from team_group_type where team_group_id = #{id}
</select>
<select id="getTeamGroupPerson" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.TeamGroupBean">
SELECT tp.id,
tp.name,
tp.id_card as idCard,
tp.phone,
case when tp.sex = 1 then '男' else '女' end as sex,
tp.work_type workTypeId,
td.val as workType,
tp.face_url as faceUrl,
case when tp.is_team_leader = 0 then '是' else '否' end as isTeamLeader
FROM
team_person tp
left join t_dict td on tp.work_type = td.id
WHERE
tp.team_id = #{id}
<if test="name != null and name != ''">
and tp.name like concat('%',#{name},'%')
</if>
<if test="sex != null and sex != ''">
and tp.sex = #{sex}
</if>
</select>
<select id="getUserNumByIdCard" resultType="java.lang.Integer">
select count(1) from team_person where id_card = #{idCard}
</select>
<select id="getUserNumByPhone" resultType="java.lang.Integer">
select count(1) from team_person where phone = #{phone}
</select>
<select id="isTeamLeader" resultType="java.lang.Integer">
select is_team_leader from team_person where id = #{id}
</select>
</mapper>

View File

@ -13,6 +13,7 @@
currentScore,
create_time,
update_time,
address,
is_active
)
values(
@ -26,6 +27,7 @@
#{currentScore},
now(),
now(),
#{address},
'1'
)
</insert>
@ -37,6 +39,7 @@
corporateName,
idCard,
phone,
address,
inThoseDays,
currentScore,
create_time,
@ -50,6 +53,7 @@
#{corporateName},
#{idCard},
#{phone},
#{address},
YEAR(NOW()),
'12',
now(),
@ -67,6 +71,7 @@
phone = #{phone},
inThoseDays = #{inThoseDays},
currentScore = #{currentScore},
address = #{address},
update_time = now()
where id = #{id}
</update>
@ -113,7 +118,8 @@
pa.setTime as setTime,
pa.corporateName as corporateName,
pa.idCard as idCard,
pa.phone as phone
pa.phone as phone,
pa.address as address
FROM project_assignment pa
LEFT JOIN(SELECT count(1) num, lk_id
FROM pm_org_info
@ -131,6 +137,7 @@
pa.corporateName as corporateName,
pa.idCard as idCard,
pa.phone as phone,
pa.address as address,
ifnull(pro.num,'0') as proNum
FROM project_assignment pa
LEFT JOIN(
@ -294,7 +301,8 @@
pa.setTime as setTime,
pa.corporateName as corporateName,
pa.idCard as idCard,ifnull(pro.num,'0') proNum,
pa.phone as phone
pa.phone as phone,
pa.address as address
FROM project_assignment pa
LEFT JOIN(
SELECT count(1) num ,lk_id FROM pm_org_info GROUP BY lk_id

View File

@ -0,0 +1,89 @@
let form, table, tree;
let alreadyChooseTrees = [];
let selectData = [];
layui.use(['table', 'form', 'tree'], function () {
const $ = layui.$;
form = layui.form;
table = layui.table;
// 初始化下拉框
getdepartmentSelect();
getPromanagerSelect();
// 设置下拉框选项
function setSelectValue(list, selectName) {
let html = '<option value="">请选择</option>';
if (list && list.length > 0) {
$.each(list, function (index, item) {
html += `<option value="${item.id}">${item.name}</option>`;
});
}
$('#' + selectName).empty().append(html);
form.render('select');
}
// 获取事业部下拉数据
function getdepartmentSelect() {
$.ajax({
type: 'POST',
url: ctxPath + '/initiateEvaluate/getOrgSelect',
success: function (data) {
setSelectValue(data.obj, 'department');
}
});
}
// 获取项目经理下拉数据
function getPromanagerSelect() {
$.ajax({
type: 'POST',
url: ctxPath + '/organizational/getLeaderSelect',
success: function (data) {
setSelectValue(data.obj, 'personInChargeId');
}
});
}
// 表单提交事件监听
form.on('submit(formSubmit)', function (data) {
const field = data.field; // 获取表单字段 { proId: "xxx", department: "xxx", personInChargeId: "xxx" }
console.log("表单数据:", JSON.stringify(field));
const submitData = {
name: field.name, // 项目名称对应name字段
level: 3,
parentId: field.department, // 事业部ID
tableSource: 'pm_dept',
// 其他字段根据接口需要添加
userId: field.personInChargeId,// 保留项目经理ID
userName: $('#personInChargeId').find('option:selected').text()
};
// 调用保存接口
$.ajax({
url: ctxPath + '/organizational/addData',
type: 'POST',
dataType: "json",
contentType: "application/json",
data: JSON.stringify(submitData),
success: function (res) {
if (res.res === 1) {
layer.msg('新增成功', { icon: 6, time: 1500 }, function () {
var index = parent.layer.getFrameIndex(window.name); // 获取当前 iframe 层的索引
window.parent.location.reload();
parent.layer.close(index); // 关闭弹窗
});
} else if (res.res === 0) {
layer.msg(res.resMsg, { icon: 5 });
}
},
error: function () {
layer.msg("网络异常,请重试", { icon: 5 });
}
});
return false; // 阻止默认提交行为
});
});

View File

@ -0,0 +1,89 @@
let form, layer, dtree;
let objParam;
let id;
let currentLayerIndex = null;
function setParams(obj,layerIndex) {
objParam = JSON.parse(obj);
window.layerIndex = layerIndex;
$("#projectName").val(objParam.projectName);
id = objParam.id;
// $("#orgId").val(objParam.id);
layui.use(["form", "layer"], function () {
form = layui.form;
layer = layui.layer;
form.on("submit(formData)", function (obj) {
updateName(obj,id);
});
form.render();
});
}
function saveData2() {
$("#formSubmit").trigger("click");
}
// 提交
function updateName(data,id) {
let loadingMsg = layer.msg("正在提交保存,请稍等...", {
icon: 16,
shade: 0.01,
time: "0",
});
let url = `${ctxPath}` + "/project/updateName";
let item = {
id: id,
projectName: data.field.projectName,
};
// console.log(JSON.stringify(data)+"data")
$.ajax({
url: url,
type: "POST",
data: JSON.stringify(item),
dataType: "json",
contentType: "application/json",
beforeSend: function () {
$(".save").addClass("layui-btn-disabled").attr("disabled", true);
$(".cancel").addClass("layui-btn-disabled").attr("disabled", true);
},
success: function (result) {
layer.close(loadingMsg); // 关闭提示层
$(".save")
.removeClass("layui-btn-disabled")
.attr("disabled", false);
$(".cancel")
.removeClass("layui-btn-disabled")
.attr("disabled", false);
if (result.res === 1) {
layer.msg(result.resMsg, {icon: 1});
closePage(1);
} else {
layer.msg(result.resMsg, {icon: 2});
}
},
error: function (result) {
layer.close(loadingMsg); // 关闭提示层
layer.msg("服务异常,请稍后重试", {
icon: 16,
scrollbar: false,
time: 2000,
});
$(".save")
.removeClass("layui-btn-disabled")
.attr("disabled", false);
$(".cancel")
.removeClass("layui-btn-disabled")
.attr("disabled", false);
},
});
}
// 关闭页面
function closePage(type) {
if (type === 1) {
window.parent.search(1);
}
window.parent.layer.close(window.layerIndex);
}

View File

@ -0,0 +1,273 @@
// 专责审批 js文件
let layer, laydate, table, form;
$(function () {
layui.use(["layer", "laydate", "table", "form"], function () {
layer = layui.layer;
laydate = layui.laydate;
form = layui.form;
table = layui.table;
laydate.render({
elem: "#startDate",
type: "month",
format: "yyyy-MM",
});
businessDivisionPullDown(form, null);
getProjectManages();
initTable();
});
});
function getProjectManages() {
$.ajax({
url: `${ctxPath}` + "/organizational/getLeaderSelect",
type: "post",
data: {},
dataType: "JSON",
success: function (result) {
if (result.res === 1) {
setSelectValue(result.obj, "personInChargeId", "id", "name");
}
},
});
}
function setSelectValue(list, selectName, code, nameCode) {
let html = '<option value="">请选择项目经理</option>';
if (list && list.length > 0) {
$.each(list, function (index, item) {
html +=
"<option value='" +
item[code] +
"' item='" +
JSON.stringify(item) +
"'>" +
item[nameCode] +
"</option>";
});
}
$("#" + selectName)
.empty()
.append(html);
layui.form.render();
}
function search(type) {
if (type === 1) {
} else {
$("#keyWord").val("");
$("#evaluateDeptId").val("");
$("#personInChargeId").val("");
// $("#evStatus").val("");
// $("#status").val("");
// $("#startDate").val("");
// $("#endDate").val("");
form.render("select");
}
table.reload("baseTable", {
url: ctxPath + "/project/list",
page: {
curr: 1,
},
where: {
type: "audit",
keyWord: $("#keyWord").val(),
evaluateDeptId: $("#evaluateDeptId").val(),
personInChargeId: $("#personInChargeId").val(),
// evStatus: $("#evStatus").val(),
// status: $("#status").val(),
// startDate: $("#startDate").val(),
// endDate: $("#endDate").val(),
},
});
}
function initTable() {
//渲染表格
table.render({
elem: "#baseTable",
url: ctxPath + "/project/list", //数据接口
method: "get", //方式默认是get
toolbar: "default", //开启工具栏,此处显示默认图标,可以自定义模板,详见文档
where: {
type: "audit",
}, //post请求必须加where post请求需要的参数
cellMinWidth: 80,
cols: [
[
//表头
{
field: "number",
width: 80,
title: "序号",
align: "center",
type: "numbers",
},
{field: "projectName", align: "center", title: "项目名称"},
{field: "department", align: "center", title: "所属事业部"},
{field: "projectManager", align: "center", title: "项目经理"},
{field: "subcontractorNum", align: "center", title: "参与分包商数量"},
{
fixed: "right",
width: 180,
title: "操作",
align: "center",
templet: (d) => {
let text = "";
// if (d.isAudit == "1") {
text +=
'<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 15px"' +
' id="edit">编辑</a>';
// }
text +=
'<a lay-event="del" style="color: #009688;cursor: pointer;font-size:' +
' 15px;margin-left: 10px"' +
' id="del">删除</a>';
return text;
},
},
],
],
id: "baseTable",
page: true, //开启分页
loading: true, //数据加载中。。。
limits: [10, 20, 100], //一页选择显示3,5或10条数据
limit: 10, //一页显示5条数据
response: {
statusCode: 200, //规定成功的状态码默认0
},
parseData: function (res) {
//将原始数据解析成 table 组件所规定的数据res为从url中get到的数据
let result;
if (res.data !== "" && res.data != null && res.data !== "null") {
if (this.page.curr) {
result = res.data.slice(
this.limit * (this.page.curr - 1),
this.limit * this.page.curr
);
} else {
result = res.data.slice(0, this.limit);
}
}
return {
code: res.code, //解析接口状态
msg: res.msg, //解析提示文本
count: res.count, //解析数据长度
data: result, //解析数据列表
};
},
toolbar: "#toolbar",
});
table.on("tool(test)", function (obj) {
const data = obj.data; //当前行数据
const rowIndex = obj.index;
const layEvent = obj.event; //当前点击的事件名
switch (layEvent) {
case "edit":
ViewReviews(data, "编辑");
break;
case "del":
DelReviews(data, "删除");
break;
default:
console.warn(`未知事件: ${layEvent}`);
}
});
//查看子页面
function ViewReviews(data, title) {
try {
localStorage.setItem("AllAuditTitle", title);
const layerIndex = layer.open({
type: 2,
title: title,
shade: 0.3,
area: ["50%", "40%"],
scrollbar: true,
move: true,
anim: 2,
name: "editProject",
shadeClose: false,
content:
'./editForm.html',
success: function (layero, index) {
let iframeWin = window["layui-layer-iframe" + index];
iframeWin.setParams(JSON.stringify(data), index);
},
// end: function () {
// search(2);
// },
});
} catch (error) {
console.error("ViewReviews 错误:", error);
}
}
//删除项目信息
function DelReviews(data, title) {
try {
layer.confirm('是否确认删除?', {
title: title || '提示',
icon: 3,
shade: 0.3,
btn: ['确定', '取消']
}, function (index) {
// 禁用按钮防止重复提交
$(".save").addClass("layui-btn-disabled").attr("disabled", true);
$(".cancel").addClass("layui-btn-disabled").attr("disabled", true);
let item = {
id: data.id
};
$.ajax({
url: `${ctxPath}/project/delProject`,
type: "POST",
data: JSON.stringify(item),
dataType: "json",
contentType: "application/json",
success: function (res) {
$(".save").removeClass("layui-btn-disabled").attr("disabled", false);
$(".cancel").removeClass("layui-btn-disabled").attr("disabled", false);
if (res.res === 1) {
layer.msg("删除成功", { icon: 1 });
search(1); // 刷新列表
} else {
layer.msg("删除失败:" + (res.resMsg || "未知错误"), { icon: 2 });
}
layer.close(index); // 关闭弹窗
},
error: function () {
layer.close(loadingMsg);
$(".save").removeClass("layui-btn-disabled").attr("disabled", false);
$(".cancel").removeClass("layui-btn-disabled").attr("disabled", false);
layer.msg("服务异常,请稍后重试", {
icon: 2,
time: 2000
});
}
});
}, function (index) {
// 取消操作
layer.close(index);
});
} catch (error) {
console.error("DelReviews 错误:", error);
layer.msg("发生异常,请查看控制台", { icon: 2 });
}
}
}
function addProject() {
layer.open({
type: 2, // iframe 模式
title: "新增项目",
content: "./addForm.html", // 要打开的页面
maxmin: false, // 不显示最大化/最小化按钮
area: ["40%", "50%"], // 弹出层大小
success: function (layero, index) {
// 如果需要在弹出层加载完成后执行某些操作,可以在这里写
}
});
}

View File

@ -0,0 +1,155 @@
let form, table, tree;
let alreadyChooseTrees = [];
let selectData = [];
layui.use(['table', 'form', 'upload', 'tree'], function () {
const $ = layui.$;
form = layui.form;
upload = layui.upload;
table = layui.table;
// 使用 layui 的 form.on 监听下拉框变化
form.on('select(subContractor)', function (obj) {
const subContractorId = obj.value; // 获取选中的值
console.log("subContractorId:", subContractorId);
if (subContractorId) {
getPromanagerSelect(subContractorId);
}
});
// 让点击上传按钮触发文件输入框的点击事件
$('#uploadBtn').on('click', function () {
$('#fileInput').click();
});
// 文件选择后的回调处理
$('#fileInput').on('change', function () {
const file = $('#fileInput')[0].files[0];
const fileName = file.name;
const fileExtension = fileName.split('.').pop().toLowerCase();
// 校验文件类型,确保是 .xls 或 .xlsx 文件
if (fileExtension !== 'jpg' && fileExtension !== 'png') {
layer.msg('请选择 图片 文件(.jpg 或 .png', {icon: 2, time: 2000});
$('#fileInput').val('');
$('#fileInfo').html('');
} else {
$('#fileInfo').html('选中的文件:' + fileName);
}
});
// 初始化下拉框
getOutSourceSelected();
getTeamGroupType();
getWorkType();
// 设置下拉框选项
function setSelectValue(list, selectName) {
let html = '<option value="">请选择</option>';
if (list && list.length > 0) {
$.each(list, function (index, item) {
html += `<option value="${item.id}">${item.name}</option>`;
});
}
$('#' + selectName).empty().append(html);
form.render('select');
}
// 获取外包商下拉数据
function getOutSourceSelected() {
$.ajax({
type: 'POST',
url: ctxPath + '/organizational/getSubContractorSelected',
success: function (data) {
setSelectValue(data.obj, 'subContractor');
}
});
}
// 根据外包商获取项目下拉数据(支持传参)
function getPromanagerSelect(subContractorId) {
$.ajax({
type: 'POST',
url: ctxPath + '/organizational/getProjectBySubContractor',
data: {
id: subContractorId
},
success: function (data) {
setSelectValue(data.obj, 'project');
}
});
}
// 获取班组类型下拉框
function getTeamGroupType() {
$.ajax({
type: 'POST',
url: ctxPath + '/organizational/getTeamGroupType',
success: function (data) {
setSelectValue(data.obj, 'teamType');
}
});
}
// 获取工种类型下拉框
function getWorkType() {
$.ajax({
type: 'POST',
url: ctxPath + '/organizational/getWorkType',
success: function (data) {
setSelectValue(data.obj, 'workType');
}
});
}
// 表单提交事件监听
form.on('submit(formSubmit)', function (data) {
const field = data.field;
// 校验文件是否选择
const file = $('#fileInput')[0].files[0];
console.log("file:", file)
if (!file) {
layer.msg("请上传文件", {icon: 2, time: 2000});
return false;
}
console.log("表单数据:", JSON.stringify(field));
const formDataWithFile = new FormData();
formDataWithFile.append("id", field.subContractor);
formDataWithFile.append("parentId", field.project);
formDataWithFile.append("name", field.teamGroupName);
formDataWithFile.append("userName", field.name);
formDataWithFile.append("idCard", field.idCard);
formDataWithFile.append("sex", field.sex);
formDataWithFile.append("userPhone", field.phone);
formDataWithFile.append("level", 5); // 固定值
formDataWithFile.append("tableSource", "pm_dept");
formDataWithFile.append("workType", field.workType);
formDataWithFile.append("teamType", field.teamType);
formDataWithFile.append("isTeamLeader", 0); // 固定值
formDataWithFile.append("file", file); // 文件类型字段
$.ajax({
url: ctxPath + '/organizational/addTeamGroup',
type: 'POST',
dataType: "json",
processData: false,
contentType: false,
data: formDataWithFile,
success: function (res) {
if (res.res === 1) {
layer.msg('新增成功', {icon: 6, time: 1500}, function () {
var index = parent.layer.getFrameIndex(window.name); // 获取当前 iframe 层的索引
window.parent.location.reload();
parent.layer.close(index); // 关闭弹窗
});
} else if (res.res === 0) {
layer.msg(res.resMsg, {icon: 5});
}
},
error: function () {
layer.msg("网络异常,请重试", {icon: 5});
}
});
return false; // 阻止默认提交行为
});
});

View File

@ -0,0 +1,106 @@
let form, table, tree;
function setParams(obj, layerIndex) {
objParam = JSON.parse(obj);
// 班组id
let id = objParam.id;
layui.use(['table', 'form', 'upload', 'tree'], function () {
const $ = layui.$;
form = layui.form;
upload = layui.upload;
table = layui.table;
// 让点击上传按钮触发文件输入框的点击事件
$('#uploadBtn').on('click', function () {
$('#fileInput').click();
});
// 文件选择后的回调处理
$('#fileInput').on('change', function () {
const file = $('#fileInput')[0].files[0];
const fileName = file.name;
const fileExtension = fileName.split('.').pop().toLowerCase();
// 校验文件类型,确保是 .xls 或 .xlsx 文件
if (fileExtension !== 'jpg' && fileExtension !== 'png') {
layer.msg('请选择 图片 文件(.jpg 或 .png', {icon: 2, time: 2000});
$('#fileInput').val('');
$('#fileInfo').html('');
} else {
$('#fileInfo').html('选中的文件:' + fileName);
}
});
getWorkType();
// 设置下拉框选项
function setSelectValue(list, selectName) {
let html = '<option value="">请选择</option>';
if (list && list.length > 0) {
$.each(list, function (index, item) {
html += `<option value="${item.id}">${item.name}</option>`;
});
}
$('#' + selectName).empty().append(html);
form.render('select');
}
// 获取工种类型下拉框
function getWorkType() {
$.ajax({
type: 'POST',
url: ctxPath + '/organizational/getWorkType',
success: function (data) {
setSelectValue(data.obj, 'workType');
}
});
}
// 表单提交事件监听
form.on('submit(formSubmit)', function (data) {
const field = data.field;
// 校验文件是否选择
const file = $('#fileInput')[0].files[0];
console.log("file:", file)
if (!file) {
layer.msg("请上传文件", {icon: 2, time: 2000});
return false;
}
console.log("表单数据:", JSON.stringify(field));
const formDataWithFile = new FormData();
formDataWithFile.append("id", id);
formDataWithFile.append("name", field.name);
formDataWithFile.append("idCard", field.idCard);
formDataWithFile.append("sex", field.sex);
formDataWithFile.append("phone", field.phone);
formDataWithFile.append("workTypeId", field.workType);
formDataWithFile.append("isTeamLeader", 1); // 固定值
formDataWithFile.append("file", file); // 文件类型字段
$.ajax({
url: ctxPath + '/teamGroup/addTeamGroupPerson',
type: 'POST',
dataType: "json",
processData: false,
contentType: false,
data: formDataWithFile,
success: function (res) {
if (res.res === 1) {
layer.msg('新增成功', {icon: 6, time: 1500}, function () {
var index = parent.layer.getFrameIndex(window.name); // 获取当前 iframe 层的索引
window.parent.location.reload();
parent.layer.close(index); // 关闭弹窗
});
} else if (res.res === 0) {
layer.msg(res.resMsg, {icon: 5});
}
},
error: function () {
layer.msg("网络异常,请重试", {icon: 5});
}
});
return false; // 阻止默认提交行为
});
});
}

View File

@ -0,0 +1,125 @@
let form, layer, dtree;
let objParam;
let id;
let currentLayerIndex = null;
function setParams(obj, layerIndex) {
objParam = JSON.parse(obj);
window.layerIndex = layerIndex;
getTeamGroupType(objParam.teamTypeId);
// 字段回显
$("#teamGroupName").val(objParam.teamGroupName);
id = objParam.id;
// $("#orgId").val(objParam.id);
layui.use(["form", "layer"], function () {
form = layui.form;
layer = layui.layer;
// obj是表单数据
form.on("submit(formData)", function (obj) {
updateName(obj, id);
});
form.render();
});
}
function saveData2() {
$("#formSubmit").trigger("click");
}
// 提交
function updateName(data, id) {
let loadingMsg = layer.msg("正在提交保存,请稍等...", {
icon: 16,
shade: 0.01,
time: "0",
});
let url = `${ctxPath}` + "/teamGroup/updaTeteamGroup";
let item = {
id: id,
teamGroupName: data.field.teamGroupName,
teamType: data.field.teamType,
};
// console.log(JSON.stringify(data)+"data")
$.ajax({
url: url,
type: "POST",
data: JSON.stringify(item),
dataType: "json",
contentType: "application/json",
beforeSend: function () {
$(".save").addClass("layui-btn-disabled").attr("disabled", true);
$(".cancel").addClass("layui-btn-disabled").attr("disabled", true);
},
success: function (result) {
layer.close(loadingMsg); // 关闭提示层
$(".save")
.removeClass("layui-btn-disabled")
.attr("disabled", false);
$(".cancel")
.removeClass("layui-btn-disabled")
.attr("disabled", false);
if (result.res === 1) {
layer.msg(result.resMsg, {icon: 1});
setTimeout(function () {
closePage(1);
}, 500);
} else {
layer.msg(result.resMsg, {icon: 2});
}
},
error: function (result) {
layer.close(loadingMsg); // 关闭提示层
layer.msg("服务异常,请稍后重试", {
icon: 16,
scrollbar: false,
time: 2000,
});
$(".save")
.removeClass("layui-btn-disabled")
.attr("disabled", false);
$(".cancel")
.removeClass("layui-btn-disabled")
.attr("disabled", false);
},
});
}
// 关闭页面
function closePage(type) {
if (type === 1) {
window.parent.search(1);
}
window.parent.layer.close(window.layerIndex);
}
// 获取班组类型下拉框
function getTeamGroupType(teamTypeId) {
$.ajax({
type: 'POST',
url: ctxPath + '/organizational/getTeamGroupType',
success: function (data) {
setSelectValue(data.obj, 'teamType', teamTypeId);
}
});
}
// 设置下拉框选项
function setSelectValue(list, selectName, teamTypeId) {
let html = '<option value="">请选择</option>';
if (list && list.length > 0) {
$.each(list, function (index, item) {
html += `<option value="${item.id}">${item.name}</option>`;
});
}
$('#' + selectName).empty().append(html);
// 如果有需要回显的值
if (teamTypeId !== undefined && teamTypeId !== null) {
$('#' + selectName).val(teamTypeId);
}
form.render('select');
}

View File

@ -0,0 +1,138 @@
let form, layer, dtree, upload;
let objParam;
let currentLayerIndex = null;
function setParams(obj, layerIndex) {
objParam = JSON.parse(obj);
window.layerIndex = layerIndex;
getWorkType(objParam.workTypeId);
// 字段回显
$("#name").val(objParam.name);
if (objParam.sex === '男') {
$("#sex").val(1);
} else {
$("#sex").val(2);
}
$("#idCard").val(objParam.idCard);
$("#phone").val(objParam.phone);
if (objParam.faceUrl != null && objParam.faceUrl !== '') {
$('#fileInfo').html(objParam.faceUrl);
}
layui.use(["form", "layer", "upload"], function () {
form = layui.form;
upload = layui.upload;
layer = layui.layer;
// 让点击上传按钮触发文件输入框的点击事件
$('#uploadBtn').on('click', function () {
console.log("点击上传按钮");
$('#fileInput').click();
});
// 文件选择后的回调处理
$('#fileInput').on('change', function () {
const file = $('#fileInput')[0].files[0];
const fileName = file.name;
const fileExtension = fileName.split('.').pop().toLowerCase();
// 校验文件类型,确保是 .jpg 或 .png 文件
if (fileExtension !== 'jpg' && fileExtension !== 'png') {
layer.msg('请选择 图片 文件(.jpg 或 .png', {icon: 2, time: 2000});
$('#fileInput').val('');
$('#fileInfo').html('');
} else {
$('#fileInfo').html('选中的文件:' + fileName);
}
});
// obj是表单数据
form.on("submit(formSubmit)", function (obj) {
updateTeamPerson(obj, objParam.id);
});
form.render();
});
}
// 提交
function updateTeamPerson(data, id) {
let loadingMsg = layer.msg("正在提交保存,请稍等...", {
icon: 16,
shade: 0.01,
time: "0",
});
let url = `${ctxPath}` + "/teamGroup/updateTeamPerson";
const file = $('#fileInput')[0].files[0];
const fileInfo = $('#fileInfo').html().trim();
if (!file && !fileInfo) {
layer.msg("请上传文件", {icon: 2, time: 2000});
return false;
}
const field = data.field;
const formDataWithFile = new FormData();
formDataWithFile.append("id", id);
formDataWithFile.append("name", field.name);
formDataWithFile.append("idCard", field.idCard);
formDataWithFile.append("sex", field.sex);
formDataWithFile.append("phone", field.phone);
formDataWithFile.append("workType", field.workType);
// 如果有新上传的文件,优先使用;否则,检查是否有 fileInfo已有文件路径
if (file) {
formDataWithFile.append("file", file); // 新上传的文件
} else if (fileInfo) {
formDataWithFile.append("faceUrl", fileInfo);
}
$.ajax({
url: url,
type: "POST",
data: formDataWithFile,
dataType: "json",
processData: false,
contentType: false,
success: function (res) {
if (res.res === 1) {
layer.msg('修改成功', {icon: 6, time: 1500}, function () {
var index = parent.layer.getFrameIndex(window.name); // 获取当前 iframe 层的索引
window.parent.location.reload();
parent.layer.close(index); // 关闭弹窗
});
} else if (res.res === 0) {
layer.msg(res.resMsg, {icon: 5});
}
},
error: function () {
layer.msg("网络异常,请重试", {icon: 5});
}
});
}
// 获取工种下拉框
function getWorkType(workTypeId) {
$.ajax({
type: 'POST',
url: ctxPath + '/organizational/getWorkType',
success: function (data) {
setSelectValue(data.obj, 'workType', workTypeId);
}
});
}
// 设置下拉框选项
function setSelectValue(list, selectName, workTypeId) {
let html = '<option value="">请选择</option>';
if (list && list.length > 0) {
$.each(list, function (index, item) {
html += `<option value="${item.id}">${item.name}</option>`;
});
}
$('#' + selectName).empty().append(html);
// 如果有需要回显的值
if (workTypeId !== undefined && workTypeId !== null) {
$('#' + selectName).val(workTypeId);
}
form.render('select');
}

View File

@ -0,0 +1,409 @@
// 专责审批 js文件
let layer, laydate, table, form;
$(function () {
layui.use(["layer", "laydate", "table", "form"], function () {
layer = layui.layer;
laydate = layui.laydate;
form = layui.form;
table = layui.table;
laydate.render({
elem: "#startDate",
type: "month",
format: "yyyy-MM",
});
// businessDivisionPullDown(form, null);
// getProjectManages();
initTable();
});
});
function getProjectManages() {
$.ajax({
url: `${ctxPath}` + "/organizational/getLeaderSelect",
type: "post",
data: {},
dataType: "JSON",
success: function (result) {
if (result.res === 1) {
setSelectValue(result.obj, "teamLeader", "id", "name");
}
},
});
}
function setSelectValue(list, selectName, code, nameCode) {
let html = '<option value="">请选择项目经理</option>';
if (list && list.length > 0) {
$.each(list, function (index, item) {
html +=
"<option value='" +
item[code] +
"' item='" +
JSON.stringify(item) +
"'>" +
item[nameCode] +
"</option>";
});
}
$("#" + selectName)
.empty()
.append(html);
layui.form.render();
}
function search(type) {
if (type === 1) {
} else {
$("#keyWord").val("");
$("#status").val("");
// $("#teamGroupName").val("");
// $("#teamLeader").val("");
form.render("select");
}
table.reload("baseTable", {
url: ctxPath + "/teamGroup/list",
page: {
curr: 1,
},
where: {
type: "audit",
keyWord: $("#keyWord").val(),
status: $("#status").val(),
// teamGroupName: $("#teamGroupName").val(),
// teamLeader: $("#teamLeader").val(),
},
});
}
function initTable() {
//渲染表格
table.render({
elem: "#baseTable",
url: ctxPath + "/teamGroup/list", //数据接口
method: "get", //方式默认是get
toolbar: "default", //开启工具栏,此处显示默认图标,可以自定义模板,详见文档
where: {
type: "audit",
}, //post请求必须加where post请求需要的参数
cellMinWidth: 80,
cols: [
[
//表头
{
field: "number",
width: 80,
title: "序号",
align: "center",
type: "numbers",
},
{field: "subContractor", align: "center", title: "所属分包商"},
{field: "project", align: "center", title: "所属项目"},
{field: "teamGroupName", align: "center", title: "班组名称"},
{field: "teamLeader", align: "center", title: "班组长"},
{field: "teamType", align: "center", title: "班组类型"},
// {field: "teamPersonNum", align: "center", title: "班组人数"},
{
field: "teamPersonNum",
align: "center",
title: "班组人数",
templet: function(d) {
return '<a onclick="openTeamMemberPage(' + d.id + ')" style="color: #1E9FFF; cursor: pointer;">' + d.teamPersonNum + '</a>';
}
},
{
fixed: "right",
width: 180,
title: "操作",
align: "center",
templet: (d) => {
let text = "";
text +=
'<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 15px"' +
' id="edit">编辑</a>';
text +=
'<a lay-event="del" style="color: #009688;cursor: pointer;font-size:' +
' 15px;margin-left: 10px"' +
' id="del">删除</a>';
if (d.status == 1) {
text +=
'<a lay-event="exit" style="color: #009688;cursor: pointer;font-size:' +
' 15px;margin-left: 10px"' +
' id="exit">退场</a>';
}
return text;
},
},
],
],
id: "baseTable",
page: true, //开启分页
loading: true, //数据加载中。。。
limits: [10, 20, 100], //一页选择显示3,5或10条数据
limit: 10, //一页显示5条数据
response: {
statusCode: 200, //规定成功的状态码默认0
},
parseData: function (res) {
//将原始数据解析成 table 组件所规定的数据res为从url中get到的数据
let result;
if (res.data !== "" && res.data != null && res.data !== "null") {
if (this.page.curr) {
result = res.data.slice(
this.limit * (this.page.curr - 1),
this.limit * this.page.curr
);
} else {
result = res.data.slice(0, this.limit);
}
}
return {
code: res.code, //解析接口状态
msg: res.msg, //解析提示文本
count: res.count, //解析数据长度
data: result, //解析数据列表
};
},
toolbar: "#toolbar",
});
table.on("tool(test)", function (obj) {
const data = obj.data; //当前行数据
const rowIndex = obj.index;
const layEvent = obj.event; //当前点击的事件名
switch (layEvent) {
case "edit":
ViewReviews(data, "编辑");
break;
case "del":
DelReviews(data, "删除");
break;
case "exit":
ExitReviews(data, "退场");
break;
default:
console.warn(`未知事件: ${layEvent}`);
}
});
//编辑
function ViewReviews(data, title) {
try {
localStorage.setItem("teamGroupData", data);
const layerIndex = layer.open({
type: 2,
title: title,
shade: 0.3,
area: ["50%", "40%"],
scrollbar: true,
move: true,
anim: 2,
name: "editTeamGroup",
shadeClose: false,
content:
'./editForm.html',
success: function (layero, index) {
let iframeWin = window["layui-layer-iframe" + index];
iframeWin.setParams(JSON.stringify(data), index);
},
});
} catch (error) {
console.error("ViewReviews 错误:", error);
}
}
//删除项目信息
function DelReviews(data, title) {
try {
layer.confirm('是否确认删除?', {
title: title || '提示',
icon: 3,
shade: 0.3,
btn: ['确定', '取消']
}, function (index) {
// 禁用按钮防止重复提交
$(".save").addClass("layui-btn-disabled").attr("disabled", true);
$(".cancel").addClass("layui-btn-disabled").attr("disabled", true);
let item = {
id: data.id
};
$.ajax({
url: `${ctxPath}/teamGroup/delTeamGroup`,
type: "POST",
data: JSON.stringify(item),
dataType: "json",
contentType: "application/json",
success: function (res) {
$(".save").removeClass("layui-btn-disabled").attr("disabled", false);
$(".cancel").removeClass("layui-btn-disabled").attr("disabled", false);
if (res.res === 1) {
layer.msg("删除成功", {icon: 1});
search(1); // 刷新列表
} else {
layer.msg("删除失败:" + (res.resMsg || "未知错误"), {icon: 2});
}
layer.close(index); // 关闭弹窗
},
error: function () {
layer.close(loadingMsg);
$(".save").removeClass("layui-btn-disabled").attr("disabled", false);
$(".cancel").removeClass("layui-btn-disabled").attr("disabled", false);
layer.msg("服务异常,请稍后重试", {
icon: 2,
time: 2000
});
}
});
}, function (index) {
// 取消操作
layer.close(index);
});
} catch (error) {
console.error("DelReviews 错误:", error);
layer.msg("发生异常,请查看控制台", {icon: 2});
}
}
//退场
function ExitReviews(data, title) {
console.log("data", data)
try {
layer.confirm('是否确认退场?', {
title: title || '提示',
icon: 3,
shade: 0.3,
btn: ['确定', '取消']
}, function (index) {
// 禁用按钮防止重复提交
$(".save").addClass("layui-btn-disabled").attr("disabled", true);
$(".cancel").addClass("layui-btn-disabled").attr("disabled", true);
let item = {
id: data.id
};
$.ajax({
url: `${ctxPath}` + '/organizational/userOutData',
type: "POST",
data: JSON.stringify(item),
dataType: "json",
contentType: "application/json",
success: function (res) {
$(".save").removeClass("layui-btn-disabled").attr("disabled", false);
$(".cancel").removeClass("layui-btn-disabled").attr("disabled", false);
if (res.res === 1) {
openEvaluatePage(res.obj)
} else {
layer.msg("删除失败:" + (res.resMsg || "未知错误"), {icon: 2});
}
layer.close(index); // 关闭弹窗
},
error: function () {
layer.close(loadingMsg);
$(".save").removeClass("layui-btn-disabled").attr("disabled", false);
$(".cancel").removeClass("layui-btn-disabled").attr("disabled", false);
layer.msg("服务异常,请稍后重试", {
icon: 2,
time: 2000
});
}
});
}, function (index) {
// 取消操作
layer.close(index);
});
} catch (error) {
console.error("DelReviews 错误:", error);
layer.msg("发生异常,请查看控制台", {icon: 2});
}
}
}
//班组人员列表
function openTeamMemberPage(data) {
try {
const layerIndex = layer.open({
type: 2,
title: '班组人员列表',
shade: 0.3,
area: ["80%", "90%"],
scrollbar: true,
move: true,
anim: 2,
shadeClose: false,
content:
'./teamMemBer.html',
success: function (layero, index) {
let iframeWin = window["layui-layer-iframe" + index];
iframeWin.setParams(JSON.stringify(data), index);
},
});
} catch (error) {
console.error("openTeamMemberPage 错误:", error);
}
}
function addTeamGroup() {
layer.open({
type: 2, // iframe 模式
title: "新增班组",
content: "./addForm.html", // 要打开的页面
maxmin: false, // 不显示最大化/最小化按钮
area: ["50%", "80%"], // 弹出层大小
success: function (layero, index) {
// 如果需要在弹出层加载完成后执行某些操作,可以在这里写
}
});
}
function openEvaluatePage(obj) {
let title = '评价',
content = '../../evaluate/team/evaluateTable.html';
obj.type = 1;
obj.operType = 'back';
let layerIndex = layer.open({
type: 2,
title: title,
shade: 0,
area: ['80%', '90%'],
scrollbar: true,
move: false,
anim: 2,
yes: function (index, layero) {
},
content: content,
success: function (layero, index) {
let iframeWin = window["layui-layer-iframe" + layerIndex];
iframeWin.setParams(JSON.stringify(obj));
},
end: function () {
console.log("end")
},
cancel: function () {
$.ajax({
url: `${ctxPath}` + '/organizational/userOutDataFail',
type: 'POST',
data: {
id: obj.id
},
dataType: 'json',
success: function (result) {
if (result.res === 1) {
layer.msg(result.obj, {icon: 2});
search(2);
} else {
layer.msg(result.resMsg, {icon: 2});
}
},
error: function (result) {
layer.msg('服务异常,请稍后重试', {icon: 16, scrollbar: false, time: 2000});
}
});
}
});
}

View File

@ -0,0 +1,266 @@
// 专责审批 js文件
let layer, laydate, table, form, id;
let fileList = [];
function setParams(obj, layerIndex) {
objParam = JSON.parse(obj);
id = objParam;
$(function () {
layui.use(["layer", "laydate", "table", "form"], function () {
layer = layui.layer;
laydate = layui.laydate;
form = layui.form;
table = layui.table;
laydate.render({
elem: "#startDate",
type: "month",
format: "yyyy-MM",
});
initTable();
});
});
}
function setSelectValue(list, selectName, code, nameCode) {
let html = '<option value="">请选择项目经理</option>';
if (list && list.length > 0) {
$.each(list, function (index, item) {
html +=
"<option value='" +
item[code] +
"' item='" +
JSON.stringify(item) +
"'>" +
item[nameCode] +
"</option>";
});
}
$("#" + selectName)
.empty()
.append(html);
layui.form.render();
}
function search(type) {
if (type === 1) {
} else {
$("#name").val("");
$("#sex").val("");
form.render("select");
}
table.reload("baseTable", {
url: ctxPath + "/teamGroup/getTeamGroupPerson",
page: {
curr: 1,
},
where: {
type: "audit",
id: id,
name: $("#name").val(),
sex: $("#sex").val(),
},
});
}
function initTable() {
//渲染表格
table.render({
elem: "#baseTable",
url: ctxPath + "/teamGroup/getTeamGroupPerson",
method: "get", //方式默认是get
toolbar: "default", //开启工具栏,此处显示默认图标,可以自定义模板,详见文档
where: {
type: "audit",
id: id
},
cellMinWidth: 80,
cols: [
[
//表头
{
field: "number",
width: 80,
title: "序号",
align: "center",
type: "numbers",
},
{field: "name", align: "center", title: "姓名"},
{field: "idCard", align: "center", title: "身份证"},
{field: "phone", align: "center", title: "电话"},
{field: "sex", align: "center", title: "性别"},
{field: "workType", align: "center", title: "工种"},
{
field: "faceUrl",
align: "center",
title: "人脸",
templet: function (d) {
return '<a onclick="openFaceUrlPage(' + d.id + ')" style="color: #1E9FFF; cursor: pointer;"> 查看 </a>';
}
},
{field: "isTeamLeader", align: "center", title: "是否班组长"},
{
fixed: "right",
width: 180,
title: "操作",
align: "center",
templet: (d) => {
let text = "";
text +=
'<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 15px"' +
' id="edit">编辑</a>';
text +=
'<a lay-event="del" style="color: #009688;cursor: pointer;font-size:' +
' 15px;margin-left: 10px"' +
' id="del">删除</a>';
return text;
},
},
],
],
id: "baseTable",
page: true, //开启分页
loading: true, //数据加载中。。。
limits: [10, 20, 100], //一页选择显示3,5或10条数据
limit: 10, //一页显示5条数据
response: {
statusCode: 200, //规定成功的状态码默认0
},
parseData: function (res) {
//将原始数据解析成 table 组件所规定的数据res为从url中get到的数据
let result;
if (res.data !== "" && res.data != null && res.data !== "null") {
fileList = res.data;
if (this.page.curr) {
result = res.data.slice(
this.limit * (this.page.curr - 1),
this.limit * this.page.curr
);
} else {
result = res.data.slice(0, this.limit);
}
}
return {
code: res.code, //解析接口状态
msg: res.msg, //解析提示文本
count: res.count, //解析数据长度
data: result, //解析数据列表
};
},
toolbar: "#toolbar",
});
table.on("tool(test)", function (obj) {
const data = obj.data; //当前行数据
const rowIndex = obj.index;
const layEvent = obj.event; //当前点击的事件名
switch (layEvent) {
case "edit":
ViewReviews(data, "编辑");
break;
case "del":
DelReviews(data, "删除");
break;
default:
console.warn(`未知事件: ${layEvent}`);
}
});
//修改班组人员信息
function ViewReviews(data, title) {
try {
const layerIndex = layer.open({
type: 2,
title: title,
shade: 0.3,
area: ["70%", "70%"],
scrollbar: true,
move: true,
anim: 2,
name: "editTeamGroupPerson",
shadeClose: false,
content:
'./editPersonForm.html',
success: function (layero, index) {
let iframeWin = window["layui-layer-iframe" + index];
iframeWin.setParams(JSON.stringify(data), index);
},
});
} catch (error) {
console.error("ViewReviews 错误:", error);
}
}
//删除班组人员
function DelReviews(data, title) {
try {
layer.confirm('是否确认删除?', {
title: title || '提示',
icon: 3,
shade: 0.3,
btn: ['确定', '取消']
}, function (index) {
// 禁用按钮防止重复提交
$(".save").addClass("layui-btn-disabled").attr("disabled", true);
$(".cancel").addClass("layui-btn-disabled").attr("disabled", true);
let item = {
id: data.id
};
$.ajax({
url: `${ctxPath}/teamGroup/delTeamPerson`,
type: "POST",
data: JSON.stringify(item),
dataType: "json",
contentType: "application/json",
success: function (res) {
if (res.res === 1) {
layer.msg(res.resMsg, {icon: 1});
search(1); // 刷新列表
} else {
layer.msg(res.resMsg, {icon: 2});
}
layer.close(index); // 关闭弹窗
},
error: function () {
layer.close(loadingMsg);
layer.msg("服务异常,请稍后重试", {
icon: 2,
time: 2000
});
}
});
}, function (index) {
// 取消操作
layer.close(index);
});
} catch (error) {
console.error("DelReviews 错误:", error);
layer.msg("发生异常,请查看控制台", {icon: 2});
}
}
}
// 预览文件
function openFaceUrlPage(id) {
const filePath = ctxPath +"/statics/"+ fileList.filter(item => item.id == id)[0].faceUrl
window.open(filePath)
}
function addPerson() {
layer.open({
type: 2, // iframe 模式
title: "新增班组人员",
content: "./addPersonForm.html", // 要打开的页面
maxmin: false, // 不显示最大化/最小化按钮
area: ["50%", "80%"], // 弹出层大小
success: function (layero, index) {
let iframeWin = window["layui-layer-iframe" + index];
const params = {
id: id,
};
iframeWin.setParams(JSON.stringify(params), index);
},
});
}

View File

@ -90,16 +90,16 @@ var Base64 = {
}
//
// var filePreviewPath = "http://36.33.26.201:21624/GsSubEvaluate/statics/";
// var filePreviewPath = "http://192.168.0.14:1803/GsSubEvaluate/statics/"; // 测试环境
var filePreviewPath = "http://192.168.0.14:1803/GsSubEvaluate/statics/"; // 测试环境
var filePreviewPath = "http://112.29.103.165:1618/GsSubEvaluate/statics/"; // 生产环境
// var filePreviewPath = "http://112.29.103.165:1618/GsSubEvaluate/statics/"; // 生产环境
// var filePreviewPath = "http://127.0.0.1:1803/GsSubEvaluate/statics/";
// var filePreviewPath = "http://192.168.0.2:1803/GsSubEvaluate/statics/";
// var filePreviewPathAll = "http://192.168.0.14:8012/onlinePreview?url="; // 测试环境
var filePreviewPathAll = "http://112.29.103.165:1618/onlinePreview?url="; // 生产环境
var filePreviewPathAll = "http://192.168.0.14:8012/onlinePreview?url="; // 测试环境
// var filePreviewPathAll = "http://112.29.103.165:8012/onlinePreview?url="; // 生产环境
function filePreview(url) {
let path;

View File

@ -14,7 +14,7 @@ function businessDivisionPullDown(form,evaluateDeptId) {
async: true,
success: function (data) {
let options =data.obj;
let html = '<option value=""> 请选择评价事业部 </option>';
let html = '<option value=""> 请选择事业部 </option>';
// var html = '';
for (let i = 0; i < options.length; i++) {
if (evaluateDeptId === options[i].id) {

View File

@ -36,6 +36,7 @@
<script src="../../../layui/layui.js"></script>
<script>
let headerRows;
let alter = true;
let layer, laydate, table, form;
let tableLoading;
$(function () {
@ -204,11 +205,15 @@
if (type === 1) {
rowData.isApprove = 1;
auditlc(fakeObj, 1, rowData);
parent.layer.closeAll();
if (alter == true){
parent.layer.closeAll();
}
} else if (type === 2) {
rowData.isApprove = 2;
auditlc(fakeObj, 2, rowData);
parent.layer.closeAll();
if (alter == true){
parent.layer.closeAll();
}
}
});
@ -308,6 +313,7 @@
} else {
data.isApprove = 0;
layer.msg(res.resMsg);
alter = false;
}
}
});

View File

@ -85,6 +85,14 @@
class="layui-input" lay-verify="required|phone">
</div>
</div>
<div class="layui-inline" style="width: 50%">
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>单位地址:</label>
<div class="layui-input-inline" style="width: 60%">
<input type="text" maxlength="30" lay-affix="clear" id="address" name="address"
autocomplete="off" class="layui-input" lay-verify="required">
</div>
</div>
</div>
<div class="layui-form-item" style="display: none">
<div class="layui-input-block">
@ -127,6 +135,7 @@
$("#corporateName").val(obj.corporateName);
$("#idCard").val(obj.idCard);
$("#phone").val(obj.phone);
$("#address").val(obj.address);
} else {
layer.msg(data.resMsg, {icon: 2, time: 2000});
}
@ -181,6 +190,7 @@
let params = {};
params.corporateName = encryptCBC(data.corporateName)
params.enterpriseName = encryptCBC(data.enterpriseName)
params.address = encryptCBC(data.address)
// params.idCard = encryptCBC(data.idCard)
params.phone = encryptCBC(data.phone)
params.setTime = encryptCBC(data.setTime)

View File

@ -133,6 +133,7 @@
, {field: 'corporateName', align: 'center', title: '法人姓名'},
// { field: 'idCard', title: '身份证号码', width: '20%', align: "center", templet: d => maskSensitiveInfo(d.idCard, 'idCard') },
{ field: 'phone', title: '联系电话', width: '15%', align: "center", templet: d => maskSensitiveInfo(d.phone, 'phone') },
{ field: 'address', title: '单位地址', width: '15%', align: "center" },
{field: 'proNum', align: 'center', title: '项目数量'},
{
fixed: 'right', width: 180, title: '操作', align: 'center', templet: d => {

View File

@ -0,0 +1,127 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../../../layui/css/layui.css" />
<link rel="stylesheet" href="../../../layui/layui_ext/dtree/dtree.css">
<link rel="stylesheet" href="../../../layui/layui_ext/dtree/font/dtreefont.css">
<title>新增项目/新增外包商/更换班长</title>
<style type="text/css">
#main-box {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.layui-form-label {
width: 120px;
}
.layui-form-item .layui-input-inline {
width: 256px; /* 统一宽度 */
}
.required_icon,
th span {
font-size: 16px;
color: red;
margin: 0 5px;
}
.layui-form {
padding: 20px;
overflow-y: auto;
flex-grow: 1;
}
.btn-box {
width: 100%;
height: 80px;
box-sizing: border-box;
display: flex;
justify-content: flex-end;
align-items: center;
padding-right: 4%;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: rgb(233 233 233);
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
background: rgb(207 207 207);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background: rgb(100, 100, 100);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:active {
background: rgb(68, 68, 68);
border-radius: 10px;
}
</style>
<body>
<div id="main-box">
<div class="form">
<form class="layui-form" onsubmit="return false;" id="form" lay-filter="formFilter">
<div style="width: 100%;height: 100%">
<!-- 项目名称 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>项目名称</label>
<div class="layui-input-inline">
<input type="text" required lay-verify="required" id="name"
name="name" autocomplete="off" class="layui-input">
</div>
</div>
<!-- 所属事业部 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>所属事业部</label>
<div class="layui-input-inline">
<select id="department" name="department" class="layui-select" lay-search
lay-verify="required" style="height: 36px;"></select>
</div>
</div>
<!-- 项目经理 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>项目经理</label>
<div class="layui-input-inline">
<select id="personInChargeId" name="personInChargeId" class="layui-select" lay-search
lay-verify="required" style="height: 36px;"></select>
</div>
</div>
<!-- 提交按钮 -->
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="formSubmit">保存</button>
</div>
</div>
</div>
</form>
</div>
</div>
</body>
<script src="../../../js/publicJs.js"></script>
<script type="text/javascript" src="../../../js/libs/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../../../js/jq.js"></script>
<script type="text/javascript" src="../../../js/my/permission.js"></script>
<script src="../../../layui/layui.js"></script>
<script src="../../../layui/layui_ext/dtree/dtree.js"></script>
<script src="../../../js/evaluate/project/addForm.js?v=1"></script>
</html>

View File

@ -0,0 +1,89 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../../../layui/css/layui.css" />
<link rel="stylesheet" href="../../../layui/layui_ext/dtree/dtree.css">
<link rel="stylesheet" href="../../../layui/layui_ext/dtree/font/dtreefont.css">
<title>修改名称</title>
<style type="text/css">
#main-box {
width: 100%;
height: 100%;
}
.layui-form-label {
width: 120px;
}
.layui-form-item .layui-input-inline {
width: 400px;
}
.required_icon,
th span {
font-size: 16px;
color: red;
margin: 0 5px 0 5px
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: rgb(233 233 233);
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
background: rgb(207 207 207);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background: rgb(100, 100, 100);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:active {
background: rgb(68, 68, 68);
border-radius: 10px;
}
</style>
</head>
<body>
<div id="main-box">
<div class="form">
<form class="layui-form" onsubmit="return false;" id="form" onclick="return false;">
<div style="width: 100%;height: 100%">
<div class="layui-form-item" style="margin-top: 1%;display: flex;width: 100%">
<label class="layui-form-label"><span class="required_icon">*</span>项目名称</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" required lay-verify="required" id="projectName"
name="projectName" autocomplete="off" class="layui-input">
</div>
</div>
</div>
<button type="submit" id="formSubmit" class="layui-btn" lay-submit="" lay-filter="formData"
style="display: none;"></button>
</form>
</div>
<div style="position:absolute;top: 80%;left: 80%">
<button class="layui-btn layui-btn-primary cancel" onclick="closePage(0)">取消
</button>
<button class="layui-btn layui-btn-normal save" onclick="saveData2()">保存</button>
</div>
</div>
</body>
<script src="../../../js/publicJs.js"></script>
<script type="text/javascript" src="../../../js/libs/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../../../js/jq.js"></script>
<script type="text/javascript" src="../../../js/my/permission.js"></script>
<script src="../../../layui/layui.js"></script>
<script src="../../../layui/layui_ext/dtree/dtree.js"></script>
<script src="../../../js/evaluate/project/editForm.js?v=1"></script>
</html>

View File

@ -0,0 +1,70 @@
<!Doctype html>
<html lang="">
<head>
<title>外包企业管理</title>
<link rel="stylesheet" href="../../../layui/css/layui.css"/>
<style>
#tree-table-box table thead th {
font-size: 16px;
font-weight: bold;
color: #404040;
}
.layui-table thead tr {
background-color: #f0f0f0;
height: 50px;
}
.layui-table td, .layui-table th, .layui-table-col-set, .layui-table-fixed-r, .layui-table-grid-down, .layui-table-header, .layui-table-mend, .layui-table-page, .layui-table-tips-main, .layui-table-tool, .layui-table-total, .layui-table-view, .layui-table[lay-skin=line], .layui-table[lay-skin=row] {
border-color: #ddd;
}
a:hover, a:focus {
color: #2a6496;
text-decoration: underline;
}
a {
color: #428bca;
text-decoration: none;
}
</style>
</head>
<body>
<div class="row-fluid" style="padding: 10px">
<div class="col-xs-12">
<form id="baseForm" class="layui-form" method="POST" onsubmit="return false;">
<div class="layui-row" style="display: flex;flex-direction: row;padding: 10px;width: 98%">
<input type="text" style="width: 20%;" name="keyWord" id="keyWord"
lay-verify="required"
placeholder="请输入关键字"
autocomplete="off"
class="layui-input">
<select id="evaluateDeptId" class="layui-select" name="evaluateDeptId">
</select>
<select id="personInChargeId" class="layui-select" name="personInChargeId">
</select>
<button type="button" class="layui-btn layui-bg-blue" style="margin-left: 10px;"
onclick="search(1)">查询
</button>
<button type="button" class="layui-btn layui-bg-blue" onclick="search(2)">重置</button>
<button type="button" class="layui-btn layui-bg-blue" onclick="addProject();" style="float:right;">
新增
</button>
</div>
</form>
<div id="tree-table-box" style="padding: 10px">
<table id="baseTable" class="layui-table" lay-filter="test"></table>
</div>
</div>
</div>
<script src="../../../js/publicJs.js"></script>
<script type="text/javascript" src="../../../js/libs/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../../../js/jq.js"></script>
<script type="text/javascript" src="../../../js/my/permission.js"></script>
<script type="text/javascript" src="../../../js/select.js"></script>
<script src="../../../layui/layui.js"></script>
<script src="../../../js/evaluate/project/projectList.js?v=1"></script>
</body>
</html>

View File

@ -0,0 +1,198 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../../../layui/css/layui.css"/>
<link rel="stylesheet" href="../../../layui/layui_ext/dtree/dtree.css">
<link rel="stylesheet" href="../../../layui/layui_ext/dtree/font/dtreefont.css">
<title>新增班组</title>
<style type="text/css">
#main-box {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
div p {
font-weight: bold;
}
.layui-form-label {
width: 120px;
}
.layui-form-item .layui-input-inline {
width: 256px; /* 统一宽度 */
}
.required_icon,
th span {
font-size: 16px;
color: red;
margin: 0 5px;
}
.layui-form {
padding: 20px;
overflow-y: auto;
flex-grow: 1;
}
.btn-box {
width: 100%;
height: 80px;
box-sizing: border-box;
display: flex;
justify-content: flex-end;
align-items: center;
padding-right: 4%;
}
.submit {
display: flex;
justify-content: flex-end; /* 水平向右对齐 */
align-items: center; /* 垂直居中 */
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: rgb(233 233 233);
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
background: rgb(207 207 207);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background: rgb(100, 100, 100);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:active {
background: rgb(68, 68, 68);
border-radius: 10px;
}
</style>
<body>
<div id="main-box">
<div class="form">
<form class="layui-form" onsubmit="return false;" id="form" lay-filter="formFilter">
<div style="width: 100%;height: 100%">
<div><p>班组信息</p></div>
<!-- 所属分包商 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>所属分包商</label>
<div class="layui-input-inline">
<select id="subContractor" name="subContractor" class="layui-select" lay-search lay-filter="subContractor"
lay-verify="required" style="height: 36px;"></select>
</div>
</div>
<!-- 项目名称 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>班组名称</label>
<div class="layui-input-inline">
<input type="text" required lay-verify="required" id="teamGroupName"
name="teamGroupName" autocomplete="off" class="layui-input">
</div>
</div>
<!-- 所属项目 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>所属项目</label>
<div class="layui-input-inline">
<select id="project" name="project" class="layui-select" lay-search
lay-verify="required" style="height: 36px;"></select>
</div>
</div>
<!-- 班组类型 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>班组类型</label>
<div class="layui-input-inline">
<select id="teamType" name="teamType" class="layui-select" lay-search
lay-verify="required" style="height: 36px;"></select>
</div>
</div>
<div><p>班组长信息</p></div>
<!-- 项目名称 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>姓名</label>
<div class="layui-input-inline">
<input type="text" required lay-verify="required" id="name"
name="name" autocomplete="off" class="layui-input">
</div>
</div>
<!-- 性别 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>性别</label>
<div class="layui-input-inline">
<select id="sex" name="sex" class="layui-select" lay-search
lay-verify="required" style="height: 36px;">
<option value="1"></option>
<option value="2"></option>
</select>
</div>
</div>
<!-- 身份证 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>身份证</label>
<div class="layui-input-inline">
<input type="text" required lay-verify="required" id="idCard"
name="idCard" autocomplete="off" class="layui-input">
</div>
</div>
<!-- 电话 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>电话</label>
<div class="layui-input-inline">
<input type="text" required lay-verify="required" id="phone"
name="phone" autocomplete="off" class="layui-input">
</div>
</div>
<!-- 工种 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>工种</label>
<div class="layui-input-inline">
<select id="workType" name="workType" class="layui-select" lay-search
lay-verify="required" style="height: 36px;">
</select>
</div>
</div>
<!-- 人脸照片 -->
<div class="layui-form-item">
<label class="layui-form-label"><span style="color: red">*</span>人脸照片:</label>
<div class="layui-input-block">
<button type="button" class="layui-btn" id="uploadBtn">
<i class="layui-icon">&#xe67c;</i> 上传文件
</button>
<input type="file" id="fileInput" name="file" accept=".jpg,.png" style="display: none;">
<div id="fileInfo"></div>
</div>
</div>
<!-- 提交按钮 -->
<div class="layui-form-item">
<div class="layui-input-block submit">
<button class="layui-btn" lay-submit lay-filter="formSubmit">保存</button>
</div>
</div>
</div>
</form>
</div>
</div>
</body>
<script src="../../../js/publicJs.js"></script>
<script type="text/javascript" src="../../../js/libs/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../../../js/jq.js"></script>
<script type="text/javascript" src="../../../js/my/permission.js"></script>
<script src="../../../layui/layui.js"></script>
<script src="../../../layui/layui_ext/dtree/dtree.js"></script>
<script src="../../../js/evaluate/teamGroup/addForm.js?v=1"></script>
</html>

View File

@ -0,0 +1,163 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../../../layui/css/layui.css"/>
<link rel="stylesheet" href="../../../layui/layui_ext/dtree/dtree.css">
<link rel="stylesheet" href="../../../layui/layui_ext/dtree/font/dtreefont.css">
<title>新增班组</title>
<style type="text/css">
#main-box {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
div p {
font-weight: bold;
}
.layui-form-label {
width: 120px;
}
.layui-form-item .layui-input-inline {
width: 256px; /* 统一宽度 */
}
.required_icon,
th span {
font-size: 16px;
color: red;
margin: 0 5px;
}
.layui-form {
padding: 20px;
overflow-y: auto;
flex-grow: 1;
}
.btn-box {
width: 100%;
height: 80px;
box-sizing: border-box;
display: flex;
justify-content: flex-end;
align-items: center;
padding-right: 4%;
}
.submit {
display: flex;
justify-content: flex-end; /* 水平向右对齐 */
align-items: center; /* 垂直居中 */
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: rgb(233 233 233);
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
background: rgb(207 207 207);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background: rgb(100, 100, 100);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:active {
background: rgb(68, 68, 68);
border-radius: 10px;
}
</style>
<body>
<div id="main-box">
<div class="form">
<form class="layui-form" onsubmit="return false;" id="form" lay-filter="formFilter">
<div style="width: 100%;height: 100%">
<!-- 姓名 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>姓名</label>
<div class="layui-input-inline">
<input type="text" required lay-verify="required" id="name"
name="name" autocomplete="off" class="layui-input">
</div>
</div>
<!-- 性别 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>性别</label>
<div class="layui-input-inline">
<select id="sex" name="sex" class="layui-select" lay-search
lay-verify="required" style="height: 36px;">
<option value="1"></option>
<option value="2"></option>
</select>
</div>
</div>
<!-- 身份证 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>身份证</label>
<div class="layui-input-inline">
<input type="text" required lay-verify="required" id="idCard"
name="idCard" autocomplete="off" class="layui-input">
</div>
</div>
<!-- 电话 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>电话</label>
<div class="layui-input-inline">
<input type="text" required lay-verify="required" id="phone"
name="phone" autocomplete="off" class="layui-input">
</div>
</div>
<!-- 工种 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>工种</label>
<div class="layui-input-inline">
<select id="workType" name="workType" class="layui-select" lay-search
lay-verify="required" style="height: 36px;">
</select>
</div>
</div>
<!-- 人脸照片 -->
<div class="layui-form-item">
<label class="layui-form-label"><span style="color: red">*</span>人脸照片:</label>
<div class="layui-input-block">
<button type="button" class="layui-btn" id="uploadBtn">
<i class="layui-icon">&#xe67c;</i> 上传文件
</button>
<input type="file" id="fileInput" name="file" accept=".jpg,.png" style="display: none;">
<div id="fileInfo"></div>
</div>
</div>
<!-- 提交按钮 -->
<div class="layui-form-item">
<div class="layui-input-block submit">
<button class="layui-btn" lay-submit lay-filter="formSubmit">保存</button>
</div>
</div>
</div>
</form>
</div>
</div>
</body>
<script src="../../../js/publicJs.js"></script>
<script type="text/javascript" src="../../../js/libs/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../../../js/jq.js"></script>
<script type="text/javascript" src="../../../js/my/permission.js"></script>
<script src="../../../layui/layui.js"></script>
<script src="../../../layui/layui_ext/dtree/dtree.js"></script>
<script src="../../../js/evaluate/teamGroup/addPersonForm.js?v=1"></script>
</html>

View File

@ -0,0 +1,100 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../../../layui/css/layui.css" />
<link rel="stylesheet" href="../../../layui/layui_ext/dtree/dtree.css">
<link rel="stylesheet" href="../../../layui/layui_ext/dtree/font/dtreefont.css">
<title>修改名称</title>
<style type="text/css">
#main-box {
width: 100%;
height: 100%;
}
.layui-form-label {
width: 120px;
}
.layui-form-item .layui-input-inline {
width: 400px;
}
.required_icon,
th span {
font-size: 16px;
color: red;
margin: 0 5px 0 5px
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: rgb(233 233 233);
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
background: rgb(207 207 207);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background: rgb(100, 100, 100);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:active {
background: rgb(68, 68, 68);
border-radius: 10px;
}
</style>
</head>
<body>
<div id="main-box">
<div class="form">
<form class="layui-form" onsubmit="return false;" id="form" onclick="return false;">
<div style="width: 100%;height: 100%">
<div class="layui-form-item" style="margin-top: 1%;display: flex;width: 100%">
<label class="layui-form-label"><span class="required_icon">*</span>班组名称</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" required lay-verify="required" id="teamGroupName"
name="teamGroupName" autocomplete="off" class="layui-input">
</div>
</div>
</div>
<div style="width: 100%;height: 100%">
<div class="layui-form-item" style="margin-top: 1%;display: flex;width: 100%">
<label class="layui-form-label"><span class="required_icon">*</span>班组类型</label>
<div class="layui-input-inline" style="width: 200px;">
<select id="teamType" name="teamType" class="layui-select" lay-search
lay-verify="required" style="height: 36px;"></select>
</div>
</div>
</div>
<button type="submit" id="formSubmit" class="layui-btn" lay-submit="" lay-filter="formData"
style="display: none;"></button>
</form>
</div>
<div style="position:absolute;top: 80%;left: 80%">
<button class="layui-btn layui-btn-primary cancel" onclick="closePage(0)">取消
</button>
<button class="layui-btn layui-btn-normal save" onclick="saveData2()">保存</button>
</div>
</div>
</body>
<script src="../../../js/publicJs.js"></script>
<script type="text/javascript" src="../../../js/libs/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../../../js/jq.js"></script>
<script type="text/javascript" src="../../../js/my/permission.js"></script>
<script src="../../../layui/layui.js"></script>
<script src="../../../layui/layui_ext/dtree/dtree.js"></script>
<script src="../../../js/evaluate/teamGroup/editForm.js?v=1"></script>
</html>

View File

@ -0,0 +1,160 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../../../layui/css/layui.css" />
<link rel="stylesheet" href="../../../layui/layui_ext/dtree/dtree.css">
<link rel="stylesheet" href="../../../layui/layui_ext/dtree/font/dtreefont.css">
<title>修改名称</title>
<style type="text/css">
#main-box {
width: 100%;
height: 100%;
}
.layui-form-label {
width: 120px;
}
.layui-form-item .layui-input-inline {
width: 400px;
}
.required_icon,
th span {
font-size: 16px;
color: red;
margin: 0 5px 0 5px
}
.submit {
display: flex;
justify-content: flex-end; /* 水平向右对齐 */
align-items: center; /* 垂直居中 */
padding-right: 4%;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: rgb(233 233 233);
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
background: rgb(207 207 207);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background: rgb(100, 100, 100);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:active {
background: rgb(68, 68, 68);
border-radius: 10px;
}
</style>
</head>
<body>
<div id="main-box">
<div class="form">
<form class="layui-form" onsubmit="return false;" id="form" lay-filter="formFilter">
<!-- <div style="width: 100%;height: 100%">
<div class="layui-form-item" style="margin-top: 1%;display: flex;width: 100%">
<label class="layui-form-label"><span class="required_icon">*</span>姓名</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" required lay-verify="required" id="teamGroupName"
name="teamGroupName" autocomplete="off" class="layui-input">
</div>
</div>
</div>
<div style="width: 100%;height: 100%">
<div class="layui-form-item" style="margin-top: 1%;display: flex;width: 100%">
<label class="layui-form-label"><span class="required_icon">*</span>班组类型</label>
<div class="layui-input-inline" style="width: 200px;">
<select id="teamType" name="teamType" class="layui-select" lay-search
lay-verify="required" style="height: 36px;"></select>
</div>
</div>
</div>-->
<!-- 姓名 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>姓名</label>
<div class="layui-input-inline">
<input type="text" required lay-verify="required" id="name"
name="name" autocomplete="off" class="layui-input">
</div>
</div>
<!-- 性别 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>性别</label>
<div class="layui-input-inline">
<select id="sex" name="sex" class="layui-select" lay-search
lay-verify="required" style="height: 36px;">
<option value="1"></option>
<option value="2"></option>
</select>
</div>
</div>
<!-- 身份证 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>身份证</label>
<div class="layui-input-inline">
<input type="text" required lay-verify="required" id="idCard"
name="idCard" autocomplete="off" class="layui-input">
</div>
</div>
<!-- 电话 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>电话</label>
<div class="layui-input-inline">
<input type="text" required lay-verify="required" id="phone"
name="phone" autocomplete="off" class="layui-input">
</div>
</div>
<!-- 工种 -->
<div class="layui-form-item" style="margin-top: 1%;">
<label class="layui-form-label"><span class="required_icon">*</span>工种</label>
<div class="layui-input-inline">
<select id="workType" name="workType" class="layui-select" lay-search
lay-verify="required" style="height: 36px;">
</select>
</div>
</div>
<!-- 人脸照片 -->
<div class="layui-form-item">
<label class="layui-form-label"><span style="color: red">*</span>人脸照片:</label>
<div class="layui-input-block">
<button type="button" class="layui-btn" id="uploadBtn">
<i class="layui-icon">&#xe67c;</i> 上传文件
</button>
<input type="file" id="fileInput" name="file" accept=".jpg,.png" style="display: none;">
<div id="fileInfo"></div>
</div>
</div>
<!-- 提交按钮 -->
<div class="layui-form-item">
<div class="layui-input-block submit">
<button class="layui-btn" lay-submit lay-filter="formSubmit">保存</button>
</div>
</div>
</form>
</div>
</div>
</body>
<script src="../../../js/publicJs.js"></script>
<script type="text/javascript" src="../../../js/libs/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../../../js/jq.js"></script>
<script type="text/javascript" src="../../../js/my/permission.js"></script>
<script src="../../../layui/layui.js"></script>
<script src="../../../layui/layui_ext/dtree/dtree.js"></script>
<script src="../../../js/evaluate/teamGroup/editPersonForm.js?v=1"></script>
</html>

View File

@ -0,0 +1,75 @@
<!Doctype html>
<html lang="">
<head>
<title>外包企业管理</title>
<link rel="stylesheet" href="../../../layui/css/layui.css"/>
<style>
#tree-table-box table thead th {
font-size: 16px;
font-weight: bold;
color: #404040;
}
.layui-table thead tr {
background-color: #f0f0f0;
height: 50px;
}
.layui-table td, .layui-table th, .layui-table-col-set, .layui-table-fixed-r, .layui-table-grid-down, .layui-table-header, .layui-table-mend, .layui-table-page, .layui-table-tips-main, .layui-table-tool, .layui-table-total, .layui-table-view, .layui-table[lay-skin=line], .layui-table[lay-skin=row] {
border-color: #ddd;
}
a:hover, a:focus {
color: #2a6496;
text-decoration: underline;
}
a {
color: #428bca;
text-decoration: none;
}
</style>
</head>
<body>
<div class="row-fluid" style="padding: 10px">
<div class="col-xs-12">
<form id="baseForm" class="layui-form" method="POST" onsubmit="return false;">
<div class="layui-row" style="display: flex;flex-direction: row;padding: 10px;width: 98%">
<input type="text" style="width: 20%;" name="keyWord" id="keyWord"
lay-verify="required"
placeholder="请输入关键字"
autocomplete="off"
class="layui-input">
<!-- <select id="teamGroupName" class="layui-select" name="teamGroupName">-->
<!-- </select>-->
<!-- <select id="teamLeader" class="layui-select" name="teamLeader">-->
<!-- </select>-->
<select id="status" class="layui-select" name="status">
<option value="">请选择班组状态</option>
<option value="1">入场</option>
<option value="2">出场</option>
</select>
<button type="button" class="layui-btn layui-bg-blue" style="margin-left: 10px;"
onclick="search(1)">查询
</button>
<button type="button" class="layui-btn layui-bg-blue" onclick="search(2)">重置</button>
<button type="button" class="layui-btn layui-bg-blue" onclick="addTeamGroup();" style="float:right;">
新增
</button>
</div>
</form>
<div id="tree-table-box" style="padding: 10px">
<table id="baseTable" class="layui-table" lay-filter="test"></table>
</div>
</div>
</div>
<script src="../../../js/publicJs.js"></script>
<script type="text/javascript" src="../../../js/libs/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../../../js/jq.js"></script>
<script type="text/javascript" src="../../../js/my/permission.js"></script>
<script type="text/javascript" src="../../../js/select.js"></script>
<script src="../../../layui/layui.js"></script>
<script src="../../../js/evaluate/teamGroup/teamGroupList.js?v=1"></script>
</body>
</html>

View File

@ -0,0 +1,72 @@
<!Doctype html>
<html lang="">
<head>
<title>外包企业管理</title>
<link rel="stylesheet" href="../../../layui/css/layui.css"/>
<style>
#tree-table-box table thead th {
font-size: 16px;
font-weight: bold;
color: #404040;
}
.layui-table thead tr {
background-color: #f0f0f0;
height: 50px;
}
.layui-table td, .layui-table th, .layui-table-col-set, .layui-table-fixed-r, .layui-table-grid-down, .layui-table-header, .layui-table-mend, .layui-table-page, .layui-table-tips-main, .layui-table-tool, .layui-table-total, .layui-table-view, .layui-table[lay-skin=line], .layui-table[lay-skin=row] {
border-color: #ddd;
}
a:hover, a:focus {
color: #2a6496;
text-decoration: underline;
}
a {
color: #428bca;
text-decoration: none;
}
</style>
</head>
<body>
<div class="row-fluid" style="padding: 10px">
<div class="col-xs-12">
<form id="baseForm" class="layui-form" method="POST" onsubmit="return false;">
<div class="layui-row" style="display: flex;flex-direction: row;padding: 10px;width: 98%">
<!-- 姓名 -->
<label class="layui-form-label"><span class="required_icon">*</span>姓名</label>
<div class="layui-input-inline">
<input type="text" required lay-verify="required" id="name"
name="name" autocomplete="off" class="layui-input">
</div>
<select id="sex" class="layui-select" name="sex">
<option value="">请选择性别</option>
<option value="1"></option>
<option value="2"></option>
</select>
<button type="button" class="layui-btn layui-bg-blue" style="margin-left: 10px;"
onclick="search(1)">查询
</button>
<button type="button" class="layui-btn layui-bg-blue" onclick="search(2)">重置</button>
<button type="button" class="layui-btn layui-bg-blue" onclick="addPerson();" style="float:right;">
新增
</button>
</div>
</form>
<div id="tree-table-box" style="padding: 10px">
<table id="baseTable" class="layui-table" lay-filter="test"></table>
</div>
</div>
</div>
<script src="../../../js/publicJs.js"></script>
<script type="text/javascript" src="../../../js/libs/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../../../js/jq.js"></script>
<script type="text/javascript" src="../../../js/my/permission.js"></script>
<script type="text/javascript" src="../../../js/select.js"></script>
<script src="../../../layui/layui.js"></script>
<script src="../../../js/evaluate/teamGroup/teamMemBer.js?v=1"></script>
</body>
</html>