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

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

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