薪资核算详情页面添加高级搜索的功能以及添加列表头公式查看的接口
This commit is contained in:
parent
cac473595e
commit
2097d2faf7
|
|
@ -54,7 +54,9 @@ export default class EditableTable extends React.Component {
|
||||||
item.render = (text, record) => (
|
item.render = (text, record) => (
|
||||||
<Tooltip title={
|
<Tooltip title={
|
||||||
<div className="popoverBtnWrapper">
|
<div className="popoverBtnWrapper">
|
||||||
<i className="icon-coms-Delete popBtnItem" onClick={() => {this.onItemDelete(record)}} />
|
<i className="icon-coms-Delete popBtnItem" onClick={() => {
|
||||||
|
this.onItemDelete(record)
|
||||||
|
}} />
|
||||||
</div>
|
</div>
|
||||||
}>
|
}>
|
||||||
<div>{text}</div>
|
<div>{text}</div>
|
||||||
|
|
@ -95,7 +97,9 @@ export default class EditableTable extends React.Component {
|
||||||
onItemDelete = (record) => {
|
onItemDelete = (record) => {
|
||||||
let dataSource = [...this.props.dataSource];
|
let dataSource = [...this.props.dataSource];
|
||||||
dataSource = dataSource.filter(item => item.indexNum != record.indexNum)
|
dataSource = dataSource.filter(item => item.indexNum != record.indexNum)
|
||||||
dataSource.map((item, index) => {item.indexNum = index + 1})
|
dataSource.map((item, index) => {
|
||||||
|
item.indexNum = index + 1
|
||||||
|
})
|
||||||
this.props.onDataSourceChange(dataSource)
|
this.props.onDataSourceChange(dataSource)
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
|
|
@ -105,7 +109,9 @@ export default class EditableTable extends React.Component {
|
||||||
<div>
|
<div>
|
||||||
{
|
{
|
||||||
editable && <div className="operateWrapper">
|
editable && <div className="operateWrapper">
|
||||||
<i className="icon-coms-tianjia operateItem" onClick={() => { this.props.addItem() }} />
|
<i className="icon-coms-tianjia operateItem" onClick={() => {
|
||||||
|
this.props.addItem()
|
||||||
|
}} />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<Table columns={this.columns} dataSource={this.props.dataSource} {...this.props} />
|
<Table columns={this.columns} dataSource={this.props.dataSource} {...this.props} />
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,9 @@ export default class CustomForm extends React.Component {
|
||||||
<Col span={18}>
|
<Col span={18}>
|
||||||
{
|
{
|
||||||
item.conditionType == "INPUT" &&
|
item.conditionType == "INPUT" &&
|
||||||
<WeaInput value={request[item.domkey[0]]} disabled={disabledValue} onChange={(value) => {this.handleChange({[item.domkey[0]]: value})}}/>
|
<WeaInput value={request[item.domkey[0]]} disabled={disabledValue} onChange={(value) => {
|
||||||
|
this.handleChange({[item.domkey[0]]: value})
|
||||||
|
}}/>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,24 @@
|
||||||
.antd-wrap {
|
.antd-wrap {
|
||||||
|
.ant-table-scroll{
|
||||||
|
.ant-table-thead > tr > th {
|
||||||
|
border-right: 1px solid #e2e2e2 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
.ant-table-thead > tr > th {
|
.ant-table-thead > tr > th {
|
||||||
border-width: 1px !important;
|
border-width: 1px !important;
|
||||||
border-right: 1px solid #e2e2e2 !important;
|
|
||||||
padding: 0 5px !important;
|
padding: 0 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-table-bordered .ant-table-fixed-right {
|
.ant-table-bordered .ant-table-fixed-right {
|
||||||
top: 1px !important;
|
top: 1px !important;
|
||||||
|
right: 0 !important;
|
||||||
|
border-radius: 0!important;
|
||||||
|
.ant-table-thead > tr > th {
|
||||||
|
border-right: 1px solid #e2e2e2 !important;
|
||||||
|
}
|
||||||
|
.ant-table-tbody>tr>td:last-child{
|
||||||
|
border-right: 1px solid #e2e2e2 !important;
|
||||||
|
}
|
||||||
thead {
|
thead {
|
||||||
tr > th {
|
tr > th {
|
||||||
border-top: 1px solid #e2e2e2 !important;
|
border-top: 1px solid #e2e2e2 !important;
|
||||||
|
|
@ -18,6 +29,7 @@
|
||||||
.ant-table-bordered .ant-table-fixed-left {
|
.ant-table-bordered .ant-table-fixed-left {
|
||||||
top: 1px !important;
|
top: 1px !important;
|
||||||
left: 0 !important;
|
left: 0 !important;
|
||||||
|
border-radius: 0!important;
|
||||||
|
|
||||||
thead {
|
thead {
|
||||||
tr > th {
|
tr > th {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,9 @@ export default class GroupCard extends React.Component {
|
||||||
<div className="titleWrapper">
|
<div className="titleWrapper">
|
||||||
<span className="groupTitle">{this.props.title}</span>
|
<span className="groupTitle">{this.props.title}</span>
|
||||||
<div className="tipWrapper">{this.props.tips}</div>
|
<div className="tipWrapper">{this.props.tips}</div>
|
||||||
<div className="operateIconWrapper" onClick={() => {this.setState({showContent: !this.state.showContent})}}>
|
<div className="operateIconWrapper" onClick={() => {
|
||||||
|
this.setState({showContent: !this.state.showContent})
|
||||||
|
}}>
|
||||||
{
|
{
|
||||||
this.state.showContent ? <Icon type="down" /> : <Icon type="left" />
|
this.state.showContent ? <Icon type="down" /> : <Icon type="left" />
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,9 @@ export default class ImportModal extends React.Component {
|
||||||
templateLink={this.props.templateLink}
|
templateLink={this.props.templateLink}
|
||||||
headerSetCompoent={this.props.headerSetCompoent}
|
headerSetCompoent={this.props.headerSetCompoent}
|
||||||
formComponent={this.props.renderFormComponent && this.props.renderFormComponent()}
|
formComponent={this.props.renderFormComponent && this.props.renderFormComponent()}
|
||||||
onFileIdChange={(fileId) => {this.setState({fileId})}}
|
onFileIdChange={(fileId) => {
|
||||||
|
this.setState({fileId})
|
||||||
|
}}
|
||||||
onStep1Next={() => {
|
onStep1Next={() => {
|
||||||
this.handleStep1Next();
|
this.handleStep1Next();
|
||||||
}}/>)
|
}}/>)
|
||||||
|
|
@ -120,13 +122,17 @@ export default class ImportModal extends React.Component {
|
||||||
onStep2Next={() => {
|
onStep2Next={() => {
|
||||||
this.nextStep();
|
this.nextStep();
|
||||||
this.hanleImportData()
|
this.hanleImportData()
|
||||||
}} onStep2Pre={() => {this.preStep()}}/>)
|
}} onStep2Pre={() => {
|
||||||
|
this.preStep()
|
||||||
|
}}/>)
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
this.props.step == 2 && (<ModalStep3
|
this.props.step == 2 && (<ModalStep3
|
||||||
// onImportData={() => this.hanleImportData()}
|
// onImportData={() => this.hanleImportData()}
|
||||||
importResult={toJS(this.props.importResult)}
|
importResult={toJS(this.props.importResult)}
|
||||||
onFinish={() => {this.props.onFinish()}}/>)
|
onFinish={() => {
|
||||||
|
this.props.onFinish()
|
||||||
|
}}/>)
|
||||||
}
|
}
|
||||||
|
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,9 @@ export default class ModalStep1 extends React.Component {
|
||||||
(typeof this.props.templateLink) == "string" ?
|
(typeof this.props.templateLink) == "string" ?
|
||||||
<a href={`${this.props.templateLink}${downloadExtra}`}>点击这里下载模板</a>
|
<a href={`${this.props.templateLink}${downloadExtra}`}>点击这里下载模板</a>
|
||||||
:
|
:
|
||||||
<a onClick={() => {this.props.templateLink(hasData === '1' ? `true` : `false`)}}>点击这里下载模板</a>
|
<a onClick={() => {
|
||||||
|
this.props.templateLink(hasData === '1' ? `true` : `false`)
|
||||||
|
}}>点击这里下载模板</a>
|
||||||
}
|
}
|
||||||
|
|
||||||
{this.props.headerSetCompoent && this.props.headerSetCompoent };
|
{this.props.headerSetCompoent && this.props.headerSetCompoent };
|
||||||
|
|
|
||||||
|
|
@ -74,10 +74,14 @@ export default class SelectItemModal extends React.Component {
|
||||||
|
|
||||||
<div style={{marginTop: "40px", overflow:"hidden", height: "50px", lineHeight: "50px"}}>
|
<div style={{marginTop: "40px", overflow:"hidden", height: "50px", lineHeight: "50px"}}>
|
||||||
<div style={{float: "left"}}>
|
<div style={{float: "left"}}>
|
||||||
<WeaCheckbox content="只显示已选中字段" onChange={(value) => {this.handleShowChecked(value)}}/>
|
<WeaCheckbox content="只显示已选中字段" onChange={(value) => {
|
||||||
|
this.handleShowChecked(value)
|
||||||
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{float: "right"}}>
|
<div style={{float: "right"}}>
|
||||||
<Button type="primary" style={{marginRight: "10px"}} onClick={() => {this.props.onSave()}}>保存</Button>
|
<Button type="primary" style={{marginRight: "10px"}} onClick={() => {
|
||||||
|
this.props.onSave()
|
||||||
|
}}>保存</Button>
|
||||||
<Dropdown.Button overlay={menu}>更多</Dropdown.Button>
|
<Dropdown.Button overlay={menu}>更多</Dropdown.Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,9 @@ export default class SelectItemsWrapper extends React.Component {
|
||||||
handleAllChecked(value) {
|
handleAllChecked(value) {
|
||||||
value = value == 1 ? true : false
|
value = value == 1 ? true : false
|
||||||
let items = [...this.props.items]
|
let items = [...this.props.items]
|
||||||
items.map(item => { item.checked = value })
|
items.map(item => {
|
||||||
|
item.checked = value
|
||||||
|
})
|
||||||
this.setState({
|
this.setState({
|
||||||
checkStatus: value
|
checkStatus: value
|
||||||
})
|
})
|
||||||
|
|
@ -36,7 +38,9 @@ export default class SelectItemsWrapper extends React.Component {
|
||||||
return (
|
return (
|
||||||
<div style={{ margin: "10px 20px" }}>
|
<div style={{ margin: "10px 20px" }}>
|
||||||
<div style={{marginBottom: "10px", cursor: "pointer"}} >
|
<div style={{marginBottom: "10px", cursor: "pointer"}} >
|
||||||
<div style={{display: "inline-block"}}><WeaCheckbox content={<span style={{fontWeight: "600"}}>{this.props.title}</span>} onChange={(value) => {this.handleAllChecked(value)}} value={this.state.checkStatus}/></div>
|
<div style={{display: "inline-block"}}><WeaCheckbox content={<span style={{fontWeight: "600"}}>{this.props.title}</span>} onChange={(value) => {
|
||||||
|
this.handleAllChecked(value)
|
||||||
|
}} value={this.state.checkStatus}/></div>
|
||||||
<div style={{float: 'right', fontWeight: "600"}} onClick={() => this.setState({
|
<div style={{float: 'right', fontWeight: "600"}} onClick={() => this.setState({
|
||||||
showContent: !this.state.showContent
|
showContent: !this.state.showContent
|
||||||
})}>已选中{this.props.items ? this.props.items.filter(item => item.checked).length : 0}个字段
|
})}>已选中{this.props.items ? this.props.items.filter(item => item.checked).length : 0}个字段
|
||||||
|
|
@ -57,7 +61,9 @@ export default class SelectItemsWrapper extends React.Component {
|
||||||
<Row>
|
<Row>
|
||||||
{
|
{
|
||||||
this.props.items && this.props.items.map(item => (
|
this.props.items && this.props.items.map(item => (
|
||||||
<Col span={6}><WeaCheckbox content={item.name} value={item.checked} onChange={(value) => {this.handleItemChange(value, item)}}/></Col>
|
<Col span={6}><WeaCheckbox content={item.name} value={item.checked} onChange={(value) => {
|
||||||
|
this.handleItemChange(value, item)
|
||||||
|
}}/></Col>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,9 @@ export default class SelectedTab extends React.Component {
|
||||||
<div className="selectedTabWrapper">
|
<div className="selectedTabWrapper">
|
||||||
{
|
{
|
||||||
this.props.items.map(item => (
|
this.props.items.map(item => (
|
||||||
<div className={item.key == this.state.selectedKey ? "selectedTab selectedItem" : "selectedTab"} onClick={() => {this.handleChange(item)}}>
|
<div className={item.key == this.state.selectedKey ? "selectedTab selectedItem" : "selectedTab"} onClick={() => {
|
||||||
|
this.handleChange(item)
|
||||||
|
}}>
|
||||||
{item.name}
|
{item.name}
|
||||||
</div>
|
</div>
|
||||||
))
|
))
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,9 @@ export default class SmallTab extends React.Component {
|
||||||
<div className="smallTab">
|
<div className="smallTab">
|
||||||
{
|
{
|
||||||
this.props.items.map(item => (
|
this.props.items.map(item => (
|
||||||
<span className={selectedItem.title == item.title ? "tabItem tabItemSelected": "tabItem"} onClick={() => {this.setState({selectedItem: item}); this.props.onChange(item)}}>{item.title}</span>
|
<span className={selectedItem.title == item.title ? "tabItem tabItemSelected": "tabItem"} onClick={() => {
|
||||||
|
this.setState({selectedItem: item}); this.props.onChange(item)
|
||||||
|
}}>{item.title}</span>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,9 @@ export default class baseFormModal extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const { salaryMonthStr, salarySobId, description } = this.state;
|
const { salaryMonthStr, salarySobId, description } = this.state;
|
||||||
return (
|
return (
|
||||||
<Modal title="核算" visible={this.props.visible} width={600} onCancel={() => {this.props.onCancel()}}
|
<Modal title="核算" visible={this.props.visible} width={600} onCancel={() => {
|
||||||
|
this.props.onCancel()
|
||||||
|
}}
|
||||||
footer={<Button type="primary" onClick={() => {
|
footer={<Button type="primary" onClick={() => {
|
||||||
this.handleSave()
|
this.handleSave()
|
||||||
}}>保存</Button>}
|
}}>保存</Button>}
|
||||||
|
|
@ -84,9 +86,11 @@ export default class baseFormModal extends React.Component {
|
||||||
style={{width: "100%"}}
|
style={{width: "100%"}}
|
||||||
format="yyyy-MM"
|
format="yyyy-MM"
|
||||||
value={this.state.salaryMonthStr}
|
value={this.state.salaryMonthStr}
|
||||||
onChange={value => {this.setState({
|
onChange={value => {
|
||||||
|
this.setState({
|
||||||
salaryMonthStr: value
|
salaryMonthStr: value
|
||||||
})}}
|
})
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
||||||
|
|
@ -331,6 +331,7 @@ export default class Calculate extends React.Component {
|
||||||
<WeaInputSearch
|
<WeaInputSearch
|
||||||
style={{ marginLeft: "10px" }}
|
style={{ marginLeft: "10px" }}
|
||||||
value={this.state.searchValue}
|
value={this.state.searchValue}
|
||||||
|
placeholder={"请输入薪资账套名称"}
|
||||||
onChange={value => {
|
onChange={value => {
|
||||||
this.setState({ searchValue: value });
|
this.setState({ searchValue: value });
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -127,12 +127,20 @@ export default class AcctResultImportModal extends React.Component {
|
||||||
onFinish={() => {
|
onFinish={() => {
|
||||||
this.handleFinish()
|
this.handleFinish()
|
||||||
}}
|
}}
|
||||||
previewImport={(params) => {fetchPreviewAcctResult(params)}}
|
previewImport={(params) => {
|
||||||
importFile={(params) => {fetchImportAcctResult(params)}}
|
fetchPreviewAcctResult(params)
|
||||||
templateLink={ () => { this.handleAccResultTemplateLink()}}
|
}}
|
||||||
|
importFile={(params) => {
|
||||||
|
fetchImportAcctResult(params)
|
||||||
|
}}
|
||||||
|
templateLink={ () => {
|
||||||
|
this.handleAccResultTemplateLink()
|
||||||
|
}}
|
||||||
renderFormComponent={() => this.renderFormComponent()}
|
renderFormComponent={() => this.renderFormComponent()}
|
||||||
visiable={visiable}
|
visiable={visiable}
|
||||||
onCancel={() => { this.props.onCancel() }}
|
onCancel={() => {
|
||||||
|
this.props.onCancel()
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -109,16 +109,22 @@ export default class SelectFieldModal extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const { fieldData } = this.state;
|
const { fieldData } = this.state;
|
||||||
return (
|
return (
|
||||||
<Modal visible={this.props.visible} width={800} onCancel={() =>{this.props.onCancel()}}
|
<Modal visible={this.props.visible} width={800} onCancel={() =>{
|
||||||
|
this.props.onCancel()
|
||||||
|
}}
|
||||||
footer={null}
|
footer={null}
|
||||||
>
|
>
|
||||||
<div style={{height: "50px", lineHeight: "50px"}}>
|
<div style={{height: "50px", lineHeight: "50px"}}>
|
||||||
<span style={{fontSize: "14px", fontWeight: "600"}}>添加表头字段</span>
|
<span style={{fontSize: "14px", fontWeight: "600"}}>添加表头字段</span>
|
||||||
<Button type="primary" style={{float: "right", marginRight: "50px"}} onClick={() => {this.handleAddClick()}}>添加</Button>
|
<Button type="primary" style={{float: "right", marginRight: "50px"}} onClick={() => {
|
||||||
|
this.handleAddClick()
|
||||||
|
}}>添加</Button>
|
||||||
</div>
|
</div>
|
||||||
<div style={{marginTop: "20px"}}>
|
<div style={{marginTop: "20px"}}>
|
||||||
<div style={{height: "40px", lineHeight: "40px"}}>
|
<div style={{height: "40px", lineHeight: "40px"}}>
|
||||||
<WeaCheckbox content="公式项" onChange={(value) => {this.handleTitleCheckboxChange(value, "formula")}}/>
|
<WeaCheckbox content="公式项" onChange={(value) => {
|
||||||
|
this.handleTitleCheckboxChange(value, "formula")
|
||||||
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{height: "100px", border: "1px solid #f2f2f2", margin: "10px", padding: "10px", overflowY: 'scroll'}}>
|
<div style={{height: "100px", border: "1px solid #f2f2f2", margin: "10px", padding: "10px", overflowY: 'scroll'}}>
|
||||||
<Row>
|
<Row>
|
||||||
|
|
@ -133,7 +139,9 @@ export default class SelectFieldModal extends React.Component {
|
||||||
|
|
||||||
<div style={{marginTop: "20px"}}>
|
<div style={{marginTop: "20px"}}>
|
||||||
<div style={{height: "50px", lineHeight: "50px"}}>
|
<div style={{height: "50px", lineHeight: "50px"}}>
|
||||||
<WeaCheckbox content="输入项" onChange={(value) => {this.handleTitleCheckboxChange(value, "input")}}/>
|
<WeaCheckbox content="输入项" onChange={(value) => {
|
||||||
|
this.handleTitleCheckboxChange(value, "input")
|
||||||
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{height: "100px", border: "1px solid #f2f2f2", margin: "10px", padding: "10px", overflowY: "scroll"}}>
|
<div style={{height: "100px", border: "1px solid #f2f2f2", margin: "10px", padding: "10px", overflowY: "scroll"}}>
|
||||||
<Row>
|
<Row>
|
||||||
|
|
@ -147,7 +155,9 @@ export default class SelectFieldModal extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{marginTop: "20px"}}>
|
<div style={{marginTop: "20px"}}>
|
||||||
<WeaCheckbox content="只显示已选中" onChange={(value) => {this.showSelectedChange(value)}}/>
|
<WeaCheckbox content="只显示已选中" onChange={(value) => {
|
||||||
|
this.showSelectedChange(value)
|
||||||
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -175,9 +175,13 @@ export default class CompareDetail extends React.Component {
|
||||||
<div style={{display: "inline-block"}}>
|
<div style={{display: "inline-block"}}>
|
||||||
<Button type="primary" style={{marginRight: "10px"}} onClick={() => this.handleImportClick()} >导入</Button>
|
<Button type="primary" style={{marginRight: "10px"}} onClick={() => this.handleImportClick()} >导入</Button>
|
||||||
<Button type="default" style={{marginRight: "10px"}} onClick={() => this.handleExportClick()}>导出</Button>
|
<Button type="default" style={{marginRight: "10px"}} onClick={() => this.handleExportClick()}>导出</Button>
|
||||||
<WeaInputSearch value={searchValue} onChange={(value) => {this.setState({
|
<WeaInputSearch value={searchValue} onChange={(value) => {
|
||||||
|
this.setState({
|
||||||
searchValue: value
|
searchValue: value
|
||||||
})}} onSearch={(value) => {this.handleSearch(value)}}/>
|
})
|
||||||
|
}} onSearch={(value) => {
|
||||||
|
this.handleSearch(value)
|
||||||
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,11 +64,19 @@ export default class CompareDetailImportModal extends React.Component {
|
||||||
this.props.onCancel();
|
this.props.onCancel();
|
||||||
this.props.onFinish();
|
this.props.onFinish();
|
||||||
}}
|
}}
|
||||||
previewImport={(params) => {previewComparisonResult(params)}}
|
previewImport={(params) => {
|
||||||
importFile={(params) => {importComparisonExcelAcctResult(params)}}
|
previewComparisonResult(params)
|
||||||
templateLink={ () => { this.handleTemplateLink()}}
|
}}
|
||||||
|
importFile={(params) => {
|
||||||
|
importComparisonExcelAcctResult(params)
|
||||||
|
}}
|
||||||
|
templateLink={ () => {
|
||||||
|
this.handleTemplateLink()
|
||||||
|
}}
|
||||||
visiable={visiable}
|
visiable={visiable}
|
||||||
onCancel={() => { this.props.onCancel() }}
|
onCancel={() => {
|
||||||
|
this.props.onCancel()
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,27 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import UserSure from "./userSure";
|
import UserSure from "./userSure";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import CustomTab from "../../components/customTab";
|
|
||||||
import SalaryDetail from "./salaryDetail";
|
import SalaryDetail from "./salaryDetail";
|
||||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||||
import { WeaInputSearch } from "ecCom";
|
import { WeaBrowser, WeaCheckbox, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom";
|
||||||
import { getQueryString } from "../../util/url";
|
import { getQueryString } from "../../util/url";
|
||||||
import AcctResultImportModal from "./acctResult/importModal/acctResultImportModal";
|
import AcctResultImportModal from "./acctResult/importModal/acctResultImportModal";
|
||||||
import ProgressModal from "../../components/progressModal";
|
import ProgressModal from "../../components/progressModal";
|
||||||
|
|
||||||
@inject("calculateStore")
|
@inject("calculateStore", "salaryFileStore")
|
||||||
@observer
|
@observer
|
||||||
export default class CalculateDetail extends React.Component {
|
export default class CalculateDetail extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
|
showSearchAd: false,
|
||||||
|
searchItemsValue: {
|
||||||
|
employeeName: "",
|
||||||
|
departmentIds: "",
|
||||||
|
positionIds: "",
|
||||||
|
status: "",
|
||||||
|
consolidatedTaxation: "0"
|
||||||
|
},
|
||||||
selectedKey: "0",
|
selectedKey: "0",
|
||||||
fieldData: {},
|
fieldData: {},
|
||||||
acctResultImportVisiable: false,
|
acctResultImportVisiable: false,
|
||||||
|
|
@ -28,12 +35,94 @@ export default class CalculateDetail extends React.Component {
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
let id = getQueryString("id");
|
let id = getQueryString("id");
|
||||||
this.id = id;
|
this.id = id;
|
||||||
const { calculateStore: { checkTaxAgent } } = this.props;
|
const { calculateStore: { checkTaxAgent }, salaryFileStore } = this.props;
|
||||||
|
const { commonEnumList } = salaryFileStore;
|
||||||
checkTaxAgent(this.id);
|
checkTaxAgent(this.id);
|
||||||
let modalParam = { ...this.state.modalParam, salaryAcctRecordId: id };
|
let modalParam = { ...this.state.modalParam, salaryAcctRecordId: id };
|
||||||
this.setState({ modalParam });
|
this.setState({ modalParam });
|
||||||
|
commonEnumList("user", { enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Input = (value, key) => {
|
||||||
|
const { employeeName } = this.state.searchItemsValue;
|
||||||
|
return (
|
||||||
|
<WeaFormItem
|
||||||
|
label={value}
|
||||||
|
labelCol={{ span: 6 }}
|
||||||
|
wrapperCol={{ span: 18 }}
|
||||||
|
>
|
||||||
|
<WeaInput value={employeeName} onChange={(val) => this.setState({
|
||||||
|
searchItemsValue: {
|
||||||
|
...this.state.searchItemsValue,
|
||||||
|
[key]: val
|
||||||
|
}
|
||||||
|
})}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
Browser = (value, key) => {
|
||||||
|
const { positionIds, departmentIds } = this.state.searchItemsValue;
|
||||||
|
return (
|
||||||
|
<WeaFormItem
|
||||||
|
label={value}
|
||||||
|
labelCol={{ span: 6 }}
|
||||||
|
wrapperCol={{ span: 18 }}
|
||||||
|
>
|
||||||
|
<WeaBrowser
|
||||||
|
isSingle={false}
|
||||||
|
value={key === "departmentIds" ? departmentIds : positionIds}
|
||||||
|
tabs={key === "departmentIds" ? [
|
||||||
|
{
|
||||||
|
dataParams: { list: "1" },
|
||||||
|
isSearch: true,
|
||||||
|
key: "1",
|
||||||
|
name: "按列表",
|
||||||
|
selected: false,
|
||||||
|
showOrder: 0
|
||||||
|
}
|
||||||
|
] : null}
|
||||||
|
type={key === "departmentIds" ? 57 : 278}
|
||||||
|
onChange={(val) => {
|
||||||
|
this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } });
|
||||||
|
}}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
Select = (value, key) => {
|
||||||
|
const { salaryFileStore } = this.props;
|
||||||
|
const { status } = this.state.searchItemsValue;
|
||||||
|
const { userStatusList } = salaryFileStore;
|
||||||
|
return (
|
||||||
|
<WeaFormItem
|
||||||
|
label={value}
|
||||||
|
labelCol={{ span: 6 }}
|
||||||
|
wrapperCol={{ span: 18 }}
|
||||||
|
>
|
||||||
|
<WeaSelect
|
||||||
|
value={status}
|
||||||
|
options={userStatusList}
|
||||||
|
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
Checkbox = (value, key) => {
|
||||||
|
const { consolidatedTaxation } = this.state.searchItemsValue;
|
||||||
|
return (
|
||||||
|
<WeaFormItem
|
||||||
|
label={value}
|
||||||
|
labelCol={{ span: 6 }}
|
||||||
|
wrapperCol={{ span: 18 }}
|
||||||
|
>
|
||||||
|
<WeaCheckbox value={consolidatedTaxation} content="是" onChange={(val) => this.setState({
|
||||||
|
searchItemsValue: {
|
||||||
|
...this.state.searchItemsValue,
|
||||||
|
[key]: val
|
||||||
|
}
|
||||||
|
})}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
// 核算点击事件
|
// 核算点击事件
|
||||||
handleAccount() {
|
handleAccount() {
|
||||||
const { calculateStore } = this.props;
|
const { calculateStore } = this.props;
|
||||||
|
|
@ -64,7 +153,7 @@ export default class CalculateDetail extends React.Component {
|
||||||
progressVisible: false
|
progressVisible: false
|
||||||
});
|
});
|
||||||
message.success("核算完成");
|
message.success("核算完成");
|
||||||
acctResultList(this.id);
|
acctResultList({ salaryAcctRecordId: this.id });
|
||||||
} else if (!data.status) {
|
} else if (!data.status) {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
this.timer = null;
|
this.timer = null;
|
||||||
|
|
@ -109,9 +198,9 @@ export default class CalculateDetail extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 核算结果搜索
|
// 核算结果搜索
|
||||||
handleSearch(value) {
|
handleSearch(params) {
|
||||||
const { calculateStore: { acctResultList } } = this.props;
|
const { calculateStore: { acctResultList } } = this.props;
|
||||||
acctResultList(this.id, value);
|
acctResultList({ salaryAcctRecordId: this.id, ...params });
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
|
@ -122,7 +211,7 @@ export default class CalculateDetail extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { selectedKey, modalParam, acctResultImportVisiable } = this.state;
|
const { selectedKey, modalParam, acctResultImportVisiable, showSearchAd } = this.state;
|
||||||
const { calculateStore } = this.props;
|
const { calculateStore } = this.props;
|
||||||
const { calculateProgress } = calculateStore;
|
const { calculateProgress } = calculateStore;
|
||||||
|
|
||||||
|
|
@ -135,31 +224,17 @@ export default class CalculateDetail extends React.Component {
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderRightOperation = () => {
|
const renderRightOperation = () => {
|
||||||
if (selectedKey == "1") {
|
return [
|
||||||
return (
|
<Button
|
||||||
<div style={{ display: "inline-block" }}>
|
type="primary"
|
||||||
<Button
|
style={{ marginRight: "10px" }}
|
||||||
type="primary"
|
onClick={() => this.handleAccount()}>
|
||||||
style={{ marginRight: "10px" }}
|
核算
|
||||||
onClick={() => this.handleAccount()}>
|
</Button>,
|
||||||
核算
|
<Dropdown.Button style={{ marginRight: "10px" }} overlay={menu}>
|
||||||
</Button>
|
更多
|
||||||
{/* <Button type="default" style={{marginRight: "10px"}} onClick={() => this.setState({stepSlideVisible: true})}>校验</Button> */}
|
</Dropdown.Button>
|
||||||
<Dropdown.Button style={{ marginRight: "10px" }} overlay={menu}>
|
];
|
||||||
更多
|
|
||||||
</Dropdown.Button>
|
|
||||||
<WeaInputSearch
|
|
||||||
value={this.state.searchValue}
|
|
||||||
onChange={value => {
|
|
||||||
this.setState({ searchValue: value });
|
|
||||||
}}
|
|
||||||
onSearch={value => {
|
|
||||||
this.handleSearch(value);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const topTab = [
|
const topTab = [
|
||||||
|
|
@ -173,14 +248,66 @@ export default class CalculateDetail extends React.Component {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const adBtn = [
|
||||||
|
// 高级搜索内部按钮
|
||||||
|
<Button type="primary" onClick={() => {
|
||||||
|
this.setState({ showSearchAd: false }, () => {
|
||||||
|
this.handleSearch(this.state.searchItemsValue);
|
||||||
|
});
|
||||||
|
}}>
|
||||||
|
搜索
|
||||||
|
</Button>,
|
||||||
|
<Button type="ghost" onClick={() => this.setState({
|
||||||
|
searchItemsValue: {
|
||||||
|
employeeName: "",
|
||||||
|
departmentIds: "",
|
||||||
|
positionIds: "",
|
||||||
|
status: "",
|
||||||
|
consolidatedTaxation: "0"
|
||||||
|
}
|
||||||
|
})}>
|
||||||
|
重置
|
||||||
|
</Button>,
|
||||||
|
<Button type="ghost" onClick={() => this.setState({ showSearchAd: false })}>
|
||||||
|
取消
|
||||||
|
</Button>
|
||||||
|
];
|
||||||
|
|
||||||
|
const renderSearch = () => {
|
||||||
|
const searchItems = [
|
||||||
|
{ com: this.Input("姓名", "employeeName") },
|
||||||
|
{ com: this.Browser("部门", "departmentIds") },
|
||||||
|
{ com: this.Browser("岗位", "positionIds") },
|
||||||
|
{ com: this.Select("状态", "status") },
|
||||||
|
{ com: this.Checkbox("合并计税", "consolidatedTaxation") }
|
||||||
|
];
|
||||||
|
return <WeaSearchGroup title={"基本信息"} items={searchItems} showGroup/>;
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ overflowY: "hidden", height: "100%" }}>
|
<div style={{ overflowY: "hidden", height: "100%" }}>
|
||||||
<CustomTab
|
<WeaTab
|
||||||
topTab={topTab}
|
datas={topTab}
|
||||||
searchOperationItem={renderRightOperation()}
|
selectedKey={selectedKey}
|
||||||
onChange={v => {
|
keyParam="viewcondition"
|
||||||
this.setState({ selectedKey: v });
|
onChange={v => this.setState({ selectedKey: v })}
|
||||||
}}
|
searchType={selectedKey == 1 ? ["base", "advanced"] : []} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||||
|
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||||
|
setShowSearchAd={(bool) => this.setState({ showSearchAd: bool })} //高级搜索面板受控
|
||||||
|
searchsAd={renderSearch()} // 高级搜索内部数据getSearchs(form, toJS(condition), 2)
|
||||||
|
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||||
|
onSearch={() => this.handleSearch(this.state.searchItemsValue)} // 点搜索按钮时的回调
|
||||||
|
buttons={selectedKey == 1 ? renderRightOperation() : []}
|
||||||
|
searchsBasePlaceHolder={"请输入姓名"}
|
||||||
|
onSearchChange={(v) =>
|
||||||
|
this.setState({
|
||||||
|
searchItemsValue: {
|
||||||
|
...this.state.searchItemsValue,
|
||||||
|
employeeName: v
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值form.updateFields({ username: v })
|
||||||
|
searchsBaseValue={this.state.searchItemsValue.employeeName} // 外部input搜索值受控: 这里和高级搜索的requestname同步form.getFormParams().username
|
||||||
/>
|
/>
|
||||||
{selectedKey == 0 && <UserSure/>}
|
{selectedKey == 0 && <UserSure/>}
|
||||||
{selectedKey == 1 &&
|
{selectedKey == 1 &&
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.operateBarWrapper {
|
.operateBarWrapper {
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
line-height: 47px;
|
|
||||||
height: 47px;
|
height: 47px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
.crumbsWrapper {
|
.crumbsWrapper {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
@ -30,17 +31,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.crumbsOperateWrapper {
|
.crumbsOperateWrapper {
|
||||||
float: right;
|
flex: 1;
|
||||||
display: inline-block;
|
.wea-advanced-search{
|
||||||
|
right: 0!important;
|
||||||
.headerIcon {
|
}
|
||||||
display: inline-block;
|
.wea-advanced-searchsAd{
|
||||||
|
height: inherit!important;
|
||||||
.iconItem {
|
}
|
||||||
margin-right: 15px;
|
.wea-search-tab{
|
||||||
|
padding-right: 0;
|
||||||
|
.iconItem{
|
||||||
color: #2db7f5;
|
color: #2db7f5;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 16px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -57,7 +59,6 @@
|
||||||
line-height: 47px;
|
line-height: 47px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
|
|
||||||
.warningspan {
|
.warningspan {
|
||||||
float: right;
|
float: right;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,9 @@ export default class PlaceOnFileDetail extends React.Component {
|
||||||
placeOnFileColumns.map(item => {
|
placeOnFileColumns.map(item => {
|
||||||
if(item.dataIndex == "username") {
|
if(item.dataIndex == "username") {
|
||||||
item.render = (text, record) => (
|
item.render = (text, record) => (
|
||||||
<a onClick={() => {this.onDetail()}}>{text}</a>
|
<a onClick={() => {
|
||||||
|
this.onDetail()
|
||||||
|
}}>{text}</a>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -71,7 +73,9 @@ export default class PlaceOnFileDetail extends React.Component {
|
||||||
title: '操作',
|
title: '操作',
|
||||||
key: "cz",
|
key: "cz",
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return <a onClick={() => {this.handleEdit(record)}}>编辑</a>
|
return <a onClick={() => {
|
||||||
|
this.handleEdit(record)
|
||||||
|
}}>编辑</a>
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return columns;
|
return columns;
|
||||||
|
|
@ -138,8 +142,14 @@ export default class PlaceOnFileDetail extends React.Component {
|
||||||
const renderRightOperation = () => {
|
const renderRightOperation = () => {
|
||||||
return (
|
return (
|
||||||
<div style={{display: "inline-block"}}>
|
<div style={{display: "inline-block"}}>
|
||||||
<Dropdown.Button type="primary" style={{marginRight: "10px"}} onClick={() => {this.handleExportAll()}} overlay={menu}>导出全部</Dropdown.Button>
|
<Dropdown.Button type="primary" style={{marginRight: "10px"}} onClick={() => {
|
||||||
<WeaInputSearch onChange={(value) => {this.setState({searchValue: value})}} value={this.state.searchValue} onSearch={(value) => {this.handleSearch(value)}}/>
|
this.handleExportAll()
|
||||||
|
}} overlay={menu}>导出全部</Dropdown.Button>
|
||||||
|
<WeaInputSearch onChange={(value) => {
|
||||||
|
this.setState({searchValue: value})
|
||||||
|
}} value={this.state.searchValue} onSearch={(value) => {
|
||||||
|
this.handleSearch(value)
|
||||||
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import EditSalaryDetail from "./editSalaryDetail";
|
||||||
import SlideModalTitle from "../../components/slideModalTitle";
|
import SlideModalTitle from "../../components/slideModalTitle";
|
||||||
import { getQueryString } from "../../util/url";
|
import { getQueryString } from "../../util/url";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from 'mobx';
|
||||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||||
|
|
||||||
@inject("calculateStore", "taxAgentStore")
|
@inject("calculateStore", "taxAgentStore")
|
||||||
|
|
@ -15,6 +16,7 @@ export default class SalaryDetail extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
|
columnIndex:"",
|
||||||
visible: false,
|
visible: false,
|
||||||
slideVisiable: false,
|
slideVisiable: false,
|
||||||
columns: salaryDetailColumns.map(item => {
|
columns: salaryDetailColumns.map(item => {
|
||||||
|
|
@ -38,7 +40,7 @@ export default class SalaryDetail extends React.Component {
|
||||||
let id = getQueryString("id");
|
let id = getQueryString("id");
|
||||||
this.id = id;
|
this.id = id;
|
||||||
const { calculateStore: { acctResultList, getSalarySobCycle } } = this.props;
|
const { calculateStore: { acctResultList, getSalarySobCycle } } = this.props;
|
||||||
acctResultList(id);
|
acctResultList({ salaryAcctRecordId: id });
|
||||||
getSalarySobCycle(id);
|
getSalarySobCycle(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,14 +64,14 @@ export default class SalaryDetail extends React.Component {
|
||||||
let columns = acctResultListColumns ? [...acctResultListColumns] : [];
|
let columns = acctResultListColumns ? [...acctResultListColumns] : [];
|
||||||
columns = columns.filter(item => item.hide == "FALSE").map(item => {
|
columns = columns.filter(item => item.hide == "FALSE").map(item => {
|
||||||
let result = { ...item };
|
let result = { ...item };
|
||||||
result.title = item.text;
|
result.title = <span onClick={()=>this.setState({columnIndex: item.column})}>{item.text}</span>;;
|
||||||
result.dataIndex = item.column;
|
result.dataIndex = item.column;
|
||||||
result.oldWidth = result.width;
|
result.oldWidth = result.width;
|
||||||
result.width = "150px";
|
result.width = "150px";
|
||||||
if (result.children) {
|
if (result.children) {
|
||||||
result.width = (result.children.length * 150) + "px";
|
result.width = (result.children.length * 150) + "px";
|
||||||
result.children.map(child => {
|
result.children.map(child => {
|
||||||
child.title = child.text;
|
child.title = <span onClick={()=>this.setState({columnIndex: child.column})}>{child.text}</span>;
|
||||||
child.dataIndex = child.column;
|
child.dataIndex = child.column;
|
||||||
child.width = "150px";
|
child.width = "150px";
|
||||||
});
|
});
|
||||||
|
|
@ -114,31 +116,33 @@ export default class SalaryDetail extends React.Component {
|
||||||
slideVisiable: false
|
slideVisiable: false
|
||||||
});
|
});
|
||||||
saveAcctResult(this.recordId).then(() => {
|
saveAcctResult(this.recordId).then(() => {
|
||||||
acctResultList(this.id);
|
acctResultList({ salaryAcctRecordId: this.id });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 分页
|
// 分页
|
||||||
handleDataPageChange(value) {
|
handleDataPageChange(current) {
|
||||||
const { calculateStore: { acctResultList } } = this.props;
|
const { calculateStore: { acctResultList } } = this.props;
|
||||||
acctResultList(this.id, this.props.employeeName, value, this.pageInfo);
|
acctResultList({ salaryAcctRecordId: this.id, employeeName: this.props.employeeName, ...this.pageInfo, current });
|
||||||
}
|
}
|
||||||
|
|
||||||
handleShowSizeChange(pageInfo) {
|
handleShowSizeChange(pageInfo) {
|
||||||
const { calculateStore: { acctResultList } } = this.props;
|
const { calculateStore: { acctResultList } } = this.props;
|
||||||
acctResultList(this.id, this.props.employeeName, pageInfo.current, pageInfo);
|
acctResultList({ salaryAcctRecordId: this.id, employeeName: this.props.employeeName, ...pageInfo });
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { slideVisiable } = this.state;
|
const { slideVisiable, columnIndex } = this.state;
|
||||||
const { calculateStore, taxAgentStore: { showOperateBtn } } = this.props;
|
const { calculateStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const {
|
const {
|
||||||
acctResultListDateSource,
|
acctResultListDateSource,
|
||||||
acctResultListColumns,
|
acctResultListColumns,
|
||||||
baseSalarySobCycle,
|
baseSalarySobCycle,
|
||||||
acctResultListPageInfo,
|
acctResultListPageInfo,
|
||||||
loading
|
loading,
|
||||||
|
columnDescList
|
||||||
} = calculateStore;
|
} = calculateStore;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="salaryDetail">
|
<div className="salaryDetail">
|
||||||
<div className="salaryBarWrapper">
|
<div className="salaryBarWrapper">
|
||||||
|
|
@ -160,6 +164,10 @@ export default class SalaryDetail extends React.Component {
|
||||||
this.setState({ visible: true });
|
this.setState({ visible: true });
|
||||||
}}>校验异常:0</span>
|
}}>校验异常:0</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="salaryBarWrapper" style={{ borderBottom: "1px solid #eee" }}>
|
||||||
|
<span>公式=</span>
|
||||||
|
<span>{toJS(columnDescList)[columnIndex] && toJS(columnDescList)[columnIndex].formulaContent}</span>
|
||||||
|
</div>
|
||||||
<div className="tableWrapper">
|
<div className="tableWrapper">
|
||||||
<CustomPaginationTable
|
<CustomPaginationTable
|
||||||
loading={loading}
|
loading={loading}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,24 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Col, Icon, message, Modal, Row } from "antd";
|
import { Button, Col, Icon, message, Modal, Row } from "antd";
|
||||||
import { WeaBrowser, WeaHelpfulTip, WeaInputSearch } from "ecCom";
|
import { WeaBrowser, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
import { getQueryString } from "../../util/url";
|
import { getQueryString } from "../../util/url";
|
||||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||||
|
|
||||||
@inject("calculateStore")
|
@inject("calculateStore", "salaryFileStore")
|
||||||
@observer
|
@observer
|
||||||
export default class UserSure extends React.Component {
|
export default class UserSure extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
|
showSearchAd: false,
|
||||||
|
searchItemsValue: {
|
||||||
|
employeeName: "",
|
||||||
|
departmentIds: "",
|
||||||
|
positionIds: "",
|
||||||
|
status: "",
|
||||||
|
},
|
||||||
selectedKey: "0",
|
selectedKey: "0",
|
||||||
selectedRowKeys: [], // table 选中项
|
selectedRowKeys: [], // table 选中项
|
||||||
userListSearchValue: ""
|
userListSearchValue: ""
|
||||||
|
|
@ -47,6 +54,69 @@ export default class UserSure extends React.Component {
|
||||||
getSalarySobCycle(id);
|
getSalarySobCycle(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Input = (value, key) => {
|
||||||
|
const { employeeName } = this.state.searchItemsValue;
|
||||||
|
return (
|
||||||
|
<WeaFormItem
|
||||||
|
label={value}
|
||||||
|
labelCol={{ span: 6 }}
|
||||||
|
wrapperCol={{ span: 18 }}
|
||||||
|
>
|
||||||
|
<WeaInput value={employeeName} onChange={(val) => this.setState({
|
||||||
|
searchItemsValue: {
|
||||||
|
...this.state.searchItemsValue,
|
||||||
|
[key]: val
|
||||||
|
}
|
||||||
|
})}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
Browser = (value, key) => {
|
||||||
|
const { positionIds, departmentIds } = this.state.searchItemsValue;
|
||||||
|
return (
|
||||||
|
<WeaFormItem
|
||||||
|
label={value}
|
||||||
|
labelCol={{ span: 6 }}
|
||||||
|
wrapperCol={{ span: 18 }}
|
||||||
|
>
|
||||||
|
<WeaBrowser
|
||||||
|
isSingle={false}
|
||||||
|
value={key === "departmentIds" ? departmentIds : positionIds}
|
||||||
|
tabs={key === "departmentIds" ? [
|
||||||
|
{
|
||||||
|
dataParams: { list: "1" },
|
||||||
|
isSearch: true,
|
||||||
|
key: "1",
|
||||||
|
name: "按列表",
|
||||||
|
selected: false,
|
||||||
|
showOrder: 0
|
||||||
|
}
|
||||||
|
] : null}
|
||||||
|
type={key === "departmentIds" ? 57 : 278}
|
||||||
|
onChange={(val) => {
|
||||||
|
this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } });
|
||||||
|
}}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
Select = (value, key) => {
|
||||||
|
const { salaryFileStore } = this.props;
|
||||||
|
const { status } = this.state.searchItemsValue;
|
||||||
|
const { userStatusList } = salaryFileStore;
|
||||||
|
return (
|
||||||
|
<WeaFormItem
|
||||||
|
label={value}
|
||||||
|
labelCol={{ span: 6 }}
|
||||||
|
wrapperCol={{ span: 18 }}
|
||||||
|
>
|
||||||
|
<WeaSelect
|
||||||
|
value={status}
|
||||||
|
options={userStatusList}
|
||||||
|
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
// 添加人员回调
|
// 添加人员回调
|
||||||
handleUserBrowserChange(ids) {
|
handleUserBrowserChange(ids) {
|
||||||
if (ids && ids.length > 0) {
|
if (ids && ids.length > 0) {
|
||||||
|
|
@ -251,7 +321,7 @@ export default class UserSure extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 搜索
|
// 搜索
|
||||||
handleUserListSearch(value) {
|
handleUserListSearch=(value)=> {
|
||||||
const {
|
const {
|
||||||
calculateStore: { acctemployeeList, reducedemployeeList }
|
calculateStore: { acctemployeeList, reducedemployeeList }
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
@ -259,14 +329,14 @@ export default class UserSure extends React.Component {
|
||||||
if (this.state.selectedKey == 0) {
|
if (this.state.selectedKey == 0) {
|
||||||
acctemployeeList({
|
acctemployeeList({
|
||||||
salaryAcctRecordId: this.id,
|
salaryAcctRecordId: this.id,
|
||||||
employeeName: value,
|
...value,
|
||||||
...this.pageInfo
|
...this.pageInfo
|
||||||
});
|
});
|
||||||
this.current = 1;
|
this.current = 1;
|
||||||
} else {
|
} else {
|
||||||
reducedemployeeList({
|
reducedemployeeList({
|
||||||
salaryAcctRecordId: this.id,
|
salaryAcctRecordId: this.id,
|
||||||
employeeName: value,
|
...value,
|
||||||
...this.pageInfo
|
...this.pageInfo
|
||||||
});
|
});
|
||||||
this.current = 1;
|
this.current = 1;
|
||||||
|
|
@ -274,7 +344,7 @@ export default class UserSure extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { selectedRowKeys } = this.state;
|
const { selectedRowKeys, showSearchAd, selectedKey } = this.state;
|
||||||
const { calculateStore } = this.props;
|
const { calculateStore } = this.props;
|
||||||
const {
|
const {
|
||||||
calculateBaseForm,
|
calculateBaseForm,
|
||||||
|
|
@ -293,6 +363,40 @@ export default class UserSure extends React.Component {
|
||||||
onChange: this.onSelectChange
|
onChange: this.onSelectChange
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const adBtn = [
|
||||||
|
// 高级搜索内部按钮
|
||||||
|
<Button type="primary" onClick={() => {
|
||||||
|
this.setState({ showSearchAd: false }, () => {
|
||||||
|
this.handleUserListSearch(this.state.searchItemsValue);
|
||||||
|
});
|
||||||
|
}}>
|
||||||
|
搜索
|
||||||
|
</Button>,
|
||||||
|
<Button type="ghost" onClick={() => this.setState({
|
||||||
|
searchItemsValue: {
|
||||||
|
employeeName: "",
|
||||||
|
departmentIds: "",
|
||||||
|
positionIds: "",
|
||||||
|
status: "",
|
||||||
|
}
|
||||||
|
})}>
|
||||||
|
重置
|
||||||
|
</Button>,
|
||||||
|
<Button type="ghost" onClick={() => this.setState({ showSearchAd: false })}>
|
||||||
|
取消
|
||||||
|
</Button>
|
||||||
|
];
|
||||||
|
|
||||||
|
const renderSearch = () => {
|
||||||
|
const searchItems = [
|
||||||
|
{ com: this.Input("姓名", "employeeName") },
|
||||||
|
{ com: this.Browser("部门", "departmentIds") },
|
||||||
|
{ com: this.Browser("岗位", "positionIds") },
|
||||||
|
{ com: this.Select("状态", "status") }
|
||||||
|
];
|
||||||
|
return <WeaSearchGroup title={"基本信息"} items={searchItems} showGroup/>;
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="userSure">
|
<div className="userSure">
|
||||||
<div className="baseInfo">基本信息</div>
|
<div className="baseInfo">基本信息</div>
|
||||||
|
|
@ -350,91 +454,150 @@ export default class UserSure extends React.Component {
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
<div className="operateBarWrapper">
|
<div className="operateBarWrapper">
|
||||||
<div>
|
<div className="crumbsWrapper">
|
||||||
<div className="crumbsWrapper">
|
<span
|
||||||
<span
|
className={
|
||||||
className={
|
this.state.selectedKey == "0"
|
||||||
this.state.selectedKey == "0"
|
? "crumbItem crumbItemSelected"
|
||||||
? "crumbItem crumbItemSelected"
|
: "crumbItem"
|
||||||
: "crumbItem"
|
}
|
||||||
}
|
onClick={() => {
|
||||||
onClick={() => {
|
this.setState({ selectedKey: "0" });
|
||||||
this.setState({ selectedKey: "0" });
|
}}>
|
||||||
}}>
|
核算人员范围
|
||||||
核算人员范围
|
</span>
|
||||||
</span>
|
<WeaHelpfulTip
|
||||||
<WeaHelpfulTip
|
width={200}
|
||||||
width={200}
|
title="核算完若薪资档案中个税扣缴义务人发生调整,需先刷新【核算人员范围】再到【薪资核算】中重新核算"
|
||||||
title="核算完若薪资档案中个税扣缴义务人发生调整,需先刷新【核算人员范围】再到【薪资核算】中重新核算"
|
placement="topLeft"
|
||||||
placement="topLeft"
|
/>
|
||||||
/>
|
<span style={{ margin: "0 8px" }}>|</span>
|
||||||
{" "}|{" "}
|
<span
|
||||||
<span
|
className={
|
||||||
className={
|
this.state.selectedKey == "1"
|
||||||
this.state.selectedKey == "1"
|
? "crumbItem crumbItemSelected"
|
||||||
? "crumbItem crumbItemSelected"
|
: "crumbItem"
|
||||||
: "crumbItem"
|
}
|
||||||
}
|
onClick={() => {
|
||||||
onClick={() => {
|
this.setState({ selectedKey: "1" });
|
||||||
this.setState({ selectedKey: "1" });
|
}}>
|
||||||
}}>
|
环比上月减少人员
|
||||||
环比上月减少人员
|
</span>
|
||||||
</span>
|
<WeaHelpfulTip
|
||||||
<WeaHelpfulTip
|
width={200}
|
||||||
width={200}
|
title="提示:环比上期当前选择的账套归档的各个税扣缴义务人下减少的人员"
|
||||||
title="提示:环比上期当前选择的账套归档的各个税扣缴义务人下减少的人员"
|
placement="topLeft"
|
||||||
placement="topLeft"
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="crumbsOperateWrapper">
|
|
||||||
{this.state.selectedKey == "0" &&
|
|
||||||
<div className="headerIcon">
|
|
||||||
<Icon
|
|
||||||
className="iconItem"
|
|
||||||
type="minus-square"
|
|
||||||
onClick={() => {
|
|
||||||
this.handleBatchDelete();
|
|
||||||
}}
|
|
||||||
title="批量删除"
|
|
||||||
/>
|
|
||||||
<WeaBrowser
|
|
||||||
type={17}
|
|
||||||
title="添加人员"
|
|
||||||
isSingle={false}
|
|
||||||
customized
|
|
||||||
onChange={(ids, names, datas) =>
|
|
||||||
this.handleUserBrowserChange(ids)}>
|
|
||||||
<Icon className="iconItem" type="plus-square" title="新增"/>
|
|
||||||
</WeaBrowser>
|
|
||||||
<i
|
|
||||||
className="icon-coms-fawen iconItem"
|
|
||||||
onClick={() => {
|
|
||||||
this.handleExport();
|
|
||||||
}}
|
|
||||||
style={{ fontSize: 20, position: "relative", top: "2px" }}
|
|
||||||
title="导出"
|
|
||||||
/>
|
|
||||||
<i
|
|
||||||
className="icon-coms-Synchro iconItem"
|
|
||||||
onClick={() => {
|
|
||||||
this.handleRefresh();
|
|
||||||
}}
|
|
||||||
style={{ fontSize: 20, position: "relative", top: "2px" }}
|
|
||||||
title="刷新"
|
|
||||||
/>
|
|
||||||
</div>}
|
|
||||||
<WeaInputSearch
|
|
||||||
className="searchInput"
|
|
||||||
value={this.state.userListSearchValue}
|
|
||||||
onChange={value => {
|
|
||||||
this.setState({ userListSearchValue: value });
|
|
||||||
}}
|
|
||||||
onSearch={value => {
|
|
||||||
this.handleUserListSearch(value);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div className="crumbsOperateWrapper">
|
||||||
|
<WeaTab
|
||||||
|
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||||
|
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||||
|
setShowSearchAd={(bool) => this.setState({ showSearchAd: bool })} //高级搜索面板受控
|
||||||
|
searchsAd={renderSearch()} // 高级搜索内部数据getSearchs(form, toJS(condition), 2)
|
||||||
|
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||||
|
onSearch={() => this.handleUserListSearch(this.state.searchItemsValue)} // 点搜索按钮时的回调
|
||||||
|
buttons={selectedKey == 0 ? [
|
||||||
|
<Icon
|
||||||
|
className="iconItem"
|
||||||
|
style={{ fontSize: 16 }}
|
||||||
|
type="minus-square"
|
||||||
|
onClick={() => {
|
||||||
|
this.handleBatchDelete();
|
||||||
|
}}
|
||||||
|
title="批量删除"
|
||||||
|
/>,
|
||||||
|
<WeaBrowser
|
||||||
|
type={17}
|
||||||
|
title="添加人员"
|
||||||
|
isSingle={false}
|
||||||
|
customized
|
||||||
|
onChange={(ids, names, datas) =>
|
||||||
|
this.handleUserBrowserChange(ids)}>
|
||||||
|
<Icon type="plus-square" title="新增"
|
||||||
|
className="iconItem"
|
||||||
|
style={{ fontSize: 16 }}/>
|
||||||
|
</WeaBrowser>,
|
||||||
|
<i
|
||||||
|
className="icon-coms-fawen iconItem"
|
||||||
|
onClick={() => {
|
||||||
|
this.handleExport();
|
||||||
|
}}
|
||||||
|
style={{ fontSize: 20, position: "relative", top: 2 }}
|
||||||
|
title="导出"
|
||||||
|
/>,
|
||||||
|
<i
|
||||||
|
className="icon-coms-Synchro iconItem"
|
||||||
|
onClick={() => {
|
||||||
|
this.handleRefresh();
|
||||||
|
}}
|
||||||
|
style={{ fontSize: 20, position: "relative", top: 2 }}
|
||||||
|
title="刷新"
|
||||||
|
/>
|
||||||
|
] : []}
|
||||||
|
searchsBasePlaceHolder={"请输入姓名"}
|
||||||
|
onSearchChange={(v) =>
|
||||||
|
this.setState({
|
||||||
|
searchItemsValue: {
|
||||||
|
...this.state.searchItemsValue,
|
||||||
|
employeeName: v
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值form.updateFields({ username: v })
|
||||||
|
searchsBaseValue={this.state.searchItemsValue.employeeName} // 外部input搜索值受控: 这里和高级搜索的requestname同步form.getFormParams().username
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/*<div className="crumbsOperateWrapper">*/}
|
||||||
|
{/*{this.state.selectedKey == "0" &&*/}
|
||||||
|
{/* <div className="headerIcon">*/}
|
||||||
|
{/* <Icon*/}
|
||||||
|
{/* className="iconItem"*/}
|
||||||
|
{/* type="minus-square"*/}
|
||||||
|
{/* onClick={() => {*/}
|
||||||
|
{/* this.handleBatchDelete();*/}
|
||||||
|
{/* }}*/}
|
||||||
|
{/* title="批量删除"*/}
|
||||||
|
{/* />*/}
|
||||||
|
{/* <WeaBrowser*/}
|
||||||
|
{/* type={17}*/}
|
||||||
|
{/* title="添加人员"*/}
|
||||||
|
{/* isSingle={false}*/}
|
||||||
|
{/* customized*/}
|
||||||
|
{/* onChange={(ids, names, datas) =>*/}
|
||||||
|
{/* this.handleUserBrowserChange(ids)}>*/}
|
||||||
|
{/* <Icon className="iconItem" type="plus-square" title="新增"/>*/}
|
||||||
|
{/* </WeaBrowser>*/}
|
||||||
|
{/* <i*/}
|
||||||
|
{/* className="icon-coms-fawen iconItem"*/}
|
||||||
|
{/* onClick={() => {*/}
|
||||||
|
{/* this.handleExport();*/}
|
||||||
|
{/* }}*/}
|
||||||
|
{/* style={{ fontSize: 20, position: "relative" }}*/}
|
||||||
|
{/* title="导出"*/}
|
||||||
|
{/* />*/}
|
||||||
|
{/* <i*/}
|
||||||
|
{/* className="icon-coms-Synchro iconItem"*/}
|
||||||
|
{/* onClick={() => {*/}
|
||||||
|
{/* this.handleRefresh();*/}
|
||||||
|
{/* }}*/}
|
||||||
|
{/* style={{ fontSize: 20, position: "relative" }}*/}
|
||||||
|
{/* title="刷新"*/}
|
||||||
|
{/* />*/}
|
||||||
|
{/* </div>}*/}
|
||||||
|
{/*<WeaInputSearch*/}
|
||||||
|
{/* className="searchInput"*/}
|
||||||
|
{/* value={this.state.userListSearchValue}*/}
|
||||||
|
{/* onChange={value => {*/}
|
||||||
|
{/* this.setState({ userListSearchValue: value });*/}
|
||||||
|
{/* }}*/}
|
||||||
|
{/* onSearch={value => {*/}
|
||||||
|
{/* this.handleUserListSearch(value);*/}
|
||||||
|
{/* }}*/}
|
||||||
|
{/*/>*/}
|
||||||
|
{/*</div>*/}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="tableWrapper">
|
<div className="tableWrapper">
|
||||||
{this.state.selectedKey == 0 &&
|
{this.state.selectedKey == 0 &&
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,7 @@ export default class ItemMangeFormModal extends React.Component {
|
||||||
<Modal width={600} visible={this.props.visible} onCancel={this.props.onCancel}
|
<Modal width={600} visible={this.props.visible} onCancel={this.props.onCancel}
|
||||||
title={"新建自定义字段"}
|
title={"新建自定义字段"}
|
||||||
footer={
|
footer={
|
||||||
<Button type="primary" onClick={() =>
|
<Button type="primary" onClick={() => {
|
||||||
{
|
|
||||||
currentItemOperate == "add" ? this.props.onSave(this.state.request) :
|
currentItemOperate == "add" ? this.props.onSave(this.state.request) :
|
||||||
this.props.onUpdate(this.state.request)
|
this.props.onUpdate(this.state.request)
|
||||||
}
|
}
|
||||||
|
|
@ -77,7 +76,9 @@ export default class ItemMangeFormModal extends React.Component {
|
||||||
字段名称
|
字段名称
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={16}>
|
<Col span={16}>
|
||||||
<WeaInput style={{width: "200px"}} value={fieldName} onChange={(v) => {this.handleChange({fieldName: v})}}/>
|
<WeaInput style={{width: "200px"}} value={fieldName} onChange={(v) => {
|
||||||
|
this.handleChange({fieldName: v})
|
||||||
|
}}/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row gutter={[10, 10]} style={{marginBottom: "10px"}}>
|
<Row gutter={[10, 10]} style={{marginBottom: "10px"}}>
|
||||||
|
|
|
||||||
|
|
@ -90,8 +90,12 @@ export default class RefereAttendFormModal extends React.Component {
|
||||||
return (
|
return (
|
||||||
<Modal width={600} title="引用考勤数据" footer={
|
<Modal width={600} title="引用考勤数据" footer={
|
||||||
<div style={{display: "inline-block"}}>
|
<div style={{display: "inline-block"}}>
|
||||||
<Button type="primary" onClick={() => {this.handleSync()}}>同步</Button>
|
<Button type="primary" onClick={() => {
|
||||||
<Button type="default" onClick={() => {this.handleHeaderSet()}}>表头设置</Button>
|
this.handleSync()
|
||||||
|
}}>同步</Button>
|
||||||
|
<Button type="default" onClick={() => {
|
||||||
|
this.handleHeaderSet()
|
||||||
|
}}>表头设置</Button>
|
||||||
</div>
|
</div>
|
||||||
} visible={this.props.visible} onCancel={this.props.onCancel}>
|
} visible={this.props.visible} onCancel={this.props.onCancel}>
|
||||||
<Row style={{marginBottom: "10px"}}>
|
<Row style={{marginBottom: "10px"}}>
|
||||||
|
|
@ -150,13 +154,25 @@ export default class RefereAttendFormModal extends React.Component {
|
||||||
|
|
||||||
|
|
||||||
<SelectItemModal
|
<SelectItemModal
|
||||||
onShowChecked={(value) => {this.props.onShowChecked(value)}}
|
onShowChecked={(value) => {
|
||||||
onRestoreDefault={() => {this.props.onRestoreDefault()}}
|
this.props.onShowChecked(value)
|
||||||
onSetDefault={() => {this.props.onSetDefault()}}
|
}}
|
||||||
onSearch={(value) => {this.props.onSearch(value)}}
|
onRestoreDefault={() => {
|
||||||
onSave={(value) => {this.props.onSave(value)}}
|
this.props.onRestoreDefault()
|
||||||
|
}}
|
||||||
|
onSetDefault={() => {
|
||||||
|
this.props.onSetDefault()
|
||||||
|
}}
|
||||||
|
onSearch={(value) => {
|
||||||
|
this.props.onSearch(value)
|
||||||
|
}}
|
||||||
|
onSave={(value) => {
|
||||||
|
this.props.onSave(value)
|
||||||
|
}}
|
||||||
visible={this.state.headerSetVisible} onCancel={() => this.setState({headerSetVisible: false})}>
|
visible={this.state.headerSetVisible} onCancel={() => this.setState({headerSetVisible: false})}>
|
||||||
<SelectItemsWrapper items={this.props.items} title={"考勤模块"} onChange={(value) => {this.props.onChange(value)}}/>
|
<SelectItemsWrapper items={this.props.items} title={"考勤模块"} onChange={(value) => {
|
||||||
|
this.props.onChange(value)
|
||||||
|
}}/>
|
||||||
</SelectItemModal>
|
</SelectItemModal>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -511,6 +511,7 @@ export default class CumDeduct extends React.Component {
|
||||||
<div className="weaTabWrapper">
|
<div className="weaTabWrapper">
|
||||||
<WeaTab
|
<WeaTab
|
||||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||||
|
searchsBasePlaceHolder={"请输入姓名"}
|
||||||
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||||
setShowSearchAd={(bool) => setShowSearchAd(bool)} //高级搜索面板受控
|
setShowSearchAd={(bool) => setShowSearchAd(bool)} //高级搜索面板受控
|
||||||
searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据
|
searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据
|
||||||
|
|
|
||||||
|
|
@ -517,6 +517,7 @@ export default class CumSituation extends React.Component {
|
||||||
<div className="weaTabWrapper">
|
<div className="weaTabWrapper">
|
||||||
<WeaTab
|
<WeaTab
|
||||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||||
|
searchsBasePlaceHolder={"请输入姓名"}
|
||||||
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||||
setShowSearchAd={bool => setShowSearchAd(bool)} //高级搜索面板受控
|
setShowSearchAd={bool => setShowSearchAd(bool)} //高级搜索面板受控
|
||||||
searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据
|
searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据
|
||||||
|
|
|
||||||
|
|
@ -510,6 +510,7 @@ export default class OtherDeduct extends React.Component {
|
||||||
<div className="weaTabWrapper">
|
<div className="weaTabWrapper">
|
||||||
<WeaTab
|
<WeaTab
|
||||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||||
|
searchsBasePlaceHolder={"请输入姓名"}
|
||||||
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||||
setShowSearchAd={bool => setShowSearchAd(bool)} //高级搜索面板受控
|
setShowSearchAd={bool => setShowSearchAd(bool)} //高级搜索面板受控
|
||||||
searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据
|
searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,9 @@ export default class CalRulesForm extends React.Component {
|
||||||
if(item.key == "cz") {
|
if(item.key == "cz") {
|
||||||
item.render = (text, record) => {
|
item.render = (text, record) => {
|
||||||
return (
|
return (
|
||||||
<a onClick={() => {this.handleDeleteItem(record)}}>删除</a>
|
<a onClick={() => {
|
||||||
|
this.handleDeleteItem(record)
|
||||||
|
}}>删除</a>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -85,7 +87,9 @@ export default class CalRulesForm extends React.Component {
|
||||||
<div className="headerIcon">
|
<div className="headerIcon">
|
||||||
{
|
{
|
||||||
canEdit ==='true'&&
|
canEdit ==='true'&&
|
||||||
<Icon className="iconItem" type="plus-square" onClick={() => {this.setState({modalVisible: true})}}/>
|
<Icon className="iconItem" type="plus-square" onClick={() => {
|
||||||
|
this.setState({modalVisible: true})
|
||||||
|
}}/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div className="tableWrapper">
|
<div className="tableWrapper">
|
||||||
|
|
@ -96,7 +100,9 @@ export default class CalRulesForm extends React.Component {
|
||||||
this.state.modalVisible && <RuleEditModal
|
this.state.modalVisible && <RuleEditModal
|
||||||
visible={this.state.modalVisible}
|
visible={this.state.modalVisible}
|
||||||
onCancel={() => this.setState({modalVisible: false})}
|
onCancel={() => this.setState({modalVisible: false})}
|
||||||
onSave={(params) => {this.handleSave(params)}}
|
onSave={(params) => {
|
||||||
|
this.handleSave(params)
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,7 @@ export default class Ledger extends React.Component {
|
||||||
onChange={value => {
|
onChange={value => {
|
||||||
this.setState({ searchValue: value });
|
this.setState({ searchValue: value });
|
||||||
}}
|
}}
|
||||||
|
placeholder={"请输入薪资账套名称"}
|
||||||
onSearch={value => {
|
onSearch={value => {
|
||||||
this.handleSearch(value);
|
this.handleSearch(value);
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,12 @@ export default class SlideBaseForm extends React.Component {
|
||||||
key: "1",
|
key: "1",
|
||||||
selected: true,
|
selected: true,
|
||||||
showname: "正常工资薪金所得"
|
showname: "正常工资薪金所得"
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
key: "4",
|
||||||
|
selected: false,
|
||||||
|
showname: "劳务报酬所得"
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
style={{width: "190px"}}
|
style={{width: "190px"}}
|
||||||
value={taxableItems}
|
value={taxableItems}
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,20 @@ export default class AddCategoryModal extends React.Component {
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Modal title={this.props.title && this.props.title !== '' ? "修改分类" : "新增分类"} footer={<Button type="primary" onClick={() => {this.props.onSave(this.state.name)}}>保存</Button>} width={600}
|
<Modal title={this.props.title && this.props.title !== '' ? "修改分类" : "新增分类"} footer={<Button type="primary" onClick={() => {
|
||||||
visible={this.props.visible} onCancel={() => {this.props.onCancel()}}
|
this.props.onSave(this.state.name)
|
||||||
|
}}>保存</Button>} width={600}
|
||||||
|
visible={this.props.visible} onCancel={() => {
|
||||||
|
this.props.onCancel()
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div style={{padding: "20px"}}>
|
<div style={{padding: "20px"}}>
|
||||||
<Row style={{display:"flex", alignItems:"center"}}>
|
<Row style={{display:"flex", alignItems:"center"}}>
|
||||||
<Col span={6}>分类名称<RequiredLabelTip /></Col>
|
<Col span={6}>分类名称<RequiredLabelTip /></Col>
|
||||||
<Col span={18}>
|
<Col span={18}>
|
||||||
<WeaInput value={this.state.name} onChange={(value) => {this.setState({name: value})}}/>
|
<WeaInput value={this.state.name} onChange={(value) => {
|
||||||
|
this.setState({name: value})
|
||||||
|
}}/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -98,15 +98,23 @@ export default class AddSalaryItemModal extends React.Component {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
visible={this.props.visible} onCancel={() => {this.props.onCancel()}} width={900} height={600}
|
visible={this.props.visible} onCancel={() => {
|
||||||
|
this.props.onCancel()
|
||||||
|
}} width={900} height={600}
|
||||||
style={{top: 20}}
|
style={{top: 20}}
|
||||||
footer={null}
|
footer={null}
|
||||||
>
|
>
|
||||||
<div style={{height: "47px", lineHeight: '47px'}}>
|
<div style={{height: "47px", lineHeight: '47px'}}>
|
||||||
<span style={{marginLeft: "10px", fontSize: '14px'}}>添加薪资项目</span>
|
<span style={{marginLeft: "10px", fontSize: '14px'}}>添加薪资项目</span>
|
||||||
<div style={{float: "right", marginRight: "40px"}}>
|
<div style={{float: "right", marginRight: "40px"}}>
|
||||||
<Button type="primary" style={{marginRight: '10px'}} onClick={() => {this.handleAdd()}}>添加</Button>
|
<Button type="primary" style={{marginRight: '10px'}} onClick={() => {
|
||||||
<WeaInputSearch value={searchValue} onChange={(value) => {this.setState({searchValue: value})}} onSearch={(value) => {this.handleSearch(value)}}/>
|
this.handleAdd()
|
||||||
|
}}>添加</Button>
|
||||||
|
<WeaInputSearch value={searchValue} onChange={(value) => {
|
||||||
|
this.setState({searchValue: value})
|
||||||
|
}} onSearch={(value) => {
|
||||||
|
this.handleSearch(value)
|
||||||
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -125,7 +133,9 @@ export default class AddSalaryItemModal extends React.Component {
|
||||||
columns={this.getColumns(addSalaryItemColumns)}
|
columns={this.getColumns(addSalaryItemColumns)}
|
||||||
rowSelection={rowSelection}
|
rowSelection={rowSelection}
|
||||||
pagination={{
|
pagination={{
|
||||||
onChange: (value) => {this.handleDataPageChange(value)},
|
onChange: (value) => {
|
||||||
|
this.handleDataPageChange(value)
|
||||||
|
},
|
||||||
total: addSalaryItemPageInfo.total,
|
total: addSalaryItemPageInfo.total,
|
||||||
showTotal: (total) => `共 ${total} 条`,
|
showTotal: (total) => `共 ${total} 条`,
|
||||||
current: addSalaryItemPageInfo.pageNum
|
current: addSalaryItemPageInfo.pageNum
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,9 @@ export default class UserInfoSelected extends React.Component {
|
||||||
}}/>
|
}}/>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
<Icon type="plus" style={{marginLeft: "10px", marginRight: "10px", cursor: "pointer"}} onClick={() => {this.setState({showSelect: true})}}/>
|
<Icon type="plus" style={{marginLeft: "10px", marginRight: "10px", cursor: "pointer"}} onClick={() => {
|
||||||
|
this.setState({showSelect: true})
|
||||||
|
}}/>
|
||||||
{
|
{
|
||||||
this.state.showSelect && empBrowserList.length > 0 && <WeaSelect showSearch options={empBrowserList} onChange={(value) => {
|
this.state.showSelect && empBrowserList.length > 0 && <WeaSelect showSearch options={empBrowserList} onChange={(value) => {
|
||||||
this.handleSelectChange(value)
|
this.handleSelectChange(value)
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,9 @@ export default class PreviewSalaryModal extends React.Component {
|
||||||
visible={this.props.visible}
|
visible={this.props.visible}
|
||||||
title="预览"
|
title="预览"
|
||||||
width={800}
|
width={800}
|
||||||
onCancel={() => {this.props.onCancel()}}
|
onCancel={() => {
|
||||||
|
this.props.onCancel()
|
||||||
|
}}
|
||||||
footer={null}
|
footer={null}
|
||||||
>
|
>
|
||||||
<WeaTable columns={this.getColumns().columns} dataSource={[]} scroll={{x: this.getColumns().length * 150}}/>
|
<WeaTable columns={this.getColumns().columns} dataSource={[]} scroll={{x: this.getColumns().length * 150}}/>
|
||||||
|
|
|
||||||
|
|
@ -91,8 +91,12 @@ export default class RuleEditModal extends React.Component {
|
||||||
const { ruleOptionList } = ledgerStore;
|
const { ruleOptionList } = ledgerStore;
|
||||||
const { beforeAdjustmentType, afterAdjustmentType, initedSelect } = this.state
|
const { beforeAdjustmentType, afterAdjustmentType, initedSelect } = this.state
|
||||||
return (
|
return (
|
||||||
<Modal visible={this.props.visible} onCancel={() => {this.props.onCancel()}} width={800}
|
<Modal visible={this.props.visible} onCancel={() => {
|
||||||
footer={<Button type="primary" onClick={() => {this.handleSave()}}>保存</Button>}
|
this.props.onCancel()
|
||||||
|
}} width={800}
|
||||||
|
footer={<Button type="primary" onClick={() => {
|
||||||
|
this.handleSave()
|
||||||
|
}}>保存</Button>}
|
||||||
title="调薪计薪规则项"
|
title="调薪计薪规则项"
|
||||||
>
|
>
|
||||||
<div style={{padding: '20px'}}>
|
<div style={{padding: '20px'}}>
|
||||||
|
|
@ -101,7 +105,9 @@ export default class RuleEditModal extends React.Component {
|
||||||
<Col span={16}>
|
<Col span={16}>
|
||||||
{
|
{
|
||||||
initedSelect &&
|
initedSelect &&
|
||||||
<WeaSelect style={{width: "200px"}} options={ruleOptionList} value={this.state.itemValue} onChange={(value) => {this.setState({itemValue: value})} } />
|
<WeaSelect style={{width: "200px"}} options={ruleOptionList} value={this.state.itemValue} onChange={(value) => {
|
||||||
|
this.setState({itemValue: value})
|
||||||
|
} } />
|
||||||
}
|
}
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
@ -116,7 +122,9 @@ export default class RuleEditModal extends React.Component {
|
||||||
placement="topLeft"
|
placement="topLeft"
|
||||||
/>
|
/>
|
||||||
如果:调薪生效日期在
|
如果:调薪生效日期在
|
||||||
<WeaSelect style={{width: '100px'}} options={daysOptions} value={this.state.effectiveDate} onChange={(value) => {this.setState({effectiveDate: value})}}/>
|
<WeaSelect style={{width: '100px'}} options={daysOptions} value={this.state.effectiveDate} onChange={(value) => {
|
||||||
|
this.setState({effectiveDate: value})
|
||||||
|
}}/>
|
||||||
|
|
||||||
(含)之前
|
(含)之前
|
||||||
|
|
||||||
|
|
@ -124,7 +132,9 @@ export default class RuleEditModal extends React.Component {
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
计薪规则为:
|
计薪规则为:
|
||||||
<Radio.Group onChange={(value) => {this.beforeAdjustmentTypeChange(value)}} value={beforeAdjustmentType}>
|
<Radio.Group onChange={(value) => {
|
||||||
|
this.beforeAdjustmentTypeChange(value)
|
||||||
|
}} value={beforeAdjustmentType}>
|
||||||
<Radio value={1}>取调整后薪资</Radio>
|
<Radio value={1}>取调整后薪资</Radio>
|
||||||
<Radio value={2}>分段计薪<WeaHelpfulTip
|
<Radio value={2}>分段计薪<WeaHelpfulTip
|
||||||
style={{marginLeft: "10px"}}
|
style={{marginLeft: "10px"}}
|
||||||
|
|
@ -146,7 +156,9 @@ export default class RuleEditModal extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
计薪规则为:
|
计薪规则为:
|
||||||
<Radio.Group onChange={(value) => {this.afterAdjustmentTypeChange(value)}} value={afterAdjustmentType}>
|
<Radio.Group onChange={(value) => {
|
||||||
|
this.afterAdjustmentTypeChange(value)
|
||||||
|
}} value={afterAdjustmentType}>
|
||||||
<Radio value={1}>取调整前薪资</Radio>
|
<Radio value={1}>取调整前薪资</Radio>
|
||||||
<Radio value={2}>分段计薪<WeaHelpfulTip
|
<Radio value={2}>分段计薪<WeaHelpfulTip
|
||||||
style={{marginLeft: "10px"}}
|
style={{marginLeft: "10px"}}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,9 @@ export default class PayrollModal extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const { mySalaryStore: { mySalaryBill }} = this.props;
|
const { mySalaryStore: { mySalaryBill }} = this.props;
|
||||||
return (
|
return (
|
||||||
<Modal visible={this.props.visible} onCancel={() => {this.props.onCancel()}}
|
<Modal visible={this.props.visible} onCancel={() => {
|
||||||
|
this.props.onCancel()
|
||||||
|
}}
|
||||||
width={900}
|
width={900}
|
||||||
footer={null}>
|
footer={null}>
|
||||||
<div className="computerTemplate" style={{
|
<div className="computerTemplate" style={{
|
||||||
|
|
|
||||||
|
|
@ -60,12 +60,20 @@ function beforeUpload(file) {
|
||||||
<div className="uploadPictureWrapper">
|
<div className="uploadPictureWrapper">
|
||||||
{
|
{
|
||||||
(imageUrl || imageUrl == "") ?
|
(imageUrl || imageUrl == "") ?
|
||||||
<div className="previewWrapper" onMouseEnter={() => {this.setState({showOperate: true})}} onMouseLeave={() => {this.setState({showOperate: false})}}>
|
<div className="previewWrapper" onMouseEnter={() => {
|
||||||
|
this.setState({showOperate: true})
|
||||||
|
}} onMouseLeave={() => {
|
||||||
|
this.setState({showOperate: false})
|
||||||
|
}}>
|
||||||
<img src={imageUrl} alt="" className="previewImg"/>
|
<img src={imageUrl} alt="" className="previewImg"/>
|
||||||
{
|
{
|
||||||
this.state.showOperate && <div className="operateWrapper">
|
this.state.showOperate && <div className="operateWrapper">
|
||||||
<i className="icon-coms-Supervise operateIcon" onClick={() => {this.handlePreview()}}/>
|
<i className="icon-coms-Supervise operateIcon" onClick={() => {
|
||||||
<i className="icon-coms-Delete operateIcon" onClick={() => {this.handleDelete()}}/>
|
this.handlePreview()
|
||||||
|
}}/>
|
||||||
|
<i className="icon-coms-Delete operateIcon" onClick={() => {
|
||||||
|
this.handleDelete()
|
||||||
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -74,7 +82,9 @@ function beforeUpload(file) {
|
||||||
<Icon type="plus" className="avatar-uploader-trigger" />
|
<Icon type="plus" className="avatar-uploader-trigger" />
|
||||||
</Upload>
|
</Upload>
|
||||||
}
|
}
|
||||||
<Modal visible={this.state.visible} width={600} footer={null} onCancel={() => {this.setState({visible: false})}} >
|
<Modal visible={this.state.visible} width={600} footer={null} onCancel={() => {
|
||||||
|
this.setState({visible: false})
|
||||||
|
}} >
|
||||||
<div style={{width: "100%", textAlign: "center"}}>
|
<div style={{width: "100%", textAlign: "center"}}>
|
||||||
<img src={imageUrl}/>
|
<img src={imageUrl}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -22,14 +22,20 @@ export default class CopyModal extends React.Component {
|
||||||
render(){
|
render(){
|
||||||
const { name } = this.state;
|
const { name } = this.state;
|
||||||
return (
|
return (
|
||||||
<Modal width={600} title="复制工资单" visible={this.props.visible} onCancel={() => {this.props.onCancel()}} footer={
|
<Modal width={600} title="复制工资单" visible={this.props.visible} onCancel={() => {
|
||||||
<Button type="primary" onClick={() => {this.handleSave()}}>保存</Button>
|
this.props.onCancel()
|
||||||
|
}} footer={
|
||||||
|
<Button type="primary" onClick={() => {
|
||||||
|
this.handleSave()
|
||||||
|
}}>保存</Button>
|
||||||
}>
|
}>
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={6}>工资单名称<RequiredLabelTip /></Col>
|
<Col span={6}>工资单名称<RequiredLabelTip /></Col>
|
||||||
<Col span={18}>
|
<Col span={18}>
|
||||||
<WeaInput value={name}
|
<WeaInput value={name}
|
||||||
onChange={(value) => {this.handleChange(value)}}/>
|
onChange={(value) => {
|
||||||
|
this.handleChange(value)
|
||||||
|
}}/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
||||||
|
|
@ -72,11 +72,15 @@ export default class PayrollDetail extends React.Component {
|
||||||
item.render = (text,record) => {
|
item.render = (text,record) => {
|
||||||
if(text == 'ALREADYSEND') {
|
if(text == 'ALREADYSEND') {
|
||||||
return (
|
return (
|
||||||
<a onClick={() => {this.handleWithdraw(record)}}>撤回</a>
|
<a onClick={() => {
|
||||||
|
this.handleWithdraw(record)
|
||||||
|
}}>撤回</a>
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<a onClick={() => {this.handleGrant(record)}}>发送</a>
|
<a onClick={() => {
|
||||||
|
this.handleGrant(record)
|
||||||
|
}}>发送</a>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -155,7 +159,9 @@ export default class PayrollDetail extends React.Component {
|
||||||
setShowSearchAd={bool => setDetailListShowSearchAd(bool)} //高级搜索面板受控
|
setShowSearchAd={bool => setDetailListShowSearchAd(bool)} //高级搜索面板受控
|
||||||
searchsAd={getSearchs(detailListConditionForm, toJS(detailListCondition), 2)} // 高级搜索内部数据
|
searchsAd={getSearchs(detailListConditionForm, toJS(detailListCondition), 2)} // 高级搜索内部数据
|
||||||
// buttonsAd={adBtn} // 高级搜索内部按钮
|
// buttonsAd={adBtn} // 高级搜索内部按钮
|
||||||
onSearch={() => {this.handleSearch()}} // 点搜索按钮时的回调
|
onSearch={() => {
|
||||||
|
this.handleSearch()
|
||||||
|
}} // 点搜索按钮时的回调
|
||||||
// searchsAdQuick={this.getSearchsAdQuick()}
|
// searchsAdQuick={this.getSearchsAdQuick()}
|
||||||
onSearchChange={v => detailListConditionForm.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
|
onSearchChange={v => detailListConditionForm.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
|
||||||
searchsBaseValue={detailListConditionForm.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
|
searchsBaseValue={detailListConditionForm.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
|
||||||
|
|
|
||||||
|
|
@ -127,22 +127,30 @@ export default class ShowSettingForm extends React.Component {
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={8}>工资单主题<RequiredLabelTip /></Col>
|
<Col span={8}>工资单主题<RequiredLabelTip /></Col>
|
||||||
<Col span={16}>
|
<Col span={16}>
|
||||||
<WeaInput style={{width: "200px"}} value={theme} onChange={(value) => {this.handleChange({theme:value})}}/>
|
<WeaInput style={{width: "200px"}} value={theme} onChange={(value) => {
|
||||||
|
this.handleChange({theme:value})
|
||||||
|
}}/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<span style={{float: "right"}}>
|
<span style={{float: "right"}}>
|
||||||
插入变量:
|
插入变量:
|
||||||
<a onClick={() => {this.handleThemeNameCllck("${companyName}")}} className="themeFormalStr">公司名称</a>
|
<a onClick={() => {
|
||||||
<a onClick={() => {this.handleThemeNameCllck("${salaryMonth}")}} className="themeFormalStr">薪资所属月</a>
|
this.handleThemeNameCllck("${companyName}")
|
||||||
|
}} className="themeFormalStr">公司名称</a>
|
||||||
|
<a onClick={() => {
|
||||||
|
this.handleThemeNameCllck("${salaryMonth}")
|
||||||
|
}} className="themeFormalStr">薪资所属月</a>
|
||||||
</span>
|
</span>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row className="formItem">
|
<Row className="formItem">
|
||||||
<Col span={4}>工资单背景</Col>
|
<Col span={4}>工资单背景</Col>
|
||||||
<Col span={20}>
|
<Col span={20}>
|
||||||
<BackgroundUpload imageUrl={background} onChange={(value) => {this.handleChange({background: value})}}/>
|
<BackgroundUpload imageUrl={background} onChange={(value) => {
|
||||||
|
this.handleChange({background: value})
|
||||||
|
}}/>
|
||||||
{/* <Dragger {...dropProps} style={{width: "100px"}}>
|
{/* <Dragger {...dropProps} style={{width: "100px"}}>
|
||||||
<div style={{ padding: '55px 0' }}>
|
<div style={{ padding: '55px 0' }}>
|
||||||
<Icon type="plus" />
|
<Icon type="plus" />
|
||||||
|
|
@ -154,14 +162,18 @@ export default class ShowSettingForm extends React.Component {
|
||||||
<Row className="formItem">
|
<Row className="formItem">
|
||||||
<Col span={4}>文本内容</Col>
|
<Col span={4}>文本内容</Col>
|
||||||
<Col span={20}>
|
<Col span={20}>
|
||||||
<WeaInput value={textContent} onChange={(value) => {this.handleChange({textContent: value})}}/>
|
<WeaInput value={textContent} onChange={(value) => {
|
||||||
|
this.handleChange({textContent: value})
|
||||||
|
}}/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<Row className="formItem">
|
<Row className="formItem">
|
||||||
<Col span={4}>文本内容位置</Col>
|
<Col span={4}>文本内容位置</Col>
|
||||||
<Col span={20}>
|
<Col span={20}>
|
||||||
<Radio.Group value={textContentPosition} onChange={(e) => {this.handleChange({textContentPosition: e.target.value})}}>
|
<Radio.Group value={textContentPosition} onChange={(e) => {
|
||||||
|
this.handleChange({textContentPosition: e.target.value})
|
||||||
|
}}>
|
||||||
<Radio value={"1"}>薪资项目前</Radio>
|
<Radio value={"1"}>薪资项目前</Radio>
|
||||||
<Radio value={"2"}>薪资项目后</Radio>
|
<Radio value={"2"}>薪资项目后</Radio>
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
|
|
@ -171,14 +183,18 @@ export default class ShowSettingForm extends React.Component {
|
||||||
<Row className="formItem">
|
<Row className="formItem">
|
||||||
<Col span={6}>薪资项为空时不显示</Col>
|
<Col span={6}>薪资项为空时不显示</Col>
|
||||||
<Col span={18}>
|
<Col span={18}>
|
||||||
<Switch checked={salaryItemNullStatus} onChange={(value) => {this.handleChange({salaryItemNullStatus: value})}}/>
|
<Switch checked={salaryItemNullStatus} onChange={(value) => {
|
||||||
|
this.handleChange({salaryItemNullStatus: value})
|
||||||
|
}}/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<Row className="formItem">
|
<Row className="formItem">
|
||||||
<Col span={6}>薪资项为0时不显示</Col>
|
<Col span={6}>薪资项为0时不显示</Col>
|
||||||
<Col span={18}>
|
<Col span={18}>
|
||||||
<Switch checked={salaryItemZeroStatus} onChange={(value) => {this.handleChange({salaryItemZeroStatus: value})}}/>
|
<Switch checked={salaryItemZeroStatus} onChange={(value) => {
|
||||||
|
this.handleChange({salaryItemZeroStatus: value})
|
||||||
|
}}/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -194,13 +210,17 @@ export default class ShowSettingForm extends React.Component {
|
||||||
{
|
{
|
||||||
index < salaryItemSet.length - 1 &&
|
index < salaryItemSet.length - 1 &&
|
||||||
<Icon type="caret-down" style={{marginLeft: "10px" , cursor: "pointer", color: "#666"}}
|
<Icon type="caret-down" style={{marginLeft: "10px" , cursor: "pointer", color: "#666"}}
|
||||||
onClick={() => {this.handleDownClick(index)}}
|
onClick={() => {
|
||||||
|
this.handleDownClick(index)
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
index > 0 && <Icon type="caret-up" style={{marginLeft: "10px", cursor: 'pointer', color: "#666"}}
|
index > 0 && <Icon type="caret-up" style={{marginLeft: "10px", cursor: 'pointer', color: "#666"}}
|
||||||
onClick={() => {this.handleUpClick(index)}}/>
|
onClick={() => {
|
||||||
|
this.handleUpClick(index)
|
||||||
|
}}/>
|
||||||
}
|
}
|
||||||
|
|
||||||
<i className="icon-coms-Delete" style={{cursor: "pointer", color: '#666', marginLeft: "10px"}} onClick={() => {
|
<i className="icon-coms-Delete" style={{cursor: "pointer", color: '#666', marginLeft: "10px"}} onClick={() => {
|
||||||
|
|
@ -209,7 +229,9 @@ export default class ShowSettingForm extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
<div className="configContent">
|
<div className="configContent">
|
||||||
{group.items.map(item => (
|
{group.items.map(item => (
|
||||||
<span className="editItem">{item.name} <Icon type="cross" style={{cursor: "pointer"}} onClick={() => {this.handleDeleteItem(group, item)}}/></span>
|
<span className="editItem">{item.name} <Icon type="cross" style={{cursor: "pointer"}} onClick={() => {
|
||||||
|
this.handleDeleteItem(group, item)
|
||||||
|
}}/></span>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,14 @@ export default class TemplatePreview extends React.Component {
|
||||||
<div className="templatePreview">
|
<div className="templatePreview">
|
||||||
<div className="headerWrapper">
|
<div className="headerWrapper">
|
||||||
<div className="iconsWrapper">
|
<div className="iconsWrapper">
|
||||||
<div onClick={() => {this.handleSelectClick("0")}} className={selectKey == "0" ? "iconWrapper activeIconWrapper" : "iconWrapper" }>
|
<div onClick={() => {
|
||||||
|
this.handleSelectClick("0")
|
||||||
|
}} className={selectKey == "0" ? "iconWrapper activeIconWrapper" : "iconWrapper" }>
|
||||||
<img src={computer} />
|
<img src={computer} />
|
||||||
</div>
|
</div>
|
||||||
<div onClick={() => {this.handleSelectClick("1")}} className={selectKey == "1" ? "iconWrapper activeIconWrapper" : "iconWrapper"}>
|
<div onClick={() => {
|
||||||
|
this.handleSelectClick("1")
|
||||||
|
}} className={selectKey == "1" ? "iconWrapper activeIconWrapper" : "iconWrapper"}>
|
||||||
<img src={phone}/>
|
<img src={phone}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -144,9 +144,11 @@ export default class ChangeSalaryModal extends React.Component {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
getSalaryItemForm(currentId).then(() => {this.setState({
|
getSalaryItemForm(currentId).then(() => {
|
||||||
|
this.setState({
|
||||||
inited: true
|
inited: true
|
||||||
})})
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -200,7 +202,9 @@ export default class ChangeSalaryModal extends React.Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal title="调薪" width={800} visible={this.props.visible} onClose={() => {this.props.onCancel()}}
|
<Modal title="调薪" width={800} visible={this.props.visible} onClose={() => {
|
||||||
|
this.props.onCancel()
|
||||||
|
}}
|
||||||
footer={<Button type="primary" onClick={() => {
|
footer={<Button type="primary" onClick={() => {
|
||||||
this.handleSave()
|
this.handleSave()
|
||||||
}}>保存</Button>}
|
}}>保存</Button>}
|
||||||
|
|
@ -215,7 +219,9 @@ export default class ChangeSalaryModal extends React.Component {
|
||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
style={{width: "200px"}}
|
style={{width: "200px"}}
|
||||||
value={effectiveTime}
|
value={effectiveTime}
|
||||||
onChange={(value) => {this.handleChange({ effectiveTime: value })}}
|
onChange={(value) => {
|
||||||
|
this.handleChange({ effectiveTime: value })
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
@ -251,7 +257,9 @@ export default class ChangeSalaryModal extends React.Component {
|
||||||
<WeaInput
|
<WeaInput
|
||||||
style={{width: "200px"}}
|
style={{width: "200px"}}
|
||||||
value={description}
|
value={description}
|
||||||
onChange={value => {this.handleChange({description: value})}}
|
onChange={value => {
|
||||||
|
this.handleChange({description: value})
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
@ -261,8 +269,12 @@ export default class ChangeSalaryModal extends React.Component {
|
||||||
<div className="contentTitleWrapper" style={{height: "40px",lineHeight: "40px"}}>
|
<div className="contentTitleWrapper" style={{height: "40px",lineHeight: "40px"}}>
|
||||||
<span className="contentTitle" style={{fontSize: "14px", color: "#666"}}>调薪明细</span>
|
<span className="contentTitle" style={{fontSize: "14px", color: "#666"}}>调薪明细</span>
|
||||||
<div className="rightIconWrapper" style={{display: "inline-block", float: "right"}}>
|
<div className="rightIconWrapper" style={{display: "inline-block", float: "right"}}>
|
||||||
<Icon type="minus-square" style={{color: "#2db7f5", cursor: "pointer", marginRight: "15px"}} onClick={() => {this.handleRemoveClick()}}/>
|
<Icon type="minus-square" style={{color: "#2db7f5", cursor: "pointer", marginRight: "15px"}} onClick={() => {
|
||||||
<Icon type="plus-square" style={{color: "#2db7f5", cursor: "pointer"}} onClick={() => {this.handleAddItemClick()}}/>
|
this.handleRemoveClick()
|
||||||
|
}}/>
|
||||||
|
<Icon type="plus-square" style={{color: "#2db7f5", cursor: "pointer"}} onClick={() => {
|
||||||
|
this.handleAddItemClick()
|
||||||
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,14 +103,18 @@ export default class EditAgentModal extends React.Component {
|
||||||
return (
|
return (
|
||||||
<Modal title="个税扣缴义务人调整" width={800} visible={this.props.visible} onClose={this.props.onCancel}
|
<Modal title="个税扣缴义务人调整" width={800} visible={this.props.visible} onClose={this.props.onCancel}
|
||||||
footer={
|
footer={
|
||||||
<Button type="primary" onClick={() => {this.handleSave()}}>保存</Button>
|
<Button type="primary" onClick={() => {
|
||||||
|
this.handleSave()
|
||||||
|
}}>保存</Button>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div className="editAgentModal" style={{padding: "20px"}}>
|
<div className="editAgentModal" style={{padding: "20px"}}>
|
||||||
<Row style={{lineHeight: '47px'}}>
|
<Row style={{lineHeight: '47px'}}>
|
||||||
<Col span={8}>生效日期<RequiredLabelTip /></Col>
|
<Col span={8}>生效日期<RequiredLabelTip /></Col>
|
||||||
<Col span={16}>
|
<Col span={16}>
|
||||||
<WeaDatePicker value={effectiveTime} onChange={(value) => {this.handleChange({effectiveTime: value})}}/>
|
<WeaDatePicker value={effectiveTime} onChange={(value) => {
|
||||||
|
this.handleChange({effectiveTime: value})
|
||||||
|
}}/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row style={{lineHeight: '47px'}}>
|
<Row style={{lineHeight: '47px'}}>
|
||||||
|
|
|
||||||
|
|
@ -542,6 +542,7 @@ export default class SalaryFile extends React.Component {
|
||||||
buttonsAd={adBtn} // 高级搜索内部按钮
|
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||||
onSearch={() => doSearch(this.state.searchItemsValue)} // 点搜索按钮时的回调this.handleSearch()
|
onSearch={() => doSearch(this.state.searchItemsValue)} // 点搜索按钮时的回调this.handleSearch()
|
||||||
searchsAdQuick={renderRightOperation()}
|
searchsAdQuick={renderRightOperation()}
|
||||||
|
searchsBasePlaceHolder={"请输入姓名"}
|
||||||
onSearchChange={(v) =>
|
onSearchChange={(v) =>
|
||||||
this.setState({
|
this.setState({
|
||||||
searchItemsValue: {
|
searchItemsValue: {
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,9 @@ export default class SalaryItemChangeList extends React.Component {
|
||||||
<div>
|
<div>
|
||||||
<WeaTable dataSource={singleSalaryItemList.list ? singleSalaryItemList.list: []} columns={this.getColumns()}
|
<WeaTable dataSource={singleSalaryItemList.list ? singleSalaryItemList.list: []} columns={this.getColumns()}
|
||||||
pagination={{
|
pagination={{
|
||||||
onChange: (value) => {this.handlePageChange(value)},
|
onChange: (value) => {
|
||||||
|
this.handlePageChange(value)
|
||||||
|
},
|
||||||
total: singleSalaryItemList.total,
|
total: singleSalaryItemList.total,
|
||||||
showTotal: (total) => `共 ${total} 条`,
|
showTotal: (total) => `共 ${total} 条`,
|
||||||
current: singleSalaryItemList.pageNum
|
current: singleSalaryItemList.pageNum
|
||||||
|
|
@ -67,7 +69,9 @@ export default class SalaryItemChangeList extends React.Component {
|
||||||
currentId={this.props.id}
|
currentId={this.props.id}
|
||||||
recordId={this.state.recordId}
|
recordId={this.state.recordId}
|
||||||
visible={this.state.changeSalaryVisible}
|
visible={this.state.changeSalaryVisible}
|
||||||
onCancel={() => {this.setState({changeSalaryVisible: false})}}
|
onCancel={() => {
|
||||||
|
this.setState({changeSalaryVisible: false})
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,9 @@ export default class SalaryFileViewSlide extends React.Component {
|
||||||
const { baseInfo, adjustSalaryItems } = detailForm;
|
const { baseInfo, adjustSalaryItems } = detailForm;
|
||||||
return (
|
return (
|
||||||
<div className="salaryFileViewSlide">
|
<div className="salaryFileViewSlide">
|
||||||
<WeaSearchGroup title={"基本信息"} items={[]} onVisibleChange={(value) => {this.setState({baseInfoVisible: value})}}/>
|
<WeaSearchGroup title={"基本信息"} items={[]} onVisibleChange={(value) => {
|
||||||
|
this.setState({baseInfoVisible: value})
|
||||||
|
}}/>
|
||||||
{
|
{
|
||||||
this.state.baseInfoVisible && <div className="slideItemWrapper">
|
this.state.baseInfoVisible && <div className="slideItemWrapper">
|
||||||
<Row className="formRow">
|
<Row className="formRow">
|
||||||
|
|
@ -99,7 +101,9 @@ export default class SalaryFileViewSlide extends React.Component {
|
||||||
width={200}
|
width={200}
|
||||||
title="提示:显示已生效的最新数据"
|
title="提示:显示已生效的最新数据"
|
||||||
placement="topLeft"
|
placement="topLeft"
|
||||||
/></span>} items={[]} onVisibleChange={(value) => {this.setState({salaryItemVisible: value})}}/>
|
/></span>} items={[]} onVisibleChange={(value) => {
|
||||||
|
this.setState({salaryItemVisible: value})
|
||||||
|
}}/>
|
||||||
{
|
{
|
||||||
this.state.salaryItemVisible && <div style={{lineHeight: '40px'}} className="slideItemWrapper">
|
this.state.salaryItemVisible && <div style={{lineHeight: '40px'}} className="slideItemWrapper">
|
||||||
{
|
{
|
||||||
|
|
@ -113,7 +117,11 @@ export default class SalaryFileViewSlide extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<WeaSearchGroup title={<SelectedTab items={selectedTabItems} onChange={(item) => {this.handleTabChange(item)}}/>} items={[]} onVisibleChange={(value) => {this.setState({salaryItemVisible: value})}}/>
|
<WeaSearchGroup title={<SelectedTab items={selectedTabItems} onChange={(item) => {
|
||||||
|
this.handleTabChange(item)
|
||||||
|
}}/>} items={[]} onVisibleChange={(value) => {
|
||||||
|
this.setState({salaryItemVisible: value})
|
||||||
|
}}/>
|
||||||
{
|
{
|
||||||
this.state.selectedTab == "0" ? <SalaryItemChangeList id={this.props.id}/> : <TaxAgentChangeList id={this.props.id}/>
|
this.state.selectedTab == "0" ? <SalaryItemChangeList id={this.props.id}/> : <TaxAgentChangeList id={this.props.id}/>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,9 @@ export default class SlideAgent extends React.Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
searchValue: value
|
searchValue: value
|
||||||
})
|
})
|
||||||
}} onSearch={(value) => { this.handleSearch(value)}}/>
|
}} onSearch={(value) => {
|
||||||
|
this.handleSearch(value)
|
||||||
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
<div className="tableWrapper">
|
<div className="tableWrapper">
|
||||||
<WeaTable
|
<WeaTable
|
||||||
|
|
@ -61,7 +63,9 @@ export default class SlideAgent extends React.Component {
|
||||||
columns={this.getColumns(taxAgentList.columns ? taxAgentList.columns : [])}
|
columns={this.getColumns(taxAgentList.columns ? taxAgentList.columns : [])}
|
||||||
scroll={{x: this.getColumns(taxAgentList.columns ? taxAgentList.columns : []).length * 120}}
|
scroll={{x: this.getColumns(taxAgentList.columns ? taxAgentList.columns : []).length * 120}}
|
||||||
pagination={{
|
pagination={{
|
||||||
onChange: (value) => {this.handlePageChange(value)},
|
onChange: (value) => {
|
||||||
|
this.handlePageChange(value)
|
||||||
|
},
|
||||||
total: taxAgentList.total,
|
total: taxAgentList.total,
|
||||||
showTotal: (total) => `共 ${total} 条`,
|
showTotal: (total) => `共 ${total} 条`,
|
||||||
current: taxAgentList.pageNum
|
current: taxAgentList.pageNum
|
||||||
|
|
|
||||||
|
|
@ -55,14 +55,18 @@ export default class SlideSalaryItem extends React.Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
searchValue: value
|
searchValue: value
|
||||||
})
|
})
|
||||||
}} onSearch={(value) => { this.handleSearch(value)}}/>
|
}} onSearch={(value) => {
|
||||||
|
this.handleSearch(value)
|
||||||
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
<div className="tableWrapper">
|
<div className="tableWrapper">
|
||||||
<WeaTable dataSource={salaryItemList.list}
|
<WeaTable dataSource={salaryItemList.list}
|
||||||
columns={this.getColumns(salaryItemList.columns ? salaryItemList.columns : [])}
|
columns={this.getColumns(salaryItemList.columns ? salaryItemList.columns : [])}
|
||||||
scroll={{x: this.getColumns(salaryItemList.columns ? salaryItemList.columns : []).length * 120}}
|
scroll={{x: this.getColumns(salaryItemList.columns ? salaryItemList.columns : []).length * 120}}
|
||||||
pagination={{
|
pagination={{
|
||||||
onChange: (value) => {this.handlePageChange(value)},
|
onChange: (value) => {
|
||||||
|
this.handlePageChange(value)
|
||||||
|
},
|
||||||
total: salaryItemList.total,
|
total: salaryItemList.total,
|
||||||
showTotal: (total) => `共 ${total} 条`,
|
showTotal: (total) => `共 ${total} 条`,
|
||||||
current: salaryItemList.pageNum
|
current: salaryItemList.pageNum
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,9 @@ export default class TaxAgentChangeList extends React.Component {
|
||||||
dataSource={singleTaxAgentList.list ? singleTaxAgentList.list: []}
|
dataSource={singleTaxAgentList.list ? singleTaxAgentList.list: []}
|
||||||
columns={this.getColumns()}
|
columns={this.getColumns()}
|
||||||
pagination={{
|
pagination={{
|
||||||
onChange: (value) => {this.handlePageChange(value)},
|
onChange: (value) => {
|
||||||
|
this.handlePageChange(value)
|
||||||
|
},
|
||||||
total: singleTaxAgentList.total,
|
total: singleTaxAgentList.total,
|
||||||
showTotal: (total) => `共 ${total} 条`,
|
showTotal: (total) => `共 ${total} 条`,
|
||||||
current: singleTaxAgentList.pageNum
|
current: singleTaxAgentList.pageNum
|
||||||
|
|
@ -68,7 +70,9 @@ export default class TaxAgentChangeList extends React.Component {
|
||||||
currentId={this.props.id}
|
currentId={this.props.id}
|
||||||
recordId={this.state.recordId}
|
recordId={this.state.recordId}
|
||||||
visible={this.state.editAgentVisible}
|
visible={this.state.editAgentVisible}
|
||||||
onCancel={() => {this.setState({editAgentVisible: false})}}
|
onCancel={() => {
|
||||||
|
this.setState({editAgentVisible: false})
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -69,12 +69,20 @@ export default class DeleteSalaryItemModal extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal visible={this.props.visible} onCancel={() => {this.props.onCancel()}} footer={null} width={800}>
|
<Modal visible={this.props.visible} onCancel={() => {
|
||||||
|
this.props.onCancel()
|
||||||
|
}} footer={null} width={800}>
|
||||||
<div style={{height: "47px", lineHeight: '47px'}}>
|
<div style={{height: "47px", lineHeight: '47px'}}>
|
||||||
<span style={{marginLeft: "10px", fontSize: '14px'}}>批量删除</span>
|
<span style={{marginLeft: "10px", fontSize: '14px'}}>批量删除</span>
|
||||||
<div style={{float: "right", marginRight: "40px"}}>
|
<div style={{float: "right", marginRight: "40px"}}>
|
||||||
<Button type="primary" style={{marginRight: '10px'}} onClick={() => {handleDelete()}}>批量删除</Button>
|
<Button type="primary" style={{marginRight: '10px'}} onClick={() => {
|
||||||
<WeaInputSearch value={searchValue} onChange={(value) => {this.handleSearchChange(value)}} onSearch={(value) => {this.handleSearch(value)}}/>
|
handleDelete()
|
||||||
|
}}>批量删除</Button>
|
||||||
|
<WeaInputSearch value={searchValue} onChange={(value) => {
|
||||||
|
this.handleSearchChange(value)
|
||||||
|
}} onSearch={(value) => {
|
||||||
|
this.handleSearch(value)
|
||||||
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style={{margin: "10px", height: "500px", overflowY: "scroll"}}>
|
<div style={{margin: "10px", height: "500px", overflowY: "scroll"}}>
|
||||||
|
|
@ -83,7 +91,9 @@ export default class DeleteSalaryItemModal extends React.Component {
|
||||||
columns={this.getColumns()}
|
columns={this.getColumns()}
|
||||||
dataSource={canDeleteList.list ? canDeleteList.list : []}
|
dataSource={canDeleteList.list ? canDeleteList.list : []}
|
||||||
pagination={{
|
pagination={{
|
||||||
onChange: (value) => {this.handleDataPageChange(value)},
|
onChange: (value) => {
|
||||||
|
this.handleDataPageChange(value)
|
||||||
|
},
|
||||||
total: canDeleteList.total,
|
total: canDeleteList.total,
|
||||||
showTotal: (total) => `共 ${total} 条`,
|
showTotal: (total) => `共 ${total} 条`,
|
||||||
current: canDeleteList.pageNum
|
current: canDeleteList.pageNum
|
||||||
|
|
|
||||||
|
|
@ -193,12 +193,18 @@ export default class FormalFormModal extends React.Component {
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
width={800}
|
width={800}
|
||||||
footer={
|
footer={
|
||||||
<Button type="primary" onClick={() => {this.handleSave()}}>保存</Button>
|
<Button type="primary" onClick={() => {
|
||||||
|
this.handleSave()
|
||||||
|
}}>保存</Button>
|
||||||
}
|
}
|
||||||
onCancel={() => {this.props.onCancel()}}>
|
onCancel={() => {
|
||||||
|
this.props.onCancel()
|
||||||
|
}}>
|
||||||
{
|
{
|
||||||
(this.props.valueType == "3" || this.referenceType == 'sql') && <div style={{marginBottom: '10px', lineHeight: "30px"}}>
|
(this.props.valueType == "3" || this.referenceType == 'sql') && <div style={{marginBottom: '10px', lineHeight: "30px"}}>
|
||||||
返回字段:<WeaInput style={{width: '150px'}} value={this.state.returnValue} onChange={(value) => {this.setState({returnValue: value})}} />
|
返回字段:<WeaInput style={{width: '150px'}} value={this.state.returnValue} onChange={(value) => {
|
||||||
|
this.setState({returnValue: value})
|
||||||
|
}} />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -218,7 +224,9 @@ export default class FormalFormModal extends React.Component {
|
||||||
<div>
|
<div>
|
||||||
{
|
{
|
||||||
searchGroup && searchGroup.map(item => {
|
searchGroup && searchGroup.map(item => {
|
||||||
return <div style={{height: "25px", lineHeight: '25px', cursor: "pointer", overflow: "hidden"}} key={item.key} onClick={() => {this.handleItemClick(item)}}>
|
return <div style={{height: "25px", lineHeight: '25px', cursor: "pointer", overflow: "hidden"}} key={item.key} onClick={() => {
|
||||||
|
this.handleItemClick(item)
|
||||||
|
}}>
|
||||||
{item.value}
|
{item.value}
|
||||||
<Icon type="right" style={{float: "right", marginLeft: "10px", color: "#eee", marginTop: "9px"}}/>
|
<Icon type="right" style={{float: "right", marginLeft: "10px", color: "#eee", marginTop: "9px"}}/>
|
||||||
<span style={{color: "#999", float: 'right'}}>{item.value} 的字段</span>
|
<span style={{color: "#999", float: 'right'}}>{item.value} 的字段</span>
|
||||||
|
|
@ -232,7 +240,9 @@ export default class FormalFormModal extends React.Component {
|
||||||
{
|
{
|
||||||
searchFields && searchFields.map(item => {
|
searchFields && searchFields.map(item => {
|
||||||
return (
|
return (
|
||||||
<div style={{height: "25px", lineHeight: "25px", cursor: "pointer"}} key={item.fieldId} onClick={() => {this.handleFieldClick(item)}}>
|
<div style={{height: "25px", lineHeight: "25px", cursor: "pointer"}} key={item.fieldId} onClick={() => {
|
||||||
|
this.handleFieldClick(item)
|
||||||
|
}}>
|
||||||
{item.name}
|
{item.name}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,23 @@
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
import { inject, observer } from 'mobx-react';
|
import { inject, observer } from "mobx-react";
|
||||||
import { toJS } from 'mobx';
|
|
||||||
|
|
||||||
import { Button, Table, DatePicker, Switch, Menu, Dropdown, Modal } from 'antd';
|
import { Button, DatePicker, Dropdown, Menu, Modal, Switch } from "antd";
|
||||||
// import { WeaTableNew } from "comsMobx"
|
// import { WeaTableNew } from "comsMobx"
|
||||||
|
import { WeaInputSearch, WeaRightMenu, WeaSlideModal, WeaTop } from "ecCom";
|
||||||
|
|
||||||
import { WeaTable, WeaSlideModal, WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaInputSearch } from 'ecCom';
|
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||||
|
import CustomTab from "../../components/customTab";
|
||||||
|
import SystemSalaryItemModal from "./systemSalaryItemModal";
|
||||||
|
import { columns } from "./columns";
|
||||||
|
import SlideModalTitle from "../../components/slideModalTitle";
|
||||||
|
import CustomSalaryItemSlide from "./customSalaryItemSlide";
|
||||||
|
import DeleteSalaryItemModal from "./deleteSalaryItemModal";
|
||||||
|
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||||
|
|
||||||
import { renderNoright, getSearchs } from '../../util'; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
|
||||||
import CustomTab from '../../components/customTab';
|
|
||||||
import ContentWrapper from '../../components/contentWrapper';
|
|
||||||
import SystemSalaryItemModal from './systemSalaryItemModal'
|
|
||||||
import { columns, dataSource } from './columns';
|
|
||||||
import SlideModalTitle from "../../components/slideModalTitle"
|
|
||||||
import CustomSalaryItemSlide from './customSalaryItemSlide'
|
|
||||||
import DeleteSalaryItemModal from './deleteSalaryItemModal';
|
|
||||||
import FormalFormModal from './formalFormModal';
|
|
||||||
import CustomPaginationTable from '../../components/customPaginationTable';
|
|
||||||
const { MonthPicker } = DatePicker;
|
const { MonthPicker } = DatePicker;
|
||||||
|
|
||||||
|
|
||||||
@inject('salaryItemStore', 'taxAgentStore')
|
@inject("salaryItemStore", "taxAgentStore")
|
||||||
@observer
|
@observer
|
||||||
export default class SalaryItem extends React.Component {
|
export default class SalaryItem extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
@ -32,76 +29,78 @@ export default class SalaryItem extends React.Component {
|
||||||
isAdd: false,
|
isAdd: false,
|
||||||
searchValue: "",
|
searchValue: "",
|
||||||
formalModalVisible: false
|
formalModalVisible: false
|
||||||
}
|
};
|
||||||
this.searchParams = {current: 1, pageSize: 10}
|
this.searchParams = { current: 1, pageSize: 10 };
|
||||||
columns.map(item => {
|
columns.map(item => {
|
||||||
if(item.dataIndex == "refere") {
|
if (item.dataIndex == "refere") {
|
||||||
item.render = () => {
|
item.render = () => {
|
||||||
return (
|
return (
|
||||||
<Switch />
|
<Switch/>
|
||||||
)
|
);
|
||||||
}
|
};
|
||||||
} else if(item.dataIndex == 'cz') {
|
} else if (item.dataIndex == "cz") {
|
||||||
item.render = () => {
|
item.render = () => {
|
||||||
return (<div>
|
return (<div>
|
||||||
<a style={{marginRight: "10px"}}>编辑</a>
|
<a style={{ marginRight: "10px" }}>编辑</a>
|
||||||
<a style={{marginRight: "10px"}}>删除</a>
|
<a style={{ marginRight: "10px" }}>删除</a>
|
||||||
{/* <a>操作日志</a> */}
|
{/* <a>操作日志</a> */}
|
||||||
</div>)
|
</div>);
|
||||||
}
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.record = {}
|
this.record = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
componentWillMount() { // 初始化渲染页面
|
componentWillMount() { // 初始化渲染页面
|
||||||
const { salaryItemStore: { doInit }} = this.props;
|
const { salaryItemStore: { doInit } } = this.props;
|
||||||
doInit();
|
doInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
onEditItem(record, isedit) {
|
onEditItem(record, isedit) {
|
||||||
this.record = record
|
this.record = record;
|
||||||
const { salaryItemStore: {getItemForm, setEditSlideVisible}} = this.props;
|
const { salaryItemStore: { getItemForm, setEditSlideVisible } } = this.props;
|
||||||
this.setState({editable: isedit, isAdd: false})
|
this.setState({ editable: isedit, isAdd: false });
|
||||||
getItemForm(record.id)
|
getItemForm(record.id);
|
||||||
setEditSlideVisible(true)
|
setEditSlideVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除列表项
|
// 删除列表项
|
||||||
handleDeleteItem(record) {
|
handleDeleteItem(record) {
|
||||||
const { salaryItemStore: {deleteItemRequest}} = this.props;
|
const { salaryItemStore: { deleteItemRequest } } = this.props;
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: '信息确认',
|
title: "信息确认",
|
||||||
content: '确认删除',
|
content: "确认删除",
|
||||||
onOk:() => {
|
onOk: () => {
|
||||||
deleteItemRequest([record.id])
|
deleteItemRequest([record.id]);
|
||||||
},
|
},
|
||||||
onCancel: () => {
|
onCancel: () => {
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 增加编辑功能,重写columns绑定事件
|
// 增加编辑功能,重写columns绑定事件
|
||||||
getColumns = () => {
|
getColumns = () => {
|
||||||
const { salaryItemStore, taxAgentStore: { showOperateBtn } } = this.props;
|
const { salaryItemStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const { tableColumns} = salaryItemStore
|
const { tableColumns } = salaryItemStore;
|
||||||
let columns = tableColumns.map(column => {
|
let columns = tableColumns.map(column => {
|
||||||
let newColumn = column;
|
let newColumn = column;
|
||||||
newColumn.render = (text, record, index) => { //前端元素转义
|
newColumn.render = (text, record, index) => { //前端元素转义
|
||||||
let valueSpan = record[newColumn.dataIndex + "span"] !== undefined ? record[newColumn.dataIndex + "span"] : record[newColumn.dataIndex];
|
let valueSpan = record[newColumn.dataIndex + "span"] !== undefined ? record[newColumn.dataIndex + "span"] : record[newColumn.dataIndex];
|
||||||
switch(newColumn.dataIndex) {
|
switch (newColumn.dataIndex) {
|
||||||
case "name":
|
case "name":
|
||||||
return <a onClick={() => {this.onEditItem(record, false)}}>{text}</a>
|
return <a onClick={() => {
|
||||||
|
this.onEditItem(record, false);
|
||||||
|
}}>{text}</a>;
|
||||||
case "useInEmployeeSalary":
|
case "useInEmployeeSalary":
|
||||||
return <Switch checked={text == 1} disabled/>
|
return <Switch checked={text == 1} disabled/>;
|
||||||
case "useDefault":
|
case "useDefault":
|
||||||
return <Switch checked={text == 1} disabled/>
|
return <Switch checked={text == 1} disabled/>;
|
||||||
default:
|
default:
|
||||||
return <div dangerouslySetInnerHTML={{ __html: valueSpan }} />
|
return <div dangerouslySetInnerHTML={{ __html: valueSpan }}/>;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
return newColumn;
|
return newColumn;
|
||||||
});
|
});
|
||||||
columns.push({
|
columns.push({
|
||||||
|
|
@ -109,126 +108,147 @@ export default class SalaryItem extends React.Component {
|
||||||
title: "操作",
|
title: "操作",
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return (
|
return (
|
||||||
<a onClick={() => {this.onEditItem(record, true)}}>{ showOperateBtn ? '编辑' : '查看' }</a>
|
<a onClick={() => {
|
||||||
)
|
this.onEditItem(record, true);
|
||||||
|
}}>{showOperateBtn ? "编辑" : "查看"}</a>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
columns.push({
|
columns.push({
|
||||||
title : '',
|
title: "",
|
||||||
key: "moreOperate",
|
key: "moreOperate",
|
||||||
dataIndex: "moreOperate",
|
dataIndex: "moreOperate",
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
if(record.canDelete) {
|
if (record.canDelete) {
|
||||||
return (
|
return (
|
||||||
<Dropdown overlay={<Menu>
|
<Dropdown overlay={<Menu>
|
||||||
<Menu.Item>
|
<Menu.Item>
|
||||||
<a onClick={() => {
|
<a onClick={() => {
|
||||||
this.handleDeleteItem(record)
|
this.handleDeleteItem(record);
|
||||||
}}>删除</a>
|
}}>删除</a>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
</Menu>}>
|
</Menu>}>
|
||||||
<i className="icon-coms-more"></i>
|
<i className="icon-coms-more"></i>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return ""
|
return "";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return columns
|
return columns;
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
// onOperatesClick = (record, index, operate, flag) => {
|
// onOperatesClick = (record, index, operate, flag) => {
|
||||||
|
|
||||||
// switch(operate.index.toString()){
|
// switch(operate.index.toString()){
|
||||||
// case '0': // 编辑
|
// case '0': // 编辑
|
||||||
// this.onEditItem(record, true);
|
// this.onEditItem(record, true);
|
||||||
// break;
|
// break;
|
||||||
// case "1": // 删除
|
// case "1": // 删除
|
||||||
|
|
||||||
// break;
|
// break;
|
||||||
// }
|
// }
|
||||||
// };
|
// };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
handleSearch(value) {
|
handleSearch(value) {
|
||||||
const { salaryItemStore: {getTableDatas}} = this.props;
|
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||||
this.searchParams = {name: value, current: 1}
|
this.searchParams = { name: value, current: 1 };
|
||||||
getTableDatas(this.searchParams)
|
getTableDatas(this.searchParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
handlePageChnage(value) {
|
handlePageChnage(value) {
|
||||||
this.searchParams.current = value;
|
this.searchParams.current = value;
|
||||||
const { salaryItemStore: {getTableDatas}} = this.props;
|
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||||
getTableDatas(this.searchParams)
|
getTableDatas(this.searchParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleShowSizeChange(searchParams) {
|
handleShowSizeChange(searchParams) {
|
||||||
const { salaryItemStore: {getTableDatas}} = this.props;
|
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||||
getTableDatas(searchParams)
|
getTableDatas(searchParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { salaryItemStore, taxAgentStore: { showOperateBtn } } = this.props;
|
const { salaryItemStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = salaryItemStore;
|
const {
|
||||||
const { tableDataSource, tableColumns, systemItemVisible, setSystemItemVisible, deleteItemVisible, setDeleteItemVisible, deleteItemList, editSlideVisible, setEditSlideVisible, request, pageInfo } = salaryItemStore
|
loading,
|
||||||
const { formalModalVisible} = this.state;
|
hasRight,
|
||||||
|
form,
|
||||||
|
condition,
|
||||||
|
tableStore,
|
||||||
|
showSearchAd,
|
||||||
|
getTableDatas,
|
||||||
|
doSearch,
|
||||||
|
setShowSearchAd
|
||||||
|
} = salaryItemStore;
|
||||||
|
const {
|
||||||
|
tableDataSource,
|
||||||
|
tableColumns,
|
||||||
|
systemItemVisible,
|
||||||
|
setSystemItemVisible,
|
||||||
|
deleteItemVisible,
|
||||||
|
setDeleteItemVisible,
|
||||||
|
deleteItemList,
|
||||||
|
editSlideVisible,
|
||||||
|
setEditSlideVisible,
|
||||||
|
request,
|
||||||
|
pageInfo
|
||||||
|
} = salaryItemStore;
|
||||||
|
const { formalModalVisible } = this.state;
|
||||||
if (!hasRight && !loading) { // 无权限处理
|
if (!hasRight && !loading) { // 无权限处理
|
||||||
return renderNoright();
|
return renderNoright();
|
||||||
}
|
}
|
||||||
|
|
||||||
const batchDelete = () => {
|
const batchDelete = () => {
|
||||||
// deleteItemList({})
|
// deleteItemList({})
|
||||||
setDeleteItemVisible(true)
|
setDeleteItemVisible(true);
|
||||||
}
|
};
|
||||||
|
|
||||||
const rightMenu = [// 右键菜单
|
const rightMenu = [// 右键菜单
|
||||||
{
|
// {
|
||||||
key: 'BTN_COLUMN',
|
// key: "BTN_COLUMN",
|
||||||
icon: <i className='icon-coms-Custom' />,
|
// icon: <i className="icon-coms-Custom"/>,
|
||||||
content: '显示列定制',
|
// content: "显示列定制",
|
||||||
onClick: this.showColumn
|
// onClick: this.showColumn
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
key: 'BTN_DEL',
|
key: "BTN_DEL",
|
||||||
icon: <i className='icon-coms-delete'/>,
|
icon: <i className="icon-coms-delete"/>,
|
||||||
content : '批量删除',
|
content: "批量删除",
|
||||||
onClick : batchDelete,
|
onClick: batchDelete
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
const collectParams = { // 收藏功能配置
|
const collectParams = { // 收藏功能配置
|
||||||
favname: '薪资项目管理',
|
favname: "薪资项目管理",
|
||||||
favouritetype: 1,
|
favouritetype: 1,
|
||||||
objid: 0,
|
objid: 0,
|
||||||
link: 'wui/index.html#/ns_demo03/index',
|
link: "wui/index.html#/ns_demo03/index",
|
||||||
importantlevel: 1,
|
importantlevel: 1
|
||||||
};
|
};
|
||||||
const adBtn = [ // 高级搜索内部按钮
|
const adBtn = [ // 高级搜索内部按钮
|
||||||
<Button type="primary" onClick={doSearch}>搜索</Button>,
|
<Button type="primary" onClick={doSearch}>搜索</Button>,
|
||||||
<Button type="ghost" onClick={() => form.resetForm()}>重置</Button>,
|
<Button type="ghost" onClick={() => form.resetForm()}>重置</Button>,
|
||||||
<Button type="ghost" onClick={() => setShowSearchAd(false)}>取消</Button>,
|
<Button type="ghost" onClick={() => setShowSearchAd(false)}>取消</Button>
|
||||||
];
|
];
|
||||||
|
|
||||||
const topTab = [
|
const topTab = [];
|
||||||
];
|
|
||||||
|
|
||||||
const handleMenuClick = (e) => {
|
const handleMenuClick = (e) => {
|
||||||
const { salaryItemStore: {getSysItemList, setEditSlideVisible, initRequest}} = this.props;
|
const { salaryItemStore: { getSysItemList, setEditSlideVisible, initRequest } } = this.props;
|
||||||
if(e.key == "1") {
|
if (e.key == "1") {
|
||||||
getSysItemList({})
|
getSysItemList({});
|
||||||
setSystemItemVisible(true)
|
setSystemItemVisible(true);
|
||||||
} else if(e.key == "2") {
|
} else if (e.key == "2") {
|
||||||
this.setState({editable: true, isAdd: true})
|
this.setState({ editable: true, isAdd: true });
|
||||||
initRequest()
|
initRequest();
|
||||||
setEditSlideVisible(true)
|
setEditSlideVisible(true);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const menu = (
|
const menu = (
|
||||||
<Menu onClick={handleMenuClick}>
|
<Menu onClick={handleMenuClick}>
|
||||||
|
|
@ -238,26 +258,30 @@ export default class SalaryItem extends React.Component {
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderRightOperation = () => {
|
const renderRightOperation = () => {
|
||||||
const { taxAgentStore: { showOperateBtn } }= this.props;
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
return (<div style={{display: "inline-block"}}>
|
return (<div style={{ display: "inline-block" }}>
|
||||||
{
|
{
|
||||||
showOperateBtn &&
|
showOperateBtn &&
|
||||||
<Dropdown.Button overlay={menu} type="primary" style={{marginRight: "10px"}}>新增</Dropdown.Button>
|
<Dropdown.Button overlay={menu} type="primary" style={{ marginRight: "10px" }}>新增</Dropdown.Button>
|
||||||
}
|
}
|
||||||
<WeaInputSearch value={this.state.searchValue} onChange={(value) => {this.setState({searchValue: value})}} onSearch={(value) => {this.handleSearch(value)}}/>
|
<WeaInputSearch value={this.state.searchValue} placeholder={"请输入名称"} onChange={(value) => {
|
||||||
</div>)
|
this.setState({ searchValue: value });
|
||||||
|
}} onSearch={(value) => {
|
||||||
}
|
this.handleSearch(value);
|
||||||
|
}}/>
|
||||||
|
</div>);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
// 新建和修改保存的回调
|
// 新建和修改保存的回调
|
||||||
const handleSlideSave = (continueFlag) => {
|
const handleSlideSave = (continueFlag) => {
|
||||||
const { salaryItemStore: {saveItem, request}} = this.props;
|
const { salaryItemStore: { saveItem, request } } = this.props;
|
||||||
if(this.state.editable) { // 修改
|
if (this.state.editable) { // 修改
|
||||||
saveItem(request, continueFlag, this.searchParams);
|
saveItem(request, continueFlag, this.searchParams);
|
||||||
} else { // 新建
|
} else { // 新建
|
||||||
saveItem(request, continueFlag)
|
saveItem(request, continueFlag);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const renderCustomOperate = () => {
|
const renderCustomOperate = () => {
|
||||||
return (
|
return (
|
||||||
|
|
@ -265,23 +289,29 @@ export default class SalaryItem extends React.Component {
|
||||||
<div>
|
<div>
|
||||||
{
|
{
|
||||||
this.state.isAdd ? <div>
|
this.state.isAdd ? <div>
|
||||||
<Button type="primary" style={{marginRight: "10px"}} onClick={() => {handleSlideSave(false)}}>保存</Button>
|
<Button type="primary" style={{ marginRight: "10px" }} onClick={() => {
|
||||||
<Button type="default" onClick={() => {handleSlideSave(true)}}>保存并继续创建</Button>
|
handleSlideSave(false);
|
||||||
</div> :
|
}}>保存</Button>
|
||||||
this.state.editable ? <div>
|
<Button type="default" onClick={() => {
|
||||||
<Button type="primary" style={{marginRight: "10px"}} onClick={() => {handleSlideSave(false)}}>保存</Button>
|
handleSlideSave(true);
|
||||||
</div> :
|
}}>保存并继续创建</Button>
|
||||||
""
|
</div> :
|
||||||
|
this.state.editable ? <div>
|
||||||
|
<Button type="primary" style={{ marginRight: "10px" }} onClick={() => {
|
||||||
|
handleSlideSave(false);
|
||||||
|
}}>保存</Button>
|
||||||
|
</div> :
|
||||||
|
""
|
||||||
}
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
const handleSaveSlideChange = (value) => {
|
const handleSaveSlideChange = (value) => {
|
||||||
const { salaryItemStore:{setRequest}} = this.props;
|
const { salaryItemStore: { setRequest } } = this.props;
|
||||||
setRequest(value)
|
setRequest(value);
|
||||||
}
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mySalaryBenefitsWrapper">
|
<div className="mySalaryBenefitsWrapper">
|
||||||
|
|
@ -291,19 +321,19 @@ export default class SalaryItem extends React.Component {
|
||||||
>
|
>
|
||||||
<WeaTop
|
<WeaTop
|
||||||
title="薪资项目管理" // 文字
|
title="薪资项目管理" // 文字
|
||||||
icon={<i className='icon-coms-meeting' />} // 左侧图标
|
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||||
iconBgcolor='#F14A2D' // 左侧图标背景色
|
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||||
showDropIcon={true} // 是否显示下拉按钮
|
showDropIcon={true} // 是否显示下拉按钮
|
||||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||||
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
|
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
|
||||||
>
|
>
|
||||||
<CustomTab
|
<CustomTab
|
||||||
searchOperationItem={
|
searchOperationItem={
|
||||||
renderRightOperation()
|
renderRightOperation()
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* <WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
{/* <WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
||||||
comsWeaTableStore={tableStore} // table store
|
comsWeaTableStore={tableStore} // table store
|
||||||
hasOrder={true} // 是否启用排序
|
hasOrder={true} // 是否启用排序
|
||||||
needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度
|
needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度
|
||||||
|
|
@ -311,7 +341,7 @@ export default class SalaryItem extends React.Component {
|
||||||
onOperatesClick={this.onOperatesClick.bind(this)}
|
onOperatesClick={this.onOperatesClick.bind(this)}
|
||||||
/> */}
|
/> */}
|
||||||
|
|
||||||
<CustomPaginationTable
|
<CustomPaginationTable
|
||||||
loading={loading}
|
loading={loading}
|
||||||
dataSource={tableDataSource}
|
dataSource={tableDataSource}
|
||||||
columns={this.getColumns(tableColumns)}
|
columns={this.getColumns(tableColumns)}
|
||||||
|
|
@ -319,54 +349,64 @@ export default class SalaryItem extends React.Component {
|
||||||
current={pageInfo.pageNum}
|
current={pageInfo.pageNum}
|
||||||
pageSize={this.searchParams.pageSize}
|
pageSize={this.searchParams.pageSize}
|
||||||
onPageChange={(value) => {
|
onPageChange={(value) => {
|
||||||
this.handlePageChnage(value)
|
this.handlePageChnage(value);
|
||||||
}}
|
}}
|
||||||
onShowSizeChange={(current, pageSize) => {
|
onShowSizeChange={(current, pageSize) => {
|
||||||
this.searchParams.current = current;
|
this.searchParams.current = current;
|
||||||
this.searchParams.pageSize = pageSize;
|
this.searchParams.pageSize = pageSize;
|
||||||
this.handleShowSizeChange(this.searchParams)
|
this.handleShowSizeChange(this.searchParams);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</WeaTop>
|
</WeaTop>
|
||||||
</WeaRightMenu>
|
</WeaRightMenu>
|
||||||
|
|
||||||
{
|
{
|
||||||
systemItemVisible && <SystemSalaryItemModal visible={systemItemVisible} onCancel={() => {setSystemItemVisible(false)}}/>
|
systemItemVisible && <SystemSalaryItemModal visible={systemItemVisible} onCancel={() => {
|
||||||
|
setSystemItemVisible(false);
|
||||||
|
}}/>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
deleteItemVisible && <DeleteSalaryItemModal visible={deleteItemVisible} onCancel={() => {setDeleteItemVisible(false)}}/>
|
deleteItemVisible && <DeleteSalaryItemModal visible={deleteItemVisible} onCancel={() => {
|
||||||
|
setDeleteItemVisible(false);
|
||||||
|
}}/>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
editSlideVisible &&
|
editSlideVisible &&
|
||||||
<WeaSlideModal visible={editSlideVisible}
|
<WeaSlideModal visible={editSlideVisible}
|
||||||
top={0}
|
top={0}
|
||||||
width={40}
|
width={40}
|
||||||
height={100}
|
height={100}
|
||||||
direction={'right'}
|
direction={"right"}
|
||||||
measure={'%'}
|
measure={"%"}
|
||||||
|
|
||||||
title={
|
title={
|
||||||
<SlideModalTitle
|
<SlideModalTitle
|
||||||
subtitle={(this.state.isAdd ? "新建" : "修改") + "自定义薪资项目"}
|
subtitle={(this.state.isAdd ? "新建" : "修改") + "自定义薪资项目"}
|
||||||
editable={false}
|
editable={false}
|
||||||
showOperateBtn={showOperateBtn}
|
showOperateBtn={showOperateBtn}
|
||||||
customOperate={showOperateBtn ? renderCustomOperate() : null}
|
customOperate={showOperateBtn ? renderCustomOperate() : null}
|
||||||
subItemChange={
|
subItemChange={
|
||||||
(item) => {this.setState({selectedTab: item.key})}
|
(item) => {
|
||||||
}
|
this.setState({ selectedTab: item.key });
|
||||||
/>
|
}
|
||||||
}
|
}
|
||||||
content={<CustomSalaryItemSlide record={this.record} editable={this.state.editable} isAdd={this.state.isAdd} request={request} onChange={(value) => {handleSaveSlideChange(value)}}/>}
|
/>
|
||||||
onClose={() => setEditSlideVisible(false)}
|
}
|
||||||
showMask={true}
|
content={<CustomSalaryItemSlide record={this.record} editable={this.state.editable}
|
||||||
closeMaskOnClick={() => setEditSlideVisible(false)} />
|
isAdd={this.state.isAdd} request={request}
|
||||||
|
onChange={(value) => {
|
||||||
}
|
handleSaveSlideChange(value);
|
||||||
|
}}/>}
|
||||||
|
onClose={() => setEditSlideVisible(false)}
|
||||||
|
showMask={true}
|
||||||
|
closeMaskOnClick={() => setEditSlideVisible(false)}/>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,12 +39,18 @@ export default class SystemSalaryItemModal extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal footer={null} visible={this.props.visible} onCancel={() => {this.props.onCancel()}} width={800}>
|
<Modal footer={null} visible={this.props.visible} onCancel={() => {
|
||||||
|
this.props.onCancel()
|
||||||
|
}} width={800}>
|
||||||
<div style={{height: "47px", lineHeight: '47px'}}>
|
<div style={{height: "47px", lineHeight: '47px'}}>
|
||||||
<span style={{marginLeft: "10px", fontSize: '14px'}}>添加系统薪资项目</span>
|
<span style={{marginLeft: "10px", fontSize: '14px'}}>添加系统薪资项目</span>
|
||||||
<div style={{float: "right", marginRight: "40px"}}>
|
<div style={{float: "right", marginRight: "40px"}}>
|
||||||
<Button type="primary" style={{marginRight: '10px'}} onClick={() => {handleAdd()}}>添加</Button>
|
<Button type="primary" style={{marginRight: '10px'}} onClick={() => {
|
||||||
<WeaInputSearch value={searchValue} onChange={(value) => {this.handleSearchChange(value)}} onSearch={(value) => {
|
handleAdd()
|
||||||
|
}}>添加</Button>
|
||||||
|
<WeaInputSearch value={searchValue} onChange={(value) => {
|
||||||
|
this.handleSearchChange(value)
|
||||||
|
}} onSearch={(value) => {
|
||||||
this.handleSearch(value)
|
this.handleSearch(value)
|
||||||
}}/>
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,24 @@
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
import { inject, observer } from 'mobx-react';
|
import { inject, observer } from "mobx-react";
|
||||||
import { toJS } from 'mobx';
|
import { toJS } from "mobx";
|
||||||
|
|
||||||
import { Button, Table, DatePicker, Dropdown, Menu, message } from 'antd';
|
import { Button, DatePicker, Dropdown, Menu, message } from "antd";
|
||||||
|
|
||||||
import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable, WeaSlideModal } from 'ecCom';
|
import { WeaRightMenu, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||||
// import { WeaTableNew } from "comsMobx"
|
// import { WeaTableNew } from "comsMobx"
|
||||||
// const WeaTable = WeaTableNew.WeaTable;
|
// const WeaTable = WeaTableNew.WeaTable;
|
||||||
|
import { getSearchs, renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||||
import { renderNoright, getSearchs } from '../../../util'; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
import BaseForm from "./baseForm";
|
||||||
import CustomTab from '../../../components/customTab';
|
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||||
import ContentWrapper from '../../../components/contentWrapper';
|
import SocialSecurityForm from "./socialSecurityForm";
|
||||||
import BaseForm from './baseForm'
|
import AccumulationFundForm from "./accumulationFundForm";
|
||||||
import SlideModalTitle from '../../../components/slideModalTitle'
|
import OtherForm from "./otherForm";
|
||||||
import SocialSecurityForm from './socialSecurityForm';
|
import CustomPaginationTable from "../../../components/customPaginationTable";
|
||||||
import AccumulationFundForm from './accumulationFundForm';
|
import ImportModal from "../../../components/importModal";
|
||||||
import OtherForm from './otherForm';
|
|
||||||
import { tempateColumns } from '../../payroll/columns';
|
|
||||||
import CustomPaginationTable from '../../../components/customPaginationTable';
|
|
||||||
import ImportModal from '../../../components/importModal';
|
|
||||||
|
|
||||||
const { MonthPicker } = DatePicker;
|
const { MonthPicker } = DatePicker;
|
||||||
|
|
||||||
@inject('archivesStore','taxAgentStore')
|
@inject("archivesStore", "taxAgentStore")
|
||||||
@observer
|
@observer
|
||||||
export default class Archives extends React.Component {
|
export default class Archives extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
@ -37,33 +33,33 @@ export default class Archives extends React.Component {
|
||||||
modalParam: {},
|
modalParam: {},
|
||||||
step: 0,
|
step: 0,
|
||||||
selectedRowKeys: []
|
selectedRowKeys: []
|
||||||
}
|
};
|
||||||
|
|
||||||
this.record = {}
|
this.record = {};
|
||||||
this.pageInfo = {current: 1, pageSize: 10}
|
this.pageInfo = { current: 1, pageSize: 10 };
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
const { archivesStore: {doInit}} = this.props;
|
const { archivesStore: { doInit } } = this.props;
|
||||||
doInit()
|
doInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
handleEdit(record) {
|
handleEdit(record) {
|
||||||
this.record = record
|
this.record = record;
|
||||||
this.setState({employeeId: record.employeeId, editSlideVisible: true})
|
this.setState({ employeeId: record.employeeId, editSlideVisible: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
setStep(step) {
|
setStep(step) {
|
||||||
this.setState({step})
|
this.setState({ step });
|
||||||
}
|
}
|
||||||
|
|
||||||
getColumns() {
|
getColumns() {
|
||||||
const { archivesStore: {tableStore}, taxAgentStore: { showOperateBtn }} = this.props;
|
const { archivesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
let columns = [...tableStore.columns]
|
let columns = [...tableStore.columns];
|
||||||
columns = columns.filter(item => item.hide == "false")
|
columns = columns.filter(item => item.hide == "false");
|
||||||
columns.map(item => {
|
columns.map(item => {
|
||||||
item.width = "150px"
|
item.width = "150px";
|
||||||
})
|
});
|
||||||
columns.push({
|
columns.push({
|
||||||
title: "操作",
|
title: "操作",
|
||||||
dataIndex: "operate",
|
dataIndex: "operate",
|
||||||
|
|
@ -71,99 +67,102 @@ export default class Archives extends React.Component {
|
||||||
width: "100px",
|
width: "100px",
|
||||||
height: "auto",
|
height: "auto",
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return (<a onClick={() => {this.handleEdit(record)}}>{showOperateBtn ? '编辑' : '查看'}</a>)
|
return (<a onClick={() => {
|
||||||
|
this.handleEdit(record);
|
||||||
|
}}>{showOperateBtn ? "编辑" : "查看"}</a>);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
return columns;
|
return columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
handleEditSlideSave() {
|
handleEditSlideSave() {
|
||||||
const { selectedTab } = this.state;
|
const { selectedTab } = this.state;
|
||||||
const { archivesStore: {save}} = this.props;
|
const { archivesStore: { save } } = this.props;
|
||||||
if(selectedTab == 1) {
|
if (selectedTab == 1) {
|
||||||
save("SOCIAL_SECURITY")
|
save("SOCIAL_SECURITY");
|
||||||
} else if(selectedTab == 2) {
|
} else if (selectedTab == 2) {
|
||||||
save("ACCUMULATION_FUND")
|
save("ACCUMULATION_FUND");
|
||||||
} else if(selectedTab == 3) {
|
} else if (selectedTab == 3) {
|
||||||
save("OTHER")
|
save("OTHER");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePageChnage(value) {
|
handlePageChnage(value) {
|
||||||
const { archivesStore: {form, getTableDatas}} = this.props;
|
const { archivesStore: { form, getTableDatas } } = this.props;
|
||||||
this.pageInfo.current = value
|
this.pageInfo.current = value;
|
||||||
getTableDatas(this.pageInfo)
|
getTableDatas(this.pageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导入
|
// 导入
|
||||||
handleBtnImport() {
|
handleBtnImport() {
|
||||||
this.setState({importVisible: true})
|
this.setState({ importVisible: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
// 模板点击
|
// 模板点击
|
||||||
handleTemplateLinkClick(exportData) {
|
handleTemplateLinkClick(exportData) {
|
||||||
const { archivesStore: {exportTempateDownload} } = this.props;
|
const { archivesStore: { exportTempateDownload } } = this.props;
|
||||||
exportTempateDownload({exportData})
|
exportTempateDownload({ exportData });
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导入预览
|
// 导入预览
|
||||||
handlePreviewImport(params) {
|
handlePreviewImport(params) {
|
||||||
const { archivesStore: {previewCurData}} = this.props;
|
const { archivesStore: { previewCurData } } = this.props;
|
||||||
previewCurData(params)
|
previewCurData(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导入
|
// 导入
|
||||||
handleImport(params) {
|
handleImport(params) {
|
||||||
const { archivesStore: {importBatch, initImportParams}} = this.props;
|
const { archivesStore: { importBatch, initImportParams } } = this.props;
|
||||||
importBatch(params)
|
importBatch(params);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导入完成
|
// 导入完成
|
||||||
handleFinish() {
|
handleFinish() {
|
||||||
const { archivesStore: {getTableDatas, initImportParams}} = this.props;
|
const { archivesStore: { getTableDatas, initImportParams } } = this.props;
|
||||||
initImportParams()
|
initImportParams();
|
||||||
this.setState({importVisible: false, step: 0})
|
this.setState({ importVisible: false, step: 0 });
|
||||||
getTableDatas()
|
getTableDatas();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化导入参数
|
// 初始化导入参数
|
||||||
handleInitModal() {
|
handleInitModal() {
|
||||||
const { archivesStore: { setPreviewCurDataColumns, setPreviewCurDataDataSource, setImportResult }} = this.props;
|
const { archivesStore: { setPreviewCurDataColumns, setPreviewCurDataDataSource, setImportResult } } = this.props;
|
||||||
setPreviewCurDataColumns([])
|
setPreviewCurDataColumns([]);
|
||||||
setPreviewCurDataDataSource([])
|
setPreviewCurDataDataSource([]);
|
||||||
setImportResult({})
|
setImportResult({});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选项设置
|
// 选项设置
|
||||||
onSelectChange = selectedRowKeys => {
|
onSelectChange = selectedRowKeys => {
|
||||||
this.setState({ selectedRowKeys });
|
this.setState({ selectedRowKeys });
|
||||||
}
|
};
|
||||||
|
|
||||||
// 关闭导入框
|
// 关闭导入框
|
||||||
handleImportCancel() {
|
handleImportCancel() {
|
||||||
const { archivesStore: {initImportParams, getTableDatas }} = this.props;
|
const { archivesStore: { initImportParams, getTableDatas } } = this.props;
|
||||||
|
|
||||||
initImportParams()
|
initImportParams();
|
||||||
if(this.state.step == 2) {
|
if (this.state.step == 2) {
|
||||||
getTableDatas()
|
getTableDatas();
|
||||||
}
|
}
|
||||||
this.setState({importVisible: false, step: 0});
|
this.setState({ importVisible: false, step: 0 });
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
const { archivesStore: {getTableDatas}} = this.props;
|
const { archivesStore: { getTableDatas } } = this.props;
|
||||||
getTableDatas({...this.pageInfo, current: 1})
|
getTableDatas({ ...this.pageInfo, current: 1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { archivesStore, taxAgentStore: { showOperateBtn } } = this.props;
|
const { archivesStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const { selectedTab, selectedRowKeys } = this.state;
|
const { selectedTab, selectedRowKeys } = this.state;
|
||||||
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd,
|
const {
|
||||||
|
loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd,
|
||||||
previewCurDataColumns, previewCurDataDataSource, importResult, initImportParams
|
previewCurDataColumns, previewCurDataDataSource, importResult, initImportParams
|
||||||
} = archivesStore;
|
} = archivesStore;
|
||||||
const { dataSource, pageInfo } = archivesStore
|
const { dataSource, pageInfo } = archivesStore;
|
||||||
if (!hasRight && !loading) { // 无权限处理
|
if (!hasRight && !loading) { // 无权限处理
|
||||||
return renderNoright();
|
return renderNoright();
|
||||||
}
|
}
|
||||||
|
|
@ -177,41 +176,42 @@ export default class Archives extends React.Component {
|
||||||
// },
|
// },
|
||||||
];
|
];
|
||||||
const collectParams = { // 收藏功能配置
|
const collectParams = { // 收藏功能配置
|
||||||
favname: '社保福利档案',
|
favname: "社保福利档案",
|
||||||
favouritetype: 1,
|
favouritetype: 1,
|
||||||
objid: 0,
|
objid: 0,
|
||||||
link: 'wui/index.html#/ns_demo03/index',
|
link: "wui/index.html#/ns_demo03/index",
|
||||||
importantlevel: 1,
|
importantlevel: 1
|
||||||
};
|
};
|
||||||
const adBtn = [ // 高级搜索内部按钮
|
const adBtn = [ // 高级搜索内部按钮
|
||||||
<Button type="primary" onClick={doSearch}>搜索</Button>,
|
<Button type="primary" onClick={doSearch}>搜索</Button>,
|
||||||
<Button type="ghost" onClick={() => form.resetForm()}>重置</Button>,
|
<Button type="ghost" onClick={() => form.resetForm()}>重置</Button>,
|
||||||
<Button type="ghost" onClick={() => setShowSearchAd(false)}>取消</Button>,
|
<Button type="ghost" onClick={() => setShowSearchAd(false)}>取消</Button>
|
||||||
];
|
];
|
||||||
|
|
||||||
const topTab = [
|
const topTab = [];
|
||||||
];
|
|
||||||
|
|
||||||
// 导出全部
|
// 导出全部
|
||||||
const handleButtonClick = () => {
|
const handleButtonClick = () => {
|
||||||
const { archivesStore:{exportArchives}} = this.props;
|
const { archivesStore: { exportArchives } } = this.props;
|
||||||
exportArchives()
|
exportArchives();
|
||||||
}
|
};
|
||||||
|
|
||||||
// 导出选中
|
// 导出选中
|
||||||
const handleMenuClick = () => {
|
const handleMenuClick = () => {
|
||||||
const { selectedRowKeys } = this.state;
|
const { selectedRowKeys } = this.state;
|
||||||
if(selectedRowKeys.length == 0) {
|
if (selectedRowKeys.length == 0) {
|
||||||
message.warning("未选择任何条目", 1);
|
message.warning("未选择任何条目", 1);
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
let ids = selectedRowKeys.join(",")
|
let ids = selectedRowKeys.join(",");
|
||||||
const { archivesStore:{exportArchives}} = this.props;
|
const { archivesStore: { exportArchives } } = this.props;
|
||||||
exportArchives(ids)
|
exportArchives(ids);
|
||||||
}
|
};
|
||||||
|
|
||||||
const btns = [
|
const btns = [
|
||||||
<Button type="primary" onClick={() => { this.handleBtnImport() }}>导入</Button>,
|
<Button type="primary" onClick={() => {
|
||||||
|
this.handleBtnImport();
|
||||||
|
}}>导入</Button>,
|
||||||
<Dropdown.Button onClick={handleButtonClick} overlay={
|
<Dropdown.Button onClick={handleButtonClick} overlay={
|
||||||
<Menu onClick={handleMenuClick}>
|
<Menu onClick={handleMenuClick}>
|
||||||
<Menu.Item key="1">导出选中</Menu.Item>
|
<Menu.Item key="1">导出选中</Menu.Item>
|
||||||
|
|
@ -219,16 +219,16 @@ export default class Archives extends React.Component {
|
||||||
} type="ghost">
|
} type="ghost">
|
||||||
导出全部
|
导出全部
|
||||||
</Dropdown.Button>
|
</Dropdown.Button>
|
||||||
]
|
];
|
||||||
|
|
||||||
|
|
||||||
const renderSearchOperationItem = () => {
|
const renderSearchOperationItem = () => {
|
||||||
return <div></div>
|
return <div></div>;
|
||||||
}
|
};
|
||||||
|
|
||||||
const rowSelection = {
|
const rowSelection = {
|
||||||
selectedRowKeys,
|
selectedRowKeys,
|
||||||
onChange: this.onSelectChange,
|
onChange: this.onSelectChange
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -239,8 +239,8 @@ export default class Archives extends React.Component {
|
||||||
>
|
>
|
||||||
<WeaTop
|
<WeaTop
|
||||||
title="社保福利档案" // 文字
|
title="社保福利档案" // 文字
|
||||||
icon={<i className='icon-coms-meeting' />} // 左侧图标
|
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||||
iconBgcolor='#F14A2D' // 左侧图标背景色
|
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||||
showDropIcon={true} // 是否显示下拉按钮
|
showDropIcon={true} // 是否显示下拉按钮
|
||||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||||
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
|
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
|
||||||
|
|
@ -248,15 +248,18 @@ export default class Archives extends React.Component {
|
||||||
>
|
>
|
||||||
|
|
||||||
<WeaTab
|
<WeaTab
|
||||||
searchType={['base', 'advanced']} // base:基础搜索框 advanced:显示高级搜索按钮
|
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||||
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||||
setShowSearchAd={bool => setShowSearchAd(bool)} //高级搜索面板受控
|
setShowSearchAd={bool => setShowSearchAd(bool)} //高级搜索面板受控
|
||||||
searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据
|
searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据
|
||||||
buttonsAd={adBtn} // 高级搜索内部按钮
|
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||||
onSearch={() => {this.handleSearch()}} // 点搜索按钮时的回调
|
searchsBasePlaceHolder={"请输入姓名"}
|
||||||
onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
|
onSearch={() => {
|
||||||
searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
|
this.handleSearch();
|
||||||
/>
|
}} // 点搜索按钮时的回调
|
||||||
|
onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
|
||||||
|
searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
|
||||||
|
/>
|
||||||
{/* <WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
{/* <WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
||||||
comsWeaTableStore={tableStore} // table store
|
comsWeaTableStore={tableStore} // table store
|
||||||
hasOrder={true} // 是否启用排序
|
hasOrder={true} // 是否启用排序
|
||||||
|
|
@ -273,89 +276,106 @@ export default class Archives extends React.Component {
|
||||||
total={pageInfo.total}
|
total={pageInfo.total}
|
||||||
current={pageInfo.pageNum}
|
current={pageInfo.pageNum}
|
||||||
pageSize={this.pageInfo.pageSize}
|
pageSize={this.pageInfo.pageSize}
|
||||||
scroll={{ x: this.getColumns().length > 0 ? this.getColumns().length * 150: 1000 }}
|
scroll={{ x: this.getColumns().length > 0 ? this.getColumns().length * 150 : 1000 }}
|
||||||
onPageChange={(value) => {
|
onPageChange={(value) => {
|
||||||
this.handlePageChnage(value)
|
this.handlePageChnage(value);
|
||||||
}}
|
}}
|
||||||
onShowSizeChange={(current, pageSize) => {
|
onShowSizeChange={(current, pageSize) => {
|
||||||
this.pageInfo = {current, pageSize}
|
this.pageInfo = { current, pageSize };
|
||||||
getTableDatas(this.pageInfo)
|
getTableDatas(this.pageInfo);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</WeaTop>
|
</WeaTop>
|
||||||
</WeaRightMenu>
|
</WeaRightMenu>
|
||||||
|
|
||||||
{
|
{
|
||||||
this.state.editSlideVisible &&
|
this.state.editSlideVisible &&
|
||||||
<WeaSlideModal visible={this.state.editSlideVisible}
|
<WeaSlideModal visible={this.state.editSlideVisible}
|
||||||
top={0}
|
top={0}
|
||||||
width={40}
|
width={40}
|
||||||
height={100}
|
height={100}
|
||||||
direction={'right'}
|
direction={"right"}
|
||||||
measure={'%'}
|
measure={"%"}
|
||||||
title={
|
title={
|
||||||
<SlideModalTitle
|
<SlideModalTitle
|
||||||
subtitle={"员工福利档案"}
|
subtitle={"员工福利档案"}
|
||||||
tabs={[{title: '基础设置', key: 0}, {title: "社保", key: 1}, {title: "公积金", key: 2}, {title: '企业年金及其他福利', key: 3}]}
|
tabs={[{ title: "基础设置", key: 0 }, { title: "社保", key: 1 }, {
|
||||||
editable={false}
|
title: "公积金",
|
||||||
selectedTab={selectedTab}
|
key: 2
|
||||||
showOperateBtn={showOperateBtn}
|
}, { title: "企业年金及其他福利", key: 3 }]}
|
||||||
customOperate={
|
editable={false}
|
||||||
<div>
|
selectedTab={selectedTab}
|
||||||
{
|
showOperateBtn={showOperateBtn}
|
||||||
showOperateBtn && selectedTab != 0 && <Button type="primary" onClick={() => {this.handleEditSlideSave()}}>保存</Button>
|
customOperate={
|
||||||
}
|
<div>
|
||||||
</div>
|
{
|
||||||
}
|
showOperateBtn && selectedTab != 0 && <Button type="primary" onClick={() => {
|
||||||
subItemChange={
|
this.handleEditSlideSave();
|
||||||
(item) => {this.setState({selectedTab: item.key})}
|
}}>保存</Button>
|
||||||
}
|
}
|
||||||
/>
|
</div>
|
||||||
}
|
}
|
||||||
content={<div>
|
subItemChange={
|
||||||
{
|
(item) => {
|
||||||
selectedTab == 0 && <BaseForm employeeId={this.state.employeeId}/>
|
this.setState({ selectedTab: item.key });
|
||||||
}
|
}
|
||||||
{
|
}
|
||||||
selectedTab == 1 && <SocialSecurityForm employeeId={this.state.employeeId} record={this.record}/>
|
/>
|
||||||
}
|
}
|
||||||
{
|
content={<div>
|
||||||
selectedTab == 2 && <AccumulationFundForm employeeId={this.state.employeeId} record={this.record}/>
|
{
|
||||||
}
|
selectedTab == 0 && <BaseForm employeeId={this.state.employeeId}/>
|
||||||
{
|
}
|
||||||
selectedTab == 3 && <OtherForm employeeId={this.state.employeeId} record={this.record}/>
|
{
|
||||||
}
|
selectedTab == 1 &&
|
||||||
|
<SocialSecurityForm employeeId={this.state.employeeId} record={this.record}/>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
selectedTab == 2 &&
|
||||||
|
<AccumulationFundForm employeeId={this.state.employeeId} record={this.record}/>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
selectedTab == 3 && <OtherForm employeeId={this.state.employeeId} record={this.record}/>
|
||||||
|
}
|
||||||
|
|
||||||
</div>}
|
</div>}
|
||||||
onClose={() => this.setState({editSlideVisible: false})}
|
onClose={() => this.setState({ editSlideVisible: false })}
|
||||||
showMask={true}
|
showMask={true}
|
||||||
closeMaskOnClick={() => this.setState({editSlideVisible: false})} />
|
closeMaskOnClick={() => this.setState({ editSlideVisible: false })}/>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
this.state.importVisible && <ImportModal
|
this.state.importVisible && <ImportModal
|
||||||
init={() => {
|
init={() => {
|
||||||
this.handleInitModal()
|
this.handleInitModal();
|
||||||
}}
|
}}
|
||||||
params={this.state.modalParam}
|
params={this.state.modalParam}
|
||||||
columns={previewCurDataColumns}
|
columns={previewCurDataColumns}
|
||||||
step={this.state.step}
|
step={this.state.step}
|
||||||
setStep={this.setStep.bind(this)}
|
setStep={this.setStep.bind(this)}
|
||||||
// isInit 暂时去掉导入带数据的
|
isInit
|
||||||
slideDataSource={previewCurDataDataSource}
|
slideDataSource={previewCurDataDataSource}
|
||||||
importResult={importResult}
|
importResult={importResult}
|
||||||
onFinish={() => {this.handleFinish()}}
|
onFinish={() => {
|
||||||
previewImport={(params) => {this.handlePreviewImport(params)}}
|
this.handleFinish();
|
||||||
importFile={(params) => {this.handleImport(params);}}
|
}}
|
||||||
templateLink={(exportData) => {this.handleTemplateLinkClick(exportData)}}
|
previewImport={(params) => {
|
||||||
visiable={this.state.importVisible}
|
this.handlePreviewImport(params);
|
||||||
onCancel={() => {
|
}}
|
||||||
this.handleImportCancel()
|
importFile={(params) => {
|
||||||
|
this.handleImport(params);
|
||||||
|
}}
|
||||||
|
templateLink={(exportData) => {
|
||||||
|
this.handleTemplateLinkClick(exportData);
|
||||||
|
}}
|
||||||
|
visiable={this.state.importVisible}
|
||||||
|
onCancel={() => {
|
||||||
|
this.handleImportCancel();
|
||||||
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,15 @@ export default class CustomNewModal extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const { programmeStore: {customRequest, setCustomRequest}} = this.props;
|
const { programmeStore: {customRequest, setCustomRequest}} = this.props;
|
||||||
return (
|
return (
|
||||||
<Modal visible={this.props.visible} onCancel={() => {this.props.onCancel()}} title="新建自定义福利" onOk={() => {this.handleOK()}}>
|
<Modal visible={this.props.visible} onCancel={() => {
|
||||||
|
this.props.onCancel()
|
||||||
|
}} title="新建自定义福利" onOk={() => {
|
||||||
|
this.handleOK()
|
||||||
|
}}>
|
||||||
{/* {getCustomSearchs(this.props.form, toJS(this.props.condition), 1)} */}
|
{/* {getCustomSearchs(this.props.form, toJS(this.props.condition), 1)} */}
|
||||||
<CustomForm condition={this.props.condition} disable={this.props.edit ? ['paymentScope', 'welfareType'] : null} request={customRequest} onChange={(value) => {setCustomRequest(value)}}/>
|
<CustomForm condition={this.props.condition} disable={this.props.edit ? ['paymentScope', 'welfareType'] : null} request={customRequest} onChange={(value) => {
|
||||||
|
setCustomRequest(value)
|
||||||
|
}}/>
|
||||||
</Modal>
|
</Modal>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -113,14 +113,14 @@ export default class Programme extends React.Component {
|
||||||
</a>
|
</a>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
{/*暂时隐藏*/}
|
{/*暂时隐藏*/}
|
||||||
{/*<Menu.Item>*/}
|
<Menu.Item>
|
||||||
{/* <a*/}
|
<a
|
||||||
{/* onClick={() => {*/}
|
onClick={() => {
|
||||||
{/* this.onDelete(record);*/}
|
this.onDelete(record);
|
||||||
{/* }}>*/}
|
}}>
|
||||||
{/* 删除*/}
|
删除
|
||||||
{/* </a>*/}
|
</a>
|
||||||
{/*</Menu.Item>*/}
|
</Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
}>
|
}>
|
||||||
<i className="icon-coms-more"/>
|
<i className="icon-coms-more"/>
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,9 @@ export default class AbnormalDrawer extends Component {
|
||||||
dataSource={this.props.dataSource}
|
dataSource={this.props.dataSource}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{
|
pagination={{
|
||||||
onChange: (value) => {this.props.onPageChange(value)},
|
onChange: (value) => {
|
||||||
|
this.props.onPageChange(value)
|
||||||
|
},
|
||||||
total: this.props.total,
|
total: this.props.total,
|
||||||
showTotal: (total) => `共 ${total} 条`,
|
showTotal: (total) => `共 ${total} 条`,
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
* LastEditTime: 2022-05-09 15:07:19
|
* LastEditTime: 2022-05-09 15:07:19
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { Icon, Tooltip, Button, Spin } from "antd";
|
import { Button, Icon, Spin, Tooltip } from "antd";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaBrowser, WeaTable, WeaInputSearch } from "ecCom";
|
import { WeaInputSearch, WeaTable } from "ecCom";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
@inject("standingBookStore")
|
@inject("standingBookStore")
|
||||||
|
|
@ -22,8 +22,8 @@ export default class AbnormalListIndex extends Component {
|
||||||
tableData: {
|
tableData: {
|
||||||
list: [],
|
list: [],
|
||||||
columns: [],
|
columns: [],
|
||||||
total: 0,
|
total: 0
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -39,8 +39,8 @@ export default class AbnormalListIndex extends Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
tableData: {
|
tableData: {
|
||||||
list,
|
list,
|
||||||
total,
|
total
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -50,6 +50,7 @@ export default class AbnormalListIndex extends Component {
|
||||||
const { current } = this.state;
|
const { current } = this.state;
|
||||||
this.getChangeList({ billMonth, current, userName: value });
|
this.getChangeList({ billMonth, current, userName: value });
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { remarks, billMonth, selectedKey } = this.props;
|
const { remarks, billMonth, selectedKey } = this.props;
|
||||||
const { selectedRowKeys } = this.state;
|
const { selectedRowKeys } = this.state;
|
||||||
|
|
@ -66,7 +67,7 @@ export default class AbnormalListIndex extends Component {
|
||||||
onChange: (current) => {
|
onChange: (current) => {
|
||||||
this.setState({ current });
|
this.setState({ current });
|
||||||
this.getChangeList({ billMonth, current });
|
this.getChangeList({ billMonth, current });
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<div className="normalWapper">
|
<div className="normalWapper">
|
||||||
|
|
@ -77,7 +78,7 @@ export default class AbnormalListIndex extends Component {
|
||||||
<Tooltip
|
<Tooltip
|
||||||
placement="topLeft"
|
placement="topLeft"
|
||||||
title="提示:列表显示未维护缴纳起始月的账单月入职人员(不在系统缴纳范围内,可添加到缴纳范围)和有缴纳起始月未维护缴纳最后月的账单月离职人员(在系统缴纳范围内,可从缴纳范围移除)。">
|
title="提示:列表显示未维护缴纳起始月的账单月入职人员(不在系统缴纳范围内,可添加到缴纳范围)和有缴纳起始月未维护缴纳最后月的账单月离职人员(在系统缴纳范围内,可从缴纳范围移除)。">
|
||||||
<Icon type="question-circle" />
|
<Icon type="question-circle"/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</span>
|
</span>
|
||||||
<span>{billMonth}</span>
|
<span>{billMonth}</span>
|
||||||
|
|
@ -85,7 +86,15 @@ export default class AbnormalListIndex extends Component {
|
||||||
</div>
|
</div>
|
||||||
<div className="tabOption">
|
<div className="tabOption">
|
||||||
<Button>导出全部</Button>
|
<Button>导出全部</Button>
|
||||||
<WeaInputSearch value={this.state.searchValue} onChange={(value) => {this.setState({searchValue: value})}} onSearch={(value) => {this.handleSearch(value)}}/>
|
<WeaInputSearch value={this.state.searchValue}
|
||||||
|
placeholder={"请输入姓名"}
|
||||||
|
onChange={(value) => {
|
||||||
|
this.setState({ searchValue: value });
|
||||||
|
}}
|
||||||
|
onSearch={(value) => {
|
||||||
|
this.handleSearch(value);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/* table */}
|
{/* table */}
|
||||||
<div style={{ padding: "0 16px" }}>
|
<div style={{ padding: "0 16px" }}>
|
||||||
|
|
|
||||||
|
|
@ -487,6 +487,7 @@ export default class NormalIndex extends Component {
|
||||||
onChange={value => {
|
onChange={value => {
|
||||||
this.setState({ searchValue: value });
|
this.setState({ searchValue: value });
|
||||||
}}
|
}}
|
||||||
|
placeholder={"请输入姓名"}
|
||||||
onSearch={value => {
|
onSearch={value => {
|
||||||
this.handleSearch(value);
|
this.handleSearch(value);
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,9 @@ export default class EditSlideContent extends React.Component {
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
bordered
|
bordered
|
||||||
type="number"
|
type="number"
|
||||||
addItem={() => {this.addItem()}}
|
addItem={() => {
|
||||||
|
this.addItem()
|
||||||
|
}}
|
||||||
onDataSourceChange={setDataSource}
|
onDataSourceChange={setDataSource}
|
||||||
editable={this.state.editable}
|
editable={this.state.editable}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,9 @@ export default class TaxRate extends React.Component {
|
||||||
let valueSpan = record[newColumn.dataIndex + "span"] !== undefined ? record[newColumn.dataIndex + "span"] : record[newColumn.dataIndex];
|
let valueSpan = record[newColumn.dataIndex + "span"] !== undefined ? record[newColumn.dataIndex + "span"] : record[newColumn.dataIndex];
|
||||||
switch(newColumn.dataIndex) {
|
switch(newColumn.dataIndex) {
|
||||||
case "name":
|
case "name":
|
||||||
return <a onClick={() => {this.onEdit(record, false)}}
|
return <a onClick={() => {
|
||||||
|
this.onEdit(record, false)
|
||||||
|
}}
|
||||||
dangerouslySetInnerHTML={{ __html: valueSpan }} />
|
dangerouslySetInnerHTML={{ __html: valueSpan }} />
|
||||||
default:
|
default:
|
||||||
return <div dangerouslySetInnerHTML={{ __html: valueSpan }} />
|
return <div dangerouslySetInnerHTML={{ __html: valueSpan }} />
|
||||||
|
|
@ -137,7 +139,9 @@ export default class TaxRate extends React.Component {
|
||||||
{' '}
|
{' '}
|
||||||
<WeaInputSearch
|
<WeaInputSearch
|
||||||
placeholder={'请输入个税税率表名称'}
|
placeholder={'请输入个税税率表名称'}
|
||||||
onSearch={(name) => {doSearch({name})}}
|
onSearch={(name) => {
|
||||||
|
doSearch({name})
|
||||||
|
}}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -190,7 +194,9 @@ export default class TaxRate extends React.Component {
|
||||||
<SlideModalTitle
|
<SlideModalTitle
|
||||||
subtitle={!this.state.editable ? "查看个税税率表" : this.state.currentOperate == "add" ? "新建个税税率表" : "编辑个税税率表" }
|
subtitle={!this.state.editable ? "查看个税税率表" : this.state.currentOperate == "add" ? "新建个税税率表" : "编辑个税税率表" }
|
||||||
subTabs={[{title: "基础设置"}]}
|
subTabs={[{title: "基础设置"}]}
|
||||||
onSave={() => {this.state.currentOperate == "add" ? doSave() : doUpdate()}}
|
onSave={() => {
|
||||||
|
this.state.currentOperate == "add" ? doSave() : doUpdate()
|
||||||
|
}}
|
||||||
editable={this.state.editable}
|
editable={this.state.editable}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
import { observable, action, toJS } from 'mobx';
|
import { action, observable } from "mobx";
|
||||||
import { message } from 'antd';
|
import { message } from "antd";
|
||||||
import { WeaForm, WeaTableNew } from 'comsMobx';
|
import { WeaForm, WeaTableNew } from "comsMobx";
|
||||||
|
|
||||||
import * as API from '../apis/calculate'; // 引入API接口文件
|
import * as API from "../apis/calculate";
|
||||||
import { empFieldList } from '../apis/ledger';
|
|
||||||
|
|
||||||
const { TableStore } = WeaTableNew;
|
const { TableStore } = WeaTableNew;
|
||||||
|
|
||||||
|
|
@ -18,8 +17,8 @@ export class calculateStore {
|
||||||
// ** 薪资核算列表 **
|
// ** 薪资核算列表 **
|
||||||
@observable salaryListDataSource = [];
|
@observable salaryListDataSource = [];
|
||||||
@observable salaryListColumns = [];
|
@observable salaryListColumns = [];
|
||||||
@observable calculateBaseForm = {}
|
@observable calculateBaseForm = {};
|
||||||
@observable salaryListPageInfo = {}
|
@observable salaryListPageInfo = {};
|
||||||
|
|
||||||
// ** 核算信息页 ***
|
// ** 核算信息页 ***
|
||||||
// 核算人员
|
// 核算人员
|
||||||
|
|
@ -31,14 +30,14 @@ export class calculateStore {
|
||||||
@observable reducedemployeeListColumns = []; // 列
|
@observable reducedemployeeListColumns = []; // 列
|
||||||
@observable reducedemployeeListPageInfo = {}; // 分页信息
|
@observable reducedemployeeListPageInfo = {}; // 分页信息
|
||||||
// 薪资周期、考勤周期
|
// 薪资周期、考勤周期
|
||||||
@observable baseSalarySobCycle = {}
|
@observable baseSalarySobCycle = {};
|
||||||
|
|
||||||
// *** 薪资核算 ***
|
// *** 薪资核算 ***
|
||||||
// 核算结果--列表
|
// 核算结果--列表
|
||||||
@observable acctResultListDateSource = []; // dataSource
|
@observable acctResultListDateSource = []; // dataSource
|
||||||
@observable acctResultListColumns = []; // 列
|
@observable acctResultListColumns = []; // 列
|
||||||
@observable acctresultDetailForm = {}; // 编辑薪资表单数据
|
@observable acctresultDetailForm = {}; // 编辑薪资表单数据
|
||||||
@observable acctResultListTableStore = new TableStore()
|
@observable acctResultListTableStore = new TableStore();
|
||||||
@observable acctResultListPageInfo = {}; // 分页信息
|
@observable acctResultListPageInfo = {}; // 分页信息
|
||||||
// 导入
|
// 导入
|
||||||
@observable importFieldData = {}; // 表头选择列表
|
@observable importFieldData = {}; // 表头选择列表
|
||||||
|
|
@ -56,51 +55,56 @@ export class calculateStore {
|
||||||
@observable comparisonImportAcctResult = {}; // 导入结果
|
@observable comparisonImportAcctResult = {}; // 导入结果
|
||||||
@observable comparisonResultColumns = []; // 表头
|
@observable comparisonResultColumns = []; // 表头
|
||||||
|
|
||||||
// ** 核算进度 **
|
// ** 核算进度 **
|
||||||
@observable calculateProgress = 0;
|
@observable calculateProgress = 0;
|
||||||
|
|
||||||
|
// ** 列表说明数据 **
|
||||||
|
@observable columnDescList = {};
|
||||||
|
|
||||||
// ** 设置导入参数 **
|
|
||||||
|
// ** 设置导入参数 **
|
||||||
@action
|
@action
|
||||||
setPreviewAcctResultColumns = (previewAcctResultColumns) => {
|
setPreviewAcctResultColumns = (previewAcctResultColumns) => {
|
||||||
this.previewAcctResultColumns = previewAcctResultColumns
|
this.previewAcctResultColumns = previewAcctResultColumns;
|
||||||
}
|
};
|
||||||
|
|
||||||
@action
|
@action
|
||||||
setPreviewAcctResultDataSource = previewAcctResultDataSource => {
|
setPreviewAcctResultDataSource = previewAcctResultDataSource => {
|
||||||
this.previewAcctResultDataSource = previewAcctResultDataSource;
|
this.previewAcctResultDataSource = previewAcctResultDataSource;
|
||||||
}
|
};
|
||||||
|
|
||||||
@action
|
@action
|
||||||
setImportAcctResult = importAcctResult => {
|
setImportAcctResult = importAcctResult => {
|
||||||
this.importAcctResult = importAcctResult;
|
this.importAcctResult = importAcctResult;
|
||||||
}
|
};
|
||||||
|
|
||||||
@action
|
@action
|
||||||
setComparisonPreviewColumns = comparisonPreviewColumns => {
|
setComparisonPreviewColumns = comparisonPreviewColumns => {
|
||||||
this.comparisonPreviewColumns = comparisonPreviewColumns;
|
this.comparisonPreviewColumns = comparisonPreviewColumns;
|
||||||
}
|
};
|
||||||
|
|
||||||
@action
|
@action
|
||||||
setComparisonPreviewDataSource = comparisonPreviewDataSource => {
|
setComparisonPreviewDataSource = comparisonPreviewDataSource => {
|
||||||
this.comparisonPreviewDataSource = comparisonPreviewDataSource
|
this.comparisonPreviewDataSource = comparisonPreviewDataSource;
|
||||||
}
|
};
|
||||||
|
|
||||||
@action
|
@action
|
||||||
setComparisonImportAcctResult = comparisonImportAcctResult => {
|
setComparisonImportAcctResult = comparisonImportAcctResult => {
|
||||||
this.comparisonImportAcctResult = comparisonImportAcctResult
|
this.comparisonImportAcctResult = comparisonImportAcctResult;
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
// 编辑薪资表单数据
|
// 编辑薪资表单数据
|
||||||
@action
|
@action
|
||||||
setAcctresultDetailForm = (acctresultDetailForm) => {this.acctresultDetailForm = acctresultDetailForm}
|
setAcctresultDetailForm = (acctresultDetailForm) => {
|
||||||
|
this.acctresultDetailForm = acctresultDetailForm;
|
||||||
|
};
|
||||||
// 初始化操作
|
// 初始化操作
|
||||||
@action
|
@action
|
||||||
doInit = () => {
|
doInit = () => {
|
||||||
this.getCondition();
|
this.getCondition();
|
||||||
this.getTableDatas();
|
this.getTableDatas();
|
||||||
}
|
};
|
||||||
|
|
||||||
// 获得高级搜索表单数据
|
// 获得高级搜索表单数据
|
||||||
@action
|
@action
|
||||||
|
|
@ -110,10 +114,10 @@ export class calculateStore {
|
||||||
this.condition = res.condition;
|
this.condition = res.condition;
|
||||||
this.form.initFormFields(res.condition); // 渲染高级搜索form表单
|
this.form.initFormFields(res.condition); // 渲染高级搜索form表单
|
||||||
} else {
|
} else {
|
||||||
message.error(res.msg || '接口调用失败!')
|
message.error(res.msg || "接口调用失败!");
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
};
|
||||||
|
|
||||||
// 渲染table数据
|
// 渲染table数据
|
||||||
@action
|
@action
|
||||||
|
|
@ -126,11 +130,11 @@ export class calculateStore {
|
||||||
this.tableStore.getDatas(res.datas); // table 请求数据
|
this.tableStore.getDatas(res.datas); // table 请求数据
|
||||||
this.hasRight = res.hasRight;
|
this.hasRight = res.hasRight;
|
||||||
} else {
|
} else {
|
||||||
message.error(res.msg || '接口调用失败!')
|
message.error(res.msg || "接口调用失败!");
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}));
|
}));
|
||||||
}
|
};
|
||||||
|
|
||||||
@action
|
@action
|
||||||
setShowSearchAd = bool => this.showSearchAd = bool;
|
setShowSearchAd = bool => this.showSearchAd = bool;
|
||||||
|
|
@ -139,472 +143,516 @@ export class calculateStore {
|
||||||
@action doSearch = () => {
|
@action doSearch = () => {
|
||||||
this.getTableDatas();
|
this.getTableDatas();
|
||||||
this.showSearchAd = false;
|
this.showSearchAd = false;
|
||||||
}
|
};
|
||||||
|
|
||||||
// 薪资记录--薪资核算列表
|
// 薪资记录--薪资核算列表
|
||||||
@action
|
@action
|
||||||
getSalaryAcctList = (params = {}) => {
|
getSalaryAcctList = (params = {}) => {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
API.getSalaryAcctList(params).then(res => {
|
API.getSalaryAcctList(params).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.salaryListDataSource = res.data.list;
|
this.salaryListDataSource = res.data.list;
|
||||||
this.salaryListColumns = res.data.columns
|
this.salaryListColumns = res.data.columns;
|
||||||
this.salaryListPageInfo = res.data
|
this.salaryListPageInfo = res.data;
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || '获取失败');
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false;
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 薪资记录--保存薪资核算的基本信息
|
// 薪资记录--保存薪资核算的基本信息
|
||||||
@action
|
@action
|
||||||
saveBasic = (params = {}) => {
|
saveBasic = (params = {}) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.saveBasic(params).then(res => {
|
API.saveBasic(params).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
message.success("保存成功");
|
message.success("保存成功");
|
||||||
resolve(res.data)
|
resolve(res.data);
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "保存失败")
|
message.error(res.errormsg || "保存失败");
|
||||||
reject()
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
// 薪资记录--薪资核算详情
|
// 薪资记录--薪资核算详情
|
||||||
@action
|
@action
|
||||||
salaryacctGetForm = (id) => {
|
salaryacctGetForm = (id) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.salaryacctGetForm({id}).then(res => {
|
API.salaryacctGetForm({ id }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.calculateBaseForm = res.data
|
this.calculateBaseForm = res.data;
|
||||||
resolve(res.data)
|
resolve(res.data);
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
reject()
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 核算人员--薪资核算人员确认列表
|
// 核算人员--薪资核算人员确认列表
|
||||||
@action
|
@action
|
||||||
acctemployeeList = (params) => {
|
acctemployeeList = (params) => {
|
||||||
API.acctemployeeList(params).then((res) => {
|
const { departmentIds = "", positionIds = "", ...extraParams } = params || {};
|
||||||
if(res.status) {
|
params = {
|
||||||
this.acctemployeeListDataSource = res.data.list ? res.data.list : []
|
...extraParams,
|
||||||
this.acctemployeeListColumns = res.data.columns;
|
departmentIds: departmentIds ? departmentIds.split(",") : undefined,
|
||||||
this.acctemployeeListPageInfo = res.data
|
positionIds: positionIds ? positionIds.split(",") : undefined
|
||||||
} else {
|
};
|
||||||
message.error(res.errormsg || "获取失败")
|
for (let key in params) {
|
||||||
|
if (params[key] === "") {
|
||||||
|
delete params[key];
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
API.acctemployeeList(params).then((res) => {
|
||||||
|
if (res.status) {
|
||||||
|
this.acctemployeeListDataSource = res.data.list ? res.data.list : [];
|
||||||
|
this.acctemployeeListColumns = res.data.columns;
|
||||||
|
this.acctemployeeListPageInfo = res.data;
|
||||||
|
} else {
|
||||||
|
message.error(res.errormsg || "获取失败");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 核算人员--检查薪资核算人员的个税扣缴义务人
|
// 核算人员--检查薪资核算人员的个税扣缴义务人
|
||||||
@action
|
@action
|
||||||
checkTaxAgent = (id = "") => {
|
checkTaxAgent = (id = "") => {
|
||||||
API.checkTaxAgent({salaryAcctRecordId: id}).then(res => {
|
API.checkTaxAgent({ salaryAcctRecordId: id }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败");
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 核算人员--薪资核算环比上期减少人员列表
|
// 核算人员--薪资核算环比上期减少人员列表
|
||||||
@action
|
@action
|
||||||
reducedemployeeList = (params) => {
|
reducedemployeeList = (params) => {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
API.reducedemployeeList(params).then(res => {
|
const { departmentIds = "", positionIds = "", ...extraParams } = params || {};
|
||||||
if(res.status) {
|
params = {
|
||||||
this.reducedemployeeListDataSource = res.data.list ? res.data.list: [];
|
...extraParams,
|
||||||
this.reducedemployeeListColumns = res.data.columns;
|
departmentIds: departmentIds ? departmentIds.split(",") : undefined,
|
||||||
this.reducedemployeeListPageInfo = res.data
|
positionIds: positionIds ? positionIds.split(",") : undefined
|
||||||
} else {
|
};
|
||||||
message.error(res.errormsg || "获取失败")
|
for (let key in params) {
|
||||||
|
if (params[key] === "") {
|
||||||
|
delete params[key];
|
||||||
}
|
}
|
||||||
this.loading = false
|
}
|
||||||
})
|
API.reducedemployeeList(params).then(res => {
|
||||||
}
|
if (res.status) {
|
||||||
|
this.reducedemployeeListDataSource = res.data.list ? res.data.list : [];
|
||||||
|
this.reducedemployeeListColumns = res.data.columns;
|
||||||
|
this.reducedemployeeListPageInfo = res.data;
|
||||||
|
} else {
|
||||||
|
message.error(res.errormsg || "获取失败");
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// 薪资记录--获取薪资核算的薪资周期、考勤周期等
|
// 薪资记录--获取薪资核算的薪资周期、考勤周期等
|
||||||
@action
|
@action
|
||||||
getSalarySobCycle = (id = "") => {
|
getSalarySobCycle = (id = "") => {
|
||||||
API.getSalarySobCycle({salaryAcctRecordId: id}).then(res => {
|
API.getSalarySobCycle({ salaryAcctRecordId: id }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.baseSalarySobCycle = res.data
|
this.baseSalarySobCycle = res.data;
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 核算人员--添加薪资核算人员
|
// 核算人员--添加薪资核算人员
|
||||||
@action
|
@action
|
||||||
saveAcctemployee = (salaryAcctRecordId, employeeIds) => {
|
saveAcctemployee = (salaryAcctRecordId, employeeIds) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.saveAcctemployee({salaryAcctRecordId, employeeIds}).then(res => {
|
API.saveAcctemployee({ salaryAcctRecordId, employeeIds }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "保存失败")
|
message.error(res.errormsg || "保存失败");
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
// 核算人员--导出环比减少人员
|
// 核算人员--导出环比减少人员
|
||||||
@action
|
@action
|
||||||
exportReducedEmployee = (id) => {
|
exportReducedEmployee = (id) => {
|
||||||
API.exportReducedEmployee(id)
|
API.exportReducedEmployee(id);
|
||||||
}
|
};
|
||||||
|
|
||||||
// 核算人员--导出人员范围
|
// 核算人员--导出人员范围
|
||||||
@action
|
@action
|
||||||
exportAcctEmployee = (id) => {
|
exportAcctEmployee = (id) => {
|
||||||
API.exportAcctEmployee(id)
|
API.exportAcctEmployee(id);
|
||||||
}
|
};
|
||||||
|
|
||||||
// 核算人员--删除薪资核算人员
|
// 核算人员--删除薪资核算人员
|
||||||
@action
|
@action
|
||||||
deleteAcctemployee = (salaryAcctRecordId, ids) => {
|
deleteAcctemployee = (salaryAcctRecordId, ids) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.deleteAcctemployee({salaryAcctRecordId, ids}).then(res => {
|
API.deleteAcctemployee({ salaryAcctRecordId, ids }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "删除失败")
|
message.error(res.errormsg || "删除失败");
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 核算结果--列表
|
// 核算结果--列表
|
||||||
@action
|
@action
|
||||||
acctResultList = (salaryAcctRecordId, employeeName = "", current = 1, params = {}) => {
|
acctResultList = (params = {}) => {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
API.acctResultList({salaryAcctRecordId, employeeName, current, ...params}).then(res => {
|
const { departmentIds = "", positionIds = "", consolidatedTaxation = "0", ...extraParams } = params || {};
|
||||||
if(res.status) {
|
params = {
|
||||||
// this.acctResultListTableStore.getDatas(res.data.dataKey.datas)
|
...extraParams,
|
||||||
|
departmentIds: departmentIds ? departmentIds.split(",") : undefined,
|
||||||
let list = res.data.pageInfo.list ? res.data.pageInfo.list: [];
|
positionIds: positionIds ? positionIds.split(",") : undefined,
|
||||||
list.map(item => {
|
consolidatedTaxation: consolidatedTaxation === "0" ? null : "1"
|
||||||
item.key = item.id
|
};
|
||||||
})
|
for (let key in params) {
|
||||||
this.acctResultListDateSource = list;
|
if (params[key] === "") {
|
||||||
this.acctResultListPageInfo = res.data.pageInfo
|
delete params[key];
|
||||||
this.acctResultListColumns = res.data.columns;
|
|
||||||
} else {
|
|
||||||
message.error(res.errormsg || "")
|
|
||||||
}
|
}
|
||||||
this.loading = false
|
}
|
||||||
})
|
API.acctResultList({ ...params }).then(res => {
|
||||||
}
|
if (res.status) {
|
||||||
|
let list = res.data.pageInfo.list ? res.data.pageInfo.list : [];
|
||||||
|
list.map(item => {
|
||||||
|
item.key = item.id;
|
||||||
|
});
|
||||||
|
this.acctResultListDateSource = list;
|
||||||
|
this.acctResultListPageInfo = res.data.pageInfo;
|
||||||
|
this.acctResultListColumns = res.data.columns;
|
||||||
|
this.getColumnDesc({ salaryAcctRecordId: params.salaryAcctRecordId });
|
||||||
|
} else {
|
||||||
|
message.error(res.errormsg || "");
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
@action
|
||||||
|
getColumnDesc = (params) => {
|
||||||
|
API.getColumnDesc(params).then(res => {
|
||||||
|
if (res.status) {
|
||||||
|
this.columnDescList = res.data;
|
||||||
|
} else {
|
||||||
|
message.error(res.errormsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 核算结果--薪资核算
|
// 核算结果--薪资核算
|
||||||
@action
|
@action
|
||||||
acctresultAccounting = (salaryAcctRecordId) => {
|
acctresultAccounting = (salaryAcctRecordId) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.acctresultAccounting({salaryAcctRecordId}).then(res => {
|
API.acctresultAccounting({ salaryAcctRecordId }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
// message.success("核算成功")
|
// message.success("核算成功")
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "核算失败")
|
message.error(res.errormsg || "核算失败");
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
// 线下比对-列表
|
// 线下比对-列表
|
||||||
@action
|
@action
|
||||||
comparisonresultList = (salaryAcctRecordId, params = {}) => {
|
comparisonresultList = (salaryAcctRecordId, params = {}) => {
|
||||||
API.comparisonresultList({salaryAcctRecordId, ...params}).then(res => {
|
API.comparisonresultList({ salaryAcctRecordId, ...params }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.comparisonresultListDataSource = res.data.list ? res.data.list : [];
|
this.comparisonresultListDataSource = res.data.list ? res.data.list : [];
|
||||||
this.comparisonresultListColumns = res.data.columns
|
this.comparisonresultListColumns = res.data.columns;
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 核算人员--刷新薪资核算人员的个税扣缴义务人
|
// 核算人员--刷新薪资核算人员的个税扣缴义务人
|
||||||
@action
|
@action
|
||||||
refreshTaxAgent = (salaryAcctRecordId) => {
|
refreshTaxAgent = (salaryAcctRecordId) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.refreshTaxAgent({salaryAcctRecordId}).then(res => {
|
API.refreshTaxAgent({ salaryAcctRecordId }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
message.success("刷新成功")
|
message.success("刷新成功");
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "刷新失败")
|
message.error(res.errormsg || "刷新失败");
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 薪资核算-编辑表单
|
// 薪资核算-编辑表单
|
||||||
@action
|
@action
|
||||||
acctresultDetail = (id) => {
|
acctresultDetail = (id) => {
|
||||||
API.acctresultDetail({id}).then(res => {
|
API.acctresultDetail({ id }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.acctresultDetailForm = res.data
|
this.acctresultDetailForm = res.data;
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || '获取失败')
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 薪资记录--删除薪资核算记录
|
// 薪资记录--删除薪资核算记录
|
||||||
@action
|
@action
|
||||||
deleteSalaryacct = (ids) => {
|
deleteSalaryacct = (ids) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.deleteSalaryacct(ids).then(res => {
|
API.deleteSalaryacct(ids).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
message.success("删除成功")
|
message.success("删除成功");
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "删除失败")
|
message.error(res.errormsg || "删除失败");
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 薪资记录--归档薪资核算记录
|
// 薪资记录--归档薪资核算记录
|
||||||
@action
|
@action
|
||||||
fileSalaryAcct = (id) => {
|
fileSalaryAcct = (id) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.fileSalaryAcct({id}).then(res => {
|
API.fileSalaryAcct({ id }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
message.success("归档成功")
|
message.success("归档成功");
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "归档失败")
|
message.error(res.errormsg || "归档失败");
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 薪资记录-重新核算
|
// 薪资记录-重新核算
|
||||||
@action
|
@action
|
||||||
reAccounting = (salaryAcctRecordId) => {
|
reAccounting = (salaryAcctRecordId) => {
|
||||||
return new Promise((resolve,reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.reAccounting({salaryAcctRecordId}).then(res => {
|
API.reAccounting({ salaryAcctRecordId }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
message.success("保存成功")
|
message.success("保存成功");
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "保存失败")
|
message.error(res.errormsg || "保存失败");
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
// 薪资结果-编辑表单保存
|
// 薪资结果-编辑表单保存
|
||||||
@action
|
@action
|
||||||
saveAcctResult = (recordId) => {
|
saveAcctResult = (recordId) => {
|
||||||
let inputItems = this.acctresultDetailForm.inputItems.map(item => {
|
let inputItems = this.acctresultDetailForm.inputItems.map(item => {
|
||||||
let record = {}
|
let record = {};
|
||||||
record.salaryItemId = item.salaryItemId
|
record.salaryItemId = item.salaryItemId;
|
||||||
record.resultValue = item.resultValue
|
record.resultValue = item.resultValue;
|
||||||
return record;
|
return record;
|
||||||
})
|
});
|
||||||
|
|
||||||
let formulaItems = this.acctresultDetailForm.formulaItems.map(item =>{
|
let formulaItems = this.acctresultDetailForm.formulaItems.map(item => {
|
||||||
let record = {}
|
let record = {};
|
||||||
record.salaryItemId = item.salaryItemId
|
record.salaryItemId = item.salaryItemId;
|
||||||
record.resultValue = item.resultValue
|
record.resultValue = item.resultValue;
|
||||||
return record;
|
return record;
|
||||||
})
|
});
|
||||||
|
|
||||||
let items = inputItems.concat(formulaItems)
|
let items = inputItems.concat(formulaItems);
|
||||||
let params = {
|
let params = {
|
||||||
salaryAcctEmpId: recordId,
|
salaryAcctEmpId: recordId,
|
||||||
items
|
items
|
||||||
}
|
};
|
||||||
return new Promise((resolve,reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.saveAcctResult(params).then(res => {
|
API.saveAcctResult(params).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
message.success("保存成功")
|
message.success("保存成功");
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "保存失败")
|
message.error(res.errormsg || "保存失败");
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
// 获取导入字段设置
|
// 获取导入字段设置
|
||||||
@action
|
@action
|
||||||
getImportField = (salaryAcctRecordId) => {
|
getImportField = (salaryAcctRecordId) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.getImportField({salaryAcctRecordId}).then(res => {
|
API.getImportField({ salaryAcctRecordId }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.importFieldData = res.data
|
this.importFieldData = res.data;
|
||||||
resolve(res.data)
|
resolve(res.data);
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
reject()
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
// 下载薪资导入核算模板
|
// 下载薪资导入核算模板
|
||||||
@action
|
@action
|
||||||
getImportTemplate = (salaryItemIds, salaryAcctRecordId) => {
|
getImportTemplate = (salaryItemIds, salaryAcctRecordId) => {
|
||||||
API.getImportTemplate(salaryItemIds, salaryAcctRecordId)
|
API.getImportTemplate(salaryItemIds, salaryAcctRecordId);
|
||||||
}
|
};
|
||||||
|
|
||||||
// 核算结果-导入预览
|
// 核算结果-导入预览
|
||||||
@action
|
@action
|
||||||
fetchPreviewAcctResult = (params) => {
|
fetchPreviewAcctResult = (params) => {
|
||||||
API.previewAcctResult(params).then((res) => {
|
API.previewAcctResult(params).then((res) => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.previewAcctResultList = res.data
|
this.previewAcctResultList = res.data;
|
||||||
this.previewAcctResultColumns = res.data.headers.map((item, index) => {
|
this.previewAcctResultColumns = res.data.headers.map((item, index) => {
|
||||||
let column = {}
|
let column = {};
|
||||||
column.title = item;
|
column.title = item;
|
||||||
column.dataIndex = "" + index;
|
column.dataIndex = "" + index;
|
||||||
column.key = index + ""
|
column.key = index + "";
|
||||||
return column
|
return column;
|
||||||
})
|
});
|
||||||
|
|
||||||
this.previewAcctResultDataSource = res.data.list.map((item) => {
|
this.previewAcctResultDataSource = res.data.list.map((item) => {
|
||||||
let data = {}
|
let data = {};
|
||||||
item.map((i, index) => {
|
item.map((i, index) => {
|
||||||
data[index + ''] = i
|
data[index + ""] = i;
|
||||||
})
|
});
|
||||||
return data
|
return data;
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 核算结果-导入
|
// 核算结果-导入
|
||||||
@action
|
@action
|
||||||
fetchImportAcctResult = (params) => {
|
fetchImportAcctResult = (params) => {
|
||||||
API.importAcctResult(params).then(res=> {
|
API.importAcctResult(params).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.importAcctResult = res.data
|
this.importAcctResult = res.data;
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "导入失败")
|
message.error(res.errormsg || "导入失败");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 核算结果-导出全部
|
// 核算结果-导出全部
|
||||||
@action
|
@action
|
||||||
exportAll = (salaryAcctRecordId, ids = "") => {
|
exportAll = (salaryAcctRecordId, ids = "") => {
|
||||||
API.exportAcctResult(salaryAcctRecordId, ids)
|
API.exportAcctResult(salaryAcctRecordId, ids);
|
||||||
}
|
};
|
||||||
|
|
||||||
// 线下对比-列表
|
// 线下对比-列表
|
||||||
@action
|
@action
|
||||||
fetchComparisonResultList = (params) => {
|
fetchComparisonResultList = (params) => {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
API.comparisonResultList(params).then(res => {
|
API.comparisonResultList(params).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.comparisonResultPageInfo = res.data
|
this.comparisonResultPageInfo = res.data;
|
||||||
this.comparisonResultColumns = res.data.columns
|
this.comparisonResultColumns = res.data.columns;
|
||||||
// this.comparisonResultTableStore.getDatas(res.data.dataKey.datas)
|
// this.comparisonResultTableStore.getDatas(res.data.dataKey.datas)
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false;
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 线下对比-导入模板
|
// 线下对比-导入模板
|
||||||
@action
|
@action
|
||||||
exportImportTemplate = (salaryAcctRecordId) => {
|
exportImportTemplate = (salaryAcctRecordId) => {
|
||||||
API.exportImportTemplate(salaryAcctRecordId)
|
API.exportImportTemplate(salaryAcctRecordId);
|
||||||
}
|
};
|
||||||
|
|
||||||
// 线下对比--导入预览
|
// 线下对比--导入预览
|
||||||
@action
|
@action
|
||||||
previewComparisonResult = (params) => {
|
previewComparisonResult = (params) => {
|
||||||
API.previewComparisonResult(params).then(res => {
|
API.previewComparisonResult(params).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.comparisonPreviewColumns = res.data.headers.map((item, index) => {
|
this.comparisonPreviewColumns = res.data.headers.map((item, index) => {
|
||||||
let column = {}
|
let column = {};
|
||||||
column.title = item;
|
column.title = item;
|
||||||
column.dataIndex = "" + index;
|
column.dataIndex = "" + index;
|
||||||
column.key = index + ""
|
column.key = index + "";
|
||||||
return column
|
return column;
|
||||||
})
|
});
|
||||||
|
|
||||||
this.comparisonPreviewDataSource = res.data.list.map((item) => {
|
this.comparisonPreviewDataSource = res.data.list.map((item) => {
|
||||||
let data = {}
|
let data = {};
|
||||||
item.map((i, index) => {
|
item.map((i, index) => {
|
||||||
data[index + ''] = i
|
data[index + ""] = i;
|
||||||
})
|
});
|
||||||
return data
|
return data;
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 线下对比-导入
|
// 线下对比-导入
|
||||||
@action
|
@action
|
||||||
importComparisonExcelAcctResult = (params) => {
|
importComparisonExcelAcctResult = (params) => {
|
||||||
API.importComparisonExcelAcctResult(params).then(res => {
|
API.importComparisonExcelAcctResult(params).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.comparisonImportAcctResult = res.data
|
this.comparisonImportAcctResult = res.data;
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 线下对比-导出
|
// 线下对比-导出
|
||||||
@action
|
@action
|
||||||
exportComparisonResult = (salaryAcctRecordId) => {
|
exportComparisonResult = (salaryAcctRecordId) => {
|
||||||
API.exportComparisonResult(salaryAcctRecordId)
|
API.exportComparisonResult(salaryAcctRecordId);
|
||||||
}
|
};
|
||||||
|
|
||||||
// 核算进度条
|
// 核算进度条
|
||||||
@action
|
@action
|
||||||
getCalculateProgress = (id) => {
|
getCalculateProgress = (id) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.getCalculateProgress(id).then(res => {
|
API.getCalculateProgress(id).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
let progress = 0;
|
let progress = 0;
|
||||||
try {
|
try {
|
||||||
progress = Number(res.data.progress) * 100
|
progress = Number(res.data.progress) * 100;
|
||||||
} catch(err) {
|
} catch (err) {
|
||||||
}
|
}
|
||||||
resolve(res.data)
|
resolve(res.data);
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
reject()
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,8 @@ export class ProgrammeStore {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
flag = false }
|
flag = false
|
||||||
|
}
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,9 @@
|
||||||
var vars = query.split("&");
|
var vars = query.split("&");
|
||||||
for (var i=0;i<vars.length;i++) {
|
for (var i=0;i<vars.length;i++) {
|
||||||
var pair = vars[i].split("=");
|
var pair = vars[i].split("=");
|
||||||
if(pair[0] == variable){return pair[1];}
|
if(pair[0] == variable){
|
||||||
|
return pair[1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue