工资单
This commit is contained in:
parent
bd21135a22
commit
1fb586fe40
|
|
@ -90,7 +90,6 @@ export default class ImportModal extends React.Component {
|
|||
onPreviewDate={() => this.handlePreviewDate()}
|
||||
dataSource={slideDataSource}
|
||||
columns={this.props.columns}
|
||||
|
||||
onStep2Next={() => {this.nextStep()}} onStep2Pre={() => {this.preStep()}}/>)
|
||||
}
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 9.6 KiB |
|
|
@ -1,19 +1,35 @@
|
|||
import React from 'react'
|
||||
import background from './background.png'
|
||||
import { Row, Col } from 'antd'
|
||||
|
||||
export default class ComputerTemplate extends React.Component {
|
||||
|
||||
render() {
|
||||
const { isPC } = this.props;
|
||||
return (
|
||||
<div className="computerTemplate">
|
||||
<div className="titleWrapper">
|
||||
测试标题
|
||||
</div>
|
||||
<div className="background-wrapper">
|
||||
|
||||
<img className="background-img" src={background} />
|
||||
</div>
|
||||
|
||||
<div className="sobItemWrapper">
|
||||
|
||||
<div className="sobItem">
|
||||
<Row className="titleRow">
|
||||
<Col span={24} className="sobTitle">员工信息</Col>
|
||||
</Row>
|
||||
|
||||
<Row className="contentRow">
|
||||
<Col span={ 4 } className="contentItem">个税扣缴义务人</Col>
|
||||
<Col span={ 4 } className="contentItem">上海泛微</Col>
|
||||
<Col span={ 4 } className="contentItem">姓名</Col>
|
||||
<Col span={ 4 } className="contentItem">张三</Col>
|
||||
<Col span={ 4 } className="contentItem">部门</Col>
|
||||
<Col span={ 4 } className="contentItem">研发部</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ import React from 'react'
|
|||
import phone from './phone_new.png'
|
||||
import computer from './computer.png'
|
||||
import './index.less'
|
||||
import ComputerTemplate from './computerTemplate'
|
||||
import PhoneTemplate from './phoneTemplate'
|
||||
|
||||
export default class TemplatePreview extends React.Component {
|
||||
constructor(props) {
|
||||
|
|
@ -31,6 +33,9 @@ export default class TemplatePreview extends React.Component {
|
|||
</div>
|
||||
|
||||
<div className="contentWrapper">
|
||||
{
|
||||
this.state.selectKey == "0" ? <ComputerTemplate/> : <PhoneTemplate />
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.templatePreview {
|
||||
|
||||
.headerWrapper {
|
||||
background-color: #0270c1;
|
||||
height: 55px;
|
||||
|
|
@ -10,7 +11,7 @@
|
|||
height: 55px;
|
||||
.iconWrapper {
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
width: 64px;
|
||||
height: 55px;
|
||||
line-height: 75px;
|
||||
text-align: center;
|
||||
|
|
@ -24,4 +25,71 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.computerTemplate {
|
||||
background-color: rgb(246, 246, 246);
|
||||
width: 900px;
|
||||
min-height: 1200px;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 20px;
|
||||
margin: 20px auto;
|
||||
box-shadow: rgba(214, 214, 214, 0.5) 0px 0px 14px 0px;
|
||||
border: 3px solid #fff;
|
||||
.background-wrapper {
|
||||
height: 200px;
|
||||
margin: 10px;
|
||||
}
|
||||
.background-img {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
.titleWrapper {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.sobItem {
|
||||
margin: 10px;
|
||||
background-color: #FFF;
|
||||
padding: 10px;
|
||||
line-height: 35px;
|
||||
text-align: center;
|
||||
.titleRow {
|
||||
border: 1px solid #f2f2f2;
|
||||
text-align: left;
|
||||
.sobTitle {
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
.contentRow {
|
||||
border-left: 1px solid #f2f2f2;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
border-right: 1px solid #f2f2f2;
|
||||
}
|
||||
.contentItem {
|
||||
border-right: 1px solid #f2f2f2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.contentItem:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.phoneTemplate {
|
||||
width: 330px;
|
||||
padding-top: 0px;
|
||||
border-radius: 20px;
|
||||
.phoneBar {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
import React from 'react'
|
||||
import { Row, Col} from 'antd'
|
||||
import background from '../computerTemplate/background.png'
|
||||
import "../index.less"
|
||||
|
||||
export default class PhoneTemplate extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="computerTemplate phoneTemplate" >
|
||||
<div className="phoneBar">薪酬预览</div>
|
||||
<div className="titleWrapper">
|
||||
测试标题
|
||||
</div>
|
||||
<div className="background-wrapper">
|
||||
<img className="background-img" src={background} />
|
||||
</div>
|
||||
|
||||
<div className="sobItemWrapper">
|
||||
<div className="sobItem">
|
||||
<Row className="titleRow">
|
||||
<Col span={24} className="sobTitle">员工信息</Col>
|
||||
</Row>
|
||||
|
||||
<Row className="contentRow">
|
||||
<Col span={ 6 } className="contentItem">个税扣缴义务人</Col>
|
||||
<Col span={ 6 } className="contentItem">上海泛微</Col>
|
||||
<Col span={ 6 } className="contentItem">姓名</Col>
|
||||
<Col span={ 6 } className="contentItem">张三</Col>
|
||||
</Row>
|
||||
|
||||
<Row className="contentRow">
|
||||
<Col span={ 6 } className="contentItem">部门</Col>
|
||||
<Col span={ 6 } className="contentItem">研发部</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -42,7 +42,8 @@ export default class SalaryFile extends React.Component {
|
|||
step: 0,
|
||||
recordSlideVisible: false,
|
||||
selectedRowKeys: [],
|
||||
showSearchBar: false
|
||||
showSearchBar: false,
|
||||
importResult: {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -82,7 +83,12 @@ export default class SalaryFile extends React.Component {
|
|||
handleImportFile(params) {
|
||||
const { salaryFileStore: {importSalaryArchive}} = this.props;
|
||||
params.importType = this.state.importType
|
||||
importSalaryArchive(params)
|
||||
importSalaryArchive(params).then(data => {
|
||||
data.errorData = data.errorNotice
|
||||
this.setState({
|
||||
importResult: data
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -298,7 +304,7 @@ export default class SalaryFile extends React.Component {
|
|||
step={step}
|
||||
setStep={this.setStep.bind(this)}
|
||||
slideDataSource={previewDataSource}
|
||||
importResult={{}}
|
||||
importResult={this.state.importResult}
|
||||
onFinish={() => {this.handleImportFinish()}}
|
||||
previewImport={(params) => {
|
||||
this.handlePreviewImport(params)
|
||||
|
|
@ -310,8 +316,6 @@ export default class SalaryFile extends React.Component {
|
|||
onCancel={() => { this.setState({modalVisiable: false})}}
|
||||
/>
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
this.state.changeSalaryVisible && <ChangeSalaryModal
|
||||
currentId={currentId}
|
||||
|
|
|
|||
|
|
@ -128,13 +128,18 @@ export class salaryFileStore {
|
|||
// 导入档案
|
||||
@action
|
||||
importSalaryArchive = (params) => {
|
||||
API.importSalaryArchive(params).then(res => {
|
||||
if(res.status) {
|
||||
message.success("导入成功")
|
||||
} else {
|
||||
message.error(res.errormsg || "接口异常")
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
API.importSalaryArchive(params).then(res => {
|
||||
if(res.status) {
|
||||
message.success("导入成功")
|
||||
resolve(res.data)
|
||||
} else {
|
||||
message.error(res.errormsg || "接口异常")
|
||||
reject()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 导出档案
|
||||
|
|
|
|||
Loading…
Reference in New Issue