顾绍勇 преди 5 години
родител
ревизия
b1c929bd7e
променени са 4 файла, в които са добавени 222 реда и са изтрити 144 реда
  1. 1
    1
      src/pages/eContract/template/add.jsx
  2. 2
    1
      src/pages/eContract/template/detail.jsx
  3. 97
    65
      src/pages/house/raise/add/index.jsx
  4. 122
    77
      src/pages/house/raise/edit/components/base.jsx

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

@@ -90,7 +90,7 @@ const header = props => {
90 90
         { required: true, message: '请选择合同文件' },
91 91
       ],
92 92
       render: <div><Upload {...uploaderProps}><Button disabled={flag}>{uploadTip}</Button></Upload></div>,
93
-      help: <span>仅支持pdf格式,合同必须按规则生成,否则无法正确签章。未按规则生成合同导致的问题,橙蕉免除相关责任。详细要求查看<a href='https://easydoc.xyz/s/24703398/3SqDkJDw/odnmIIwl' style={{ color: '#66B3FF' }} target='_blank'>合同模板制作要求</a></span>
93
+      help: <span>仅支持pdf格式,合同必须按规则生成,否则无法正确签章。未按规则生成合同导致的问题,橙蕉免除相关责任。详细要求查看<a href='https://easydoc.xyz/s/24703398/3SqDkJDw/odnmIIwl' style={{ color: '#66B3FF' }} target='_blank'>合同模板制作要求</a></span>
94 94
     },
95 95
 
96 96
   ]

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

@@ -33,7 +33,8 @@ const header = props => {
33 33
           <span>{data.contractTemplateName}</span>
34 34
         </Form.Item>
35 35
         <Form.Item label="合同文件">
36
-          <div><a href={data.contractTemplateAddress} target='_blank' style={{ color: '#66B3FF', fontSize: '14px' }}>点击链接查看内容</a></div>
36
+          <div><a href={data.contractTemplateAddress} target='_blank' style={{ color: '#66B3FF', fontSize: '14px' }}>
37
+            查看文件</a></div>
37 38
         </Form.Item>
38 39
         <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
39 40
           <div style={{ margin: '0.16rem 0 0.06rem' }}>

+ 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)}>