魏熙美 5 år sedan
förälder
incheckning
a4bb76b649

+ 1
- 1
src/components/SelectButton/CitySelect.jsx Visa fil

30
   }
30
   }
31
 
31
 
32
   return (
32
   return (
33
-      <Select value={props.value} style={{ width: '180px' }} placeholder="请选择城市" onChange={props.onChange}>
33
+      <Select showSearch value={props.value} style={{ width: '180px' }} placeholder="请选择城市" onChange={props.onChange}>
34
           {data.map(city => (
34
           {data.map(city => (
35
             <Option key={city.id} value={city.id}>{city.name}</Option>
35
             <Option key={city.id} value={city.id}>{city.name}</Option>
36
           ))}
36
           ))}

+ 18
- 6
src/pages/building/list/add/components/base.jsx Visa fil

60
       if (res.receivedDate !== null) {
60
       if (res.receivedDate !== null) {
61
         res.receivedDate = moment(res.receivedDate)
61
         res.receivedDate = moment(res.receivedDate)
62
       }
62
       }
63
+      if (res.buildingTag !== null) {
64
+        res.tag = res.buildingTag.map((item, _) => item.tagName)
65
+      }
63
 
66
 
64
       res.avatarImage = res.buildingImg.map(item => item.url)
67
       res.avatarImage = res.buildingImg.map(item => item.url)
65
       props.form.setFieldsValue(res)
68
       props.form.setFieldsValue(res)
80
     data.receivedDate = moment(data.receivedDate, 'yyyy-MM-dd HH:mm:ss')
83
     data.receivedDate = moment(data.receivedDate, 'yyyy-MM-dd HH:mm:ss')
81
     // 项目主图
84
     // 项目主图
82
     data.img = data.avatarImage && data.avatarImage.map((item, index) => ({ imgType: 'banner', url: item, orderNo: index + 1 }))
85
     data.img = data.avatarImage && data.avatarImage.map((item, index) => ({ imgType: 'banner', url: item, orderNo: index + 1 }))
86
+    if (data.tag) {
87
+      data.tag = data.tag.map((item, _) => ({ tagName: item }))
88
+    }
83
 
89
 
84
     const api = data.buildingId === undefined ? apis.building.addBuilding : apis.building.updateBuilding
90
     const api = data.buildingId === undefined ? apis.building.addBuilding : apis.building.updateBuilding
85
     request({ ...api, data: { ...data } }).then(() => {
91
     request({ ...api, data: { ...data } }).then(() => {
108
             {getFieldDecorator('buildingProjectType')(<BudildingProjectType />)}
114
             {getFieldDecorator('buildingProjectType')(<BudildingProjectType />)}
109
           </Form.Item>
115
           </Form.Item>
110
           <Form.Item label="均价" hasFeedback>
116
           <Form.Item label="均价" hasFeedback>
111
-            {getFieldDecorator('price')(<Input />)}
117
+            {getFieldDecorator('price')(<Input type="number" style={{ width: '210px' }}/>)}m²/元
112
           </Form.Item>
118
           </Form.Item>
113
           <Form.Item label="开盘时间"  hasFeedback>
119
           <Form.Item label="开盘时间"  hasFeedback>
114
             {getFieldDecorator('openingDate')(<DatePicker format="YYYY/MM/DD" />)}
120
             {getFieldDecorator('openingDate')(<DatePicker format="YYYY/MM/DD" />)}
128
             )}
134
             )}
129
           </Form.Item>
135
           </Form.Item>
130
           <Form.Item label="销售状态" hasFeedback>
136
           <Form.Item label="销售状态" hasFeedback>
131
-            {getFieldDecorator('marketStatus')(<Input />)}
137
+            {getFieldDecorator('marketStatus')(
138
+              <Select placeholder="销售状态" style={{ width: '1016px' }}>
139
+                <Option value="待定">待定</Option>
140
+                <Option value="在售">在售</Option>
141
+                <Option value="售完">售完</Option>
142
+              </Select>,
143
+            )}
132
           </Form.Item>
144
           </Form.Item>
133
-          <Form.Item label="标签" hasFeedback style={{ display: 'none' }}>
134
-            {getFieldDecorator('tags')(
135
-              <Select mode="multiple" placeholder="标签" style={{ width: '1016px' }}>
136
-                <Option value="未知">未知</Option>
145
+          <Form.Item label="项目标签" hasFeedback>
146
+            {getFieldDecorator('tag')(
147
+              <Select mode="tags" placeholder="输入后选中" style={{ width: '1016px' }}>
148
+                
137
               </Select>,
149
               </Select>,
138
             )}
150
             )}
139
           </Form.Item>
151
           </Form.Item>

+ 2
- 2
src/pages/building/list/add/components/imageSet.jsx Visa fil

94
 
94
 
95
   const columns = [
95
   const columns = [
96
     {
96
     {
97
-      title: '名称',
97
+      title: '户型名称',
98
       dataIndex: 'apartmentName',
98
       dataIndex: 'apartmentName',
99
       key: 'apartmentName',
99
       key: 'apartmentName',
100
     },
100
     },
136
 
136
 
137
   return (
137
   return (
138
     <>
138
     <>
139
-      <Button type="primary" onClick={() => showEdi()}>新增户型</Button>
139
+      <Button type="primary" onClick={() => showEdi()}>新增户型</Button>
140
       <Table dataSource={data} columns={columns} pagination={false} rowKey="imageSet" />
140
       <Table dataSource={data} columns={columns} pagination={false} rowKey="imageSet" />
141
 
141
 
142
       {/* 编辑页 */}
142
       {/* 编辑页 */}

+ 1
- 1
src/pages/building/list/add/index.jsx Visa fil

49
           props.location.query.id &&
49
           props.location.query.id &&
50
           (
50
           (
51
             <>
51
             <>
52
-              <Radio.Button value="image">图片</Radio.Button>
52
+              <Radio.Button value="image">户型库</Radio.Button>
53
               <Radio.Button value="poster">海报图片</Radio.Button>
53
               <Radio.Button value="poster">海报图片</Radio.Button>
54
               <Radio.Button value="share">分享设置</Radio.Button>
54
               <Radio.Button value="share">分享设置</Radio.Button>
55
             </>
55
             </>