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[] = [