|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { useState } from 'react'
|
|
|
|
|
import { Table, Form, Modal, Button, Radio, Input, Flex, Card, Select, InputNumber, Checkbox, DatePicker, Space, App, Tooltip } from 'antd'
|
|
|
|
|
import { Table, Form, Modal, Button, Radio, Input, Flex, Card, InputNumber, Checkbox, DatePicker, Space, App, Tooltip } from 'antd'
|
|
|
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
|
import { CloseOutlined, StarTwoTone, PlusOutlined, ExclamationCircleFilled, QuestionCircleOutlined, QuestionOutlined } from '@ant-design/icons'
|
|
|
|
|
import { useDatePresets } from '@/hooks/useDatePresets'
|
|
|
|
@ -206,20 +206,20 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
|
|
|
|
|
{ title: t('products:childrenPrice'), dataIndex: 'child_cost', width: '5rem' },
|
|
|
|
|
{ title: t('products:currency'), dataIndex: 'currency', width: '4rem' },
|
|
|
|
|
{
|
|
|
|
|
title: t('products:PriceUnit.title'),
|
|
|
|
|
title: t('products:unit_name'),
|
|
|
|
|
dataIndex: 'unit_id',
|
|
|
|
|
width: '4rem',
|
|
|
|
|
render: (text) => t(`products:PriceUnit.${text}`), // (text === '0' ? '每人' : text === '1' ? '每团' : text),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: t('products:number'),
|
|
|
|
|
title: t('products:group_size'),
|
|
|
|
|
dataIndex: 'group_size',
|
|
|
|
|
width: '4rem',
|
|
|
|
|
render: (_, record) => `${record.group_size_min}-${record.group_size_max}`,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: (<>{t('products:validityPeriod')} <Tooltip placement='top' overlayInnerStyle={{width: '24rem'}} title={t('products:FormTooltip.UseDates')}><QuestionCircleOutlined className='text-gray-500' /></Tooltip> </>),
|
|
|
|
|
title: (<>{t('products:use_dates')} <Tooltip placement='top' overlayInnerStyle={{width: '24rem'}} title={t('products:FormTooltip.UseDates')}><QuestionCircleOutlined className='text-gray-500' /></Tooltip> </>),
|
|
|
|
|
dataIndex: 'use_dates',
|
|
|
|
|
// width: '6rem',
|
|
|
|
|
render: (_, record) => `${record.use_dates_start}-${record.use_dates_end}`,
|
|
|
|
@ -414,7 +414,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
|
|
|
|
|
</Radio.Group>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t('products:Types')}
|
|
|
|
|
label={t('products:unit_name')}
|
|
|
|
|
name='unit_id'
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -429,7 +429,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
|
|
|
|
|
</Radio.Group>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t('products:number')}
|
|
|
|
|
label={t('products:group_size')}
|
|
|
|
|
name='group_size_min'
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -441,7 +441,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
|
|
|
|
|
<InputNumber style={{ width: '100%' }} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t('products:number')}
|
|
|
|
|
label={t('products:group_size')}
|
|
|
|
|
name='group_size_max'
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -453,7 +453,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
|
|
|
|
|
<InputNumber style={{ width: '100%' }} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t('products:validityPeriod')}
|
|
|
|
|
label={t('products:use_dates')}
|
|
|
|
|
name='use_dates'
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|