|
@@ -186,6 +186,9 @@ const Order = React.createClass({
|
|
|
searchMore: !this.state.searchMore
|
|
|
});
|
|
|
},
|
|
|
+ loadExcel(){
|
|
|
+ window.location.href=globalConfig.context+"/api/admin/bonus/downOrderModelExcel";
|
|
|
+ },
|
|
|
//导出exec
|
|
|
exec(){
|
|
|
let time = new Date(),
|
|
@@ -236,9 +239,10 @@ const Order = React.createClass({
|
|
|
<Button type="primary" onClick={this.search}>搜索</Button>
|
|
|
<Button onClick={this.reset}>重置</Button>
|
|
|
<div style={{float:'right'}}>
|
|
|
+ <Button type="primary" onClick={this.loadExcel} style={{margin:'0 10px'}}>下载导入模板</Button>
|
|
|
<Upload
|
|
|
- action={globalConfig.context + "/api/admin/achievement/uploadTemplate"}
|
|
|
- data={{ 'sign': 'achievement_template' }}
|
|
|
+ action={globalConfig.context + "/api/admin/bonus/uploadOrderExcel"}
|
|
|
+ data={{ 'sign': '' }}
|
|
|
beforeUpload={beforeUploadFile}
|
|
|
showUploadList={false}
|
|
|
onChange={(info) => {
|
|
@@ -248,6 +252,7 @@ const Order = React.createClass({
|
|
|
if (info.file.status === 'done') {
|
|
|
if (!info.file.response.error.length) {
|
|
|
message.success(`${info.file.name} 文件上传成功!`);
|
|
|
+ this.loadData();
|
|
|
} else {
|
|
|
message.warning(info.file.response.error[0].message);
|
|
|
return;
|