perf: 产品管理: form tooltip: new Product

perf/export-docx
Lei OT 11 months ago
parent d8cf4da101
commit ef8cda5002

@ -48,7 +48,7 @@
"OpenHours": "Open Hours",
"Duration": "Duration",
"KM": "KM",
"RecommendsRate": "RecommendsRate",
"RecommendsRate": "Recommends Rate",
"OpenWeekdays": "Open Weekdays",
"DisplayToC": "Display To C",
"Dept": "Dept",
@ -120,16 +120,59 @@
"Type": "Product Type",
"Title": "Title",
"Code": "Code",
"City": "City",
"City": "起始城市,举例:北京",
"Dept": "Department",
"Duration": "Duration",
"RecommendsRate": "RecommendsRate",
"Duration": "",
"RecommendsRate": "Recommends Rate",
"OpenHours": "Open Hours",
"OpenWeekdays": "Open Weekdays",
"DisplayToC": "Display Type",
"KM": "KM",
"KM": "往返",
"Description": "Description",
"Remarks": "Memo"
"Remarks": "",
"NewTitle": {
"6": "",
"B": "A点-B点举例桂林-龙胜",
"J": "A点-B点时长车费举例张家界5晚6天车费",
"Q": "城市语种导游工资单位,举例:北京英文导游工资(元/天/团)",
"7": "官方景点名称,举例:陕西历史博物馆",
"R": "普通、豪华、特色餐标,举例:普通餐标",
"8": "举例:故宫导游门票",
"D": "城市A点-B点时间包含内容举例北京市区一日游车导"
},
"----Todo: 下面一组待定": "#",
"6": {
"Title": "",
"#": ""
},
"B": {
"Title": "A点-B点举例桂林-龙胜",
"#": ""
},
"J": {
"Title": "A点-B点时长车费举例张家界5晚6天车费",
"#": ""
},
"Q": {
"Title": "城市语种导游工资单位,举例:北京英文导游工资(元/天/团)",
"#": ""
},
"7": {
"Title": "官方景点名称,举例:陕西历史博物馆",
"#": ""
},
"R": {
"Title": "普通、豪华、特色餐标,举例:普通餐标",
"#": ""
},
"8": {
"Title": "举例:故宫导游门票",
"#": ""
},
"D": {
"Title": "城市A点-B点时间包含内容举例北京市区一日游车导",
"#": ""
}
},
"LgcModal": {

@ -104,20 +104,31 @@
"Weekdays": "周末",
"Operation": "Operation"
},
"FormTooltop": {
"FormTooltip": {
"Type": "Product Type",
"Title": "Title",
"Code": "Code",
"City": "City",
"dept": "Department",
"Duration": "Duration",
"RecommendsRate": "RecommendsRate",
"City": "起始城市,举例:北京",
"Dept": "Department",
"Duration": "",
"RecommendsRate": "Recommends Rate",
"OpenHours": "Open Hours",
"OpenWeekdays": "Open Weekdays",
"DisplayToC": "Display Type",
"KM": "KM",
"KM": "往返",
"Description": "Description",
"Remarks": "Remarks"
"Remarks": "",
"NewTitle": {
"6": "",
"B": "A点-B点举例桂林-龙胜",
"J": "A点-B点时长车费举例张家界5晚6天车费",
"Q": "城市语种导游工资单位,举例:北京英文导游工资(元/天/团)",
"7": "官方景点名称,举例:陕西历史博物馆",
"R": "普通、豪华、特色餐标,举例:普通餐标",
"8": "举例:故宫导游门票",
"D": "城市A点-B点时间包含内容举例北京市区一日游车导"
}
},
"LgcModal": {

@ -145,7 +145,7 @@ export const useNewProductRecord = () => {
'dept_id': 0,
'dept_name': '',
'display_to_c': 0,
'km': 0,
'km': undefined,
'city_id': 0,
'city_name': '',
'open_hours': '',

@ -17,15 +17,21 @@ export const NewProductsForm = ({ initialValues, onFormInstanceReady, ...props }
onFormInstanceReady(form);
}, []);
const onValuesChange = (changeValues, allValues) => {};
const [pickType, setPickType] = useState({ value: "6"});
const onValuesChange = (changeValues, allValues) => {
if ('products_type' in changeValues) {
setPickType(changeValues.products_type);
}
};
return (
<Form layout='horizontal' form={form} name='new_product_in_modal' initialValues={initialValues} onValuesChange={onValuesChange}>
<Form.Item name={`products_type`} label={t('products:ProductType')} rules={[{ required: true }]} tooltip={t('FormTooltip.Type')}>
<ProductsTypesSelector maxTagCount={1} mode={null} placeholder={t('All')} />
<Form.Item name={`products_type`} label={t('products:ProductType')} rules={[{ required: true }]} tooltip={false}>
<ProductsTypesSelector maxTagCount={1} mode={null} placeholder={t('common:All')} />
</Form.Item>
<Form.Item name={`title`} label={t('products:Title')} rules={[{ required: true }]} tooltip={t('FormTooltip.Title')}>
<Input />
<Form.Item name={`title`} label={t('products:Title')} rules={[{ required: true }]} tooltip={t(`FormTooltip.NewTitle.${pickType.value}`)} dependencies={['products_type']}>
{/* ${pickType.value} */}
<Input placeholder={t(`FormTooltip.NewTitle.${pickType.value}`)} />
</Form.Item>
</Form>
);
@ -84,7 +90,7 @@ export const NewProductModal = ({ source, action = '#' | 'o', open, onSubmit, on
<Modal
width={600}
open={open}
title={`${t('New')}${t('products:#')}`}
title={`${t('common:New')}${t('products:#')}`}
okButtonProps={{
autoFocus: true,
}}

@ -25,10 +25,11 @@ const ProductInfoLgc = ({ editable, formInstance, ...props }) => {
forceRender: true,
children: (
<Form.Item noStyle>
<Form.Item name={['lgc_details_mapped', `${ele.lgc}`, 'title']} label={t('products:Title')} initialValue={ele.title} rules={[{ required: true }]} tooltip={t('FormTooltip.Title')}>
<Form.Item name={['lgc_details_mapped', `${ele.lgc}`, 'title']} label={t('products:Title')} initialValue={ele.title} rules={[{ required: true }]} tooltip={t(`FormTooltip.NewTitle.${editingProduct?.info?.product_type_id}`)}>
<Input
className={' !text-slate-600'}
allowClear
placeholder={t(`FormTooltip.NewTitle.${editingProduct?.info?.product_type_id}`)}
// onChange={(e) => handleChange('title', e.target.value)}
// disabled={ignoreEditable ? false : (!isEmpty(ele.title) || !editable)}
// disabled={ignoreEditable ? false : !editable}
@ -86,8 +87,8 @@ const ProductInfoLgc = ({ editable, formInstance, ...props }) => {
key: lgcItem.value,
children: (
<Form.Item noStyle>
<Form.Item name={['lgc_details_mapped', `${lgcItem.value}`, 'title']} preserve={false} label={t('products:Title')} rules={[{ required: true }]} tooltip={t('FormTooltip.Title')}>
<Input allowClear />
<Form.Item name={['lgc_details_mapped', `${lgcItem.value}`, 'title']} preserve={false} label={t('products:Title')} rules={[{ required: true }]} tooltip={t(`FormTooltip.NewTitle.${editingProduct?.info?.product_type_id}`)}>
<Input allowClear placeholder={t(`FormTooltip.NewTitle.${editingProduct?.info?.product_type_id}`)} />
</Form.Item>
<Form.Item name={['lgc_details_mapped', `${lgcItem.value}`, 'description']} preserve={false} label={t('products:Description')} tooltip={t('FormTooltip.Description')}>
<Input.TextArea rows={3} allowClear />

Loading…
Cancel
Save