魏超 преди 5 години
родител
ревизия
66fd8f7730

+ 1
- 1
config/defaultSettings.js Целия файл

@@ -10,7 +10,7 @@ export default {
10 10
   menu: {
11 11
     locale: false,
12 12
   },
13
-  title: '营销云系统',
13
+  title: '橙蕉云系统',
14 14
   pwa: false,
15 15
   iconfontUrl: '',
16 16
 };

+ 52
- 0
config/routes.js Целия файл

@@ -669,6 +669,58 @@ export default [
669 669
               },
670 670
             ],
671 671
           },
672
+          {
673
+            path: '/eContract',
674
+            name: '电子合同',
675
+            component: '../layouts/BlankLayout',
676
+            routes: [
677
+              {
678
+                path: '/eContract/template/list',
679
+                name: '合同模板',
680
+                component: './eContract/template/list',
681
+              },
682
+              {
683
+                path: '/eContract/businessConfig/list',
684
+                name: '业务配置',
685
+                component: './eContract/businessConfig/list',
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
+              },
699
+              {
700
+                path: '/eContract/manage/list',
701
+                name: '合同管理',
702
+                component: './eContract/manage/list',
703
+              },
704
+              {
705
+                path: '/eContract/manage/edit',
706
+                name: '查看详情',
707
+                hideInMenu: true,
708
+                component: './eContract/manage/edit',
709
+              },
710
+              {
711
+                path: '/eContract/template/add',
712
+                name: '新增合同模板',
713
+                hideInMenu: true,
714
+                component: './eContract/template/add',
715
+              },
716
+              {
717
+                path: '/eContract/template/detail',
718
+                name: '合同模板详情',
719
+                hideInMenu: true,
720
+                component: './eContract/template/detail',
721
+              }
722
+            ],
723
+          },
672 724
           // {
673 725
           //   path: '/miniapp',
674 726
           //   name: '小程序管理',

BIN
src/assets/logo.png Целия файл


+ 1
- 1
src/components/GlobalHeader/NoticeIconView.jsx Целия файл

@@ -86,7 +86,7 @@ class GlobalHeaderRight extends Component {
86 86
     return groupBy(newNotices, 'type');
87 87
   };
88 88
   getUnreadData = noticeData => {
89
-    const unreadMsg = {};
89
+    const unreadMsg = {};    
90 90
     Object.keys(noticeData).forEach(key => {
91 91
       const value = noticeData[key];
92 92
 

+ 1
- 1
src/pages/document.ejs Целия файл

@@ -7,7 +7,7 @@
7 7
       name="viewport"
8 8
       content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
9 9
     />
10
-    <title>Ant Design Pro</title>
10
+    <title>橙蕉云</title>
11 11
     <link rel="icon" href="/favicon.png" type="image/x-icon" />
12 12
   </head>
13 13
   <body>

+ 193
- 0
src/pages/eContract/businessConfig/add.jsx Целия файл

@@ -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
+let contractTemplateName = ''
25
+let targetName = ''
26
+
27
+const header = props => {
28
+  const { salesBatchId } = props.location.query
29
+  const [ saleBatchData, setSaleBatchData ] = useState({})
30
+  const [showHelp, setShowHelp] = useState(false)
31
+
32
+  // const [targetName, setTargetName] = useState({})
33
+  const [companyName, setCompanyName] = useState({})
34
+  // const [contractTemplateName, setContractTemplateName] = useState('')
35
+  const [contractTemplateLink, setContractTemplateLink] = useState('')
36
+
37
+  const cancelPage = () =>{
38
+    router.push({
39
+      pathname: '/eContract/businessConfig/list',
40
+    });
41
+  }
42
+
43
+   //打开新页面
44
+   const openIndexImg = () => {
45
+    if(contractTemplateLink){
46
+     window.open(contractTemplateLink);
47
+    }else{
48
+      message.info('请选择合同模板');
49
+    }
50
+ }
51
+
52
+  function highlightsTypeChange(e) {
53
+    setTypeState(e.target.value)
54
+  }
55
+
56
+  function disabledDate(current) {
57
+    // Can not select days before today and today
58
+    return current && current < moment().endOf('day');
59
+  }
60
+
61
+  function companyOnSuccess(e){
62
+    console.log(e)
63
+    setCompanyName(e)
64
+  }
65
+
66
+  function contractOnSuccess(e){
67
+    contractTemplateName = e.name
68
+    request({ ...apis.taEcontract.taContractTemplateById, urlData: {id: e.id} }).then((data) => {
69
+      setContractTemplateLink(data.contractTemplateAddress)
70
+    })
71
+  }
72
+
73
+  function targetOnSuccess(e){
74
+    console.log('targetOnSuccess', e)
75
+    targetName = e
76
+    console.log('targetOnSuccess', targetName)
77
+  }
78
+
79
+  function sealOnSuccess(e){
80
+    console.log('sealOnSuccess', e)
81
+  }
82
+
83
+  function handleSubmit (e) {
84
+    e.preventDefault();
85
+    props.form.validateFields((err, values) => {
86
+      console.log(values)
87
+      if (!err){
88
+        request({ ...apis.taEcontract.addTaContractBusiness, data: { ...values },}).then((data) => {
89
+          message.info("保存成功")
90
+          router.push({
91
+            pathname: '/eContract/businessConfig/list',
92
+          });
93
+        }).catch((err) => {
94
+          message.info(err.msg || err.message)
95
+        })
96
+      }
97
+    });
98
+  }
99
+
100
+  const { getFieldDecorator } = props.form;
101
+
102
+  return (
103
+    <>
104
+      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
105
+        <Form.Item label="合同标题">
106
+          {getFieldDecorator('contractTemplateId', {
107
+            rules: [{ required: true, message: ' 请选择合同模板' }],
108
+          })(<SelectContractTemp  onSuccess={e => contractOnSuccess(e)}/>)}
109
+          {getFieldDecorator('contractTemplateName')(<Input  hidden={true}/>)}
110
+        </Form.Item>
111
+        <Form.Item label="合同文件">
112
+          {getFieldDecorator('contractTemplate')}<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 targetType={props.form.getFieldValue('targetType')} 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="甲方印章" style={{marginTop:'20px'}}>
138
+          {getFieldDecorator('sealId', {
139
+            rules: [{ required: true, message: ' 请选择企业印章' }],
140
+          })(<SelectSeal companyId={props.form.getFieldValue('companyId')} 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="甲方关键字签章策略" style={{marginTop:'20px'}}> 
148
+          {getFieldDecorator('signatoryStrategy', {
149
+              rules: [{ required: true, message: '请选择甲方关键字签章策略' }],
150
+            })(<Select placeholder="甲方关键字签章策略" style={{ width: '400px' }}>
151
+            <Option value="2">最后一个关键字签章</Option>
152
+            <Option value="0">所有关键字签章</Option>
153
+            <Option value="1">第一个关键字签章</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="乙方关键字签章策略" style={{marginTop:'20px'}}> 
162
+          {getFieldDecorator('customerStrategy', {
163
+              rules: [{ required: true, message: '请选择乙方关键字签章策略' }],
164
+            })(<Select placeholder="乙方关键字签章策略" style={{ width: '400px' }}>
165
+            <Option value="2">最后一个关键字签章</Option>
166
+            <Option value="0">所有关键字签章</Option>
167
+            <Option value="1">第一个关键字签章</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

+ 191
- 0
src/pages/eContract/businessConfig/components/SelectCompany.jsx Целия файл

@@ -0,0 +1,191 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col,Icon, Pagination } 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 [dataInfo, setDataInfo] = useState({ list: [], total: 0 });
18
+  const [visible, setVisible] = useState(false);
19
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '甲方企业' })
20
+  const getGroupTitle = val => {
21
+    return (list.filter(x => x.companyId == val)[0] || {}).companyName || '请选择'
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.taEcontract.taCompanyList, params: { ...params } }).then((data) => {
34
+      setList(data.records || [])
35
+      setDataInfo(data)
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, companyName: values.companyName, companyCode: values.companyCode })
66
+      }
67
+    });
68
+  }
69
+
70
+  const changePageNum = pageNumber => {
71
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
72
+  }
73
+
74
+  //重置搜索
75
+  function handleReset () {
76
+    props.form.resetFields();
77
+    getList({ pageNum: 1, pageSize: 10 })
78
+  }
79
+
80
+  const clearVal = val => {
81
+    onChange(val)
82
+  }
83
+
84
+   //打开新页面
85
+   const openIndexImg = () => {
86
+    const newWin=window.open('about:blank');
87
+    newWin.location.href="https://easydoc.xyz/s/24703398/3SqDkJDw/F8szOMk0"
88
+  }
89
+
90
+  const columns = [
91
+    {
92
+      title: '企业名称',
93
+      dataIndex: 'companyName',
94
+      key: 'companyName',
95
+      align: 'center',
96
+      ellipsis: true,
97
+    },
98
+    {
99
+      title: '企业编号',
100
+      dataIndex: 'companyCode',
101
+      key: 'companyCode',
102
+      align: 'center',
103
+      ellipsis: true,
104
+    },
105
+    {
106
+      title: '实名认证状态',
107
+      dataIndex: 'status',
108
+      key: 'status',
109
+      align: 'center',
110
+      ellipsis: true,
111
+      render: (status) => <span>{status === 0 ? '未认证' : status === 1 ? "管理员资料已提交" : status === 2 ? "企业基本资料(没有申请表)已提交" : status === 3 ? "已提交待审核" : 
112
+      status === 4 ? '审核通过' : status === 5 ? "审核不通过" : status === 6 ? "人工初审通过" : "" }</span>,
113
+    },
114
+    {
115
+      title: '印章数',
116
+      dataIndex: 'sealNum',
117
+      key: 'sealNum',
118
+      align: 'center',
119
+      ellipsis: true,
120
+    },
121
+    {
122
+      title: '自动签章授权状态',
123
+      dataIndex: 'authorizeStatus',
124
+      key: 'authorizeStatus',
125
+      align: 'center',
126
+      ellipsis: true,
127
+      render: (authorizeStatus) => <span>{authorizeStatus === '3000' ? '已授权' : '未授权' }</span>,
128
+    },
129
+    {
130
+      title: '操作',
131
+      align: 'center',
132
+      width: '20%',
133
+      render: (text, record) => (
134
+        <span>
135
+          {record.sealNum >0 && record.authorizeStatus === '3000' && <a onClick={() => setData({id:record.companyId, name:record.companyName})} style={{ color: 'blue' }}>选择</a>}
136
+        </span>
137
+      ),
138
+    },
139
+  ];
140
+
141
+  const { getFieldDecorator } = props.form
142
+
143
+  return (
144
+    <div>
145
+      <div>{group.groupName}<a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择关联企业</a></div>
146
+      <Modal
147
+        title="选择关联企业"
148
+        visible={visible}
149
+        onCancel={() => setVisible(false)}
150
+        footer={[]}
151
+        width={1500}
152
+      >
153
+        <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
154
+        <Form.Item>
155
+          {getFieldDecorator('companyName')(
156
+            <Input
157
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
158
+            placeholder="企业名称"
159
+          />,
160
+          )}
161
+        </Form.Item>
162
+        <Form.Item>
163
+          {getFieldDecorator('companyCode')(
164
+            <Input
165
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
166
+            placeholder="企业编号"
167
+          />,
168
+          )}
169
+        </Form.Item>
170
+        <Form.Item>
171
+          <span style={{color:'#999'}}>可选企业必须已认证通过、已上传印章且授权了自动签章。</span><span><a onClick={openIndexImg} style={{ color: 'blue' }}>查看电子合同接入手册</a></span>
172
+        </Form.Item>
173
+        <Form.Item>
174
+          <Button type="primary" htmlType="submit" >
175
+                 搜索
176
+          </Button>
177
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
178
+                 重置
179
+          </Button>     
180
+        </Form.Item>
181
+      </Form>
182
+      <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} pagination={false} />
183
+      <Pagination defaultCurrent={1} total={dataInfo.total} onChange={e => changePageNum(e)} current={dataInfo.current}/>
184
+      </Modal>
185
+    </div>
186
+  )
187
+}
188
+
189
+const WrappedHeader = Form.create({ name: 'SelectContractTemp' })(SelectContractTemp);
190
+
191
+export default WrappedHeader

+ 158
- 0
src/pages/eContract/businessConfig/components/SelectContractTemp.jsx Целия файл

@@ -0,0 +1,158 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col,Icon ,Pagination} 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 [dataInfo, setDataInfo] = useState({ list: [], total: 0 });
18
+  const [visible, setVisible] = useState(false);
19
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '合同标题' })
20
+  const getGroupTitle = val => {
21
+    return (list.filter(x => x.contractTemplateId == val)[0] || {}).contractTemplateName || '请选择'
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.taEcontract.taContractTemplateList, params: { ...params } }).then((data) => {
34
+      setList(data.records)
35
+      setDataInfo(data)
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);
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, contractTemplateName:values.contractTemplateName })
66
+      }
67
+    });
68
+  }
69
+
70
+  //重置搜索
71
+  function handleReset () {
72
+    props.form.resetFields();
73
+    getList({ pageNum: 1, pageSize: 10 })
74
+  }
75
+
76
+  const clearVal = val => {
77
+    onChange(val)
78
+  }
79
+
80
+  const changePageNum = pageNumber => {
81
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
82
+  }
83
+
84
+  const columns = [
85
+    {
86
+      title: '合同编号',
87
+      dataIndex: 'contractTemplateId',
88
+      key: 'contractTemplateId',
89
+      align: 'center',
90
+      ellipsis: true,
91
+    },
92
+    {
93
+      title: '合同标题',
94
+      dataIndex: 'contractTemplateName',
95
+      key: 'contractTemplateName',
96
+      align: 'center',
97
+      ellipsis: true,
98
+    },
99
+    {
100
+      title: '新增时间',
101
+      dataIndex: 'createDate',
102
+      key: 'createDate',
103
+      align: 'center',
104
+      ellipsis: true,
105
+      render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
106
+    },
107
+    {
108
+      title: '操作',
109
+      align: 'center',
110
+      width: '20%',
111
+      render: (text, record) => (
112
+        <span>
113
+          <a onClick={() => setData({id:record.contractTemplateId, name:record.contractTemplateName})} style={{ color: 'blue' }}>选择</a>
114
+        </span>
115
+      ),
116
+    },
117
+  ];
118
+
119
+  const { getFieldDecorator } = props.form
120
+
121
+  return (
122
+    <div>
123
+      <div>{group.groupName}<a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择合同模板</a></div>
124
+      <Modal
125
+        title="选择合同模板"
126
+        visible={visible}
127
+        onCancel={() => setVisible(false)}
128
+        footer={[]}
129
+        width='1000px'
130
+      >
131
+        <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
132
+        <Form.Item>
133
+          {getFieldDecorator('contractTemplateName')(
134
+            <Input
135
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
136
+            placeholder="合同标题"
137
+          />,
138
+          )}
139
+        </Form.Item>
140
+        <Form.Item>
141
+          <Button type="primary" htmlType="submit" >
142
+                 搜索
143
+          </Button>
144
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
145
+                 重置
146
+          </Button>     
147
+        </Form.Item>
148
+      </Form>
149
+      <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} pagination={false} />
150
+      <Pagination defaultCurrent={1} total={dataInfo.total} onChange={e => changePageNum(e)} current={dataInfo.current}/>
151
+      </Modal>
152
+    </div>
153
+  )
154
+}
155
+
156
+const WrappedHeader = Form.create({ name: 'SelectContractTemp' })(SelectContractTemp);
157
+
158
+export default WrappedHeader

+ 187
- 0
src/pages/eContract/businessConfig/components/SelectRaise.jsx Целия файл

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

+ 169
- 0
src/pages/eContract/businessConfig/components/SelectSeal.jsx Целия файл

@@ -0,0 +1,169 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col,Icon, Avatar, Pagination } 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 [dataInfo, setDataInfo] = useState({ list: [], total: 0 });
18
+  const [visible, setVisible] = useState(false);
19
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '合同标题' })
20
+  const getGroupTitle = val => {
21
+    return (list.filter(x => x.sealId == val)[0] || {}).sealImg || '请选择'
22
+  }
23
+  const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
24
+
25
+  const companyId = props.companyId
26
+
27
+  useEffect(() => {
28
+    getList({ pageNum: 1, pageSize: 10 })
29
+  }, [companyId]);
30
+
31
+  // 查询列表
32
+  const getList = (params) => {
33
+    request({ ...apis.taEcontract.taCompanySealList, params: { ...params, companyId:companyId } }).then((data) => {
34
+      setList(data.records || [])
35
+      setDataInfo(data)
36
+      updateGroup(companyId ? 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, sealName:values.sealName })
66
+      }
67
+    });
68
+  }
69
+
70
+  const changePageNum = pageNumber => {
71
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
72
+  }
73
+
74
+  //重置搜索
75
+  function handleReset () {
76
+    props.form.resetFields();
77
+    getList({ pageNum: 1, pageSize: 10 })
78
+  }
79
+
80
+  const clearVal = val => {
81
+    onChange(val)
82
+  }
83
+
84
+  const columns = [
85
+    {
86
+      title: '印章编号',
87
+      dataIndex: 'sealId',
88
+      key: 'sealId',
89
+      align: 'center',
90
+      ellipsis: true,
91
+    },
92
+    {
93
+      title: '印章名称',
94
+      dataIndex: 'sealName',
95
+      key: 'sealName',
96
+      align: 'center',
97
+      ellipsis: true,
98
+    },
99
+    {
100
+      title: '印章图',
101
+      dataIndex: 'sealImg',
102
+      key: 'sealImg',
103
+      align: 'center',
104
+      ellipsis: true,
105
+      render: (_, record) => <Avatar shape="square" style={{color: 'blue',cursor: 'pointer'}} src={record.sealImg} size={64} icon="user" />,
106
+    },
107
+    {
108
+      title: '印章上传时间',
109
+      dataIndex: 'createDate',
110
+      key: 'createDate',
111
+      align: 'center',
112
+      ellipsis: true,
113
+      render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
114
+    },
115
+    {
116
+      title: '操作',
117
+      align: 'center',
118
+      width: '20%',
119
+      render: (text, record) => (
120
+        <span>
121
+          <a onClick={() => setData({id:record.sealId, name:record.sealName})} style={{ color: 'blue' }}>选择</a>
122
+        </span>
123
+      ),
124
+    },
125
+  ];
126
+
127
+  const { getFieldDecorator } = props.form
128
+
129
+  return (
130
+    <div>
131
+      <div>
132
+        <Avatar shape="square" style={{color: 'blue',cursor: 'pointer'}} src={group.groupName} size={54} icon="user" />
133
+  <a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>{companyId != undefined && '选择企业印章'}</a>
134
+      </div>
135
+      <Modal
136
+        title="选择企业印章"
137
+        visible={visible}
138
+        onCancel={() => setVisible(false)}
139
+        footer={[]}
140
+        width={900}
141
+      >
142
+        <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
143
+        <Form.Item>
144
+          {getFieldDecorator('sealName')(
145
+            <Input
146
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
147
+            placeholder="印章名称"
148
+          />,
149
+          )}
150
+        </Form.Item>
151
+        <Form.Item>
152
+          <Button type="primary" htmlType="submit" >
153
+                 搜索
154
+          </Button>
155
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
156
+                 重置
157
+          </Button>     
158
+        </Form.Item>
159
+      </Form>
160
+      <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} pagination={false} />
161
+      <Pagination defaultCurrent={1} total={dataInfo.total} onChange={e => changePageNum(e)} current={dataInfo.current}/>
162
+      </Modal>
163
+    </div>
164
+  )
165
+}
166
+
167
+const WrappedHeader = Form.create({ name: 'SelectContractTemp' })(SelectContractTemp);
168
+
169
+export default WrappedHeader

+ 207
- 0
src/pages/eContract/businessConfig/detail.jsx Целия файл

@@ -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 targetType={props.form.getFieldValue('targetType')} 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="甲方印章" style={{marginTop:'20px'}}>
152
+          {getFieldDecorator('sealId', {initialValue:contractBusinessData.sealId,
153
+            rules: [{ required: true, message: ' 请选择企业印章' }],
154
+          })(<SelectSeal companyId={props.form.getFieldValue('companyId')} 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="甲方关键字签章策略" style={{marginTop:'20px'}}> 
162
+          {getFieldDecorator('signatoryStrategy', {initialValue:contractBusinessData.signatoryStrategy,
163
+              rules: [{ required: true, message: '请选择甲方关键字签章策略' }],
164
+            })(<Select placeholder="甲方关键字签章策略" style={{ width: '400px' }}>
165
+            <Option value="2">最后一个关键字签章</Option>
166
+            <Option value="0">所有关键字签章</Option>
167
+            <Option value="1">第一个关键字签章</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="乙方关键字签章策略" style={{marginTop:'20px'}}> 
176
+          {getFieldDecorator('customerStrategy', {initialValue:contractBusinessData.customerStrategy,
177
+              rules: [{ required: true, message: '请选择乙方关键字签章策略' }],
178
+            })(<Select placeholder="乙方关键字签章策略" style={{ width: '400px' }}>
179
+            <Option value="2">最后一个关键字签章</Option>
180
+            <Option value="0">所有关键字签章</Option>
181
+            <Option value="1">第一个关键字签章</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

+ 271
- 0
src/pages/eContract/businessConfig/list.jsx Целия файл

@@ -0,0 +1,271 @@
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 [contractBusinessList, setContractBusinessList] = useState([])
22
+  const [contractBusinessIndexList, setContractBusinessIndexList] = useState([])
23
+  const [batchDel, setBatchDel] = useState({visable:false,demandIds:''})
24
+  const [addDemand, setAddDemand] = useState({visable:false})
25
+
26
+  useEffect(() => {
27
+    if(sampleId){
28
+      getList({ pageNum: 1, pageSize: 10, sampleId: sampleId });
29
+    }else{
30
+      getList({ pageNum: 1, pageSize: 10});
31
+    }
32
+    
33
+  }, [])
34
+
35
+  // 查询列表
36
+  const getList = (params) => {
37
+    console.log(params);
38
+    request({ ...apis.taEcontract.taContractBusinessList, params: { ...params } }).then((data) => {
39
+      console.log(data)
40
+      setData(data)
41
+    })
42
+  }
43
+
44
+  // 跳转到编辑
45
+  const toDetail = rowData => () => {
46
+    if(rowData) {
47
+      router.push({
48
+      pathname: '/eContract/businessConfig/detail',
49
+      query: {
50
+        id: rowData.contractBusinessId,
51
+      },
52
+    });
53
+      return
54
+    }
55
+  }
56
+
57
+  /**
58
+   *
59
+   *
60
+   * @param {*} props
61
+   * @returns
62
+   */
63
+
64
+  const columns = [
65
+    {
66
+      title: '合同标题',
67
+      dataIndex: 'contractTemplateName',
68
+      key: 'contractTemplateName',
69
+      align: 'center',
70
+    },
71
+    {
72
+      title: '关联业务类型',
73
+      dataIndex: 'targetType',
74
+      key: 'targetType',
75
+      align: 'center',
76
+      render: (x, row) => <><span>{row.targetType === 'raise' ? '房源认筹' : ''}</span></>
77
+    },
78
+    {
79
+      title: '关联业务标题',
80
+      dataIndex: 'targetName',
81
+      key: 'targetName',
82
+      align: 'center',
83
+    },
84
+    {
85
+      title: '甲方',
86
+      dataIndex: 'companyName',
87
+      key: 'companyName',
88
+      align: 'center',
89
+    },
90
+    {
91
+      title: '发布状态',
92
+      dataIndex: 'status',
93
+      key: 'status',
94
+      align: 'center',
95
+      render: (text, records) => {
96
+        if (records.status === 1) { return '是' }
97
+        if (records.status === 0) { return '否' }
98
+      },
99
+    },
100
+    {
101
+      title: '新增时间',
102
+      dataIndex: 'createDate',
103
+      key: 'createDate',
104
+      align: 'center',
105
+      render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>
106
+    },
107
+    {
108
+      title: '修改时间',
109
+      dataIndex: 'updateDate',
110
+      key: 'updateDate',
111
+      align: 'center',
112
+      render: (x, row) => <><span>{`${moment(row.updateDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>
113
+    },
114
+    {
115
+      title: '操作',
116
+      dataIndex: 'handle',
117
+      key: 'handle',
118
+      align: 'center',
119
+      render: (text, record) => (
120
+        <AuthButton name="admin.eContractBusiness.detail.get" noRight={null}>
121
+          <a style={{ color: '#66B3FF' }} onClick={toDetail(record)} >查看详情</a>
122
+        </AuthButton>
123
+      ),
124
+    },
125
+  ];
126
+  
127
+  const rowSelection = {
128
+    selectedRowKeys: contractBusinessIndexList,
129
+    onChange: (selectedRowKeys, selectedRows) => {
130
+      setContractBusinessList(selectedRows)
131
+      setContractBusinessIndexList(selectedRowKeys)
132
+    },
133
+  };
134
+
135
+  const changePageNum = pageNumber => {
136
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
137
+  }
138
+
139
+  // 提交事件
140
+  const handleSubmit = (e, props) => {
141
+    e.preventDefault();
142
+    props.form.validateFields((err, values) => {
143
+      if (!err) {
144
+        getList({ pageNum: 1, pageSize: 10, ...values })
145
+      }
146
+    });
147
+  }
148
+
149
+  //重置搜索
150
+  function handleReset () {
151
+    props.form.resetFields();
152
+    getList({ pageNum: 1, pageSize: 10 })
153
+  }
154
+
155
+  function showBatchDel(e){
156
+  
157
+    if (demandIds.length <= 0){
158
+      message.info("请选择数据");
159
+      return;
160
+    }
161
+    setBatchDel(e);
162
+    if(!e.visable){
163
+      getList()
164
+    }
165
+  }
166
+
167
+  function batchDelTaContractBusiness(){
168
+    console.log(contractBusinessList)
169
+    if (contractBusinessList.length <= 0){
170
+      message.info('请至少选择一条数据')
171
+      return;
172
+    }
173
+    Modal.confirm({
174
+      title: '确认将所选的' + contractBusinessList.length + '条业务配置删除?',
175
+      okText: '确认',
176
+      cancelText: '取消',
177
+      onOk () {
178
+        request({ ...apis.taEcontract.batchDelTaContractBusiness, data: {contractBusinessList} }).then((data) => {
179
+          message.info('操作成功!')
180
+          setContractBusinessIndexList([])
181
+          getList({ pageNum: 1, pageSize: 10 })
182
+        }).catch((err) => {
183
+          console.log('111111', err)
184
+        })
185
+      }
186
+    });
187
+  }
188
+
189
+  function addContractManage(){
190
+    router.push({
191
+      pathname: '/eContract/businessConfig/add',
192
+    });
193
+  }
194
+
195
+  const { getFieldDecorator } = props.form
196
+  return (
197
+
198
+    <>
199
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
200
+        <Form.Item>
201
+          {getFieldDecorator('contractName')(
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('targetType')(
210
+            <Select style={{ width: '180px' }} placeholder="业务类型">
211
+                <option value="">全部</option>
212
+                <option value="raise">房源认筹</option>
213
+            </Select>
214
+          )}
215
+        </Form.Item>
216
+        <Form.Item>
217
+          {getFieldDecorator('targetName')(
218
+            <Input
219
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
220
+              placeholder="业务标题"
221
+            />,
222
+          )}
223
+        </Form.Item>
224
+        <Form.Item>
225
+          {getFieldDecorator('companyName')(
226
+            <Input
227
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
228
+              placeholder="甲方"
229
+            />,
230
+          )}
231
+        </Form.Item>
232
+        <Form.Item>
233
+          {getFieldDecorator('status')(
234
+            <Select style={{ width: '180px' }} placeholder="发布状态">
235
+                <option value="">全部</option>
236
+                <option value='1'>是</option>
237
+                <option value='0'>否</option>
238
+            </Select>
239
+          )}
240
+        </Form.Item>
241
+        
242
+        <Form.Item>
243
+            <AuthButton name="admin.taShareActivity.search" noRight={null}>
244
+                <Button type="primary" htmlType="submit" className={styles.searchBtn}>
245
+                    搜索
246
+                </Button>
247
+            </AuthButton>
248
+            <AuthButton name="admin.taShareActivity.search" noRight={null}>
249
+                <Button style={{ marginLeft: 8 }} onClick={handleReset}>
250
+                        重置
251
+                </Button>
252
+            </AuthButton>
253
+        </Form.Item>
254
+      </Form>
255
+      <AuthButton name="admin.eContractBusiness.add.post" noRight={null}>
256
+        <Button type="danger" onClick={() => addContractManage()} className={styles.addBtn}>新增</Button>
257
+      </AuthButton>
258
+      <AuthButton name="admin.eContractBusiness.del" noRight={null}>
259
+        <Button type="primary" onClick={() => batchDelTaContractBusiness()} className={styles.addBtn} style={{marginLeft:'30px'}}>删除</Button>
260
+      </AuthButton>
261
+      <Table rowSelection={rowSelection}
262
+        style={{marginTop:'30px'}} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
263
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
264
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
265
+      </div>
266
+    </>
267
+  )
268
+}
269
+const WrappedHeader = Form.create({ name: 'header' })(header);
270
+
271
+export default WrappedHeader

+ 140
- 0
src/pages/eContract/manage/edit.jsx Целия файл

@@ -0,0 +1,140 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker, Row, Col } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import Styles from './styles.less';
5
+import router from 'umi/router';
6
+import moment from 'moment';
7
+
8
+import apis from '../../../services/apis';
9
+import request from '../../../utils/request';
10
+
11
+
12
+import AuthButton from '@/components/AuthButton';
13
+
14
+
15
+const header = props => {
16
+
17
+    const id = props.location.query.id
18
+
19
+    const [data, setData] = useState({})
20
+
21
+    useEffect(() => {
22
+
23
+        getList(id);
24
+
25
+
26
+    }, [])
27
+
28
+    const getList = (id) => {
29
+        request({ ...apis.manage.detail, urlData: { id: id } }).then((data) => {
30
+            setData(data)
31
+        })
32
+    }
33
+
34
+    const onArchives = () => {
35
+        request({
36
+            ...apis.manage.archives,
37
+            urlData: { id: id },
38
+            data: { contractId: parseInt(id), archives: true }
39
+        }).then((data) => {
40
+            setData(data)
41
+            message.info("归档成功")
42
+
43
+        })
44
+    }
45
+
46
+    const datas = [
47
+        {
48
+            name: "合同标题",
49
+            value: data.contractName
50
+        },
51
+        {
52
+            name: "关联业务类型",
53
+            value: data.targetType,
54
+            render: () => <><span>{data.targetType == "raise" ? "房源认筹" : ""}</span></>,
55
+        },
56
+        {
57
+            name: "关联业务",
58
+            value: data.targetName
59
+
60
+        },
61
+        {
62
+            name: "关联单据类型",
63
+            value: data.invoiceTargetType,
64
+            render: () => <><span>{data.invoiceTargetType == "raise_record" ? "认筹单" : ""}</span></>,
65
+        },
66
+        {
67
+            name: "关联单据编号",
68
+            value: data.invoiceTargetId
69
+        },
70
+        {
71
+            name: "甲方名称",
72
+            value: data.signatoryName,
73
+
74
+        },
75
+        {
76
+            name: "甲方签署时间",
77
+            value: data.signatoryTime,
78
+            render: <><span>{data.signatoryTime ? moment(data.signatoryTime).format('YYYY-MM-DD HH:mm:ss') : ''}</span></>
79
+        },
80
+        {
81
+            name: "乙方名称",
82
+            value: data.customerName
83
+        },
84
+        {
85
+            name: "乙方手机号",
86
+            value: data.customerTel
87
+        },
88
+        {
89
+            name: "乙方身份证号",
90
+            value: data.customerIdcard
91
+        },
92
+        {
93
+            name: "乙方签署时间",
94
+            value: data.customerTime,
95
+            render: <><span>{data.customerTime ? moment(data.customerTime).format('YYYY-MM-DD HH:mm:ss') : ''}</span></>
96
+        },
97
+        {
98
+            name: "已签署合同",
99
+            // value:data.,
100
+            render: (x, row) => <><a type="button" className={Styles.btn} href={data.contractViewUrl} target="_blank">查看合同</a> <a href={data.contractDownloadUrl} download="234.pdf" style={{ color: '#1D74D9', marginLeft: '30px' }}>下载合同</a> </>
101
+        },
102
+        {
103
+            name: "是否归档",
104
+            value: data.archives,
105
+            render: (x, row) => <><span>{data.archives ? '是' : '否'}</span>{!data.archives && <a onClick={() => onArchives(data.contractId)} style={{ color: '#1D74D9', marginLeft: '30px' }}>归档</a>}  </>
106
+        },
107
+        {
108
+            name: "归档时间",
109
+            value: data.archivesTime,
110
+            render: <><span>{data.archivesTime ? moment(data.archivesTime).format('YYYY-MM-DD HH:mm:ss') : ''}</span></>
111
+        },
112
+    ]
113
+
114
+
115
+    return (
116
+
117
+        <>
118
+
119
+            {datas.map((x) => {
120
+                return <Row style={{ margin: '20px 0' }}>
121
+                    <Col span={5} className={Styles.title} align="right" >
122
+                        {x.name}
123
+                    </Col>
124
+                    <Col span={9} offset={2} className={Styles.text}>
125
+                        {
126
+                            x.render ? typeof x.render === 'function' ? x.render(props) : x.render : x.value
127
+                        }
128
+                    </Col>
129
+                    <Col span={2} offset={4}>
130
+                    </Col>
131
+                </Row>
132
+            })}
133
+            <div align="center"><Button className={Styles.rebtn} onClick={() => router.go(-1)}>返回</Button></div>
134
+
135
+        </>
136
+    )
137
+}
138
+
139
+
140
+export default header

+ 256
- 0
src/pages/eContract/manage/list.jsx Целия файл

@@ -0,0 +1,256 @@
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
+
12
+
13
+import AuthButton from '@/components/AuthButton';
14
+
15
+const { Option } = Select;
16
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
17
+
18
+const header = props => {
19
+
20
+  const [data, setData] = useState({})
21
+
22
+
23
+  useEffect(() => {
24
+
25
+    getList({ pageNum: 1, pageSize: 10 });
26
+
27
+
28
+  }, [])
29
+
30
+  // 查询列表
31
+  const getList = (params) => {
32
+    request({ ...apis.manage.list, params: { ...params } }).then((data) => {
33
+      console.log(data)
34
+      setData(data)
35
+    })
36
+  }
37
+
38
+  // 跳转到编辑
39
+  const toDetail = id => () => {
40
+    if (id) {
41
+      router.push({
42
+        pathname: '/eContract/manage/edit',
43
+        query: {
44
+          id: id,
45
+        },
46
+      });
47
+      return
48
+    }
49
+  }
50
+
51
+  /**
52
+   *
53
+   *
54
+   * @param {*} props
55
+   * @returns
56
+   */
57
+
58
+  const columns = [
59
+    {
60
+      title: '合同标题',
61
+      dataIndex: 'contractName',
62
+      key: 'contractName',
63
+      align: 'center',
64
+    },
65
+    {
66
+      title: '甲方名称',
67
+      dataIndex: 'signatoryName',
68
+      key: 'signatoryName',
69
+      align: 'center',
70
+
71
+    },
72
+    {
73
+      title: '甲方是否签署',
74
+      align: 'center',
75
+      render: (x, row) => <><span>{row.signatoryTime ? '是' : '否'}</span></>
76
+    },
77
+    {
78
+      title: '甲方签署时间',
79
+      dataIndex: 'signatoryTime',
80
+      key: 'signatoryTime',
81
+      align: 'center',
82
+      render: (x, row) => <><span>{row.signatoryTime ? `${moment(row.signatoryTime).format('YYYY-MM-DD HH:mm:ss')}` : ''}</span></>
83
+    },
84
+    {
85
+      title: '乙方名称',
86
+      dataIndex: 'customerName',
87
+      key: 'customerName',
88
+      align: 'center',
89
+
90
+    },
91
+    {
92
+      title: '乙方是否签署',
93
+      align: 'center',
94
+      render: (x, row) => <><span>{row.customerTime ? '是' : '否'}</span></>
95
+
96
+    },
97
+    {
98
+      title: '乙方签署时间',
99
+      dataIndex: 'customerTime',
100
+      key: 'customerTime',
101
+      align: 'center',
102
+      render: (x, row) => <><span>{row.customerTime ? `${moment(row.customerTime).format('YYYY-MM-DD HH:mm:ss')}` : ''}</span></>
103
+    },
104
+    {
105
+      title: '是否归档',
106
+      dataIndex: 'archives',
107
+      key: 'archives',
108
+      align: 'center',
109
+      render: (x, row) => <><span>{row.archives ? '是' : '否'}</span></>
110
+
111
+    },
112
+    {
113
+      title: '归档时间',
114
+      dataIndex: 'archivesTime',
115
+      key: 'archivesTime',
116
+      align: 'center',
117
+      render: (x, row) => <><span>{row.archivesTime ? `${moment(row.archivesTime).format('YYYY-MM-DD HH:mm:ss')}` : ''}</span></>
118
+    },
119
+    {
120
+      title: '操作',
121
+      dataIndex: 'handle',
122
+      key: 'handle',
123
+      align: 'center',
124
+      render: (text, row) => (
125
+        <AuthButton name="admin.eContractManager.detail.get" noRight={null}>
126
+          <a style={{ color: '#66B3FF' }} onClick={toDetail(row.contractId)} >查看详情</a>
127
+        </AuthButton>
128
+      ),
129
+    },
130
+  ];
131
+
132
+  const rowSelection = {
133
+    onChange: (selectedRowKeys, selectedRows) => {
134
+      console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
135
+      setDemandIds(selectedRows)
136
+    },
137
+  };
138
+
139
+  const changePageNum = pageNumber => {
140
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
141
+  }
142
+
143
+  // 提交事件
144
+  const handleSubmit = (e, props) => {
145
+    e.preventDefault();
146
+    props.form.validateFields((err, values) => {
147
+      if (!err) {
148
+        let {archivesDate, ...submitValue} = values
149
+        if(null != archivesDate && archivesDate.length > 0){
150
+          const [archivesStartDate, archivesEndDate] = archivesDate
151
+          submitValue.archivesStartDate = moment(archivesStartDate).format('YYYY-MM-DD');
152
+          submitValue.archivesEndDate = moment(archivesEndDate).format('YYYY-MM-DD');
153
+        }   
154
+        console.log(submitValue)
155
+        getList({ pageNum: 1, pageSize: 10, ...submitValue })
156
+      }
157
+    });
158
+  }
159
+
160
+  //重置搜索
161
+  function handleReset() {
162
+    props.form.resetFields();
163
+    getList({ pageNum: 1, pageSize: 10 })
164
+  }
165
+
166
+
167
+
168
+  const { getFieldDecorator } = props.form
169
+  return (
170
+
171
+    <>
172
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
173
+        <Form.Item>
174
+          {getFieldDecorator('contractName')(
175
+            <Input
176
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
177
+              placeholder="合同标题"
178
+            />,
179
+          )}
180
+        </Form.Item>
181
+        <Form.Item>
182
+          {getFieldDecorator('signatoryName')(
183
+            <Input
184
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
185
+              placeholder="请输入甲方名称"
186
+            />,
187
+          )}
188
+        </Form.Item>
189
+        <Form.Item>
190
+          {getFieldDecorator('customerName')(
191
+            <Input
192
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
193
+              placeholder="请输入乙方名称"
194
+            />,
195
+          )}
196
+        </Form.Item>
197
+        <Form.Item>
198
+          {getFieldDecorator('signatoryStatus')(
199
+            <Select style={{ width: '180px' }} placeholder="甲方是否签署">
200
+              <option value="">全部</option>
201
+              <option value="1">是</option>
202
+              <option value="0">否</option>
203
+
204
+            </Select>
205
+          )}
206
+        </Form.Item>
207
+        <Form.Item>
208
+          {getFieldDecorator('customerStatus')(
209
+            <Select style={{ width: '180px' }} placeholder="乙方是否签署">
210
+              <option value="">全部</option>
211
+              <option value="1">是</option>
212
+              <option value="0">否</option>
213
+            </Select>
214
+          )}
215
+        </Form.Item>
216
+        <Form.Item>
217
+          {getFieldDecorator('archives')(
218
+            <Select style={{ width: '180px' }} placeholder="是否归档">
219
+              <option value="">全部</option>
220
+              <option value="1">是</option>
221
+              <option value="0">否</option>
222
+            </Select>
223
+          )}
224
+        </Form.Item>
225
+
226
+        <Form.Item>
227
+        
228
+          {getFieldDecorator('archivesDate')(
229
+            <RangePicker placeholder={['归档开始时间', '归档结束时间']} />
230
+          )}
231
+        </Form.Item>
232
+        <Form.Item>
233
+          <AuthButton name="admin.taShareActivity.search" noRight={null}>
234
+            <Button type="primary" htmlType="submit" className={styles.searchBtn}>
235
+              搜索
236
+                </Button>
237
+          </AuthButton>
238
+          <AuthButton name="admin.taShareActivity.search" noRight={null}>
239
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
240
+              重置
241
+                </Button>
242
+          </AuthButton>
243
+        </Form.Item>
244
+      </Form>
245
+  
246
+    
247
+         <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
248
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
249
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
250
+      </div>
251
+    </>
252
+  )
253
+}
254
+const WrappedHeader = Form.create({ name: 'header' })(header);
255
+
256
+export default WrappedHeader

+ 44
- 0
src/pages/eContract/manage/styles.less Целия файл

@@ -0,0 +1,44 @@
1
+.title {
2
+    height     : 45px;
3
+    font-size  : 16px;
4
+    font-family: PingFangSC-Regular, PingFang SC;
5
+    font-weight: 400;
6
+    color      : rgba(102, 102, 102, 1);
7
+    line-height: 45px;
8
+   
9
+}
10
+.text {
11
+    font-size  : 16px;
12
+    font-family: PingFangSC-Regular, PingFang SC;
13
+    // font-weight: 400;
14
+    color      : rgba(51, 51, 51, 1);
15
+    line-height: 45px;
16
+}
17
+
18
+.btn {
19
+    width        : 140px;
20
+    height       : 45px;
21
+    background   : rgba(255, 126, 72, 1);
22
+    border-radius: 7px;
23
+    line-height  : 43px;
24
+    font-size    : 20px;
25
+    font-family  : PingFangSC-Regular, PingFang SC;
26
+    font-weight  : 400;
27
+    color        : rgba(255, 255, 255, 1);
28
+    text-align: center;
29
+}
30
+.btn:hover{
31
+    color        : rgba(255, 255, 255, 1);
32
+}
33
+
34
+.rebtn {
35
+    width:140px;
36
+    height:45px;
37
+    background:rgba(255,255,255,1);
38
+    border-radius:7px;
39
+    border:1px solid rgba(156,156,156,1);
40
+    font-size:20px;
41
+font-weight:400;
42
+color:rgba(102,102,102,1);
43
+line-height:28px;
44
+}

+ 156
- 0
src/pages/eContract/template/add.jsx Целия файл

@@ -0,0 +1,156 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Upload, Input, Modal, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select, Form, Alert } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import XForm, { FieldTypes } from '../../../components/XForm';
5
+import router from 'umi/router';
6
+import apis from '../../../services/apis';
7
+import request from '../../../utils/request';
8
+import { fetch } from '../../../utils/request';
9
+import moment from 'moment';
10
+
11
+const header = props => {
12
+
13
+  const [data, setData] = useState({})
14
+  const [flag, setFlag] = useState({})
15
+  const [uploadTip, setUploadTip] = useState({})
16
+  const [loading, setLoading] = useState({})
17
+  const uploadFile = fetch(apis.image.upload)
18
+
19
+
20
+  useEffect(() => {
21
+    setFlag(false);
22
+    setUploadTip("请选择合同文件")
23
+    setLoading(false)
24
+  }, []);
25
+
26
+  const upload = () => {
27
+    console.log("上传")
28
+  }
29
+
30
+  const removeFile = () => {
31
+    console.log("删除文件")
32
+  }
33
+
34
+  const uploaderProps = {
35
+    name: 'file',
36
+    accept: '.pdf',
37
+    showUploadList: true,
38
+    customRequest({
39
+      action,
40
+      file,
41
+      headers,
42
+      onError,
43
+      onProgress,
44
+      onSuccess,
45
+      withCredentials,
46
+    }) {
47
+      const data = new FormData()
48
+      data.append('file', file)
49
+
50
+      uploadFile({ data }).then((img) => {
51
+        setFlag(true)
52
+        setUploadTip("上传成功")
53
+        setData({
54
+          contractTemplateAddress: img
55
+        })
56
+        onSuccess(img, file)
57
+      }).catch(onError);
58
+
59
+      return {
60
+        abort() {
61
+          console.log('upload progress is aborted.');
62
+        },
63
+      };
64
+    },
65
+    onRemove(file) {
66
+      setFlag(false)
67
+      setUploadTip("请选择合同文件")
68
+    }
69
+  }
70
+
71
+  const fields = [
72
+    {
73
+      label: '合同标题',
74
+      name: 'contractTemplateName',
75
+      type: FieldTypes.Text,
76
+      value: data.contractTemplateName,
77
+      rules: [
78
+        { required: true, message: '标题长度20字以内不能有空格', pattern: new RegExp('^[^ ]+$') },
79
+        { max: 20, message: '标题长度不能超过20个字符' }
80
+      ],
81
+      placeholder: "标题长度20字以内不能有空格"
82
+    },
83
+    {
84
+      label: '合同文件',
85
+      name: 'contractTemplateAddress',
86
+      // type: FieldTypes.text,
87
+      value: data.contractTemplateAddress,
88
+      // beforeUpload: (e) => photoBeforeUpload(e),
89
+      rules: [
90
+        { required: true, message: '请选择合同文件' },
91
+      ],
92
+      render: <div><Upload beforeUpload={beforeUpload} {...uploaderProps}><Button disabled={flag}>{uploadTip}</Button></Upload></div>,
93
+      help: <div>仅支持pdf格式,合同必须按规则生成,否则无法正确签章。未按规则生成合同导致的问题,橙蕉免除相关责任。详细要求查看
94
+        <a href='https://easydoc.xyz/s/24703398/3SqDkJDw/odnmIIwl' style={{ color: '#66B3FF' }} target='_blank'>《合同模板制作要求》</a></div>
95
+    },
96
+
97
+  ]
98
+
99
+  function beforeUpload(file) {
100
+    console.log(file, 'file')
101
+    return new Promise((resolve, reject) => {
102
+      if (file.type === 'application/pdf') {
103
+          resolve(file)
104
+      } else {
105
+        message.info('仅支持PDF格式')
106
+        reject()
107
+      }
108
+    })
109
+  }  
110
+
111
+  const handleSubmit = (values) => {
112
+    let submitValues = values;
113
+    submitValues.contractTemplateAddress = data.contractTemplateAddress
114
+
115
+    props.form.validateFields((err, values) => {
116
+      console.log(values)
117
+      if (!err) {
118
+        request({ ...apis.taEcontract.addContractTemplate, data: { ...submitValues }, }).then((data) => {
119
+          router.push({
120
+            pathname: '/eContract/template/list',
121
+            query: {
122
+              //   salesBatchId: data.salesBatchId,
123
+            },
124
+          });
125
+        }).catch((err) => {
126
+          message.info(err.msg || err.message)
127
+        })
128
+      }
129
+    });
130
+  }
131
+  //model
132
+  const handleShowModel = val => {
133
+    setVisible(true);
134
+  }
135
+
136
+  const handleCancel = val => {
137
+    setVisible(false);
138
+  }
139
+
140
+  const cancelPage = () => {
141
+    router.push({
142
+      pathname: '/eContract/template/list',
143
+    });
144
+  }
145
+
146
+  return (
147
+    <>
148
+      <div>
149
+        <XForm onSubmit={handleSubmit} onCancel={cancelPage} fields={fields}></XForm>
150
+      </div>
151
+    </>
152
+  )
153
+}
154
+
155
+const WrappedNormalLoginForm = Form.create({ name: 'header' })(header);
156
+export default WrappedNormalLoginForm

+ 52
- 0
src/pages/eContract/template/detail.jsx Целия файл

@@ -0,0 +1,52 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker, InputNumber, Checkbox, Row, Col } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import XForm, { FieldTypes } from '../../../components/XForm';
5
+import router from 'umi/router';
6
+import moment from 'moment';
7
+import apis from '../../../services/apis';
8
+import request from '../../../utils/request';
9
+
10
+const header = props => {
11
+  const templateId = props.location.query.id;
12
+  const [data, setData] = useState({})
13
+
14
+  useEffect(() => {
15
+    getData(templateId);
16
+  }, [])
17
+
18
+  const getData = (templateId) => {
19
+    request({ ...apis.taEcontract.getContractTemplate, urlData: { id: templateId } }).then((data) => {
20
+      setData(data)
21
+      props.form.setFieldsValue(data)
22
+    })
23
+  }
24
+
25
+  const toCancel = () => {
26
+    router.go(-1)
27
+  }
28
+
29
+  return (
30
+    <>
31
+      <Form labelCol={{ span: 6 }} wrapperCol={{ span: 14 }} style={{ position: 'relative' }}>
32
+        <Form.Item label="合同标题">
33
+          <span>{data.contractTemplateName}</span>
34
+        </Form.Item>
35
+        <Form.Item label="合同文件">
36
+          <div><a href={data.contractTemplateAddress} target='_blank' style={{ color: '#66B3FF', fontSize: '14px' }}>
37
+            查看文件</a></div>
38
+        </Form.Item>
39
+        <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
40
+          <div style={{ margin: '0.16rem 0 0.06rem' }}>
41
+            <Button onClick={() => toCancel()} style={{ marginLeft: '20px' }}>
42
+              返回
43
+          </Button>
44
+          </div>
45
+        </Form.Item>
46
+      </Form>
47
+    </>
48
+  )
49
+}
50
+
51
+const WrappedHeader = Form.create({ name: 'header' })(header);
52
+export default WrappedHeader

+ 195
- 0
src/pages/eContract/template/list.jsx Целия файл

@@ -0,0 +1,195 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker, notification } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import router from 'umi/router';
5
+import moment from 'moment';
6
+import styles from '../../style/GoodsList.less';
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
+// import RaiseHelpDoc from '../edit/components/RaiseHelpDoc';
13
+
14
+const { Option } = Select;
15
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
16
+ 
17
+const header = props => {
18
+  // eslint-disable-next-line react-hooks/rules-of-hooks
19
+  const [data, setData] = useState({ list: [], total: 0 })
20
+  //   const [page, changePage] = useState({})
21
+  const [contractList, setContractList] = useState([])
22
+  const [time, setTime] = useState('')
23
+  const [showHelp, setShowHelp] = useState(false)
24
+
25
+  // 查询列表
26
+  const getList = params => {
27
+    request({ ...apis.taEcontract.listContractTemplate, params: { ...params } }).then(data => {
28
+      console.log(data)
29
+      setData(data)
30
+    })
31
+  }
32
+
33
+  // eslint-disable-next-line react-hooks/rules-of-hooks
34
+  useEffect(() => {
35
+    getList({ pageNum: 1, pageSize: 10 });
36
+  }, [])
37
+
38
+  const toAdd = rowData => () => {
39
+    router.push({
40
+      pathname: '/eContract/template/add',
41
+    });
42
+  }
43
+
44
+  function openNotificationWithIcon(type, message) {
45
+    notification[type]({
46
+      message,
47
+      description:
48
+        '',
49
+    });
50
+  }
51
+
52
+  const toDel = rowData => () =>{
53
+    if(contractList.length < 1){
54
+      openNotificationWithIcon('error', '请先选择需要删除的合同模板')
55
+      return
56
+    }
57
+
58
+    Modal.confirm({
59
+      title: '确定将所选的'+ contractList.length +'条合同模板删除?',
60
+      okText: '确定',
61
+      cancelText: '取消',
62
+      onOk () {
63
+        console.log(contractList,'contractList');
64
+        request({ ...apis.taEcontract.batchDeleteContractTemplate, data: contractList, }).then((data) => {
65
+          message.info("操作成功")
66
+          getList({ pageNum: 1, pageSize: 10 });
67
+        }).catch((err) => {
68
+          // message.info(err.msg)
69
+        })
70
+      },
71
+    });
72
+  }
73
+
74
+  const toDetail = (record) => () => {
75
+    router.push({
76
+        pathname: '/eContract/template/detail',
77
+        query: {
78
+          id: record.contractTemplateId
79
+        },
80
+    });
81
+}
82
+
83
+  /**
84
+   *
85
+   *
86
+   * @param {*} props
87
+   * @returns
88
+   */
89
+  const columns = [
90
+    {
91
+      title: '合同标题',
92
+      dataIndex: 'contractTemplateName',
93
+      key: 'contractTemplateName',
94
+      align: 'center',
95
+    },
96
+    {
97
+      title: '新增时间',
98
+      dataIndex: 'createDate',
99
+      key: 'createDate',
100
+      align: 'center',
101
+      render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
102
+    },
103
+    {
104
+      title: '操作',
105
+      dataIndex: '',
106
+      key: '',
107
+      align: 'center',
108
+      render: (text, record) => (
109
+          <AuthButton name="admin.eContractTemplate.detail.get" noRight={null}>
110
+            <a style={{ color: '#66B3FF' }} onClick={toDetail(record)} >查看详情</a>
111
+          </AuthButton>
112
+      ),
113
+    },
114
+  ];
115
+  const getSignList = dynamicId => {
116
+    router.push({
117
+      pathname: '/activity/SignList',
118
+      query: {
119
+        dynamicId,
120
+      },
121
+    });
122
+  }
123
+
124
+  const changePageNum = pageNumber => {
125
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
126
+  }
127
+
128
+  const rowSelection = {
129
+    onChange: (selectedRowKeys, selectedRows) => {
130
+      console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
131
+      setContractList(selectedRows)
132
+    },
133
+  };
134
+
135
+  // 提交事件
136
+  const handleSubmit = e => {
137
+    e.preventDefault();
138
+    props.form.validateFields((err, values) => {
139
+      if (!err) {      
140
+        getList({ pageNum: 1, pageSize: 10, ...values })
141
+      }
142
+    });
143
+  }
144
+
145
+  // 重置搜索
146
+  function handleReset () {
147
+    props.form.resetFields();
148
+    setTime('')
149
+    getList({ pageNum: 1, pageSize: 10 })
150
+  }
151
+
152
+  const { getFieldDecorator } = props.form
153
+  return (
154
+
155
+    <>
156
+      {/* style={{ display: 'none' }} */}
157
+      <div id="qrcode"></div>
158
+      <Form layout="inline" onSubmit={e => handleSubmit(e)}>
159
+        <Form.Item>
160
+          {getFieldDecorator('contractTemplateName')(
161
+             <Input
162
+             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
163
+             placeholder="合同标题"
164
+           />,
165
+          )}
166
+        </Form.Item>
167
+        <Form.Item>
168
+          <AuthButton name="admin.buildingDynamic.search" noRight={null}>
169
+            <Button type="primary" htmlType="submit" className={styles.searchBtn}>
170
+              搜索
171
+            </Button>
172
+          </AuthButton>
173
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
174
+            重置
175
+            </Button>
176
+        </Form.Item>
177
+      </Form>
178
+      <AuthButton name="admin.eContractTemplate.add.post" noRight={null}>
179
+        <Button type="danger" className={styles.addBtn} onClick={toAdd()}>新增</Button>
180
+      </AuthButton>
181
+      <AuthButton name="admin.eContractTemplate.del" noRight={null}>
182
+        <Button type="primary" className={styles.addBtn} onClick={toDel()} style={{marginLeft:'30px'}}>删除</Button>
183
+      </AuthButton>
184
+      <Table rowSelection={rowSelection}
185
+       dataSource={data.records} columns={columns} pagination={false} rowKey={r => r.contractTemplateId} />
186
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
187
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current}/>
188
+      </div>
189
+      {/* <RaiseHelpDoc visible={showHelp} onCancel={() => setShowHelp(false)} /> */}
190
+    </>
191
+  )
192
+}
193
+const WrappedHeader = Form.create({ name: 'header' })(header);
194
+
195
+export default WrappedHeader

+ 0
- 0
src/pages/eContract/template/pdfDetail.jsx Целия файл


+ 3
- 3
src/pages/h5SampleManager/h5Sample/list.jsx Целия файл

@@ -48,7 +48,7 @@ function CartBody(props) {
48 48
     <Card
49 49
       hoverable
50 50
       onClick={() => toEdi(data)}
51
-      style={{ minWidth: '330px', borderRadius: '12px', margin: '10px', boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)' }}
51
+      style={{ minWidth: '330px', borderRadius: '12px', margin: '10px 20px 10px 0', boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)' }}
52 52
     // cover={}
53 53
     // bodyStyle={{ padding: '10px 20px' }}
54 54
     >
@@ -61,7 +61,7 @@ function CartBody(props) {
61 61
 
62 62
       }
63 63
       <img className={Styles.cover} style={{ backgroundImage: `url('` + data.coverImg + `')` }}   ></img>
64
-      <p className={Styles.cardText} style={{ padding: '0.05rem 0.096rem' }}>
64
+      <p className={Styles.cardText} style={{ padding: '0.1rem 0.096rem',marginBottom:'0px' }}>
65 65
         {/* <span className={Styles.title}>样例名</span> */}
66 66
         <span style={{ textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden' }}>{data.sampleName}</span>
67 67
       </p>
@@ -177,7 +177,7 @@ function body(props) {
177 177
       </Form>
178 178
 
179 179
       {/* 卡片内容,显示楼盘项目  */}
180
-      <Row style={{ padding: ' 0 10px' }}>
180
+      <Row style={{ paddingTop: ' 16px' }}>
181 181
         {
182 182
           dataSource.records.map((item, _) => (
183 183
             <Col span={8}>

+ 97
- 65
src/pages/house/raise/add/index.jsx Целия файл

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker, InputNumber, Checkbox, Row, Col} from 'antd';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker, InputNumber, Checkbox, Radio, Row, Col } from 'antd';
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import XForm, { FieldTypes } from '../../../../components/XForm';
5 5
 import router from 'umi/router';
@@ -27,69 +27,71 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
27 27
 const header = props => {
28 28
   const { salesBatchId } = props.location.query
29 29
   console.log(salesBatchId)
30
-  const [ saleBatchData, setSaleBatchData ] = useState({})
30
+  const [saleBatchData, setSaleBatchData] = useState({})
31 31
   const [showHelp, setShowHelp] = useState(false)
32 32
   const [houseLockingType, setHouseLockingType] = useState('')
33 33
   const [preSelectFlag, setPreSelectFlag] = useState(false)
34
+  const [isInvite, setInvite] = useState()
35
+  const [isShowInviteTel,setIsShowInviteTel] =useState('none')
34 36
 
35
-  if(salesBatchId){
37
+  if (salesBatchId) {
36 38
     useEffect(() => {
37 39
       getSaleBatchData(salesBatchId);
38
-    },[])
40
+    }, [])
39 41
 
40
-  // 查询列表
41
-  const getSaleBatchData = (salesBatchId) => {
42
-      request({ ...apis.system.taPolicy, urlData: {id: salesBatchId} }).then((data) => {
43
-          console.log(data)
44
-          setSaleBatchData(data)
42
+    // 查询列表
43
+    const getSaleBatchData = (salesBatchId) => {
44
+      request({ ...apis.system.taPolicy, urlData: { id: salesBatchId } }).then((data) => {
45
+        console.log(data)
46
+        setSaleBatchData(data)
45 47
       })
46 48
     }
47 49
   }
48 50
 
49
-  const cancelPage = () =>{
51
+  const cancelPage = () => {
50 52
     router.push({
51 53
       pathname: '/house/house/list',
52 54
     });
53 55
   }
54 56
 
55
-  function onChangeValue(e){
57
+  function onChangeValue(e) {
56 58
     console.log(e, '222222222');
57
-    request({ ...apis.house.checkHavingRecord, urlData: {id: e} }).then((data) => {
59
+    request({ ...apis.house.checkHavingRecord, urlData: { id: e } }).then((data) => {
58 60
       setPreSelectFlag(data.havingRecord)
59 61
     })
60 62
 
61 63
   }
62 64
 
63
-  function changeHouseLockingType(e){
65
+  function changeHouseLockingType(e) {
64 66
     props.form.resetFields("payType");
65
-    if(e === 'auto'){
67
+    if (e === 'auto') {
66 68
       setHouseLockingType('onLine');
67
-    }else{
69
+    } else {
68 70
       setHouseLockingType('');
69 71
     }
70 72
   }
71 73
 
72
-  function handleSubmit (e) {
74
+  function handleSubmit(e) {
73 75
     e.preventDefault();
74 76
     props.form.validateFields((err, values) => {
75
-      if (!err){
76
-        console.log(values,'valuesvaluesvalues')
77
-        if (values.payType == 'onLine' && (values.payDescriptionOnline == '' || values.payDescriptionOnline == null)){
78
-            message.info("请填写线上缴费说明");
79
-            return;
77
+      if (!err) {
78
+        console.log(values, 'valuesvaluesvalues')
79
+        if (values.payType == 'onLine' && (values.payDescriptionOnline == '' || values.payDescriptionOnline == null)) {
80
+          message.info("请填写线上缴费说明");
81
+          return;
80 82
         }
81
-        if (values.payType == 'offLine' && (values.payDescriptionOffline == '' || values.payDescriptionOffline == null)){
83
+        if (values.payType == 'offLine' && (values.payDescriptionOffline == '' || values.payDescriptionOffline == null)) {
82 84
           message.info("请填写线下缴费说明");
83 85
           return;
84 86
         }
85 87
         if ((values.payType == 'onLine' && (values.payDescriptionOnline == '' || values.payDescriptionOnline == null)) ||
86
-            (values.payType == 'offLine' && (values.payDescriptionOffline == '' || values.payDescriptionOffline == null))){
88
+          (values.payType == 'offLine' && (values.payDescriptionOffline == '' || values.payDescriptionOffline == null))) {
87 89
           message.info("请填写缴费说明");
88 90
           return;
89 91
         }
90
-        
91
-        let {liveTime, ...submitValue} = values
92
-        if (values.raiseStartTime > values.raiseEndTime){
92
+
93
+        let { liveTime, ...submitValue } = values
94
+        if (values.raiseStartTime > values.raiseEndTime) {
93 95
           message.info("认筹结束时间大于认筹开始时间")
94 96
           return;
95 97
         }
@@ -97,7 +99,7 @@ const header = props => {
97 99
         submitValue.raiseEndTime = moment(submitValue.raiseEndTime).format('YYYY-MM-DD HH:mm:ss')
98 100
         submitValue.payType = values.payType.toString();
99 101
         submitValue.raisePrice = submitValue.raisePrice * 100;
100
-        request({ ...apis.house.addRaise, data: { ...submitValue },}).then((data) => {
102
+        request({ ...apis.house.addRaise, data: { ...submitValue }, }).then((data) => {
101 103
           message.info("保存成功")
102 104
           router.push({
103 105
             pathname: '/house/raise/list',
@@ -109,6 +111,20 @@ const header = props => {
109 111
     });
110 112
   }
111 113
 
114
+  const changeInvite = e => {
115
+    if (e.target.value == 1) {
116
+      setInvite(1)
117
+      setIsShowInviteTel("block")
118
+    } else {
119
+      setInvite(0)
120
+      setIsShowInviteTel("none")
121
+    }
122
+  }
123
+
124
+  const inviteOptions = {
125
+    value: 0
126
+  };
127
+
112 128
   const { getFieldDecorator } = props.form;
113 129
 
114 130
   return (
@@ -116,75 +132,76 @@ const header = props => {
116 132
       <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
117 133
         <Form.Item label="销售楼盘">
118 134
           {getFieldDecorator('buildingId', {
119
-            rules: [{ required: true, message: ' 请输入销售楼盘' }], 
120
-          })(<BuildSelect type='false' salesBatchId={props.form.getFieldValue('salesBatchId')}/>)}
135
+            rules: [{ required: true, message: ' 请输入销售楼盘' }],
136
+          })(<BuildSelect type='false' salesBatchId={props.form.getFieldValue('salesBatchId')} />)}
121 137
         </Form.Item>
122 138
         <Form.Item label="销售批次" help="销售批次请在房源管理中新增">
123 139
           {getFieldDecorator('salesBatchId', {
124 140
             rules: [{ required: true, message: ' 请输入销售批次' }], onChange: onChangeValue
125
-          })(<SalesBatch type='true' buildingId={props.form.getFieldValue('buildingId')}/>)}
141
+          })(<SalesBatch type='true' buildingId={props.form.getFieldValue('buildingId')} />)}
126 142
         </Form.Item>
127
-        <Form.Item style={{marginTop:'20px'}} label="认筹开始时间">
128
-        {getFieldDecorator('raiseStartTime', {
129
-          rules: [
130
-            {
131
-              required: true,
132
-              message: '请选择认筹开始时间',
133
-            },
134
-          ],
135
-        })(<DatePicker showTime={{ format: 'HH:mm:ss' }} format="YYYY-MM-DD HH:mm:ss" />)}
143
+        <Form.Item style={{ marginTop: '20px' }} label="认筹开始时间">
144
+          {getFieldDecorator('raiseStartTime', {
145
+            rules: [
146
+              {
147
+                required: true,
148
+                message: '请选择认筹开始时间',
149
+              },
150
+            ],
151
+          })(<DatePicker showTime={{ format: 'HH:mm:ss' }} format="YYYY-MM-DD HH:mm:ss" />)}
136 152
         </Form.Item>
137 153
         <Form.Item label="认筹结束时间">
138
-        {getFieldDecorator('raiseEndTime', {
139
-          rules: [
140
-            {
141
-              required: true,
142
-              message: '请选择认筹结束时间',
143
-            },
144
-          ],
145
-        })(<DatePicker showTime={{ format: 'HH:mm:ss' }} format="YYYY-MM-DD HH:mm:ss" />)}
154
+          {getFieldDecorator('raiseEndTime', {
155
+            rules: [
156
+              {
157
+                required: true,
158
+                message: '请选择认筹结束时间',
159
+              },
160
+            ],
161
+          })(<DatePicker showTime={{ format: 'HH:mm:ss' }} format="YYYY-MM-DD HH:mm:ss" />)}
146 162
         </Form.Item>
147 163
         <Form.Item label="锁房方式" help="自动锁房仅适用于线上支付认筹且每次只能认筹一套房源且认筹后其他人无法认筹此房源。其他情况请使用手动锁房。">
148 164
           {getFieldDecorator('houseLockingType', {
149
-              rules: [{ required: true, message: '请选择锁房方式' }], onChange:changeHouseLockingType
150
-            })(<Select placeholder="锁房方式" style={{ width: '300px' }}>
165
+            rules: [{ required: true, message: '请选择锁房方式' }], onChange: changeHouseLockingType
166
+          })(<Select placeholder="锁房方式" style={{ width: '300px' }}>
151 167
             <Option value="auto">自动锁房</Option>
152 168
             <Option value="manual">手动锁房</Option>
153 169
           </Select>)}
154 170
         </Form.Item>
155
-        <Form.Item style={{marginTop:'20px'}} label="认筹金额" help="最高50000元(需要微信商户号配置的行业为房地产行业:房地产开发,物业,房产中介。若微信商户号配置为其他行业则为3000元若不确定请联系平台相关运营人员。">
171
+        <Form.Item style={{ marginTop: '20px' }} label="认筹金额" help="最高50000元(需要微信商户号配置的行业为房地产行业:房地产开发,物业,房产中介。若微信商户号配置为其他行业则为3000元若不确定请联系平台相关运营人员。">
156 172
           {getFieldDecorator('raisePrice', {
157 173
             rules: [{ required: true, message: '请输入认筹金额' }],
158
-          })(<InputNumber min={0.01} max={50000} step={0.01} placeholder="认筹缴费金额" style={{width:'200px'}} />)}<span>元</span>
174
+          })(<InputNumber min={0.01} max={50000} step={0.01} placeholder="认筹缴费金额" style={{ width: '200px' }} />)}<span>元</span>
159 175
         </Form.Item>
160
-        <Form.Item style={{marginTop:'20px'}} label="认筹需预选" help="设置是否需要客户之前预选了房源才能认筹。">
161
-          {getFieldDecorator('needPreselection', {initialValue:preSelectFlag === true?'true':'false',
162
-              rules: [{ required: true, message: '请选择认筹需预选' }],
163
-            })(<Select placeholder="预选方式" style={{ width: '300px' }} disabled={preSelectFlag?false:true}>
176
+        <Form.Item style={{ marginTop: '20px' }} label="认筹需预选" help="设置是否需要客户之前预选了房源才能认筹。">
177
+          {getFieldDecorator('needPreselection', {
178
+            initialValue: preSelectFlag === true ? 'true' : 'false',
179
+            rules: [{ required: true, message: '请选择认筹需预选' }],
180
+          })(<Select placeholder="预选方式" style={{ width: '300px' }} disabled={preSelectFlag ? false : true}>
164 181
             <Option value="false">否</Option>
165 182
             <Option value="true">是</Option>
166 183
           </Select>)}
167 184
         </Form.Item>
168
-        <Form.Item style={{marginTop:'20px'}} label="缴费方式" help="锁房方式为自动锁房,缴费方式仅支持线上缴费。锁房方式为手动锁房,缴费方式可多选,线上缴费使用微信支付,线下缴费客户可提交后去线下缴费。">
185
+        <Form.Item style={{ marginTop: '20px' }} label="缴费方式" help="锁房方式为自动锁房,缴费方式仅支持线上缴费。锁房方式为手动锁房,缴费方式可多选,线上缴费使用微信支付,线下缴费客户可提交后去线下缴费。">
169 186
           {getFieldDecorator('payType', {
170 187
             initialValue: houseLockingType,
171 188
           })(
172 189
             <Checkbox.Group style={{ width: '100%' }}>
173
-                  <Checkbox value="onLine" disabled={houseLockingType == 'onLine' ?true:false}>线上缴费</Checkbox>
174
-                  <Checkbox value="offLine" disabled={houseLockingType == 'onLine' ?true:false}>
175
-                    线下缴费
190
+              <Checkbox value="onLine" disabled={houseLockingType == 'onLine' ? true : false}>线上缴费</Checkbox>
191
+              <Checkbox value="offLine" disabled={houseLockingType == 'onLine' ? true : false}>
192
+                线下缴费
176 193
                   </Checkbox>
177 194
             </Checkbox.Group>,
178 195
           )}
179 196
         </Form.Item>
180
-        <Form.Item style={{marginTop:'20px'}} label="线上缴费说明">
181
-          {getFieldDecorator('payDescriptionOnline')(<TextArea placeholder="向客户说明线上缴费相关业务需求" style={{height:'300px'}}></TextArea>)}
197
+        <Form.Item style={{ marginTop: '20px' }} label="线上缴费说明">
198
+          {getFieldDecorator('payDescriptionOnline')(<TextArea placeholder="向客户说明线上缴费相关业务需求" style={{ height: '300px' }}></TextArea>)}
182 199
         </Form.Item>
183 200
         <Form.Item label="线下缴费说明">
184
-          {getFieldDecorator('payDescriptionOffline')(<TextArea placeholder="填写线下缴费时间地点要求" style={{height:'300px'}}></TextArea>)}
201
+          {getFieldDecorator('payDescriptionOffline')(<TextArea placeholder="填写线下缴费时间地点要求" style={{ height: '300px' }}></TextArea>)}
185 202
         </Form.Item>
186 203
         <Form.Item label="认筹单注意事项">
187
-          {getFieldDecorator('raisePrecautions')(<Input maxLength={100} placeholder="客户提交认筹单后的注意事项"/>)}
204
+          {getFieldDecorator('raisePrecautions')(<Input maxLength={100} placeholder="客户提交认筹单后的注意事项" />)}
188 205
         </Form.Item>
189 206
         <Form.Item label="选房协议" help="若想在协议中自动引用客户信息生成带客户信息的协议,请在选房协议中按如下格式引用:
190 207
                                          ${name}其中name代表客户姓名,
@@ -193,12 +210,27 @@ const header = props => {
193 210
                                          ${date}其中date代表日期(如2020/03/10),
194 211
                                          举例,若想在协议中“乙方:”后显示当前客户姓名,在“乙方:”后输入${name}即可。
195 212
                                          注意,在提交认筹单后在认筹单详情中查看协议才能看到这些引用的具体信息,在认筹过程中,因阅读协议在填写个人信息之前,这些信息会为空白。">
196
-        {getFieldDecorator('payProtocol',{
213
+          {getFieldDecorator('payProtocol', {
197 214
             rules: [{ required: true, message: '请输入选房协议' }],
198 215
           })(<Wangedit />)}
199 216
         </Form.Item>
217
+
218
+        <Form.Item label="是否为邀请制" help="若为邀请制,则需要填写哪些手机号的用户可以看到认筹,不在邀请范围内的用户无法认筹,若不为邀请制,则认筹发布后,小程序全部用户都可以进入认筹。">
219
+          {getFieldDecorator('invite', {
220
+            rules: [{ required: true, message: '请选择是否为邀请制' }],
221
+            initialValue: 0
222
+          })(<Radio.Group onChange={changeInvite}>
223
+            <Radio value={1}>是</Radio>
224
+            <Radio value={0}>否</Radio>
225
+          </Radio.Group>)}
226
+        </Form.Item>
227
+
228
+        <Form.Item label="被邀请人清单" style = {{display:isShowInviteTel}} >
229
+          {getFieldDecorator('inviteTel')(<TextArea placeholder="填写被邀请人手机号,每个手机号换行即可,建议在txt文本中编辑好后复制粘贴进来" style={{ height: '300px'}}></TextArea>)}
230
+        </Form.Item>
231
+
200 232
         <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
201
-          <Button type="primary" htmlType="submit"style={{marginRight:'20px'}}>
233
+          <Button type="primary" htmlType="submit" style={{ marginRight: '20px' }}>
202 234
             提交
203 235
           </Button>
204 236
           <Button onClick={() => router.go(-1)}>

+ 122
- 77
src/pages/house/raise/edit/components/base.jsx Целия файл

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload, InputNumber, Checkbox  } from 'antd';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload, InputNumber, Checkbox } from 'antd';
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import moment from 'moment';
5 5
 import router from 'umi/router';
@@ -20,50 +20,58 @@ const { TextArea } = Input;
20 20
 const Base = props => {
21 21
   const raiseId = props.raiseId.raiseId
22 22
   const salesBatchId = props.salesBatchId
23
-  const [ saleBatchData, setSaleBatchData ] = useState({})
23
+  const [saleBatchData, setSaleBatchData] = useState({})
24 24
   const [showHelp, setShowHelp] = useState(false)
25 25
   const [houseLockingType, setHouseLockingType] = useState('')
26 26
   const [preSelectFlag, setPreSelectFlag] = useState(false)
27
+  const [invite, setInvite] = useState()
28
+  const [isShowInviteTel, setIsShowInviteTel] = useState()
27 29
 
28
-  if(raiseId){
30
+  if (raiseId) {
29 31
     useEffect(() => {
30 32
       getSaleBatchData(raiseId);
31 33
       onChangeValue(salesBatchId);
32
-    },[])
34
+    }, [])
33 35
 
34
-  // 查询列表
35
-  const getSaleBatchData = (raiseId) => {
36
-    request({ ...apis.house.taRaiseById, urlData: {id: raiseId} }).then((data) => {
37
-      console.log(data)
36
+    // 查询列表
37
+    const getSaleBatchData = (raiseId) => {
38
+      request({ ...apis.house.taRaiseById, urlData: { id: raiseId } }).then((data) => {
39
+        console.log(data)
38 40
         setSaleBatchData(data)
39
-    })
40
-  }
41
+
42
+        if (data != null && data.invite == 1) {
43
+          setIsShowInviteTel("block")
44
+        } else {
45
+          setIsShowInviteTel("none")
46
+        }
47
+      })
48
+    }
41 49
   }
42 50
 
43
-  const cancelPage = () =>{
51
+  const cancelPage = () => {
44 52
     router.push({
45 53
       pathname: '/house/raise/list',
46 54
     });
47 55
   }
48 56
 
49
-  function onChangeValue(e){
50
-    request({ ...apis.house.checkHavingRecord, urlData: {id: e} }).then((data) => {
57
+  function onChangeValue(e) {
58
+    request({ ...apis.house.checkHavingRecord, urlData: { id: e } }).then((data) => {
51 59
       setPreSelectFlag(data.havingRecord)
52 60
       console.log(preSelectFlag)
53 61
     })
54 62
 
55 63
   }
56 64
 
57
-  function changeHouseLockingType(e){
65
+  function changeHouseLockingType(e) {
58 66
     props.form.resetFields("payType");
59
-    if(e === 'auto'){
67
+    if (e === 'auto') {
60 68
       setHouseLockingType('onLine');
61
-    }else{
69
+    } else {
62 70
       setHouseLockingType('');
63 71
     }
64 72
   }
65 73
 
66
-  function toDecimal2 (x){
74
+  function toDecimal2(x) {
67 75
     var f = parseFloat(x);
68 76
     if (isNaN(f)) {
69 77
       return false;
@@ -81,7 +89,7 @@ const Base = props => {
81 89
     console.log(s)
82 90
     return s;
83 91
   }
84
-  function regFenToYuan(fen){
92
+  function regFenToYuan(fen) {
85 93
     var num = fen;
86 94
     num = fen * 0.01;
87 95
     num += '';
@@ -92,27 +100,27 @@ const Base = props => {
92 100
     return num
93 101
   }
94 102
 
95
-  function handleSubmit (e) {
103
+  function handleSubmit(e) {
96 104
     e.preventDefault();
97 105
     props.form.validateFields((err, values) => {
98
-      if (!err){
106
+      if (!err) {
99 107
         console.log(values)
100
-        if (values.payType == 'onLine' && (values.payDescriptionOnline == '' || values.payDescriptionOnline == null)){
108
+        if (values.payType == 'onLine' && (values.payDescriptionOnline == '' || values.payDescriptionOnline == null)) {
101 109
           message.info("请填写线上缴费说明");
102 110
           return;
103 111
         }
104
-        if (values.payType == 'offLine' && (values.payDescriptionOffline == '' || values.payDescriptionOffline == null)){
112
+        if (values.payType == 'offLine' && (values.payDescriptionOffline == '' || values.payDescriptionOffline == null)) {
105 113
           message.info("请填写线下缴费说明");
106 114
           return;
107 115
         }
108 116
         if ((values.payType == 'onLine' && (values.payDescriptionOnline == '' || values.payDescriptionOnline == null)) ||
109
-            (values.payType == 'offLine' && (values.payDescriptionOffline == '' || values.payDescriptionOffline == null))){
117
+          (values.payType == 'offLine' && (values.payDescriptionOffline == '' || values.payDescriptionOffline == null))) {
110 118
           message.info("请填写缴费说明");
111 119
           return;
112 120
         }
113
-        
114
-        let {liveTime, ...submitValue} = values
115
-        if (values.raiseStartTime > values.raiseEndTime){
121
+
122
+        let { liveTime, ...submitValue } = values
123
+        if (values.raiseStartTime > values.raiseEndTime) {
116 124
           message.info("认筹结束时间大于认筹开始时间")
117 125
           return;
118 126
         }
@@ -120,7 +128,7 @@ const Base = props => {
120 128
         values.raiseEndTime = moment(values.raiseEndTime).format('YYYY-MM-DD HH:mm:ss')
121 129
         values.payType = values.payType.toString();
122 130
         values.raisePrice = values.raisePrice * 100;
123
-        request({ ...apis.house.updateRaise, urlData: { id: raiseId }, data: { ...values },}).then((data) => {
131
+        request({ ...apis.house.updateRaise, urlData: { id: raiseId }, data: { ...values }, }).then((data) => {
124 132
           message.info("保存成功")
125 133
         }).catch((err) => {
126 134
           message.info(err.msg || err.message)
@@ -129,94 +137,113 @@ const Base = props => {
129 137
     });
130 138
   }
131 139
 
140
+  const changeInvite = e => {
141
+    if (e.target.value == 1) {
142
+      setInvite(1)
143
+      setIsShowInviteTel("block")
144
+    } else {
145
+      setInvite(0)
146
+      setIsShowInviteTel("none")
147
+    }
148
+  }
149
+
132 150
   const { getFieldDecorator } = props.form;
133 151
 
134 152
   return (
135 153
     <>
136 154
       <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
137 155
         <Form.Item label="销售楼盘">
138
-          {getFieldDecorator('buildingId', {initialValue:saleBatchData.buildingId,
156
+          {getFieldDecorator('buildingId', {
157
+            initialValue: saleBatchData.buildingId,
139 158
             rules: [{ required: true, message: ' 请输入销售楼盘' }],
140 159
           })(<BuildingSelect />)}
141 160
         </Form.Item>
142 161
         <Form.Item label="销售批次">
143 162
           {getFieldDecorator('salesBatchId', {
144 163
             rules: [{ required: true, message: ' 请输入销售批次' }], onChange: onChangeValue
145
-          ,initialValue:saleBatchData.salesBatchId})
146
-          (<SalesBatch type = 'false'/>)}
164
+            , initialValue: saleBatchData.salesBatchId
165
+          })
166
+            (<SalesBatch type='false' />)}
147 167
         </Form.Item>
148 168
         <Form.Item label="备注">
149
-          {getFieldDecorator('remark', {initialValue: saleBatchData.remark})(<Input disabled />)}
169
+          {getFieldDecorator('remark', { initialValue: saleBatchData.remark })(<Input disabled />)}
150 170
         </Form.Item>
151 171
         <Form.Item label="发布状态">
152 172
           {getFieldDecorator('status', {
153
-          rules: [{ required: true, message: ' 请输入销售批次' }], onChange: onChangeValue
154
-            ,initialValue:saleBatchData.status == 1 ? '1' : '0'})(<Select placeholder="发布状态" style={{ width: '300px' }} disabled>
155
-          <Option value="0">否</Option>
156
-          <Option value="1">是</Option>
157
-        </Select>)}
173
+            rules: [{ required: true, message: ' 请输入销售批次' }], onChange: onChangeValue
174
+            , initialValue: saleBatchData.status == 1 ? '1' : '0'
175
+          })(<Select placeholder="发布状态" style={{ width: '300px' }} disabled>
176
+            <Option value="0">否</Option>
177
+            <Option value="1">是</Option>
178
+          </Select>)}
158 179
         </Form.Item>
159 180
         <Form.Item label="认筹开始时间">
160
-        {getFieldDecorator('raiseStartTime', {initialValue : saleBatchData.raiseStartTime ? moment(saleBatchData.raiseStartTime , 'YYYY-MM-DD HH:mm:ss') : null,
161
-          rules: [
162
-            {
163
-              required: true,
164
-              message: '请选择认筹开始时间',
165
-            },
166
-          ],
167
-        })(<DatePicker showTime={{ format: 'HH:mm:ss' }} format="YYYY-MM-DD HH:mm:ss" />)}
181
+          {getFieldDecorator('raiseStartTime', {
182
+            initialValue: saleBatchData.raiseStartTime ? moment(saleBatchData.raiseStartTime, 'YYYY-MM-DD HH:mm:ss') : null,
183
+            rules: [
184
+              {
185
+                required: true,
186
+                message: '请选择认筹开始时间',
187
+              },
188
+            ],
189
+          })(<DatePicker showTime={{ format: 'HH:mm:ss' }} format="YYYY-MM-DD HH:mm:ss" />)}
168 190
         </Form.Item>
169 191
         <Form.Item label="认筹结束时间">
170
-        {getFieldDecorator('raiseEndTime', {initialValue : saleBatchData.raiseEndTime ? moment(saleBatchData.raiseEndTime , 'YYYY-MM-DD HH:mm:ss') : null,
171
-          rules: [
172
-            {
173
-              required: true,
174
-              message: '请选择认筹结束时间',
175
-            },
176
-          ],
177
-        })(<DatePicker showTime={{ format: 'HH:mm:ss' }} format="YYYY-MM-DD HH:mm:ss" />)}
192
+          {getFieldDecorator('raiseEndTime', {
193
+            initialValue: saleBatchData.raiseEndTime ? moment(saleBatchData.raiseEndTime, 'YYYY-MM-DD HH:mm:ss') : null,
194
+            rules: [
195
+              {
196
+                required: true,
197
+                message: '请选择认筹结束时间',
198
+              },
199
+            ],
200
+          })(<DatePicker showTime={{ format: 'HH:mm:ss' }} format="YYYY-MM-DD HH:mm:ss" />)}
178 201
         </Form.Item>
179 202
         <Form.Item label="锁房方式" help="自动锁房仅适用于线上支付认筹且每次只能认筹一套房源且认筹后其他人无法认筹此房源。其他情况请使用手动锁房。">
180
-          {getFieldDecorator('houseLockingType', {initialValue: saleBatchData.houseLockingType,
181
-              rules: [{ required: true, message: '请选择锁房方式' }], onChange:changeHouseLockingType
182
-            })(<Select placeholder="发布状态" style={{ width: '300px' }} disabled>  
203
+          {getFieldDecorator('houseLockingType', {
204
+            initialValue: saleBatchData.houseLockingType,
205
+            rules: [{ required: true, message: '请选择锁房方式' }], onChange: changeHouseLockingType
206
+          })(<Select placeholder="发布状态" style={{ width: '300px' }} disabled>
183 207
             <Option value="auto">自动锁房</Option>
184 208
             <Option value="manual">手动锁房</Option>
185 209
           </Select>)}
186 210
         </Form.Item>
187
-        <Form.Item style={{marginTop:'20px'}} label="认筹金额" help="最高50000元(需要微信商户号配置的行业为房地产行业:房地产开发,物业,房产中介。若微信商户号配置为其他行业则为3000元若不确定请联系平台相关运营人员。">
188
-          {getFieldDecorator('raisePrice', {initialValue:regFenToYuan(saleBatchData.raisePrice),
211
+        <Form.Item style={{ marginTop: '20px' }} label="认筹金额" help="最高50000元(需要微信商户号配置的行业为房地产行业:房地产开发,物业,房产中介。若微信商户号配置为其他行业则为3000元若不确定请联系平台相关运营人员。">
212
+          {getFieldDecorator('raisePrice', {
213
+            initialValue: regFenToYuan(saleBatchData.raisePrice),
189 214
             rules: [{ required: true, message: '请输入认筹金额' }],
190
-          })(<InputNumber max={50000} min={0.01} step={0.01} placeholder="认筹缴费金额" style={{width:'200px'}} />)}<span>元</span>
215
+          })(<InputNumber max={50000} min={0.01} step={0.01} placeholder="认筹缴费金额" style={{ width: '200px' }} />)}<span>元</span>
191 216
         </Form.Item>
192
-        <Form.Item style={{marginTop:'20px'}} label="认筹需预选" help="设置是否需要客户之前预选了房源才能认筹。">
193
-          {getFieldDecorator('needPreselection', {initialValue:saleBatchData.needPreselection === false?'false':'true',
194
-              rules: [{ required: true, message: '请选择认筹需预选' }],
195
-            })(<Select placeholder="预选方式" style={{ width: '300px' }} disabled={preSelectFlag?false:true}>
217
+        <Form.Item style={{ marginTop: '20px' }} label="认筹需预选" help="设置是否需要客户之前预选了房源才能认筹。">
218
+          {getFieldDecorator('needPreselection', {
219
+            initialValue: saleBatchData.needPreselection === false ? 'false' : 'true',
220
+            rules: [{ required: true, message: '请选择认筹需预选' }],
221
+          })(<Select placeholder="预选方式" style={{ width: '300px' }} disabled={preSelectFlag ? false : true}>
196 222
             <Option value="false">否</Option>
197 223
             <Option value="true">是</Option>
198 224
           </Select>)}
199 225
         </Form.Item>
200
-        <Form.Item style={{marginTop:'20px'}} label="缴费方式" help="锁房方式为自动锁房,缴费方式仅支持线上缴费。锁房方式为手动锁房,缴费方式可多选,线上缴费使用微信支付,线下缴费客户可提交后去线下缴费。">
201
-          {getFieldDecorator('payType', {rules: [{ required: true, message: '请选择缴费方式' }],
202
-            initialValue: saleBatchData.payType === 'onLine'?'onLine':saleBatchData.payType === 'offLine'?"offLine":['offLine','onLine'] ,
226
+        <Form.Item style={{ marginTop: '20px' }} label="缴费方式" help="锁房方式为自动锁房,缴费方式仅支持线上缴费。锁房方式为手动锁房,缴费方式可多选,线上缴费使用微信支付,线下缴费客户可提交后去线下缴费。">
227
+          {getFieldDecorator('payType', {
228
+            rules: [{ required: true, message: '请选择缴费方式' }],
229
+            initialValue: saleBatchData.payType === 'onLine' ? 'onLine' : saleBatchData.payType === 'offLine' ? "offLine" : ['offLine', 'onLine'],
203 230
           })(
204 231
             <Checkbox.Group style={{ width: '100%' }}>
205
-            <Checkbox value="onLine" disabled={houseLockingType === 'onLine' || (saleBatchData.houseLockingType === 'auto') ?true:false}>线上缴费</Checkbox>
206
-            <Checkbox value="offLine" disabled={houseLockingType === 'onLine' || (saleBatchData.houseLockingType === 'auto')?true:false}>
207
-              线下缴费
232
+              <Checkbox value="onLine" disabled={houseLockingType === 'onLine' || (saleBatchData.houseLockingType === 'auto') ? true : false}>线上缴费</Checkbox>
233
+              <Checkbox value="offLine" disabled={houseLockingType === 'onLine' || (saleBatchData.houseLockingType === 'auto') ? true : false}>
234
+                线下缴费
208 235
             </Checkbox>
209 236
             </Checkbox.Group>,
210 237
           )}
211 238
         </Form.Item>
212
-        <Form.Item style={{marginTop:'20px'}} label="线上缴费说明">
213
-          {getFieldDecorator('payDescriptionOnline', {initialValue:saleBatchData.payDescriptionOnline})(<TextArea placeholder="向客户说明线上缴费相关业务需求" style={{height:'300px'}}></TextArea>)}
239
+        <Form.Item style={{ marginTop: '20px' }} label="线上缴费说明">
240
+          {getFieldDecorator('payDescriptionOnline', { initialValue: saleBatchData.payDescriptionOnline })(<TextArea placeholder="向客户说明线上缴费相关业务需求" style={{ height: '300px' }}></TextArea>)}
214 241
         </Form.Item>
215 242
         <Form.Item label="线下缴费说明">
216
-          {getFieldDecorator('payDescriptionOffline', {initialValue:saleBatchData.payDescriptionOffline})(<TextArea placeholder="填写线下缴费时间地点要求" style={{height:'300px'}}></TextArea>)}
243
+          {getFieldDecorator('payDescriptionOffline', { initialValue: saleBatchData.payDescriptionOffline })(<TextArea placeholder="填写线下缴费时间地点要求" style={{ height: '300px' }}></TextArea>)}
217 244
         </Form.Item>
218 245
         <Form.Item label="认筹单注意事项">
219
-          {getFieldDecorator('raisePrecautions', {initialValue:saleBatchData.raisePrecautions})(<Input maxLength={100} placeholder="客户提交认筹单后的注意事项"/>)}
246
+          {getFieldDecorator('raisePrecautions', { initialValue: saleBatchData.raisePrecautions })(<Input maxLength={100} placeholder="客户提交认筹单后的注意事项" />)}
220 247
         </Form.Item>
221 248
         <Form.Item label="选房协议" help="若想在协议中自动引用客户信息生成带客户信息的协议,请在选房协议中按如下格式引用:
222 249
                                          ${name}其中name代表客户姓名,
@@ -225,17 +252,35 @@ const Base = props => {
225 252
                                          ${date}其中date代表日期(如2020/03/10),
226 253
                                          举例,若想在协议中“乙方:”后显示当前客户姓名,在“乙方:”后输入${name}即可。
227 254
                                          注意,在提交认筹单后在认筹单详情中查看协议才能看到这些引用的具体信息,在认筹过程中,因阅读协议在填写个人信息之前,这些信息会为空白。">
228
-        {getFieldDecorator('payProtocol', {
255
+          {getFieldDecorator('payProtocol', {
229 256
             rules: [{ required: true, message: '请输入选房协议' }],
230
-          initialValue:saleBatchData.payProtocol})(<Wangedit />)}
257
+            initialValue: saleBatchData.payProtocol
258
+          })(<Wangedit />)}
259
+        </Form.Item>
260
+
261
+        <Form.Item label="是否为邀请制" help="若为邀请制,则需要填写哪些手机号的用户可以看到认筹,不在邀请范围内的用户无法认筹,若不为邀请制,则认筹发布后,小程序全部用户都可以进入认筹。">
262
+          {getFieldDecorator('invite', {
263
+            rules: [{ required: true, message: '请选择是否为邀请制' }],
264
+            initialValue: saleBatchData.invite === null ? 0: saleBatchData.invite
265
+          })(<Radio.Group onChange={changeInvite}>
266
+            <Radio value={1}>是</Radio>
267
+            <Radio value={0}>否</Radio>
268
+          </Radio.Group>)}
231 269
         </Form.Item>
270
+
271
+        <Form.Item label="被邀请人清单" style={{ display: isShowInviteTel }}>
272
+          {getFieldDecorator('inviteTel', { initialValue: saleBatchData.inviteTel })(<TextArea placeholder="填写被邀请人手机号,每个手机号换行即可,建议在txt文本中编辑好后复制粘贴进来" style={{ height: '300px' }}></TextArea>)}
273
+        </Form.Item>
274
+
232 275
         <Form.Item label="扫码查看房源列表">
233
-        {getFieldDecorator('qrCode', {
276
+          {getFieldDecorator('qrCode', {
234 277
             rules: [{ required: true, message: '请输入选房协议' }],
235
-          initialValue:saleBatchData.payProtocol})(<MiniQRCode targetId={saleBatchData.salesBatchId} page="onlineSelling/pages/houseList/index" />)}
278
+            initialValue: saleBatchData.payProtocol
279
+          })(<MiniQRCode targetId={saleBatchData.salesBatchId} page="onlineSelling/pages/houseList/index" />)}
236 280
         </Form.Item>
281
+
237 282
         <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
238
-          <Button type="primary" htmlType="submit"style={{marginRight:'20px'}}>
283
+          <Button type="primary" htmlType="submit" style={{ marginRight: '20px' }}>
239 284
             提交
240 285
           </Button>
241 286
           <Button onClick={() => router.go(-1)}>

+ 11
- 6
src/pages/swiper/index.jsx Целия файл

@@ -1,4 +1,5 @@
1
-import React, { useState, useRef, Alert } from "react";
1
+import React, { useState, useRef } from "react";
2
+import { Alert, message } from 'antd';
2 3
 import Swiper from 'swiper';
3 4
 import router from 'umi/router';
4 5
 import request from '../../utils/request'
@@ -77,13 +78,17 @@ class swiper extends React.Component {
77 78
         })
78 79
     }
79 80
     handleSwiperItem(item) {
80
-        const aTag = document.createElement('a')
81
+        if (item.targetId) {
82
+            const aTag = document.createElement('a')
81 83
 
82
-        aTag.setAttribute('href', `${window.location.origin}${window.location.pathname}#/h5SampleManager/h5Sample/detail?id=${item.targetId}`);
83
-        aTag.setAttribute('target', '_blank')
84
-        document.body.appendChild(aTag)
85
-        aTag.click();
84
+            aTag.setAttribute('href', `${window.location.origin}${window.location.pathname}#/h5SampleManager/h5Sample/detail?id=${item.targetId}`);
85
+            aTag.setAttribute('target', '_blank')
86
+            document.body.appendChild(aTag)
87
+            aTag.click();
88
+        } else {
89
+            message.warning('当前开屏通知不存在关联的H5样例');
86 90
 
91
+        }
87 92
     }
88 93
 
89 94
     closeSwiper() {

+ 1
- 1
src/pages/user/login/components/Login/index.jsx Целия файл

@@ -119,7 +119,7 @@ class Login extends Component {
119 119
             <p className={styles.welcome}>Welcome</p>
120 120
             <div className={styles.title}>
121 121
               <span style={{fontSize:' 0.106rem',lineHeight:' 0.106rem'}}>ying xiao yun</span>
122
-              <p className={styles.name}>营销云·系统</p>
122
+              <p className={styles.name}>橙蕉云·系统</p>
123 123
             </div>
124 124
           </div>
125 125
         </div>

+ 115
- 0
src/services/apis.js Целия файл

@@ -1466,4 +1466,119 @@ export default {
1466 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
+    updateTaContractBusinessById: {
1481
+      method: 'PUT',
1482
+      url: `${prefix}/taContractBusiness/:id`,
1483
+      action: 'admin.taContractBusiness.put',
1484
+    },
1485
+    batchDelTaContractBusiness: {
1486
+      method: 'PUT',
1487
+      url: `${prefix}/batchDelBusinessConfig`,
1488
+      action: 'admin.taContractBusiness.del',
1489
+    },
1490
+    taCompanyList: {
1491
+      method: 'GET',
1492
+      url: `${prefix}/taCompanyList`,
1493
+      action: 'admin.taCompanyList.get',
1494
+    },
1495
+    taCompanySealList: {
1496
+      method: 'GET',
1497
+      url: `${prefix}/taCompanySeal`,
1498
+      action: 'admin.taCompanySeal.get',
1499
+    },
1500
+    taContractTemplateById: {
1501
+      method: 'GET',
1502
+      url: `${prefix}/taContractTemplate/:id`,
1503
+      action: 'admin.taContractTemplate.get',
1504
+    },
1505
+    taContractBusinessById: {
1506
+      method: 'GET',
1507
+      url: `${prefix}/taContractBusiness/:id`,
1508
+      action: 'admin.taContractBusiness.get',
1509
+    },
1510
+    taContractTemplateList: {
1511
+      method: 'GET',
1512
+      url: `${prefix}/taContractTemplate`,
1513
+      action: 'admin.listContractTemplate.get',
1514
+    },
1515
+    listContractTemplate: {
1516
+      method: 'GET',
1517
+      url: `${prefix}/taContractTemplate`,
1518
+      action: 'admin.listContractTemplate.get',
1519
+    },
1520
+    addContractTemplate: {
1521
+      method: 'post',
1522
+      url: `${prefix}/contract/template/add`,
1523
+      action: 'admin.addContractTemplate.post',
1524
+    },
1525
+    batchDeleteContractTemplate: {
1526
+      method: 'put',
1527
+      url: `${prefix}/contract/template/batchDelete`,
1528
+      action: 'admin.batchDeleteContractTemplate.put',
1529
+    },
1530
+    updateContractTemplate: {
1531
+      method: 'put',
1532
+      url: `${prefix}/contract/template/update/:id`,
1533
+      action: 'admin.updateContractTemplate.put',
1534
+    },
1535
+    getContractTemplate: {
1536
+      method: 'get',
1537
+      url: `${prefix}/taContractTemplate/:id`,
1538
+      action: 'admin.getContractTemplate.get',
1539
+    },
1540
+    listContractTemplate: {
1541
+      method: 'GET',
1542
+      url: `${prefix}/taContractTemplate`,
1543
+      action: 'admin.listContractTemplate.get',
1544
+    },
1545
+    addContractTemplate: {
1546
+      method: 'post',
1547
+      url: `${prefix}/contract/template/add`,
1548
+      action: 'admin.addContractTemplate.post',
1549
+    },
1550
+    batchDeleteContractTemplate: {
1551
+      method: 'put',
1552
+      url: `${prefix}/contract/template/batchDelete`,
1553
+      action: 'admin.batchDeleteContractTemplate.put',
1554
+    },
1555
+    updateContractTemplate: {
1556
+      method: 'put',
1557
+      url: `${prefix}/contract/template/update/:id`,
1558
+      action: 'admin.updateContractTemplate.put',
1559
+    },
1560
+    getContractTemplate: {
1561
+      method: 'get',
1562
+      url: `${prefix}/taContractTemplate/:id`,
1563
+      action: 'admin.getContractTemplate.get',
1564
+    },
1565
+   
1566
+  },
1567
+  manage: {
1568
+    list: {
1569
+      method: 'GET',
1570
+      url: `${prefix}/contract/list`,
1571
+      action: 'admin.contract.list.get',
1572
+    },
1573
+    detail: {
1574
+      method: 'GET',
1575
+      url: `${prefix}/contract/:id`,
1576
+      action: 'admin.contract.id.get',
1577
+    },
1578
+    archives: {
1579
+      method: 'PUT',
1580
+      url: `${prefix}/contract/:id`,
1581
+      action: 'admin.contract.id.put',
1582
+    },
1583
+  },
1469 1584
 }