From 219372c06e78eb50ce11aeb78de3206c96d8d12f Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 24 Jun 2024 10:58:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EHT=E4=BA=A7=E5=93=81=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B:=20J=20=E8=BD=A6=E8=B4=B9,=20Q=20=E5=AF=BC=E6=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useProductsSets.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/hooks/useProductsSets.js b/src/hooks/useProductsSets.js index 35cd3f5..6749ede 100644 --- a/src/hooks/useProductsSets.js +++ b/src/hooks/useProductsSets.js @@ -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: ?