瀏覽代碼

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

周立森 5 年之前
父節點
當前提交
1d3880ed4a

+ 9
- 3
src/pages/activity/editActivity.jsx 查看文件

85
         } else {
85
         } else {
86
           request({ ...apis.activity.add, data: { ...values } }).then((data) => {
86
           request({ ...apis.activity.add, data: { ...values } }).then((data) => {
87
             message.info('保存成功')
87
             message.info('保存成功')
88
+            router.push({
89
+              pathname: '/activity/editActivity',
90
+              query: {
91
+                dynamicId: data.dynamicId,
92
+              },
93
+            });
88
             // router.go(-1)
94
             // router.go(-1)
89
           }).catch((err) => {
95
           }).catch((err) => {
90
             message.info(err.msg || err.message)
96
             message.info(err.msg || err.message)
108
           ],
114
           ],
109
         })(<BuildSelect disabled={disable}/>)}
115
         })(<BuildSelect disabled={disable}/>)}
110
         </Form.Item>
116
         </Form.Item>
111
-        <Form.Item label="活动封面图" help="建议图片尺寸:750px*420px,比例16:9,格式:jpg,用于活动列表">
117
+        <Form.Item label="活动封面图1" help="建议图片尺寸:750px*420px,比例16:9,格式:jpg,用于活动列表">
112
           {getFieldDecorator('listImgUrl', {
118
           {getFieldDecorator('listImgUrl', {
113
           rules: [
119
           rules: [
114
             {
120
             {
115
               required: true,
121
               required: true,
116
-              message: '请选择活动封面图',
122
+              message: '请选择活动封面图1',
117
             },
123
             },
118
           ],
124
           ],
119
         })(<ImageUploader />)}
125
         })(<ImageUploader />)}
199
               message: '请输入权重',
205
               message: '请输入权重',
200
             },
206
             },
201
           ],
207
           ],
202
-        })(<Input type="number" style={{ width: 80}}/>)}<span style={{ marginLeft: 30, color:'grey'}}>数字越大越靠前</span>
208
+        })(<Input type="number" disabled={activityStatus===0 ? true : false} style={{ width: 80}}/>)}<span style={{ marginLeft: 30, color:'grey'}}>数字越大越靠前</span>
203
         </Form.Item>
209
         </Form.Item>
204
         <Form.Item wrapperCol={{ span: 12, offset: 8 }}>
210
         <Form.Item wrapperCol={{ span: 12, offset: 8 }}>
205
           <Button type="primary" htmlType="submit">
211
           <Button type="primary" htmlType="submit">

+ 5
- 1
src/pages/building/list/add/components/base.jsx 查看文件

67
    
67
    
68
       
68
       
69
       poi.map(x => {
69
       poi.map(x => {
70
+        const ty = Object.prototype.toString
70
         // console.log('x.data: ', JSON.parse(x.data))
71
         // console.log('x.data: ', JSON.parse(x.data))
71
-        setFormMapScopeTagValue(x.key, { data: JSON.parse(x.data) })
72
+        // console.log('x.data: ', typeof x.data, x.data instanceof String, ty.call(x.data))
73
+        if (ty.call(x.data) === '[object String]') {
74
+          setFormMapScopeTagValue(x.key, { data: JSON.parse(x.data) })
75
+        }
72
       })
76
       })
73
     }
77
     }
74
   }
78
   }

+ 1
- 1
src/pages/building/list/add/components/imageSet.jsx 查看文件

13
 const saleType = [
13
 const saleType = [
14
   {
14
   {
15
     id: 1,
15
     id: 1,
16
-    name: '待',
16
+    name: '待',
17
   },
17
   },
18
   {
18
   {
19
     id: 2,
19
     id: 2,

+ 21
- 6
src/pages/building/list/add/components/modalImage.jsx 查看文件

88
 
88
 
89
     // 网路请求
89
     // 网路请求
90
     request({ ...apis.building.buildingApartmentGetById, urlData: { id: apartmentId }, params: { ...params } }).then(res => {
90
     request({ ...apis.building.buildingApartmentGetById, urlData: { id: apartmentId }, params: { ...params } }).then(res => {
91
-      // res.img = res.buildingImgList.map((item, _) => item.url)
92
-      res.img = res.buildingImgList.map(item => item.url)
91
+      // res.img = res.buildingImgList.map(item => item.url)
92
+      if (res.buildingImgList) {
93
+        res.img = res.buildingImgList[0].url
94
+      }
95
+      
93
       this.props.form.setFieldsValue(res)
96
       this.props.form.setFieldsValue(res)
94
     }).catch(err => {
97
     }).catch(err => {
95
      this.openNotificationWithIcon('error', err)
98
      this.openNotificationWithIcon('error', err)
116
 
119
 
117
   submitData(data) {
120
   submitData(data) {
118
     // TODO 这里应该是要支持多图,但是封装的控件没有
121
     // TODO 这里应该是要支持多图,但是封装的控件没有
119
-    data.img = data.img.map((item, index) => ({ imgType: 'aparment', url: item, orderNo: index }))
122
+    // data.img = data.img.map((item, index) => ({ imgType: 'aparment', url: item, orderNo: index }))
123
+    data.img = [{ imgType: 'aparment', url: data.img, orderNo: 0 }]
120
     data.buildingId = this.props.visibleData.buildingId;
124
     data.buildingId = this.props.visibleData.buildingId;
121
     data.apartmentType = 'apart'
125
     data.apartmentType = 'apart'
122
     const api = data.apartmentId !== undefined ? apis.building.buildingApartmentUpdate : apis.building.buildingApartmentAdd;
126
     const api = data.apartmentId !== undefined ? apis.building.buildingApartmentUpdate : apis.building.buildingApartmentAdd;
186
               {getFieldDecorator('img', {
190
               {getFieldDecorator('img', {
187
                   rules: [{ required: true, message: '请上传户型图片' }],
191
                   rules: [{ required: true, message: '请上传户型图片' }],
188
               })(
192
               })(
189
-                <ImageListUpload />,
193
+                // <ImageListUpload />,
194
+                <ImageUpload />,
190
               )}
195
               )}
191
               </Form.Item>
196
               </Form.Item>
192
               <Form.Item label="面积" help="单位 ㎡">
197
               <Form.Item label="面积" help="单位 ㎡">
193
                 {getFieldDecorator('buildingArea', {
198
                 {getFieldDecorator('buildingArea', {
194
-                  rules: [{ required: true, message: '请填写面积' }],
199
+                  rules: [{ required: true, message: '请填写面积' },
200
+                          {
201
+                            pattern: new RegExp('^[0-9]*$'),
202
+                            message: '只允许输入数字',
203
+                          },
204
+                  ],
195
                 })(<Input type="number" />)}
205
                 })(<Input type="number" />)}
196
               </Form.Item>
206
               </Form.Item>
197
               <Form.Item label="套内面积" help="单位 ㎡">
207
               <Form.Item label="套内面积" help="单位 ㎡">
198
                 {getFieldDecorator('insideArea', {
208
                 {getFieldDecorator('insideArea', {
199
-                  rules: [{ required: true, message: '请填写套内面积' }],
209
+                  rules: [{ required: true, message: '请填写套内面积' },
210
+                          {
211
+                            pattern: new RegExp('^[0-9]*$'),
212
+                            message: '只允许输入数字',
213
+                          },
214
+                  ],
200
                 })(<Input type="number" />)}
215
                 })(<Input type="number" />)}
201
               </Form.Item>
216
               </Form.Item>
202
               <Form.Item style={{ width: '400px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
217
               <Form.Item style={{ width: '400px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>

+ 15
- 1
src/pages/building/list/index.jsx 查看文件

230
 
230
 
231
 
231
 
232
   function toAdd() {
232
   function toAdd() {
233
-    router.push({ pathname: '/building/list/add' })
233
+    // 判断楼盘是否最可以添加
234
+    request({ ...apis.building.verifyMax}).then(res => {
235
+      router.push({ pathname: '/building/list/add' })
236
+    }).catch(err => {
237
+      // eslint-disable-next-line no-unused-expressions
238
+      <Alert
239
+        style={{
240
+          marginBottom: 24,
241
+        }}
242
+        message={err}
243
+        type="error"
244
+        showIcon
245
+      />
246
+      return
247
+    })
234
   }
248
   }
235
 
249
 
236
   /**
250
   /**

+ 1
- 1
src/pages/carouselFigure/advertisingList.jsx 查看文件

46
       dataIndex: 'image',
46
       dataIndex: 'image',
47
       key: 'image',
47
       key: 'image',
48
       align: 'center',
48
       align: 'center',
49
-      render: (image) => <img src={image} className={styles.touxiang} />,
49
+      render: (image) => <img src={image} className={styles.imgSmall} />,
50
     },
50
     },
51
     {
51
     {
52
       title: '类型',
52
       title: '类型',

+ 1
- 1
src/pages/carouselFigure/carouselFigureList.jsx 查看文件

46
       dataIndex: 'image',
46
       dataIndex: 'image',
47
       key: 'image',
47
       key: 'image',
48
       align: 'center',
48
       align: 'center',
49
-      render: (image) => <img src={image} className={styles.touxiang} />,
49
+      render: (image) => <img src={image} className={styles.imgPerfect} />,
50
     },
50
     },
51
     {
51
     {
52
       title: '类型',
52
       title: '类型',

+ 1
- 1
src/pages/channel/recommendClients.jsx 查看文件

95
     // eslint-disable-next-line consistent-return
95
     // eslint-disable-next-line consistent-return
96
     render: (text, records) => {
96
     render: (text, records) => {
97
       if (records.status === 1) { return '报备' }
97
       if (records.status === 1) { return '报备' }
98
-      if (records.status === 2) { return 'admin.taNews.weight' }
98
+      if (records.status === 2) { return '推荐' }
99
       if (records.status === 3) { return '认购' }
99
       if (records.status === 3) { return '认购' }
100
       if (records.status === 4) { return '签约' }
100
       if (records.status === 4) { return '签约' }
101
       if (records.verifyStatus === 1) { return '待审核' }
101
       if (records.verifyStatus === 1) { return '待审核' }

+ 17
- 12
src/pages/customer/customerlist/components/integralRecord.jsx 查看文件

27
 
27
 
28
   // 挂载之后
28
   // 挂载之后
29
   componentDidMount() {
29
   componentDidMount() {
30
-    // this.getList({ pageNumber: 1, pageSize: 5 })
30
+    this.getList({ pageNumber: 1, pageSize: 5 })
31
   }
31
   }
32
 
32
 
33
   componentDidUpdate(preProps, preState) {
33
   componentDidUpdate(preProps, preState) {
76
   }
76
   }
77
 
77
 
78
   // 积分类型
78
   // 积分类型
79
-  showChangeType(str) { 
80
-
79
+  showChangeType(str) {
81
     switch (str) {
80
     switch (str) {
82
       case 'goods':
81
       case 'goods':
83
         return '兑换商品'
82
         return '兑换商品'
89
         return '注册经纪人'
88
         return '注册经纪人'
90
       case 'recommend-customer':
89
       case 'recommend-customer':
91
         return '推荐客户'
90
         return '推荐客户'
91
+        case 'group':
92
+        return '拼团'
93
+        case 'recommend-customer':
94
+        return '推荐客户'
92
       default:
95
       default:
93
         return '未知类型'
96
         return '未知类型'
94
     }
97
     }
95
   }
98
   }
96
-  
99
+
97
   // 判断是否是 - 开头
100
   // 判断是否是 - 开头
98
-  subPoints(points) { 
99
-    let subStr = points.toString().substring(0, 1)
101
+  subPoints(points) {
102
+    const subStr = points.toString().substring(0, 1)
100
     if (subStr === '-') {
103
     if (subStr === '-') {
101
       return true
104
       return true
102
     }
105
     }
103
     return false
106
     return false
104
   }
107
   }
105
 
108
 
109
+// eslint-disable-next-line class-methods-use-this
106
   render() {
110
   render() {
107
     const columns = [
111
     const columns = [
108
       {
112
       {
109
         title: '序号',
113
         title: '序号',
110
         dataIndex: 'index',
114
         dataIndex: 'index',
111
         key: 'index',
115
         key: 'index',
116
+        render: (text, record, index) => <span>{(this.state.dataSource.result.total - this.state.dataSource.result.records.length) * 1 + index + 1}</span>,
112
       },
117
       },
113
       {
118
       {
114
         title: '积分类型',
119
         title: '积分类型',
115
         dataIndex: 'changeType',
120
         dataIndex: 'changeType',
116
         key: 'changeType',
121
         key: 'changeType',
117
-        render: (_, record) => { this.showChangeType(record.changeType) },
122
+        render: (_, record) => <span>{this.showChangeType(record.changeType) }</span>,
118
       },
123
       },
119
       {
124
       {
120
         title: '积分变化',
125
         title: '积分变化',
121
         dataIndex: 'pointsAmount',
126
         dataIndex: 'pointsAmount',
122
         key: 'pointsAmount',
127
         key: 'pointsAmount',
123
-        render: (_, record) => { <span style={this.subPoints(record.pointsAmount) && {color: 'red'}}>{ record.pointsAmount }</span> },
128
+        // render: (pointsAmount, record) => { <span style={this.subPoints(pointsAmount) && {color: 'red'}}>{ pointsAmount }</span> },
124
       },
129
       },
125
       {
130
       {
126
         title: '发生时间',
131
         title: '发生时间',
127
         dataIndex: 'createDate',
132
         dataIndex: 'createDate',
128
         key: 'createDate',
133
         key: 'createDate',
129
-        render: (_, record) => { moment(record.createDate).format('YYYY-MM-DD') },
134
+        render: (createDate, records) => <span> {moment(createDate).format('YYYY-MM-DD')}</span>,
130
       },
135
       },
131
     ]
136
     ]
132
     return (
137
     return (
133
       <>
138
       <>
134
         <Modal
139
         <Modal
135
-            title={ "当前可用积分:" + this.state.dataSource.totalPoints }
140
+            title={ '当前可用积分:' + this.state.dataSource.totalPoints }
136
             width={800}
141
             width={800}
137
             destroyOnClose="true"
142
             destroyOnClose="true"
138
             footer={null}
143
             footer={null}
139
             visible={this.state.visibleData.visible}
144
             visible={this.state.visibleData.visible}
140
             // onOk={() => this.handleOk()}
145
             // onOk={() => this.handleOk()}
141
-            onCancel={(e) => this.handleCancel(e)}
146
+            onCancel={e => this.handleCancel(e)}
142
           >
147
           >
143
-            <Table dataSource={this.state.dataSource.result.records} rowKey="integralrecord" columns={columns} pagination={{ total: this.state.dataSource.result.total, onChange: e => this.onChange(e) }} />
148
+            <Table dataSource={this.state.dataSource.result.records} columns={columns} pagination={{ total: this.state.dataSource.result.total, onChange: e => this.onChange(e) }} />
144
           </Modal>
149
           </Modal>
145
       </>
150
       </>
146
     );
151
     );

+ 7
- 6
src/pages/customer/customerlist/components/recommend.jsx 查看文件

109
         title: '推荐时间',
109
         title: '推荐时间',
110
         dataIndex: 'createDate',
110
         dataIndex: 'createDate',
111
         key: 'createDate',
111
         key: 'createDate',
112
-        render: (_, record) => <><span>{ record.createDate && moment(record.createDate).format('YYYY-MM-DD') }</span></>,
112
+        render: (_, record) => <><span>{ record.createDate && moment(record.createDate).format('YYYY-MM-DD HH:mm:ss') }</span></>,
113
       },
113
       },
114
       {
114
       {
115
         title: '状态',
115
         title: '状态',
116
         // eslint-disable-next-line consistent-return
116
         // eslint-disable-next-line consistent-return
117
         render: (text, records) => {
117
         render: (text, records) => {
118
-          if (records.status === 1) { return '报备' }
119
-          if (records.status === 2) { return '到访' }
120
-          if (records.status === 3) { return '认筹' }
121
-          if (records.status === 4) { return '签约' }
122
-          // reportRecommendStatus
118
+          if (records.verifyStatus === 0) { return '未审核' }
119
+          if (records.verifyStatus === 1) {
120
+            if (records.reportRecommendStatus === 1) { return '报备' }
121
+            if (records.reportRecommendStatus === 2) { return '推荐' }
122
+           }
123
+          if (records.verifyStatus === 2) { return '审核不通过' }
123
         },
124
         },
124
       },
125
       },
125
     ]
126
     ]

+ 4
- 4
src/pages/customer/customerlist/customerDetail.jsx 查看文件

83
       dataIndex: 'visitTime',
83
       dataIndex: 'visitTime',
84
       key: 'visitTime',
84
       key: 'visitTime',
85
       align: 'center',
85
       align: 'center',
86
-      render: (_, record) => <span> {moment(record.visitTime).format('YYYY-MM-DD hh:mm:ss') }</span>,
86
+      render: (_, record) => <span> {moment(record.visitTime).format('YYYY-MM-DD HH:mm:ss') }</span>,
87
     },
87
     },
88
     {
88
     {
89
       title: '停留时间',
89
       title: '停留时间',
98
     {
98
     {
99
       title: 'Name',
99
       title: 'Name',
100
       dataIndex: 'name',
100
       dataIndex: 'name',
101
-      width:500,
102
-    render: (_, record) => <span stytle={{width:'450px'}} >{record.buildingName}</span>,
101
+      width: 500,
102
+    render: (_, record) => <span>{record.buildingName}</span>,
103
     },
103
     },
104
     {
104
     {
105
       title: 'Address',
105
       title: 'Address',
169
         <div className={styles.leftBoxCentre}>
169
         <div className={styles.leftBoxCentre}>
170
           <div className={styles.tit}>
170
           <div className={styles.tit}>
171
                 <span>项目名称</span>
171
                 <span>项目名称</span>
172
-                <span style={{ marginLeft: '47%' }}>意向值</span>
172
+                <span style={{ marginLeft: '50%' }}>意向值</span>
173
           </div>
173
           </div>
174
           {/* <img className={styles.touxiang} src={ data.picture && data.picture } /> */}
174
           {/* <img className={styles.touxiang} src={ data.picture && data.picture } /> */}
175
           <div className={styles.infoItem}>
175
           <div className={styles.infoItem}>

+ 2
- 1
src/pages/customer/customerlist/index.jsx 查看文件

135
   }
135
   }
136
 
136
 
137
   function showRecord(record) {
137
   function showRecord(record) {
138
-    setRecordVisibleData({ visible: true, customerId: record.customerId })
138
+    setRecordVisibleData({ visible: true, customerId: record.personId })
139
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
139
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
140
     setStatusVisibleData({ visible: false, customerId: '' })
140
     setStatusVisibleData({ visible: false, customerId: '' })
141
     setRecommendVisibleData({ visible: false, customerId: '' })
141
     setRecommendVisibleData({ visible: false, customerId: '' })
207
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
207
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
208
     setStatusVisibleData({ visible: false, customerId: '', status: '' })
208
     setStatusVisibleData({ visible: false, customerId: '', status: '' })
209
     setRecommendVisibleData({ visible: false, customerId: '' })
209
     setRecommendVisibleData({ visible: false, customerId: '' })
210
+    getList({ pageNum: 1, pageSize: 10, customerType, ...props.form.getFieldsValue() })
210
   }
211
   }
211
 
212
 
212
   const publicColumns = [
213
   const publicColumns = [

+ 1
- 1
src/pages/customer/customerlist/publicCustomerDetail.jsx 查看文件

84
       dataIndex: 'visitTime',
84
       dataIndex: 'visitTime',
85
       key: 'visitTime',
85
       key: 'visitTime',
86
       align: 'center',
86
       align: 'center',
87
-      render: (_, record) => <span> {moment(record.visitTime).format('YYYY-MM-DD hh:mm:ss') }</span>,
87
+      render: (_, record) => <span> {moment(record.visitTime).format('YYYY-MM-DD HH:mm:ss') }</span>,
88
     },
88
     },
89
     {
89
     {
90
       title: '停留时间',
90
       title: '停留时间',

+ 10
- 0
src/pages/style/GoodsList.less 查看文件

9
   height: 93px;
9
   height: 93px;
10
 }
10
 }
11
 
11
 
12
+.imgPerfect {
13
+  width: 120px;
14
+  height: 67.5px;
15
+}
16
+
17
+.imgSmall {
18
+  width: 90px;
19
+  height: 135px;
20
+}
21
+
12
 .ant-table-column-title {
22
 .ant-table-column-title {
13
   font-weight: 600;
23
   font-weight: 600;
14
 }
24
 }

+ 30
- 0
src/pages/system/editPolicy.jsx 查看文件

46
         name: 'cityId',
46
         name: 'cityId',
47
         render: <SelectCity />,
47
         render: <SelectCity />,
48
         value: policyData.cityId,
48
         value: policyData.cityId,
49
+        rules: [
50
+          {
51
+            required: true,
52
+            message: '请选择城市',
53
+          },
54
+        ],
49
       },
55
       },
50
       {
56
       {
51
         label: '购房政策封面图',
57
         label: '购房政策封面图',
53
         type: FieldTypes.ImageUploader,
59
         type: FieldTypes.ImageUploader,
54
         value: policyData.policyImg,
60
         value: policyData.policyImg,
55
         help: '建议图片尺寸:220*176px,比例5:4,格式:jpg,用于购房百科列表',
61
         help: '建议图片尺寸:220*176px,比例5:4,格式:jpg,用于购房百科列表',
62
+        rules: [
63
+          {
64
+            required: true,
65
+            message: '请选择购房政策封面图',
66
+          },
67
+        ],
56
       },
68
       },
57
       {
69
       {
58
         label: '政策标题',
70
         label: '政策标题',
59
         name: 'title',
71
         name: 'title',
60
         type: FieldTypes.Text,
72
         type: FieldTypes.Text,
61
         value: policyData.title,
73
         value: policyData.title,
74
+        rules: [
75
+          {
76
+            required: true,
77
+            message: '请输入政策标题',
78
+          },
79
+        ],
62
       },
80
       },
63
       {
81
       {
64
         label: '政策详情',
82
         label: '政策详情',
65
         name: 'body',
83
         name: 'body',
66
         render: <Wangedit />,
84
         render: <Wangedit />,
67
         value: policyData.body,
85
         value: policyData.body,
86
+        rules: [
87
+          {
88
+            required: true,
89
+            message: '请输入政策标题',
90
+          },
91
+        ],
68
       },
92
       },
69
       {
93
       {
70
         label: '状态',
94
         label: '状态',
77
   
101
   
78
     const handleSubmit = val => { 
102
     const handleSubmit = val => { 
79
       console.log('submit data --->', val)
103
       console.log('submit data --->', val)
104
+      console.log(val.body, 'val.body')
105
+      if (val.body == '<p><br></p>'){
106
+        message.info("政策详情必填")
107
+        return
108
+      }
109
+      
80
       if(policyId){
110
       if(policyId){
81
         val.policyId = policyId
111
         val.policyId = policyId
82
         request({ ...apis.system.updateTaPolicy, urlData: {id: policyId},data: val, }).then((data) => {
112
         request({ ...apis.system.updateTaPolicy, urlData: {id: policyId},data: val, }).then((data) => {

+ 5
- 0
src/services/apis.js 查看文件

45
       url: `${prefix}/buildinglist`,
45
       url: `${prefix}/buildinglist`,
46
       action: 'admin.buildinglist.get',
46
       action: 'admin.buildinglist.get',
47
     },
47
     },
48
+    verifyMax: {
49
+      method: 'GET',
50
+      url: `${prefix}/verifyMax`,
51
+      action: 'admin.verifyMax.get',
52
+    },
48
     updateStatus: {
53
     updateStatus: {
49
       method: 'PUT',
54
       method: 'PUT',
50
       url: `${prefix}/building/update/status`,
55
       url: `${prefix}/building/update/status`,