Sfoglia il codice sorgente

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

张延森 5 anni fa
parent
commit
b24abd5b75

+ 2
- 2
config/config.js Vedi File

@@ -83,8 +83,8 @@ export default {
83 83
   targets: {
84 84
     ie: 11,
85 85
   },
86
-  // publicPath: './',
87
-  publicPath: 'https://njcjweb.oss-accelerate.aliyuncs.com/',
86
+  publicPath: './',
87
+  // publicPath: 'https://njcjweb.oss-accelerate.aliyuncs.com/admin/',
88 88
   history: 'hash',
89 89
   devtool: isAntDesignProPreview ? 'source-map' : false,
90 90
   // umi routes: https://umijs.org/zh/guide/router.html

+ 2
- 2
src/components/SelectButton/BuildSelect.jsx Vedi File

@@ -29,8 +29,8 @@ const BuildingSelect = props => {
29 29
 
30 30
   const getBuildList = e => {
31 31
     request({ ...apis.building.buildingSelect, params: { pageNum: 1, pageSize: 999 } }).then(data => {
32
-        setData(data.records)
33
-        checkValue(data.records)
32
+        setData(data)
33
+        checkValue(data)
34 34
         // 默认选中第一个
35 35
     })
36 36
   }

+ 1
- 1
src/pages/activity/editActivity.jsx Vedi File

@@ -396,7 +396,7 @@ const Edit = props => {
396 396
         }).catch((err) => {
397 397
           message.info(err.msg || err.message)
398 398
         })
399
-      }, [])
399
+      }, [dynamicId])
400 400
     }
401 401
 
402 402
     const submitShare = () => {

+ 9
- 4
src/pages/customer/customerlist/index.jsx Vedi File

@@ -58,6 +58,8 @@ function body(props) {
58 58
 
59 59
   const [assistVisibleData, setAssistVisibleData] = useState({visible: false, customerId: ''})
60 60
 
61
+  const [loadingStatus, setLoadingStatus] = useState(false)
62
+
61 63
   // eslint-disable-next-line react-hooks/rules-of-hooks
62 64
   useEffect(() => {
63 65
     getList({ pageNumber: 1, pageSize: 10, customerType })
@@ -192,12 +194,15 @@ function body(props) {
192 194
   }
193 195
 
194 196
   function exportCustomer () {
197
+    setLoadingStatus(true)
195 198
     const fieldsValue = getFieldsValue()
196 199
     request({ ...apis.customer.customerRecommendExport, responseType: 'blob', params: { ...fieldsValue, customerType } })
197 200
       .then(response => {
198 201
         download(response)
202
+        setLoadingStatus(false)
199 203
       }).catch(error => {
200
-
204
+        message.err("连接超时");
205
+        setLoadingStatus(false)
201 206
       })
202 207
   }
203 208
 
@@ -459,11 +464,11 @@ function body(props) {
459 464
             </Button>
460 465
         </Form.Item>
461 466
       </Form>
462
-      {/* <AuthButton name="admin.customer.import" noRight={null}>
463
-        <Button type="primary" onClick={() => exportCustomer()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
467
+      <AuthButton name="admin.customer.import" noRight={null}>
468
+        <Button type="primary" loading={loadingStatus} onClick={() => exportCustomer()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
464 469
           导出
465 470
         </Button>
466
-      </AuthButton> */}
471
+      </AuthButton>
467 472
 
468 473
       <div style={{ margin: '20px 0'}}>
469 474
           <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">

+ 19
- 14
src/pages/house/add/HouseBatchAdd.jsx Vedi File

@@ -66,6 +66,10 @@ function handleCancel(){
66 66
 }
67 67
 
68 68
 function batchSaveHouse() {
69
+  if(null == uploadFile){
70
+    message.error('请先上传房源数据,再提交')
71
+    return
72
+  }
69 73
   const uploadData = new FormData()
70 74
   uploadData.append('file', uploadFile)
71 75
   uploadData.append('salesBatchId', props.location.query.salesBatchId)
@@ -129,20 +133,21 @@ const columns = [
129 133
   },
130 134
 ]
131 135
 
132
-  return (
133
-    <>
134
-      <span>1.导入房源先下载模板--></span><a href="https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1581597350487-房源模板.xlsx" download="房源模板.xlsx"><Button type="primary" htmlType="submit">下载模板</Button></a><br/>
135
-      <span>2.使用excel打开模板文件,编辑房源数据并保存</span><br/>
136
-      <span>3.将编辑好的文件上传--></span><Upload {...uploaderProps}><Button type="primary" htmlType="submit">上传</Button></Upload><br/>
137
-      <span>4.检查导入的数据是否正常 ↓,不正常则重新编辑保存再次上传,请仔细阅读模板中的编辑规则</span>
138
-      <Table dataSource={data.list} columns={columns} pagination={{ total: data.total}}  rowKey="House" />
139
-      
140
-      <span>5.全部正常请点击提交</span>
141
-      <Button type="primary" onClick={() => batchSaveHouse()}>提交</Button>
142
-      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
143
-      <span>暂时未确定房源?  --></span><Button onClick={() => handleCancel()}>以后处理</Button>
144
-    </>
145
-  )
136
+
137
+return (
138
+  <>
139
+    <div style={{ marginBottom: '30px' }} ><span>1.导入房源先下载模板--></span><a href="http://njcj.oss-cn-shanghai.aliyuncs.com/%E6%88%BF%E6%BA%90%E6%A8%A1%E6%9D%BF.xlsx" download="房源模板.xlsx"><Button type="primary" htmlType="submit">下载模板</Button></a></div>
140
+    <div style={{ marginBottom: '30px' }}>2.使用excel打开模板文件,编辑房源数据并保存</div>
141
+    <div style={{ marginBottom: '30px' }}><span>3.将编辑好的文件上传--></span><Upload {...uploaderProps}><Button type="primary" htmlType="submit">上传</Button></Upload></div>
142
+    <span>4.检查导入的数据是否正常 ↓,不正常则重新编辑保存再次上传,请仔细阅读模板中的编辑规则</span>
143
+    <Table dataSource={data.list} columns={columns} pagination={{ total: data.total }} style={{ marginTop: '20px' }} rowKey="House" />
144
+
145
+    <div style={{ marginTop: '30px' }}>5.全部正常请点击提交</div>
146
+    <Button type="primary" onClick={() => batchSaveHouse()}>提交</Button>
147
+    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
148
+    <span>暂时未确定房源?  --></span><Button onClick={() => handleCancel()}>以后处理</Button>
149
+  </>
150
+)
146 151
 }
147 152
 const WrappedHouseBatchAdd = Form.create({ name: 'house_batch' })(HouseBatchAdd);
148 153
 export default WrappedHouseBatchAdd

+ 6
- 0
src/pages/house/add/index.jsx Vedi File

@@ -11,6 +11,7 @@ import ImageUpload from '../../../components/XForm/ImageUpload'
11 11
 import apis from '../../../services/apis';
12 12
 import request from '../../../utils/request';
13 13
 import AuthButton from '@/components/AuthButton';
14
+import SaleBatchHelpDoc from '../edit/components/SalesBatchHelpDoc';
14 15
 
15 16
 const { Option } = Select;
16 17
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
@@ -22,6 +23,7 @@ const header = props => {
22 23
   const { salesBatchId } = props.location.query
23 24
   console.log(salesBatchId)
24 25
   const [ saleBatchData, setSaleBatchData ] = useState({})
26
+  const [showHelp, setShowHelp] = useState(false)
25 27
   if(salesBatchId){
26 28
     useEffect(() => {
27 29
       getSaleBatchData(salesBatchId);
@@ -119,6 +121,9 @@ const header = props => {
119 121
                 <ImageUpload />,
120 122
               )}
121 123
         </Form.Item>  
124
+        <Form.Item label="说明信息">
125
+          <Icon type="question-circle" theme="filled" style={{ fontSize: '18px', color: '#F00' }} onClick={() => setShowHelp(true)} />
126
+        </Form.Item> 
122 127
         <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
123 128
           <Button type="primary" htmlType="submit"style={{marginRight:'20px'}}>
124 129
             下一步
@@ -128,6 +133,7 @@ const header = props => {
128 133
           </Button>
129 134
         </Form.Item>
130 135
       </Form>
136
+      <SaleBatchHelpDoc visible={showHelp} onCancel={() => setShowHelp(false)} />
131 137
     </>
132 138
   )
133 139
 }

+ 18
- 14
src/pages/house/edit/components/HouseBatch.jsx Vedi File

@@ -60,6 +60,10 @@ function handleCancel(){
60 60
 }
61 61
 
62 62
 function batchSaveHouse() {
63
+  if(null == uploadFile){
64
+    message.error('请先上传房源数据,再提交')
65
+    return
66
+  }
63 67
   const uploadData = new FormData()
64 68
   uploadData.append('file', uploadFile)
65 69
   uploadData.append('salesBatchId', props.salesBatchId)
@@ -117,20 +121,20 @@ const columns = [
117 121
   },
118 122
 ]
119 123
 
120
-  return (
121
-    <>
122
-      <span>1.导入房源先下载模板--></span><a href="https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1581597350487-房源模板.xlsx" download="房源模板.xlsx"><Button type="primary" htmlType="submit">下载模板</Button></a><br/>
123
-      <span>2.使用excel打开模板文件,编辑房源数据并保存</span><br/>
124
-      <span>3.将编辑好的文件上传--></span><Upload {...uploaderProps}><Button type="primary" htmlType="submit">上传</Button></Upload><br/>
125
-      <span>4.检查导入的数据是否正常 ↓,不正常则重新编辑保存再次上传,请仔细阅读模板中的编辑规则</span>
126
-      <Table dataSource={data.list} columns={columns} pagination={{ total: data.total}}  rowKey="House" />
127
-      
128
-      <span>5.全部正常请点击提交</span>
129
-      <Button type="primary" onClick={() => batchSaveHouse()}>提交</Button>
130
-      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
131
-      <Button onClick={() => handleCancel()}>取消</Button>
132
-    </>
133
-  )
124
+return (
125
+  <>
126
+    <div style={{ marginBottom: '30px' }} ><span>1.导入房源先下载模板--></span><a href="http://njcj.oss-cn-shanghai.aliyuncs.com/%E6%88%BF%E6%BA%90%E6%A8%A1%E6%9D%BF.xlsx" download="房源模板.xlsx"><Button type="primary" htmlType="submit">下载模板</Button></a></div>
127
+    <div style={{ marginBottom: '30px' }}>2.使用excel打开模板文件,编辑房源数据并保存</div>
128
+    <div style={{ marginBottom: '30px' }}><span>3.将编辑好的文件上传--></span><Upload {...uploaderProps}><Button type="primary" htmlType="submit">上传</Button></Upload></div>
129
+    <span>4.检查导入的数据是否正常 ↓,不正常则重新编辑保存再次上传,请仔细阅读模板中的编辑规则</span>
130
+    <Table dataSource={data.list} columns={columns} pagination={{ total: data.total }} style={{ marginTop: '20px' }} rowKey="House" />
131
+
132
+    <div style={{ marginTop: '30px' }}>5.全部正常请点击提交</div>
133
+    <Button type="primary" onClick={() => batchSaveHouse()}>提交</Button>
134
+    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
135
+    <Button onClick={() => handleCancel()}>取消</Button>
136
+  </>
137
+)
134 138
 }
135 139
 const WrappedHouseBatch = Form.create({ name: 'house_batch' })(HouseBatch);
136 140
 export default WrappedHouseBatch

+ 29
- 0
src/pages/house/edit/components/SalesBatchHelpDoc/index.jsx Vedi File

@@ -0,0 +1,29 @@
1
+import React, { PureComponent } from 'react'
2
+import { Modal, Row, Col } from 'antd'
3
+import EnDash from '../EnDash'
4
+
5
+import Style from './style.less'
6
+import HotBlock from '../HotBlock'
7
+
8
+
9
+export default function SaleBatchHelpDoc(props) {
10
+  return (
11
+    <Modal footer={null} title="相关说明" visible={props.visible} onCancel={props.onCancel} width={800}>
12
+      <div className={Style.article}>
13
+        <div className={Style.section}>
14
+          <div>
15
+            1.楼盘多次开盘加推等销售行为,记录为多个“销售批次”,每个批次销售当前楼盘的一批不同房源。同一楼盘不同批次中房源不能重叠,即1套房不能卖2次。<br/><br/>
16
+            2.销售楼盘下拉仅显示上架楼盘。未上架楼盘若想发布销售批次请先在楼盘列表中将楼盘上架。<br/><br/>
17
+            3.销售批次和房源均发布后,用户在小程序端可以查看并“预选”或“认筹”房源,设置“预选开始时间”和“预选结束时间"可以限制用户预选,超出时间范围禁止用户预选,设置"认筹开始时间"和"认筹结束时间"可以限制用户认筹,超出时间范围禁止用户认筹。<br/><br/>
18
+            4."认筹需预选"若为"是",则代表不可只认筹不预选,在执行认筹操作时会提示未预选用户请先预选。如果此时已超出预选期则无法预选,自然也无法认筹。如果此时仍然在预选期则可以预选后再认筹。"认筹需预选"若为"否",则代表可以不经过预选环节直接认筹。通过配置修改预选时间、认筹时间和认筹是否需预选,可以在销售过程中控制销售行为。<br/><br/>
19
+            5."认筹需缴费"若为"是",则代表在认筹过程中需要缴费(交认筹金/订金)才能最终认筹成功。"认筹需缴费"若为"否",则代表认筹不需要含缴费流程,执行完其他流程即可认筹成功。<br/><br/>
20
+            6.若"认筹需缴费"设置为"是",则需要再设置"缴费方式",目前支持2种缴费方式,"线上微信支付"和"线下付款上传凭据",可以多选,2种支付方式在缴费成功后都需要财务审核,审核不通过需要退费。<br/><br/>
21
+            7.认筹金额支持2位小数,整数部分最大8位数。<br/><br/>
22
+            8.发布状态为否,则在小程序端楼盘详情页面看不到当前销售批次入口。发布状态为是,则用户可以点击入口进入房源列表查看房源进行预选或认筹操作。<br/><br/>
23
+            </div>
24
+        </div>
25
+        
26
+      </div>
27
+    </Modal>
28
+  );
29
+}

+ 36
- 0
src/pages/house/edit/components/SalesBatchHelpDoc/style.less Vedi File

@@ -0,0 +1,36 @@
1
+.article {
2
+    .section {
3
+        font-size: 16px;
4
+        line-height: 1.8em;
5
+        color: #666;
6
+
7
+        & + .section {
8
+            margin-top: 24px;
9
+        }
10
+    }
11
+
12
+    .title {
13
+        font-size: 18px;
14
+        line-height: 2em;
15
+        color: #333;
16
+    }
17
+
18
+    .subtitle {
19
+        font-size: 14px;
20
+        line-height: 1.6em;
21
+        color: #999;
22
+    }
23
+
24
+    .flex {
25
+        display: flex;
26
+        flex-wrap: wrap;
27
+
28
+        .flex-item {
29
+            margin-top: 16px;
30
+            margin-right: 8px;
31
+            flex: none;
32
+            width: 100px;
33
+            text-align: center;
34
+        }
35
+    }
36
+}

+ 23
- 7
src/pages/house/edit/components/base.jsx Vedi File

@@ -8,15 +8,16 @@ import XForm, { FieldTypes } from '../../../../components/XForm';
8 8
 import apis from '../../../../services/apis';
9 9
 import BuildSelect from '../../../../components/SelectButton/BuildSelect';
10 10
 import request from '../../../../utils/request';
11
-
11
+import SalesBatchHelpDoc from './SalesBatchHelpDoc';
12 12
 
13 13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14 14
 const { TextArea } = Input;
15 15
 
16 16
 const Base = props => {
17
-  const { salesBatchId } = props.salesBatchId
18
-  console.log(salesBatchId)
17
+  const salesBatchId = props.salesBatchId.batchId
19 18
   const [ saleBatchData, setSaleBatchData ] = useState({})
19
+  const [showHelp, setShowHelp] = useState(false)
20
+  
20 21
   if(salesBatchId){
21 22
     useEffect(() => {
22 23
       getSaleBatchData(salesBatchId);
@@ -91,7 +92,8 @@ const Base = props => {
91 92
       label: '预选时间',
92 93
       name: 'preSelectTime',
93 94
       type: FieldTypes.RangePicker,
94
-      value: saleBatchData.preselectionStartTime != null ? [moment(saleBatchData.preselectionStartTime, 'YYYY-MM-DD HH:mm'), moment(saleBatchData.preselectionEndTime, 'YYYY-MM-DD HH:mm')] : null,
95
+      props: {showTime : 'HH:mm:ss' },
96
+      value: saleBatchData.preselectionStartTime != null ? [moment(saleBatchData.preselectionStartTime, 'YYYY-MM-DD HH:mm:ss'), moment(saleBatchData.preselectionEndTime, 'YYYY-MM-DD HH:mm:ss')] : null,
95 97
       rules: [
96 98
         { required: true, message: '请选择预选时间' },
97 99
       ],
@@ -109,6 +111,18 @@ const Base = props => {
109 111
         },
110 112
       ],
111 113
     },
114
+    {
115
+      label: '扫码查看房源列表',
116
+      name: 'qrCode',
117
+      type: FieldTypes.ImageUploader,
118
+      value: saleBatchData.qrCode,
119
+    },
120
+    {
121
+      label: '说明',
122
+      name: 'buildingId',
123
+      render: <Icon type="question-circle" theme="filled" style={{ fontSize: '18px', color: '#F00' }} onClick={() => setShowHelp(true)} />,
124
+      value: saleBatchData.buildingId,
125
+    },
112 126
   ]
113 127
   
114 128
     const handleSubmit = values => { 
@@ -129,10 +143,12 @@ const Base = props => {
129 143
         message.info(err.msg || err.message)
130 144
       })
131 145
     }
132
-     
133
-
146
+    
134 147
   return (
135
-    <XForm onSubmit={handleSubmit} onCancel={cancelPage} fields={fields}></XForm>
148
+    <>
149
+      <XForm onSubmit={handleSubmit} onCancel={cancelPage} fields={fields}></XForm>
150
+      <SalesBatchHelpDoc visible={showHelp} onCancel={() => setShowHelp(false)} />
151
+    </>
136 152
   );
137 153
 }
138 154
 

+ 11
- 10
src/pages/house/edit/components/house.jsx Vedi File

@@ -10,6 +10,7 @@ import UnitSelect from '../../../../components/HouseSelect/UnitSelect'
10 10
 import FloorSelect from '../../../../components/HouseSelect/FloorSelect'
11 11
 import RoomSelect from '../../../../components/HouseSelect/RoomSelect'
12 12
 import ApartmentSelect from '../../../../components/HouseSelect/ApartmentSelect';
13
+import styles from '../../../style/GoodsList.less';
13 14
 
14 15
 /**
15 16
  *图片设置
@@ -95,7 +96,7 @@ function House(props) {
95 96
     // model提交事件
96 97
     const handleSubmitApartMent = e => {
97 98
       props.form.validateFields((err, values) => {
98
-        if (!err) {
99
+        // if (!err) {
99 100
           if(!values.apartmentIdSelected){
100 101
             openNotificationWithIcon('error', '请选择户型')
101 102
             return
@@ -107,7 +108,7 @@ function House(props) {
107 108
           }).catch(err => {
108 109
             openNotificationWithIcon('error', err.message)
109 110
           })
110
-        }
111
+        // }
111 112
       });
112 113
     }
113 114
   /**
@@ -117,8 +118,8 @@ function House(props) {
117 118
    */
118 119
   function deleteHouseResource(record) {
119 120
     Modal.confirm({
120
-      title: '确认删除当前数据?',
121
-      content: '确定后成功删除,点击取消则放弃当前操作',
121
+      title: '确定将所选房删除?',
122
+      content: '如果只是不想让用户看到房源,请修改发布状态为否,删除房源会导致大量关联数据异常。若房源有预选记录或认筹记录则无法删除,请先删除预选记录。',
122 123
       okText: '确定',
123 124
       cancelText: '取消',
124 125
       onOk() {
@@ -204,8 +205,8 @@ function House(props) {
204 205
       key: 'apartmentId',
205 206
       render: (_, record) => (
206 207
         <>
207
-          <Button type="link" style={{ color: 'red' }} onClick={() => showEdi({type: "add",houseId: record.houseId})}>编辑</Button>
208
-          <Button type="link" style={{ color: 'red' }} onClick={() => deleteHouseResource(record)}>删除</Button>
208
+          <Button type="link" style={{ color: 'red' }} onClick={() => showEdi({type: "add",houseId: record.houseId})}>编辑<Icon type="form" className={styles.edit} /></Button>
209
+          <Button type="link" style={{ color: 'red' }} onClick={() => deleteHouseResource(record)}>删除<Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} /></Button>
209 210
         </>
210 211
       ),
211 212
     },
@@ -231,12 +232,12 @@ function House(props) {
231 232
         </Form.Item>
232 233
         <Form.Item>
233 234
           {getFieldDecorator('floorName')(
234
-            <Input placeholder="请输入层"/>
235
+            <Input placeholder="请输入层"/>
235 236
           )}
236 237
         </Form.Item>
237 238
         <Form.Item>
238 239
           {getFieldDecorator('roomName')(
239
-             <Input placeholder="请输入房号"/>
240
+             <Input placeholder="请输入房号"/>
240 241
           )}
241 242
         </Form.Item>
242 243
         <Form.Item>
@@ -266,11 +267,11 @@ function House(props) {
266 267
             </Button>
267 268
         </Form.Item>
268 269
       </Form>
269
-      <Button type="primary" onClick={() => showEdi({type: "add",houseId: ''})}>新增房源</Button>
270
+      <Button type="primary" onClick={() => showEdi({type: "add",houseId: ''})} style={{ marginTop: '20px'}}>新增房源</Button>
270 271
       <Button type="primary" onClick={() => showEdi({type: "batch"})} style={{ marginLeft: '18px'}}>批量导入房源</Button>
271 272
       <Button type="primary" onClick={() => showAparement()} style={{ marginLeft: '18px'}}>批量修改对应户型</Button>
272 273
       <Button type="danger" style={{ marginLeft: '18px'}} onClick={() => router.go(-1)}>返回</Button>
273
-      <Table rowSelection={rowSelection} dataSource={data.records} columns={columns} pagination={{ total: data.total, onChange: e => changePageNum(e) }} rowKey="House" />
274
+      <Table rowSelection={rowSelection} dataSource={data.records} columns={columns} pagination={{ total: data.total, onChange: e => changePageNum(e) }} style={{ marginTop: '20px'}} rowKey="House" />
274 275
       <Modal
275 276
             title="批量修改对应户型"
276 277
             width={400}

+ 32
- 12
src/pages/house/edit/components/houseAdd.jsx Vedi File

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload, InputNumber } from 'antd';
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import moment from 'moment';
5 5
 import router from 'umi/router';
@@ -70,16 +70,30 @@ function HouseAdd(props) {
70 70
     props.onSuccess({type: "house"})
71 71
   }
72 72
 
73
+  const limitDecimals = (value) => {
74
+    const reg = /^(\-)*(\d+)\.(\d\d).*$/;
75
+    console.log(value);
76
+    if(typeof value === 'string') {
77
+        return !isNaN(Number(value)) ? value.replace(reg, '$1$2.$3') : ''
78
+    } else if (typeof value === 'number') {
79
+        return !isNaN(value) ? String(value).replace(reg, '$1$2.$3') : ''
80
+    } else {
81
+        return ''
82
+    }
83
+};
84
+
85
+
73 86
   const { getFieldDecorator } = props.form;
74 87
   return (
75 88
     <>
76 89
       <Form {...formItemLayout} onSubmit={handleSubmit}>
77
-      <Form.Item label="期" >
90
+      <Form.Item label="期/区" >
78 91
         {getFieldDecorator('termName', {
79 92
           rules: [
80 93
             {
81 94
               required: true,
82
-              message: '请输入楼栋',
95
+              message: '请输入期/区,且最多六个字',
96
+              max: 6,
83 97
             },
84 98
           ],
85 99
         })(<Input disabled={houseId && houseId !== '' ? true : false}/>)}
@@ -89,7 +103,8 @@ function HouseAdd(props) {
89 103
           rules: [
90 104
             {
91 105
               required: true,
92
-              message: '请输入楼栋',
106
+              message: '请输入楼栋,且最多六个字',
107
+              max: 6,
93 108
             },
94 109
           ],
95 110
         })(<Input disabled={houseId && houseId !== '' ? true : false}/>)}
@@ -99,7 +114,8 @@ function HouseAdd(props) {
99 114
           rules: [
100 115
             {
101 116
               required: true,
102
-              message: '请输入单元',
117
+              message: '请输入单元,且最多六个字',
118
+              max: 6,
103 119
             },
104 120
           ],
105 121
         })(<Input disabled={houseId && houseId !== '' ? true : false}/>)}
@@ -110,6 +126,7 @@ function HouseAdd(props) {
110 126
             {
111 127
               required: true,
112 128
               message: '请输入楼层',
129
+              max: 6,
113 130
             },
114 131
           ],
115 132
         })(<Input disabled={houseId && houseId !== '' ? true : false}/>)}
@@ -119,7 +136,8 @@ function HouseAdd(props) {
119 136
           rules: [
120 137
             {
121 138
               required: true,
122
-              message: '请输入房号',
139
+              message: '请输入房号,且最多六个字',
140
+              max: 6,
123 141
             },
124 142
           ],
125 143
         })(<Input/> )}
@@ -127,27 +145,29 @@ function HouseAdd(props) {
127 145
             校验房源
128 146
           </Button>
129 147
         </Form.Item>
130
-        <Form.Item label="价格" help="单位:万元">
148
+        <Form.Item label="价格" >
131 149
         {getFieldDecorator('price', {
132 150
           rules: [
133 151
             {
134 152
               required: true,
135
-              message: '请输入价格',
153
+              message: '请输入价格,只能是数字和小数点且最多8位',
154
+              pattern: new RegExp('^[0-9]{1,5}([.][0-9]{1,2})?$'),
136 155
             },
137 156
           ],
138
-        })(<Input type="Number"/>)}
157
+        })(<div><Input/><span>万元</span></div>)}
139 158
         </Form.Item>
140 159
         <Form.Item label="预选基础热度">
141 160
         {getFieldDecorator('heat', {
142 161
           rules: [
143 162
             {
144 163
               required: true,
145
-              message: '请输入楼栋',
164
+              message: '请输入预选基础热度,只能是数字',
165
+              pattern: new RegExp('^[0-9]*$'),
146 166
             },
147 167
           ],
148
-        })(<Input/>)}
168
+        })(<Input placeholder="填写基础预选热度,建议为0"/>)}
149 169
         </Form.Item>
150
-        <Form.Item label="户型">
170
+        <Form.Item label="户型" help="户型不存在时,请到楼盘详情中查看是否存在户型,不存在时请新增户型。">
151 171
         {getFieldDecorator('apartmentId')(<ApartmentSelect buildingId={props.buildingId} />)}
152 172
         </Form.Item>
153 173
         <Form.Item label="发布状态">

+ 9
- 9
src/pages/house/edit/components/poster.jsx Vedi File

@@ -25,7 +25,7 @@ const Poster = props => {
25 25
   const [posterId, setPosterId] = useState('')
26 26
 
27 27
   const [building, setBuilding] = useState({ buildingImg: [{ url: '' }] })
28
-  const { salesBatchId } = props.salesBatchId
28
+  const salesBatchId = props.salesBatchId.batchId
29 29
   if (salesBatchId) {
30 30
     // eslint-disable-next-line react-hooks/rules-of-hooks
31 31
     useEffect(() => {
@@ -111,7 +111,7 @@ const Poster = props => {
111 111
               building.buildingTag && building.buildingTag.map(item => <span>{item.tagName}</span>)
112 112
             }
113 113
           </p>
114
-          <p style={{
114
+          {/* <p style={{
115 115
             margin: '10px 20px', fontSize: '20px', color: '#222', fontWeight: '600',
116 116
             display: '-webkit-box', lineClamp: '3', height: '36px', lineHeight: '36px',
117 117
             WebkitLineClamp: '1',
@@ -128,7 +128,7 @@ const Poster = props => {
128 128
             WebkitBoxOrient: 'vertical',
129 129
             overflow: 'hidden',
130 130
             textOverflow: 'ellipsis',
131
-          }}>{textAreaValue || '海报描述'}</p>
131
+          }}>{textAreaValue || '海报描述'}</p> */}
132 132
           <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc',position:'relative' }}>
133 133
             <p style={{margin:'0',fontSize:'18px',color:'#888'}}>长按识别小程序码</p>
134 134
             <p style={{margin:'0',fontSize:'18px',color:'#888'}}>进入<span style={{margin:'0 5px',fontSize:'18px',color:'#333',fontWeight:'600'}}>{miniappName||'置业V顾问'}</span>报名活动</p>
@@ -139,18 +139,18 @@ const Poster = props => {
139 139
       </div>
140 140
       <div >
141 141
         <div style={{ display: 'flex', width: '100%', margin: '30px 0' }}>
142
-          <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}><span style={{ color: 'red' }}>*</span> 楼盘海报图</p>
142
+          <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}><span style={{ color: 'red' }}>*</span> 海报图</p>
143 143
           <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
144 144
         </div>
145
-        <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px'}}>建议图片尺寸:750*600px,比例5:4,格式:jpg,用于楼盘海报</p>
145
+        <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px'}}>建议尺寸:640*960px,比例2::3,格式:jpg,文件小于300KB,用于:吸引用户在线选房</p>
146 146
         <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
147
-          <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
148
-          <Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />
147
+          {/* <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
148
+          <Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} /> */}
149 149
         </div>
150
-        <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
150
+        {/* <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
151 151
           <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报描述</p>
152 152
           <TextArea rows={5} maxLength={1024} value={textAreaValue} onChange={e => changeTextArea(e.target.value)} />
153
-        </div>
153
+        </div> */}
154 154
 
155 155
       </div>
156 156
     </div>

+ 1
- 1
src/pages/house/edit/components/preselectionRecord.jsx Vedi File

@@ -20,7 +20,7 @@ import ApartmentSelect from '../../../../components/HouseSelect/ApartmentSelect'
20 20
 function PreselectionRecord(props) {
21 21
   // eslint-disable-next-line react-hooks/rules-of-hooks
22 22
   const [data, setData] = useState([])
23
-  const {salesBatchId} = props.salesBatchId
23
+  const salesBatchId = props.salesBatchId.batchId
24 24
   console.log(salesBatchId,'updateNameupdateNameupdateName');
25 25
   useEffect(() => {
26 26
     getList()

+ 6
- 4
src/pages/house/edit/components/share.jsx Vedi File

@@ -19,7 +19,7 @@ const Share = props => {
19 19
   const [inputValue, changeInput] = useState('')
20 20
   const [imgValue, changeImg] = useState('')
21 21
   const [shareContentId, setShareContentId] = useState('')
22
-  const { salesBatchId } = props.salesBatchId
22
+  const salesBatchId = props.salesBatchId.batchId
23 23
   if (salesBatchId) {
24 24
     // eslint-disable-next-line react-hooks/rules-of-hooks
25 25
     useEffect(() => {
@@ -31,6 +31,8 @@ const Share = props => {
31 31
           setShareContentId(data[0].shareContentId)
32 32
           changeImg(data[0].shareContentImg)
33 33
           changeInput(data[0].shareContentTitle)
34
+        }else{
35
+          changeInput("诚挚邀您在线选房购房~");
34 36
         }
35 37
       }).catch(err => {
36 38
         message.info(err.msg || err.message)
@@ -92,13 +94,13 @@ const Share = props => {
92 94
     </div>
93 95
     <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
94 96
       <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享标题</p>
95
-      <Input placeholder="请输入分享标题" value={inputValue} onChange={e => changeInput(e.target.value)} />
97
+      <Input placeholder="请输入分享标题" value={inputValue}  onChange={e => changeInput(e.target.value)} />
96 98
     </div>
97 99
     <div style={{ display: 'flex', width: '100%', marginTop: '40px' }}>
98
-      <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>楼盘分享图</p>
100
+      <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享图</p>
99 101
       <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
100 102
     </div>
101
-    <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginTop: '20px' }}>建议图片尺寸:750*600px,比例5:4,格式:jpg,用于楼盘分享好友</p>
103
+    <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginTop: '20px' }}>建议尺寸:750*600px,比例5:4,格式:jpg</p>
102 104
     <Button type="primary" htmlType="submit" onClick={submitShare} style={{ margin: '40px 40px 40px 220px' }}> 确定</Button>
103 105
     <Button onClick={() => router.go(-1)}>取消</Button>
104 106
   </div>

+ 1
- 1
src/pages/house/edit/components/shareRecord.jsx Vedi File

@@ -15,7 +15,7 @@ const { TextArea } = Input;
15 15
 const header = (props) => {
16 16
   const [ data, setData ] = useState({})
17 17
   const [page, changePage] = useState({})
18
-  const {salesBatchId} = props.salesBatchId
18
+  const salesBatchId = props.salesBatchId.batchId
19 19
 
20 20
   useEffect(() => {
21 21
     getList({ pageNum: 1, pageSize: 10, salesBatchId : salesBatchId});

+ 1
- 1
src/pages/house/edit/components/visitRecord.jsx Vedi File

@@ -15,7 +15,7 @@ const { TextArea } = Input;
15 15
 const header = (props) => {
16 16
   const [ data, setData ] = useState({})
17 17
   // const [page, changePage] = useState({})
18
-  const {salesBatchId} = props.salesBatchId
18
+  const salesBatchId = props.salesBatchId.batchId
19 19
 
20 20
   useEffect(() => {
21 21
     getList({ pageNum: 1, pageSize: 10, salesBatchId : salesBatchId});

+ 4
- 0
src/pages/house/list/index.jsx Vedi File

@@ -9,6 +9,7 @@ import BuildSelect from '../../../components/SelectButton/BuildSelect'
9 9
 import apis from '../../../services/apis';
10 10
 import request from '../../../utils/request';
11 11
 import AuthButton from '@/components/AuthButton';
12
+import SaleBatchHelpDoc from '../edit/components/SalesBatchHelpDoc';
12 13
 
13 14
 const { Option } = Select;
14 15
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
@@ -19,6 +20,7 @@ const header = props => {
19 20
   //   const [page, changePage] = useState({})
20 21
   const [houseIdList, setHouseIdList] = useState([])
21 22
   const [time, setTime] = useState('')
23
+  const [showHelp, setShowHelp] = useState(false)
22 24
 
23 25
   // 查询列表
24 26
   const getList = params => {
@@ -234,11 +236,13 @@ const header = props => {
234 236
       <AuthButton name="admin.salesBatch.del" noRight={null}>
235 237
         <Button type="primary" className={styles.addBtn} onClick={toDelBatch()} style={{marginLeft:'30px'}}>删除</Button>
236 238
       </AuthButton>
239
+      <Icon type="question-circle" theme="filled" style={{ fontSize: '25px', color: '#F00', marginLeft:'30px'}} onClick={() => setShowHelp(true)} />
237 240
       <Table rowSelection={rowSelection}
238 241
        dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
239 242
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
240 243
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current}/>
241 244
       </div>
245
+      <SaleBatchHelpDoc visible={showHelp} onCancel={() => setShowHelp(false)} />
242 246
     </>
243 247
   )
244 248
 }

+ 3
- 3
src/pages/record/share/countList.jsx Vedi File

@@ -17,7 +17,7 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
17 17
 
18 18
 function record(props) {
19 19
   const { getFieldDecorator } = props.form
20
-
20
+  
21 21
   // 获取初始化数据
22 22
   const [ data, setData ] = useState({})
23 23
 
@@ -138,8 +138,8 @@ function record(props) {
138 138
           </Form.Item>
139 139
           <Form.Item>
140 140
             <span style={{marginRight:'10px'}}>分享时间:</span>
141
-                {getFieldDecorator('shareTime')(
142
-                  <RangePicker placeholder={['开始时间','结束时间']}/>
141
+                {getFieldDecorator('shareTime',{initialValue : [moment(),moment()],})(
142
+                  <RangePicker placeholder={['开始时间','结束时间']} />
143 143
                 )}
144 144
           </Form.Item>
145 145
           <Form.Item style={{position:'absolute',right:'38px'}}>

+ 1
- 1
src/pages/staff/list/editStaff.jsx Vedi File

@@ -55,7 +55,7 @@ const Edit = (props) => {
55 55
   //获取项目列表
56 56
   const getBuildList = e => {
57 57
     request({ ...apis.building.buildingSelect, params: { pageNum: 1, pageSize: 999 } }).then(data => {
58
-        setBuildData(data.records)
58
+        setBuildData(data)
59 59
     })
60 60
   }
61 61
 

+ 1
- 1
src/pages/system/document/audit.jsx Vedi File

@@ -26,7 +26,7 @@ const noauditPass = {
26 26
 function body (props) {
27 27
   const documentVerifyId = props.location.query.id
28 28
   const [data, setData] = useState([])
29
-  const [datas, setDatas] = useState({})
29
+  const [datas, setDatas] = useState({size: 0})
30 30
   // const [status,setStatus] = useState()
31 31
   useEffect(() => {
32 32
     getList()