编制修改

This commit is contained in:
Chengliang 2022-06-07 17:56:29 +08:00
parent 84b6f732c6
commit 79916567d5
3 changed files with 27 additions and 11 deletions

View File

@ -212,18 +212,14 @@ export default class Staff extends React.Component {
} = staff;
staff.setStaffName(val);
!this.isEmptyObject(form2.getFormParams()) && staff.updateFields(val);
//!this.isEmptyObject(form2.getFormParams()) && staff.updateFields(val);
}
reRenderColumns(columns) {
let _this = this;
columns.forEach((c, index) => {
// if (c.dataIndex == 'forbidden_tag') {
// c.render = function(text, record) {
// return <Switch defaultChecked={record.forbidden_tag == "0" ? true : false} onChange={checked => _this.updateForbiddenTag(checked,record.id)} />
// }
// };
})
// columns.forEach((c, index) => {
// })
}
updateForbiddenTag(checked,id) {
@ -239,7 +235,7 @@ export default class Staff extends React.Component {
} = operate;
(index == '0') && this.doEdit(record.randomFieldId);
(index == '1') && this.doDel(record.randomFieldId);
(index == '2') && this.doChange(record.randomFieldId);
}
doEdit(id) {
@ -248,7 +244,21 @@ export default class Staff extends React.Component {
} = this.props;
staff.setNeDialogTitle(i18n.label.editStaff());
staff.setSchemeId(id);
staff.setStaffId(id);
staff.setOperateType("1");
staff.setIsNew(false);
staff.setVisible(true);
staff.getForm();
}
doChange(id) {
const {
staff
} = this.props;
staff.setNeDialogTitle(i18n.label.changeStaff());
staff.setStaffId(id);
staff.setOperateType("2");
staff.setIsNew(false);
staff.setVisible(true);
staff.getForm();

View File

@ -136,6 +136,7 @@ export const i18n = {
staffName: () => getLabel(385936, '编制上报'),
newStaff: () => getLabel(386246, '新建编制'),
editStaff: () => getLabel(386247, '编辑编制'),
changeStaff: () => getLabel(386247, '编辑变更'),
jobName: () => getLabel(385936, '岗位'),
newJob: () => getLabel(386246, '新建岗位'),
editJob: () => getLabel(386247, '编辑岗位'),

View File

@ -45,7 +45,7 @@ export class StaffStore {
@observable staffId = '';
@observable date = '';
@observable hasRight = '';
@observable operateType = ''; //1 编辑 2 变更
@ -292,4 +292,9 @@ export class StaffStore {
this.hasRight = bool;
}
setOperateType(operateType) {
this.operateType = operateType;
}
}