|
@@ -532,13 +532,15 @@
|
|
this.$message('请选择部门');
|
|
this.$message('请选择部门');
|
|
return
|
|
return
|
|
}
|
|
}
|
|
-
|
|
|
|
- console.log(this.handleSelectionZzjgwillchange);
|
|
|
|
//接口调用样例代码如下
|
|
//接口调用样例代码如下
|
|
- var ids = ['8189056724477485056', '8189056816878002176'];
|
|
|
|
|
|
+ var ids = [];
|
|
|
|
+ for (let index = 0; index < this.handleSelectionZzjgDate.length; index++) {
|
|
|
|
+ ids.push(this.handleSelectionZzjgDate[index].id)
|
|
|
|
+ }
|
|
|
|
+ var changeId = this.handleSelectionZzjgwillchange[this.handleSelectionZzjgwillchange.length - 1]
|
|
this.http.post('/user/batchUpdateDept', {
|
|
this.http.post('/user/batchUpdateDept', {
|
|
userIds: JSON.stringify(ids),
|
|
userIds: JSON.stringify(ids),
|
|
- deptId: 4
|
|
|
|
|
|
+ deptId: changeId
|
|
},
|
|
},
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
@@ -1022,28 +1024,9 @@
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
},
|
|
},
|
|
|
|
|
|
- submitInsert(event,i) {
|
|
|
|
|
|
+ submitInsert() {
|
|
var form = {}
|
|
var form = {}
|
|
- if (i == 1) {
|
|
|
|
- form = {
|
|
|
|
- name: event.name,
|
|
|
|
- phone: event.phone,
|
|
|
|
- role: event.role,
|
|
|
|
- monthCost: event.monthCost,
|
|
|
|
- cost: event.cost,
|
|
|
|
- salaryType: event.salaryType,
|
|
|
|
- };
|
|
|
|
- if (event.id != null) {
|
|
|
|
- form.id = event.id;
|
|
|
|
- }
|
|
|
|
- if (event.costApplyDate != null) {
|
|
|
|
- form.costApplyDate = event.costApplyDate;
|
|
|
|
- }
|
|
|
|
- if (event.departmentId != null) {
|
|
|
|
- form.departmentId = event.departmentId;
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- this.$refs.form1.validate(valid => {
|
|
|
|
|
|
+ this.$refs.form1.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.submitLoading = true;
|
|
this.submitLoading = true;
|
|
form = {
|
|
form = {
|
|
@@ -1065,7 +1048,6 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- }
|
|
|
|
this.http.post( this.port.manage.insert, form,
|
|
this.http.post( this.port.manage.insert, form,
|
|
res => {
|
|
res => {
|
|
this.submitLoading = false;
|
|
this.submitLoading = false;
|
|
@@ -1189,25 +1171,8 @@
|
|
this.dialogVisible1 = true;
|
|
this.dialogVisible1 = true;
|
|
},
|
|
},
|
|
|
|
|
|
- submitInsert1(event,i) {
|
|
|
|
|
|
+ submitInsert1() {
|
|
var form = {}
|
|
var form = {}
|
|
- if (i == 1) {
|
|
|
|
- this.submitLoading = true;
|
|
|
|
- form = {
|
|
|
|
- id: event.id,
|
|
|
|
- name: event.name,
|
|
|
|
- phone: event.phone,
|
|
|
|
- role: event.role,
|
|
|
|
- monthCost: event.monthCost,
|
|
|
|
- cost: event.cost
|
|
|
|
- };
|
|
|
|
- if (event.departmentId != null) {
|
|
|
|
- form.departmentId = event.departmentId;
|
|
|
|
- }
|
|
|
|
- if (event.costApplyDate != null) {
|
|
|
|
- form.costApplyDate = event.costApplyDate;
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
this.$refs.form1.validate(valid => {
|
|
this.$refs.form1.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.submitLoading = true;
|
|
this.submitLoading = true;
|
|
@@ -1227,7 +1192,6 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- }
|
|
|
|
this.http.post( this.port.manage.insert, form,
|
|
this.http.post( this.port.manage.insert, form,
|
|
res => {
|
|
res => {
|
|
this.submitLoading = false;
|
|
this.submitLoading = false;
|