diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java index dab6f4fa..7aebcad7 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java @@ -139,6 +139,8 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu sysUser.setPhonenumber(proProjectInfoSubdeptsUsers.getUserPhone()); sysUser.setUpdateBy(SecurityUtils.getUsername()); sysUser.setUpdateTime(DateUtils.getNowDate()); + sysUser.setComId(proProjectInfoSubdeptsUsers.getComId()); + sysUser.setDeptId(proProjectInfoSubdeptsUsers.getProjectId()); sysUser.setUserType("xx"); sysUser.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId()); R obj= remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER); diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/UniServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/UniServiceImpl.java index 7a2a72a5..3c14dabb 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/UniServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/UniServiceImpl.java @@ -525,6 +525,7 @@ public class UniServiceImpl implements IUniService{ JSONObject faceRes = faceRegister(faceJo); if(faceRes!=null) { jo.put("uniFaceInfo", faceRes.toJSONString()); + puser.setFaceGuid(faceRes.getString("faceGuid")); hasUpdate=true; } diff --git a/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdeptsUsers/index.vue b/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdeptsUsers/index.vue index b44fecb7..b73c900b 100644 --- a/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdeptsUsers/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdeptsUsers/index.vue @@ -73,11 +73,10 @@ - - - + + + - @@ -95,7 +94,7 @@ @@ -407,14 +406,16 @@ function tryToJson(str) { function getList() { loading.value = true; listProProjectInfoSubdeptsUsers(queryParams.value).then(response => { + proProjectInfoSubdeptsUsersList.value = (response.rows || []).map(d => { - d.info = tryToJson(d.user?.userInfos || "{}") + d.info = tryToJson(d.userInfos || "{}") d.user = d.user || {}; if (d.info.birthDay) { let birthDay = dayjs(d.info.birthDay).format("YYYY-MM-DD"); d.info.birthDayStr = birthDay; d.info.age = dayjs(new Date()).diff(d.info.birthDay, 'year'); } + return d; }); total.value = response.total; @@ -488,13 +489,17 @@ function doSubDeptChange(type) { data.deptGroups = d.rows || []; if (data.deptGroups.length > 0) { let dg = data.deptGroups[0]; - form.value.subDeptGroup = dg.id; + form.value.groupName = dg.groupName; form.value.craftTypeName = getCraftType(dg.craftType); form.value.craftPostName = getCraftPost(dg.craftPost).label; form.value.craftType = dg.craftType; form.value.craftPost = dg.craftPost data.isManager = !dg.craftPost + setTimeout(()=>{ + form.value.subDeptGroup = dg.id; + doDeptGroupChange(); + },400); } } @@ -591,21 +596,38 @@ function handleUpdate(row) { data.editData=row; getProProjectInfoSubdeptsUsers(_id).then(response => { let obj = JSON.parse(JSON.stringify(response.data)); - obj.info = tryToJson(obj.user?.userInfos || "{}") - obj.user = obj.user || {}; - + obj.info = tryToJson(obj.userInfos || "{}"); + obj.certificateType=obj.cardType; + obj.certificateCode=obj.cardCode; + obj.sex=obj.userSex; + obj.nation=obj.info.nation; + obj.birthDay=obj.info.birthDay; + obj.nativePlace=obj.info.nativePlace; + obj.address=obj.info.address; + obj.emergencyContact=obj.info.emergencyContact; + obj.contactPhone=obj.info.contactPhone; + obj.bankName=obj.info.bankName; + obj.bankCardNo=obj.info.bankCardNo; + obj.bankOffice=obj.info.bankOffice; + obj.certificatePhoto1=obj.info.certificatePhoto1; + obj.certificatePhoto2=obj.info.certificatePhoto2; + obj.faceImage=obj.userPicture; + obj.educationalType=obj.degreeGrade + debugger form.value = obj; form.value.userId = obj.userId; form.value.projectId = row.projectId; form.value.projectName = row.projectName; - showEditUser(obj.user); + //showEditUser(obj.user); data.phoneState = "edit"; open.value = true; title.value = "修改劳务人员信息"; doImageUpload(); - doDeptGroupChange(); + + //doDeptGroupChange(); setTimeout(() => { + doSubDeptChange(); form.value.craftPost = response.data.craftPost; }, 400); });