Browse Source

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

张延森 5 years ago
parent
commit
b24abd5b75

+ 2
- 2
config/config.js View File

83
   targets: {
83
   targets: {
84
     ie: 11,
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
   history: 'hash',
88
   history: 'hash',
89
   devtool: isAntDesignProPreview ? 'source-map' : false,
89
   devtool: isAntDesignProPreview ? 'source-map' : false,
90
   // umi routes: https://umijs.org/zh/guide/router.html
90
   // umi routes: https://umijs.org/zh/guide/router.html

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

29
 
29
 
30
   const getBuildList = e => {
30
   const getBuildList = e => {
31
     request({ ...apis.building.buildingSelect, params: { pageNum: 1, pageSize: 999 } }).then(data => {
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 View File

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

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

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

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

66
 }
66
 }
67
 
67
 
68
 function batchSaveHouse() {
68
 function batchSaveHouse() {
69
+  if(null == uploadFile){
70
+    message.error('请先上传房源数据,再提交')
71
+    return
72
+  }
69
   const uploadData = new FormData()
73
   const uploadData = new FormData()
70
   uploadData.append('file', uploadFile)
74
   uploadData.append('file', uploadFile)
71
   uploadData.append('salesBatchId', props.location.query.salesBatchId)
75
   uploadData.append('salesBatchId', props.location.query.salesBatchId)
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
 const WrappedHouseBatchAdd = Form.create({ name: 'house_batch' })(HouseBatchAdd);
152
 const WrappedHouseBatchAdd = Form.create({ name: 'house_batch' })(HouseBatchAdd);
148
 export default WrappedHouseBatchAdd
153
 export default WrappedHouseBatchAdd

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

11
 import apis from '../../../services/apis';
11
 import apis from '../../../services/apis';
12
 import request from '../../../utils/request';
12
 import request from '../../../utils/request';
13
 import AuthButton from '@/components/AuthButton';
13
 import AuthButton from '@/components/AuthButton';
14
+import SaleBatchHelpDoc from '../edit/components/SalesBatchHelpDoc';
14
 
15
 
15
 const { Option } = Select;
16
 const { Option } = Select;
16
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
17
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
22
   const { salesBatchId } = props.location.query
23
   const { salesBatchId } = props.location.query
23
   console.log(salesBatchId)
24
   console.log(salesBatchId)
24
   const [ saleBatchData, setSaleBatchData ] = useState({})
25
   const [ saleBatchData, setSaleBatchData ] = useState({})
26
+  const [showHelp, setShowHelp] = useState(false)
25
   if(salesBatchId){
27
   if(salesBatchId){
26
     useEffect(() => {
28
     useEffect(() => {
27
       getSaleBatchData(salesBatchId);
29
       getSaleBatchData(salesBatchId);
119
                 <ImageUpload />,
121
                 <ImageUpload />,
120
               )}
122
               )}
121
         </Form.Item>  
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
         <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
127
         <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
123
           <Button type="primary" htmlType="submit"style={{marginRight:'20px'}}>
128
           <Button type="primary" htmlType="submit"style={{marginRight:'20px'}}>
124
             下一步
129
             下一步
128
           </Button>
133
           </Button>
129
         </Form.Item>
134
         </Form.Item>
130
       </Form>
135
       </Form>
136
+      <SaleBatchHelpDoc visible={showHelp} onCancel={() => setShowHelp(false)} />
131
     </>
137
     </>
132
   )
138
   )
133
 }
139
 }

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

60
 }
60
 }
61
 
61
 
62
 function batchSaveHouse() {
62
 function batchSaveHouse() {
63
+  if(null == uploadFile){
64
+    message.error('请先上传房源数据,再提交')
65
+    return
66
+  }
63
   const uploadData = new FormData()
67
   const uploadData = new FormData()
64
   uploadData.append('file', uploadFile)
68
   uploadData.append('file', uploadFile)
65
   uploadData.append('salesBatchId', props.salesBatchId)
69
   uploadData.append('salesBatchId', props.salesBatchId)
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
 const WrappedHouseBatch = Form.create({ name: 'house_batch' })(HouseBatch);
139
 const WrappedHouseBatch = Form.create({ name: 'house_batch' })(HouseBatch);
136
 export default WrappedHouseBatch
140
 export default WrappedHouseBatch

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

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 View File

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 View File

8
 import apis from '../../../../services/apis';
8
 import apis from '../../../../services/apis';
9
 import BuildSelect from '../../../../components/SelectButton/BuildSelect';
9
 import BuildSelect from '../../../../components/SelectButton/BuildSelect';
10
 import request from '../../../../utils/request';
10
 import request from '../../../../utils/request';
11
-
11
+import SalesBatchHelpDoc from './SalesBatchHelpDoc';
12
 
12
 
13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
 const { TextArea } = Input;
14
 const { TextArea } = Input;
15
 
15
 
16
 const Base = props => {
16
 const Base = props => {
17
-  const { salesBatchId } = props.salesBatchId
18
-  console.log(salesBatchId)
17
+  const salesBatchId = props.salesBatchId.batchId
19
   const [ saleBatchData, setSaleBatchData ] = useState({})
18
   const [ saleBatchData, setSaleBatchData ] = useState({})
19
+  const [showHelp, setShowHelp] = useState(false)
20
+  
20
   if(salesBatchId){
21
   if(salesBatchId){
21
     useEffect(() => {
22
     useEffect(() => {
22
       getSaleBatchData(salesBatchId);
23
       getSaleBatchData(salesBatchId);
91
       label: '预选时间',
92
       label: '预选时间',
92
       name: 'preSelectTime',
93
       name: 'preSelectTime',
93
       type: FieldTypes.RangePicker,
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
       rules: [
97
       rules: [
96
         { required: true, message: '请选择预选时间' },
98
         { required: true, message: '请选择预选时间' },
97
       ],
99
       ],
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
     const handleSubmit = values => { 
128
     const handleSubmit = values => { 
129
         message.info(err.msg || err.message)
143
         message.info(err.msg || err.message)
130
       })
144
       })
131
     }
145
     }
132
-     
133
-
146
+    
134
   return (
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 View File

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

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

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

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

25
   const [posterId, setPosterId] = useState('')
25
   const [posterId, setPosterId] = useState('')
26
 
26
 
27
   const [building, setBuilding] = useState({ buildingImg: [{ url: '' }] })
27
   const [building, setBuilding] = useState({ buildingImg: [{ url: '' }] })
28
-  const { salesBatchId } = props.salesBatchId
28
+  const salesBatchId = props.salesBatchId.batchId
29
   if (salesBatchId) {
29
   if (salesBatchId) {
30
     // eslint-disable-next-line react-hooks/rules-of-hooks
30
     // eslint-disable-next-line react-hooks/rules-of-hooks
31
     useEffect(() => {
31
     useEffect(() => {
111
               building.buildingTag && building.buildingTag.map(item => <span>{item.tagName}</span>)
111
               building.buildingTag && building.buildingTag.map(item => <span>{item.tagName}</span>)
112
             }
112
             }
113
           </p>
113
           </p>
114
-          <p style={{
114
+          {/* <p style={{
115
             margin: '10px 20px', fontSize: '20px', color: '#222', fontWeight: '600',
115
             margin: '10px 20px', fontSize: '20px', color: '#222', fontWeight: '600',
116
             display: '-webkit-box', lineClamp: '3', height: '36px', lineHeight: '36px',
116
             display: '-webkit-box', lineClamp: '3', height: '36px', lineHeight: '36px',
117
             WebkitLineClamp: '1',
117
             WebkitLineClamp: '1',
128
             WebkitBoxOrient: 'vertical',
128
             WebkitBoxOrient: 'vertical',
129
             overflow: 'hidden',
129
             overflow: 'hidden',
130
             textOverflow: 'ellipsis',
130
             textOverflow: 'ellipsis',
131
-          }}>{textAreaValue || '海报描述'}</p>
131
+          }}>{textAreaValue || '海报描述'}</p> */}
132
           <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc',position:'relative' }}>
132
           <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc',position:'relative' }}>
133
             <p style={{margin:'0',fontSize:'18px',color:'#888'}}>长按识别小程序码</p>
133
             <p style={{margin:'0',fontSize:'18px',color:'#888'}}>长按识别小程序码</p>
134
             <p style={{margin:'0',fontSize:'18px',color:'#888'}}>进入<span style={{margin:'0 5px',fontSize:'18px',color:'#333',fontWeight:'600'}}>{miniappName||'置业V顾问'}</span>报名活动</p>
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
       </div>
139
       </div>
140
       <div >
140
       <div >
141
         <div style={{ display: 'flex', width: '100%', margin: '30px 0' }}>
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
           <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
143
           <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
144
         </div>
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
         <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
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
         </div>
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
           <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报描述</p>
151
           <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报描述</p>
152
           <TextArea rows={5} maxLength={1024} value={textAreaValue} onChange={e => changeTextArea(e.target.value)} />
152
           <TextArea rows={5} maxLength={1024} value={textAreaValue} onChange={e => changeTextArea(e.target.value)} />
153
-        </div>
153
+        </div> */}
154
 
154
 
155
       </div>
155
       </div>
156
     </div>
156
     </div>

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

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

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

19
   const [inputValue, changeInput] = useState('')
19
   const [inputValue, changeInput] = useState('')
20
   const [imgValue, changeImg] = useState('')
20
   const [imgValue, changeImg] = useState('')
21
   const [shareContentId, setShareContentId] = useState('')
21
   const [shareContentId, setShareContentId] = useState('')
22
-  const { salesBatchId } = props.salesBatchId
22
+  const salesBatchId = props.salesBatchId.batchId
23
   if (salesBatchId) {
23
   if (salesBatchId) {
24
     // eslint-disable-next-line react-hooks/rules-of-hooks
24
     // eslint-disable-next-line react-hooks/rules-of-hooks
25
     useEffect(() => {
25
     useEffect(() => {
31
           setShareContentId(data[0].shareContentId)
31
           setShareContentId(data[0].shareContentId)
32
           changeImg(data[0].shareContentImg)
32
           changeImg(data[0].shareContentImg)
33
           changeInput(data[0].shareContentTitle)
33
           changeInput(data[0].shareContentTitle)
34
+        }else{
35
+          changeInput("诚挚邀您在线选房购房~");
34
         }
36
         }
35
       }).catch(err => {
37
       }).catch(err => {
36
         message.info(err.msg || err.message)
38
         message.info(err.msg || err.message)
92
     </div>
94
     </div>
93
     <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
95
     <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
94
       <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享标题</p>
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
     </div>
98
     </div>
97
     <div style={{ display: 'flex', width: '100%', marginTop: '40px' }}>
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
       <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
101
       <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
100
     </div>
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
     <Button type="primary" htmlType="submit" onClick={submitShare} style={{ margin: '40px 40px 40px 220px' }}> 确定</Button>
104
     <Button type="primary" htmlType="submit" onClick={submitShare} style={{ margin: '40px 40px 40px 220px' }}> 确定</Button>
103
     <Button onClick={() => router.go(-1)}>取消</Button>
105
     <Button onClick={() => router.go(-1)}>取消</Button>
104
   </div>
106
   </div>

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

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

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

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

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

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

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

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

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

55
   //获取项目列表
55
   //获取项目列表
56
   const getBuildList = e => {
56
   const getBuildList = e => {
57
     request({ ...apis.building.buildingSelect, params: { pageNum: 1, pageSize: 999 } }).then(data => {
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 View File

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