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