diff --git a/src/api/order.ts b/src/api/order.ts index 1e3d9fa..74e836f 100644 --- a/src/api/order.ts +++ b/src/api/order.ts @@ -204,3 +204,10 @@ export const mpsaleOrdershipmentMode = () => { method: "put", }) } +//修改销售单物流方式 +export const EnumPurchaserType = () => { + return useRequest({ + url: `/v2/mp/enum/purchaserType`, + method: "get", + }) +} diff --git a/src/pages/customerManagement/components/Tag/index.tsx b/src/pages/customerManagement/components/Tag/index.tsx index 15670b3..f147e8e 100644 --- a/src/pages/customerManagement/components/Tag/index.tsx +++ b/src/pages/customerManagement/components/Tag/index.tsx @@ -5,6 +5,7 @@ import classnames from "classnames"; import Taro, { usePullDownRefresh, useRouter, useDidShow } from '@tarojs/taro'; import { alert } from '@/common/common' import { formatPriceDiv, formatDateTime, formatWeightDiv } from '@/common/format' +import {EnumPurchaserType} from '@/api/order' import DropDownItem from '@/components/dropDown-item' import { mppurchaserlist } from "@/api/customer" interface Props { @@ -42,11 +43,14 @@ export default memo(forwardRef((props: Props, ref) => { useEffect(() => { getList() }, []) + const { fetchData: fetchPurchaserType } = EnumPurchaserType() const { fetchData } = mppurchaserlist() const getList = async () => { const res = await fetchData() + const purchaserType = await fetchPurchaserType() if (res.data) { settaglist([...res.data.list]) + setlist([...purchaserType.data.list]) } } @@ -102,4 +106,4 @@ export default memo(forwardRef((props: Props, ref) => { ) -})) \ No newline at end of file +})) diff --git a/src/pages/customerManagement/index.tsx b/src/pages/customerManagement/index.tsx index 2c7b595..cf43e8d 100644 --- a/src/pages/customerManagement/index.tsx +++ b/src/pages/customerManagement/index.tsx @@ -65,7 +65,7 @@ export default () => { //数据加载状态 const statusMore = useMemo(() => { - return dataLoadingStatus({ list: orderData.list, total: orderData.total, status: orderState.loading }) + return dataLoadingStatus({ list: orderData.list, total: orderData.total, status: orderState.loading! }) }, [orderData, orderState]) //上拉加载数据 @@ -168,4 +168,4 @@ export default () => { ) -} \ No newline at end of file +}