|
|
|
@ -5,6 +5,7 @@ import { HT_HOST } from '@/config';
|
|
|
|
|
import { fetchJSON } from '@/utils/request';
|
|
|
|
|
import { formatGroupSize } from '@/hooks/useProductsSets';
|
|
|
|
|
import { isEmpty, isNotEmpty } from '@/utils/commons';
|
|
|
|
|
import { usingStorage } from '@/hooks/usingStorage';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 产品价格日志
|
|
|
|
@ -199,6 +200,7 @@ const useLogMethod = (method) => {
|
|
|
|
|
*/
|
|
|
|
|
const ProductQuotationLogPopover = ({ method, triggerProps = {}, onOpenChange, ...props }) => {
|
|
|
|
|
const { travel_agency_id, product_id, price_id, use_year } = props;
|
|
|
|
|
const { travelAgencyId } = usingStorage();
|
|
|
|
|
|
|
|
|
|
const { t } = useTranslation('products');
|
|
|
|
|
const [open, setOpen] = useState(false);
|
|
|
|
@ -211,7 +213,7 @@ const ProductQuotationLogPopover = ({ method, triggerProps = {}, onOpenChange, .
|
|
|
|
|
const [loading, setLoading] = useState(false);
|
|
|
|
|
const getData = async () => {
|
|
|
|
|
setLoading(true);
|
|
|
|
|
const { data } = await fetchData({ travel_agency_id, product_id, price_id, use_year });
|
|
|
|
|
const { data } = await fetchData({ travel_agency_id: travel_agency_id || travelAgencyId, product_id, price_id, use_year });
|
|
|
|
|
setLogData(data);
|
|
|
|
|
invokeOpenChange(true);
|
|
|
|
|
setLoading(false);
|
|
|
|
|