瀏覽代碼

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

张延森 5 年之前
父節點
當前提交
adb82cbcec

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

@@ -586,12 +586,12 @@ function AddBuilding(props) {
586 586
             {getFieldDecorator('preSalePermit')(
587 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 592
               <Wangedit />,
593 593
             )}
594
-          </Form.Item> */}
594
+          </Form.Item> 
595 595
           <Form.Item style={{ width: '400px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
596 596
             <Button type="primary" htmlType="submit">
597 597
                 确定

+ 23
- 3
src/pages/building/list/add/components/buildingProjectType.jsx 查看文件

@@ -40,7 +40,27 @@ class TypeForm extends React.Component {
40 40
         }
41 41
         
42 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 64
         this.props.onSuccess(values)
45 65
       }
46 66
     });
@@ -82,8 +102,8 @@ class TypeForm extends React.Component {
82 102
                 )}
83 103
               </Form.Item>
84 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 107
             </Form.Item>
88 108
             <Form.Item label="销售状态" >
89 109
             {getFieldDecorator('marketStatus')(

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

@@ -100,7 +100,8 @@ class ModalImage extends React.Component {
100 100
 
101 101
   // 弹框取消按钮
102 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 107
   getById(params) {
@@ -237,7 +238,7 @@ class ModalImage extends React.Component {
237 238
               <Form.Item style={{ width: '400px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
238 239
                 <Button type="primary" htmlType="submit">保存</Button>
239 240
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
240
-                <Button onClick={() => this.closeModal()}>取消</Button>
241
+                <Button onClick={() => this.handleCancel()}>取消</Button>
241 242
               </Form.Item>
242 243
             </Form>
243 244
         </Modal>

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

@@ -128,7 +128,7 @@ function CartBody(props) {
128 128
         <p className={Styles.cardItem}>
129 129
           <span className={Styles.title}>均价</span>
130 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 132
         </span>
133 133
         </p>
134 134
         <p className={Styles.cardItem}>

+ 4
- 3
src/pages/news/list/editNewsList.jsx 查看文件

@@ -117,11 +117,12 @@ const Basic = (props) => {
117 117
   ]
118 118
 
119 119
   const handleSubmit = val => { 
120
+    console.log(dynamicData,'12312345')
120 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 126
         // cancelPage();
126 127
         message.info("保存成功")
127 128
         console.log(data,'data1')