diff --git a/pc4mobx/organization/components/staff/Staff.js b/pc4mobx/organization/components/staff/Staff.js index a4d1dd0..5b354b6 100644 --- a/pc4mobx/organization/components/staff/Staff.js +++ b/pc4mobx/organization/components/staff/Staff.js @@ -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 _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(); diff --git a/pc4mobx/organization/public/i18n.js b/pc4mobx/organization/public/i18n.js index 1542efc..badfdd0 100644 --- a/pc4mobx/organization/public/i18n.js +++ b/pc4mobx/organization/public/i18n.js @@ -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, '编辑岗位'), diff --git a/pc4mobx/organization/stores/staff.js b/pc4mobx/organization/stores/staff.js index aafcbc0..61ee658 100644 --- a/pc4mobx/organization/stores/staff.js +++ b/pc4mobx/organization/stores/staff.js @@ -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; + } + + } \ No newline at end of file