Browse Source

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

张延森 5 years ago
parent
commit
adb82cbcec

+ 4
- 4
src/pages/building/list/add/components/base.jsx View File

586
             {getFieldDecorator('preSalePermit')(
586
             {getFieldDecorator('preSalePermit')(
587
               <ImageUpload />,
587
               <ImageUpload />,
588
             )}
588
             )}
589
-          </Form.Item>
590
-          <Form.Item label="项目备注" >
591
-            {getFieldDecorator('remark')(
589
+          </Form.Item>*/}
590
+          <Form.Item label="项目亮点" >
591
+            {getFieldDecorator('highlights')(
592
               <Wangedit />,
592
               <Wangedit />,
593
             )}
593
             )}
594
-          </Form.Item> */}
594
+          </Form.Item> 
595
           <Form.Item style={{ width: '400px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
595
           <Form.Item style={{ width: '400px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
596
             <Button type="primary" htmlType="submit">
596
             <Button type="primary" htmlType="submit">
597
                 确定
597
                 确定

+ 23
- 3
src/pages/building/list/add/components/buildingProjectType.jsx View File

40
         }
40
         }
41
         
41
         
42
         values.buildingTypeName = this.props.type.buildingTypeName
42
         values.buildingTypeName = this.props.type.buildingTypeName
43
-        console.log('valuesvaluesvaluesvalues: ', values)
43
+        if(values["startPrice"] === "") {
44
+          values["startPrice"] = null
45
+        }
46
+        if(values["endPrice"] === "") {
47
+          values["endPrice"] = null
48
+        }
49
+
50
+        if(values["endPrice"] != null && values["startPrice"] == null){
51
+          notification['warn']({
52
+            message: "请填写最低价!",
53
+            description: '',
54
+          })
55
+          return
56
+        }
57
+        if(values["startPrice"] != null && values["endPrice"] != null && Number(values["startPrice"]) > Number(values["endPrice"])){
58
+          notification['warn']({
59
+            message: "最低价不得高于最高价!",
60
+            description: '',
61
+          })
62
+          return
63
+        }
44
         this.props.onSuccess(values)
64
         this.props.onSuccess(values)
45
       }
65
       }
46
     });
66
     });
82
                 )}
102
                 )}
83
               </Form.Item>
103
               </Form.Item>
84
             <Form.Item label="价格区间" help='最高价与最低价一致时,只展示一个'>
104
             <Form.Item label="价格区间" help='最高价与最低价一致时,只展示一个'>
85
-              {getFieldDecorator('startPrice')(<Input placeholder="最低价" style={{width: '60px'}} maxLength="9" onChange={e => this.onChange(e, 'startPrice')} />)} --
86
-              {getFieldDecorator('endPrice')(<Input placeholder="最高价" style={{width: '60px'}} maxLength="9" onChange={e => this.onChange(e, 'endPrice')} />)}{this.props.type.priceType === "average" ? "元/㎡" : "万元/套"}
105
+              {getFieldDecorator('startPrice')(<Input type="number" placeholder="最低价" style={{width: '60px'}} maxLength="9" onChange={e => this.onChange(e, 'startPrice')} />)} --
106
+              {getFieldDecorator('endPrice')(<Input type="number" placeholder="最高价" style={{width: '60px'}} maxLength="9" onChange={e => this.onChange(e, 'endPrice')} />)}{this.props.type.priceType === "average" ? "元/㎡" : "万元/套"}
87
             </Form.Item>
107
             </Form.Item>
88
             <Form.Item label="销售状态" >
108
             <Form.Item label="销售状态" >
89
             {getFieldDecorator('marketStatus')(
109
             {getFieldDecorator('marketStatus')(

+ 3
- 2
src/pages/building/list/add/components/modalImage.jsx View File

100
 
100
 
101
   // 弹框取消按钮
101
   // 弹框取消按钮
102
   handleCancel() {
102
   handleCancel() {
103
-    this.setState({ visibleData: { visible: false, apartmentId: '', buildingId: '' } })
103
+    // this.setState({ visibleData: { visible: false, apartmentId: '', buildingId: '' } })
104
+    this.props.onSuccess()
104
   }
105
   }
105
 
106
 
106
   getById(params) {
107
   getById(params) {
237
               <Form.Item style={{ width: '400px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
238
               <Form.Item style={{ width: '400px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
238
                 <Button type="primary" htmlType="submit">保存</Button>
239
                 <Button type="primary" htmlType="submit">保存</Button>
239
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
240
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
240
-                <Button onClick={() => this.closeModal()}>取消</Button>
241
+                <Button onClick={() => this.handleCancel()}>取消</Button>
241
               </Form.Item>
242
               </Form.Item>
242
             </Form>
243
             </Form>
243
         </Modal>
244
         </Modal>

+ 1
- 1
src/pages/building/list/index.jsx View File

128
         <p className={Styles.cardItem}>
128
         <p className={Styles.cardItem}>
129
           <span className={Styles.title}>均价</span>
129
           <span className={Styles.title}>均价</span>
130
           <span >
130
           <span >
131
-            :约<span style={{ color: '#FF0707', fontSize: '20px' }}> {data.price || '待定'} </span>元/m²
131
+            :约<span style={{ color: '#FF0707', fontSize: '20px' }}> {data.price || '待定'} </span>{data.priceType == "total" ? "万元/套" : "元/m²"}
132
         </span>
132
         </span>
133
         </p>
133
         </p>
134
         <p className={Styles.cardItem}>
134
         <p className={Styles.cardItem}>

+ 4
- 3
src/pages/news/list/editNewsList.jsx View File

117
   ]
117
   ]
118
 
118
 
119
   const handleSubmit = val => { 
119
   const handleSubmit = val => { 
120
+    console.log(dynamicData,'12312345')
120
     let {...submitValue} = val
121
     let {...submitValue} = val
121
     
122
     
122
-    if(newsId){
123
-      submitValue.newsId = newsId
124
-      request({ ...apis.news.put, urlData: {id: newsId}, data: { ...submitValue },}).then((data) => {
123
+    if(dynamicData.newsId){
124
+      submitValue.newsId = dynamicData.newsId
125
+      request({ ...apis.news.put, urlData: {id: dynamicData.newsId}, data: { ...submitValue },}).then((data) => {
125
         // cancelPage();
126
         // cancelPage();
126
         message.info("保存成功")
127
         message.info("保存成功")
127
         console.log(data,'data1')
128
         console.log(data,'data1')