commit
4668fb43e1
|
|
@ -4,11 +4,11 @@ import {
|
||||||
} from 'ecCom'
|
} from 'ecCom'
|
||||||
|
|
||||||
export const getSearchList = (params) => {
|
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) => {
|
export const deleteTableData = (params) => {
|
||||||
return fetch('/api/bs/hrmorganization/scheme/deleteByIds', {
|
return fetch('/api/bs/hrmorganization/staff/deleteByIds', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -19,11 +19,11 @@ export const deleteTableData = (params) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getAdvanceSearchCondition = (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) => {
|
export const add = (params) => {
|
||||||
return fetch('/api/bs/hrmorganization/scheme/save', {
|
return fetch('/api/bs/hrmorganization/staff/saveStaff', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -34,7 +34,7 @@ export const add = (params) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const edit = (params) => {
|
export const edit = (params) => {
|
||||||
return fetch('/api/bs/hrmorganization/scheme/updateScheme', {
|
return fetch('/api/bs/hrmorganization/staff/updateStaff', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -44,21 +44,10 @@ export const edit = (params) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const updateForbiddenTag = (params) => {
|
export const getForm = (params) => {
|
||||||
return fetch('/api/bs/hrmorganization/scheme/updateForbiddenTagById', {
|
return WeaTools.callApi('/api/bs/hrmorganization/staff/getForm', 'GET', params);
|
||||||
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 getHasRight = (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'
|
} from 'ecCom'
|
||||||
|
|
||||||
export const getSearchList = (params) => {
|
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) => {
|
export const deleteTableData = (params) => {
|
||||||
return fetch('/api/bs/hrmorganization/scheme/deleteByIds', {
|
return fetch('/api/bs/hrmorganization/staffplan/deleteByIds', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -19,11 +19,11 @@ export const deleteTableData = (params) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getAdvanceSearchCondition = (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) => {
|
export const add = (params) => {
|
||||||
return fetch('/api/bs/hrmorganization/scheme/save', {
|
return fetch('/api/bs/hrmorganization/staffplan/saveStaffPlan', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -34,7 +34,7 @@ export const add = (params) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const edit = (params) => {
|
export const edit = (params) => {
|
||||||
return fetch('/api/bs/hrmorganization/scheme/updateScheme', {
|
return fetch('/api/bs/hrmorganization/staffplan/updateStaffPlan', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -45,7 +45,7 @@ export const edit = (params) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const updateForbiddenTag = (params) => {
|
export const updateForbiddenTag = (params) => {
|
||||||
return fetch('/api/bs/hrmorganization/scheme/updateForbiddenTagById', {
|
return fetch('/api/bs/hrmorganization/staffplan/updateForbiddenTagById', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -56,9 +56,9 @@ export const updateForbiddenTag = (params) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getSchemeForm = (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) => {
|
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,
|
width,
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
|
const pagination = {
|
||||||
|
total: dataSource.length,
|
||||||
|
showSizeChanger: true,
|
||||||
|
showQuickJumper: true,
|
||||||
|
onShowSizeChange(current, pageSize) {
|
||||||
|
},
|
||||||
|
onChange(current) {
|
||||||
|
},
|
||||||
|
showTotal(total) {
|
||||||
|
return `共 ${total} 条`
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const buttons = [
|
const buttons = [
|
||||||
//(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} type="primary" onClick={() => save()} disabled={loading}>{i18n.button.save()}</Button>),
|
//(<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`} />)
|
||||||
|
|
@ -60,13 +73,18 @@ export default class NewTableDialog extends React.Component {
|
||||||
buttons={buttons}
|
buttons={buttons}
|
||||||
style={{ width: width, height: height }}
|
style={{ width: width, height: height }}
|
||||||
>
|
>
|
||||||
<WeaTable rowKey={record => record.id}
|
{
|
||||||
dataSource={dataSource} childrenColumnName="children"
|
loading ? <div className='hrm-loading-center-small'>
|
||||||
columns={columns}
|
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@4ygl4a`} spinning={loading}></Spin>
|
||||||
indentSize={15}
|
</div> : <WeaTable rowKey={record => record.id}
|
||||||
loading={loading}
|
dataSource={dataSource} childrenColumnName="children"
|
||||||
defaultExpandedRowKeys={[1, 2]}
|
columns={columns}
|
||||||
/>
|
loading={loading}
|
||||||
|
pagination={pagination}
|
||||||
|
indentSize={15}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
|
||||||
</WeaDialog>
|
</WeaDialog>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,23 @@ export default class NewWeaTable extends React.Component {
|
||||||
dataSource,
|
dataSource,
|
||||||
columns,
|
columns,
|
||||||
rowSelection,
|
rowSelection,
|
||||||
pagination,
|
|
||||||
loading,
|
loading,
|
||||||
indentSize
|
indentSize
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
|
const pagination = {
|
||||||
|
total: dataSource.length,
|
||||||
|
showSizeChanger: true,
|
||||||
|
showQuickJumper: true,
|
||||||
|
onShowSizeChange(current, pageSize) {
|
||||||
|
},
|
||||||
|
onChange(current) {
|
||||||
|
},
|
||||||
|
showTotal(total){
|
||||||
|
return `共 ${total} 条`
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
loading ? <div className='hrm-new-weatable-spin'>
|
loading ? <div className='hrm-new-weatable-spin'>
|
||||||
|
|
@ -48,12 +60,8 @@ export default class NewWeaTable extends React.Component {
|
||||||
dataSource={dataSource} childrenColumnName="children"
|
dataSource={dataSource} childrenColumnName="children"
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowSelection={rowSelection}
|
rowSelection={rowSelection}
|
||||||
pagination={false}
|
pagination={pagination}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
// onChange={(pagination, filters, sorter) => {
|
|
||||||
// debugger
|
|
||||||
// company.getTableInfo();
|
|
||||||
// }}
|
|
||||||
indentSize={indentSize}
|
indentSize={indentSize}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* @Author: 程亮
|
* @Author: 程亮
|
||||||
* @Date: 2022-05-18 16:23:32
|
* @Date: 2022-05-18 16:23:32
|
||||||
* @LastEditTime: 2022-05-25 13:52:21
|
* @LastEditTime: 2022-05-26 09:12:59
|
||||||
* @Description:
|
* @Description:
|
||||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js
|
* @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.setNeDialogTitle(i18n.label.companyName());
|
||||||
company.setVisible(true);
|
company.setVisible(true);
|
||||||
company.getDeptTable(id);
|
|
||||||
company.setDialogLoadingStatus(true);
|
company.setDialogLoadingStatus(true);
|
||||||
|
company.getDeptTable(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
batchDelete() {
|
batchDelete() {
|
||||||
|
|
@ -369,7 +369,7 @@ export default class Company extends React.Component {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let pagination = {
|
const pagination = {
|
||||||
current:current,
|
current:current,
|
||||||
pageSize:pageSize,
|
pageSize:pageSize,
|
||||||
total: total,
|
total: total,
|
||||||
|
|
|
||||||
|
|
@ -217,11 +217,11 @@ export default class Staff extends React.Component {
|
||||||
reRenderColumns(columns) {
|
reRenderColumns(columns) {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
columns.forEach((c, index) => {
|
columns.forEach((c, index) => {
|
||||||
if (c.dataIndex == 'forbidden_tag') {
|
// if (c.dataIndex == 'forbidden_tag') {
|
||||||
c.render = function(text, record) {
|
// c.render = function(text, record) {
|
||||||
return <Switch defaultChecked={record.forbidden_tag == "0" ? true : false} onChange={checked => _this.updateForbiddenTag(checked,record.id)} />
|
// 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 form = new WeaForm();
|
||||||
@observable form1 = new WeaForm();
|
@observable form1 = new WeaForm();
|
||||||
@observable staffName = '';
|
@observable staffName = '';
|
||||||
@observable conditionNum = 2;
|
@observable conditionNum = 10;
|
||||||
@observable ids = ''; //选择行id
|
@observable ids = ''; //选择行id
|
||||||
@observable searchConditionLoading = true;
|
@observable searchConditionLoading = true;
|
||||||
@observable nEdialogTitle = '';
|
@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() {
|
getForm() {
|
||||||
let params = this.isNew ? {} : {
|
let params = this.isNew ? {} : {
|
||||||
|
|
@ -170,7 +152,7 @@ export class StaffStore {
|
||||||
}
|
}
|
||||||
this.setDialogLoadingStatus(true);
|
this.setDialogLoadingStatus(true);
|
||||||
|
|
||||||
Api.getSchemeForm(params).then(res => {
|
Api.getForm(params).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.setDialogLoadingStatus(false);
|
this.setDialogLoadingStatus(false);
|
||||||
res.data.condition && this.setCondition(res.data.condition);
|
res.data.condition && this.setCondition(res.data.condition);
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ export class StaffSchemeStore {
|
||||||
@observable form = new WeaForm();
|
@observable form = new WeaForm();
|
||||||
@observable form1 = new WeaForm();
|
@observable form1 = new WeaForm();
|
||||||
@observable schemeName = '';
|
@observable schemeName = '';
|
||||||
@observable conditionNum = 2;
|
@observable conditionNum = 8;
|
||||||
@observable ids = ''; //选择行id
|
@observable ids = ''; //选择行id
|
||||||
@observable searchConditionLoading = true;
|
@observable searchConditionLoading = true;
|
||||||
@observable nEdialogTitle = '';
|
@observable nEdialogTitle = '';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue