zhanghe пре 7 година
родитељ
комит
bdc93cb179

+ 3 - 0
src/common/menu.js

@@ -102,6 +102,9 @@ const menuData = [
     children: [{
       name: 'CMS用户',
       path: 'user',
+    }, {
+      name: '账户白名单',
+      path: 'white-list'
     }]
   // },{
   //   name: '使用说明',

+ 11 - 11
src/layouts/BasicLayout.js

@@ -118,8 +118,8 @@ class BasicLayout extends React.PureComponent {
             dispatch={dispatch}
             isMobile={this.state.isMobile}
           />
-          {currentUser.platForm &&
-            <Content style={{ margin: '24px 24px 0', height: '100%' }}>
+          <Content style={{ margin: '24px 24px 0', height: '100%' }}>
+            {currentUser.platForm &&
               <div style={{ minHeight: 'calc(100vh - 260px)' }}>
                 <Switch>
                   {
@@ -141,15 +141,15 @@ class BasicLayout extends React.PureComponent {
                   <Route render={NotFound} />
                 </Switch>
               </div>
-              <GlobalFooter
-                copyright={
-                  <div>
-                    Copyright <Icon type="copyright" /> 2017-2020 领教信息科技有限公司
-                  </div>
-                }
-              />
-            </Content>
-          }
+            }
+            <GlobalFooter
+              copyright={
+                <div>
+                  Copyright <Icon type="copyright" /> 2017-2020 领教信息科技有限公司
+                </div>
+              }
+            />
+          </Content>
         </Layout>
       </Layout>
     );

+ 2 - 2
src/routes/Order/Add/index.js

@@ -168,7 +168,7 @@ export default class CreateOrder extends Component {
 
     const data = { ...newFilters, ...tableFilters, pageNo: pagination.current, pageSize: pagination.pageSize, merchantId };
     Object.keys(data).map(key => (data[key] ? null : delete data[key]));
-    this.props.dispatch({ type: 'mporduct/query', payload: data });
+    this.props.dispatch({ type: 'mproduct/query', payload: data });
   }
 
   // 选择产品
@@ -475,7 +475,7 @@ export default class CreateOrder extends Component {
           );
         // 课程包里的配套(显示价格和数量)
         } else if (!row.options && row.type === Codes.CODE_SUPPORT) {
-          return `¥${row.price1} / ${row.chargeUnit}`;
+          return `¥${row.price2} / ${row.chargeUnit}`;
         }
       },
       width: '13%',

+ 0 - 35
src/routes/Order/Add/product.js

@@ -89,38 +89,3 @@ export default class MerchantProductSelectModal extends PureComponent {
     );
   }
 }
-
-// import React, { PureComponent } from 'react';
-// import { Modal, List, Collapse, Card, Avatar, Input } from 'antd';
-//
-// const { Panel } = Collapse;
-// export default class GoodsSelectModal extends PureComponent {
-//   render() {
-//     const { modalVisible, onCancel, onOk, pagination, dataSource, ...restProps } = this.props;
-//     return (
-//       <Modal
-//         title="添加商品"
-//         visible={modalVisible}
-//         onOk={onOk}
-//         onCancel={onCancel}
-//         {...restProps}
-//       >
-//         <List
-//           size="large"
-//           bordered
-//           grid={{ gutter: 16, column: 2 }}
-//           pagination={pagination}
-//           dataSource={dataSource}
-//           renderItem={item =>
-//             <List.Item
-//             >
-//               <Card title={item.code}>
-//
-//               </Card>
-//             </List.Item>
-//           }
-//         />
-//       </Modal>
-//     );
-//   }
-// }

+ 112 - 109
src/routes/SoldProduct/index.js

@@ -11,6 +11,7 @@ import {
   Select,
 } from 'antd';
 import moment from 'moment';
+import PageHeaderLayout from '../../layouts/PageHeaderLayout';
 import { productType, pageSize } from '../../utils/config';
 import styles from './index.less';
 
@@ -133,115 +134,117 @@ export default class SoldProductList extends Component {
     const newPagination = !!pagination && { ...pagination, showSizeChanger: true, showQuickJumper: true, showTotal: total => `共 ${total} 条` };
 
     return (
-      <Card>
-        <Form layout="vertical" className={styles.tableSearchForm} onSubmit={this.handleFilterSubmit}>
-          <Row gutter={24}>
-            <Col span={8}>
-              <Form.Item label="渠道名称">
-                {getFieldDecorator('merchantId', {
-                })(
-                  <Select placeholder="请选择" style={{ width: '100%' }}>
-                    {merchant.list.map(item =>
-                      <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>)}
-                  </Select>
-                )}
-              </Form.Item>
-            </Col>
-            <Col span={8}>
-              <Form.Item label="校区名称">
-                {getFieldDecorator('campusName', {
-                })(<Input placeholder="请输入" />)}
-              </Form.Item>
-            </Col>
-            <Col span={8}>
-              <Form.Item label="校区编号">
-                {getFieldDecorator('campusCode', {
-                })(<Input placeholder="请输入" />)}
-              </Form.Item>
-            </Col>
-          </Row>
-          <Row gutter={24}>
-            <Col span={8}>
-              <Form.Item label="产品编号">
-                {getFieldDecorator('productCode', {
-                })(<Input placeholder="请输入" />)}
-              </Form.Item>
-            </Col>
-            <Col span={8}>
-              <Form.Item label="终端编号">
-                {getFieldDecorator('userCode', {
-                })(<Input placeholder="请输入" />)}
-              </Form.Item>
-            </Col>
-          </Row>
-          <Row>
-            <Col span={24} style={{ textAlign: 'left' }}>
-              <Button type="primary" htmlType="submit">搜索</Button>
-              <Button onClick={this.handleFilterReset} style={{ marginLeft: 8 }}>重置</Button>
-            </Col>
-          </Row>
-          {/* <Row gutter={24}>
-            <Col span={12}>
-              <Form.Item label="起始时间">
-                {getFieldDecorator('time', {
-                })(<RangePicker />)}
-              </Form.Item>
-            </Col>
-            <Col span={12}>
-              <Form.Item label="终端编号">
-                {getFieldDecorator('userCode', {
-                })(<Input placeholder="请输入" />)}
-              </Form.Item>
-            </Col>
-          </Row>
-          <Row gutter={24}>
-            <Col span={12}>
-              <Form.Item label="校区编号">
-                {getFieldDecorator('campusCode', {
-                })(<Input placeholder="请输入" />)}
-              </Form.Item>
-            </Col>
-            <Col span={12}>
-              <Form.Item label="校区名称">
-                {getFieldDecorator('campusName', {
-                })(<Input placeholder="请输入" />)}
-              </Form.Item>
-            </Col>
-          </Row>
-          <Row>
-            <Col span={24} style={{ textAlign: 'left' }}>
-              <Form.Item label="订单状态">
-                {getFieldDecorator('orderStatus', {
-                  initialValue: 'all',
-                })(
-                  <Radio.Group style={{ width: '100%' }}>
-                    <Radio key="all" value="all">不限</Radio>
-                    {Object.keys(orderStatuses).map(item =>
-                      <Radio key={item} value={item}>{orderStatuses[item]}</Radio>)
-                    }
-                  </Radio.Group>
-                )}
-              </Form.Item>
-            </Col>
-          </Row>
-          <Row>
-            <Col span={24} style={{ textAlign: 'right' }}>
-              <Button type="primary" htmlType="submit">搜索</Button>
-              <Button onClick={this.handleFilterReset} style={{ marginLeft: 8 }}>重置</Button>
-            </Col>
-          </Row> */}
-        </Form>
-        <Table
-          bordered
-          loading={listLoading}
-          onChange={this.handleTableChange}
-          rowKey={record => record.id}
-          columns={columns}
-          dataSource={list}
-          pagination={newPagination}
-          scroll={{ x: 1800 }}
-        />
-      </Card>
+      <PageHeaderLayout>
+        <Card>
+          <Form layout="vertical" className={styles.tableSearchForm} onSubmit={this.handleFilterSubmit}>
+            <Row gutter={24}>
+              <Col span={8}>
+                <Form.Item label="渠道名称">
+                  {getFieldDecorator('merchantId', {
+                  })(
+                    <Select placeholder="请选择" style={{ width: '100%' }}>
+                      {merchant.list.map(item =>
+                        <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>)}
+                    </Select>
+                  )}
+                </Form.Item>
+              </Col>
+              <Col span={8}>
+                <Form.Item label="校区名称">
+                  {getFieldDecorator('campusName', {
+                  })(<Input placeholder="请输入" />)}
+                </Form.Item>
+              </Col>
+              <Col span={8}>
+                <Form.Item label="校区编号">
+                  {getFieldDecorator('campusCode', {
+                  })(<Input placeholder="请输入" />)}
+                </Form.Item>
+              </Col>
+            </Row>
+            <Row gutter={24}>
+              <Col span={8}>
+                <Form.Item label="产品编号">
+                  {getFieldDecorator('productCode', {
+                  })(<Input placeholder="请输入" />)}
+                </Form.Item>
+              </Col>
+              <Col span={8}>
+                <Form.Item label="终端编号">
+                  {getFieldDecorator('userCode', {
+                  })(<Input placeholder="请输入" />)}
+                </Form.Item>
+              </Col>
+            </Row>
+            <Row>
+              <Col span={24} style={{ textAlign: 'left' }}>
+                <Button type="primary" htmlType="submit">搜索</Button>
+                <Button onClick={this.handleFilterReset} style={{ marginLeft: 8 }}>重置</Button>
+              </Col>
+            </Row>
+            {/* <Row gutter={24}>
+              <Col span={12}>
+                <Form.Item label="起始时间">
+                  {getFieldDecorator('time', {
+                  })(<RangePicker />)}
+                </Form.Item>
+              </Col>
+              <Col span={12}>
+                <Form.Item label="终端编号">
+                  {getFieldDecorator('userCode', {
+                  })(<Input placeholder="请输入" />)}
+                </Form.Item>
+              </Col>
+            </Row>
+            <Row gutter={24}>
+              <Col span={12}>
+                <Form.Item label="校区编号">
+                  {getFieldDecorator('campusCode', {
+                  })(<Input placeholder="请输入" />)}
+                </Form.Item>
+              </Col>
+              <Col span={12}>
+                <Form.Item label="校区名称">
+                  {getFieldDecorator('campusName', {
+                  })(<Input placeholder="请输入" />)}
+                </Form.Item>
+              </Col>
+            </Row>
+            <Row>
+              <Col span={24} style={{ textAlign: 'left' }}>
+                <Form.Item label="订单状态">
+                  {getFieldDecorator('orderStatus', {
+                    initialValue: 'all',
+                  })(
+                    <Radio.Group style={{ width: '100%' }}>
+                      <Radio key="all" value="all">不限</Radio>
+                      {Object.keys(orderStatuses).map(item =>
+                        <Radio key={item} value={item}>{orderStatuses[item]}</Radio>)
+                      }
+                    </Radio.Group>
+                  )}
+                </Form.Item>
+              </Col>
+            </Row>
+            <Row>
+              <Col span={24} style={{ textAlign: 'right' }}>
+                <Button type="primary" htmlType="submit">搜索</Button>
+                <Button onClick={this.handleFilterReset} style={{ marginLeft: 8 }}>重置</Button>
+              </Col>
+            </Row> */}
+          </Form>
+          <Table
+            bordered
+            loading={listLoading}
+            onChange={this.handleTableChange}
+            rowKey={record => record.id}
+            columns={columns}
+            dataSource={list}
+            pagination={newPagination}
+            scroll={{ x: 1800 }}
+          />
+        </Card>
+      </PageHeaderLayout>
     );
   }
 }