diff --git a/src/components/saleModeTag/index.tsx b/src/components/saleModeTag/index.tsx index 89195ad..4f7927b 100644 --- a/src/components/saleModeTag/index.tsx +++ b/src/components/saleModeTag/index.tsx @@ -5,25 +5,26 @@ import Tag, { TagSize } from "../tag" interface SaleModeProps { saleMode: number size?: TagSize + customClassName?: string children?: React.ReactNode } const SaleModeTag: FC = (props) => { - const { saleMode, size = 'small' } = props + const { saleMode, size = 'small', customClassName } = props return ( <> {saleMode === EnumSaleMode.Bulk && ( - + 大货 )} {saleMode === EnumSaleMode.Plate && ( - + 剪板 )} {saleMode === EnumSaleMode.BulkCut && ( - + 散剪 )} diff --git a/src/pages/delivery/components/ItemList/index.tsx b/src/pages/delivery/components/ItemList/index.tsx index aad66eb..98f28a3 100644 --- a/src/pages/delivery/components/ItemList/index.tsx +++ b/src/pages/delivery/components/ItemList/index.tsx @@ -7,13 +7,14 @@ import NormalButton from '@/components/normalButton' import styles from './index.module.scss' import classnames from 'classnames' import { EnumSaleMode } from '@/common/Enumerate' -import { formatDateTime } from '@/common/format' +import { formatDateTime, formatMeterDiv } from '@/common/format' import { goLink } from '@/common/common' import { DeliveryNoticeOrderAudit } from '@/api/index' import Taro from '@tarojs/taro' +import SaleModeTag from '@/components/saleModeTag' type PropsType = { - itemData?: Record + itemData: Record onSuccess?: Function } @@ -63,22 +64,9 @@ const ItemList:FC = (props) => { 货品信息: - {itemData?.sale_mode === EnumSaleMode.Bulk && ( - - 大货 - - )} - {itemData?.sale_mode === EnumSaleMode.Plate && ( - - 剪板 - - )} - {itemData?.sale_mode === EnumSaleMode.BulkCut && ( - - 散剪 - - )} - 2种面料,4种颜色,共{itemData?.sale_mode === EnumSaleMode.Bulk ? `${itemData?.delivery_roll}条` : `${itemData?.delivery_length}米`} + + {itemData.delivery_product_nums}种面料,{itemData.delivery_product_color_nums}种颜色,共 + {itemData?.sale_mode === EnumSaleMode.Bulk ? `${itemData?.delivery_roll}条` : `${formatMeterDiv(itemData?.delivery_length)}米`} diff --git a/src/pages/delivery/index.tsx b/src/pages/delivery/index.tsx index 1bdc83f..918cdd9 100644 --- a/src/pages/delivery/index.tsx +++ b/src/pages/delivery/index.tsx @@ -1,7 +1,6 @@ import { View, Text } from '@tarojs/components' import { useCallback, useEffect, useMemo, useRef, useState, FC, memo } from 'react' import styles from './index.module.scss' -import classnames from 'classnames' import Search from '@/components/search' import { DeliverNoticeOrderList, EnumSaleorderStatus } from '@/api/index' import Taro from '@tarojs/taro'