feat: 产品管理: `餐` 类型使用`R` ; 优化审核页面价格表; 附加项目表显示类型; 超公里Ultra Service

feature/price_manager
Lei OT 1 year ago
parent f440b08fad
commit cc2bf23bf5

@ -1,5 +1,5 @@
{
"ProductType": "ProductType",
"ProductType": "Product Type",
"type": {
"Experience": "Experience",
"Car": "Transport Services",
@ -8,8 +8,7 @@
"Attractions": "Attractions",
"Meals": "Meals",
"Extras": "Extras",
"Overtravel": "超公里",
"Special": "Special"
"UltraService": "Ultra Service"
},
"EditComponents": {
"info": "Product Information",
@ -30,6 +29,11 @@
"Rejected": "Reject",
"Published": "Publish"
},
"PriceUnit": {
"0": "Person",
"1": "Group",
"title": "Price Unit"
},
"Status": "Status",
"State": "State",

@ -3,13 +3,12 @@
"type": {
"Experience": "综费",
"Car": "车费",
"Guide": "导",
"Guide": "导",
"Package": "包价线路",
"Attractions": "景点",
"Meals": "餐费",
"Extras": "附加项目",
"Overtravel": "超公里",
"Special": "特殊项目"
"UltraService": "超公里"
},
"EditComponents": {
"info": "产品信息",
@ -30,6 +29,11 @@
"Rejected": "审核拒绝",
"Published": "审核发布"
},
"PriceUnit": {
"0": "每人",
"1": "每团",
"title": "报价单位"
},
"Status": "状态",
"State": "状态",

@ -6,39 +6,39 @@ import { PERM_OVERSEA, PERM_AIR_TICKET, PERM_PRODUCTS_MANAGEMENT } from '@/confi
/**
* 产品管理 相关的预设数据
* 项目类型
酒店预定 1
火车 2
飞机票务 3
游船 4
快巴 5
旅行社(综费) 6
景点 7
特殊项目 8
其他 9
酒店 A
超公里 B
餐费 C
小包价 D
X
购物 S
R
娱乐 E
精华线路 T
客人testimonial F
线路订单 O
P
信息 I
国家 G
城市 K
图片 H
地图 M
包价线路 L
节日节庆 V
火车站 N
手机租赁 Z
* * webht 类型, 20240624 新增HT类型
Q 导游
J 车费
* * 酒店预定 1
* * 火车 2
* * 飞机票务 3
* * 游船 4
* * 快巴 5
* * 旅行社(综费) 6
* * 景点 7
* * 特殊项目 8
* * 其他 9
* * 酒店 A
* * 超公里 B
* * 餐费 C
* * 小包价 D
* * X
* * 购物 S
* * R (餐厅)
* * 娱乐 E
* * 精华线路 T
* * 客人testimonial F
* * 线路订单 O
* * P
* * 信息 I
* * 国家 G
* * 城市 K
* * 图片 H
* * 地图 M
* * 包价线路 L (已废弃)
* * 节日节庆 V
* * 火车站 N
* * 手机租赁 Z
* * ---- webht 类型, 20240624 新增HT类型 ----
* * 导游 Q
* * 车费 J
*/
export const useProductsTypes = () => {
@ -48,20 +48,24 @@ export const useProductsTypes = () => {
useEffect(() => {
const newData = [
{ label: t('products:type.Experience'), value: '6', key: '6' },
{ label: t('products:type.Overtravel'), value: 'B', key: 'B' },
{ label: t('products:type.UltraService'), value: 'B', key: 'B' },
{ 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' },
{ label: t('products:type.Meals'), value: 'R', key: 'R' },
{ label: t('products:type.Extras'), value: '8', key: '8' },
// { label: t('products:type.Special'), value: 'Special', key: 'Special' },
];
setTypes(newData);
}, [i18n.language]);
return types;
};
export const useProductsTypesMapVal = (value) => {
const stateSets = useProductsTypes();
const stateMapVal = stateSets.reduce((r, c) => ({ ...r, [`${c.value}`]: c }), {});
return stateMapVal;
};
export const useProductsAuditStates = () => {
const [types, setTypes] = useState([]);
@ -102,7 +106,7 @@ export const useProductsTypesFieldsets = (type) => {
'Q': [['city_id', 'duration', ], ['description',]],
'D': [['city_id', 'recommends_rate','duration',], ['description',]],
'7': [['city_id', 'recommends_rate', 'duration', 'display_to_c', 'open_weekdays'], ['description',]], // todo: 怎么是2个图
'C': [['city_id',], ['description',]],
'R': [['city_id',], ['description',]],
'8': [[],[]], // todo: ?
};
const thisTypeFieldset = (_type) => {

@ -85,11 +85,9 @@ const PriceTable = ({ dataSource, refresh }) => {
};
const columns = [
{ key: 'title', dataIndex: ['info', 'title'], width: '16rem', title: t('Title'), onCell: (r, index) => ({ rowSpan: r.rowSpan }), render: (text, r) => text || r.lgc_details?.['2']?.title || '' },
{ key: 'adult', title: t('AgeType.Adult'), render: (_, { adult_cost, currency, unit_name }) => `${adult_cost} ${currency} / ${unit_name}` },
{ key: 'child', title: t('AgeType.Child'), render: (_, { child_cost, currency, unit_name }) => `${child_cost} ${currency} / ${unit_name}` },
// {key: 'price', title: t('Currency'), },
// {key: 'currency', title: t('Currency'), },
{ key: 'title', dataIndex: ['info', 'title'], width: '16rem', title: t('Title'), onCell: (r, index) => ({ rowSpan: r.rowSpan }), render: (text, r) => text || r.lgc_details?.['2']?.title || r.lgc_details?.['1']?.title || '' },
{ key: 'adult', title: t('AgeType.Adult'), render: (_, { adult_cost, currency, unit_id, unit_name }) => `${adult_cost} ${currency} / ${t(`PriceUnit.${unit_id}`)}` },
{ key: 'child', title: t('AgeType.Child'), render: (_, { child_cost, currency, unit_id, unit_name }) => `${child_cost} ${currency} / ${t(`PriceUnit.${unit_id}`)}` },
// {key: 'unit', title: t('Unit'), },
{
key: 'groupSize',

@ -8,12 +8,15 @@ import SearchForm from '@/components/SearchForm';
import RequireAuth from '@/components/RequireAuth';
import { PERM_PRODUCTS_MANAGEMENT } from '@/config';
import { useProductsTypesMapVal } from '@/hooks/useProductsSets';
const NewAddonModal = ({ onPick, ...props }) => {
const { travel_agency_id, use_year } = useParams();
const { t } = useTranslation();
const { notification, message } = App.useApp();
const productsTypesMapVal = useProductsTypesMapVal();
const [open, setOpen] = useState(false);
const [loading, setLoading] = useState(false); // bind loading
const [searchLoading, setSearchLoading] = useState(false);
@ -37,7 +40,7 @@ const NewAddonModal = ({ onPick, ...props }) => {
// todo:
const searchResultColumns = [
{ key: 'ptype', dataIndex: ['info', 'product_type_name'], width: '6rem', title: t('products:ProductType') },
{ key: 'ptype', dataIndex: ['info', 'product_type_id'], width: '6rem', title: t('products:ProductType'), render: (text, r) => productsTypesMapVal[text].label },
{ key: 'title', dataIndex: ['info', 'title'], width: '16rem', title: t('products:Title') },
{
title: t('products:price'),

Loading…
Cancel
Save