perf(产品管理): form tooltip

perf/export-docx
Lei OT 11 months ago
parent 96ae28e947
commit be392588db

@ -124,22 +124,23 @@
"City": "起始城市,举例:北京", "City": "起始城市,举例:北京",
"Dept": "Department", "Dept": "Department",
"Duration": "", "Duration": "",
"RecommendsRate": "Recommends Rate", "RecommendsRate": "",
"OpenHours": "Open Hours", "OpenHours": "Open Hours",
"OpenWeekdays": "Open Weekdays", "OpenWeekdays": "Open Weekdays",
"DisplayToC": "Display Type", "DisplayToC": "",
"KM": "往返", "KM": "",
"Description": "Description", "Description": "",
"Remarks": "", "Remarks": "",
"UseDates": "数值越短价格越优先。举例英文导游1.1-12.31价300元 8.1-8.31价400元如走团时间为8月自动取400元。",
"NewTitle": { "NewTitle": {
"6": "", "6": "",
"B": "A点-B点,举例:桂林-龙胜", "B": "A点-B点(有疑议的需加往返/单程),举例:北京大兴机场-市区(单程)",
"J": "A点-B点时长车费举例张家界5晚6天车费", "J": "A点-B点时长车费(有疑议的需加往返/单程),举例:张家界高铁站-市区(车费,单程)",
"Q": "城市语种导游工资单位,举例:北京英导游工资(元/天/团)", "Q": "城市语种导游工资单位,举例:北京英导游工资(元/天/团)",
"7": "官方景点名称,举例:陕西历史博物馆", "7": "官方景点名称,举例:陕西历史博物馆",
"R": "普通、豪华、特色餐标,举例:普通餐标", "R": "普通餐标、豪华餐标、特色餐标,举例:普通餐标",
"8": "举例:故宫导游门票", "8": "举例:故宫导游门票、上海外滩深度游导游补助",
"D": "城市A点-B点时间包含内容举例北京市区一日游车导" "D": "城市A点-B点时间包含内容举例北京市区一日游车导"
}, },
"----Todo: 下面一组待定": "#", "----Todo: 下面一组待定": "#",
"6": { "6": {

@ -113,22 +113,23 @@
"City": "起始城市,举例:北京", "City": "起始城市,举例:北京",
"Dept": "Department", "Dept": "Department",
"Duration": "", "Duration": "",
"RecommendsRate": "Recommends Rate", "RecommendsRate": "",
"OpenHours": "Open Hours", "OpenHours": "Open Hours",
"OpenWeekdays": "Open Weekdays", "OpenWeekdays": "Open Weekdays",
"DisplayToC": "Display Type", "DisplayToC": "",
"KM": "往返", "KM": "",
"Description": "Description", "Description": "",
"Remarks": "", "Remarks": "",
"UseDates": "数值越短价格越优先。举例英文导游1.1-12.31价300元 8.1-8.31价400元如走团时间为8月自动取400元。",
"NewTitle": { "NewTitle": {
"6": "", "6": "",
"B": "A点-B点,举例:桂林-龙胜", "B": "A点-B点(有疑议的需加往返/单程),举例:北京大兴机场-市区(单程)",
"J": "A点-B点时长车费举例张家界5晚6天车费", "J": "A点-B点时长车费(有疑议的需加往返/单程),举例:张家界高铁站-市区(车费,单程)",
"Q": "城市语种导游工资单位,举例:北京英导游工资(元/天/团)", "Q": "城市语种导游工资单位,举例:北京英导游工资(元/天/团)",
"7": "官方景点名称,举例:陕西历史博物馆", "7": "官方景点名称,举例:陕西历史博物馆",
"R": "普通、豪华、特色餐标,举例:普通餐标", "R": "普通餐标、豪华餐标、特色餐标,举例:普通餐标",
"8": "举例:故宫导游门票", "8": "举例:故宫导游门票、上海外滩深度游导游补助",
"D": "城市A点-B点时间包含内容举例北京市区一日游车导" "D": "城市A点-B点时间包含内容举例北京市区一日游车导"
} }
}, },

@ -192,7 +192,7 @@ function getFields(props) {
item( item(
'product_title', 'product_title',
99, 99,
<Form.Item name='product_title' label={t('Title')} {...fieldProps.product_title} rules={[{ required: true }]} tooltip={t('FormTooltip.Title')}> <Form.Item name='product_title' label={t('Title')} {...fieldProps.product_title} rules={[{ required: true }]} tooltip={false}>
<Input allowClear {...fieldComProps.product_title} {...styleProps} {...editableProps('product_title')} /> <Input allowClear {...fieldComProps.product_title} {...styleProps} {...editableProps('product_title')} />
</Form.Item>, </Form.Item>,
fieldProps?.product_title?.col || midCol fieldProps?.product_title?.col || midCol
@ -200,7 +200,7 @@ function getFields(props) {
item( item(
'code', 'code',
99, 99,
<Form.Item name='code' label={t('Code')} {...fieldProps.code} rules={[{ required: true }]} tooltip={t('FormTooltip.Code')}> <Form.Item name='code' label={t('Code')} {...fieldProps.code} rules={[{ required: true }]} tooltip={false}>
<Input allowClear {...fieldComProps.code} {...styleProps} {...editableProps('code')} /> <Input allowClear {...fieldComProps.code} {...styleProps} {...editableProps('code')} />
</Form.Item>, </Form.Item>,
fieldProps?.code?.col || midCol fieldProps?.code?.col || midCol
@ -224,7 +224,7 @@ function getFields(props) {
item( item(
'duration', 'duration',
99, 99,
<Form.Item name='duration' label={t('Duration')} {...fieldProps.duration} rules={[{ required: true, type: 'number', min: 0}]} tooltip={t('FormTooltip.Duration')}> <Form.Item name='duration' label={t('Duration')} {...fieldProps.duration} rules={[{ required: true, type: 'number', min: 0}]} tooltip={false}>
<InputNumber suffix={'H'} max={24} {...styleProps} {...editableProps('duration')} /> <InputNumber suffix={'H'} max={24} {...styleProps} {...editableProps('duration')} />
{/* <Input allowClear {...fieldComProps.duration} suffix={'H'} /> */} {/* <Input allowClear {...fieldComProps.duration} suffix={'H'} /> */}
</Form.Item>, </Form.Item>,
@ -300,7 +300,7 @@ function getFields(props) {
item( item(
'open_weekdays', 'open_weekdays',
99, 99,
<Form.Item name='open_weekdays' label={t('OpenWeekdays')} {...fieldProps.open_weekdays} tooltip={t('FormTooltip.OpenWeekdays')}> <Form.Item name='open_weekdays' label={t('OpenWeekdays')} {...fieldProps.open_weekdays} tooltip={false}>
<Checkbox.Group options={dataSets.weekdays} {...styleProps} {...editableProps('open_weekdays')} /> <Checkbox.Group options={dataSets.weekdays} {...styleProps} {...editableProps('open_weekdays')} />
</Form.Item>, </Form.Item>,
fieldProps?.open_weekdays?.col || 24 fieldProps?.open_weekdays?.col || 24

@ -1,7 +1,7 @@
import { useState } from 'react' import { useState } from 'react'
import { Table, Form, Modal, Button, Radio, Input, Flex, Card, Select, InputNumber, Checkbox, DatePicker, Space, App } from 'antd' import { Table, Form, Modal, Button, Radio, Input, Flex, Card, Select, InputNumber, Checkbox, DatePicker, Space, App, Tooltip } from 'antd'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { CloseOutlined, StarTwoTone, PlusOutlined, ExclamationCircleFilled } from '@ant-design/icons' import { CloseOutlined, StarTwoTone, PlusOutlined, ExclamationCircleFilled, QuestionCircleOutlined, QuestionOutlined } from '@ant-design/icons'
import { useDatePresets } from '@/hooks/useDatePresets' 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'
@ -202,14 +202,14 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
const quotationColumns = [ const quotationColumns = [
{ title: 'id', dataIndex: 'id', width: 40, className: 'italic text-gray-400' }, // test: 0 { title: 'id', dataIndex: 'id', width: 40, className: 'italic text-gray-400' }, // test: 0
{ title: 'WPI_SN', dataIndex: 'WPI_SN', width: 40, className: 'italic text-gray-400' }, // test: 0 { title: 'WPI_SN', dataIndex: 'WPI_SN', width: 40, className: 'italic text-gray-400' }, // test: 0
{ title: t('products:adultPrice'), dataIndex: 'adult_cost', width: '4rem' }, { title: t('products:adultPrice'), dataIndex: 'adult_cost', width: '5rem' },
{ title: t('products:childrenPrice'), dataIndex: 'child_cost', width: '4rem' }, { title: t('products:childrenPrice'), dataIndex: 'child_cost', width: '5rem' },
{ title: t('products:currency'), dataIndex: 'currency', width: '4rem' }, { title: t('products:currency'), dataIndex: 'currency', width: '4rem' },
{ {
title: t('products:Types'), title: t('products:PriceUnit.title'),
dataIndex: 'unit_id', dataIndex: 'unit_id',
width: '4rem', width: '4rem',
render: (text) => (text === '0' ? '每人' : text === '1' ? '每团' : text), render: (text) => t(`products:PriceUnit.${text}`), // (text === '0' ? '' : text === '1' ? '' : text),
}, },
{ {
title: t('products:number'), title: t('products:number'),
@ -219,9 +219,9 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
}, },
{ {
title: t('products:validityPeriod'), title: (<>{t('products:validityPeriod')} <Tooltip placement='top' overlayInnerStyle={{width: '24rem'}} title={t('products:FormTooltip.UseDates')}><QuestionCircleOutlined className='text-gray-500' /></Tooltip> </>),
dataIndex: 'use_dates', dataIndex: 'use_dates',
width: '6rem', // width: '6rem',
render: (_, record) => `${record.use_dates_start}-${record.use_dates_end}`, render: (_, record) => `${record.use_dates_start}-${record.use_dates_end}`,
}, },
@ -229,7 +229,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
{ {
title: t('products:operation'), title: t('products:operation'),
dataIndex: 'operation', dataIndex: 'operation',
width: '3%', width: '10rem',
render: (_, quotation) => { render: (_, quotation) => {
// const _rowEditable = [-1,3].includes(quotation.audit_state_id); // const _rowEditable = [-1,3].includes(quotation.audit_state_id);
const _rowEditable = true; // test: 0 const _rowEditable = true; // test: 0

Loading…
Cancel
Save