Browse Source

调整销售统计

zhanghe 7 years ago
parent
commit
2a7094f7eb
3 changed files with 20 additions and 33 deletions
  1. 2 2
      src/common/router.js
  2. 0 11
      src/routes/About/index.js
  3. 18 20
      src/routes/SoldProduct/index.js

+ 2 - 2
src/common/router.js

@@ -43,10 +43,10 @@ export const getRouterData = (app) => {
     //   component: dynamicWrapper(app, [], () => import('../routes/Dashboard')),
     // },
     '/resource/gallery': {
-      component: dynamicWrapper(app, ['resource'], () => import('../routes/Resource/gallery')),
+      component: dynamicWrapper(app, ['resource'], () => import('../routes/Resource/Gallery')),
     },
     '/resource/video': {
-      component: dynamicWrapper(app, ['resource'], () => import('../routes/Resource/video')),
+      component: dynamicWrapper(app, ['resource'], () => import('../routes/Resource/Video')),
     },
     '/terminal/campus': {
       component: dynamicWrapper(app, ['campus', 'merchant/merchant'], () => import('../routes/Campus')),

+ 0 - 11
src/routes/About/index.js

@@ -1,11 +0,0 @@
-import React, { PureComponent } from 'react';
-import { Card, Icon } from 'antd';
-
-export default class About extends PureComponent {
-  render() {
-    return (
-      <Card title="使用说明">
-      </Card>
-    );
-  }
-}

+ 18 - 20
src/routes/SoldProduct/index.js

@@ -8,9 +8,7 @@ import {
   Table,
   Form,
   Card,
-  Select,
   Input,
-  Icon,
   Button,
   DatePicker,
 } from 'antd';
@@ -33,7 +31,7 @@ export default class SoldProductList extends Component {
       filters.timeEnd = filters.time[1].format('X');
       delete filters.time;
     }
-    if (filters.orderStatus == 'all') {
+    if (filters.orderStatus === 'all') {
       delete filters.orderStatus;
     }
     return filters;
@@ -64,64 +62,64 @@ export default class SoldProductList extends Component {
       title: '产品编号',
       dataIndex: 'productCode',
       key: 1,
-    },{
+    }, {
       title: '产品名称',
       dataIndex: 'productName',
       key: 2,
-    },{
+    }, {
       title: '类型',
       dataIndex: 'productType',
       key: 3,
       render: (text, record) => productType[text],
-    },{
+    }, {
       title: '终端编号',
       dataIndex: 'userCode',
       key: 4,
-    },{
+    }, {
       title: '终端名称',
       dataIndex: 'userName',
       key: 5,
-    },{
+    }, {
       title: '校区编号',
       dataIndex: 'campusCode',
       key: 6,
-    },{
+    }, {
       title: '校区名称',
       dataIndex: 'campusName',
       key: 7,
-    },{
+    }, {
       title: '渠道名称',
       dataIndex: 'merchantName',
       key: 8,
-    },{
+    }, {
       title: '供应商价格(¥)',
       dataIndex: 'cpPrice',
       key: 9,
-    },{
+    }, {
       title: '渠道价格(¥)',
       dataIndex: 'merchantPrice',
       key: 10,
-    },{
+    }, {
       title: '终端价格(¥)',
       dataIndex: 'terminalPrice',
       key: 11,
-    },{
+    }, {
       title: '数量',
       dataIndex: 'quantity',
       key: 12,
-    },{
+    }, {
       title: '单位',
       dataIndex: 'chargeUnit',
       key: 13,
-    },{
+    }, {
       title: '创建时间',
       dataIndex: 'gmtCreated',
       key: 14,
-      render: (text, record) => moment(text).format('YYYY-MM-DD HH:mm:ss'),
+      render: text => moment(text).format('YYYY-MM-DD HH:mm:ss'),
     }];
 
     const newPagination = !!pagination && { ...pagination, showSizeChanger: true, showQuickJumper: true, showTotal: total => `共 ${total} 条`};
-    const AnimationTableBody = (props) => (<AnimTableBody {...props}/>);
+    const AnimationTableBody = props => (<AnimTableBody {...props} />);
 
     return (
       <Card>
@@ -179,14 +177,14 @@ export default class SoldProductList extends Component {
           bordered
           loading={listLoading}
           onChange={this.handleTableChange}
-          rowKey={(record) => record.id}
+          rowKey={record => record.id}
           columns={columns}
           dataSource={list}
           pagination={newPagination}
           scroll={{ x: 1800 }}
           className={classnames({ [styles.table]: true, [styles.motion]: true })}
           components={{
-            body: { wrapper: AnimationTableBody }
+            body: { wrapper: AnimationTableBody },
           }}
         />
       </Card>