Ver código fonte

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

魏超 5 anos atrás
pai
commit
020b498102

+ 1
- 1
src/pages/building/list/add/components/amap.jsx Ver arquivo

@@ -81,7 +81,7 @@ class Amap extends React.Component {
81 81
   render() {
82 82
     const { value } = this.props
83 83
     if (value) {
84
-      this.markerInstance.setPosition(value.split(','))
84
+     // this.markerInstance.setPosition(value.split(','))
85 85
     }
86 86
 
87 87
     return (

+ 39
- 39
src/pages/building/list/add/components/base.jsx Ver arquivo

@@ -98,28 +98,28 @@ function AddBuilding(props) {
98 98
 
99 99
   return (
100 100
         <Form {...formItemLayout} onSubmit={handleSubmit}>
101
-          <Form.Item label="项目Id" hasFeedback style={{ display: 'none' }}>
101
+          <Form.Item label="项目Id"  style={{ display: 'none' }}>
102 102
             {getFieldDecorator('buildingId')(<Input disabled />)}
103 103
           </Form.Item>
104
-          <Form.Item label="楼盘编号" hasFeedback>
104
+          <Form.Item label="楼盘编号" >
105 105
             {getFieldDecorator('code')(<Input />)}
106 106
           </Form.Item>
107
-          <Form.Item label="楼盘名称" hasFeedback>
107
+          <Form.Item label="楼盘名称" >
108 108
             {getFieldDecorator('buildingName')(<Input />)}
109 109
           </Form.Item>
110
-          <Form.Item label="别名" hasFeedback>
110
+          <Form.Item label="别名" >
111 111
             {getFieldDecorator('name')(<Input />)}
112 112
           </Form.Item>
113 113
           <Form.Item label="项目类型">
114 114
             {getFieldDecorator('buildingProjectType')(<BudildingProjectType />)}
115 115
           </Form.Item>
116
-          <Form.Item label="均价" hasFeedback>
116
+          <Form.Item label="均价" >
117 117
             {getFieldDecorator('price')(<Input type="number" style={{ width: '210px' }}/>)}m²/元
118 118
           </Form.Item>
119
-          <Form.Item label="开盘时间"  hasFeedback>
119
+          <Form.Item label="开盘时间"  >
120 120
             {getFieldDecorator('openingDate')(<DatePicker format="YYYY/MM/DD" />)}
121 121
           </Form.Item>
122
-          <Form.Item label="电话" hasFeedback>
122
+          <Form.Item label="电话" >
123 123
             {getFieldDecorator('tel', {
124 124
               initialValue: '',
125 125
               rules: [
@@ -130,10 +130,10 @@ function AddBuilding(props) {
130 130
               ],
131 131
             })(<Input />)}
132 132
           </Form.Item>
133
-          <Form.Item label="项目动态" hasFeedback>
133
+          <Form.Item label="项目动态" >
134 134
             {getFieldDecorator('dynamic')(<Input />)}
135 135
           </Form.Item>
136
-          <Form.Item label="物业类型" hasFeedback>
136
+          <Form.Item label="物业类型" >
137 137
             {getFieldDecorator('propertyType')(
138 138
               // <Select mode="multiple" placeholder="物业类型" style={{ width: '1016px' }}>
139 139
               //   <Option value="未知">未知</Option>
@@ -141,7 +141,7 @@ function AddBuilding(props) {
141 141
               <Input />,
142 142
             )}
143 143
           </Form.Item>
144
-          <Form.Item label="销售状态" hasFeedback>
144
+          <Form.Item label="销售状态" >
145 145
             {getFieldDecorator('marketStatus')(
146 146
               <Select placeholder="销售状态" style={{ width: '1016px' }}>
147 147
                 <Option value="待定">待定</Option>
@@ -150,35 +150,35 @@ function AddBuilding(props) {
150 150
               </Select>,
151 151
             )}
152 152
           </Form.Item>
153
-          <Form.Item label="项目标签" hasFeedback>
153
+          <Form.Item label="项目标签" >
154 154
             {getFieldDecorator('tag')(
155 155
               <Select mode="tags" placeholder="输入后选中" style={{ width: '1016px' }}>
156 156
                 
157 157
               </Select>,
158 158
             )}
159 159
           </Form.Item>
160
-          <Form.Item label="项目主图" hasFeedback>
160
+          <Form.Item label="项目主图" >
161 161
             {getFieldDecorator('avatarImage')(
162 162
               <ImageListUpload />,
163 163
             )}
164 164
           </Form.Item>
165
-          <Form.Item label="地址图片" hasFeedback>
165
+          <Form.Item label="地址图片" >
166 166
             {getFieldDecorator('mapImg')(
167 167
               <ImageUpload />,
168 168
             )}
169 169
           </Form.Item>
170
-          <Form.Item label="海报底图" hasFeedback>
170
+          <Form.Item label="海报底图" >
171 171
             {getFieldDecorator('poster')(
172 172
               <ImageUpload />,
173 173
             )}
174 174
           </Form.Item>
175
-          <Form.Item label="排序" hasFeedback>
175
+          <Form.Item label="排序" >
176 176
             {getFieldDecorator('orderNo')(<Input />)}
177 177
           </Form.Item>
178
-          <Form.Item label="优惠信息" hasFeedback>
178
+          <Form.Item label="优惠信息" >
179 179
             {getFieldDecorator('discount')(<Input />)}
180 180
           </Form.Item>
181
-          <Form.Item label="首页推荐" hasFeedback>
181
+          <Form.Item label="首页推荐" >
182 182
             {getFieldDecorator('isMain')(
183 183
             <Radio.Group>
184 184
               <Radio value={1}>是</Radio>
@@ -186,86 +186,86 @@ function AddBuilding(props) {
186 186
             </Radio.Group>,
187 187
             )}
188 188
           </Form.Item>
189
-          <Form.Item label="所在城市" hasFeedback>
189
+          <Form.Item label="所在城市" >
190 190
             {getFieldDecorator('cityId')(
191 191
               <SelectCity />,
192 192
             )}
193 193
           </Form.Item>
194
-          <Form.Item label="楼盘区域" hasFeedback>
194
+          <Form.Item label="楼盘区域" >
195 195
             {getFieldDecorator('buildingArea')(<Input />)}
196 196
           </Form.Item>
197
-          <Form.Item label="项目地址" hasFeedback>
197
+          <Form.Item label="项目地址" >
198 198
             {getFieldDecorator('address')(<Input />)}
199 199
           </Form.Item>
200
-          <Form.Item label="项目坐标" hasFeedback>
200
+          <Form.Item label="项目坐标" >
201 201
             {getFieldDecorator('coordinate')(<Input disabled />)}
202 202
           </Form.Item>
203
-          <Form.Item label="地图位置" hasFeedback>
203
+          <Form.Item label="地图位置" >
204 204
             {getFieldDecorator('coordinate')(<Amap />)}
205 205
           </Form.Item>
206
-          <Form.Item label="周边交通" hasFeedback>
206
+          <Form.Item label="周边交通" >
207 207
             {getFieldDecorator('buildingTransport')(
208 208
               <TagGroup />,
209 209
             )}
210 210
           </Form.Item>
211
-          <Form.Item label="周边商业" hasFeedback>
211
+          <Form.Item label="周边商业" >
212 212
             {getFieldDecorator('buildingMall')(
213 213
               <TagGroup />,
214 214
             )}
215 215
           </Form.Item>
216
-          <Form.Item label="周边学校" hasFeedback>
216
+          <Form.Item label="周边学校" >
217 217
             {getFieldDecorator('buildingEdu')(
218 218
               <TagGroup />,
219 219
             )}
220 220
           </Form.Item>
221
-          <Form.Item label="周边医院" hasFeedback>
221
+          <Form.Item label="周边医院" >
222 222
             {getFieldDecorator('buildingHospital')(
223 223
               <TagGroup />,
224 224
             )}
225 225
           </Form.Item>
226
-          <Form.Item label="周边银行" hasFeedback>
226
+          <Form.Item label="周边银行" >
227 227
             {getFieldDecorator('buildingBank')(
228 228
               <TagGroup />,
229 229
             )}
230 230
           </Form.Item>
231
-          <Form.Item label="周边餐饮" hasFeedback>
231
+          <Form.Item label="周边餐饮" >
232 232
             {getFieldDecorator('buildingRestaurant')(
233 233
               <TagGroup />,
234 234
             )}
235 235
           </Form.Item>
236
-          <Form.Item label="绿化率" hasFeedback>
236
+          <Form.Item label="绿化率" >
237 237
             {getFieldDecorator('greeningRate')(<Input />)}
238 238
           </Form.Item>
239
-          <Form.Item label="容积率" hasFeedback>
239
+          <Form.Item label="容积率" >
240 240
             {getFieldDecorator('volumeRate')(<Input />)}
241 241
           </Form.Item>
242
-          <Form.Item label="车位比" hasFeedback>
242
+          <Form.Item label="车位比" >
243 243
             {getFieldDecorator('parkingRate')(<Input />)}
244 244
           </Form.Item>
245
-          <Form.Item label="规划户数" hasFeedback>
245
+          <Form.Item label="规划户数" >
246 246
             {getFieldDecorator('familyNum')(<InputNumber />)}
247 247
           </Form.Item>
248
-          <Form.Item label="物业公司" hasFeedback>
248
+          <Form.Item label="物业公司" >
249 249
             {getFieldDecorator('serviceCompany')(<Input />)}
250 250
           </Form.Item>
251
-          <Form.Item label="物业费" hasFeedback>
251
+          <Form.Item label="物业费" >
252 252
             {getFieldDecorator('serviceFee')(<Input />)}
253 253
           </Form.Item>
254
-          <Form.Item label="装修标准" hasFeedback>
254
+          <Form.Item label="装修标准" >
255 255
             {getFieldDecorator('decoration')(<Input />)}
256 256
           </Form.Item>
257
-          <Form.Item label="交房时间" hasFeedback>
257
+          <Form.Item label="交房时间" >
258 258
             {getFieldDecorator('receivedDate')(<DatePicker />)}
259 259
           </Form.Item>
260
-          <Form.Item label="产权年限" hasFeedback>
260
+          <Form.Item label="产权年限" >
261 261
             {getFieldDecorator('rightsYear')(<InputNumber />)}
262 262
           </Form.Item>
263
-          <Form.Item label="预售许可证" hasFeedback>
263
+          <Form.Item label="预售许可证" >
264 264
             {getFieldDecorator('preSalePermit')(
265 265
               <ImageUpload />,
266 266
             )}
267 267
           </Form.Item>
268
-          <Form.Item label="项目备注" hasFeedback>
268
+          <Form.Item label="项目备注" >
269 269
             {getFieldDecorator('remark')(
270 270
               <Wangedit />,
271 271
             )}

+ 64
- 56
src/pages/customer/report/index.jsx Ver arquivo

@@ -67,21 +67,21 @@ function body(props) {
67 67
   // 分页
68 68
   function onChange(pageNum) {
69 69
     // eslint-disable-next-line react-hooks/rules-of-hooks
70
-      getList({ pageNumber: pageNum, pageSize: 9 })
70
+    getList({ pageNumber: pageNum, pageSize: 9 })
71 71
   }
72 72
 
73
- /**
74
-   * 重置搜索
75
-   */
73
+  /**
74
+    * 重置搜索
75
+    */
76 76
   function handleReset() {
77 77
     props.form.resetFields();
78 78
   }
79 79
 
80 80
   function exportReport() {
81 81
     request({ ...apis.customer.customerRecommendReportExport, responseType: 'blob' })
82
-    .then(response => {
83
-      download(response)
84
-    })
82
+      .then(response => {
83
+        download(response)
84
+      })
85 85
   }
86 86
 
87 87
   function download(data) {
@@ -119,7 +119,7 @@ function body(props) {
119 119
       dataIndex: 'sex',
120 120
       key: 'sex',
121 121
       // eslint-disable-next-line no-nested-ternary
122
-      render: (_, record) => <><span>{ record.sex === 1 ? '男' : record.sex === 2 ? '女' : '未知' }</span></>,
122
+      render: (_, record) => <><span>{record.sex === 1 ? '男' : record.sex === 2 ? '女' : '未知'}</span></>,
123 123
     },
124 124
     {
125 125
       title: '意向项目',
@@ -140,59 +140,67 @@ function body(props) {
140 140
 
141 141
   return (
142 142
     <>
143
-      <Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{display:'flex'}}>
144
-        <Form.Item>
145
-          {getFieldDecorator('name')(
146
-            <Input
147
-              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
148
-              placeholder="姓名"
149
-            />,
150
-          )}
151
-        </Form.Item>
152
-        <Form.Item>
153
-          {getFieldDecorator('tel')(
154
-            <Input
155
-              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
156
-              placeholder="电话"
157
-            />,
158
-          )}
159
-        </Form.Item>
160
-        <Form.Item>
161
-          {getFieldDecorator('consultName')(
162
-            <Input placeholder="置业顾问" />,
163
-          )}
164
-        </Form.Item>
165
-        <Form.Item>
166
-          {getFieldDecorator('consultTel')(
167
-            <Input placeholder="置业顾问电话" />,
168
-          )}
169
-        </Form.Item>
170
-        <Form.Item>
171
-          {getFieldDecorator('sex')(
172
-            <Select style={{ width: '180px' }} placeholder="性别" onChange={handleSelectChange}>
173
-              <Option value="1">男</Option>
174
-              <Option value="0">女</Option>
175
-            </Select>,
176
-          )}
177
-        </Form.Item>
178
-        <Form.Item>
179
-          {getFieldDecorator('buildingId')(
180
-            <BuildSelect />,
181
-          )}
182
-        </Form.Item>
183
-        <Form.Item style={{ position:'absolute',right:'38px' }}>
184
-            <Button type="primary" htmlType="submit">
185
-              搜索
143
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)} >
144
+        <Row>
145
+          <Col span={21}>
146
+            <Form.Item>
147
+              {getFieldDecorator('name')(
148
+                <Input
149
+                  prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
150
+                  placeholder="姓名"
151
+                />,
152
+              )}
153
+            </Form.Item>
154
+            <Form.Item>
155
+              {getFieldDecorator('tel')(
156
+                <Input
157
+                  prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
158
+                  placeholder="电话"
159
+                />,
160
+              )}
161
+            </Form.Item>
162
+            <Form.Item>
163
+              {getFieldDecorator('consultName')(
164
+                <Input placeholder="置业顾问" />,
165
+              )}
166
+            </Form.Item>
167
+            <Form.Item>
168
+              {getFieldDecorator('consultTel')(
169
+                <Input placeholder="置业顾问电话" />,
170
+              )}
171
+            </Form.Item>
172
+            <Form.Item>
173
+              {getFieldDecorator('sex')(
174
+                <Select style={{ width: '180px' }} placeholder="性别" onChange={handleSelectChange}>
175
+                  <Option value="1">男</Option>
176
+                  <Option value="0">女</Option>
177
+                </Select>,
178
+              )}
179
+            </Form.Item>
180
+            <Form.Item>
181
+              {getFieldDecorator('buildingId')(
182
+                <BuildSelect />,
183
+              )}
184
+            </Form.Item>
185
+          </Col>
186
+          <div style={{minWidth:'150px',position: 'absolute', right: '-12px', }}>
187
+            <Form.Item >
188
+              <Button type="primary" htmlType="submit">
189
+                搜索
186 190
             </Button>
187
-            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
188
-              重置
191
+              <Button style={{ marginLeft: 8 }} onClick={handleReset}>
192
+                重置
189 193
             </Button>
190
-        </Form.Item>
194
+            </Form.Item>
195
+          </div>
196
+        </Row>
197
+        <div >
198
+        </div>
191 199
       </Form>
192
-      <Button type="primary" onClick={() => exportReport()} style={{ float:'right',margin:'20px 0' }}>
200
+      <Button type="primary" onClick={() => exportReport()} style={{ float: 'right', margin: '20px 0' }}>
193 201
         导出
194 202
       </Button>
195
-      <Table rowKey="report" style={{marginTop:'40px'}} dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
203
+      <Table rowKey="report" style={{ marginTop: '40px' }} dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
196 204
     </>
197 205
   );
198 206
 }

+ 1
- 2
src/pages/staff/list/StaffList.jsx Ver arquivo

@@ -65,9 +65,8 @@ const CartBody = (props) => {
65 65
 
66 66
     <Card className={Styles.card}>
67 67
       <div>
68
-
69 68
         <Avatar src={data.avatar} style={{ width: '0.48rem', height: '0.48rem' }} />
70
-        <Button type="link" style={{ marginLeft: '0.04rem', color: '#FF925C', fontSize: '0.11rem' }} onClick={toEditStaff(data.userId)}>
69
+        <Button type="link" style={{color: '#FF925C', fontSize: '0.11rem',position: 'absolute', top: '40px', left: '0.56rem' }} onClick={toEditStaff(data.userId)}>
71 70
           编辑
72 71
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '0.04rem' }} />
73 72
         </Button>

+ 33
- 33
src/pages/staff/list/editStaff.jsx Ver arquivo

@@ -29,13 +29,13 @@ const Edit = (props) => {
29 29
   const [roleData, setRoleData] = useState([])
30 30
 
31 31
   const getTagList = () => {
32
-    request({ ...apis.staff.taTags, params: {pageNum:1,pageSize:999} }).then((data) => {
32
+    request({ ...apis.staff.taTags, params: { pageNum: 1, pageSize: 999 } }).then((data) => {
33 33
       setTagData(data.records)
34 34
     })
35 35
   }
36 36
 
37 37
   const getRoleList = () => {
38
-    request({ ...apis.role.getRoleList, params: {pageNum:1,pageSize:999} }).then((data) => {
38
+    request({ ...apis.role.getRoleList, params: { pageNum: 1, pageSize: 999 } }).then((data) => {
39 39
       console.log(data)
40 40
       setRoleData(data.records)
41 41
     })
@@ -43,8 +43,8 @@ const Edit = (props) => {
43 43
 
44 44
   // 查询列表
45 45
   const getUserData = (userId) => {
46
-    request({ ...apis.staff.getTaUser, urlData: {id:userId} }).then((data) => {
47
-      console.log(data,"tauser")
46
+    request({ ...apis.staff.getTaUser, urlData: { id: userId } }).then((data) => {
47
+      console.log(data, "tauser")
48 48
       setUserData(data)
49 49
     })
50 50
   }
@@ -62,17 +62,17 @@ const Edit = (props) => {
62 62
   }
63 63
 
64 64
   const handleSubmit = val => {
65
-    if(userId){
66
-      request({ ...apis.staff.updateTaUser, urlData: {id:userId},data: val, }).then((data) => {
67
-        console.log(data,"tauser")
65
+    if (userId) {
66
+      request({ ...apis.staff.updateTaUser, urlData: { id: userId }, data: val, }).then((data) => {
67
+        console.log(data, "tauser")
68 68
         message.info("保存成功")
69 69
         router.go(-1)
70 70
       }).catch(error => {
71 71
         // message.info(error.message)
72 72
       })
73
-    }else{
73
+    } else {
74 74
       request({ ...apis.staff.addTaUser, data: val, }).then((data) => {
75
-        console.log(data,"tauser")
75
+        console.log(data, "tauser")
76 76
         message.info("保存成功")
77 77
         router.go(-1)
78 78
       }).catch(error => {
@@ -126,32 +126,32 @@ const Edit = (props) => {
126 126
       label: '角色',
127 127
       name: 'roleIds',
128 128
       render: <Select
129
-                mode="multiple"
130
-                style={{ width: '100%' }}
131
-                placeholder="请选择标签"
132
-                onChange={tagsChange} >
133
-                  {roleData.map(item => (
134
-                    <Select.Option key={item.roleId} value={item.roleId}>
135
-                      {item.roleName}
136
-                    </Select.Option>
137
-                  ))}
138
-              </Select>,
129
+        mode="multiple"
130
+        style={{ width: '100%' }}
131
+        placeholder="请选择标签"
132
+        onChange={tagsChange} >
133
+        {roleData.map(item => (
134
+          <Select.Option key={item.roleId} value={item.roleId}>
135
+            {item.roleName}
136
+          </Select.Option>
137
+        ))}
138
+      </Select>,
139 139
       value: userData.roleIds,
140 140
     },
141 141
     {
142 142
       label: '标签',
143 143
       name: 'taTags',
144 144
       render: <Select
145
-                mode="multiple"
146
-                style={{ width: '100%' }}
147
-                placeholder="请选择标签"
148
-                onChange={tagsChange} >
149
-                  {tagData.map(item => (
150
-                    <Select.Option key={item.tagId} value={item.tagId}>
151
-                      {item.tagName}
152
-                    </Select.Option>
153
-                  ))}
154
-              </Select>,
145
+        mode="multiple"
146
+        style={{ width: '100%' }}
147
+        placeholder="请选择标签"
148
+        onChange={tagsChange} >
149
+        {tagData.map(item => (
150
+          <Select.Option key={item.tagId} value={item.tagId}>
151
+            {item.tagName}
152
+          </Select.Option>
153
+        ))}
154
+      </Select>,
155 155
       value: userData.taTags,
156 156
     },
157 157
     {
@@ -187,11 +187,11 @@ const Edit = (props) => {
187 187
     {
188 188
       label: '状态',
189 189
       name: 'status',
190
-      render: <Radio.Group>
191
-        <Radio.Button style={{background:'#f0f0f0'}} value="0">禁用</Radio.Button>
192
-        <Radio.Button style={{background:'#f0f0f0',color:'#ff7e48'}} value="1">启用</Radio.Button>
190
+      render: <Radio.Group initialValue="1" buttonStyle="solid">
191
+        <Radio.Button value="0">禁用</Radio.Button>
192
+        <Radio.Button value="1">启用</Radio.Button>
193 193
       </Radio.Group>,
194
-      value: null != userData.status ? userData.status : '1'
194
+      value: userData.status != null ? userData.status.toString() : "1"
195 195
     },
196 196
   ]
197 197