feature社保福利档案添加非系统人员列表
This commit is contained in:
parent
2a40afb7b4
commit
bb1e328c92
|
|
@ -62,7 +62,8 @@ class ImpStep1 extends Component {
|
|||
<p>
|
||||
<span>{`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}</span>
|
||||
<a href={this.props.link} className="weapp-salary-link"
|
||||
target="_blank">{getLabel(543207, "点击这里下载模板")}</a>
|
||||
target="_blank">{getLabel(543207, "点击这里下载模板")}</a>
|
||||
{this.props.exportDataDom}
|
||||
</p>
|
||||
<p>{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")};`}</p>
|
||||
<p>{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")};`}</p>
|
||||
|
|
|
|||
|
|
@ -33,11 +33,12 @@ class Index extends Component {
|
|||
|
||||
renderChildren = () => {
|
||||
const { current } = this.state;
|
||||
const { importParams, link, excludeKey, importResult } = this.props;
|
||||
const { importParams, link, excludeKey, importResult, exportDataDom = null } = this.props;
|
||||
let CurrentDom = null;
|
||||
switch (current) {
|
||||
case 0:
|
||||
CurrentDom = <ImpStep1 importParams={importParams} link={link} ref={dom => this.step1Ref = dom}/>;
|
||||
CurrentDom = <ImpStep1 importParams={importParams} link={link} exportDataDom={exportDataDom}
|
||||
ref={dom => this.step1Ref = dom}/>;
|
||||
break;
|
||||
case 1:
|
||||
CurrentDom = null;
|
||||
|
|
@ -74,7 +75,7 @@ class Index extends Component {
|
|||
}
|
||||
}
|
||||
if (_.isEmpty(fileList)) {
|
||||
message.error(getLabel(111, "请先上传EXCEL文件"));
|
||||
message.warning(getLabel(111, "请先上传EXCEL文件"));
|
||||
return;
|
||||
}
|
||||
const [file] = fileList;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from "react";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { Button, Dropdown, Menu, message, Modal, Popover } from "antd";
|
||||
import { WeaHelpfulTip, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||
import { WeaCheckbox, WeaHelpfulTip, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||
import { getSearchs, renderLoading } from "../../../util";
|
||||
import BaseForm from "./baseForm";
|
||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||
|
|
@ -14,8 +14,9 @@ import * as API from "../../../apis/welfareArchive";
|
|||
import ImportModal from "../../../components/importModal";
|
||||
import TipLabel from "../../../components/TipLabel";
|
||||
import UnifiedTable from "../../../components/UnifiedTable";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import { convertToUrlString, getURLParameters } from "../../../util/url";
|
||||
import { salaryArchiveDelete } from "../../../apis/payrollFiles";
|
||||
import ImportDialog from "../../../components/importDialog";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -50,14 +51,19 @@ export default class Archives extends React.Component {
|
|||
stayAdd: 0,
|
||||
paying: 0,
|
||||
stayDel: 0,
|
||||
stopPay: 0
|
||||
stopPay: 0,
|
||||
ext: 0
|
||||
},
|
||||
pageInfo: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
},
|
||||
salaryArchiveDelete: "" //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是
|
||||
salaryArchiveDelete: "", //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是
|
||||
importDialog: {
|
||||
visible: false, title: "", nextloading: false,
|
||||
link: ""
|
||||
}
|
||||
};
|
||||
this.record = {};
|
||||
}
|
||||
|
|
@ -593,7 +599,8 @@ export default class Archives extends React.Component {
|
|||
dataSource: dataSourceActive,
|
||||
pageInfo,
|
||||
tabCount,
|
||||
loading
|
||||
loading,
|
||||
importDialog
|
||||
} = this.state;
|
||||
const {
|
||||
form, condition, showSearchAd, setShowSearchAd,
|
||||
|
|
@ -742,7 +749,15 @@ export default class Archives extends React.Component {
|
|||
} type="ghost">
|
||||
导出全部
|
||||
</Dropdown.Button>
|
||||
] : [<Button type="primary" onClick={() => { this.handleBtnImport("2") }}>导入</Button>];
|
||||
] : [<Button type="primary"
|
||||
onClick={() => this.setState(({
|
||||
importDialog: {
|
||||
...importDialog,
|
||||
visible: true, title: getLabel(111, "非系统人员导入"),
|
||||
link: "/api/bs/hrmsalary/scheme/template/export?extWelArchiveList=true"
|
||||
}
|
||||
}))}>导入</Button>
|
||||
];
|
||||
|
||||
const pagination = {
|
||||
current: pageInfo.current,
|
||||
|
|
@ -887,6 +902,31 @@ export default class Archives extends React.Component {
|
|||
this.setState({ selectedTab: "0" });
|
||||
})}/>
|
||||
}
|
||||
<ImportDialog
|
||||
{...importDialog}
|
||||
onCancel={(isFresh) => this.setState(({
|
||||
importDialog: {
|
||||
visible: false, title: "", nextloading: false,
|
||||
link: ""
|
||||
}
|
||||
}))}
|
||||
exportDataDom={
|
||||
<WeaCheckbox content={getLabel(543208, "导出现有数据")}
|
||||
value={getURLParameters(importDialog.link).exportData === "true" ? "1" : "0"}
|
||||
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
|
||||
onChange={val => {
|
||||
const payload = { exportData: val === "1" };
|
||||
this.setState(({
|
||||
importDialog: {
|
||||
...importDialog,
|
||||
link: `/api/bs/hrmsalary/scheme/template/export?extWelArchiveList=true&${convertToUrlString(payload)}`
|
||||
}
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
}
|
||||
nextCallback={()=>{}}
|
||||
/>
|
||||
{
|
||||
this.state.importVisible && <ImportModal
|
||||
init={() => {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
// export const getQueryString = (name) => {
|
||||
// let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
// let r = window.location.hash.split("?")[1].match(reg);
|
||||
// if (r != null) {
|
||||
// return decodeURIComponent(r[2]);
|
||||
// };
|
||||
// return null;
|
||||
// }
|
||||
export const getURLParameters = (url) =>
|
||||
(url.match(/([^?=&]+)(=([^&]*))/g) || []).reduce(
|
||||
(a, v) => (
|
||||
(a[v.slice(0, v.indexOf("="))] = v.slice(v.indexOf("=") + 1)), a
|
||||
),
|
||||
{}
|
||||
);
|
||||
|
||||
export const getQueryString = (variable) => {
|
||||
let split = window.location.hash.split("?");
|
||||
|
|
|
|||
Loading…
Reference in New Issue