ソースを参照

入职与用户信息同步

sangwenwei 9 ヶ月 前
コミット
3527033029

+ 14 - 0
src/api/human/enrollment/EnrollmentRegistrationService.js

@@ -16,6 +16,13 @@ export default {
 			data: inputForm
 		})
 	},
+	saveInfo (inputForm) {
+		return request({
+			url: prefix +  `/enrollmentRegistration/saveInfo`,
+			method: 'post',
+			data: inputForm
+		})
+	},
 	save2 (inputForm) {
 		return request({
 			url: prefix +  `/enrollmentRegistration/save2`,
@@ -135,6 +142,13 @@ export default {
 			params: {id: id}
 		})
 	},
+	delByUserId (id) {
+		return request({
+			url: prefix + '/enrollmentRegistration/delByUserId',
+			method: 'get',
+			params: {id: id}
+		})
+	},
 	findIdCardOnly (idCard) {
 		return request({
 			url: prefix + '/enrollmentRegistration/findIdCardOnly',

+ 3 - 0
src/views/human/enrollment/registration/EnrollmentRegistrationAddForm.vue

@@ -637,6 +637,7 @@
 					socialSecurityPictureFrontUrl: '',
 					socialSecurityPictureOpposite: '',
 					socialSecurityPictureOppositeUrl: '',
+					isPc:''
 				},
 				keyWatch: '',
 			}
@@ -776,6 +777,7 @@
 					socialSecurityPictureFrontUrl: '',
 					socialSecurityPictureOpposite: '',
 					socialSecurityPictureOppositeUrl: '',
+					isPc:''
 				}
 				if (method === 'add') {
 					this.title = `新建入职登记`
@@ -893,6 +895,7 @@
 							throw new Error('社保编号与社保银行卡号不能为空')
 						}
 						this.inputForm.type = '2'
+						this.inputForm.isPc = '1'
 						enrollmentRegistrationService.save(this.inputForm).then((data) => {
 							this.inputForm.title = `${this.$store.state.user.name} 发起了 [${this.inputForm.name} - 入职登记]`
 							this.inputForm.id = data.businessId

+ 11 - 1
src/views/sys/user/UserForm.vue

@@ -492,6 +492,8 @@ import userService from "@/api/sys/userService";
 import postService from "@/api/sys/postService";
 import roleService from "@/api/sys/roleService";
 import officeService from "@/api/sys/officeService";
+import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
+
 export default {
 	data() {
 		return {
@@ -682,10 +684,18 @@ export default {
 					userService
 						.save(this.inputForm)
 						.then((data) => {
+							console.log(data)
 							this.loading = false;
 							this.visible = false;
-							this.$message.success(data);
+							this.$message.success(data.msg);
 							this.$emit("refreshDataList");
+							let param = {
+								name:this.inputForm.name,
+								mobilePhone: this.inputForm.mobile,
+								department:this.inputForm.officeDTO.id,
+								userId: data.userId,
+							}
+							enrollmentRegistrationService.saveInfo(param)
 						})
 						.catch(() => {
 							this.loading = false;

+ 3 - 0
src/views/sys/user/UserList.vue

@@ -433,6 +433,8 @@ import UserForm from "./UserForm";
 import { mapState } from "vuex";
 import userService from "@/api/sys/userService";
 import officeService from "@/api/sys/officeService";
+import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
+
 export default {
 	data() {
 		return {
@@ -579,6 +581,7 @@ export default {
 							message: data,
 						});
 						this.refreshList();
+						enrollmentRegistrationService.delByUserId(ids);
 					})
 					.catch(() => {
 						this.loading = false;