Compare commits
3 Commits
efdb0f0636
...
45b24e9a73
| Author | SHA1 | Date |
|---|---|---|
|
|
45b24e9a73 | |
|
|
40a0ca3db8 | |
|
|
50492b9fe2 |
|
|
@ -38,5 +38,6 @@ public class TeamGroupBean {
|
||||||
private String faceUrl;
|
private String faceUrl;
|
||||||
private String isTeamLeader;
|
private String isTeamLeader;
|
||||||
private Integer teamId;
|
private Integer teamId;
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,19 @@ public class TeamGroupController extends BaseController<TeamGroupBean> {
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("updaTeteamGroup")
|
||||||
|
public AjaxRes updaTeteamGroup(@RequestBody TeamGroupBean teamGroupBean) {
|
||||||
|
AjaxRes ar = new AjaxRes();
|
||||||
|
try {
|
||||||
|
teamGroupService.updaTeteamGroup(teamGroupBean);
|
||||||
|
ar.setSucceedMsg("修改成功");
|
||||||
|
return ar;
|
||||||
|
} catch (Exception e) {
|
||||||
|
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||||
|
}
|
||||||
|
return ar;
|
||||||
|
}
|
||||||
|
|
||||||
// 获取班组人员
|
// 获取班组人员
|
||||||
@GetMapping("getTeamGroupPerson")
|
@GetMapping("getTeamGroupPerson")
|
||||||
public AjaxRes getTeamGroupPerson(TeamGroupBean teamGroupBean) {
|
public AjaxRes getTeamGroupPerson(TeamGroupBean teamGroupBean) {
|
||||||
|
|
@ -213,7 +226,7 @@ public class TeamGroupController extends BaseController<TeamGroupBean> {
|
||||||
@RequestMapping(value = "importTeamPerson", method = RequestMethod.POST)
|
@RequestMapping(value = "importTeamPerson", method = RequestMethod.POST)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxRes importTeamPerson(@RequestParam String id, @RequestParam("file") MultipartFile file) {
|
public AjaxRes importTeamPerson(@RequestParam String id, @RequestParam("file") MultipartFile file) {
|
||||||
return teamGroupService.importTeamPerson(id,file);
|
return teamGroupService.importTeamPerson(id, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,4 +55,6 @@ public interface PersonDao {
|
||||||
int deletePersonById(String id);
|
int deletePersonById(String id);
|
||||||
|
|
||||||
void updateOldUser(@Param("list")List<PersonBean> list);
|
void updateOldUser(@Param("list")List<PersonBean> list);
|
||||||
|
|
||||||
|
Integer getPerSonByPhone(PersonBean o);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,4 +33,6 @@ public interface ProjectDao {
|
||||||
int getProjectByName(ProjectBean projectBean);
|
int getProjectByName(ProjectBean projectBean);
|
||||||
|
|
||||||
Integer getTeamGroup(ProjectBean bean);
|
Integer getTeamGroup(ProjectBean bean);
|
||||||
|
|
||||||
|
int getProIsExistByDepartmentId(OrganizationalBean bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean;
|
||||||
import com.bonus.gs.sub.evaluate.evaluate.beans.TeamEvaluateBean;
|
import com.bonus.gs.sub.evaluate.evaluate.beans.TeamEvaluateBean;
|
||||||
import com.bonus.gs.sub.evaluate.evaluate.controller.OrganizationalController;
|
import com.bonus.gs.sub.evaluate.evaluate.controller.OrganizationalController;
|
||||||
import com.bonus.gs.sub.evaluate.evaluate.dao.OrganizationalDao;
|
import com.bonus.gs.sub.evaluate.evaluate.dao.OrganizationalDao;
|
||||||
|
import com.bonus.gs.sub.evaluate.evaluate.dao.ProjectDao;
|
||||||
import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes;
|
import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes;
|
||||||
import com.bonus.gs.sub.evaluate.manager.utils.CipherHelper;
|
import com.bonus.gs.sub.evaluate.manager.utils.CipherHelper;
|
||||||
import com.bonus.gs.sub.evaluate.manager.utils.StringHelper;
|
import com.bonus.gs.sub.evaluate.manager.utils.StringHelper;
|
||||||
|
|
@ -29,6 +30,8 @@ public class OrganizationalServiceImpl implements OrganizationalService {
|
||||||
private static final Logger logger = Logger.getLogger(String.valueOf(OrganizationalController.class));
|
private static final Logger logger = Logger.getLogger(String.valueOf(OrganizationalController.class));
|
||||||
@Autowired
|
@Autowired
|
||||||
private OrganizationalDao mapper;
|
private OrganizationalDao mapper;
|
||||||
|
@Autowired
|
||||||
|
private ProjectDao projectDao;
|
||||||
public static String DEFEAT_P_ID = "0";
|
public static String DEFEAT_P_ID = "0";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -125,17 +128,18 @@ public class OrganizationalServiceImpl implements OrganizationalService {
|
||||||
ar.setFailMsg("该班组名称已存在");
|
ar.setFailMsg("该班组名称已存在");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
// String pwrs = "gsks@123";// 随机密码,以后发邮箱
|
|
||||||
// String pwrsMD5 = CipherHelper.generatePassword(pwrs);// 第一次加密md5,
|
|
||||||
// String salt = CipherHelper.createSalt();
|
|
||||||
// bean.setSalt(salt);
|
|
||||||
// bean.setPassword(pwrsMD5);
|
|
||||||
} else if (bean.getLevel() == 4) {
|
} else if (bean.getLevel() == 4) {
|
||||||
int count = mapper.getConsIsExistByPro(bean);
|
int count = mapper.getConsIsExistByPro(bean);
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
ar.setFailMsg("该承包商在此项目下已存在");
|
ar.setFailMsg("该承包商在此项目下已存在");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
} else if (bean.getLevel() == 3) {
|
||||||
|
int count = projectDao.getProIsExistByDepartmentId(bean);
|
||||||
|
if (count > 0) {
|
||||||
|
ar.setFailMsg("该项目在此事业部下已存在");
|
||||||
|
return ar;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int num = mapper.addData(bean);
|
int num = mapper.addData(bean);
|
||||||
if (num > 0) {
|
if (num > 0) {
|
||||||
|
|
|
||||||
|
|
@ -386,7 +386,11 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
||||||
BeanUtils.copyProperties(o, childBean);
|
BeanUtils.copyProperties(o, childBean);
|
||||||
childBean.setJsonData(list.get(i).toString());
|
childBean.setJsonData(list.get(i).toString());
|
||||||
childBean.setDeptId(deptId);
|
childBean.setDeptId(deptId);
|
||||||
childBean.setUserId(userId);
|
if (!checkMapValuesAllEmpty(list.get(i), o.getTitleFiled())) {
|
||||||
|
childBean.setUserId(userId);
|
||||||
|
} else {
|
||||||
|
childBean.setUserId(null);
|
||||||
|
}
|
||||||
childBean.setParentId(o.getId());
|
childBean.setParentId(o.getId());
|
||||||
childBean.setProId(list.get(i).get("proId").toString());
|
childBean.setProId(list.get(i).get("proId").toString());
|
||||||
childBean.setProName(list.get(i).get("proName").toString());
|
childBean.setProName(list.get(i).get("proName").toString());
|
||||||
|
|
@ -403,7 +407,11 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
||||||
detailsBean.setEvaluateId(o.getEvaluateId());
|
detailsBean.setEvaluateId(o.getEvaluateId());
|
||||||
detailsBean.setTemplateId(o.getTemplateId());
|
detailsBean.setTemplateId(o.getTemplateId());
|
||||||
detailsBean.setDeptId(deptId);
|
detailsBean.setDeptId(deptId);
|
||||||
detailsBean.setUserId(userId);
|
if (!checkMapValuesAllEmpty(map, o.getTitleFiled())) {
|
||||||
|
detailsBean.setUserId(userId);
|
||||||
|
} else {
|
||||||
|
detailsBean.setUserId(null);
|
||||||
|
}
|
||||||
detailsBean.setParentId(o.getId());
|
detailsBean.setParentId(o.getId());
|
||||||
detailsBean.setProId(map.get("proId").toString());
|
detailsBean.setProId(map.get("proId").toString());
|
||||||
detailsBean.setProName(map.get("proName").toString());
|
detailsBean.setProName(map.get("proName").toString());
|
||||||
|
|
@ -479,7 +487,11 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
||||||
BeanUtils.copyProperties(o, childBean);
|
BeanUtils.copyProperties(o, childBean);
|
||||||
childBean.setJsonData(list.get(i).toString());
|
childBean.setJsonData(list.get(i).toString());
|
||||||
childBean.setDeptId(deptId);
|
childBean.setDeptId(deptId);
|
||||||
childBean.setUserId(userId);
|
if (!checkMapValuesAllEmpty(list.get(i), o.getTitleFiled())) {
|
||||||
|
childBean.setUserId(userId);
|
||||||
|
} else {
|
||||||
|
childBean.setUserId(null);
|
||||||
|
}
|
||||||
childBean.setParentId(o.getId());
|
childBean.setParentId(o.getId());
|
||||||
childBean.setProId(list.get(i).get("proId").toString());
|
childBean.setProId(list.get(i).get("proId").toString());
|
||||||
childBean.setProName(list.get(i).get("proName").toString());
|
childBean.setProName(list.get(i).get("proName").toString());
|
||||||
|
|
@ -499,7 +511,11 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
||||||
detailsBean.setEvaluateId(o.getEvaluateId());
|
detailsBean.setEvaluateId(o.getEvaluateId());
|
||||||
detailsBean.setTemplateId(o.getTemplateId());
|
detailsBean.setTemplateId(o.getTemplateId());
|
||||||
detailsBean.setDeptId(deptId);
|
detailsBean.setDeptId(deptId);
|
||||||
detailsBean.setUserId(userId);
|
if (!checkMapValuesAllEmpty(map, o.getTitleFiled())) {
|
||||||
|
detailsBean.setUserId(userId);
|
||||||
|
} else {
|
||||||
|
detailsBean.setUserId(null);
|
||||||
|
}
|
||||||
detailsBean.setParentId(o.getId());
|
detailsBean.setParentId(o.getId());
|
||||||
detailsBean.setProId(map.get("proId").toString());
|
detailsBean.setProId(map.get("proId").toString());
|
||||||
detailsBean.setProName(map.get("proName").toString());
|
detailsBean.setProName(map.get("proName").toString());
|
||||||
|
|
@ -526,6 +542,37 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean checkMapValuesAllEmpty(Map<String, Object> map, String titleFiled) {
|
||||||
|
if (map == null || map.isEmpty()) {
|
||||||
|
return false; // 空map肯定不满足条件
|
||||||
|
}
|
||||||
|
|
||||||
|
if (titleFiled == null || titleFiled.trim().isEmpty()) {
|
||||||
|
return true; // 没有要检查的字段,默认满足条件
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] keys = titleFiled.split(",");
|
||||||
|
for (String key : keys) {
|
||||||
|
Object value = map.get(key.trim());
|
||||||
|
|
||||||
|
// 如果 key 不存在 或者 value 是 null
|
||||||
|
if (value == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value instanceof String) {
|
||||||
|
if (!((String) value).trim().isEmpty()) {
|
||||||
|
return false; // 不是空字符串
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 如果不是字符串类型,认为不是“空字符串”
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true; // 所有指定字段的值都为空字符串或 null
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxRes getAuditBtn(EvaluateDataBean o) {
|
public AjaxRes getAuditBtn(EvaluateDataBean o) {
|
||||||
AjaxRes ar = new AjaxRes();
|
AjaxRes ar = new AjaxRes();
|
||||||
|
|
@ -1354,37 +1401,39 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//计算平准值进行重新计算
|
//计算平准值进行重新计算
|
||||||
for (Map<String, Object> map:childDataList){
|
for (Map<String, Object> map : childDataList) {
|
||||||
BigDecimal bigDecimal=new BigDecimal("0");
|
BigDecimal bigDecimal = new BigDecimal("0");
|
||||||
int num=0;
|
int num = 0;
|
||||||
for (String key : map.keySet()) {
|
for (String key : map.keySet()) {
|
||||||
if(key.contains("-")){
|
if (key.contains("-")) {
|
||||||
String[] year=key.split("-");
|
String[] year = key.split("-");
|
||||||
if (year.length==2 && isNumeric(year[0]) && isNumeric(year[1]) ){
|
if (year.length == 2 && isNumeric(year[0]) && isNumeric(year[1])) {
|
||||||
BigDecimal pfnum=new BigDecimal(String.valueOf(map.get(key)));
|
BigDecimal pfnum = new BigDecimal(String.valueOf(map.get(key)));
|
||||||
bigDecimal=bigDecimal.add(pfnum);
|
bigDecimal = bigDecimal.add(pfnum);
|
||||||
num++;
|
num++;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BigDecimal nums=new BigDecimal(num);
|
|
||||||
BigDecimal avg= bigDecimal.divide(nums);
|
|
||||||
map.put("avgScore",avg.toString());
|
|
||||||
}
|
}
|
||||||
|
BigDecimal nums = new BigDecimal(num);
|
||||||
|
BigDecimal avg = bigDecimal.divide(nums);
|
||||||
|
map.put("avgScore", avg.toString());
|
||||||
|
}
|
||||||
|
|
||||||
childDataList.sort((o1, o2) -> {
|
childDataList.sort((o1, o2) -> {
|
||||||
Double one = Double.valueOf(o1.get("avgScore").toString());
|
Double one = Double.valueOf(o1.get("avgScore").toString());
|
||||||
Double two = Double.valueOf(o2.get("avgScore").toString());
|
Double two = Double.valueOf(o2.get("avgScore").toString());
|
||||||
return two.compareTo(one); //one.compareTo(two)为升序,two.compareTo(one)为降序
|
return two.compareTo(one); //one.compareTo(two)为升序,two.compareTo(one)为降序
|
||||||
});
|
});
|
||||||
String resParams = JSONArray.toJSON(finalTitleList).toString();
|
String resParams = JSONArray.toJSON(finalTitleList).toString();
|
||||||
String childParams = JSONArray.toJSON(childDataList).toString();
|
String childParams = JSONArray.toJSON(childDataList).toString();
|
||||||
ar.setSucceed(resParams, childParams);
|
ar.setSucceed(resParams, childParams);
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isNumeric(String str) {
|
public static boolean isNumeric(String str) {
|
||||||
return str.matches("-?\\d+(\\.\\d+)?");
|
return str.matches("-?\\d+(\\.\\d+)?");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxRes isCheckOneIsAudit(EvaluateDataBean o) {
|
public AjaxRes isCheckOneIsAudit(EvaluateDataBean o) {
|
||||||
AjaxRes ar = new AjaxRes();
|
AjaxRes ar = new AjaxRes();
|
||||||
|
|
@ -1408,6 +1457,7 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
||||||
}
|
}
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxRes isCheckThreeIsAudit(EvaluateDataBean o) {
|
public AjaxRes isCheckThreeIsAudit(EvaluateDataBean o) {
|
||||||
AjaxRes ar = new AjaxRes();
|
AjaxRes ar = new AjaxRes();
|
||||||
|
|
|
||||||
|
|
@ -51,13 +51,19 @@ public class PersonServiceImpl implements PersonService {
|
||||||
personBean.setDeptId(StringUtils.isBlank(personBean.getDeptId()) ? "0" : personBean.getDeptId());
|
personBean.setDeptId(StringUtils.isBlank(personBean.getDeptId()) ? "0" : personBean.getDeptId());
|
||||||
});
|
});
|
||||||
for (PersonBean personBean : list) {
|
for (PersonBean personBean : list) {
|
||||||
dao.addPersonInfo(personBean);
|
Integer num = dao.getPerSonByPhone(personBean);
|
||||||
|
if (num > 0) {
|
||||||
|
ar.setFailMsg("该手机号已存在");
|
||||||
|
return ar;
|
||||||
|
} else {
|
||||||
|
dao.addPersonInfo(personBean);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dao.addPersonRole(list);
|
dao.addPersonRole(list);
|
||||||
dao.updateOldUser(list);
|
dao.updateOldUser(list);
|
||||||
ar.setSucceed(GlobalConst.SAVE_SUCCEED);
|
ar.setSucceed(GlobalConst.SAVE_SUCCEED);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.toString(),e);
|
log.error(e.toString(), e);
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
ar.setFailMsg("添加失败");
|
ar.setFailMsg("添加失败");
|
||||||
}
|
}
|
||||||
|
|
@ -69,6 +75,12 @@ public class PersonServiceImpl implements PersonService {
|
||||||
public AjaxRes updatePerson(PersonBean o) {
|
public AjaxRes updatePerson(PersonBean o) {
|
||||||
AjaxRes ar = new AjaxRes();
|
AjaxRes ar = new AjaxRes();
|
||||||
try {
|
try {
|
||||||
|
// 先查询该人员手机号是否有重复
|
||||||
|
Integer count = dao.getPerSonByPhone(o);
|
||||||
|
if (count > 0) {
|
||||||
|
ar.setFailMsg("该手机号已存在");
|
||||||
|
return ar;
|
||||||
|
}
|
||||||
o.setDeptId(StringUtils.isBlank(o.getDeptId()) ? "0" : o.getDeptId());
|
o.setDeptId(StringUtils.isBlank(o.getDeptId()) ? "0" : o.getDeptId());
|
||||||
dao.deletePersonRole(o.getId());
|
dao.deletePersonRole(o.getId());
|
||||||
dao.updatePerson(o);
|
dao.updatePerson(o);
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@
|
||||||
org_type orgType
|
org_type orgType
|
||||||
FROM pm_org_info
|
FROM pm_org_info
|
||||||
WHERE status = 1
|
WHERE status = 1
|
||||||
AND level in (1, 2)
|
-- AND level in (1, 2)
|
||||||
</select>
|
</select>
|
||||||
<select id="getDataDetails" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
|
<select id="getDataDetails" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
|
||||||
select id,
|
select id,
|
||||||
|
|
@ -294,6 +294,7 @@
|
||||||
poi.STATUS = 1
|
poi.STATUS = 1
|
||||||
AND poi.LEVEL = 4
|
AND poi.LEVEL = 4
|
||||||
AND poi.lk_id = #{id}
|
AND poi.lk_id = #{id}
|
||||||
|
AND poi2.id IS NOT NULL
|
||||||
</select>
|
</select>
|
||||||
<select id="getTeamGroupType" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
|
<select id="getTeamGroupType" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
|
||||||
select id,
|
select id,
|
||||||
|
|
|
||||||
|
|
@ -832,7 +832,7 @@
|
||||||
from
|
from
|
||||||
pj_evaluate_details_child
|
pj_evaluate_details_child
|
||||||
where
|
where
|
||||||
evaluate_id = #{evaluateId} and post_id = #{deptId} and details_id = #{detailsId} and (score is null or score = '')
|
evaluate_id = #{evaluateId} and post_id = #{deptId} and details_id = #{detailsId} and score is null
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateEvaluateRecordByEvaluateId">
|
<update id="updateEvaluateRecordByEvaluateId">
|
||||||
|
|
|
||||||
|
|
@ -155,4 +155,9 @@
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getPerSonByPhone" resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
from sys_user
|
||||||
|
where phone = #{phone}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -130,4 +130,15 @@
|
||||||
poi.STATUS = 1
|
poi.STATUS = 1
|
||||||
AND poi3.id = #{id}
|
AND poi3.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getProIsExistByDepartmentId" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count(*)
|
||||||
|
FROM
|
||||||
|
pm_org_info poi
|
||||||
|
left join pm_org_info poi2 on poi2.id = poi.parent_id
|
||||||
|
WHERE
|
||||||
|
poi.name = #{name} and poi2.id = #{parentId}
|
||||||
|
AND poi.level = 3
|
||||||
|
AND poi.status = 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@
|
||||||
SELECT
|
SELECT
|
||||||
poi2.NAME subContractor,
|
poi2.NAME subContractor,
|
||||||
poi3.NAME project,
|
poi3.NAME project,
|
||||||
|
poi3.user_id as userId,
|
||||||
poi.NAME teamGroupName,
|
poi.NAME teamGroupName,
|
||||||
poi.id as id,
|
poi.id as id,
|
||||||
poi.status as status,
|
poi.status as status,
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,10 @@ function initTreeTable() {
|
||||||
let html = "";
|
let html = "";
|
||||||
html +=
|
html +=
|
||||||
'<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 15px" id="edit">修改</a>';
|
'<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 15px" id="edit">修改</a>';
|
||||||
html +=
|
if (d.roleName !== "项目经理"){
|
||||||
'<a lay-event="del" style="color: #009688;cursor: pointer;font-size: 15px;margin-left: 10px" id="del">删除</a>';
|
html +=
|
||||||
|
'<a lay-event="del" style="color: #009688;cursor: pointer;font-size: 15px;margin-left: 10px" id="del">删除</a>';
|
||||||
|
}
|
||||||
return html;
|
return html;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -174,7 +176,7 @@ function add() {
|
||||||
|
|
||||||
layer.open({
|
layer.open({
|
||||||
type: 2,
|
type: 2,
|
||||||
title: "新增企业",
|
title: "新增人员",
|
||||||
content: "./EvaluatePersonAdd.html?id=0",
|
content: "./EvaluatePersonAdd.html?id=0",
|
||||||
btn: ["确定"],
|
btn: ["确定"],
|
||||||
maxmin: false,
|
maxmin: false,
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
// 专责审批 js文件
|
// 专责审批 js文件
|
||||||
let layer, laydate, table, form;
|
let layer, laydate, table, form, loginUser;
|
||||||
$(function () {
|
$(function () {
|
||||||
layui.use(["layer", "laydate", "table", "form"], function () {
|
layui.use(["layer", "laydate", "table", "form"], function () {
|
||||||
layer = layui.layer;
|
layer = layui.layer;
|
||||||
laydate = layui.laydate;
|
laydate = layui.laydate;
|
||||||
form = layui.form;
|
form = layui.form;
|
||||||
table = layui.table;
|
table = layui.table;
|
||||||
|
loginUser = JSON.parse(localStorage.getItem("loginUser"));
|
||||||
laydate.render({
|
laydate.render({
|
||||||
elem: "#startDate",
|
elem: "#startDate",
|
||||||
type: "month",
|
type: "month",
|
||||||
|
|
@ -135,7 +136,7 @@ function initTable() {
|
||||||
'<a lay-event="del" style="color: #009688;cursor: pointer;font-size:' +
|
'<a lay-event="del" style="color: #009688;cursor: pointer;font-size:' +
|
||||||
' 15px;margin-left: 10px"' +
|
' 15px;margin-left: 10px"' +
|
||||||
' id="del">删除</a>';
|
' id="del">删除</a>';
|
||||||
if (d.status == 1) {
|
if (d.status == 1 && loginUser.id === d.userId) {
|
||||||
text +=
|
text +=
|
||||||
'<a lay-event="exit" style="color: #009688;cursor: pointer;font-size:' +
|
'<a lay-event="exit" style="color: #009688;cursor: pointer;font-size:' +
|
||||||
' 15px;margin-left: 10px"' +
|
' 15px;margin-left: 10px"' +
|
||||||
|
|
|
||||||
|
|
@ -92,14 +92,14 @@ var Base64 = {
|
||||||
// var filePreviewPath = "http://36.33.26.201:21624/GsSubEvaluate/statics/";
|
// 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://192.168.1.3:1803/GsSubEvaluate/statics/"; // 生产环境
|
||||||
|
|
||||||
|
|
||||||
// var filePreviewPath = "http://127.0.0.1:1803/GsSubEvaluate/statics/";
|
// var filePreviewPath = "http://127.0.0.1:1803/GsSubEvaluate/statics/";
|
||||||
// var filePreviewPath = "http://192.168.0.2: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://192.168.0.14:8012/onlinePreview?url="; // 测试环境
|
||||||
// var filePreviewPathAll = "http://112.29.103.165:8012/onlinePreview?url="; // 生产环境
|
// var filePreviewPathAll = "http://192.168.1.3:8012/onlinePreview?url="; // 生产环境
|
||||||
|
|
||||||
function filePreview(url) {
|
function filePreview(url) {
|
||||||
let path;
|
let path;
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,7 @@
|
||||||
layer.msg('修改成功', {icon: 1});
|
layer.msg('修改成功', {icon: 1});
|
||||||
closePage();
|
closePage();
|
||||||
} else {
|
} else {
|
||||||
layer.msg(data.msg, {icon: 2});
|
layer.msg(data.resMsg, {icon: 2});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue