perf: 包价线路增加“包价类型”、“排序”

dev/2025b
Lei OT 2 months ago
parent 3c7028cfc6
commit 5c5d10ef27

@ -49,6 +49,8 @@
"RecommendsRate": "Recommends Rate", "RecommendsRate": "Recommends Rate",
"OpenWeekdays": "Open Weekdays", "OpenWeekdays": "Open Weekdays",
"DisplayToC": "Display To C", "DisplayToC": "Display To C",
"SortOrder": "Sort order",
"subTypeD": "Package Type",
"Dept": "Dept", "Dept": "Dept",
"Code": "Code", "Code": "Code",
"City": "City", "City": "City",

@ -50,6 +50,8 @@
"RecommendsRate": "推荐指数", "RecommendsRate": "推荐指数",
"OpenWeekdays": "开放时间", "OpenWeekdays": "开放时间",
"DisplayToC": "报价信显示", "DisplayToC": "报价信显示",
"SortOrder": "排序",
"subTypeD": "包价类型",
"Dept": "小组", "Dept": "小组",
"Code": "简码", "Code": "简码",
"City": "城市", "City": "城市",

@ -96,20 +96,21 @@ export const useProductsAuditStatesMapVal = (value) => {
}; };
/** /**
* @ignore *
*/ */
export const useProductsTypesFieldsets = (type) => { export const useProductsTypesFieldsets = (type) => {
const [isPermitted] = useAuthStore((state) => [state.isPermitted]); const [isPermitted] = useAuthStore((state) => [state.isPermitted]);
const infoDefault = [['city'], ['title']]; const infoDefault = [['city'], ['title']];
const infoAdmin = ['title', 'product_title', 'code', 'remarks', 'dept']; // 'display_to_c' const infoAdmin = ['title', 'product_title', 'code', 'remarks', 'dept']; // 'display_to_c'
const infoDisplay = isPermitted(PERM_PRODUCTS_MANAGEMENT) ? ['display_to_c'] : []; const infoDisplay = isPermitted(PERM_PRODUCTS_MANAGEMENT) ? ['display_to_c', 'sort_order'] : [];
const infoRecDisplay = isPermitted(PERM_PRODUCTS_MANAGEMENT) ? ['recommends_rate'] : []; const infoRecDisplay = isPermitted(PERM_PRODUCTS_MANAGEMENT) ? ['recommends_rate'] : [];
const subTypeD = isPermitted(PERM_PRODUCTS_MANAGEMENT) ? ['sub_type_D'] : [];
const infoTypesMap = { const infoTypesMap = {
'6': [[...infoDisplay], []], '6': [[...infoDisplay], []],
'B': [['km', ...infoDisplay], []], 'B': [['km', ...infoDisplay], []],
'J': [[...infoRecDisplay, 'duration', ...infoDisplay], ['description']], 'J': [[...infoRecDisplay, 'duration', ...infoDisplay], ['description']],
'Q': [[...infoRecDisplay, 'duration', ...infoDisplay], ['description']], 'Q': [[...infoRecDisplay, 'duration', ...infoDisplay], ['description']],
'D': [[...infoRecDisplay, 'duration', ...infoDisplay], ['description']], 'D': [[...infoRecDisplay, 'duration', ...infoDisplay, ...subTypeD], ['description']],
'7': [[...infoRecDisplay, 'duration', 'open_weekdays', ...infoDisplay], ['description']], '7': [[...infoRecDisplay, 'duration', 'open_weekdays', ...infoDisplay], ['description']],
'R': [[...infoDisplay], ['description']], 'R': [[...infoDisplay], ['description']],
'8': [[...infoDisplay], []], '8': [[...infoDisplay], []],
@ -152,6 +153,8 @@ export const useNewProductRecord = () => {
'create_date': '', 'create_date': '',
'created_by': '', 'created_by': '',
'edit_status': 2, 'edit_status': 2,
'sort_order': '',
'sub_type_D': '',
}, },
lgc_details: [ lgc_details: [
{ {
@ -182,3 +185,21 @@ export const useNewProductRecord = () => {
], ],
}; };
}; };
export const PackageTypes = [
{ key: 35001, value: 35001, label: '飞机接送' },
{ key: 35002, value: 35002, label: '车站接送' },
{ key: 35003, value: 35003, label: '码头接送' },
{ key: 35004, value: 35004, label: '一天游' },
{ key: 35005, value: 35005, label: '半天游' },
{ key: 35006, value: 35006, label: '夜间活动' },
{ key: 35007, value: 35007, label: '大车游' },
{ key: 35008, value: 35008, label: '单车单导' },
{ key: 35009, value: 35009, label: '单租车' },
{ key: 35010, value: 35010, label: '单导游' },
{ key: 35011, value: 35011, label: '火车站接送' },
{ key: 35012, value: 35012, label: '门票预定' },
{ key: 35013, value: 35013, label: '车导费' },
{ key: 35014, value: 35014, label: '其它(餐补等)' },
];

@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next';
import { useWeekdays } from '@/hooks/useDatePresets'; import { useWeekdays } from '@/hooks/useDatePresets';
import DeptSelector from '@/components/DeptSelector'; import DeptSelector from '@/components/DeptSelector';
import CitySelector from '@/components/CitySelector'; import CitySelector from '@/components/CitySelector';
import { useProductsTypesFieldsets } from '@/hooks/useProductsSets'; import { useProductsTypesFieldsets, PackageTypes } from '@/hooks/useProductsSets';
import useProductsStore from '@/stores/Products/Index'; import useProductsStore from '@/stores/Products/Index';
import ProductInfoLgc from './ProductInfoLgc'; import ProductInfoLgc from './ProductInfoLgc';
import ProductInfoQuotation from './ProductInfoQuotation'; import ProductInfoQuotation from './ProductInfoQuotation';
@ -306,6 +306,33 @@ function getFields(props) {
</Form.Item>, </Form.Item>,
fieldProps?.display_to_c?.col || midCol fieldProps?.display_to_c?.col || midCol
), ),
item(
'sub_type_D',
99,
<Form.Item
name='sub_type_D'
label={t('subTypeD')}
{...fieldProps.sub_type_D}
rules={[{ required: true }]}
// tooltip={t('FormTooltip.subTypeD')}
>
<Select
labelInValue={false}
options={PackageTypes}
{...styleProps}
{...editableProps('sub_type_D')}
/>
</Form.Item>,
fieldProps?.sub_type_D?.col || midCol
),
item(
'sort_order',
99,
<Form.Item name='sort_order' label={t('SortOrder')} {...fieldProps.sort_order} >
<InputNumber {...styleProps} {...editableProps('sort_order')} min={1} max={1000} />
</Form.Item>,
fieldProps?.sort_order?.col || midCol
),
item( item(
'open_weekdays', 'open_weekdays',
99, 99,

Loading…
Cancel
Save