Commit 51da49cd authored by 卢均锐's avatar 卢均锐

chore: 修改剩余接口引入路径

parent 69dc9e2f
......@@ -8,24 +8,24 @@
import React, { useEffect } from 'react';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import { createAsyncFormActions, FormEffectHooks } from '@formily/antd';
import { getLogisticsSelectListShipperAddress } from '@/services/LogiticsV2Api';
import { getLogisticsSelectListShipperAddress } from '@/services/LogisticsV2Api';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { useLinkageUtils } from '@/utils/formEffectUtils';
import NiceForm from '@/components/NiceForm';
import { schema } from './schema';
const modalFormActions = createAsyncFormActions();
const {
onFieldInputChange$,
const {
onFieldInputChange$,
} = FormEffectHooks;
export interface Values {
deliveryType: number,
id: number,
isDefault: number,
sendAddress: string | undefined,
sendUserName: string | undefined,
sendUserTel: string | undefined,
id: number,
isDefault: number,
sendAddress: string | undefined,
sendUserName: string | undefined,
sendUserTel: string | undefined,
}
interface AddressData {
......@@ -99,7 +99,7 @@ interface ExchangeAddressInfo extends MellowCardProps {
* 完整地址
*/
fullAddress: string;
},
},
/**
* 换货发货地址
......@@ -125,7 +125,7 @@ interface ExchangeAddressInfo extends MellowCardProps {
* 完整地址
*/
fullAddress: string;
},
},
/**
* 提交事件
......@@ -198,7 +198,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
});
break;
};
default:
default:
break
};
}, [shippingAddress.deliveryType, isEdit]);
......@@ -212,13 +212,13 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
return new Promise((resolve, reject) => {
getLogisticsSelectListShipperAddress().then(res => {
if (res.code === 1000) {
const options =
res.data ?
const options =
res.data ?
res.data.map(item => ({
label: `${item.fullAddress}/${item.shipperName}/${item.phone}`,
value: item.id,
...item,
})) :
label: `${item.fullAddress}/${item.shipperName}/${item.phone}`,
value: item.id,
...item,
})) :
[];
resolve(options);
}
......@@ -226,7 +226,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
}).catch(() => {
reject();
});
});
});
};
return (
......@@ -234,11 +234,11 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
title="换货收货地址"
{...rest}
>
<NiceForm
<NiceForm
initialValues={{
deliveryType: shippingAddress.deliveryType,
shippingAddress: shippingAddress.id,
pickupAddress: shippingAddress.id,
deliveryType: shippingAddress.deliveryType,
shippingAddress: shippingAddress.id,
pickupAddress: shippingAddress.id,
deliveryAddress,
shippingAddressShow: shippingAddress,
}}
......@@ -251,7 +251,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
// 联动配送方式
onFieldInputChange$('deliveryType').subscribe(fieldState => {
const { value } = fieldState;
switch (value) {
// 物流
case 1: {
......@@ -270,18 +270,18 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
linkage.hide('*(shippingAddress,pickupAddress)');
break;
};
default:
default:
break
};
if (onFormSubmit) {
onFormSubmit({
deliveryType: value,
id: undefined,
isDefault: undefined,
sendAddress: undefined,
sendUserName: undefined,
sendUserTel: undefined,
id: undefined,
isDefault: undefined,
sendAddress: undefined,
sendUserName: undefined,
sendUserTel: undefined,
});
}
});
......@@ -301,18 +301,18 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
if (onFormSubmit) {
onFormSubmit({
deliveryType: deliveryTypeValue,
id: fullData ? fullData.id : undefined,
isDefault: fullData ? fullData.isDefault : undefined,
sendAddress: fullData ? fullData.fullAddress : undefined,
sendUserName: fullData ? fullData.shipperName : undefined,
sendUserTel: fullData ? fullData.phone : undefined,
id: fullData ? fullData.id : undefined,
isDefault: fullData ? fullData.isDefault : undefined,
sendAddress: fullData ? fullData.fullAddress : undefined,
sendUserName: fullData ? fullData.shipperName : undefined,
sendUserTel: fullData ? fullData.phone : undefined,
});
}
});
}}
components={{
Address,
ShippingAddress,
Address,
ShippingAddress,
}}
editable={isEdit}
actions={modalFormActions}
......
......@@ -16,7 +16,7 @@ import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFi
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { PlusOutlined } from '@ant-design/icons';
import { history, Link } from 'umi'
import { PostEnhanceSupplierToBeAddBatchDeleteResponse, PostEnhanceSupplierToBeAddBatchSubmitExamResponse, PostEnhanceSupplierToBeAddDeleteResponse, PostEnhanceSupplierToBeAddSubmitExamResponse } from '@/services/EnhanceApi';
import { PostEnhanceSupplierToBeAddBatchDeleteResponse, PostEnhanceSupplierToBeAddBatchSubmitExamResponse, PostEnhanceSupplierToBeAddDeleteResponse, PostEnhanceSupplierToBeAddSubmitExamResponse } from '@/services/EnhanceV2Api';
import useBatchSubmit from '../../common/hooks/useBatchSubmit';
import useSingleActionSubmit from '../../common/hooks/useSingleAction';
import { getEnhanceSupplierToBeAddList, postEnhanceSupplierToBeAddBatchDelete, postEnhanceSupplierToBeAddBatchSubmitExam, postEnhanceSupplierToBeAddDelete, postEnhanceSupplierToBeAddSubmitExam } from '@/services/EnhanceV2Api';
......
import React from 'react';
import { ColumnsType } from 'antd/es/table';
import { Link } from 'umi';
import { GetEnhanceSupplierAllDetailsResponse } from '@/services/EnhanceApi';
import { GetEnhanceSupplierAllDetailsResponse } from '@/services/EnhanceV2Api';
import { numFormat } from '@/utils/numberFomat'
import moment from 'moment';
......
......@@ -3,7 +3,7 @@ import { ColumnsType } from 'antd/es/table';
import moment from 'moment';
import { Badge } from 'antd';
import EyePreview from '@/components/EyePreview';
import { GetEnhanceSupplierAllDetailsResponse } from '@/services/EnhanceApi';
import { GetEnhanceSupplierAllDetailsResponse } from '@/services/EnhanceV2Api';
import { Link } from 'umi';
import DescProgress from '@/components/DescProgress';
......
import MellowCard from '@/components/MellowCard'
import React, { useEffect, useMemo, useState } from 'react'
import { GetEnhanceSupplierAllDetailsResponse } from '@/services/EnhanceApi';
import { GetEnhanceSupplierAllDetailsResponse } from '@/services/EnhanceV2Api';
import { statisticsColumns as orderColumns, productColumns, infoOrderColumns, infoProductColumns } from './columns';
import ButtonSwitch from '@/components/ButtonSwitch';
import { Table, Button, Tabs } from 'antd';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment