Commit 7780aaa40fd15cb24138718b3b5b49ee79f897ea
1 parent
04acf26a
feat: update
Showing
1 changed file
with
49 additions
and
41 deletions
src/pages/Order/index.tsx
... | ... | @@ -7,9 +7,10 @@ import { |
7 | 7 | import { orderExport } from '@/services/order'; |
8 | 8 | import { enumValueToLabel, formatDateTime } from '@/utils'; |
9 | 9 | import { |
10 | - ClockCircleOutlined, | |
11 | - CopyOutlined, | |
10 | + ClockCircleTwoTone, | |
11 | + CopyTwoTone, | |
12 | 12 | DownOutlined, |
13 | + EditTwoTone, | |
13 | 14 | EllipsisOutlined, |
14 | 15 | } from '@ant-design/icons'; |
15 | 16 | import { |
... | ... | @@ -22,6 +23,7 @@ import { |
22 | 23 | Avatar, |
23 | 24 | Button, |
24 | 25 | Checkbox, |
26 | + Divider, | |
25 | 27 | Dropdown, |
26 | 28 | Flex, |
27 | 29 | MenuProps, |
... | ... | @@ -181,32 +183,32 @@ const OrderPage = () => { |
181 | 183 | {optRecord.productName} |
182 | 184 | </div> |
183 | 185 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
184 | - {optRecord.parameters} | |
186 | + <span className="text-gray-500">参数:{optRecord.parameters}</span> | |
185 | 187 | </div> |
186 | - <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> | |
187 | - {optRecord.notes} | |
188 | - <Button | |
189 | - type="dashed" | |
190 | - size="small" | |
188 | + <Flex title={optRecord.notes}> | |
189 | + <div className="max-w-[90%] whitespace-no-wrap overflow-hidden overflow-ellipsis"> | |
190 | + <span className="text-gray-500">备注:{optRecord.notes}</span> | |
191 | + </div> | |
192 | + <EditTwoTone | |
191 | 193 | onClick={() => { |
192 | 194 | setNotesEditVisible(true); |
193 | 195 | setOrderRow(optRecord); |
194 | 196 | setIsMainOrder(false); |
195 | 197 | }} |
196 | - > | |
197 | - 详情 | |
198 | - </Button> | |
199 | - </div> | |
198 | + /> | |
199 | + </Flex> | |
200 | 200 | </Flex> |
201 | 201 | <Flex className="w-[16%]" vertical gap="small"> |
202 | 202 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
203 | - 单价:¥{optRecord.productPrice} | |
203 | + <span className="text-gray-500">单价:</span>¥ | |
204 | + {optRecord.productPrice} | |
204 | 205 | </div> |
205 | 206 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
206 | - 数量:x{optRecord.quantity} | |
207 | + <span className="text-gray-500">数量:</span>x{optRecord.quantity} | |
207 | 208 | </div> |
208 | 209 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
209 | - 合计:¥{optRecord.subOrderPayment} | |
210 | + <span className="text-gray-500">合计:</span>¥ | |
211 | + {optRecord.subOrderPayment} | |
210 | 212 | </div> |
211 | 213 | </Flex> |
212 | 214 | <Flex className="w-[10%]" vertical gap="small"> |
... | ... | @@ -448,13 +450,6 @@ const OrderPage = () => { |
448 | 450 | |
449 | 451 | // 主订单内容渲染 |
450 | 452 | const MainOrderColumnRender = ({ record }: { record: OrderListItemType }) => { |
451 | - // const handleExpand = (key: number) => { | |
452 | - // const newExpandedRowKeys = expandedRowKeys.includes(key) | |
453 | - // ? expandedRowKeys.filter((k) => k !== key) | |
454 | - // : [...expandedRowKeys, key]; | |
455 | - | |
456 | - // setExpandedRowKeys(newExpandedRowKeys); | |
457 | - // }; | |
458 | 453 | return ( |
459 | 454 | <Flex vertical={true}> |
460 | 455 | {/* 编号、时间、销售信息 */} |
... | ... | @@ -469,43 +464,56 @@ const OrderPage = () => { |
469 | 464 | onChange={() => onCheckboxChange(record.id)} |
470 | 465 | checked={selectedItems.includes(record.id)} |
471 | 466 | > |
467 | + <Space split={<Divider type="vertical" />}> | |
468 | + <div> | |
469 | + <span className="text-gray-500">订单号:</span> | |
470 | + <span>{record.id}</span> | |
471 | + </div> | |
472 | + <span>{formatDateTime(record.createTime)}</span> | |
473 | + </Space> | |
474 | + </Checkbox> | |
475 | + <Space split={<Divider type="vertical" />}> | |
472 | 476 | <div> |
473 | - 订单号:{record.id} | |
474 | - {' ' + formatDateTime(record.createTime)} | |
477 | + <span className="text-gray-500">代表:</span> | |
478 | + {record.salesCode} | |
475 | 479 | </div> |
476 | - </Checkbox> | |
477 | - <div>代表:{record.salesCode}</div> | |
478 | - <span>单位:{record.institution}</span> | |
479 | - <span>联系人:{record.institutionContactName}</span> | |
480 | + <span> | |
481 | + <span className="text-gray-500">单位:</span> | |
482 | + {record.institution} | |
483 | + </span> | |
484 | + <span> | |
485 | + <span className="text-gray-500">联系人:</span> | |
486 | + {record.institutionContactName} | |
487 | + </span> | |
488 | + </Space> | |
480 | 489 | </Flex> |
481 | 490 | </Flex> |
482 | 491 | <Flex className="pl-6" align="center"> |
483 | - <div> | |
484 | - 备注: | |
485 | - <span className="ml-2">{record.notes}</span> | |
492 | + <div title={record.notes}> | |
493 | + <div className="max-w-md whitespace-no-wrap overflow-hidden overflow-ellipsis"> | |
494 | + <span className="text-gray-500">备注:</span> | |
495 | + <span className="ml-2">{record.notes}</span> | |
496 | + </div> | |
486 | 497 | </div> |
487 | - <Button | |
488 | - className="p-0" | |
489 | - type="link" | |
498 | + <EditTwoTone | |
499 | + className="hover:curcor-pointer" | |
490 | 500 | onClick={() => { |
491 | 501 | setNotesEditVisible(true); |
492 | 502 | setOrderRow(record); |
493 | 503 | setIsMainOrder(true); |
494 | 504 | }} |
495 | - > | |
496 | - 备注 | |
497 | - </Button> | |
505 | + /> | |
498 | 506 | </Flex> |
499 | 507 | </Flex> |
500 | 508 | <Flex wrap="wrap" gap="middle" vertical> |
501 | 509 | <Flex justify="flex-end"> |
502 | 510 | <Flex wrap="wrap" gap="middle" align="center"> |
503 | 511 | <div> |
504 | - 总金额: | |
512 | + <span>总金额:</span> | |
505 | 513 | <span className="text-lg">{record.totalPayment}¥</span> |
506 | 514 | </div> |
507 | 515 | {rolePath?.includes('addOrder') ? ( |
508 | - <CopyOutlined | |
516 | + <CopyTwoTone | |
509 | 517 | className="hover:cursor-pointer" |
510 | 518 | onClick={() => { |
511 | 519 | setOrderOptType('copy'); |
... | ... | @@ -522,7 +530,7 @@ const OrderPage = () => { |
522 | 530 | '' |
523 | 531 | )} |
524 | 532 | |
525 | - <ClockCircleOutlined | |
533 | + <ClockCircleTwoTone | |
526 | 534 | className="hover:cursor-pointer" |
527 | 535 | onClick={() => { |
528 | 536 | setHistoryModalVisible(true); |
... | ... | @@ -939,7 +947,7 @@ const OrderPage = () => { |
939 | 947 | // expandable={{ expandedRowRender }} |
940 | 948 | dateFormatter="string" |
941 | 949 | options={false} |
942 | - headerTitle="订单列表" | |
950 | + headerTitle="" | |
943 | 951 | search={{ |
944 | 952 | labelWidth: 'auto', |
945 | 953 | // onCollapse: resize, | ... | ... |