考勤引用静态页面
This commit is contained in:
parent
0a35202baa
commit
87dadb967f
|
|
@ -3,7 +3,7 @@ import { Row, Col } from 'antd'
|
|||
|
||||
export default class TwoColContent extends React.Component {
|
||||
render() {
|
||||
return <Row>
|
||||
return <Row gutter={10}>
|
||||
<Col span={18}>
|
||||
{this.props.leftContent}
|
||||
</Col>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import { Switch } from 'antd'
|
||||
|
||||
export const columns = [
|
||||
{
|
||||
title: "姓名",
|
||||
|
|
@ -69,6 +71,35 @@ export const columns = [
|
|||
}
|
||||
]
|
||||
|
||||
export const tab2Columns = [
|
||||
{
|
||||
title: "字段名称",
|
||||
dataIndex: 'username',
|
||||
key: 'username'
|
||||
},
|
||||
{
|
||||
title: "来源",
|
||||
dataIndex: 'username',
|
||||
key: 'username'
|
||||
},
|
||||
{
|
||||
title: "类型",
|
||||
dataIndex: 'username',
|
||||
key: 'username'
|
||||
},
|
||||
{
|
||||
title: "是否启用",
|
||||
render: (text) => {
|
||||
return <Switch defaultChecked={false}/>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "备注",
|
||||
dataIndex: 'username',
|
||||
key: 'username'
|
||||
}
|
||||
]
|
||||
|
||||
export const slideColumns = [
|
||||
{
|
||||
title: "姓名",
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { renderNoright, getSearchs } from '../../../util'; // 渲染form数据
|
|||
import CustomTab from '../../../components/customTab';
|
||||
import ContentWrapper from '../../../components/contentWrapper';
|
||||
|
||||
import { columns, dataSource } from './columns';
|
||||
import { columns, dataSource, tab2Columns, slideDataSource } from './columns';
|
||||
import MonthRange from '../../../components/monthRange'
|
||||
import ImportModal from '../../../components/importModal'
|
||||
import HeaderSet from "../../../components/importModal/headerSet"
|
||||
|
|
@ -19,6 +19,9 @@ import RefereAttendFormModal from './refereAttendFormModal'
|
|||
import SelectItemsWrapper from '../../../components/selectItemsModal/selectItemsWrapper'
|
||||
import SlideModalTitle from '../../../components/slideModalTitle'
|
||||
import EditSlideContent from './editSlideContent';
|
||||
import TwoColContent from '../../../components/twoColContent'
|
||||
import TipLabel from '../../../components/TipLabel'
|
||||
import ItemMangeFormModal from './itemMangeFormModal'
|
||||
|
||||
const { MonthPicker } = DatePicker;
|
||||
|
||||
|
|
@ -37,6 +40,7 @@ export default class Attendance extends React.Component {
|
|||
selectItemVisible: false,
|
||||
refereAttendFormVisible: false,
|
||||
tabSelectedKey: "0",
|
||||
itemMangeVisible: false,
|
||||
columns: [
|
||||
{
|
||||
title: "姓名",
|
||||
|
|
@ -151,11 +155,11 @@ export default class Attendance extends React.Component {
|
|||
];
|
||||
|
||||
const topTab = [{
|
||||
title: "社保",
|
||||
title: "考勤数据",
|
||||
viewcondition: "0"
|
||||
},
|
||||
{
|
||||
title: "公积金",
|
||||
title: "字段管理",
|
||||
viewcondition: "1"
|
||||
}];
|
||||
|
||||
|
|
@ -223,15 +227,20 @@ export default class Attendance extends React.Component {
|
|||
)
|
||||
}
|
||||
|
||||
const renderRightOperation = () => {
|
||||
return (
|
||||
<div style={{display: "inline-block"}}>
|
||||
<Button type="primary" style={{marginRight: "10px"}} onClick={() => this.setState({itemMangeVisible: true})}>新建</Button>
|
||||
<WeaInputSearch />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const menu = (
|
||||
<Menu>
|
||||
<Menu.Item key="1">导出全部</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div className="mySalaryBenefitsWrapper">
|
||||
|
|
@ -248,40 +257,59 @@ export default class Attendance extends React.Component {
|
|||
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
|
||||
>
|
||||
|
||||
<CustomTab topTab={topTab}
|
||||
searchOperationItem={
|
||||
renderSearchOperationItem()
|
||||
}
|
||||
onChange={(v) => {
|
||||
}}
|
||||
/>
|
||||
<CustomTab
|
||||
leftOperation={
|
||||
renderLeftOperation()
|
||||
}
|
||||
|
||||
onChange={(v) => {
|
||||
|
||||
}}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
this.state.tabSelectedKey == 0 ?
|
||||
<WeaTable columns={this.state.columns} dataSource={dataSource}/>
|
||||
<div>
|
||||
<CustomTab topTab={topTab}
|
||||
searchOperationItem={
|
||||
renderSearchOperationItem()
|
||||
}
|
||||
onChange={(v) => {
|
||||
this.setState({
|
||||
tabSelectedKey: v
|
||||
})
|
||||
}}
|
||||
/>
|
||||
<CustomTab
|
||||
leftOperation={
|
||||
renderLeftOperation()
|
||||
}
|
||||
onChange={(v) => {
|
||||
|
||||
}}
|
||||
/>
|
||||
<WeaTable columns={this.state.columns} dataSource={dataSource}/>
|
||||
</div>
|
||||
:
|
||||
<TwoColContent
|
||||
leftContent={
|
||||
<WeaTable columns={this.state.columns} dataSource={dataSource}/>
|
||||
}
|
||||
rightContent={
|
||||
<TipLabel tipList={
|
||||
[
|
||||
"1、考勤字段包含自定义字段和考勤模块的统计字段,所有字段不可重名;",
|
||||
"2、停用自定义字段将影响其参与计算的账套核算;"
|
||||
]
|
||||
}/>
|
||||
}
|
||||
/>
|
||||
<div>
|
||||
<CustomTab topTab={topTab}
|
||||
searchOperationItem={
|
||||
renderRightOperation()
|
||||
}
|
||||
onChange={(v) => {
|
||||
this.setState({
|
||||
tabSelectedKey: v
|
||||
})
|
||||
}}
|
||||
/>
|
||||
<TwoColContent
|
||||
leftContent={
|
||||
<WeaTable columns={tab2Columns} dataSource={slideDataSource}/>
|
||||
}
|
||||
rightContent={
|
||||
<TipLabel tipList={
|
||||
[
|
||||
"1、考勤字段包含自定义字段和考勤模块的统计字段,所有字段不可重名;",
|
||||
"2、停用自定义字段将影响其参与计算的账套核算;"
|
||||
]
|
||||
}/>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
|
||||
</WeaTop>
|
||||
|
|
@ -312,7 +340,7 @@ export default class Attendance extends React.Component {
|
|||
</SelectItemModal>
|
||||
|
||||
<RefereAttendFormModal visible={this.state.refereAttendFormVisible} onCancel={() => this.setState({refereAttendFormVisible: false})}/>
|
||||
|
||||
<ItemMangeFormModal visible={this.state.itemMangeVisible} onCancel={() => {this.setState({itemMangeVisible: false})}}/>
|
||||
{
|
||||
slideVisiable && <WeaSlideModal visible={slideVisiable}
|
||||
top={0}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
import React from 'react'
|
||||
import { Modal, Row, Col, Button,Switch } from 'antd'
|
||||
import { WeaInput, WeaSelect } from 'ecCom'
|
||||
import SelectItemModal, { items } from '../../../components/selectItemsModal/selectItemsWrapper';
|
||||
|
||||
export default class ItemMangeFormModal extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<Modal width={800} visible={this.props.visible} onCancel={this.props.onCancel}
|
||||
title={"新建自定义字段"}
|
||||
footer={
|
||||
<Button type="primary">保存</Button>
|
||||
}>
|
||||
<Row gutter={[10, 10]} style={{marginBottom: "10px"}}>
|
||||
<Col span={8}>
|
||||
字段名称
|
||||
</Col>
|
||||
<Col span={16}>
|
||||
<WeaInput style={{width: "200px"}} />
|
||||
</Col>
|
||||
</Row>
|
||||
<Row gutter={[10, 10]} style={{marginBottom: "10px"}}>
|
||||
<Col span={8}>
|
||||
类型
|
||||
</Col>
|
||||
<Col span={16}>
|
||||
<WeaSelect style={{width: "200px"}} option={[{title: "数值", }, {title: "文本"}]}/>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row gutter={[10, 10]} style={{marginBottom: "10px"}}>
|
||||
<Col span={8}>
|
||||
是否启用
|
||||
</Col>
|
||||
<Col span={16}>
|
||||
<Switch />
|
||||
</Col>
|
||||
</Row>
|
||||
<Row gutter={[10, 10]} style={{marginBottom: "10px"}}>
|
||||
<Col span={8}>
|
||||
备注
|
||||
</Col>
|
||||
<Col span={16}>
|
||||
<WeaInput style={{width: "200px"}} />
|
||||
</Col>
|
||||
</Row>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue