zhoulisen 5 yıl önce
ebeveyn
işleme
a4d60887bb

+ 12
- 0
config/routes.js Dosyayı Görüntüle

@@ -684,6 +684,18 @@ export default [
684 684
                 name: '业务配置',
685 685
                 component: './eContract/businessConfig/list',
686 686
               },
687
+              {
688
+                path: '/eContract/businessConfig/add',
689
+                name: '新增业务配置',
690
+                hideInMenu: true,
691
+                component: './eContract/businessConfig/add',
692
+              },
693
+              {
694
+                path: '/eContract/businessConfig/detail',
695
+                name: '业务配置详情',
696
+                hideInMenu: true,
697
+                component: './eContract/businessConfig/detail',
698
+              },
687 699
               {
688 700
                 path: '/eContract/manage/list',
689 701
                 name: '合同管理',

+ 2
- 0
src/components/Wangedit/Wangedit.jsx Dosyayı Görüntüle

@@ -2,6 +2,7 @@ import React from 'react';
2 2
 import E from 'wangeditor';
3 3
 import { fetch, apis } from '../../utils/request';
4 4
 
5
+
5 6
 /**
6 7
  * @param {*} props
7 8
  * @returns
@@ -70,6 +71,7 @@ class Wangedit extends React.Component {
70 71
         /<[a-zA-Z0-9]+\:[^>]+>[^>]*<\/[a-zA-Z0-9]+\:[^>]+>/ig,
71 72
         /<[a-zA-Z0-9]+\:[^>]+\/>/ig,
72 73
         /<style>[\s\S]*?<\/style>/ig,
74
+        new RegExp('\u2029', 'ig'),       // 段落分隔符 码点 8233
73 75
       ]
74 76
 
75 77
       return regs.reduce((acc, reg) => {

+ 193
- 0
src/pages/eContract/businessConfig/add.jsx Dosyayı Görüntüle

@@ -0,0 +1,193 @@
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 [contractTemplateLink, setContractTemplateLink] = useState('')
34
+
35
+  const cancelPage = () =>{
36
+    router.push({
37
+      pathname: '/eContract/businessConfig/list',
38
+    });
39
+  }
40
+
41
+   //打开新页面
42
+   const openIndexImg = () => {
43
+    if(contractTemplateLink){
44
+     window.open(contractTemplateLink);
45
+    }else{
46
+      message.info('请选择合同模板');
47
+    }
48
+ }
49
+
50
+  function highlightsTypeChange(e) {
51
+    setTypeState(e.target.value)
52
+  }
53
+
54
+  function disabledDate(current) {
55
+    // Can not select days before today and today
56
+    return current && current < moment().endOf('day');
57
+  }
58
+
59
+  function companyOnSuccess(e){
60
+    console.log(e)
61
+    setCompanyName(e)
62
+  }
63
+
64
+  function contractOnSuccess(e){
65
+    console.log('contractOnSuccess', e)
66
+    setContractTemplateName(e.name)
67
+    request({ ...apis.taEcontract.taContractTemplateById, urlData: {id: e.id} }).then((data) => {
68
+      setContractTemplateLink(data.contractTemplateAddress)
69
+      console.log(contractTemplateLink,'dddddddddd')
70
+    })
71
+  }
72
+
73
+  function targetOnSuccess(e){
74
+    console.log('targetOnSuccess', e)
75
+    setTargetName(e)
76
+  }
77
+
78
+  function sealOnSuccess(e){
79
+    console.log('sealOnSuccess', e)
80
+  }
81
+
82
+  function handleSubmit (e) {
83
+    e.preventDefault();
84
+    props.form.validateFields((err, values) => {
85
+      if (!err){
86
+        request({ ...apis.taEcontract.addTaContractBusiness, data: { ...values },}).then((data) => {
87
+          message.info("保存成功")
88
+          router.push({
89
+            pathname: '/eContract/businessConfig/list',
90
+          });
91
+        }).catch((err) => {
92
+          message.info(err.msg || err.message)
93
+        })
94
+      }
95
+    });
96
+  }
97
+
98
+  const { getFieldDecorator } = props.form;
99
+
100
+  return (
101
+    <>
102
+      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
103
+        <Form.Item label="合同标题">
104
+          {getFieldDecorator('contractTemplateId', {
105
+            rules: [{ required: true, message: ' 请选择合同模板' }],
106
+          })(<SelectContractTemp  onSuccess={e => contractOnSuccess(e)}/>)}
107
+          {getFieldDecorator('contractTemplateName', {initialValue:contractTemplateName,
108
+            rules: [{ required: true, message: ' 请选择关联业务' }],
109
+          })(<Input  hidden={true}/>)}
110
+        </Form.Item>
111
+        <Form.Item label="合同文件">
112
+          {getFieldDecorator('contractTemplateId')}<Button type="danger" style={{marginRight:'20px'}} onClick={openIndexImg}>查看文件</Button>
113
+        </Form.Item>
114
+        <Form.Item label="关联业务类型"> 
115
+          {getFieldDecorator('targetType', {
116
+              rules: [{ required: true, message: '请选择发布状态' }],
117
+            })(<Select placeholder="关联业务类型" style={{ width: '400px' }}>
118
+            <Option value="raise">房源认筹</Option>
119
+          </Select>)}
120
+        </Form.Item>
121
+        <Form.Item label="关联业务">
122
+          {getFieldDecorator('targetId', {
123
+            rules: [{ required: true, message: ' 请选择关联业务' }],
124
+          })(<SelectRaise onSuccess={e => targetOnSuccess(e)}/>)}
125
+          {getFieldDecorator('targetName', {initialValue:targetName,
126
+            rules: [{ required: true, message: ' 请选择关联业务' }],
127
+          })(<Input  hidden={true}/>)}
128
+        </Form.Item>
129
+        <Form.Item label="甲方" help="系统会在业务需要时自动签所选企业印章,比如用户在签署认筹合同前系统会自动签署企业印章。">
130
+          {getFieldDecorator('companyId', {
131
+            rules: [{ required: true, message: ' 请选择关联企业' }],
132
+          })(<SelectCompany onSuccess={e => companyOnSuccess(e)}/>)}
133
+          {getFieldDecorator('companyName', {initialValue:companyName,
134
+            rules: [{ required: true, message: ' 请选择关联业务' }],
135
+          })(<Input  hidden={true}/>)}
136
+        </Form.Item>
137
+        <Form.Item label="甲方印章" >
138
+          {getFieldDecorator('sealId', {
139
+            rules: [{ required: true, message: ' 请选择企业印章' }],
140
+          })(<SelectSeal onSuccess={e => sealOnSuccess(e)}/>)}
141
+        </Form.Item>
142
+        <Form.Item label="甲方签章定位关键字" help="关键字为合同文件中的文字内容(能被ctrl+f 查找功能检索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均可能会盖上指定用户的电子章,建议关键字在合同中保持唯一。">
143
+          {getFieldDecorator('signatoryKeywords', {
144
+            rules: [{ required: true, message: '请输入甲方签章定位关键字' }],
145
+          })(<Input maxLength={20} style={{width:'400px'}}/>)}
146
+        </Form.Item>
147
+        <Form.Item label="甲方关键字签章策略"> 
148
+          {getFieldDecorator('signatoryStrategy', {
149
+              rules: [{ required: true, message: '请选择甲方关键字签章策略' }],
150
+            })(<Select placeholder="甲方关键字签章策略" style={{ width: '400px' }}>
151
+            <Option value="last">最后一个关键字签章</Option>
152
+            <Option value="all">所有关键字签章</Option>
153
+            <Option value="first">第一给关键字签章</Option>
154
+          </Select>)}
155
+        </Form.Item>
156
+        <Form.Item label="乙方签章定位关键字" help="关键字为合同文件中的文字内容(能被ctrl+f 查找功能检索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均可能会盖上指定用户的电子章,建议关键字在合同中保持唯一。">
157
+          {getFieldDecorator('customerKeywords', {
158
+            rules: [{ required: true, message: '请输入乙方签章定位关键字' }],
159
+          })(<Input maxLength={20} style={{width:'400px'}}/>)}
160
+        </Form.Item>
161
+        <Form.Item label="乙方关键字签章策略"> 
162
+          {getFieldDecorator('customerStrategy', {
163
+              rules: [{ required: true, message: '请选择乙方关键字签章策略' }],
164
+            })(<Select placeholder="乙方关键字签章策略" style={{ width: '400px' }}>
165
+            <Option value="last">最后一个关键字签章</Option>
166
+            <Option value="all">所有关键字签章</Option>
167
+            <Option value="first">第一给关键字签章</Option>
168
+          </Select>)}
169
+        </Form.Item>
170
+        <Form.Item label="发布状态"> 
171
+          {getFieldDecorator('status', {
172
+              rules: [{ required: true, message: '请选择发布状态' }],
173
+            })(<Select placeholder="发布状态" style={{ width: '400px' }}>
174
+            <Option value='0'>否</Option>
175
+            <Option value='1'>是</Option>
176
+          </Select>)}
177
+        </Form.Item>
178
+        <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
179
+          <Button type="primary" htmlType="submit"style={{marginRight:'20px'}}>
180
+            确定
181
+          </Button>
182
+          <Button onClick={() => router.go(-1)}>
183
+            取消
184
+          </Button>
185
+        </Form.Item>
186
+      </Form>
187
+    </>
188
+  )
189
+}
190
+
191
+const WrappedHeader = Form.create({ name: 'header' })(header);
192
+
193
+export default WrappedHeader

+ 173
- 0
src/pages/eContract/businessConfig/components/SelectCompany.jsx Dosyayı Görüntüle

@@ -0,0 +1,173 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col,Icon } from 'antd';
3
+import request from '../../../../utils/request';
4
+import apis from '../../../../services/apis';
5
+import moment from 'moment';
6
+
7
+const { Column, ColumnGroup } = Table;
8
+const { Search } = Input;
9
+const SelectContractTemp = props => {
10
+  const {
11
+    value,
12
+    onChange,
13
+    ...rest
14
+  } = props;
15
+
16
+  const [list, setList] = useState([]);
17
+  const [visible, setVisible] = useState(false);
18
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '甲方企业' })
19
+  const getGroupTitle = val => {
20
+    return (list.filter(x => x.companyId == val)[0] || {}).companyName || '请选择'
21
+  }
22
+  const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
23
+
24
+  const buildingId = props.buildingId
25
+
26
+  useEffect(() => {
27
+    getList({ pageNum: 1, pageSize: 10 })
28
+  }, [buildingId]);
29
+
30
+  // 查询列表
31
+  const getList = (params) => {
32
+    request({ ...apis.taEcontract.taCompanyList, params: { ...params } }).then((data) => {
33
+      setList(data.records || [])
34
+
35
+      updateGroup(buildingId ? undefined : value);
36
+    })
37
+  }
38
+
39
+  const searchContractTemp = (e) => {
40
+    getList({ pageNum: 1, pageSize: 10 })
41
+  }
42
+
43
+  if (value !== group.groupId) {
44
+    updateGroup(value);
45
+  }
46
+
47
+  const handleChange = val => {
48
+    onChange(val)
49
+  }
50
+
51
+  const setData = val => {
52
+    updateGroup(val.id)
53
+    onChange(val.id)
54
+    setVisible(false)
55
+    props.onSuccess(val.name);
56
+  }
57
+
58
+  // 提交事件
59
+  const handleSubmit = (e, props) => {
60
+    e.preventDefault();
61
+    e.stopPropagation();
62
+    props.form.validateFields((err, values) => {
63
+      if (!err) {
64
+        getList({ pageNum: 1, pageSize: 10, companyName: values.companyName, companyCode: values.companyCode })
65
+      }
66
+    });
67
+  }
68
+
69
+  //重置搜索
70
+  function handleReset () {
71
+    props.form.resetFields();
72
+  }
73
+
74
+  const clearVal = val => {
75
+    onChange(val)
76
+  }
77
+
78
+  const columns = [
79
+    {
80
+      title: '企业名称',
81
+      dataIndex: 'companyName',
82
+      key: 'companyName',
83
+      align: 'center',
84
+      ellipsis: true,
85
+    },
86
+    {
87
+      title: '企业编号',
88
+      dataIndex: 'companyCode',
89
+      key: 'companyCode',
90
+      align: 'center',
91
+      ellipsis: true,
92
+    },
93
+    {
94
+      title: '实名认证状态',
95
+      dataIndex: 'certifiedStatus',
96
+      key: 'certifiedStatus',
97
+      align: 'center',
98
+      ellipsis: true,
99
+    },
100
+    {
101
+      title: '印章数',
102
+      dataIndex: 'sealNum',
103
+      key: 'sealNum',
104
+      align: 'center',
105
+      ellipsis: true,
106
+    },
107
+    {
108
+      title: '自动签章授权状态',
109
+      dataIndex: 'authorizeStatus',
110
+      key: 'authorizeStatus',
111
+      align: 'center',
112
+      ellipsis: true,
113
+    },
114
+    {
115
+      title: '操作',
116
+      align: 'center',
117
+      width: '20%',
118
+      render: (text, record) => (
119
+        <span>
120
+          <a onClick={() => setData({id:record.companyId, name:record.companyName})} style={{ color: 'blue' }}>选择</a>
121
+        </span>
122
+      ),
123
+    },
124
+  ];
125
+
126
+  const { getFieldDecorator } = props.form
127
+
128
+  return (
129
+    <div>
130
+      <div>{group.groupName}<a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择关联企业</a></div>
131
+      <Modal
132
+        title="选择关联企业"
133
+        visible={visible}
134
+        onCancel={() => setVisible(false)}
135
+        footer={[]}
136
+        width={900}
137
+      >
138
+        <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
139
+        <Form.Item>
140
+          {getFieldDecorator('companyName')(
141
+            <Input
142
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
143
+            placeholder="企业名称"
144
+          />,
145
+          )}
146
+        </Form.Item>
147
+        <Form.Item>
148
+          {getFieldDecorator('companyCode')(
149
+            <Input
150
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
151
+            placeholder="企业编号"
152
+          />,
153
+          )}
154
+        </Form.Item>
155
+        <Form.Item>
156
+          <Button type="primary" htmlType="submit" >
157
+                 搜索
158
+          </Button>
159
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
160
+                 重置
161
+          </Button>     
162
+        </Form.Item>
163
+      </Form>
164
+      <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
165
+
166
+      </Modal>
167
+    </div>
168
+  )
169
+}
170
+
171
+const WrappedHeader = Form.create({ name: 'SelectContractTemp' })(SelectContractTemp);
172
+
173
+export default WrappedHeader

+ 151
- 0
src/pages/eContract/businessConfig/components/SelectContractTemp.jsx Dosyayı Görüntüle

@@ -0,0 +1,151 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col,Icon } from 'antd';
3
+import request from '../../../../utils/request';
4
+import apis from '../../../../services/apis';
5
+import moment from 'moment';
6
+
7
+const { Column, ColumnGroup } = Table;
8
+const { Search } = Input;
9
+const SelectContractTemp = props => {
10
+  const {
11
+    value,
12
+    onChange,
13
+    ...rest
14
+  } = props;
15
+
16
+  const [list, setList] = useState([]);
17
+  const [visible, setVisible] = useState(false);
18
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '合同标题' })
19
+  const getGroupTitle = val => {
20
+    return (list.filter(x => x.contractTemplateId == val)[0] || {}).contractTemplateName || '请选择'
21
+  }
22
+  const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
23
+
24
+  const buildingId = props.buildingId
25
+
26
+  useEffect(() => {
27
+    getList({ pageNum: 1, pageSize: 10 })
28
+  }, [buildingId]);
29
+
30
+  // 查询列表
31
+  const getList = (params) => {
32
+    request({ ...apis.taEcontract.taContractTemplateList, params: { ...params } }).then((data) => {
33
+      setList(data.records || [])
34
+
35
+      updateGroup(buildingId ? undefined : value);
36
+    })
37
+  }
38
+
39
+  const searchContractTemp = (e) => {
40
+    getList({ pageNum: 1, pageSize: 10 })
41
+  }
42
+
43
+  if (value !== group.groupId) {
44
+    updateGroup(value);
45
+  }
46
+
47
+  const handleChange = val => {
48
+    onChange(val)
49
+  }
50
+
51
+  const setData = val => {
52
+    updateGroup(val.id)
53
+    onChange(val.id)
54
+    setVisible(false)
55
+    props.onSuccess(val);
56
+  }
57
+
58
+  // 提交事件
59
+  const handleSubmit = (e, props) => {
60
+    e.preventDefault();
61
+    e.stopPropagation();
62
+    props.form.validateFields((err, values) => {
63
+      if (!err) {
64
+        getList({ pageNum: 1, pageSize: 10, contractTemplateName:values.contractTemplateName })
65
+      }
66
+    });
67
+  }
68
+
69
+  //重置搜索
70
+  function handleReset () {
71
+    props.form.resetFields();
72
+  }
73
+
74
+  const clearVal = val => {
75
+    onChange(val)
76
+  }
77
+
78
+  const columns = [
79
+    {
80
+      title: '合同编号',
81
+      dataIndex: 'contractTemplateId',
82
+      key: 'contractTemplateId',
83
+      align: 'center',
84
+      ellipsis: true,
85
+    },
86
+    {
87
+      title: '合同标题',
88
+      dataIndex: 'contractTemplateName',
89
+      key: 'contractTemplateName',
90
+      align: 'center',
91
+      ellipsis: true,
92
+    },
93
+    {
94
+      title: '新增时间',
95
+      dataIndex: 'createDate',
96
+      key: 'createDate',
97
+      align: 'center',
98
+      ellipsis: true,
99
+      render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
100
+    },
101
+    {
102
+      title: '操作',
103
+      align: 'center',
104
+      width: '20%',
105
+      render: (text, record) => (
106
+        <span>
107
+          <a onClick={() => setData({id:record.contractTemplateId, name:record.contractTemplateName})} style={{ color: 'blue' }}>选择</a>
108
+        </span>
109
+      ),
110
+    },
111
+  ];
112
+
113
+  const { getFieldDecorator } = props.form
114
+
115
+  return (
116
+    <div>
117
+      <div>{group.groupName}<a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择合同模板</a></div>
118
+      <Modal
119
+        title="选择合同模板"
120
+        visible={visible}
121
+        onCancel={() => setVisible(false)}
122
+        footer={[]}
123
+      >
124
+        <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
125
+        <Form.Item>
126
+          {getFieldDecorator('contractTemplateName')(
127
+            <Input
128
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
129
+            placeholder="合同标题"
130
+          />,
131
+          )}
132
+        </Form.Item>
133
+        <Form.Item>
134
+          <Button type="primary" htmlType="submit" >
135
+                 搜索
136
+          </Button>
137
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
138
+                 重置
139
+          </Button>     
140
+        </Form.Item>
141
+      </Form>
142
+      <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
143
+
144
+      </Modal>
145
+    </div>
146
+  )
147
+}
148
+
149
+const WrappedHeader = Form.create({ name: 'SelectContractTemp' })(SelectContractTemp);
150
+
151
+export default WrappedHeader

+ 176
- 0
src/pages/eContract/businessConfig/components/SelectRaise.jsx Dosyayı Görüntüle

@@ -0,0 +1,176 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col,Icon } from 'antd';
3
+import request from '../../../../utils/request';
4
+import apis from '../../../../services/apis';
5
+import BuildSelect from '../../../../components/SelectButton/BuildSelect'
6
+import moment from 'moment';
7
+
8
+const { Column, ColumnGroup } = Table;
9
+const { Search } = Input;
10
+const SelectContractTemp = props => {
11
+  const {
12
+    value,
13
+    onChange,
14
+    ...rest
15
+  } = props;
16
+
17
+  const [list, setList] = useState([]);
18
+  const [visible, setVisible] = useState(false);
19
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '关联业务' })
20
+  const getGroupTitle = val => {
21
+    return (list.filter(x => x.raiseId == val)[0] || {}).salesBatchName || '请选择'
22
+  }
23
+  const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
24
+
25
+  const buildingId = props.buildingId
26
+
27
+  useEffect(() => {
28
+    getList({ pageNum: 1, pageSize: 10 })
29
+  }, [buildingId]);
30
+
31
+  // 查询列表
32
+  const getList = (params) => {
33
+    request({ ...apis.house.taRaiseList, params: { ...params } }).then((data) => {
34
+      setList(data.records || [])
35
+
36
+      updateGroup(buildingId ? undefined : value);
37
+    })
38
+  }
39
+
40
+  const searchContractTemp = (e) => {
41
+    getList({ pageNum: 1, pageSize: 10 })
42
+  }
43
+
44
+  if (value !== group.groupId) {
45
+    updateGroup(value);
46
+  }
47
+
48
+  const handleChange = val => {
49
+    onChange(val)
50
+  }
51
+
52
+  const setData = val => {
53
+    updateGroup(val.id)
54
+    onChange(val.id)
55
+    setVisible(false)
56
+    props.onSuccess(val.name);
57
+  }
58
+
59
+  // 提交事件
60
+  const handleSubmit = (e, props) => {
61
+    e.preventDefault();
62
+    e.stopPropagation();
63
+    props.form.validateFields((err, values) => {
64
+      if (!err) {
65
+        getList({ pageNum: 1, pageSize: 10, buildingId:values.buildingId, salesBatchName:values.salesBatchName })
66
+      }
67
+    });
68
+  }
69
+
70
+  //重置搜索
71
+  function handleReset () {
72
+    props.form.resetFields();
73
+  }
74
+
75
+  const clearVal = val => {
76
+    onChange(val)
77
+  }
78
+
79
+  const columns = [
80
+    {
81
+      title: '销售批次名',
82
+      dataIndex: 'salesBatchName',
83
+      key: 'salesBatchName',
84
+      align: 'center',
85
+    },
86
+    {
87
+      title: '楼盘名称',
88
+      dataIndex: 'buildingName',
89
+      key: 'buildingName',
90
+      align: 'center',
91
+    },
92
+    {
93
+      title: '认筹开始时间',
94
+      dataIndex: 'raiseStartTime',
95
+      key: 'raiseStartTime',
96
+      align: 'center',
97
+      render: (x, row) => <><span>{`${moment(row.raiseStartTime).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
98
+    },
99
+    {
100
+      title: '认筹结束时间',
101
+      dataIndex: 'raiseEndTime',
102
+      key: 'raiseEndTime',
103
+      align: 'center',
104
+      render: (x, row) => <><span>{`${moment(row.raiseEndTime).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
105
+    },
106
+    {
107
+      title: '锁房方式',
108
+      dataIndex: 'houseLockingType',
109
+      key: 'houseLockingType',
110
+      align: 'center',
111
+      render: (x, row) => <><span>{row.houseLockingType == 'auto' ? "自动锁房" : "手动锁房"}</span></>,
112
+    },
113
+    {
114
+      title: '缴费方式',
115
+      dataIndex: 'payType',
116
+      key: 'payType',
117
+      align: 'center',
118
+      render: (x, row) => <><span>{row.payType == 'offLine' ? "线下缴费" : row.payType == 'onLine' ? "线上缴费" : "线上缴费,线下缴费"}</span></>,
119
+    },
120
+    {
121
+      title: '操作',
122
+      align: 'center',
123
+      width: '20%',
124
+      render: (text, record) => (
125
+        <span>
126
+          <a onClick={() => setData({id:record.raiseId, name:record.salesBatchName})} style={{ color: 'blue' }}>选择</a>
127
+        </span>
128
+      ),
129
+    },
130
+  ];
131
+
132
+  const { getFieldDecorator } = props.form
133
+
134
+  return (
135
+    <div>
136
+      <div>{group.groupName}<a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择关联业务</a></div>
137
+      <Modal
138
+        title="选择关联业务"
139
+        visible={visible}
140
+        onCancel={() => setVisible(false)}
141
+        footer={[]}
142
+        width={900}
143
+      >
144
+        <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
145
+        <Form.Item>
146
+          {getFieldDecorator('buildingId')(
147
+            <BuildSelect />,
148
+          )}
149
+        </Form.Item>
150
+        <Form.Item>
151
+          {getFieldDecorator('salesBatchName')(
152
+            <Input
153
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
154
+            placeholder="销售批次名"
155
+          />,
156
+          )}
157
+        </Form.Item>
158
+        <Form.Item>
159
+          <Button type="primary" htmlType="submit" >
160
+                 搜索
161
+          </Button>
162
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
163
+                 重置
164
+          </Button>     
165
+        </Form.Item>
166
+      </Form>
167
+      <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
168
+
169
+      </Modal>
170
+    </div>
171
+  )
172
+}
173
+
174
+const WrappedHeader = Form.create({ name: 'SelectContractTemp' })(SelectContractTemp);
175
+
176
+export default WrappedHeader

+ 163
- 0
src/pages/eContract/businessConfig/components/SelectSeal.jsx Dosyayı Görüntüle

@@ -0,0 +1,163 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col,Icon, Avatar } from 'antd';
3
+import request from '../../../../utils/request';
4
+import apis from '../../../../services/apis';
5
+import moment from 'moment';
6
+
7
+const { Column, ColumnGroup } = Table;
8
+const { Search } = Input;
9
+const SelectContractTemp = props => {
10
+  const {
11
+    value,
12
+    onChange,
13
+    ...rest
14
+  } = props;
15
+
16
+  const [list, setList] = useState([]);
17
+  const [visible, setVisible] = useState(false);
18
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '合同标题' })
19
+  const getGroupTitle = val => {
20
+    return (list.filter(x => x.sealId == val)[0] || {}).sealImg || '请选择'
21
+  }
22
+  const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
23
+
24
+  const buildingId = props.buildingId
25
+
26
+  useEffect(() => {
27
+    getList({ pageNum: 1, pageSize: 10 })
28
+  }, [buildingId]);
29
+
30
+  // 查询列表
31
+  const getList = (params) => {
32
+    request({ ...apis.taEcontract.taCompanySealList, params: { ...params } }).then((data) => {
33
+      setList(data.records || [])
34
+
35
+      updateGroup(buildingId ? undefined : value);
36
+    })
37
+  }
38
+
39
+  const searchContractTemp = (e) => {
40
+    getList({ pageNum: 1, pageSize: 10 })
41
+  }
42
+
43
+  if (value !== group.groupId) {
44
+    updateGroup(value);
45
+  }
46
+
47
+  const handleChange = val => {
48
+    onChange(val)
49
+  }
50
+
51
+  const setData = val => {
52
+    updateGroup(val.id)
53
+    onChange(val.id)
54
+    setVisible(false)
55
+    props.onSuccess(val.name);
56
+  }
57
+
58
+  // 提交事件
59
+  const handleSubmit = (e, props) => {
60
+    e.preventDefault();
61
+    e.stopPropagation();
62
+    props.form.validateFields((err, values) => {
63
+      if (!err) {
64
+        getList({ pageNum: 1, pageSize: 10, sealName:values.sealName })
65
+      }
66
+    });
67
+  }
68
+
69
+  //重置搜索
70
+  function handleReset () {
71
+    props.form.resetFields();
72
+  }
73
+
74
+  const clearVal = val => {
75
+    onChange(val)
76
+  }
77
+
78
+  const columns = [
79
+    {
80
+      title: '印章编号',
81
+      dataIndex: 'sealId',
82
+      key: 'sealId',
83
+      align: 'center',
84
+      ellipsis: true,
85
+    },
86
+    {
87
+      title: '印章名称',
88
+      dataIndex: 'sealName',
89
+      key: 'sealName',
90
+      align: 'center',
91
+      ellipsis: true,
92
+    },
93
+    {
94
+      title: '印章图',
95
+      dataIndex: 'sealImg',
96
+      key: 'sealImg',
97
+      align: 'center',
98
+      ellipsis: true,
99
+      render: (_, record) => <Avatar shape="square" style={{color: 'blue',cursor: 'pointer'}} src={record.sealImg} size={64} icon="user" />,
100
+    },
101
+    {
102
+      title: '印章上传时间',
103
+      dataIndex: 'createDate',
104
+      key: 'createDate',
105
+      align: 'center',
106
+      ellipsis: true,
107
+      render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
108
+    },
109
+    {
110
+      title: '操作',
111
+      align: 'center',
112
+      width: '20%',
113
+      render: (text, record) => (
114
+        <span>
115
+          <a onClick={() => setData({id:record.sealId, name:record.sealName})} style={{ color: 'blue' }}>选择</a>
116
+        </span>
117
+      ),
118
+    },
119
+  ];
120
+
121
+  const { getFieldDecorator } = props.form
122
+
123
+  return (
124
+    <div>
125
+      <div>
126
+        <Avatar shape="square" style={{color: 'blue',cursor: 'pointer'}} src={group.groupName} size={54} icon="user" />
127
+        <a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择企业印章</a>
128
+      </div>
129
+      <Modal
130
+        title="选择企业印章"
131
+        visible={visible}
132
+        onCancel={() => setVisible(false)}
133
+        footer={[]}
134
+        width={900}
135
+      >
136
+        <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
137
+        <Form.Item>
138
+          {getFieldDecorator('sealName')(
139
+            <Input
140
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
141
+            placeholder="印章名称"
142
+          />,
143
+          )}
144
+        </Form.Item>
145
+        <Form.Item>
146
+          <Button type="primary" htmlType="submit" >
147
+                 搜索
148
+          </Button>
149
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
150
+                 重置
151
+          </Button>     
152
+        </Form.Item>
153
+      </Form>
154
+      <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
155
+
156
+      </Modal>
157
+    </div>
158
+  )
159
+}
160
+
161
+const WrappedHeader = Form.create({ name: 'SelectContractTemp' })(SelectContractTemp);
162
+
163
+export default WrappedHeader

+ 207
- 0
src/pages/eContract/businessConfig/detail.jsx Dosyayı Görüntüle

@@ -0,0 +1,207 @@
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
+
24
+const header = props => {
25
+  const contractBusinessId = props.location.query.id
26
+  const [ contractBusinessData, setContractBusinessData ] = useState({})
27
+
28
+  const [targetName, setTargetName] = useState({})
29
+  const [companyName, setCompanyName] = useState({})
30
+  const [contractTemplateName, setContractTemplateName] = useState({})
31
+  const [contractTemplateLink, setContractTemplateLink] = useState('')
32
+
33
+  if(contractBusinessId){
34
+    useEffect(() => {
35
+      getContractBusinessData(contractBusinessId);
36
+    },[])
37
+
38
+  // 查询列表
39
+  const getContractBusinessData = (contractBusinessId) => {
40
+    request({ ...apis.taEcontract.taContractBusinessById, urlData: {id: contractBusinessId} }).then((data) => {
41
+        setContractBusinessData(data)
42
+        request({ ...apis.taEcontract.taContractTemplateById, urlData: {id: data.contractTemplateId} }).then((data) => {
43
+          setContractTemplateLink(data.contractTemplateAddress)
44
+        })
45
+    }) 
46
+  }
47
+  }
48
+
49
+
50
+  const cancelPage = () =>{
51
+    router.push({
52
+      pathname: '/eContract/businessConfig/list',
53
+    });
54
+  }
55
+
56
+   //打开新页面
57
+   const openIndexImg = () => {
58
+     if(contractTemplateLink){
59
+      window.open(contractTemplateLink);
60
+     }else{
61
+       message.info('请选择合同模板');
62
+     }
63
+  }
64
+
65
+  function highlightsTypeChange(e) {
66
+    setTypeState(e.target.value)
67
+  }
68
+
69
+  function disabledDate(current) {
70
+    return current && current < moment().endOf('day');
71
+  }
72
+
73
+  function companyOnSuccess(e){
74
+    console.log(e)
75
+    setCompanyName(e)
76
+  }
77
+
78
+  function contractOnSuccess(e){
79
+    console.log('contractOnSuccess', e)
80
+    setContractTemplateName(e.name)
81
+    request({ ...apis.taEcontract.taContractTemplateById, urlData: {id: e.id} }).then((data) => {
82
+      setContractTemplateLink(data.contractTemplateAddress)
83
+      console.log(contractTemplateLink,'dddddddddd')
84
+    })
85
+  }
86
+
87
+  function targetOnSuccess(e){
88
+    console.log('targetOnSuccess', e)
89
+    setTargetName(e)
90
+  }
91
+
92
+  function sealOnSuccess(e){
93
+    console.log('sealOnSuccess', e)
94
+  }
95
+
96
+  function handleSubmit (e) {
97
+    e.preventDefault();
98
+    props.form.validateFields((err, values) => {
99
+      if (!err){
100
+        request({ ...apis.taEcontract.updateTaContractBusinessById, urlData: {id: contractBusinessId}, data: { ...values },}).then((data) => {
101
+          message.info("保存成功")
102
+          router.push({
103
+            pathname: '/eContract/businessConfig/list',
104
+          });
105
+        }).catch((err) => {
106
+          message.info(err.msg || err.message)
107
+        })
108
+      }
109
+    });
110
+  }
111
+
112
+  const { getFieldDecorator } = props.form;
113
+
114
+  return (
115
+    <>
116
+      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
117
+        <Form.Item label="合同标题">
118
+          {getFieldDecorator('contractTemplateId', {initialValue:contractBusinessData.contractTemplateId,
119
+            rules: [{ required: true, message: ' 请选择合同模板' }],
120
+          })(<SelectContractTemp  onSuccess={e => contractOnSuccess(e)}/>)}
121
+          {getFieldDecorator('contractTemplateName', {initialValue:contractBusinessData.contractTemplateName,
122
+            rules: [{ required: true, message: ' 请选择关联业务' }],
123
+          })(<Input  hidden={true}/>)}
124
+        </Form.Item>
125
+        <Form.Item label="合同文件">
126
+          {getFieldDecorator('contractTemplateId')}<Button type="danger" style={{marginRight:'20px'}} onClick={openIndexImg}>查看文件</Button>
127
+        </Form.Item>
128
+        <Form.Item label="关联业务类型"> 
129
+          {getFieldDecorator('targetType', {initialValue:contractBusinessData.targetType,
130
+              rules: [{ required: true, message: '请选择发布状态' }],
131
+            })(<Select placeholder="关联业务类型" style={{ width: '400px' }}>
132
+            <Option value="raise">房源认筹</Option>
133
+          </Select>)}
134
+        </Form.Item>
135
+        <Form.Item label="关联业务">
136
+          {getFieldDecorator('targetId', {initialValue:contractBusinessData.targetId,
137
+            rules: [{ required: true, message: ' 请选择关联业务' }],
138
+          })(<SelectRaise onSuccess={e => targetOnSuccess(e)}/>)}
139
+          {getFieldDecorator('targetName', {initialValue:contractBusinessData.targetName,
140
+            rules: [{ required: true, message: ' 请选择关联业务' }],
141
+          })(<Input  hidden={true}/>)}
142
+        </Form.Item>
143
+        <Form.Item label="甲方" help="系统会在业务需要时自动签所选企业印章,比如用户在签署认筹合同前系统会自动签署企业印章。">
144
+          {getFieldDecorator('companyId', {initialValue:contractBusinessData.companyId,
145
+            rules: [{ required: true, message: ' 请选择关联企业' }],
146
+          })(<SelectCompany onSuccess={e => companyOnSuccess(e)}/>)}
147
+          {getFieldDecorator('companyName', {initialValue:contractBusinessData.companyName,
148
+            rules: [{ required: true, message: ' 请选择关联业务' }],
149
+          })(<Input  hidden={true}/>)}
150
+        </Form.Item>
151
+        <Form.Item label="甲方印章" >
152
+          {getFieldDecorator('sealId', {initialValue:contractBusinessData.sealId,
153
+            rules: [{ required: true, message: ' 请选择企业印章' }],
154
+          })(<SelectSeal onSuccess={e => sealOnSuccess(e)}/>)}
155
+        </Form.Item>
156
+        <Form.Item label="甲方签章定位关键字" help="关键字为合同文件中的文字内容(能被ctrl+f 查找功能检索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均可能会盖上指定用户的电子章,建议关键字在合同中保持唯一。">
157
+          {getFieldDecorator('signatoryKeywords', {initialValue:contractBusinessData.signatoryKeywords,
158
+            rules: [{ required: true, message: '请输入甲方签章定位关键字' }],
159
+          })(<Input maxLength={20} style={{width:'400px'}}/>)}
160
+        </Form.Item>
161
+        <Form.Item label="甲方关键字签章策略"> 
162
+          {getFieldDecorator('signatoryStrategy', {initialValue:contractBusinessData.signatoryStrategy,
163
+              rules: [{ required: true, message: '请选择甲方关键字签章策略' }],
164
+            })(<Select placeholder="甲方关键字签章策略" style={{ width: '400px' }}>
165
+            <Option value="last">最后一个关键字签章</Option>
166
+            <Option value="all">所有关键字签章</Option>
167
+            <Option value="first">第一给关键字签章</Option>
168
+          </Select>)}
169
+        </Form.Item>
170
+        <Form.Item label="乙方签章定位关键字" help="关键字为合同文件中的文字内容(能被ctrl+f 查找功能检索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均可能会盖上指定用户的电子章,建议关键字在合同中保持唯一。">
171
+          {getFieldDecorator('customerKeywords', {initialValue:contractBusinessData.customerKeywords,
172
+            rules: [{ required: true, message: '请输入乙方签章定位关键字' }],
173
+          })(<Input maxLength={20} style={{width:'400px'}}/>)}
174
+        </Form.Item>
175
+        <Form.Item label="乙方关键字签章策略"> 
176
+          {getFieldDecorator('customerStrategy', {initialValue:contractBusinessData.customerStrategy,
177
+              rules: [{ required: true, message: '请选择乙方关键字签章策略' }],
178
+            })(<Select placeholder="乙方关键字签章策略" style={{ width: '400px' }}>
179
+            <Option value="last">最后一个关键字签章</Option>
180
+            <Option value="all">所有关键字签章</Option>
181
+            <Option value="first">第一给关键字签章</Option>
182
+          </Select>)}
183
+        </Form.Item>
184
+        <Form.Item label="发布状态">
185
+          {getFieldDecorator('status', {initialValue:contractBusinessData.status,
186
+              rules: [{ required: true, message: '请选择发布状态' }],
187
+            })(<Select placeholder="发布状态" style={{ width: '300px' }}>
188
+            <Option value={0}>否</Option>
189
+            <Option value={1}>是</Option>
190
+          </Select>)}
191
+        </Form.Item>
192
+        <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
193
+          <Button type="primary" htmlType="submit"style={{marginRight:'20px'}}>
194
+            确定
195
+          </Button>
196
+          <Button onClick={() => router.go(-1)}>
197
+            取消
198
+          </Button>
199
+        </Form.Item>
200
+      </Form>
201
+    </>
202
+  )
203
+}
204
+
205
+const WrappedHeader = Form.create({ name: 'header' })(header);
206
+
207
+export default WrappedHeader

+ 247
- 0
src/pages/eContract/businessConfig/list.jsx Dosyayı Görüntüle

@@ -0,0 +1,247 @@
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.contractBusinessId,
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
+      render: (x, row) => <><span>{row.targetType === 'raise' ? '房源认筹' : ''}</span></>
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 addContractManage(){
166
+    router.push({
167
+      pathname: '/eContract/businessConfig/add',
168
+    });
169
+  }
170
+
171
+  const { getFieldDecorator } = props.form
172
+  return (
173
+
174
+    <>
175
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
176
+        <Form.Item>
177
+          {getFieldDecorator('contractName')(
178
+            <Input
179
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
180
+            placeholder="合同标题"
181
+          />,
182
+          )}
183
+        </Form.Item>
184
+        <Form.Item>
185
+          {getFieldDecorator('targetType')(
186
+            <Select style={{ width: '180px' }} placeholder="业务类型">
187
+                <option value="">全部</option>
188
+                <option value="raise">房源认筹</option>
189
+            </Select>
190
+          )}
191
+        </Form.Item>
192
+        <Form.Item>
193
+          {getFieldDecorator('targetName')(
194
+            <Input
195
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
196
+              placeholder="业务标题"
197
+            />,
198
+          )}
199
+        </Form.Item>
200
+        <Form.Item>
201
+          {getFieldDecorator('companyName')(
202
+            <Input
203
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
204
+              placeholder="甲方"
205
+            />,
206
+          )}
207
+        </Form.Item>
208
+        <Form.Item>
209
+          {getFieldDecorator('status')(
210
+            <Select style={{ width: '180px' }} placeholder="发布状态">
211
+                <option value="">全部</option>
212
+                <option value='1'>是</option>
213
+                <option value='0'>否</option>
214
+            </Select>
215
+          )}
216
+        </Form.Item>
217
+        
218
+        <Form.Item>
219
+            <AuthButton name="admin.taShareActivity.search" noRight={null}>
220
+                <Button type="primary" htmlType="submit" className={styles.searchBtn}>
221
+                    搜索
222
+                </Button>
223
+            </AuthButton>
224
+            <AuthButton name="admin.taShareActivity.search" noRight={null}>
225
+                <Button style={{ marginLeft: 8 }} onClick={handleReset}>
226
+                        重置
227
+                </Button>
228
+            </AuthButton>
229
+        </Form.Item>
230
+      </Form>
231
+      <AuthButton name="admin.h5Demand.add.post" noRight={null}>
232
+        <Button type="danger" onClick={() => addContractManage()} className={styles.addBtn}>新增</Button>
233
+      </AuthButton>
234
+      <AuthButton name="admin.h5Demand.del" noRight={null}>
235
+        <Button type="primary" onClick={() => showBatchDel({visable:true, demandIds: demandIds})} className={styles.addBtn} style={{marginLeft:'30px'}}>删除</Button>
236
+      </AuthButton>
237
+      <Table rowSelection={rowSelection}
238
+        style={{marginTop:'30px'}} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
239
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
240
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
241
+      </div>
242
+    </>
243
+  )
244
+}
245
+const WrappedHeader = Form.create({ name: 'header' })(header);
246
+
247
+export default WrappedHeader

+ 42
- 1
src/services/apis.js Dosyayı Görüntüle

@@ -1468,6 +1468,47 @@ export default {
1468 1468
   },
1469 1469
   contract: {
1470 1470
    
1471
-    
1471
+  },
1472
+  taEcontract: {
1473
+    taContractBusinessList: {
1474
+      method: 'GET',
1475
+      url: `${prefix}/taContractBusiness`,
1476
+      action: 'admin.taContractBusiness.get',
1477
+    },
1478
+    addTaContractBusiness: {
1479
+      method: 'POST',
1480
+      url: `${prefix}/taContractBusiness`,
1481
+      action: 'admin.taContractBusiness.post',
1482
+    },
1483
+    updateTaContractBusinessById: {
1484
+      method: 'PUT',
1485
+      url: `${prefix}/taContractBusiness/:id`,
1486
+      action: 'admin.taContractBusiness.put',
1487
+    },
1488
+    taContractBusinessById: {
1489
+      method: 'GET',
1490
+      url: `${prefix}/taContractBusiness/:id`,
1491
+      action: 'admin.taContractBusiness.get',
1492
+    },
1493
+    taContractTemplateList: {
1494
+      method: 'GET',
1495
+      url: `${prefix}/taContractTemplate`,
1496
+      action: 'admin.taContractTemplate.get',
1497
+    },
1498
+    taContractTemplateById: {
1499
+      method: 'GET',
1500
+      url: `${prefix}/taContractTemplate/:id`,
1501
+      action: 'admin.taContractTemplate.get',
1502
+    },
1503
+    taCompanyList: {
1504
+      method: 'GET',
1505
+      url: `${prefix}/taCompanyList`,
1506
+      action: 'admin.taCompanyList.get',
1507
+    },
1508
+    taCompanySealList: {
1509
+      method: 'GET',
1510
+      url: `${prefix}/taCompanySeal`,
1511
+      action: 'admin.taCompanySeal.get',
1512
+    },
1472 1513
   },
1473 1514
 }