✨ feat(发货列表): 完善面料颜色数量
This commit is contained in:
parent
b9a0b64826
commit
06c593e3d8
@ -5,25 +5,26 @@ import Tag, { TagSize } from "../tag"
|
||||
interface SaleModeProps {
|
||||
saleMode: number
|
||||
size?: TagSize
|
||||
customClassName?: string
|
||||
children?: React.ReactNode
|
||||
}
|
||||
|
||||
const SaleModeTag: FC<SaleModeProps> = (props) => {
|
||||
const { saleMode, size = 'small' } = props
|
||||
const { saleMode, size = 'small', customClassName } = props
|
||||
return (
|
||||
<>
|
||||
{saleMode === EnumSaleMode.Bulk && (
|
||||
<Tag circle type='primary' plain size={size}>
|
||||
<Tag circle type='primary' plain size={size} customClassName={customClassName}>
|
||||
大货
|
||||
</Tag>
|
||||
)}
|
||||
{saleMode === EnumSaleMode.Plate && (
|
||||
<Tag circle type='danger' plain size={size}>
|
||||
<Tag circle type='danger' plain size={size} customClassName={customClassName}>
|
||||
剪板
|
||||
</Tag>
|
||||
)}
|
||||
{saleMode === EnumSaleMode.BulkCut && (
|
||||
<Tag circle type='warning' plain size={size}>
|
||||
<Tag circle type='warning' plain size={size} customClassName={customClassName}>
|
||||
散剪
|
||||
</Tag>
|
||||
)}
|
||||
|
@ -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<string, any>
|
||||
itemData: Record<string, any>
|
||||
onSuccess?: Function
|
||||
}
|
||||
|
||||
@ -63,22 +64,9 @@ const ItemList:FC<PropsType> = (props) => {
|
||||
<View className={classnames(styles.content__row, styles.bord)}>
|
||||
<View className={styles.content__row__left}>货品信息:</View>
|
||||
<View className={styles.content__row__right}>
|
||||
{itemData?.sale_mode === EnumSaleMode.Bulk && (
|
||||
<Tag type='primary' circle plain size='small' customClassName={styles.tag}>
|
||||
大货
|
||||
</Tag>
|
||||
)}
|
||||
{itemData?.sale_mode === EnumSaleMode.Plate && (
|
||||
<Tag type='danger' circle plain size='small' customClassName={styles.tag}>
|
||||
剪板
|
||||
</Tag>
|
||||
)}
|
||||
{itemData?.sale_mode === EnumSaleMode.BulkCut && (
|
||||
<Tag type='warning' circle plain size='small' customClassName={styles.tag}>
|
||||
散剪
|
||||
</Tag>
|
||||
)}
|
||||
2种面料,4种颜色,共{itemData?.sale_mode === EnumSaleMode.Bulk ? `${itemData?.delivery_roll}条` : `${itemData?.delivery_length}米`}
|
||||
<SaleModeTag saleMode={itemData.sale_mode} size='small' customClassName={styles.tag}></SaleModeTag>
|
||||
{itemData.delivery_product_nums}种面料,{itemData.delivery_product_color_nums}种颜色,共
|
||||
{itemData?.sale_mode === EnumSaleMode.Bulk ? `${itemData?.delivery_roll}条` : `${formatMeterDiv(itemData?.delivery_length)}米`}
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.content__row}>
|
||||
|
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user