perf: 人等的显示

dev/2025b
Lei OT 2 months ago
parent 3422b7c080
commit f3a442aaf2

@ -204,3 +204,6 @@ export const PackageTypes = [
{ key: '35014', value: '35014', label: '其它(餐补等)' }, { key: '35014', value: '35014', label: '其它(餐补等)' },
]; ];
export const formatGroupSize = (min, max) => {
return max === 1000 ? min === 0 ? '不限人等' : `${min}人以上` : `${min}-${max}`;
};

@ -6,6 +6,7 @@ import { useDatePresets } from '@/hooks/useDatePresets'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import useProductsStore from '@/stores/Products/Index' import useProductsStore from '@/stores/Products/Index'
import PriceCompactInput from '@/views/products/Detail/PriceCompactInput' import PriceCompactInput from '@/views/products/Detail/PriceCompactInput'
import { formatGroupSize } from '@/hooks/useProductsSets'
const { RangePicker } = DatePicker const { RangePicker } = DatePicker
@ -216,7 +217,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
title: t('products:group_size'), title: t('products:group_size'),
dataIndex: 'group_size', dataIndex: 'group_size',
width: '6rem', width: '6rem',
render: (_, record) => `${record.group_size_min}-${record.group_size_max}`, render: (_, record) => formatGroupSize(record.group_size_min,record.group_size_max),
}, },
{ {

Loading…
Cancel
Save