🐞 fix(ID1001333): 【电子商城】-功能{领取剪样}:页面信息加载不出,点击领取剪样按钮无反应

This commit is contained in:
xuan 2023-02-24 15:11:37 +08:00
parent a486c2659b
commit b71773906d
9 changed files with 29 additions and 39 deletions

View File

@ -72,6 +72,7 @@ page {
&__title { &__title {
font-size: 28px; font-size: 28px;
color: #383838; color: #383838;
@include common_ellipsis(2);
} }
&__code { &__code {
} }
@ -81,9 +82,10 @@ page {
flex-flow: column nowrap; flex-flow: column nowrap;
} }
.addButton { .addButton {
width: 20%; width: 100px;
padding-right: 30px;
display: flex; display: flex;
justify-content: center; justify-content: flex-end;
align-items: center; align-items: center;
} }
} }

View File

@ -72,6 +72,7 @@ const ColorCardList = () => {
return alert.error(res.msg) return alert.error(res.msg)
} }
setOrderList({ list: res.data.list, total: res.data.total }) setOrderList({ list: res.data.list, total: res.data.total })
setRefresherTriggeredStatus(false)
} }
useEffect(() => { useEffect(() => {

View File

@ -43,17 +43,17 @@ const ItemList = (props: PropsType) => {
<View className={styles.contBox}> <View className={styles.contBox}>
<View style={{ minWidth: '24%' }}> <View style={{ minWidth: '24%' }}>
<View className={styles.leftCont}> <View className={styles.leftCont}>
<LabAndImg value={labAndImgObj(data.color_card_info[0])} /> <LabAndImg value={labAndImgObj(data.color_card_info?.[0])} />
</View> </View>
</View> </View>
<View className={styles.rightCont}> <View className={styles.rightCont}>
<View className={styles.rightTop}> <View className={styles.rightTop}>
<View className={styles.productName}>{data.color_card_info[0]?.name}</View> <View className={styles.productName}>{data.color_card_info?.[0]?.name}</View>
<View className={styles.shipMode}>{data.shipment_mode_name}</View> <View className={styles.shipMode}>{data.shipment_mode_name}</View>
</View> </View>
<View className={styles.colorsBox}> <View className={styles.colorsBox}>
<View className={styles.colorName}>x{data.color_card_info[0]?.count || 0}</View> <View className={styles.colorName}>x{data.color_card_info?.[0]?.count || 0}</View>
</View> </View>
</View> </View>
</View> </View>

View File

@ -29,8 +29,8 @@ const Index = () => {
page: 1, size: 10, page: 1, size: 10,
}) })
setclientObj({ setclientObj({
clientId: res.data.list.length > 0 ? res.data.list[0]?.id : -1, clientId: res.data.list?.length > 0 ? res.data.list[0]?.id : -1,
clientName: res.data.list.length > 0 ? res.data.list[0]?.name : '', clientName: res.data.list?.length > 0 ? res.data.list[0]?.name : '',
}) })
setclienList([...res.data.list]) setclienList([...res.data.list])
} }

View File

@ -46,17 +46,17 @@ const ItemList = (props: PropsType) => {
<View className={styles.contBox}> <View className={styles.contBox}>
<View style={{ minWidth: '24%' }}> <View style={{ minWidth: '24%' }}>
<View className={styles.leftCont}> <View className={styles.leftCont}>
<LabAndImg value={labAndImgObj(data.cut_sample_order_product_list[0])} /> <LabAndImg value={labAndImgObj(data.cut_sample_order_product_list?.[0])} />
</View> </View>
</View> </View>
<View className={styles.rightCont}> <View className={styles.rightCont}>
<View className={styles.rightTop}> <View className={styles.rightTop}>
<View className={styles.productName}>{data.cut_sample_order_product_list[0].name}</View> <View className={styles.productName}>{data.cut_sample_order_product_list?.[0].name}</View>
<View className={styles.shipMode}>{data.shipment_mode_name}</View> <View className={styles.shipMode}>{data.shipment_mode_name}</View>
</View> </View>
{ {
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) { if (index < 2) {
return <View className={styles.colorsBox} key={index}> return <View className={styles.colorsBox} key={index}>
<View className={styles.colorName}>{formatHashTag(item.code, item.name)}</View> <View className={styles.colorName}>{formatHashTag(item.code, item.name)}</View>

View File

@ -40,7 +40,7 @@ const GetSampleCutting = () => {
const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false) const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
// 数据加载状态 // 数据加载状态
const statusMore = useMemo(() => { 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]) }, [sampleCuttingList, state.loading])
// 筛选参数 // 筛选参数
// 上拉加载数据 // 上拉加载数据
@ -52,7 +52,7 @@ const GetSampleCutting = () => {
setSearchField(val => ({ ...val, size: 10 })) setSearchField(val => ({ ...val, size: 10 }))
} }
const getScrollToLower = useCallback(() => { const getScrollToLower = useCallback(() => {
if (sampleCuttingList.list.length < sampleCuttingList.total) { if (sampleCuttingList.list?.length < sampleCuttingList.total) {
pageNum.current.page++ pageNum.current.page++
const size = pageNum.current.size * pageNum.current.page const size = pageNum.current.size * pageNum.current.page
setSearchField({ ...searchField, size }) setSearchField({ ...searchField, size })
@ -69,21 +69,6 @@ const GetSampleCutting = () => {
setSearchField(e => ({ ...e, purchaser_and_sale_user: value })) setSearchField(e => ({ ...e, purchaser_and_sale_user: value }))
}, 300) }, 300)
const FilterOptions = [
{
key: 0,
label: '全部记录',
},
{
key: 5,
label: '申请中',
},
{
key: 6,
label: '已完成',
},
]
const handleClickFilter = (value) => { const handleClickFilter = (value) => {
if (searchField.mp_cut_sample_audit_status === value) { return } if (searchField.mp_cut_sample_audit_status === value) { return }
setSearchField(e => ({ ...e, mp_cut_sample_audit_status: value })) setSearchField(e => ({ ...e, mp_cut_sample_audit_status: value }))

View File

@ -72,6 +72,7 @@ page {
&__title { &__title {
font-size: 28px; font-size: 28px;
color: #383838; color: #383838;
@include common_ellipsis(2);
} }
&__code { &__code {
font-size: 24px; font-size: 24px;

View File

@ -94,6 +94,7 @@ const SampleCuttingList = () => {
return alert.error(res.msg) return alert.error(res.msg)
} }
setOrderList({ list: res.data.list, total: res.data.total }) setOrderList({ list: res.data.list, total: res.data.total })
setRefresherTriggeredStatus(false)
} }
useEffect(() => { useEffect(() => {

View File

@ -80,18 +80,18 @@ const feature: IconCardType[] = [
path: '/pages/customerManagement/index', path: '/pages/customerManagement/index',
jurisdiction: 'customer_list_page', jurisdiction: 'customer_list_page',
}, },
// { {
// iconName: 'icon-lingquseka', iconName: 'icon-lingquseka',
// name: '领取色卡', name: '领取色卡',
// path: '/pages/getColorCard/index', path: '/pages/getColorCard/index',
// jurisdiction: 'ignore', jurisdiction: 'ignore',
// }, },
// { {
// iconName: 'icon-jianyang', iconName: 'icon-jianyang',
// name: '领取剪样', name: '领取剪样',
// path: '/pages/sampleCutting/index', path: '/pages/sampleCutting/index',
// jurisdiction: 'ignore', jurisdiction: 'ignore',
// }, },
] ]
const fabric: IconCardType[] = [ const fabric: IconCardType[] = [