From 11155df8c70cdf352be74ca579dc3e803bae741b Mon Sep 17 00:00:00 2001 From: xuan Date: Wed, 9 Nov 2022 18:01:32 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E5=AE=A2=E6=88=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D=E9=80=89=E6=8B=A9=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E6=A0=87=E7=AD=BE=E6=9E=9A=E4=B8=BE=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E2=9D=8C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/order.ts | 7 +++++++ src/pages/customerManagement/components/Tag/index.tsx | 6 +++++- src/pages/customerManagement/index.tsx | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) 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 +}