Commit d5a14e930f3a40c2ffc272c244482ba05599c866
1 parent
ca02506c
feat: 添加关联销售
Showing
2 changed files
with
22 additions
and
13 deletions
src/pages/Client/Client/Components/ClientDrawer.tsx
@@ -371,7 +371,7 @@ export default ({ optType, record, onFinish }) => { | @@ -371,7 +371,7 @@ export default ({ optType, record, onFinish }) => { | ||
371 | <ProFormSelect | 371 | <ProFormSelect |
372 | name="affiliateSales" | 372 | name="affiliateSales" |
373 | options={affiliateSalesOptions} | 373 | options={affiliateSalesOptions} |
374 | - placeholder="请选择指派人员" | 374 | + placeholder="请选择关联销售" |
375 | rules={[{ required: true, message: '请选择关联销售' }]} | 375 | rules={[{ required: true, message: '请选择关联销售' }]} |
376 | mode="multiple" | 376 | mode="multiple" |
377 | /> | 377 | /> |
src/pages/Client/Client/index.tsx
@@ -301,12 +301,15 @@ const columns = [ | @@ -301,12 +301,15 @@ const columns = [ | ||
301 | action.reload(); // 刷新表格 | 301 | action.reload(); // 刷新表格 |
302 | } | 302 | } |
303 | }; | 303 | }; |
304 | - if (record?.paths?.includes('DETAIL')) { | ||
305 | - return [ | 304 | + return [ |
305 | + record?.paths?.includes('DETAIL') && ( | ||
306 | <CommunicationHistoryModal | 306 | <CommunicationHistoryModal |
307 | key={'communicationHistory'} | 307 | key={'communicationHistory'} |
308 | record={record} | 308 | record={record} |
309 | - />, | 309 | + /> |
310 | + ), | ||
311 | + | ||
312 | + record?.paths?.includes('DETAIL') && ( | ||
310 | <ClientDrawer | 313 | <ClientDrawer |
311 | key={'detail'} | 314 | key={'detail'} |
312 | record={record} | 315 | record={record} |
@@ -314,7 +317,10 @@ const columns = [ | @@ -314,7 +317,10 @@ const columns = [ | ||
314 | onFinish={() => { | 317 | onFinish={() => { |
315 | action.reload(); | 318 | action.reload(); |
316 | }} | 319 | }} |
317 | - ></ClientDrawer>, | 320 | + /> |
321 | + ), | ||
322 | + | ||
323 | + record?.paths?.includes('DETAIL') && ( | ||
318 | <ClientModal | 324 | <ClientModal |
319 | key={'add'} | 325 | key={'add'} |
320 | data={record} | 326 | data={record} |
@@ -322,7 +328,10 @@ const columns = [ | @@ -322,7 +328,10 @@ const columns = [ | ||
322 | action?.reload(); | 328 | action?.reload(); |
323 | }} | 329 | }} |
324 | type={'add'} | 330 | type={'add'} |
325 | - />, | 331 | + /> |
332 | + ), | ||
333 | + | ||
334 | + record?.paths?.includes('EDIT') && ( | ||
326 | <ClientDrawer | 335 | <ClientDrawer |
327 | key={'edit'} | 336 | key={'edit'} |
328 | record={record} | 337 | record={record} |
@@ -330,10 +339,10 @@ const columns = [ | @@ -330,10 +339,10 @@ const columns = [ | ||
330 | onFinish={() => { | 339 | onFinish={() => { |
331 | action.reload(); | 340 | action.reload(); |
332 | }} | 341 | }} |
333 | - ></ClientDrawer>, | ||
334 | - // <a key={'delete'} onClick={handleDelete}> | ||
335 | - // 删除 | ||
336 | - // </a>, | 342 | + /> |
343 | + ), | ||
344 | + | ||
345 | + record?.paths?.includes('DELETE') && ( | ||
337 | <ButtonConfirm | 346 | <ButtonConfirm |
338 | key="delete" | 347 | key="delete" |
339 | className="p-0" | 348 | className="p-0" |
@@ -342,9 +351,9 @@ const columns = [ | @@ -342,9 +351,9 @@ const columns = [ | ||
342 | onConfirm={async () => { | 351 | onConfirm={async () => { |
343 | handleDelete(); | 352 | handleDelete(); |
344 | }} | 353 | }} |
345 | - />, | ||
346 | - ]; | ||
347 | - } | 354 | + /> |
355 | + ), | ||
356 | + ]; | ||
348 | }, | 357 | }, |
349 | }, | 358 | }, |
350 | ]; | 359 | ]; |