From b71773906dbbb3af2986ae8bfce91818208d1a21 Mon Sep 17 00:00:00 2001 From: xuan Date: Fri, 24 Feb 2023 15:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(ID1001333):=20=E3=80=90?= =?UTF-8?q?=E7=94=B5=E5=AD=90=E5=95=86=E5=9F=8E=E3=80=91-=E5=8A=9F?= =?UTF-8?q?=E8=83=BD{=E9=A2=86=E5=8F=96=E5=89=AA=E6=A0=B7}=EF=BC=9A?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=A1=E6=81=AF=E5=8A=A0=E8=BD=BD=E4=B8=8D?= =?UTF-8?q?=E5=87=BA=EF=BC=8C=E7=82=B9=E5=87=BB=E9=A2=86=E5=8F=96=E5=89=AA?= =?UTF-8?q?=E6=A0=B7=E6=8C=89=E9=92=AE=E6=97=A0=E5=8F=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../colorCardList/index.module.scss | 6 +++-- .../getColorCard/colorCardList/index.tsx | 1 + .../components/itemList/index.tsx | 6 ++--- src/pages/index/index.tsx | 4 ++-- .../components/itemList/index.tsx | 6 ++--- src/pages/sampleCutting/index.tsx | 19 ++------------- .../sampleCuttingList/index.module.scss | 1 + .../sampleCutting/sampleCuttingList/index.tsx | 1 + src/pages/user/index.tsx | 24 +++++++++---------- 9 files changed, 29 insertions(+), 39 deletions(-) diff --git a/src/pages/getColorCard/colorCardList/index.module.scss b/src/pages/getColorCard/colorCardList/index.module.scss index 7e09252..3737f2b 100644 --- a/src/pages/getColorCard/colorCardList/index.module.scss +++ b/src/pages/getColorCard/colorCardList/index.module.scss @@ -72,6 +72,7 @@ page { &__title { font-size: 28px; color: #383838; + @include common_ellipsis(2); } &__code { } @@ -81,9 +82,10 @@ page { flex-flow: column nowrap; } .addButton { - width: 20%; + width: 100px; + padding-right: 30px; display: flex; - justify-content: center; + justify-content: flex-end; align-items: center; } } diff --git a/src/pages/getColorCard/colorCardList/index.tsx b/src/pages/getColorCard/colorCardList/index.tsx index 857fe93..d17a6e5 100644 --- a/src/pages/getColorCard/colorCardList/index.tsx +++ b/src/pages/getColorCard/colorCardList/index.tsx @@ -72,6 +72,7 @@ const ColorCardList = () => { return alert.error(res.msg) } setOrderList({ list: res.data.list, total: res.data.total }) + setRefresherTriggeredStatus(false) } useEffect(() => { diff --git a/src/pages/getColorCard/components/itemList/index.tsx b/src/pages/getColorCard/components/itemList/index.tsx index 87a4023..a0407de 100644 --- a/src/pages/getColorCard/components/itemList/index.tsx +++ b/src/pages/getColorCard/components/itemList/index.tsx @@ -43,17 +43,17 @@ const ItemList = (props: PropsType) => { - + - {data.color_card_info[0]?.name} + {data.color_card_info?.[0]?.name} {data.shipment_mode_name} - x{data.color_card_info[0]?.count || 0}本 + x{data.color_card_info?.[0]?.count || 0}本 diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 2f57a9e..73c4c64 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -29,8 +29,8 @@ const Index = () => { page: 1, size: 10, }) setclientObj({ - clientId: res.data.list.length > 0 ? res.data.list[0]?.id : -1, - clientName: res.data.list.length > 0 ? res.data.list[0]?.name : '', + clientId: res.data.list?.length > 0 ? res.data.list[0]?.id : -1, + clientName: res.data.list?.length > 0 ? res.data.list[0]?.name : '', }) setclienList([...res.data.list]) } diff --git a/src/pages/sampleCutting/components/itemList/index.tsx b/src/pages/sampleCutting/components/itemList/index.tsx index 407559b..d0a13d0 100644 --- a/src/pages/sampleCutting/components/itemList/index.tsx +++ b/src/pages/sampleCutting/components/itemList/index.tsx @@ -46,17 +46,17 @@ const ItemList = (props: PropsType) => { - + - {data.cut_sample_order_product_list[0].name} + {data.cut_sample_order_product_list?.[0].name} {data.shipment_mode_name} { - data.cut_sample_order_product_list[0].product_colors?.map((item, index) => { + data.cut_sample_order_product_list?.[0].product_colors?.map((item, index) => { if (index < 2) { return {formatHashTag(item.code, item.name)} diff --git a/src/pages/sampleCutting/index.tsx b/src/pages/sampleCutting/index.tsx index 040ed36..7c066e5 100644 --- a/src/pages/sampleCutting/index.tsx +++ b/src/pages/sampleCutting/index.tsx @@ -40,7 +40,7 @@ const GetSampleCutting = () => { const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false) // 数据加载状态 const statusMore = useMemo(() => { - return dataLoadingStatus({ list: sampleCuttingList.list, total: sampleCuttingList.total, status: state.loading! }) + return dataLoadingStatus({ list: sampleCuttingList?.list, total: sampleCuttingList.total, status: state.loading! }) }, [sampleCuttingList, state.loading]) // 筛选参数 // 上拉加载数据 @@ -52,7 +52,7 @@ const GetSampleCutting = () => { setSearchField(val => ({ ...val, size: 10 })) } const getScrollToLower = useCallback(() => { - if (sampleCuttingList.list.length < sampleCuttingList.total) { + if (sampleCuttingList.list?.length < sampleCuttingList.total) { pageNum.current.page++ const size = pageNum.current.size * pageNum.current.page setSearchField({ ...searchField, size }) @@ -69,21 +69,6 @@ const GetSampleCutting = () => { setSearchField(e => ({ ...e, purchaser_and_sale_user: value })) }, 300) - const FilterOptions = [ - { - key: 0, - label: '全部记录', - }, - { - key: 5, - label: '申请中', - }, - { - key: 6, - label: '已完成', - }, - ] - const handleClickFilter = (value) => { if (searchField.mp_cut_sample_audit_status === value) { return } setSearchField(e => ({ ...e, mp_cut_sample_audit_status: value })) diff --git a/src/pages/sampleCutting/sampleCuttingList/index.module.scss b/src/pages/sampleCutting/sampleCuttingList/index.module.scss index 49204f2..8af1cd5 100644 --- a/src/pages/sampleCutting/sampleCuttingList/index.module.scss +++ b/src/pages/sampleCutting/sampleCuttingList/index.module.scss @@ -72,6 +72,7 @@ page { &__title { font-size: 28px; color: #383838; + @include common_ellipsis(2); } &__code { font-size: 24px; diff --git a/src/pages/sampleCutting/sampleCuttingList/index.tsx b/src/pages/sampleCutting/sampleCuttingList/index.tsx index 7af9b3b..18a12bc 100644 --- a/src/pages/sampleCutting/sampleCuttingList/index.tsx +++ b/src/pages/sampleCutting/sampleCuttingList/index.tsx @@ -94,6 +94,7 @@ const SampleCuttingList = () => { return alert.error(res.msg) } setOrderList({ list: res.data.list, total: res.data.total }) + setRefresherTriggeredStatus(false) } useEffect(() => { diff --git a/src/pages/user/index.tsx b/src/pages/user/index.tsx index 839e2c6..e2ec780 100644 --- a/src/pages/user/index.tsx +++ b/src/pages/user/index.tsx @@ -80,18 +80,18 @@ const feature: IconCardType[] = [ path: '/pages/customerManagement/index', jurisdiction: 'customer_list_page', }, - // { - // iconName: 'icon-lingquseka', - // name: '领取色卡', - // path: '/pages/getColorCard/index', - // jurisdiction: 'ignore', - // }, - // { - // iconName: 'icon-jianyang', - // name: '领取剪样', - // path: '/pages/sampleCutting/index', - // jurisdiction: 'ignore', - // }, + { + iconName: 'icon-lingquseka', + name: '领取色卡', + path: '/pages/getColorCard/index', + jurisdiction: 'ignore', + }, + { + iconName: 'icon-jianyang', + name: '领取剪样', + path: '/pages/sampleCutting/index', + jurisdiction: 'ignore', + }, ] const fabric: IconCardType[] = [