diff --git a/public/locales/en/products.json b/public/locales/en/products.json index 7f4357f..529a790 100644 --- a/public/locales/en/products.json +++ b/public/locales/en/products.json @@ -49,6 +49,8 @@ "RecommendsRate": "Recommends Rate", "OpenWeekdays": "Open Weekdays", "DisplayToC": "Display To C", + "SortOrder": "Sort order", + "subTypeD": "Package Type", "Dept": "Dept", "Code": "Code", "City": "City", diff --git a/public/locales/zh/products.json b/public/locales/zh/products.json index a0ef6fa..dc7ff30 100644 --- a/public/locales/zh/products.json +++ b/public/locales/zh/products.json @@ -50,6 +50,8 @@ "RecommendsRate": "推荐指数", "OpenWeekdays": "开放时间", "DisplayToC": "报价信显示", + "SortOrder": "排序", + "subTypeD": "包价类型", "Dept": "小组", "Code": "简码", "City": "城市", diff --git a/src/hooks/useProductsSets.js b/src/hooks/useProductsSets.js index 6a3d464..6db9308 100644 --- a/src/hooks/useProductsSets.js +++ b/src/hooks/useProductsSets.js @@ -96,20 +96,21 @@ export const useProductsAuditStatesMapVal = (value) => { }; /** - * @ignore + * */ export const useProductsTypesFieldsets = (type) => { const [isPermitted] = useAuthStore((state) => [state.isPermitted]); const infoDefault = [['city'], ['title']]; 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 subTypeD = isPermitted(PERM_PRODUCTS_MANAGEMENT) ? ['sub_type_D'] : []; const infoTypesMap = { '6': [[...infoDisplay], []], 'B': [['km', ...infoDisplay], []], 'J': [[...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']], 'R': [[...infoDisplay], ['description']], '8': [[...infoDisplay], []], @@ -152,6 +153,8 @@ export const useNewProductRecord = () => { 'create_date': '', 'created_by': '', 'edit_status': 2, + 'sort_order': '', + 'sub_type_D': '', }, 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: '其它(餐补等)' }, +]; + diff --git a/src/views/products/Detail/ProductInfoForm.jsx b/src/views/products/Detail/ProductInfoForm.jsx index 4642e57..dbb41e5 100644 --- a/src/views/products/Detail/ProductInfoForm.jsx +++ b/src/views/products/Detail/ProductInfoForm.jsx @@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next'; import { useWeekdays } from '@/hooks/useDatePresets'; import DeptSelector from '@/components/DeptSelector'; import CitySelector from '@/components/CitySelector'; -import { useProductsTypesFieldsets } from '@/hooks/useProductsSets'; +import { useProductsTypesFieldsets, PackageTypes } from '@/hooks/useProductsSets'; import useProductsStore from '@/stores/Products/Index'; import ProductInfoLgc from './ProductInfoLgc'; import ProductInfoQuotation from './ProductInfoQuotation'; @@ -306,6 +306,33 @@ function getFields(props) { , fieldProps?.display_to_c?.col || midCol ), + item( + 'sub_type_D', + 99, +