傅行帆 5 years ago
parent
commit
89b3f68214

+ 15
- 1
src/pages/building/list/add/components/buildingProjectType.jsx View File

@@ -40,7 +40,21 @@ 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
+        console.log(values["startPrice"] != null && values["endPrice"] != null ,"222")
51
+        if(values["startPrice"] != null && values["endPrice"] != null && values["startPrice"] > values["endPrice"]){
52
+          notification['warn']({
53
+            message: "最低价不得高于最高价!",
54
+            description: '',
55
+          })
56
+          return
57
+        }
44 58
         this.props.onSuccess(values)
45 59
       }
46 60
     });

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

@@ -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}>