新增HT产品类型: J 车费, Q 导游

feature/price_manager
Lei OT 1 year ago
parent 240697a42d
commit 219372c06e

@ -34,9 +34,9 @@ import { useTranslation } from 'react-i18next';
节日节庆 V 节日节庆 V
火车站 N 火车站 N
手机租赁 Z 手机租赁 Z
* * todo: webht 类型 * * webht 类型, 20240624 新增HT类型
P 导游 Q 导游
T 车费 J 车费
*/ */
export const useProductsTypes = () => { export const useProductsTypes = () => {
@ -47,8 +47,8 @@ export const useProductsTypes = () => {
const newData = [ const newData = [
{ label: t('products:type.Experience'), value: '6', key: '6' }, { label: t('products:type.Experience'), value: '6', key: '6' },
{ label: t('products:type.Overtravel'), value: 'B', key: 'B' }, { label: t('products:type.Overtravel'), value: 'B', key: 'B' },
{ label: t('products:type.Car'), value: 'T', key: 'T' }, { label: t('products:type.Car'), value: 'J', key: 'J' },
{ label: t('products:type.Guide'), value: 'P', key: 'P' }, { label: t('products:type.Guide'), value: 'Q', key: 'Q' },
{ label: t('products:type.Package'), value: 'D', key: 'D' }, { label: t('products:type.Package'), value: 'D', key: 'D' },
{ label: t('products:type.Attractions'), value: '7', key: '7' }, { label: t('products:type.Attractions'), value: '7', key: '7' },
{ label: t('products:type.Meals'), value: 'C', key: 'C' }, { label: t('products:type.Meals'), value: 'C', key: 'C' },
@ -72,6 +72,7 @@ export const useProductsAuditStates = () => {
{ key: '2', value: '2', label: t('products:auditState.Approved') }, { key: '2', value: '2', label: t('products:auditState.Approved') },
{ key: '3', value: '3', label: t('products:auditState.Rejected') }, { key: '3', value: '3', label: t('products:auditState.Rejected') },
{ key: '1', value: '1', label: t('products:auditState.Published') }, { key: '1', value: '1', label: t('products:auditState.Published') },
// ELSE 未知
]; ];
setTypes(newData); setTypes(newData);
}, [i18n.language]); }, [i18n.language]);
@ -85,15 +86,18 @@ export const useProductsAuditStatesMapVal = (value) => {
return stateMapVal; return stateMapVal;
}; };
/**
* @ignore
*/
export const useProductsTypesFieldsets = (type, role) => { export const useProductsTypesFieldsets = (type, role) => {
const infoDefault = ['code', 'title']; const infoDefault = ['code', 'title'];
const infoAdmin = ['remarks', 'dept']; const infoAdmin = ['remarks', 'dept', 'display_to_c'];
const infoTypesMap = { const infoTypesMap = {
'6': [], '6': [],
'B': ['city_id', 'km'], 'B': ['city_id', 'km'],
'车费': ['description', 'city_id', 'recommends_rate', 'duration', 'display_to_c'], // todo: 包价类型?? 'J': ['description', 'city_id', 'recommends_rate', 'duration', 'display_to_c'],
'导游': ['description', 'city_id', 'duration', ], 'Q': ['description', 'city_id', 'duration', ],
'D': [], //todo: 木有图 'D': ['description', 'city_id', 'recommends_rate','duration',],
'7': ['description', 'city_id', 'recommends_rate', 'duration', 'display_to_c', 'open_weekdays'], // todo: 怎么是2个图 '7': ['description', 'city_id', 'recommends_rate', 'duration', 'display_to_c', 'open_weekdays'], // todo: 怎么是2个图
'C': ['description', 'city_id',], 'C': ['description', 'city_id',],
'8': [], // todo: ? '8': [], // todo: ?

Loading…
Cancel
Save