✨ feat(发货列表): 完善面料颜色数量
This commit is contained in:
parent
b9a0b64826
commit
06c593e3d8
@ -5,25 +5,26 @@ import Tag, { TagSize } from "../tag"
|
|||||||
interface SaleModeProps {
|
interface SaleModeProps {
|
||||||
saleMode: number
|
saleMode: number
|
||||||
size?: TagSize
|
size?: TagSize
|
||||||
|
customClassName?: string
|
||||||
children?: React.ReactNode
|
children?: React.ReactNode
|
||||||
}
|
}
|
||||||
|
|
||||||
const SaleModeTag: FC<SaleModeProps> = (props) => {
|
const SaleModeTag: FC<SaleModeProps> = (props) => {
|
||||||
const { saleMode, size = 'small' } = props
|
const { saleMode, size = 'small', customClassName } = props
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{saleMode === EnumSaleMode.Bulk && (
|
{saleMode === EnumSaleMode.Bulk && (
|
||||||
<Tag circle type='primary' plain size={size}>
|
<Tag circle type='primary' plain size={size} customClassName={customClassName}>
|
||||||
大货
|
大货
|
||||||
</Tag>
|
</Tag>
|
||||||
)}
|
)}
|
||||||
{saleMode === EnumSaleMode.Plate && (
|
{saleMode === EnumSaleMode.Plate && (
|
||||||
<Tag circle type='danger' plain size={size}>
|
<Tag circle type='danger' plain size={size} customClassName={customClassName}>
|
||||||
剪板
|
剪板
|
||||||
</Tag>
|
</Tag>
|
||||||
)}
|
)}
|
||||||
{saleMode === EnumSaleMode.BulkCut && (
|
{saleMode === EnumSaleMode.BulkCut && (
|
||||||
<Tag circle type='warning' plain size={size}>
|
<Tag circle type='warning' plain size={size} customClassName={customClassName}>
|
||||||
散剪
|
散剪
|
||||||
</Tag>
|
</Tag>
|
||||||
)}
|
)}
|
||||||
|
@ -7,13 +7,14 @@ import NormalButton from '@/components/normalButton'
|
|||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import { EnumSaleMode } from '@/common/Enumerate'
|
import { EnumSaleMode } from '@/common/Enumerate'
|
||||||
import { formatDateTime } from '@/common/format'
|
import { formatDateTime, formatMeterDiv } from '@/common/format'
|
||||||
import { goLink } from '@/common/common'
|
import { goLink } from '@/common/common'
|
||||||
import { DeliveryNoticeOrderAudit } from '@/api/index'
|
import { DeliveryNoticeOrderAudit } from '@/api/index'
|
||||||
import Taro from '@tarojs/taro'
|
import Taro from '@tarojs/taro'
|
||||||
|
import SaleModeTag from '@/components/saleModeTag'
|
||||||
|
|
||||||
type PropsType = {
|
type PropsType = {
|
||||||
itemData?: Record<string, any>
|
itemData: Record<string, any>
|
||||||
onSuccess?: Function
|
onSuccess?: Function
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,22 +64,9 @@ const ItemList:FC<PropsType> = (props) => {
|
|||||||
<View className={classnames(styles.content__row, styles.bord)}>
|
<View className={classnames(styles.content__row, styles.bord)}>
|
||||||
<View className={styles.content__row__left}>货品信息:</View>
|
<View className={styles.content__row__left}>货品信息:</View>
|
||||||
<View className={styles.content__row__right}>
|
<View className={styles.content__row__right}>
|
||||||
{itemData?.sale_mode === EnumSaleMode.Bulk && (
|
<SaleModeTag saleMode={itemData.sale_mode} size='small' customClassName={styles.tag}></SaleModeTag>
|
||||||
<Tag type='primary' circle plain size='small' customClassName={styles.tag}>
|
{itemData.delivery_product_nums}种面料,{itemData.delivery_product_color_nums}种颜色,共
|
||||||
大货
|
{itemData?.sale_mode === EnumSaleMode.Bulk ? `${itemData?.delivery_roll}条` : `${formatMeterDiv(itemData?.delivery_length)}米`}
|
||||||
</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}米`}
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.content__row}>
|
<View className={styles.content__row}>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { View, Text } from '@tarojs/components'
|
import { View, Text } from '@tarojs/components'
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState, FC, memo } from 'react'
|
import { useCallback, useEffect, useMemo, useRef, useState, FC, memo } from 'react'
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import classnames from 'classnames'
|
|
||||||
import Search from '@/components/search'
|
import Search from '@/components/search'
|
||||||
import { DeliverNoticeOrderList, EnumSaleorderStatus } from '@/api/index'
|
import { DeliverNoticeOrderList, EnumSaleorderStatus } from '@/api/index'
|
||||||
import Taro from '@tarojs/taro'
|
import Taro from '@tarojs/taro'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user