福利档案
This commit is contained in:
parent
d6b7357949
commit
9517e97bad
|
|
@ -50,8 +50,15 @@ export const getImportDocumentParams = params => {
|
|||
};
|
||||
|
||||
// 导入档案- 导出现有数据
|
||||
export const exportCurData = ids => {
|
||||
fetch('/api/bs/hrmsalary/scheme/template/export?ids=' + ids).then(res => res.blob().then(blob => {
|
||||
export const exportCurData = params => {
|
||||
fetch('/api/bs/hrmsalary/scheme/template/export',{
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.blob().then(blob => {
|
||||
var filename=`福利档案模板.xlsx`
|
||||
var a = document.createElement('a');
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
|
|
|
|||
|
|
@ -12,13 +12,12 @@ export default class ModalStep2 extends React.Component {
|
|||
return (
|
||||
<div style={{height: "550px", display: "flex", flexFlow: "column"}}>
|
||||
<div style={{flex: "1", maxHeight: '500px', overflowY: "scroll"}}>
|
||||
<WeaTable dataSource={dataSource} columns={columns} />
|
||||
<WeaTable dataSource={dataSource} columns={columns} scroll={{x: columns.length * 150 }}/>
|
||||
</div>
|
||||
<div className="footerBtnWrapper" style={{marginTop: "10px", overflow: "hidden", height: "30px"}}>
|
||||
<Button type="primary" style={{float: "right", marginLeft: "10px"}} onClick={this.props.onStep2Next}>下一步</Button>
|
||||
<Button type="default" style={{float: "right"}} onClick={this.props.onStep2Pre}>上一步</Button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
slideVisiable: false,
|
||||
}
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
let id = getQueryString("id");
|
||||
const { calculateStore: { getSalarySobCycle, acctResultList } } = this.props;
|
||||
|
|
@ -34,9 +35,22 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
|
||||
// 获取列表的列
|
||||
getColumns() {
|
||||
const { calculateStore: {acctResultListTableStore }} = this.props;
|
||||
let columns = acctResultListTableStore.columns ? [...acctResultListTableStore.columns] : [];
|
||||
columns = columns.filter(item => item.hide == "false")
|
||||
const { calculateStore: {acctResultListTableStore, acctResultListColumns }} = this.props;
|
||||
let columns = acctResultListColumns ? acctResultListColumns : []
|
||||
columns = columns.filter(item => item.hide == "FALSE").map(item => {
|
||||
let result = {...item}
|
||||
result.title = item.text;
|
||||
result.dataIndex = item.column
|
||||
result.oldWidth = result.width;
|
||||
result.width = null;
|
||||
if(result.children) {
|
||||
result.children.map(child => {
|
||||
child.title = child.text
|
||||
child.dataIndex = child.column
|
||||
})
|
||||
}
|
||||
return result;
|
||||
})
|
||||
columns.push({
|
||||
title: '操作',
|
||||
key: "cz",
|
||||
|
|
@ -55,6 +69,7 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
|
||||
const { calculateStore } = this.props;
|
||||
const { baseSalarySobCycle, acctResultListDateSource, acctResultListColumns } = calculateStore
|
||||
|
||||
const menu = (
|
||||
<Menu>
|
||||
<Menu.Item key="3">导出所选</Menu.Item>
|
||||
|
|
|
|||
|
|
@ -32,11 +32,10 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { editable, request } = this.props;
|
||||
const { editable, request, isAdd } = this.props;
|
||||
const { name, useDefault, useInEmployeeSalary, roundingMode, pattern, valueType, description, dataType, formulaContent, formulaId } = request;
|
||||
const { formalModalVisible } = this.state;
|
||||
|
||||
console.log("request: ", request);
|
||||
return (
|
||||
<div className="customSalaryItemSlide">
|
||||
<div>
|
||||
|
|
@ -78,7 +77,7 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
<Row>
|
||||
<Col span={8}>字段类型<RequiredLabelTip /></Col>
|
||||
<Col span={16}>
|
||||
<WeaSelect value={dataType} options={dataTypeOptions} onChange={(value) => {this.handleChange({dataType: value})}} style={{width: "200px"}}/>
|
||||
<WeaSelect disabled={isAdd ? false: true} value={dataType} options={dataTypeOptions} onChange={(value) => {this.handleChange({dataType: value})}} style={{width: "200px"}}/>
|
||||
</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
|
|
@ -106,7 +105,7 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
<Row className="formItem">
|
||||
<Col span={4}>取值方式<RequiredLabelTip /></Col>
|
||||
<Col span={20}>
|
||||
<Radio.Group disabled={editable? false: true} value={valueType} onChange={(e) => {
|
||||
<Radio.Group disabled={isAdd ? false : true} value={valueType} onChange={(e) => {
|
||||
this.handleChange({valueType: e.target.value})
|
||||
}}>
|
||||
<Radio key={1} value={"1"}>输入</Radio>
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ export default class FormalFormModal extends React.Component {
|
|||
this.setState({
|
||||
value
|
||||
})
|
||||
|
||||
console.log("value: ", value);
|
||||
}
|
||||
|
||||
// 获取光标位置
|
||||
|
|
@ -160,6 +160,7 @@ export default class FormalFormModal extends React.Component {
|
|||
cursorPos += str.length;
|
||||
obj.selectionStart = obj.selectionEnd = cursorPos;
|
||||
obj.focus();
|
||||
this.setState({value: obj.value})
|
||||
} else {
|
||||
obj.value += str;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ export default class SalaryItem extends React.Component {
|
|||
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={(this.state.editable ? "修改" : "新建") + "自定义薪资项目"}
|
||||
subtitle={(this.state.isAdd ? "新建" : "修改") + "自定义薪资项目"}
|
||||
editable={false}
|
||||
customOperate={renderCustomOperate()}
|
||||
subItemChange={
|
||||
|
|
@ -338,7 +338,7 @@ export default class SalaryItem extends React.Component {
|
|||
}
|
||||
/>
|
||||
}
|
||||
content={<CustomSalaryItemSlide editable={this.state.editable} request={request} onChange={(value) => {handleSaveSlideChange(value)}}/>}
|
||||
content={<CustomSalaryItemSlide editable={this.state.editable} isAdd={this.state.isAdd} request={request} onChange={(value) => {handleSaveSlideChange(value)}}/>}
|
||||
onClose={() => setEditSlideVisible(false)}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => setEditSlideVisible(false)} />
|
||||
|
|
|
|||
|
|
@ -55,14 +55,14 @@ export const patternOptions = [
|
|||
]
|
||||
|
||||
export const dataTypeOptions = [
|
||||
{
|
||||
key: "number",
|
||||
showname: "数值",
|
||||
selected: false
|
||||
},
|
||||
{
|
||||
key: "string",
|
||||
showname: "字符",
|
||||
selected: false
|
||||
},
|
||||
{
|
||||
key: "number",
|
||||
showname: "数值",
|
||||
selected: false
|
||||
}
|
||||
]
|
||||
|
|
@ -49,7 +49,7 @@ export default class SystemSalaryItemModal extends React.Component {
|
|||
}}/>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{margin: "10px"}}>
|
||||
<div style={{margin: "10px", height: "500px"}}>
|
||||
<WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
||||
comsWeaTableStore={sysListTableStore} // table store
|
||||
hasOrder={true} // 是否启用排序
|
||||
|
|
|
|||
|
|
@ -10,8 +10,9 @@ import "./index.less"
|
|||
export default class AccumulationFundForm extends React.Component {
|
||||
|
||||
componentWillMount() {
|
||||
const { archivesStore: { getBaseForm }} = this.props;
|
||||
const { archivesStore: { getBaseForm, getPaymentForm }} = this.props;
|
||||
getBaseForm(this.props.employeeId, "ACCUMULATION_FUND");
|
||||
getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", this.props.record.fundSchemeId)
|
||||
}
|
||||
|
||||
// 表单变化
|
||||
|
|
@ -76,7 +77,7 @@ export default class AccumulationFundForm extends React.Component {
|
|||
<Row>
|
||||
<Col span={6} className="formItem">公积金方案名称:</Col>
|
||||
<Col span={6} className="formItem">
|
||||
<Select defaultValue={data && data.fundName} value={data && data.fundName} style={{ width: 150 }} onChange={(value) => this.handleFormChange({fundName: value})}>
|
||||
<Select defaultValue={data && data.fundSchemeId} value={data && data.fundSchemeId} style={{ width: 150 }} onChange={(value) => this.handleFormChange({fundName: value})}>
|
||||
{
|
||||
items && items[0].items &&items[0].items[0] && items[0].items[0].options.map(item => (
|
||||
<Option value={item.key}>{item.showname}</Option>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ export default class Archives extends React.Component {
|
|||
modalParam: {},
|
||||
step: 0,
|
||||
}
|
||||
|
||||
this.record = {}
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
|
|
@ -45,6 +47,7 @@ export default class Archives extends React.Component {
|
|||
}
|
||||
|
||||
handleEdit(record) {
|
||||
this.record = record
|
||||
this.setState({employeeId: record.employeeId, editSlideVisible: true})
|
||||
}
|
||||
|
||||
|
|
@ -248,13 +251,13 @@ export default class Archives extends React.Component {
|
|||
selectedTab == 0 && <BaseForm employeeId={this.state.employeeId}/>
|
||||
}
|
||||
{
|
||||
selectedTab == 1 && <SocialSecurityForm employeeId={this.state.employeeId}/>
|
||||
selectedTab == 1 && <SocialSecurityForm employeeId={this.state.employeeId} record={this.record}/>
|
||||
}
|
||||
{
|
||||
selectedTab == 2 && <AccumulationFundForm employeeId={this.state.employeeId} />
|
||||
selectedTab == 2 && <AccumulationFundForm employeeId={this.state.employeeId} record={this.record}/>
|
||||
}
|
||||
{
|
||||
selectedTab == 3 && <OtherForm employeeId={this.state.employeeId} />
|
||||
selectedTab == 3 && <OtherForm employeeId={this.state.employeeId} record={this.record}/>
|
||||
}
|
||||
|
||||
</div>}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,7 @@
|
|||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import { Row, Col, Select } from 'antd'
|
||||
import { WeaDatePicker } from "ecCom";
|
||||
import { WeaDatePicker, WeaInput } from "ecCom";
|
||||
import GroupCard from '../../../components/groupCard'
|
||||
import "./index.less"
|
||||
const { Option } = Select
|
||||
|
|
@ -17,8 +17,9 @@ export default class OtherForm extends React.Component {
|
|||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { archivesStore: { getBaseForm }} = this.props;
|
||||
getBaseForm(this.props.employeeId, "OTHER")
|
||||
const { archivesStore: { getBaseForm, getPaymentForm}} = this.props;
|
||||
getBaseForm(this.props.employeeId, "OTHER");
|
||||
getPaymentForm(this.props.employeeId, "OTHER", this.props.record.otherSchemeId)
|
||||
}
|
||||
|
||||
// 表单变化
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@ const { Option } = Select
|
|||
export default class SocialSecurityForm extends React.Component {
|
||||
componentWillMount() {
|
||||
const { archivesStore } = this.props;
|
||||
const { getBaseForm } = archivesStore
|
||||
const { getBaseForm, getPaymentForm } = archivesStore
|
||||
getBaseForm(this.props.employeeId, "SOCIAL_SECURITY")
|
||||
getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", this.props.record.siSchemeId)
|
||||
}
|
||||
|
||||
// 表单变化
|
||||
|
|
|
|||
|
|
@ -124,9 +124,9 @@ export class ArchivesStore {
|
|||
} else if(welfareTypeEnum == "OTHER") {
|
||||
this.otherForm = res.data
|
||||
}
|
||||
if(res.data && res.data.data && res.data.data.id) {
|
||||
this.getPaymentForm(employeeId, welfareTypeEnum, res.data.data.id)
|
||||
}
|
||||
// if(res.data && res.data.data && res.data.data.id) {
|
||||
// this.getPaymentForm(employeeId, welfareTypeEnum, res.data.data.id)
|
||||
// }
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
}
|
||||
|
|
@ -173,8 +173,8 @@ export class ArchivesStore {
|
|||
|
||||
// 导入模板下载
|
||||
@action
|
||||
exportTempateDownload = (ids = "") => {
|
||||
API.exportCurData(ids)
|
||||
exportTempateDownload = (params = {}) => {
|
||||
API.exportCurData(params)
|
||||
}
|
||||
|
||||
// 导入预览
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export class SalaryItemStore {
|
|||
roundingMode: 0,
|
||||
pattern: 0,
|
||||
valueType: 1,
|
||||
dataType: "string",
|
||||
dataType: "number",
|
||||
description: ""
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ export class SalaryItemStore {
|
|||
roundingMode: 0,
|
||||
pattern: 0,
|
||||
valueType: "1",
|
||||
dataType: "string",
|
||||
dataType: "number",
|
||||
description: ""
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue