简阳编制增加详情
This commit is contained in:
parent
fc6f1a0838
commit
09ee6dbd3a
|
|
@ -50,4 +50,8 @@ export const getForm = (params) => {
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
export const getHasRight = (params) => {
|
||||||
return WeaTools.callApi('/api/bs/hrmorganization/staff/getHasRight', 'GET', params);
|
return WeaTools.callApi('/api/bs/hrmorganization/staff/getHasRight', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getHrmListByJobId = (params) => {
|
||||||
|
return WeaTools.callApi('/api/bs/hrmorganization/job/getHrmListByJobId', 'GET', params);
|
||||||
}
|
}
|
||||||
|
|
@ -21,7 +21,6 @@ import {
|
||||||
} from '../public/i18n';
|
} from '../public/i18n';
|
||||||
import AttachToNumberField from './NewNumberField';
|
import AttachToNumberField from './NewNumberField';
|
||||||
|
|
||||||
|
|
||||||
export default class NewAndEditDialog extends React.Component {
|
export default class NewAndEditDialog extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -154,13 +153,11 @@ export default class NewAndEditDialog extends React.Component {
|
||||||
onCancel={() => onCancel()}
|
onCancel={() => onCancel()}
|
||||||
buttons={isEdit ? buttons : buttons.slice(1, 2)}
|
buttons={isEdit ? buttons : buttons.slice(1, 2)}
|
||||||
style={{ width: width, height: height }}
|
style={{ width: width, height: height }}
|
||||||
|
loading={loading}
|
||||||
initLoadCss
|
initLoadCss
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
loading ? <div className='hrm-loading-center-small'>
|
conditionLen > 1 ? this.getSearchGroupForm() : this.getForm()}
|
||||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@4ygl4a`} spinning={loading}></Spin>
|
|
||||||
</div>
|
|
||||||
: conditionLen > 1 ? this.getSearchGroupForm() : this.getForm()}
|
|
||||||
|
|
||||||
|
|
||||||
</WeaDialog>
|
</WeaDialog>
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,20 @@ export default class NewWeaTableDialog extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
reRenderColumns(columns) {
|
||||||
|
let _this = this;
|
||||||
|
columns.forEach((c, index) => {
|
||||||
|
if (c.dataIndex == 'lastname') {
|
||||||
|
c.render = function (text, record) {
|
||||||
|
return <a href='javascript:void(0);' onClick={() => {
|
||||||
|
window.open(`/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/${record.id}`);
|
||||||
|
}}>{text}</a>
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
title,
|
title,
|
||||||
|
|
@ -44,7 +58,6 @@ export default class NewWeaTableDialog extends React.Component {
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
const buttons = [
|
const buttons = [
|
||||||
//(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} type="primary" onClick={() => save()} disabled={loading}>{i18n.button.save()}</Button>),
|
|
||||||
(<WeaMoreButton ecId={`${this && this.props && this.props.ecId || ''}_WeaMoreButton@e4f4n1`} />)
|
(<WeaMoreButton ecId={`${this && this.props && this.props.ecId || ''}_WeaMoreButton@e4f4n1`} />)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -62,6 +75,7 @@ export default class NewWeaTableDialog extends React.Component {
|
||||||
>
|
>
|
||||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pgmg3x`}
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pgmg3x`}
|
||||||
comsWeaTableStore={tableStore}
|
comsWeaTableStore={tableStore}
|
||||||
|
getColumns={c => this.reRenderColumns(c)}
|
||||||
hasOrder={true}
|
hasOrder={true}
|
||||||
needScroll={true}
|
needScroll={true}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ import {
|
||||||
import '../../style/common.less';
|
import '../../style/common.less';
|
||||||
|
|
||||||
import NewAndEditDialog from '../NewAndEditDialog';
|
import NewAndEditDialog from '../NewAndEditDialog';
|
||||||
|
import NewWeaTableDialog from '../NewWeaTableDialog';
|
||||||
import ImportDialog from '../ImportDialog';
|
import ImportDialog from '../ImportDialog';
|
||||||
import { renderNoright } from '../../util';
|
import { renderNoright } from '../../util';
|
||||||
import SelectTag from '../SelectTag'
|
import SelectTag from '../SelectTag'
|
||||||
|
|
@ -359,6 +360,16 @@ export default class Staff extends React.Component {
|
||||||
(index == '0') && this.doEdit(record.randomFieldId);
|
(index == '0') && this.doEdit(record.randomFieldId);
|
||||||
(index == '1') && this.doDel(record.randomFieldId);
|
(index == '1') && this.doDel(record.randomFieldId);
|
||||||
(index == '2') && this.doChange(record.randomFieldId);
|
(index == '2') && this.doChange(record.randomFieldId);
|
||||||
|
(index == '3') && this.doDetail(record.job_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
doDetail(id) {
|
||||||
|
const {
|
||||||
|
staff
|
||||||
|
} = this.props;
|
||||||
|
staff.setNeDialogTitle("详情");
|
||||||
|
staff.tvisible = true;
|
||||||
|
staff.getHrmTable(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
doEdit(id) {
|
doEdit(id) {
|
||||||
|
|
@ -487,7 +498,7 @@ export default class Staff extends React.Component {
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const {
|
const {
|
||||||
isPanelShow, form2, staffName, conditionNum, tableStore, nEdialogTitle, visible, condition,
|
isPanelShow, form2, staffName, conditionNum, tableStore, nEdialogTitle, visible, condition,
|
||||||
form, dialogLoading, isEdit, date, hasRight
|
form, dialogLoading, isEdit, date, hasRight,tvisible,ttableStore
|
||||||
} = staff;
|
} = staff;
|
||||||
const {importVisible} = importDialog;
|
const {importVisible} = importDialog;
|
||||||
|
|
||||||
|
|
@ -514,7 +525,7 @@ export default class Staff extends React.Component {
|
||||||
<WeaLeftRightLayout ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftRightLayout@7muhhb`} isNew={true} showLeft={true} leftCom={this.getTree()}>
|
<WeaLeftRightLayout ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftRightLayout@7muhhb`} isNew={true} showLeft={true} leftCom={this.getTree()}>
|
||||||
|
|
||||||
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@9c3zts`}
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@9c3zts`}
|
||||||
searchType={['base', 'advanced']}
|
searchType={['advanced']}
|
||||||
showSearchAd={isPanelShow}
|
showSearchAd={isPanelShow}
|
||||||
searchsBaseValue={this.isEmptyObject(form2.getFormParams()) ? staffName : form2.getFormParams().staffName}
|
searchsBaseValue={this.isEmptyObject(form2.getFormParams()) ? staffName : form2.getFormParams().staffName}
|
||||||
setShowSearchAd={bool => staff.setPanelStatus(bool)}
|
setShowSearchAd={bool => staff.setPanelStatus(bool)}
|
||||||
|
|
@ -538,6 +549,13 @@ export default class Staff extends React.Component {
|
||||||
</WeaLeftRightLayout>
|
</WeaLeftRightLayout>
|
||||||
</WeaTop>
|
</WeaTop>
|
||||||
</WeaRightMenu>
|
</WeaRightMenu>
|
||||||
|
<NewWeaTableDialog ecId={`${this && this.props && this.props.ecId || ''}_NewTableDialog@q4rrwm`}
|
||||||
|
title={nEdialogTitle}
|
||||||
|
visible={tvisible}
|
||||||
|
height={400}
|
||||||
|
tableStore={ttableStore}
|
||||||
|
onCancel={() => staff.tvisible = false}
|
||||||
|
/>
|
||||||
<NewAndEditDialog ecId={`${this && this.props && this.props.ecId || ''}_NewAndEditDialog@q4rrwm`}
|
<NewAndEditDialog ecId={`${this && this.props && this.props.ecId || ''}_NewAndEditDialog@q4rrwm`}
|
||||||
title={nEdialogTitle}
|
title={nEdialogTitle}
|
||||||
visible={visible}
|
visible={visible}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,24 @@ export class StaffStore {
|
||||||
@observable planId = '';
|
@observable planId = '';
|
||||||
@observable selectTreeNodeInfo;
|
@observable selectTreeNodeInfo;
|
||||||
|
|
||||||
|
@observable tvisible = false;
|
||||||
|
@observable ttableStore = new TableStore();
|
||||||
|
|
||||||
|
@action("详情") getHrmTable(id) {
|
||||||
|
let params = {
|
||||||
|
jobId: id
|
||||||
|
}
|
||||||
|
this.ttableStore = new TableStore();
|
||||||
|
Api.getHrmListByJobId(params).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
res.data.datas && this.ttableStore.getDatas(res.data.datas, 1);
|
||||||
|
} else {
|
||||||
|
message.warning(res.msg);
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
@action getTableInfo(isOnChange = false) {
|
@action getTableInfo(isOnChange = false) {
|
||||||
let params = {
|
let params = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* 公共样式 */
|
/* 公共样式 */
|
||||||
.hrm-loading-center-small {
|
.hrm-loading-center-small {
|
||||||
position: absolute;
|
position: relative;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin-left: -8px;
|
margin-left: -8px;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue