Browse Source

订单统计导入

liting2017 6 years ago
parent
commit
761cb60a17
2 changed files with 9 additions and 4 deletions
  1. 7 2
      js/component/manageCenter/statistics/order/index.jsx
  2. 2 2
      webpack.config.js

+ 7 - 2
js/component/manageCenter/statistics/order/index.jsx

@@ -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;

+ 2 - 2
webpack.config.js

@@ -304,7 +304,7 @@ module.exports = (function () {
     }
 
     //let staticHost = 'http://afts.hnzhiming.com';
-    let staticHost = 'http://192.168.0.190';
+    let staticHost = 'http://192.168.0.188';
     switch (argv.env.deploy) {
         case 'test':
             staticHost = 'http://static.kedexinxi.com';
@@ -343,7 +343,7 @@ module.exports = (function () {
         // }
         devServer: {
             disableHostCheck: true,
-            host: '192.168.0.190',
+            host: '192.168.0.188',
             port: 80,
             allowedHosts: ['127.0.0.1','192.168.0.20','192.168.0.99'],
             headers: {