产品管理: 客服首页, 审核状态

perf/export-docx
Lei OT 1 year ago
parent 7a411ebfa9
commit 31d5db8387

@ -52,7 +52,7 @@ export const useProductsTypes = (showAll = false) => {
{ label: t('products:type.UltraService'), 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.Car'), value: 'J', key: 'J' },
{ label: t('products:type.Guide'), value: 'Q', key: 'Q' }, { label: t('products:type.Guide'), value: 'Q', key: 'Q' },
{ label: t('products:type.Attractions'), value: '7', key: '7' }, { label: t('products:type.Attractions'), value: '7', key: '7' }, // landscape
{ label: t('products:type.Meals'), value: 'R', key: 'R' }, { label: t('products:type.Meals'), value: 'R', key: 'R' },
{ label: t('products:type.Extras'), value: '8', key: '8' }, { label: t('products:type.Extras'), value: '8', key: '8' },
{ label: t('products:type.Package'), value: 'D', key: 'D' }, { label: t('products:type.Package'), value: 'D', key: 'D' },

@ -6,6 +6,7 @@ import dayjs from 'dayjs';
import arraySupport from 'dayjs/plugin/arraySupport'; import arraySupport from 'dayjs/plugin/arraySupport';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import useProductsStore, { copyAgencyDataAction } from '@/stores/Products/Index'; import useProductsStore, { copyAgencyDataAction } from '@/stores/Products/Index';
import { useProductsTypes, useProductsAuditStatesMapVal } from '@/hooks/useProductsSets';
import useFormStore from '@/stores/Form'; import useFormStore from '@/stores/Form';
import { objectMapper } from '@/utils/commons'; import { objectMapper } from '@/utils/commons';
import CopyProductsFormModal from './Detail/CopyProducts'; import CopyProductsFormModal from './Detail/CopyProducts';
@ -20,6 +21,8 @@ function Index() {
const [searchValues, setSearchValues] = useProductsStore((state) => [state.searchValues, state.setSearchValues]); const [searchValues, setSearchValues] = useProductsStore((state) => [state.searchValues, state.setSearchValues]);
const formValuesToSub = useFormStore(state => state.formValuesToSub); const formValuesToSub = useFormStore(state => state.formValuesToSub);
const stateMapVal = useProductsAuditStatesMapVal();
const useYear = formValuesToSub.year; const useYear = formValuesToSub.year;
const handleSearchAgency = (formVal = undefined) => { const handleSearchAgency = (formVal = undefined) => {
@ -60,7 +63,12 @@ function Index() {
{ title: t('products:Vendor'), key: 'vendor', dataIndex: 'travel_agency_name' }, { title: t('products:Vendor'), key: 'vendor', dataIndex: 'travel_agency_name' },
{ title: t('products:CreatedBy'), key: 'poster_by', dataIndex: 'poster_name' }, { title: t('products:CreatedBy'), key: 'poster_by', dataIndex: 'poster_name' },
{ title: t('products:CreateDate'), key: 'poster_date', dataIndex: 'poster_date' }, { title: t('products:CreateDate'), key: 'poster_date', dataIndex: 'poster_date' },
{ title: t('products:AuState'), key: 'audit_state', dataIndex: 'audit_state' }, { title: t('products:AuState'), key: 'audit_state', dataIndex: 'audit_state',
render: (_, r) => {
const stateCls = ` text-${stateMapVal[`${r.audit_state_id}`]?.color} `;
return <span className={stateCls}>{stateMapVal[`${r.audit_state_id}`]?.label}</span>;
}, },
{ title: t('products:AuditedBy'), key: 'audited_by', dataIndex: 'audited_by_name' }, { title: t('products:AuditedBy'), key: 'audited_by', dataIndex: 'audited_by_name' },
{ title: t('products:AuditDate'), key: 'audit_date', dataIndex: 'audit_date' }, { title: t('products:AuditDate'), key: 'audit_date', dataIndex: 'audit_date' },
{ {

Loading…
Cancel
Save