Преглед изворни кода

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into dev

顾绍勇 пре 5 година
родитељ
комит
92ee23128c

+ 28
- 0
config/routes.js Прегледај датотеку

692
               },
692
               },
693
             ],
693
             ],
694
           },
694
           },
695
+          {
696
+            path: '/eContract',
697
+            name: '电子合同',
698
+            component: '../layouts/BlankLayout',
699
+            routes: [
700
+              {
701
+                path: '/eContract/template/list',
702
+                name: '合同模板',
703
+                component: './eContract/template/list',
704
+              },
705
+              {
706
+                path: '/eContract/businessConfig/list',
707
+                name: '业务配置',
708
+                component: './eContract/businessConfig/list',
709
+              },
710
+              {
711
+                path: '/eContract/businessConfig/detail',
712
+                name: '业务配置详情',
713
+                hideInMenu: true,
714
+                component: './eContract/businessConfig/detail',
715
+              },
716
+              {
717
+                path: '/eContract/manage/list',
718
+                name: '合同管理',
719
+                component: './eContract/manage/list',
720
+              },
721
+            ],
722
+          },
695
           // {
723
           // {
696
           //   path: '/miniapp',
724
           //   path: '/miniapp',
697
           //   name: '小程序管理',
725
           //   name: '小程序管理',

+ 127
- 0
src/pages/eContract/businessConfig/components/SelectCompany.jsx Прегледај датотеку

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col } from 'antd';
3
+import { apis, fetch } from '../../../../utils/request';
4
+
5
+const { Column, ColumnGroup } = Table;
6
+const getH5List = fetch(apis.h5Activity.EffectiveList)
7
+const { Search } = Input;
8
+export default props => {
9
+  const {
10
+    value,
11
+    onChange,
12
+    ...rest
13
+  } = props;
14
+
15
+  const [list, setList] = useState([]);
16
+  const [visible, setVisible] = useState(false);
17
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '合同标题' })
18
+  const getGroupTitle = val => {
19
+    return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
20
+  }
21
+  const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
22
+
23
+  const buildingId = props.buildingId
24
+
25
+  useEffect(() => {
26
+    getH5List({
27
+      params: {
28
+        pageNum: 1,
29
+        pageSize: 999,
30
+        isMiniapp: 1,
31
+        status: 1,
32
+        buildingId,
33
+      },
34
+    }).then(data => {
35
+      setList(data.records || [])
36
+
37
+      updateGroup(buildingId ? undefined : value);
38
+    })
39
+  }, [buildingId]);
40
+  const searchH5 = (e) => {
41
+    getH5List({
42
+      params: {
43
+        pageNum: 1,
44
+        pageSize: 999,
45
+        isMiniapp: 1,
46
+        status: 1,
47
+        name: e
48
+      },
49
+    }).then(data => {
50
+      setList(data.records || [])
51
+
52
+      updateGroup(value ? undefined : value);
53
+    })
54
+  }
55
+
56
+  if (value !== group.groupId) {
57
+    updateGroup(value);
58
+  }
59
+
60
+  const handleChange = val => {
61
+    onChange(val)
62
+  }
63
+
64
+  const setData = val => {
65
+    updateGroup(val.id)
66
+    onChange(val.id)
67
+    setVisible(false)
68
+    props.onSuccess(val.name);
69
+  }
70
+
71
+  const clearVal = val => {
72
+    onChange(val)
73
+    setVisible(false)
74
+  }
75
+
76
+  const columns = [
77
+    {
78
+      title: '标题',
79
+      dataIndex: 'name',
80
+      key: 'drainageId',
81
+      align: 'center',
82
+      ellipsis: true,
83
+      render: text => <a>{text}</a>,
84
+    },
85
+    {
86
+      title: '操作',
87
+      align: 'center',
88
+      width: '20%',
89
+      render: (text, record) => (
90
+        <span>
91
+          <a onClick={() => setData({id:record.drainageId, name:record.name})} style={{ color: 'blue' }}>选择</a>
92
+        </span>
93
+      ),
94
+    },
95
+  ];
96
+
97
+  return (
98
+    <div>
99
+      <div>{group.groupName}<a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择关联企业</a></div>
100
+      <Modal
101
+        title="请选择"
102
+        visible={visible}
103
+        onCancel={() => setVisible(false)}
104
+        footer={[]}
105
+      >
106
+        <Row>
107
+          <Col span={18}>
108
+            <Search
109
+              placeholder="请输入标题"
110
+              enterButton="搜索"
111
+              size="default"
112
+              allowClear="true"
113
+              onSearch={value => searchH5(value)}
114
+              style={{ marginBottom: '16px' }}
115
+            />
116
+          </Col>
117
+          <Col span={4} offset={1}>
118
+            <Button type="primary" onClick={()=>clearVal('')}>重置</Button>
119
+          </Col>
120
+        </Row>
121
+
122
+        <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
123
+
124
+      </Modal>
125
+    </div>
126
+  )
127
+}

+ 127
- 0
src/pages/eContract/businessConfig/components/SelectContractTemp.jsx Прегледај датотеку

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col } from 'antd';
3
+import { apis, fetch } from '../../../../utils/request';
4
+
5
+const { Column, ColumnGroup } = Table;
6
+const getH5List = fetch(apis.h5Activity.EffectiveList)
7
+const { Search } = Input;
8
+export default props => {
9
+  const {
10
+    value,
11
+    onChange,
12
+    ...rest
13
+  } = props;
14
+
15
+  const [list, setList] = useState([]);
16
+  const [visible, setVisible] = useState(false);
17
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '合同标题' })
18
+  const getGroupTitle = val => {
19
+    return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
20
+  }
21
+  const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
22
+
23
+  const buildingId = props.buildingId
24
+
25
+  useEffect(() => {
26
+    getH5List({
27
+      params: {
28
+        pageNum: 1,
29
+        pageSize: 999,
30
+        isMiniapp: 1,
31
+        status: 1,
32
+        buildingId,
33
+      },
34
+    }).then(data => {
35
+      setList(data.records || [])
36
+
37
+      updateGroup(buildingId ? undefined : value);
38
+    })
39
+  }, [buildingId]);
40
+  const searchH5 = (e) => {
41
+    getH5List({
42
+      params: {
43
+        pageNum: 1,
44
+        pageSize: 999,
45
+        isMiniapp: 1,
46
+        status: 1,
47
+        name: e
48
+      },
49
+    }).then(data => {
50
+      setList(data.records || [])
51
+
52
+      updateGroup(value ? undefined : value);
53
+    })
54
+  }
55
+
56
+  if (value !== group.groupId) {
57
+    updateGroup(value);
58
+  }
59
+
60
+  const handleChange = val => {
61
+    onChange(val)
62
+  }
63
+
64
+  const setData = val => {
65
+    updateGroup(val.id)
66
+    onChange(val.id)
67
+    setVisible(false)
68
+    props.onSuccess(val.name);
69
+  }
70
+
71
+  const clearVal = val => {
72
+    onChange(val)
73
+    setVisible(false)
74
+  }
75
+
76
+  const columns = [
77
+    {
78
+      title: '标题',
79
+      dataIndex: 'name',
80
+      key: 'drainageId',
81
+      align: 'center',
82
+      ellipsis: true,
83
+      render: text => <a>{text}</a>,
84
+    },
85
+    {
86
+      title: '操作',
87
+      align: 'center',
88
+      width: '20%',
89
+      render: (text, record) => (
90
+        <span>
91
+          <a onClick={() => setData({id:record.drainageId, name:record.name})} style={{ color: 'blue' }}>选择</a>
92
+        </span>
93
+      ),
94
+    },
95
+  ];
96
+
97
+  return (
98
+    <div>
99
+      <div>{group.groupName}<a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择合同模板</a></div>
100
+      <Modal
101
+        title="请选择"
102
+        visible={visible}
103
+        onCancel={() => setVisible(false)}
104
+        footer={[]}
105
+      >
106
+        <Row>
107
+          <Col span={18}>
108
+            <Search
109
+              placeholder="请输入标题"
110
+              enterButton="搜索"
111
+              size="default"
112
+              allowClear="true"
113
+              onSearch={value => searchH5(value)}
114
+              style={{ marginBottom: '16px' }}
115
+            />
116
+          </Col>
117
+          <Col span={4} offset={1}>
118
+            <Button type="primary" onClick={()=>clearVal('')}>重置</Button>
119
+          </Col>
120
+        </Row>
121
+
122
+        <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
123
+
124
+      </Modal>
125
+    </div>
126
+  )
127
+}

+ 127
- 0
src/pages/eContract/businessConfig/components/SelectRaise.jsx Прегледај датотеку

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col } from 'antd';
3
+import { apis, fetch } from '../../../../utils/request';
4
+
5
+const { Column, ColumnGroup } = Table;
6
+const getH5List = fetch(apis.h5Activity.EffectiveList)
7
+const { Search } = Input;
8
+export default props => {
9
+  const {
10
+    value,
11
+    onChange,
12
+    ...rest
13
+  } = props;
14
+
15
+  const [list, setList] = useState([]);
16
+  const [visible, setVisible] = useState(false);
17
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '合同标题' })
18
+  const getGroupTitle = val => {
19
+    return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
20
+  }
21
+  const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
22
+
23
+  const buildingId = props.buildingId
24
+
25
+  useEffect(() => {
26
+    getH5List({
27
+      params: {
28
+        pageNum: 1,
29
+        pageSize: 999,
30
+        isMiniapp: 1,
31
+        status: 1,
32
+        buildingId,
33
+      },
34
+    }).then(data => {
35
+      setList(data.records || [])
36
+
37
+      updateGroup(buildingId ? undefined : value);
38
+    })
39
+  }, [buildingId]);
40
+  const searchH5 = (e) => {
41
+    getH5List({
42
+      params: {
43
+        pageNum: 1,
44
+        pageSize: 999,
45
+        isMiniapp: 1,
46
+        status: 1,
47
+        name: e
48
+      },
49
+    }).then(data => {
50
+      setList(data.records || [])
51
+
52
+      updateGroup(value ? undefined : value);
53
+    })
54
+  }
55
+
56
+  if (value !== group.groupId) {
57
+    updateGroup(value);
58
+  }
59
+
60
+  const handleChange = val => {
61
+    onChange(val)
62
+  }
63
+
64
+  const setData = val => {
65
+    updateGroup(val.id)
66
+    onChange(val.id)
67
+    setVisible(false)
68
+    props.onSuccess(val.name);
69
+  }
70
+
71
+  const clearVal = val => {
72
+    onChange(val)
73
+    setVisible(false)
74
+  }
75
+
76
+  const columns = [
77
+    {
78
+      title: '标题',
79
+      dataIndex: 'name',
80
+      key: 'drainageId',
81
+      align: 'center',
82
+      ellipsis: true,
83
+      render: text => <a>{text}</a>,
84
+    },
85
+    {
86
+      title: '操作',
87
+      align: 'center',
88
+      width: '20%',
89
+      render: (text, record) => (
90
+        <span>
91
+          <a onClick={() => setData({id:record.drainageId, name:record.name})} style={{ color: 'blue' }}>选择</a>
92
+        </span>
93
+      ),
94
+    },
95
+  ];
96
+
97
+  return (
98
+    <div>
99
+      <div>{group.groupName}<a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择关联业务</a></div>
100
+      <Modal
101
+        title="请选择"
102
+        visible={visible}
103
+        onCancel={() => setVisible(false)}
104
+        footer={[]}
105
+      >
106
+        <Row>
107
+          <Col span={18}>
108
+            <Search
109
+              placeholder="请输入标题"
110
+              enterButton="搜索"
111
+              size="default"
112
+              allowClear="true"
113
+              onSearch={value => searchH5(value)}
114
+              style={{ marginBottom: '16px' }}
115
+            />
116
+          </Col>
117
+          <Col span={4} offset={1}>
118
+            <Button type="primary" onClick={()=>clearVal('')}>重置</Button>
119
+          </Col>
120
+        </Row>
121
+
122
+        <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
123
+
124
+      </Modal>
125
+    </div>
126
+  )
127
+}

+ 127
- 0
src/pages/eContract/businessConfig/components/SelectSeal.jsx Прегледај датотеку

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col } from 'antd';
3
+import { apis, fetch } from '../../../../utils/request';
4
+
5
+const { Column, ColumnGroup } = Table;
6
+const getH5List = fetch(apis.h5Activity.EffectiveList)
7
+const { Search } = Input;
8
+export default props => {
9
+  const {
10
+    value,
11
+    onChange,
12
+    ...rest
13
+  } = props;
14
+
15
+  const [list, setList] = useState([]);
16
+  const [visible, setVisible] = useState(false);
17
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '合同标题' })
18
+  const getGroupTitle = val => {
19
+    return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
20
+  }
21
+  const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
22
+
23
+  const buildingId = props.buildingId
24
+
25
+  useEffect(() => {
26
+    getH5List({
27
+      params: {
28
+        pageNum: 1,
29
+        pageSize: 999,
30
+        isMiniapp: 1,
31
+        status: 1,
32
+        buildingId,
33
+      },
34
+    }).then(data => {
35
+      setList(data.records || [])
36
+
37
+      updateGroup(buildingId ? undefined : value);
38
+    })
39
+  }, [buildingId]);
40
+  const searchH5 = (e) => {
41
+    getH5List({
42
+      params: {
43
+        pageNum: 1,
44
+        pageSize: 999,
45
+        isMiniapp: 1,
46
+        status: 1,
47
+        name: e
48
+      },
49
+    }).then(data => {
50
+      setList(data.records || [])
51
+
52
+      updateGroup(value ? undefined : value);
53
+    })
54
+  }
55
+
56
+  if (value !== group.groupId) {
57
+    updateGroup(value);
58
+  }
59
+
60
+  const handleChange = val => {
61
+    onChange(val)
62
+  }
63
+
64
+  const setData = val => {
65
+    updateGroup(val.id)
66
+    onChange(val.id)
67
+    setVisible(false)
68
+    props.onSuccess(val.name);
69
+  }
70
+
71
+  const clearVal = val => {
72
+    onChange(val)
73
+    setVisible(false)
74
+  }
75
+
76
+  const columns = [
77
+    {
78
+      title: '标题',
79
+      dataIndex: 'name',
80
+      key: 'drainageId',
81
+      align: 'center',
82
+      ellipsis: true,
83
+      render: text => <a>{text}</a>,
84
+    },
85
+    {
86
+      title: '操作',
87
+      align: 'center',
88
+      width: '20%',
89
+      render: (text, record) => (
90
+        <span>
91
+          <a onClick={() => setData({id:record.drainageId, name:record.name})} style={{ color: 'blue' }}>选择</a>
92
+        </span>
93
+      ),
94
+    },
95
+  ];
96
+
97
+  return (
98
+    <div>
99
+      <div>{group.groupName}<a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择企业印章</a></div>
100
+      <Modal
101
+        title="请选择"
102
+        visible={visible}
103
+        onCancel={() => setVisible(false)}
104
+        footer={[]}
105
+      >
106
+        <Row>
107
+          <Col span={18}>
108
+            <Search
109
+              placeholder="请输入标题"
110
+              enterButton="搜索"
111
+              size="default"
112
+              allowClear="true"
113
+              onSearch={value => searchH5(value)}
114
+              style={{ marginBottom: '16px' }}
115
+            />
116
+          </Col>
117
+          <Col span={4} offset={1}>
118
+            <Button type="primary" onClick={()=>clearVal('')}>重置</Button>
119
+          </Col>
120
+        </Row>
121
+
122
+        <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
123
+
124
+      </Modal>
125
+    </div>
126
+  )
127
+}

+ 186
- 0
src/pages/eContract/businessConfig/detail.jsx Прегледај датотеку

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker, Radio, Upload, InputNumber } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import router from 'umi/router';
5
+import moment from 'moment';
6
+import SelectCity from '../../../components/SelectButton/CitySelect'
7
+import BuildSelect2 from '../../../components/SelectButton/BuildSelect2'
8
+import LivePlatSelect from '../../../components/SelectButton/LivePlatSelect'
9
+import CitySelect3 from '../../../components/SelectButton/CitySelect3'
10
+import ImageUpload from '../../../components/XForm/ImageUpload'
11
+import Wangedit from '../../../components/Wangedit/Wangedit'
12
+import apis from '../../../services/apis';
13
+import request from '../../../utils/request';
14
+import AuthButton from '@/components/AuthButton';
15
+import SelectContractTemp from './components/SelectContractTemp';
16
+import SelectRaise from './components/SelectRaise';
17
+import SelectCompany from './components/SelectCompany';
18
+import SelectSeal from './components/SelectSeal';
19
+
20
+const { Option } = Select;
21
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
22
+
23
+let cityId = ''
24
+
25
+const header = props => {
26
+  const { salesBatchId } = props.location.query
27
+  const [ saleBatchData, setSaleBatchData ] = useState({})
28
+  const [showHelp, setShowHelp] = useState(false)
29
+
30
+  const [targetName, setTargetName] = useState({})
31
+  const [companyName, setCompanyName] = useState({})
32
+  const [contractTemplateName, setContractTemplateName] = useState({})
33
+  // const [targetName, setTargetName] = useState({})
34
+
35
+  const cancelPage = () =>{
36
+    router.push({
37
+      pathname: '/activity/liveActivity/list',
38
+    });
39
+  }
40
+
41
+   //打开新页面
42
+   const openIndexImg = () => {
43
+    const newWin=window.open('about:blank');
44
+    newWin.location.href="http://njcj.oss-cn-shanghai.aliyuncs.com/%E6%95%99%E7%A8%8B.png"
45
+  }
46
+
47
+  function highlightsTypeChange(e) {
48
+    setTypeState(e.target.value)
49
+  }
50
+
51
+  function disabledDate(current) {
52
+    // Can not select days before today and today
53
+    return current && current < moment().endOf('day');
54
+  }
55
+
56
+  function companyOnSuccess(e){
57
+    console.log(e)
58
+    setCompanyName(e)
59
+  }
60
+
61
+  function contractOnSuccess(e){
62
+    console.log('contractOnSuccess', e)
63
+    setContractTemplateName(e)
64
+  }
65
+
66
+  function targetOnSuccess(e){
67
+    console.log('targetOnSuccess', e)
68
+    setTargetName(e)
69
+  }
70
+
71
+  function sealOnSuccess(e){
72
+    console.log('sealOnSuccess', e)
73
+  }
74
+
75
+  function handleSubmit (e) {
76
+    e.preventDefault();
77
+    props.form.validateFields((err, values) => {
78
+      if (!err){
79
+        request({ ...apis.taEcontract.addTaContractBusiness, data: { ...values },}).then((data) => {
80
+          message.info("保存成功")
81
+          router.push({
82
+            pathname: '/activity/liveActivity/list/index',
83
+          });
84
+        }).catch((err) => {
85
+          message.info(err.msg || err.message)
86
+        })
87
+      }
88
+    });
89
+  }
90
+
91
+  const { getFieldDecorator } = props.form;
92
+
93
+  return (
94
+    <>
95
+      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
96
+        <Form.Item label="合同标题">
97
+          {getFieldDecorator('contractTemplateId', {
98
+            rules: [{ required: true, message: ' 请选择合同模板' }],
99
+          })(<SelectContractTemp  onSuccess={e => contractOnSuccess(e)}/>)}
100
+          {getFieldDecorator('contractTemplateName', {initialValue:contractTemplateName,
101
+            rules: [{ required: true, message: ' 请选择关联业务' }],
102
+          })(<Input  hidden={true}/>)}
103
+        </Form.Item>
104
+        <Form.Item label="合同文件">
105
+          {getFieldDecorator('contractTemplateId')}<Button type="danger" style={{marginRight:'20px'}} onClick={openIndexImg}>查看文件</Button>
106
+        </Form.Item>
107
+        <Form.Item label="关联业务类型"> 
108
+          {getFieldDecorator('targetType', {
109
+              rules: [{ required: true, message: '请选择发布状态' }],
110
+            })(<Select placeholder="关联业务类型" style={{ width: '400px' }}>
111
+            <Option value="raise">房源认筹</Option>
112
+          </Select>)}
113
+        </Form.Item>
114
+        <Form.Item label="关联业务">
115
+          {getFieldDecorator('targetId', {
116
+            rules: [{ required: true, message: ' 请选择关联业务' }],
117
+          })(<SelectRaise onSuccess={e => targetOnSuccess(e)}/>)}
118
+          {getFieldDecorator('targetName', {initialValue:targetName,
119
+            rules: [{ required: true, message: ' 请选择关联业务' }],
120
+          })(<Input  hidden={true}/>)}
121
+        </Form.Item>
122
+        <Form.Item label="甲方" help="系统会在业务需要时自动签所选企业印章,比如用户在签署认筹合同前系统会自动签署企业印章。">
123
+          {getFieldDecorator('companyId', {
124
+            rules: [{ required: true, message: ' 请选择关联企业' }],
125
+          })(<SelectCompany onSuccess={e => companyOnSuccess(e)}/>)}
126
+          {getFieldDecorator('companyName', {initialValue:companyName,
127
+            rules: [{ required: true, message: ' 请选择关联业务' }],
128
+          })(<Input  hidden={true}/>)}
129
+        </Form.Item>
130
+        <Form.Item label="甲方印章" >
131
+          {getFieldDecorator('sealId', {
132
+            rules: [{ required: true, message: ' 请选择企业印章' }],
133
+          })(<SelectSeal onSuccess={e => sealOnSuccess(e)}/>)}
134
+        </Form.Item>
135
+        <Form.Item label="甲方签章定位关键字" help="关键字为合同文件中的文字内容(能被ctrl+f 查找功能检索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均可能会盖上指定用户的电子章,建议关键字在合同中保持唯一。">
136
+          {getFieldDecorator('signatoryKeywords', {
137
+            rules: [{ required: true, message: '请输入甲方签章定位关键字' }],
138
+          })(<Input maxLength={20} style={{width:'400px'}}/>)}
139
+        </Form.Item>
140
+        <Form.Item label="甲方关键字签章策略"> 
141
+          {getFieldDecorator('signatoryStrategy', {
142
+              rules: [{ required: true, message: '请选择甲方关键字签章策略' }],
143
+            })(<Select placeholder="甲方关键字签章策略" style={{ width: '400px' }}>
144
+            <Option value="last">最后一个关键字签章</Option>
145
+            <Option value="all">所有关键字签章</Option>
146
+            <Option value="first">第一给关键字签章</Option>
147
+          </Select>)}
148
+        </Form.Item>
149
+        <Form.Item label="乙方签章定位关键字" help="关键字为合同文件中的文字内容(能被ctrl+f 查找功能检索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均可能会盖上指定用户的电子章,建议关键字在合同中保持唯一。">
150
+          {getFieldDecorator('customerKeywords', {
151
+            rules: [{ required: true, message: '请输入乙方签章定位关键字' }],
152
+          })(<Input maxLength={20} style={{width:'400px'}}/>)}
153
+        </Form.Item>
154
+        <Form.Item label="乙方关键字签章策略"> 
155
+          {getFieldDecorator('customerStrategy', {
156
+              rules: [{ required: true, message: '请选择乙方关键字签章策略' }],
157
+            })(<Select placeholder="乙方关键字签章策略" style={{ width: '400px' }}>
158
+            <Option value="last">最后一个关键字签章</Option>
159
+            <Option value="all">所有关键字签章</Option>
160
+            <Option value="first">第一给关键字签章</Option>
161
+          </Select>)}
162
+        </Form.Item>
163
+        <Form.Item label="发布状态"> 
164
+          {getFieldDecorator('status', {
165
+              rules: [{ required: true, message: '请选择发布状态' }],
166
+            })(<Select placeholder="发布状态" style={{ width: '400px' }}>
167
+            <Option value='0'>否</Option>
168
+            <Option value='1'>是</Option>
169
+          </Select>)}
170
+        </Form.Item>
171
+        <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
172
+          <Button type="primary" htmlType="submit"style={{marginRight:'20px'}}>
173
+            确定
174
+          </Button>
175
+          <Button onClick={() => router.go(-1)}>
176
+            取消
177
+          </Button>
178
+        </Form.Item>
179
+      </Form>
180
+    </>
181
+  )
182
+}
183
+
184
+const WrappedHeader = Form.create({ name: 'header' })(header);
185
+
186
+export default WrappedHeader

+ 245
- 0
src/pages/eContract/businessConfig/list.jsx Прегледај датотеку

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import styles from '../../style/GoodsList.less';
5
+import router from 'umi/router';
6
+import moment from 'moment';
7
+import SelectCity from '../../../components/SelectButton/CitySelect'
8
+import BuildSelect from '../../../components/SelectButton/BuildSelect'
9
+import apis from '../../../services/apis';
10
+import request from '../../../utils/request';
11
+import AuthButton from '@/components/AuthButton';
12
+
13
+const { Option } = Select;
14
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15
+
16
+const header = props => {
17
+  const sampleId  = props.location.query.id;
18
+  const sampleName = props.location.query.sampleName;
19
+  const [data, setData] = useState({})
20
+  const [demend, setDemend] = useState({})
21
+  const [demandIds, setDemandIds] = useState([])
22
+  const [batchDel, setBatchDel] = useState({visable:false,demandIds:''})
23
+  const [addDemand, setAddDemand] = useState({visable:false})
24
+
25
+  useEffect(() => {
26
+    if(sampleId){
27
+      getList({ pageNum: 1, pageSize: 10, sampleId: sampleId });
28
+    }else{
29
+      getList({ pageNum: 1, pageSize: 10});
30
+    }
31
+    
32
+  }, [])
33
+
34
+  // 查询列表
35
+  const getList = (params) => {
36
+    console.log(params);
37
+    request({ ...apis.taEcontract.taContractBusinessList, params: { ...params } }).then((data) => {
38
+      console.log(data)
39
+      setData(data)
40
+    })
41
+  }
42
+
43
+  // 跳转到编辑
44
+  const toDetail = rowData => () => {
45
+    if(rowData) {
46
+      router.push({
47
+      pathname: '/eContract/businessConfig/detail',
48
+      query: {
49
+        id: rowData.demandId,
50
+      },
51
+    });
52
+      return
53
+    }
54
+  }
55
+
56
+  /**
57
+   *
58
+   *
59
+   * @param {*} props
60
+   * @returns
61
+   */
62
+
63
+  const columns = [
64
+    {
65
+      title: '合同标题',
66
+      dataIndex: 'contractTemplateName',
67
+      key: 'contractTemplateName',
68
+      align: 'center',
69
+    },
70
+    {
71
+      title: '关联业务类型',
72
+      dataIndex: 'targetType',
73
+      key: 'targetType',
74
+      align: 'center',
75
+      
76
+    },
77
+    {
78
+      title: '关联业务标题',
79
+      dataIndex: 'targetName',
80
+      key: 'targetName',
81
+      align: 'center',
82
+    },
83
+    {
84
+      title: '甲方',
85
+      dataIndex: 'companyName',
86
+      key: 'companyName',
87
+      align: 'center',
88
+    },
89
+    {
90
+      title: '发布状态',
91
+      dataIndex: 'status',
92
+      key: 'status',
93
+      align: 'center',
94
+      render: (text, records) => {
95
+        if (records.status === 1) { return '是' }
96
+        if (records.status === 0) { return '否' }
97
+      },
98
+    },
99
+    {
100
+      title: '新增时间',
101
+      dataIndex: 'createDate',
102
+      key: 'createDate',
103
+      align: 'center',
104
+      render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>
105
+    },
106
+    {
107
+      title: '修改时间',
108
+      dataIndex: 'updateDate',
109
+      key: 'updateDate',
110
+      align: 'center',
111
+      render: (x, row) => <><span>{`${moment(row.updateDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>
112
+    },
113
+    {
114
+      title: '操作',
115
+      dataIndex: 'handle',
116
+      key: 'handle',
117
+      align: 'center',
118
+      render: (text, record) => (
119
+        <AuthButton name="admin.h5Demand.detail.get" noRight={null}>
120
+          <a style={{ color: '#66B3FF' }} onClick={toDetail(record)} >查看详情</a>
121
+        </AuthButton>
122
+      ),
123
+    },
124
+  ];
125
+  
126
+  const rowSelection = {
127
+    onChange: (selectedRowKeys, selectedRows) => {
128
+      console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
129
+      setDemandIds(selectedRows)
130
+    },
131
+  };
132
+
133
+  const changePageNum = pageNumber => {
134
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
135
+  }
136
+
137
+  // 提交事件
138
+  const handleSubmit = (e, props) => {
139
+    e.preventDefault();
140
+    props.form.validateFields((err, values) => {
141
+      if (!err) {
142
+        getList({ pageNum: 1, pageSize: 10, ...values })
143
+      }
144
+    });
145
+  }
146
+
147
+  //重置搜索
148
+  function handleReset () {
149
+    props.form.resetFields();
150
+    getList({ pageNum: 1, pageSize: 10 })
151
+  }
152
+
153
+  function showBatchDel(e){
154
+  
155
+    if (demandIds.length <= 0){
156
+      message.info("请选择数据");
157
+      return;
158
+    }
159
+    setBatchDel(e);
160
+    if(!e.visable){
161
+      getList()
162
+    }
163
+  }
164
+
165
+  function addDemandInfo(e){
166
+    setAddDemand(e);
167
+  }
168
+
169
+  const { getFieldDecorator } = props.form
170
+  return (
171
+
172
+    <>
173
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
174
+        <Form.Item>
175
+          {getFieldDecorator('contractName')(
176
+            <Input
177
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
178
+            placeholder="合同标题"
179
+          />,
180
+          )}
181
+        </Form.Item>
182
+        <Form.Item>
183
+          {getFieldDecorator('targetType')(
184
+            <Select style={{ width: '180px' }} placeholder="业务类型">
185
+                <option value="">全部</option>
186
+                <option value="raise">房源认筹</option>
187
+            </Select>
188
+          )}
189
+        </Form.Item>
190
+        <Form.Item>
191
+          {getFieldDecorator('targetName')(
192
+            <Input
193
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
194
+              placeholder="业务标题"
195
+            />,
196
+          )}
197
+        </Form.Item>
198
+        <Form.Item>
199
+          {getFieldDecorator('companyName')(
200
+            <Input
201
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
202
+              placeholder="甲方"
203
+            />,
204
+          )}
205
+        </Form.Item>
206
+        <Form.Item>
207
+          {getFieldDecorator('status')(
208
+            <Select style={{ width: '180px' }} placeholder="发布状态">
209
+                <option value="">全部</option>
210
+                <option value='1'>是</option>
211
+                <option value='0'>否</option>
212
+            </Select>
213
+          )}
214
+        </Form.Item>
215
+        
216
+        <Form.Item>
217
+            <AuthButton name="admin.taShareActivity.search" noRight={null}>
218
+                <Button type="primary" htmlType="submit" className={styles.searchBtn}>
219
+                    搜索
220
+                </Button>
221
+            </AuthButton>
222
+            <AuthButton name="admin.taShareActivity.search" noRight={null}>
223
+                <Button style={{ marginLeft: 8 }} onClick={handleReset}>
224
+                        重置
225
+                </Button>
226
+            </AuthButton>
227
+        </Form.Item>
228
+      </Form>
229
+      <AuthButton name="admin.h5Demand.add.post" noRight={null}>
230
+        <Button type="danger" onClick={() => addDemandInfo({visable:true})} className={styles.addBtn}>新增</Button>
231
+      </AuthButton>
232
+      <AuthButton name="admin.h5Demand.del" noRight={null}>
233
+        <Button type="primary" onClick={() => showBatchDel({visable:true, demandIds: demandIds})} className={styles.addBtn} style={{marginLeft:'30px'}}>删除</Button>
234
+      </AuthButton>
235
+      <Table rowSelection={rowSelection}
236
+        style={{marginTop:'30px'}} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
237
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
238
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
239
+      </div>
240
+    </>
241
+  )
242
+}
243
+const WrappedHeader = Form.create({ name: 'header' })(header);
244
+
245
+export default WrappedHeader

+ 0
- 0
src/pages/eContract/manage/list.jsx Прегледај датотеку


+ 0
- 0
src/pages/eContract/template/list.jsx Прегледај датотеку


+ 12
- 0
src/services/apis.js Прегледај датотеку

1466
       action: 'admin.taH5Demand.get',
1466
       action: 'admin.taH5Demand.get',
1467
     }
1467
     }
1468
   },
1468
   },
1469
+  taEcontract: {
1470
+    taContractBusinessList: {
1471
+      method: 'GET',
1472
+      url: `${prefix}/taContractBusiness`,
1473
+      action: 'admin.taContractBusiness.get',
1474
+    },
1475
+    addTaContractBusiness: {
1476
+      method: 'POST',
1477
+      url: `${prefix}/taContractBusiness`,
1478
+      action: 'admin.taContractBusiness.post',
1479
+    },
1480
+  },
1469
 }
1481
 }