集团编辑功能完善

This commit is contained in:
Chengliang 2022-05-18 15:24:46 +08:00
parent b96ffa4205
commit 44715650db
2 changed files with 22 additions and 23 deletions

View File

@ -5,7 +5,7 @@ import {
export const edit = (params) => {
return fetch('/api/bs/hrmorganization/scheme/updateScheme', {
return fetch('/api/bs/hrmorganization/group/updateGroup', {
method: 'POST',
mode: 'cors',
headers: {

View File

@ -81,28 +81,27 @@ export class GroupStore {
edit() {
// let params = { ...this.form.getFormParams(), id: this.schemeId };
// this.form.validateForm().then(f => {
// if (f.isValid) {
// Api.edit(params).then(response => {
// return response.json()
// }).then(data => {
// if (data.code === 200) {
// message.success(data.msg);
// this.getTableInfo();
// this.setVisible(false);
// } else {
// message.warning(data.msg);
// }
// }).catch(error => {
// message.warning(error.msg);
// })
// } else {
// f.showErrors();
// this.setDate(new Date());
// }
// });
let params = { ...this.form.getFormParams(), id: 1 };
this.form.validateForm().then(f => {
if (f.isValid) {
Api.edit(params).then(response => {
return response.json()
}).then(data => {
if (data.code === 200) {
message.success(data.msg);
this.getGroupForm();
this.setVisible(false);
} else {
message.warning(data.msg);
}
}).catch(error => {
message.warning(error.msg);
})
} else {
f.showErrors();
this.setDate(new Date());
}
});
}
getForm() {