dingxin 5 vuotta sitten
vanhempi
commit
448b2a696b

+ 91
- 0
src/pages/channel/InviteClients.jsx Näytä tiedosto

@@ -0,0 +1,91 @@
1
+import React from 'react';
2
+import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import channels from './channelList.less';
5
+import router from 'umi/router';
6
+
7
+const { Option } = Select;
8
+function handleChange(value) {
9
+  console.log(`selected ${value}`);
10
+}
11
+
12
+
13
+const menu = (
14
+  <Menu onClick={handleMenuClick}>
15
+    <Menu.Item key="1">
16
+      <Icon type="user" />
17
+      1st menu item
18
+    </Menu.Item>
19
+    <Menu.Item key="2">
20
+      <Icon type="user" />
21
+      2nd menu item
22
+    </Menu.Item>
23
+    <Menu.Item key="3">
24
+      <Icon type="user" />
25
+      3rd item
26
+    </Menu.Item>
27
+  </Menu>
28
+);
29
+const dataSource = [
30
+  {
31
+    key: '1',
32
+    img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
33
+    name: '123',
34
+    age: 32,
35
+    address: '西湖区湖底公园1号',
36
+  },
37
+  {
38
+    key: '2',
39
+    img: '',
40
+    age: 42,
41
+    address: '西湖区湖底公园1号',
42
+  },
43
+];
44
+
45
+const columns = [
46
+  {
47
+    title: '头像',
48
+    dataIndex: 'img',
49
+    key: 'img',
50
+    align: 'center',
51
+
52
+    render: (text, record) => <img src={record.img} className={channels.touxiang} />,
53
+  },
54
+  {
55
+    title: '用户姓名',
56
+    dataIndex: 'name',
57
+    key: 'name',
58
+    align: 'center',
59
+    render: text => <a>{text}</a>,
60
+  },
61
+  {
62
+    title: '电话',
63
+    dataIndex: 'integral',
64
+    key: 'integral',
65
+    align: 'center',
66
+  },
67
+  {
68
+    title: '性别',
69
+    dataIndex: 'total',
70
+    key: 'total',
71
+    align: 'center',
72
+  },
73
+];
74
+
75
+// 跳转到编辑商品
76
+function toEditGoods() {
77
+  router.push({
78
+    pathname: '/channel/addChannel',
79
+    query: {
80
+      a: 'b',
81
+    },
82
+  });
83
+}
84
+export default () => (
85
+    <Table dataSource={dataSource} columns={columns} />
86
+);
87
+
88
+function handleMenuClick(e) {
89
+  message.info('Click on menu item.');
90
+  console.log('click', e);
91
+}

+ 60
- 0
src/pages/channel/addChannel.jsx Näytä tiedosto

@@ -0,0 +1,60 @@
1
+import React from 'react';
2
+import { Form, Select, Input, Button } from 'antd';
3
+import channels from './channelList.less';
4
+
5
+const { TextArea } = Input;
6
+const { Option } = Select;
7
+
8
+class App extends React.Component {
9
+  handleSubmit = e => {
10
+    e.preventDefault();
11
+    this.props.form.validateFields((err, values) => {
12
+      console.log('Form.Item', values.note)
13
+      if (!err) {
14
+       alert('Received values of form: ', values);
15
+      }
16
+    });
17
+  };
18
+
19
+  render() {
20
+    const { getFieldDecorator } = this.props.form;
21
+    return (
22
+      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={this.handleSubmit}>
23
+        <Form.Item label="渠道名称">
24
+          {getFieldDecorator('note', {
25
+            rules: [{ required: true, message: '请输入渠道名称' }],
26
+          })(<Input className={channels.inpuit} / >)}
27
+        </Form.Item>
28
+        <Form.Item label="联系人">
29
+          {getFieldDecorator('note2', {
30
+            rules: [{ required: true, message: ' 请输入联系人' }],
31
+          })(<Input className={channels.inpuit} />)}
32
+        </Form.Item>
33
+        <Form.Item label="联系电话">
34
+          {getFieldDecorator('note3', {
35
+            rules: [{ required: true, message: '请输入联系电话' }],
36
+          })(<Input className={channels.inpuit} />)}
37
+        </Form.Item>
38
+        <Form.Item label="说明描述">
39
+       <TextArea className={channels.inpuitTxt} rows={8} />
40
+        </Form.Item>
41
+        <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
42
+          <Button type="primary" htmlType="submit">
43
+            保存
44
+          </Button>
45
+          <Button className={channels.formButton} type="primary" htmlType="submit">
46
+            取消
47
+          </Button>
48
+        </Form.Item>
49
+      </Form>
50
+    );
51
+  }
52
+}
53
+
54
+const WrappedApp = Form.create({ name: 'coordinated' })(App);
55
+
56
+export default () => (
57
+  <>
58
+    <WrappedApp />
59
+  </>
60
+);

+ 114
- 0
src/pages/channel/brokerList.jsx Näytä tiedosto

@@ -0,0 +1,114 @@
1
+import React from 'react';
2
+import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import channels from './channelList.less';
5
+import router from 'umi/router';
6
+
7
+const { Option } = Select;
8
+function handleChange(value) {
9
+  console.log(`selected ${value}`);
10
+}
11
+
12
+
13
+const menu = (
14
+  <Menu onClick={handleMenuClick}>
15
+    <Menu.Item key="1">
16
+      <Icon type="user" />
17
+      1st menu item
18
+    </Menu.Item>
19
+    <Menu.Item key="2">
20
+      <Icon type="user" />
21
+      2nd menu item
22
+    </Menu.Item>
23
+    <Menu.Item key="3">
24
+      <Icon type="user" />
25
+      3rd item
26
+    </Menu.Item>
27
+  </Menu>
28
+);
29
+const dataSource = [
30
+  {
31
+    key: '1',
32
+    img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
33
+    name: '123',
34
+    age: 32,
35
+    address: '西湖区湖底公园1号',
36
+  },
37
+  {
38
+    key: '2',
39
+    img: '',
40
+    age: 42,
41
+    address: '西湖区湖底公园1号',
42
+  },
43
+];
44
+
45
+const columns = [
46
+  {
47
+    title: '头像',
48
+    dataIndex: 'img',
49
+    key: 'img',
50
+    align: 'center',
51
+
52
+    render: (text, record) => <img src={record.img} className={channels.touxiang} />,
53
+  },
54
+  {
55
+    title: '用户姓名',
56
+    dataIndex: 'name',
57
+    key: 'name',
58
+    align: 'center',
59
+    render: text => <a>{text}</a>,
60
+  },
61
+  {
62
+    title: '电话',
63
+    dataIndex: 'integral',
64
+    key: 'integral',
65
+    align: 'center',
66
+  },
67
+  {
68
+    title: '性别',
69
+    dataIndex: 'total',
70
+    key: 'total',
71
+    align: 'center',
72
+  },
73
+  {
74
+    title: '推荐客户',
75
+    dataIndex: 'exchanged',
76
+    key: 'exchanged',
77
+    align: 'center',
78
+  },
79
+  {
80
+    title: '邀请经纪人',
81
+    dataIndex: 'rest',
82
+    key: 'rest',
83
+    align: 'center',
84
+  },
85
+];
86
+
87
+// 跳转到编辑商品
88
+function toEditGoods() {
89
+  router.push({
90
+    pathname: '/channel/addChannel',
91
+    query: {
92
+      a: 'b',
93
+    },
94
+  });
95
+}
96
+export default () => (
97
+  <>
98
+    <div className={ channels.searchBox }>
99
+      <div>
100
+        <span className={ channels.selectName }>姓名</span>
101
+        <Input style ={{ width: 150 }} />
102
+        <span className={ channels.selectName }>电话</span>
103
+        <Input style ={{ width: 150 }}/>
104
+      </div>
105
+      <Button className={channels.about}>查询</Button>
106
+    </div>
107
+    <Table dataSource={dataSource} columns={columns} />
108
+  </>
109
+);
110
+
111
+function handleMenuClick(e) {
112
+  message.info('Click on menu item.');
113
+  console.log('click', e);
114
+}

+ 109
- 0
src/pages/channel/recommendClients.jsx Näytä tiedosto

@@ -0,0 +1,109 @@
1
+import React from 'react';
2
+import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import channels from './channelList.less';
5
+import router from 'umi/router';
6
+
7
+const { Option } = Select;
8
+function handleChange(value) {
9
+  console.log(`selected ${value}`);
10
+}
11
+
12
+
13
+const menu = (
14
+  <Menu onClick={handleMenuClick}>
15
+    <Menu.Item key="1">
16
+      <Icon type="user" />
17
+      1st menu item
18
+    </Menu.Item>
19
+    <Menu.Item key="2">
20
+      <Icon type="user" />
21
+      2nd menu item
22
+    </Menu.Item>
23
+    <Menu.Item key="3">
24
+      <Icon type="user" />
25
+      3rd item
26
+    </Menu.Item>
27
+  </Menu>
28
+);
29
+const dataSource = [
30
+  {
31
+    key: '1',
32
+    img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
33
+    name: '123',
34
+    age: 32,
35
+    address: '西湖区湖底公园1号',
36
+  },
37
+  {
38
+    key: '2',
39
+    img: '',
40
+    age: 42,
41
+    address: '西湖区湖底公园1号',
42
+  },
43
+];
44
+
45
+const columns = [
46
+  {
47
+    title: '头像',
48
+    dataIndex: 'img',
49
+    key: 'img',
50
+    align: 'center',
51
+
52
+    render: (text, record) => <img src={record.img} className={channels.touxiang} />,
53
+  },
54
+  {
55
+    title: '用户姓名',
56
+    dataIndex: 'name',
57
+    key: 'name',
58
+    align: 'center',
59
+    render: text => <a>{text}</a>,
60
+  },
61
+  {
62
+    title: '电话',
63
+    dataIndex: 'integral',
64
+    key: 'integral',
65
+    align: 'center',
66
+  },
67
+  {
68
+    title: '性别',
69
+    dataIndex: 'total',
70
+    key: 'total',
71
+    align: 'center',
72
+  },
73
+  {
74
+    title: '意向项目',
75
+    dataIndex: 'exchanged',
76
+    key: 'exchanged',
77
+    align: 'center',
78
+  },
79
+  {
80
+    title: '推荐时间',
81
+    dataIndex: 'rest',
82
+    key: 'rest',
83
+    align: 'center',
84
+  },
85
+  {
86
+    title: '状态',
87
+    dataIndex: 'rest',
88
+    key: 'rest',
89
+    align: 'center',
90
+  },
91
+];
92
+
93
+// 跳转到编辑商品
94
+function toEditGoods() {
95
+  router.push({
96
+    pathname: '/channel/addChannel',
97
+    query: {
98
+      a: 'b',
99
+    },
100
+  });
101
+}
102
+export default () => (
103
+    <Table dataSource={dataSource} columns={columns} />
104
+);
105
+
106
+function handleMenuClick(e) {
107
+  message.info('Click on menu item.');
108
+  console.log('click', e);
109
+}