傅行帆 5 vuotta sitten
vanhempi
commit
90292b4aa0

+ 54
- 52
src/pages/customer/customerlist/customerDetail.jsx Näytä tiedosto

@@ -15,8 +15,8 @@ function header(props) {
15 15
    * @returns
16 16
    */
17 17
   // eslint-disable-next-line react-hooks/rules-of-hooks
18
-  const [data, setData] = useState([{ }])
19
-  const [tableData, setTableDataData] = useState([{ }])
18
+  const [data, setData] = useState([{}])
19
+  const [tableData, setTableDataData] = useState([{}])
20 20
   const [dataConsultant, setDataonsultant] = useState({})
21 21
   const [intentionData, setIntentionData] = useState([])
22 22
 
@@ -39,8 +39,8 @@ function header(props) {
39 39
         }]),
40 40
       )
41 41
       arr.push(a)
42
-   }
43
-   setIntentionData(arr)
42
+    }
43
+    setIntentionData(arr)
44 44
   }
45 45
 
46 46
   // 查询
@@ -59,11 +59,11 @@ function header(props) {
59 59
       setIntentionData(res.intentions)
60 60
     })
61 61
   }
62
-// 分页
63
-function onChange(number) {
64
-  if (id === '' || id === undefined) {
65
-    return
66
-  }
62
+  // 分页
63
+  function onChange(number) {
64
+    if (id === '' || id === undefined) {
65
+      return
66
+    }
67 67
     // eslint-disable-next-line max-len
68 68
     request({ ...apis.customer.CustomerRecommendGet, urlData: { id }, params: { pageNumber: number, pageSize: 10 } }).then(res => {
69 69
       setData(res)
@@ -89,14 +89,14 @@ function onChange(number) {
89 89
       dataIndex: 'visitTime',
90 90
       key: 'visitTime',
91 91
       align: 'center',
92
-      render: (_, record) => <span> {moment(record.visitTime).format('YYYY-MM-DD HH:mm:ss') }</span>,
92
+      render: (_, record) => <span> {moment(record.visitTime).format('YYYY-MM-DD HH:mm:ss')}</span>,
93 93
     },
94 94
     {
95 95
       title: '停留时间',
96 96
       dataIndex: 'visitDuration',
97 97
       key: 'visitDuration',
98 98
       align: 'center',
99
-      render: (_, record) => <span>{record.visitDuration === null ? 0 : record.visitDuration }秒</span>,
99
+      render: (_, record) => <span>{record.visitDuration === null ? 0 : record.visitDuration}秒</span>,
100 100
     },
101 101
   ]
102 102
   // 意向
@@ -105,7 +105,7 @@ function onChange(number) {
105 105
       title: <span styles={{ color: '#222', fontSize: '24px' }}>项目名称</span>,
106 106
       dataIndex: 'name',
107 107
       width: '64%',
108
-    render: (_, record) => <span>{record.buildingName}</span>,
108
+      render: (_, record) => <span>{record.buildingName}</span>,
109 109
     },
110 110
     {
111 111
       title: <span styles={{ color: '#222', fontSize: '24px' }}>意向值</span>,
@@ -118,58 +118,60 @@ function onChange(number) {
118 118
       <div className={styles.cardBox}>
119 119
         <div className={styles.rightBox}>
120 120
           <p className={styles.tit}>客户信息</p>
121
-          <img className={styles.touxiang} src={ data.picture && data.picture } />
122
-          <div className={styles.right}>
123
-            <p className={styles.rightItem}>用户名称:{ data.name }</p>
124
-            <p className={styles.rightItem}>手机号码:{ data.phone }</p>
125
-            <p className={styles.rightItem}>首次访问时间:{data.visitTime && moment(data.visitTime).format('YYYY-MM-DD')}</p>
126
-          </div>
127
-          <div className={styles.Centered}>
128
-          <p>访问时长:{ data.duration }秒</p>
129
-          <p>访问次数:{ data.visitTimes }</p>
130
-          <p className={styles.rightItem}>客户描述:{ data.describe }</p>
131
-          {/* <p>预约人数:{ data.visiteNum }</p> */}
132
-          </div>
133
-          <div className={styles.rightCentered}>
134
-          <p >需求类型:{ data.demandType }</p>
135
-          <p >价格区间:{data.priceRange }</p>
136
-          <p >物业类型:{ data.realtyManageType }</p>
137
-          {/* <p>预约人数:{ data.visiteNum }</p> */}
138
-          </div>
139
-          {/* <p className={styles.rightItem}>预约到访时间:{data.appointmentTime && moment(data.appointmentTime).format('YYYY-MM-DD') }</p> */}
140
-          <div className={styles.rightInfo}>
141
-            <p className={styles.rightItem}>国家:{ dataConsultant && dataConsultant.country }</p>
142
-            <p className={styles.rightItem}>省份:{ dataConsultant && dataConsultant.provience }</p>
143
-            <p className={styles.rightItem}>城市:{dataConsultant && dataConsultant.city }</p>
144
-            <p className={styles.rightItem}>来访渠道:{data.personFrom}</p>
145
-            {/* <p className={styles.rightItem}>详细信息:</p> */}
146
-            {/* <p className={styles.rightItem}>意向项目:{data.intention }</p> */} 
147
-            {/* <p className={styles.rightItem}>客户说明:{ data.verifyRemark }</p> */}
121
+          <div className={styles.flexBox}>
122
+            <img className={styles.touxiang} src={data.picture && data.picture} />
123
+            <div className={styles.right}>
124
+              <p className={styles.rightItem}>用户名称:{data.name}</p>
125
+              <p className={styles.rightItem}>手机号码:{data.phone}</p>
126
+              <p className={styles.rightItem}>首次访问时间:{data.visitTime && moment(data.visitTime).format('YYYY-MM-DD')}</p>
127
+            </div>
128
+            <div className={styles.Centered}>
129
+              <p>访问时长:{data.duration}秒</p>
130
+              <p>访问次数:{data.visitTimes}</p>
131
+              <p className={styles.rightItem}>客户描述:{data.describe}</p>
132
+              {/* <p>预约人数:{ data.visiteNum }</p> */}
133
+            </div>
134
+            <div className={styles.rightCentered}>
135
+              <p >需求类型:{data.demandType}</p>
136
+              <p >价格区间:{data.priceRange}</p>
137
+              <p >物业类型:{data.realtyManageType}</p>
138
+              {/* <p>预约人数:{ data.visiteNum }</p> */}
139
+            </div>
140
+            {/* <p className={styles.rightItem}>预约到访时间:{data.appointmentTime && moment(data.appointmentTime).format('YYYY-MM-DD') }</p> */}
141
+            <div className={styles.rightInfo}>
142
+              <p className={styles.rightItem}>国家:{dataConsultant && dataConsultant.country}</p>
143
+              <p className={styles.rightItem}>省份:{dataConsultant && dataConsultant.provience}</p>
144
+              <p className={styles.rightItem}>城市:{dataConsultant && dataConsultant.city}</p>
145
+              <p className={styles.rightItem}>来访渠道:{data.personFrom}</p>
146
+              {/* <p className={styles.rightItem}>详细信息:</p> */}
147
+              {/* <p className={styles.rightItem}>意向项目:{data.intention }</p> */}
148
+              {/* <p className={styles.rightItem}>客户说明:{ data.verifyRemark }</p> */}
149
+            </div>
148 150
           </div>
149 151
         </div>
150 152
       </div>
151 153
       <br></br>
152 154
       <div className={styles.cardBox}>
153
-          <div className={styles.rightBoxCentre}>
155
+        <div className={styles.rightBoxCentre}>
154 156
           <p className={styles.tit}>置业顾问信息</p>
155 157
           <div>
156
-          <img className={styles.touxiangphoto}  src={ data.consultant && data.consultant.photo }/>
157
-          <p >{data.consultant && data.consultant.userName}</p>
158
+            <img className={styles.touxiangphoto} src={data.consultant && data.consultant.photo} />
159
+            <p >{data.consultant && data.consultant.userName}</p>
158 160
           </div>
159 161
           <div className={styles.right}>
160
-          {/* <p className={styles.infoItem}>姓名:{ data.consultant && data.consultant.name }</p>
162
+            {/* <p className={styles.infoItem}>姓名:{ data.consultant && data.consultant.name }</p>
161 163
           <p className={styles.infoItem}>部门:{ data.consultant && data.consultant.department }</p> */}
162
-          <p className={styles.infoItem}>号码:{ data.consultant && data.consultant.phone } </p>
163
-          <p className={styles.infoItem}>岗位:{ data.consultant && data.consultant.position }</p>
164
+            <p className={styles.infoItem}>号码:{data.consultant && data.consultant.phone} </p>
165
+            <p className={styles.infoItem}>岗位:{data.consultant && data.consultant.position}</p>
164 166
           </div>
165 167
           <div className={styles.left}>
166
-          <p className={styles.infoItem}>公司:{ data.consultant && data.consultant.orgName } </p>
167
-          <p className={styles.infoItem}>
168
-            所属项目:
168
+            <p className={styles.infoItem}>公司:{data.consultant && data.consultant.orgName} </p>
169
+            <p className={styles.infoItem}>
170
+              所属项目:
169 171
             {
170
-              data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
171
-            }
172
-          </p>
172
+                data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
173
+              }
174
+            </p>
173 175
           </div>
174 176
         </div>
175 177
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@@ -180,7 +182,7 @@ function onChange(number) {
180 182
           </div> */}
181 183
           {/* <img className={styles.touxiang} src={ data.picture && data.picture } /> */}
182 184
           {/* <div className={styles.infoItem}> */}
183
-          <Table bordered = { false } columnWidth={10} columns={intention} dataSource={intentionData} pagination={false} scroll={intentionData && intentionData.length >= 3 ? { y: 240 } : false} width={500}/>
185
+          <Table bordered={false} columnWidth={10} columns={intention} dataSource={intentionData} pagination={false} scroll={intentionData && intentionData.length >= 3 ? { y: 240 } : false} width={500} />
184 186
           {/* </div> */}
185 187
         </div>
186 188
 

+ 1
- 1
src/pages/customer/customerlist/publicCustomerDetail.jsx Näytä tiedosto

@@ -147,7 +147,7 @@ function onChange(number) {
147 147
         <div className={publicStyle.leftBoxCentre}>
148 148
           <div className={publicStyle.tit}>
149 149
                 <span>项目名称</span>
150
-                <span style={{ marginLeft: '47%' }}>意向值</span>
150
+                <span style={{ float: 'right' }}>意向值</span>
151 151
           </div>
152 152
           {/* <img className={styles.touxiang} src={ data.picture && data.picture } /> */}
153 153
           <div className={publicStyle.infoItem}>

+ 6
- 6
src/pages/customer/customerlist/publicStyle.less Näytä tiedosto

@@ -136,7 +136,7 @@
136 136
     position: relative;
137 137
   }
138 138
   .tit{
139
-    font-size:24px;
139
+    font-size:0.15rem;
140 140
     font-weight:600;
141 141
     color:#222;
142 142
     margin: 10px 0 0 0;
@@ -149,13 +149,13 @@
149 149
   }
150 150
   .infoItem{
151 151
     color:#666;
152
-    font-size: 19px;
152
+    font-size: 0.1rem;
153 153
     margin: 0 0 10px 0;
154 154
     
155 155
   }
156 156
   .rightItem{
157 157
     color:#666;
158
-    font-size: 19px;
158
+    font-size: 0.1rem;
159 159
     margin: 0 0 15px 0;
160 160
   }
161 161
   .right{
@@ -177,10 +177,10 @@
177 177
   .Centered{
178 178
     position: absolute;
179 179
     top:108px;
180
-    left:40%;
180
+    left:50%;
181 181
     margin: 0 0 15px 0;
182 182
     color:#666;
183
-    font-size: 19px;
183
+    font-size: 0.1rem;
184 184
   }
185 185
 
186 186
   .rightCentered{
@@ -189,7 +189,7 @@
189 189
     left:55%;
190 190
     margin: 0 0 15px 0;
191 191
     color:#666;
192
-    font-size: 19px;
192
+    font-size: 0.1rem;
193 193
   }
194 194
   
195 195
 }

+ 36
- 17
src/pages/customer/customerlist/style.less Näytä tiedosto

@@ -136,11 +136,15 @@
136 136
     position: relative;
137 137
   }
138 138
   .tit{
139
-    font-size:24px;
139
+    font-size:0.15rem;
140 140
     font-weight:600;
141 141
     color:#222;
142 142
     margin: 10px 0 0 0;
143 143
   }
144
+  .flexBox{
145
+    display: flex;
146
+    align-items: end;
147
+  }
144 148
   .touxiang{
145 149
     width: 120px;
146 150
     width: 120px;
@@ -154,47 +158,62 @@
154 158
   }
155 159
   .infoItem{
156 160
     color:#666;
157
-    font-size: 19px;
161
+    font-size: 0.1rem;
158 162
     margin: 0 0 30px 0;
159 163
     
160 164
   }
161 165
   .rightItem{
162 166
     color:#666;
163
-    font-size: 19px;
167
+    font-size: 0.1rem;
164 168
     margin: 0 0 15px 0;
165 169
   }
166 170
   .right{
167
-    position: absolute;
168
-    top:108px;
169
-    left:170px;
171
+    width: 25%;
172
+    min-width: 1.3rem;
173
+    margin-left: 0.1rem;
174
+    padding-top: 0.3rem;
175
+    // position: absolute;
176
+    // top:108px;
177
+    // left:170px;
170 178
   }
171 179
   .left{
172 180
     position: absolute;
173 181
     top:108px;
174 182
     left:60%;
183
+  
175 184
   }
176 185
   .rightInfo{
177
-    position: absolute;
178
-    top:108px;
179
-    left:80%;
186
+    width: 25%;
187
+    min-width: 1.3rem;
188
+    margin-right: 0.1rem;
189
+    padding-top: 0.3rem;
190
+    // position: absolute;
191
+    // top:108px;
192
+    // left:80%;
180 193
   }
181 194
 
182 195
   .Centered{
183
-    position: absolute;
184
-    top:108px;
185
-    left:30%;
196
+    width: 25%;
197
+    // position: absolute;
198
+    // top:108px;
199
+    // left:30%;
200
+    min-width: 1.3rem;
186 201
     margin: 0 0 15px 0;
187 202
     color:#666;
188
-    font-size: 19px;
203
+    font-size: 0.1rem;
204
+    padding-top: 0.3rem;
189 205
   }
190 206
 
191 207
   .rightCentered{
192
-    position: absolute;
193
-    top:108px;
194
-    left:55%;
208
+    // position: absolute;
209
+    // top:108px;
210
+    // left:55%;
211
+    width: 25%;
212
+    min-width: 1.3rem;
195 213
     margin: 0 0 15px 0;
214
+    padding-top: 0.3rem;
196 215
     color:#666;
197
-    font-size: 19px;
216
+    font-size: 0.1rem;
198 217
   }
199 218
   
200 219
 }