提交 60e38016 authored 作者: 钟是志's avatar 钟是志

23675 求职创业补贴管理---班级做成选项,,发放表和申请表筛选后可以有针对性打印

上级 d26e850d
......@@ -14,7 +14,6 @@ const Modal = getModal();
const message = getMessage();
const Step = Steps.Step;
const TabPane = Tabs.TabPane;
// const exportExcel = CLIENT_TYPE == 'mobile' ? null : require('xlsx-oc').exportExcel;
let tempCallback = () => { };
@connect(({ DataObj, loading }) => ({
......@@ -26,19 +25,13 @@ export default class ImportUtil extends React.PureComponent {
super(props);
tempCallback = this.props.callback;
// const exportTemplateUrl = encodeURI(
// `${config.httpServer}/DataObjApi/importTemplateDownload?objId=${this.props.objId}&name=${
// props.fileName
// }`,
// );
this.state = {
ch: false,
currentKey: '1',
visible: false,
current: 0,
isShow: true,
filekey: '',
fileCacheKey: '',
sucData: [],
errData: [],
column: [],
......@@ -57,7 +50,7 @@ export default class ImportUtil extends React.PureComponent {
current: 0,
isShow: true,
isNextDisabled: false,
filekey: '',
fileCacheKey: '',
visible: true,
});
};
......@@ -114,7 +107,7 @@ export default class ImportUtil extends React.PureComponent {
type: 'DataObj/importExecute',
payload: {
...(importParams || {}),
cacheKey: this.state.filekey,
cacheKey: this.state.fileCacheKey,
objId: this.props.objId,
},
callback: (res) => {
......@@ -126,10 +119,7 @@ export default class ImportUtil extends React.PureComponent {
isShow: true,
visible: false,
});
// if (typeof tempCallback === 'function') {
// tempCallback();
// tempCallback = null;
// }
},
});
}
......@@ -148,7 +138,8 @@ export default class ImportUtil extends React.PureComponent {
},
callback: (res) => {
this.setState({
filekey: res.cacheKey,
// TODO 23013 学生事务/学生医保管理/学生平安险/保险办理,2001010248 高职界面已购买 导入 报错【接口超时】
fileCacheKey: res.cacheKey,
});
this.queryFile(res.cacheKey);
},
......@@ -172,8 +163,8 @@ export default class ImportUtil extends React.PureComponent {
errData: res.noPass,
column: res.column,
});
if (res.noPass && res.noPass.length == 0) {
if (res.pass.length == 0) {
if (res.noPass && res.noPass.length === 0) {
if (res.pass.length === 0) {
message.error('当前没有验证成功的数据,无法导入。');
this.setState({
currentKey: '1',
......@@ -204,23 +195,6 @@ export default class ImportUtil extends React.PureComponent {
this.setState({ currentKey: activeKey });
};
// exportError = (column, dataSource) => {
// if (exportExcel == null) {
// message.info('当前终端暂不支持此功能');
// return;
// }
// var _headers = [];
// for (var i = 0; i < column.length; i++) {
// _headers.push({
// k: column[i].dataIndex,
// v: column[i].title,
// });
// }
// for (var j = 0; j < dataSource.length; j++) {
// dataSource[j].index = j + 1;
// }
// exportExcel(_headers, dataSource);
// };
downloadFile = async () => {
this.setState({ confirmLoading: true });
......@@ -241,9 +215,6 @@ export default class ImportUtil extends React.PureComponent {
fetch(transformApi, {
method: 'POST',
body: FormdataWrapper(newParams.datas),
// headers: {
// apis: headersApi,
// },
})
.then((res) => {
console.log(res.status);
......@@ -461,13 +432,6 @@ export default class ImportUtil extends React.PureComponent {
''
) : (
<TabPane tab={<span style={{ color: 'red' }}>验证错误列表</span>} key="1">
{/*<Button
style={{ marginTop: 5, marginBottom: 5 }}
type='danger'
onClick={this.exportError.bind(this, column1, this.state.errData)}>
导出错误信息
</Button>*/}
<Table
columns={column1}
size="small"
......@@ -479,16 +443,6 @@ export default class ImportUtil extends React.PureComponent {
</TabPane>
)}
<TabPane tab={<span style={{ color: 'green' }}>验证成功列表</span>} key="2">
{/*<Button
style={{
marginTop: 5,
marginBottom: 5,
}}
type="primary"
onClick={this.exportError.bind(this, column2, this.state.sucData)}>
导出正确信息
</Button>*/}
<Table
columns={column2}
size="small"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论