编制管理页面
This commit is contained in:
parent
ed3a11e7b6
commit
27c8a11576
|
|
@ -4,11 +4,11 @@ import {
|
|||
} from 'ecCom'
|
||||
|
||||
export const getSearchList = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/scheme/getTable', 'GET', params);
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/staff/getTable', 'GET', params);
|
||||
}
|
||||
|
||||
export const deleteTableData = (params) => {
|
||||
return fetch('/api/bs/hrmorganization/scheme/deleteByIds', {
|
||||
return fetch('/api/bs/hrmorganization/staff/deleteByIds', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
|
|
@ -19,11 +19,11 @@ export const deleteTableData = (params) => {
|
|||
}
|
||||
|
||||
export const getAdvanceSearchCondition = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/scheme/getSearchCondition', 'GET', params);
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/staff/getSearchCondition', 'GET', params);
|
||||
}
|
||||
|
||||
export const add = (params) => {
|
||||
return fetch('/api/bs/hrmorganization/scheme/save', {
|
||||
return fetch('/api/bs/hrmorganization/staff/saveStaff', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
|
|
@ -34,7 +34,7 @@ export const add = (params) => {
|
|||
}
|
||||
|
||||
export const edit = (params) => {
|
||||
return fetch('/api/bs/hrmorganization/scheme/updateScheme', {
|
||||
return fetch('/api/bs/hrmorganization/staff/updateStaff', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
|
|
@ -44,21 +44,10 @@ export const edit = (params) => {
|
|||
})
|
||||
}
|
||||
|
||||
export const updateForbiddenTag = (params) => {
|
||||
return fetch('/api/bs/hrmorganization/scheme/updateForbiddenTagById', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
})
|
||||
}
|
||||
|
||||
export const getSchemeForm = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/scheme/getSchemeForm', 'GET', params);
|
||||
export const getForm = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/staff/getForm', 'GET', params);
|
||||
}
|
||||
|
||||
export const getHasRight = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/scheme/getTableBtn', 'GET', params);
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/staff/getHasRight', 'GET', params);
|
||||
}
|
||||
|
|
@ -4,11 +4,11 @@ import {
|
|||
} from 'ecCom'
|
||||
|
||||
export const getSearchList = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/scheme/getTable', 'GET', params);
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/staffplan/getTable', 'GET', params);
|
||||
}
|
||||
|
||||
export const deleteTableData = (params) => {
|
||||
return fetch('/api/bs/hrmorganization/scheme/deleteByIds', {
|
||||
return fetch('/api/bs/hrmorganization/staffplan/deleteByIds', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
|
|
@ -19,11 +19,11 @@ export const deleteTableData = (params) => {
|
|||
}
|
||||
|
||||
export const getAdvanceSearchCondition = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/scheme/getSearchCondition', 'GET', params);
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/staffplan/getSearchCondition', 'GET', params);
|
||||
}
|
||||
|
||||
export const add = (params) => {
|
||||
return fetch('/api/bs/hrmorganization/scheme/save', {
|
||||
return fetch('/api/bs/hrmorganization/staffplan/saveStaffPlan', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
|
|
@ -34,7 +34,7 @@ export const add = (params) => {
|
|||
}
|
||||
|
||||
export const edit = (params) => {
|
||||
return fetch('/api/bs/hrmorganization/scheme/updateScheme', {
|
||||
return fetch('/api/bs/hrmorganization/staffplan/updateStaffPlan', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
|
|
@ -45,7 +45,7 @@ export const edit = (params) => {
|
|||
}
|
||||
|
||||
export const updateForbiddenTag = (params) => {
|
||||
return fetch('/api/bs/hrmorganization/scheme/updateForbiddenTagById', {
|
||||
return fetch('/api/bs/hrmorganization/staffplan/updateForbiddenTagById', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
|
|
@ -56,9 +56,9 @@ export const updateForbiddenTag = (params) => {
|
|||
}
|
||||
|
||||
export const getSchemeForm = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/scheme/getSchemeForm', 'GET', params);
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/staffplan/getForm', 'GET', params);
|
||||
}
|
||||
|
||||
export const getHasRight = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/scheme/getTableBtn', 'GET', params);
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/staffplan/getHasRight', 'GET', params);
|
||||
}
|
||||
|
|
@ -43,6 +43,19 @@ export default class NewTableDialog extends React.Component {
|
|||
width,
|
||||
} = this.state;
|
||||
|
||||
const pagination = {
|
||||
total: dataSource.length,
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
onShowSizeChange(current, pageSize) {
|
||||
},
|
||||
onChange(current) {
|
||||
},
|
||||
showTotal(total) {
|
||||
return `共 ${total} 条`
|
||||
}
|
||||
};
|
||||
|
||||
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`} />)
|
||||
|
|
@ -60,13 +73,18 @@ export default class NewTableDialog extends React.Component {
|
|||
buttons={buttons}
|
||||
style={{ width: width, height: height }}
|
||||
>
|
||||
<WeaTable rowKey={record => record.id}
|
||||
dataSource={dataSource} childrenColumnName="children"
|
||||
columns={columns}
|
||||
indentSize={15}
|
||||
loading={loading}
|
||||
defaultExpandedRowKeys={[1, 2]}
|
||||
/>
|
||||
{
|
||||
loading ? <div className='hrm-loading-center-small'>
|
||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@4ygl4a`} spinning={loading}></Spin>
|
||||
</div> : <WeaTable rowKey={record => record.id}
|
||||
dataSource={dataSource} childrenColumnName="children"
|
||||
columns={columns}
|
||||
loading={loading}
|
||||
pagination={pagination}
|
||||
indentSize={15}
|
||||
/>
|
||||
}
|
||||
|
||||
</WeaDialog>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,11 +34,23 @@ export default class NewWeaTable extends React.Component {
|
|||
dataSource,
|
||||
columns,
|
||||
rowSelection,
|
||||
pagination,
|
||||
loading,
|
||||
indentSize
|
||||
} = this.props
|
||||
|
||||
const pagination = {
|
||||
total: dataSource.length,
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
onShowSizeChange(current, pageSize) {
|
||||
},
|
||||
onChange(current) {
|
||||
},
|
||||
showTotal(total){
|
||||
return `共 ${total} 条`
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
loading ? <div className='hrm-new-weatable-spin'>
|
||||
|
|
@ -48,12 +60,8 @@ export default class NewWeaTable extends React.Component {
|
|||
dataSource={dataSource} childrenColumnName="children"
|
||||
columns={columns}
|
||||
rowSelection={rowSelection}
|
||||
pagination={false}
|
||||
pagination={pagination}
|
||||
loading={loading}
|
||||
// onChange={(pagination, filters, sorter) => {
|
||||
// debugger
|
||||
// company.getTableInfo();
|
||||
// }}
|
||||
indentSize={indentSize}
|
||||
/>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @Author: 程亮
|
||||
* @Date: 2022-05-18 16:23:32
|
||||
* @LastEditTime: 2022-05-25 13:52:21
|
||||
* @LastEditTime: 2022-05-26 09:12:59
|
||||
* @Description:
|
||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js
|
||||
*/
|
||||
|
|
@ -134,8 +134,8 @@ export default class Company extends React.Component {
|
|||
|
||||
company.setNeDialogTitle(i18n.label.companyName());
|
||||
company.setVisible(true);
|
||||
company.getDeptTable(id);
|
||||
company.setDialogLoadingStatus(true);
|
||||
company.getDeptTable(id);
|
||||
}
|
||||
|
||||
batchDelete() {
|
||||
|
|
@ -369,7 +369,7 @@ export default class Company extends React.Component {
|
|||
},
|
||||
};
|
||||
|
||||
let pagination = {
|
||||
const pagination = {
|
||||
current:current,
|
||||
pageSize:pageSize,
|
||||
total: total,
|
||||
|
|
|
|||
|
|
@ -217,11 +217,11 @@ export default class Staff extends React.Component {
|
|||
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)} />
|
||||
}
|
||||
};
|
||||
// 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)} />
|
||||
// }
|
||||
// };
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export class StaffStore {
|
|||
@observable form = new WeaForm();
|
||||
@observable form1 = new WeaForm();
|
||||
@observable staffName = '';
|
||||
@observable conditionNum = 2;
|
||||
@observable conditionNum = 10;
|
||||
@observable ids = ''; //选择行id
|
||||
@observable searchConditionLoading = true;
|
||||
@observable nEdialogTitle = '';
|
||||
|
|
@ -145,24 +145,6 @@ export class StaffStore {
|
|||
});
|
||||
}
|
||||
|
||||
updateForbiddenTag(checked, id) {
|
||||
let params = {
|
||||
forbiddenTag: checked,
|
||||
id: id
|
||||
}
|
||||
Api.updateForbiddenTag(params).then(response => {
|
||||
return response.json()
|
||||
}).then(data => {
|
||||
if (data.code === 200) {
|
||||
message.success(data.msg);
|
||||
} else {
|
||||
message.warning(data.msg);
|
||||
}
|
||||
}).catch(error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
getForm() {
|
||||
let params = this.isNew ? {} : {
|
||||
|
|
@ -170,7 +152,7 @@ export class StaffStore {
|
|||
}
|
||||
this.setDialogLoadingStatus(true);
|
||||
|
||||
Api.getSchemeForm(params).then(res => {
|
||||
Api.getForm(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.setDialogLoadingStatus(false);
|
||||
res.data.condition && this.setCondition(res.data.condition);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export class StaffSchemeStore {
|
|||
@observable form = new WeaForm();
|
||||
@observable form1 = new WeaForm();
|
||||
@observable schemeName = '';
|
||||
@observable conditionNum = 2;
|
||||
@observable conditionNum = 8;
|
||||
@observable ids = ''; //选择行id
|
||||
@observable searchConditionLoading = true;
|
||||
@observable nEdialogTitle = '';
|
||||
|
|
|
|||
Loading…
Reference in New Issue