bug的修正
This commit is contained in:
parent
938fb94743
commit
a55847e656
|
|
@ -79,7 +79,7 @@ export default class BaseForm extends React.Component {
|
|||
>
|
||||
<WeaTop
|
||||
title="基础表单" // title
|
||||
icon={<i className='icon-coms-meeting' />} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor='#F14A2D' // 左侧图标背景色
|
||||
buttons={btns} // 顶部按钮: 这里是保存按钮,不需要可以不显示
|
||||
buttonSpace={10} // 按钮之间的间隔
|
||||
|
|
@ -103,4 +103,4 @@ export default class BaseForm extends React.Component {
|
|||
</WeaRightMenu>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export default class SlideModalTitle extends React.Component {
|
|||
render() {
|
||||
return <div className="slideTitleWrapper">
|
||||
<div className="iconWrapper">
|
||||
<i className='icon-coms-meeting' />
|
||||
<i className="icon-coms-fa" />
|
||||
</div>
|
||||
<div className="slideTitle">
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ const Home = (props) => props.children;
|
|||
const SocialSecurityBenefits = (props) => props.children;
|
||||
const DataAcquisition = (props) => props.children;
|
||||
|
||||
// mySalaryBenefits 我的薪资福利
|
||||
// mySalary 我的薪资福利
|
||||
// socialSecurityBenefits 社保福利
|
||||
// programme 社保福利方案
|
||||
// archives 社保福利档案
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ export default class Calculate extends React.Component {
|
|||
{/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */}
|
||||
<WeaTop
|
||||
title="薪资核算" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
|
|||
|
|
@ -728,7 +728,7 @@ export default class Attendance extends React.Component {
|
|||
collectParams={collectParams}>
|
||||
<WeaTop
|
||||
title="考勤引用" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
|
|||
|
|
@ -502,7 +502,7 @@ export default class CumDeduct extends React.Component {
|
|||
>
|
||||
<WeaTop
|
||||
title="累计专项附加扣除" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
|
|||
|
|
@ -482,7 +482,7 @@ export default class CumSituation extends React.Component {
|
|||
<WeaRightMenu datas={rightMenu}>
|
||||
<WeaTop
|
||||
title="往期累计情况(工资、薪金)" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ export default class Declare extends React.Component {
|
|||
>
|
||||
<WeaTop
|
||||
title="个税申报表" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ export default class IndividualIncomeTaxRateForm extends React.Component {
|
|||
>
|
||||
<WeaTop
|
||||
title="个税税率表" // 文字
|
||||
icon={<i className='icon-coms-meeting' />} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor='#F14A2D' // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ export default class Ledger extends React.Component {
|
|||
collectParams={collectParams}>
|
||||
<WeaTop
|
||||
title="薪资账套" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import Authority from "../mySalary/authority";
|
||||
import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
|
||||
|
|
@ -12,21 +11,36 @@ import "../payroll/templatePreview/index.less";
|
|||
export default class MobilePayroll extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state= {
|
||||
mySalaryBillData: {
|
||||
employeeInformation: {}
|
||||
}
|
||||
};
|
||||
this.id = "";
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
this.id = getQueryString("id");
|
||||
const { mySalaryStore: { getMySalaryBill, init } } = this.props;
|
||||
const { mySalaryStore: { init } } = this.props;
|
||||
init();
|
||||
getMySalaryBill(this.id);
|
||||
this.getMySalaryBill(this.id);
|
||||
}
|
||||
|
||||
getMySalaryBill = (id) => {
|
||||
const { mySalaryStore: { getMySalaryBill } } = this.props;
|
||||
getMySalaryBill(id).then(result => {
|
||||
this.setState({
|
||||
mySalaryBillData: result
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
const { mySalaryStore: { mySalaryBill } } = this.props;
|
||||
const { mySalaryBillData }= this.state;
|
||||
const type = getQueryString("type");
|
||||
const employeeInformation = mySalaryBill.employeeInformation && toJS(mySalaryBill.employeeInformation);
|
||||
const salaryGroups = mySalaryBill.salaryGroups && toJS(mySalaryBill.salaryGroups);
|
||||
const employeeInformation = mySalaryBillData.employeeInformation ? mySalaryBillData.employeeInformation : {};
|
||||
const salaryGroups = mySalaryBillData.salaryGroups ? mySalaryBillData.salaryGroups : [];
|
||||
return (
|
||||
<div className="computerTemplate" style={{
|
||||
height: "100%",
|
||||
|
|
@ -42,143 +56,19 @@ export default class MobilePayroll extends React.Component {
|
|||
type === "phone" ?
|
||||
<PhoneTemplate
|
||||
isPreview
|
||||
salaryTemplateShowSet={JSON.stringify(mySalaryBill.salaryTemplate)}
|
||||
isMsgPreview
|
||||
salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)}
|
||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
||||
/> :
|
||||
<ComputerTemplate
|
||||
isPreview
|
||||
salaryTemplateShowSet={JSON.stringify(mySalaryBill.salaryTemplate)}
|
||||
isMsgPreview
|
||||
salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)}
|
||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
{/*/!* 标题 *!/*/}
|
||||
{/*<div className="titleWrapper" style={{*/}
|
||||
{/* textAlign: "center",*/}
|
||||
{/* fontSize: "18px",*/}
|
||||
{/* fontWeight: 700*/}
|
||||
{/*}}>*/}
|
||||
{/* {mySalaryBill.salaryTemplate && mySalaryBill.salaryTemplate.theme}*/}
|
||||
{/*</div>*/}
|
||||
{/*{*/}
|
||||
{/* mySalaryBill.salaryTemplate && mySalaryBill.salaryTemplate.background && mySalaryBill.salaryTemplate.background !== ""*/}
|
||||
{/* && <div className="background-wrapper" style={{*/}
|
||||
{/* height: "200px",*/}
|
||||
{/* margin: "10px"*/}
|
||||
{/* }}>*/}
|
||||
{/* <img className="background-img" src={mySalaryBill.salaryTemplate.background} style={{*/}
|
||||
{/* width: "100%",*/}
|
||||
{/* height: "200px"*/}
|
||||
{/* }}/>*/}
|
||||
{/* </div>*/}
|
||||
{/*}*/}
|
||||
|
||||
{/* 员工信息 */}
|
||||
{/*<div className="sobItemWrapper">*/}
|
||||
{/* <div className="sobItem" style={{*/}
|
||||
{/* margin: "10px",*/}
|
||||
{/* backgroundColor: "#FFF",*/}
|
||||
{/* padding: "10px",*/}
|
||||
{/* lineHeight: "35px",*/}
|
||||
{/* textAlign: "center"*/}
|
||||
{/* }}>*/}
|
||||
{/* {*/}
|
||||
{/* mySalaryBill.employeeInformation && <Row className="titleRow" style={{*/}
|
||||
{/* border: "1px solid #f2f2f2",*/}
|
||||
{/* textAlign: "left"*/}
|
||||
{/* }}>*/}
|
||||
{/* <Col span={24} className="sobTitle" style={{*/}
|
||||
{/* paddingLeft: "10px"*/}
|
||||
{/* }}>{mySalaryBill.employeeInformation.groupName}</Col>*/}
|
||||
{/* </Row>*/}
|
||||
{/* }*/}
|
||||
{/* <Row className="contentRow" style={{*/}
|
||||
{/* borderLeft: "1px solid #f2f2f2",*/}
|
||||
{/* borderBottom: "1px solid #f2f2f2",*/}
|
||||
{/* borderRight: "1px solid #f2f2f2"*/}
|
||||
{/* }}>*/}
|
||||
{/* {*/}
|
||||
{/* mySalaryBill.employeeInformation && mySalaryBill.employeeInformation.items.map((item, index) => (*/}
|
||||
{/* <Col>*/}
|
||||
{/* <Col span={type == "phone" ? 12 : 4} className="contentItem" style={{*/}
|
||||
{/* borderRight: "1px solid #f2f2f2",*/}
|
||||
{/* overflow: "hidden",*/}
|
||||
{/* textOverflow: "ellipsis",*/}
|
||||
{/* whiteSpace: "nowrap",*/}
|
||||
{/* height: "35px"*/}
|
||||
{/* }}>{item.name}</Col>*/}
|
||||
{/* <Col span={type == "phone" ? 12 : 4} className="contentItem"*/}
|
||||
{/* style={{*/}
|
||||
{/* borderRight: (index + 1) % 3 == 0 ? "none" : "1px solid #f2f2f2",*/}
|
||||
{/* overflow: "hidden",*/}
|
||||
{/* textOverflow: "ellipsis",*/}
|
||||
{/* whiteSpace: "nowrap",*/}
|
||||
{/* height: "35px"*/}
|
||||
{/* }}*/}
|
||||
{/* >{item.salaryItemValue}</Col>*/}
|
||||
{/* </Col>*/}
|
||||
{/* ))*/}
|
||||
{/* }*/}
|
||||
{/* </Row>*/}
|
||||
{/* </div>*/}
|
||||
{/*</div>*/}
|
||||
|
||||
{/*{*/}
|
||||
{/* mySalaryBill.salaryGroups && mySalaryBill.salaryGroups.length > 0 &&*/}
|
||||
{/* mySalaryBill.salaryGroups.map(group => (*/}
|
||||
{/* <div className="sobItemWrapper">*/}
|
||||
{/* <div className="sobItem" style={{*/}
|
||||
{/* margin: "10px",*/}
|
||||
{/* backgroundColor: "#FFF",*/}
|
||||
{/* padding: "10px",*/}
|
||||
{/* lineHeight: "35px",*/}
|
||||
{/* textAlign: "center"*/}
|
||||
{/* }}>*/}
|
||||
{/* {*/}
|
||||
{/* mySalaryBill.employeeInformation && <Row className="titleRow" style={{*/}
|
||||
{/* border: "1px solid #f2f2f2",*/}
|
||||
{/* textAlign: "left"*/}
|
||||
{/* }}>*/}
|
||||
{/* <Col span={24} className="sobTitle" style={{*/}
|
||||
{/* paddingLeft: "10px"*/}
|
||||
{/* }}>{group.groupName}</Col>*/}
|
||||
{/* </Row>*/}
|
||||
{/* }*/}
|
||||
{/* <Row className="contentRow" style={{*/}
|
||||
{/* borderLeft: "1px solid #f2f2f2",*/}
|
||||
{/* borderBottom: "1px solid #f2f2f2",*/}
|
||||
{/* borderRight: "1px solid #f2f2f2"*/}
|
||||
{/* }}>*/}
|
||||
{/* {*/}
|
||||
{/* group.items && group.items.map((item, index) => (*/}
|
||||
{/* <Col>*/}
|
||||
{/* <Col span={type == "phone" ? 12 : 4} className="contentItem" style={{*/}
|
||||
{/* borderRight: "1px solid #f2f2f2",*/}
|
||||
{/* borderBottom: (index + 1) > 3 ? "1px solid #f2f2f2" : "none",*/}
|
||||
{/* overflow: "hidden",*/}
|
||||
{/* textOverflow: "ellipsis",*/}
|
||||
{/* whiteSpace: "nowrap",*/}
|
||||
{/* height: "35px"*/}
|
||||
{/* }}>{item.name}</Col>*/}
|
||||
{/* <Col span={type == "phone" ? 12 : 4} className="contentItem"*/}
|
||||
{/* style={{*/}
|
||||
{/* borderRight: (index + 1) % 3 == 0 ? "none" : "1px solid #f2f2f2",*/}
|
||||
{/* borderBottom: (index + 1) > 3 ? "1px solid #f2f2f2" : "none",*/}
|
||||
{/* overflow: "hidden",*/}
|
||||
{/* textOverflow: "ellipsis",*/}
|
||||
{/* whiteSpace: "nowrap",*/}
|
||||
{/* height: "35px"*/}
|
||||
{/* }}*/}
|
||||
{/* >{item.salaryItemValue}</Col>*/}
|
||||
{/* </Col>*/}
|
||||
{/* ))*/}
|
||||
{/* }*/}
|
||||
{/* </Row>*/}
|
||||
{/* </div>*/}
|
||||
{/* </div>*/}
|
||||
{/* ))*/}
|
||||
{/*}*/}
|
||||
</Authority>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -106,16 +106,11 @@ export default class MySalary extends React.Component {
|
|||
loading,
|
||||
hasRight,
|
||||
form,
|
||||
condition,
|
||||
tableStore,
|
||||
showSearchAd,
|
||||
getTableDatas,
|
||||
setMySalaryBill,
|
||||
doSearch,
|
||||
setShowSearchAd
|
||||
} = mySalaryStore;
|
||||
const {
|
||||
tabIndex,
|
||||
myBillTableStore,
|
||||
myBillDataSource,
|
||||
recordListColumns,
|
||||
recordListDataSource,
|
||||
|
|
@ -200,7 +195,7 @@ export default class MySalary extends React.Component {
|
|||
>
|
||||
<WeaTop
|
||||
title="我的薪资福利" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
@ -266,7 +261,9 @@ export default class MySalary extends React.Component {
|
|||
visible={salaryBillVisible}
|
||||
id={this.salaryInfoId}
|
||||
onCancel={() => {
|
||||
this.setState({ salaryBillVisible: false });
|
||||
this.setState({ salaryBillVisible: false },()=>{
|
||||
setMySalaryBill({})
|
||||
});
|
||||
}}
|
||||
/>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
.mySalaryBenefitsWrapper {
|
||||
.monthPickerWrapper {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
}
|
||||
.betweenLable {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px
|
||||
}
|
||||
}
|
||||
.monthPickerWrapper {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.betweenLable {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,160 +1,44 @@
|
|||
import React from 'react'
|
||||
import { Modal, Row, Col } from 'antd'
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import React from "react";
|
||||
import { WeaDialog } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
|
||||
import "../payroll/templatePreview/index.less";
|
||||
|
||||
@inject('mySalaryStore')
|
||||
@inject("mySalaryStore")
|
||||
@observer
|
||||
export default class PayrollModal extends React.Component {
|
||||
componentWillMount() {
|
||||
const { mySalaryStore: {getMySalaryBill}} = this.props;
|
||||
console.log("this.props.id", this.props.id)
|
||||
getMySalaryBill(this.props.id)
|
||||
}
|
||||
render() {
|
||||
const { mySalaryStore: { mySalaryBill }} = this.props;
|
||||
return (
|
||||
<Modal visible={this.props.visible} onCancel={() => {
|
||||
this.props.onCancel()
|
||||
}}
|
||||
width={900}
|
||||
footer={null}>
|
||||
<div className="computerTemplate" style={{
|
||||
backgroundColor: "rgb(246, 246, 246)",
|
||||
minHeight: "600px",
|
||||
height: "600px",
|
||||
overflowY: "scroll",
|
||||
paddingTop: "30px",
|
||||
paddingBottom: "20px",
|
||||
margin: "20px auto",
|
||||
}}>
|
||||
{/* 标题 */}
|
||||
<div className="titleWrapper" style={{
|
||||
textAlign: "center",
|
||||
fontSize: "18px",
|
||||
fontWeight: 700
|
||||
}}>
|
||||
{ mySalaryBill.salaryTemplate && mySalaryBill.salaryTemplate.theme }
|
||||
</div>
|
||||
{
|
||||
mySalaryBill.salaryTemplate && mySalaryBill.salaryTemplate.background && mySalaryBill.salaryTemplate.background !== ""
|
||||
&& <div className="background-wrapper" style={{
|
||||
height: "200px",
|
||||
margin: "10px"
|
||||
}}>
|
||||
<img className="background-img" src={mySalaryBill.salaryTemplate.background} style={{
|
||||
width: "100%",
|
||||
height: "200px"
|
||||
}}/>
|
||||
</div>
|
||||
}
|
||||
componentWillMount() {
|
||||
const { mySalaryStore: { getMySalaryBill } } = this.props;
|
||||
getMySalaryBill(this.props.id);
|
||||
}
|
||||
|
||||
{/* 员工信息 */}
|
||||
<div className="sobItemWrapper">
|
||||
<div className="sobItem" style={{
|
||||
margin: "10px",
|
||||
backgroundColor: "#FFF",
|
||||
padding: "10px",
|
||||
lineHeight: "35px",
|
||||
textAlign: "center"
|
||||
}}>
|
||||
{
|
||||
mySalaryBill.employeeInformation && <Row className="titleRow" style={{
|
||||
border: "1px solid #f2f2f2",
|
||||
textAlign: "left"
|
||||
}}>
|
||||
<Col span={24} className="sobTitle" style={{
|
||||
paddingLeft: "10px"
|
||||
}}>{mySalaryBill.employeeInformation.groupName}</Col>
|
||||
</Row>
|
||||
}
|
||||
<Row className="contentRow" style={{
|
||||
borderLeft: "1px solid #f2f2f2",
|
||||
borderBottom: "1px solid #f2f2f2",
|
||||
borderRight: "1px solid #f2f2f2"
|
||||
}}>
|
||||
{
|
||||
mySalaryBill.employeeInformation && mySalaryBill.employeeInformation.items.map((item, index) => (
|
||||
<Col>
|
||||
<Col span={ 4 } className="contentItem" style={{
|
||||
borderRight: "1px solid #f2f2f2",
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
whiteSpace: "nowrap",
|
||||
height: "35px"
|
||||
}}>{item.name}</Col>
|
||||
<Col span={ 4 } className="contentItem"
|
||||
style={{
|
||||
borderRight: (index + 1) % 3 == 0 ? "none": "1px solid #f2f2f2",
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
whiteSpace: "nowrap",
|
||||
height: "35px"
|
||||
}}
|
||||
>{item.salaryItemValue}</Col>
|
||||
</Col>
|
||||
))
|
||||
}
|
||||
</Row>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{
|
||||
mySalaryBill.salaryGroups && mySalaryBill.salaryGroups.length > 0 &&
|
||||
mySalaryBill.salaryGroups.map(group => (
|
||||
<div className="sobItemWrapper">
|
||||
<div className="sobItem" style={{
|
||||
margin: "10px",
|
||||
backgroundColor: "#FFF",
|
||||
padding: "10px",
|
||||
lineHeight: "35px",
|
||||
textAlign: "center"
|
||||
}}>
|
||||
{
|
||||
mySalaryBill.employeeInformation && <Row className="titleRow" style={{
|
||||
border: "1px solid #f2f2f2",
|
||||
textAlign: "left"
|
||||
}}>
|
||||
<Col span={24} className="sobTitle" style={{
|
||||
paddingLeft: "10px"
|
||||
}}>{group.groupName}</Col>
|
||||
</Row>
|
||||
}
|
||||
<Row className="contentRow" style={{
|
||||
borderLeft: "1px solid #f2f2f2",
|
||||
borderBottom: "1px solid #f2f2f2",
|
||||
borderRight: "1px solid #f2f2f2"
|
||||
}}>
|
||||
{
|
||||
group.items && group.items.map((item, index) => (
|
||||
<Col>
|
||||
<Col span={ 4 } className="contentItem" style={{
|
||||
borderRight: "1px solid #f2f2f2",
|
||||
borderBottom: (index + 1) > 3 ? "1px solid #f2f2f2" : "none",
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
whiteSpace: "nowrap",
|
||||
height: "35px"
|
||||
}}>{item.name}</Col>
|
||||
<Col span={ 4 } className="contentItem"
|
||||
style={{
|
||||
borderRight: (index + 1) % 3 == 0 ? "none": "1px solid #f2f2f2",
|
||||
borderBottom: (index + 1) > 3 ? "1px solid #f2f2f2" : "none",
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
whiteSpace: "nowrap",
|
||||
height: "35px"
|
||||
}}
|
||||
>{item.salaryItemValue}</Col>
|
||||
</Col>
|
||||
))
|
||||
}
|
||||
</Row>
|
||||
</div>
|
||||
</div>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const { mySalaryStore: { mySalaryBill } } = this.props;
|
||||
const employeeInformation = mySalaryBill.employeeInformation && toJS(mySalaryBill.employeeInformation);
|
||||
const salaryGroups = mySalaryBill.salaryGroups && toJS(mySalaryBill.salaryGroups);
|
||||
return (
|
||||
<WeaDialog
|
||||
title="工资单"
|
||||
visible={this.props.visible} onCancel={() => {
|
||||
this.props.onCancel();
|
||||
}}
|
||||
style={{ width: 980 }}
|
||||
initLoadCss
|
||||
resize>
|
||||
<div style={{ minHeight: "20vh", maxHeight: "80vh", overflow: "hidden auto" }}>
|
||||
<div className="templatePreview">
|
||||
{
|
||||
this.props.visible &&
|
||||
<ComputerTemplate
|
||||
isPreview
|
||||
salaryTemplateShowSet={JSON.stringify(mySalaryBill.salaryTemplate)}
|
||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ export default class Payroll extends React.Component {
|
|||
>
|
||||
<WeaTop
|
||||
title="工资单发放" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ this.handleGrant(record)
|
|||
<div className="payrollGrant">
|
||||
<WeaTop
|
||||
title="工资单发放" // 文字
|
||||
icon={<i className='icon-coms-meeting' />} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor='#F14A2D' // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
buttons={[this.getSearchsAdQuick()]}
|
||||
|
|
@ -212,4 +212,4 @@ this.handleSearch()
|
|||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,17 +11,17 @@ export default class ComputerTemplate extends React.Component {
|
|||
this.state = {
|
||||
salaryItemSet: [],
|
||||
salaryTemplateShowSet: {
|
||||
theme:'',
|
||||
background:'',
|
||||
textContentPosition: '',
|
||||
textContent: ''
|
||||
theme: "",
|
||||
background: "",
|
||||
textContentPosition: "",
|
||||
textContent: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
componentWillMount() {
|
||||
if(this.props.isPreview) return;
|
||||
if (this.props.isPreview) return;
|
||||
let salaryTemplateShowSetStr = window.localStorage.getItem("salaryTemplateShowSet");
|
||||
let salaryItemSetStr = window.localStorage.getItem("salaryItemSet");
|
||||
this.setState({
|
||||
|
|
@ -30,11 +30,20 @@ export default class ComputerTemplate extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if(this.props.isMsgPreview){
|
||||
this.setState({
|
||||
salaryItemSet: JSON.parse(this.props.salaryItemSet),
|
||||
salaryTemplateShowSet: JSON.parse(this.props.salaryTemplateShowSet)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if(nextProps.salaryTemplateShowSet !== this.props.salaryTemplateShowSet){
|
||||
if (nextProps.salaryTemplateShowSet !== this.props.salaryTemplateShowSet) {
|
||||
this.setState({
|
||||
salaryItemSet: JSON.parse(nextProps.salaryItemSet),
|
||||
salaryTemplateShowSet: JSON.parse(nextProps.salaryTemplateShowSet),
|
||||
salaryTemplateShowSet: JSON.parse(nextProps.salaryTemplateShowSet)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -61,11 +70,11 @@ export default class ComputerTemplate extends React.Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { salaryTemplateShowSet, salaryItemSet }= this.state;
|
||||
const { salaryTemplateShowSet, salaryItemSet } = this.state;
|
||||
return (
|
||||
<div className="computerTemplate">
|
||||
<div className="titleWrapper">
|
||||
{salaryTemplateShowSet.theme.replace("${companyName}", "上海泛微").replace("${salaryMonth}", moment(new Date()).format("YYYY-MM"))}
|
||||
{salaryTemplateShowSet.theme.replace("${companyName}", "").replace("${salaryMonth}", moment(new Date()).format("YYYY-MM"))}
|
||||
</div>
|
||||
{
|
||||
salaryTemplateShowSet.background && <div className="background-wrapper">
|
||||
|
|
|
|||
|
|
@ -568,7 +568,7 @@ export default class SalaryFile extends React.Component {
|
|||
>
|
||||
<WeaTop
|
||||
title="薪资档案" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ export default class SalaryItem extends React.Component {
|
|||
>
|
||||
<WeaTop
|
||||
title="薪资项目管理" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ export default class Archives extends React.Component {
|
|||
>
|
||||
<WeaTop
|
||||
title="社保福利档案" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
|
|||
|
|
@ -1,31 +1,47 @@
|
|||
import React from "react";
|
||||
import { Col, Modal, Row } from "antd";
|
||||
import { WeaInput } from "ecCom";
|
||||
import { WeaDialog, WeaError, WeaFormItem, WeaInput } from "ecCom";
|
||||
|
||||
export default class CopySchemaModal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
value: ""
|
||||
value: this.props.value || ""
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Modal title={`复制${this.props.title}`} footer={this.props.footer} onCancel={() => this.props.onCancel()}
|
||||
visible={this.props.visible}>
|
||||
<Row style={{ display: "flex", alignItems: "center" }}>
|
||||
<Col span={8} style={{ textAlign: "center" }}>
|
||||
{`${this.props.title}名称`}
|
||||
</Col>
|
||||
<Col span={16}>
|
||||
<WeaInput value={this.state.value} onChange={(v) => {
|
||||
this.setState({ value: v });
|
||||
this.props.onChange(v);
|
||||
}}/>
|
||||
</Col>
|
||||
</Row>
|
||||
</Modal>
|
||||
<WeaDialog
|
||||
title={`复制${this.props.title}`}
|
||||
style={{ height: 120 }}
|
||||
resize
|
||||
buttons={this.props.footer}
|
||||
onCancel={() => this.props.onCancel()}
|
||||
visible={this.props.visible}>
|
||||
<div style={{ width: "100%", height: "100%", padding: "20px 10px" }}>
|
||||
<WeaFormItem
|
||||
label={`${this.props.title}名称`}
|
||||
labelCol={{ span: 6 }}
|
||||
wrapperCol={{ span: 18 }}
|
||||
>
|
||||
<WeaError
|
||||
tipPosition="bottom"
|
||||
ref="weaError"
|
||||
style={{ width: "90%" }}
|
||||
error={`${this.props.title}名称不能为空`}>
|
||||
<WeaInput
|
||||
value={this.state.value}
|
||||
style={{ width: "100%" }}
|
||||
viewAttr={3}
|
||||
onChange={(v) => {
|
||||
if(v === '') this.refs.weaError.showError();
|
||||
this.setState({ value: v });
|
||||
this.props.onChange(v);
|
||||
}}/>
|
||||
</WeaError>
|
||||
</WeaFormItem>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { Button, DatePicker, Dropdown, Menu, message, Modal, Switch } from "antd";
|
||||
|
||||
import { Button, Dropdown, Menu, message, Modal, Switch } from "antd";
|
||||
import { WeaRightMenu, WeaSelect, WeaSlideModal, WeaTop } from "ecCom";
|
||||
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import "./index.less";
|
||||
import { renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
|
|
@ -20,8 +18,6 @@ import CopySchemaModal from "./copySchemaModal";
|
|||
|
||||
const WeaMobxTable = WeaTableNew.WeaTable;
|
||||
|
||||
const { MonthPicker } = DatePicker;
|
||||
|
||||
@inject("programmeStore", "taxAgentStore", "salaryFileStore")
|
||||
@observer
|
||||
export default class Programme extends React.Component {
|
||||
|
|
@ -436,8 +432,12 @@ export default class Programme extends React.Component {
|
|||
const handleCopyModalSave = () => {
|
||||
const { programmeStore: { copyScheme } } = this.props;
|
||||
const { copyId, copyModalValue } = this.state;
|
||||
copyScheme({ id: copyId, schemeName: copyModalValue });
|
||||
this.setState({ copyModalVisible: false });
|
||||
if(_.isEmpty(this.refs.copyRef.state.value)){
|
||||
this.refs.copyRef.refs.weaError.showError();
|
||||
}else{
|
||||
copyScheme({ id: copyId, schemeName: copyModalValue });
|
||||
this.setState({ copyModalVisible: false });
|
||||
}
|
||||
};
|
||||
|
||||
const handleSlideClose = () => {
|
||||
|
|
@ -454,7 +454,7 @@ export default class Programme extends React.Component {
|
|||
{/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */}
|
||||
<WeaTop
|
||||
title="社保福利方案" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
@ -573,6 +573,7 @@ export default class Programme extends React.Component {
|
|||
|
||||
{this.state.copyModalVisible &&
|
||||
<CopySchemaModal
|
||||
ref='copyRef'
|
||||
title={_.filter(topTab, it => it.viewcondition === selectedKey)[0].title}
|
||||
visible={this.state.copyModalVisible}
|
||||
value={this.state.copyModalValue}
|
||||
|
|
@ -581,13 +582,13 @@ export default class Programme extends React.Component {
|
|||
this.setState({ copyModalVisible: false });
|
||||
}}
|
||||
footer={
|
||||
<Button
|
||||
[<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
handleCopyModalSave();
|
||||
}}>
|
||||
保存
|
||||
</Button>
|
||||
</Button>]
|
||||
}
|
||||
/>}
|
||||
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ export default class StandingBook extends React.Component {
|
|||
>
|
||||
<WeaTop
|
||||
title="社保福利台账" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
buttons={showOperateBtn ? rightBtns : []}
|
||||
// showDropIcon={true} // 是否显示下拉按钮
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
float: "left"
|
||||
}}>
|
||||
{
|
||||
hideIconInTax && !showSalaryItemBtn && <React.Fragment>
|
||||
(hideIconInTax || showSalaryItemBtn) && <React.Fragment>
|
||||
<Button type="primary"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ doSearch({name})
|
|||
>
|
||||
<WeaTop
|
||||
title="个税税率表" // 文字
|
||||
icon={<i className='icon-coms-meeting' />} // 左侧图标
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
iconBgcolor='#F14A2D' // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export class MySalaryStore {
|
|||
this.loading = true;
|
||||
this.hasRight = false;
|
||||
};
|
||||
|
||||
@action setMySalaryBill= (mySalaryBill)=> {this.mySalaryBill= mySalaryBill};
|
||||
@action init = async props => {
|
||||
this.clear();
|
||||
//1.check is need second verify
|
||||
|
|
@ -148,13 +148,17 @@ export class MySalaryStore {
|
|||
// 我的工资单详情
|
||||
@action
|
||||
getMySalaryBill = (salaryInfoId) => {
|
||||
API.mySalaryBill({ salaryInfoId }).then(res => {
|
||||
if (res.status) {
|
||||
this.mySalaryBill = res.data;
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败");
|
||||
}
|
||||
});
|
||||
return new Promise((resolve, reject)=>{
|
||||
API.mySalaryBill({ salaryInfoId }).then(res => {
|
||||
if (res.status) {
|
||||
this.mySalaryBill = res.data;
|
||||
resolve(res.data)
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败");
|
||||
reject("获取失败")
|
||||
}
|
||||
});
|
||||
})
|
||||
};
|
||||
|
||||
@action
|
||||
|
|
|
|||
|
|
@ -217,7 +217,8 @@ export class ProgrammeStore {
|
|||
})
|
||||
}
|
||||
|
||||
@action copyScheme = (params) => {
|
||||
@action("复制福利方案")
|
||||
copyScheme = (params) => {
|
||||
API.copyScheme(params).then(res => {
|
||||
if(res.status) {
|
||||
message.success("复制成功")
|
||||
|
|
|
|||
Loading…
Reference in New Issue