🐞 fix(#1000663#15#21): 修复提货列表|提货详情模块的样式问题

This commit is contained in:
xuan 2022-11-09 15:12:01 +08:00
parent 7070ec425e
commit adbdb80dc8
14 changed files with 57 additions and 38 deletions

View File

@ -34,6 +34,12 @@ export const CDN_UPLOAD_IMG = `${UPLOAD_CDN_URL || ''}`
//appid //appid
export const WX_APPID = 'wx64fe67f111d52457' export const WX_APPID = 'wx64fe67f111d52457'
export const LIST_EMPTY_IMAGE = IMG_CND_Prefix + '/list_empty.png'
export const EMPTY_IMAGE = IMG_CND_Prefix + '/empty.png'
export const SEARCH_EMPTY_IMAGE = IMG_CND_Prefix + '/search_empty.png'
//场景值 //场景值
export const SCENE = { export const SCENE = {
SearchScene: 0, //商城面料搜索 SearchScene: 0, //商城面料搜索

View File

@ -3,7 +3,7 @@
flex-flow: row nowrap; flex-flow: row nowrap;
background-color: #fff; background-color: #fff;
font-size: $font_size; font-size: $font_size;
color: #000; color: #5c5c5c;
// margin-top: 20px; // margin-top: 20px;
.status_item { .status_item {
padding: 20px; padding: 20px;

View File

@ -52,7 +52,6 @@ const segmentedControl: FC<PropsType> = (props) => {
<ScrollView scrollX scrollIntoView={`tabs_${selectInfo.tabId}`} scrollWithAnimation={true}> <ScrollView scrollX scrollIntoView={`tabs_${selectInfo.tabId}`} scrollWithAnimation={true}>
<View className={styles.list_scroll}> <View className={styles.list_scroll}>
{list.map((item, index) => { {list.map((item, index) => {
console.log('selected=+>', selectInfo.selected)
return ( return (
<View <View
key={item.id} key={item.id}

View File

@ -13,10 +13,9 @@
margin-bottom: 24px; margin-bottom: 24px;
} }
.fonst { .text {
font-size: 28px; font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC; color: $color_font_two;
font-weight: 400; font-weight: 400;
color: #000000;
} }
} }

View File

@ -4,19 +4,19 @@ import styles from "../empty/index.module.scss"
interface PropsObj { interface PropsObj {
picUrl?: string, picUrl?: string,
fonst?: string text?: string
} }
export default memo((pros: PropsObj) => { export default memo((pros: PropsObj) => {
const { const {
picUrl = '', picUrl = '',
fonst = '无搜索历史' text = '无搜索历史'
} = pros } = pros
console.log(pros,8888)
return ( return (
<View className={styles.mainBox}> <View className={styles.mainBox}>
<Image className={styles.pic} mode='aspectFill' lazyLoad src={picUrl}></Image> <Image className={styles.pic} mode='aspectFill' lazyLoad src={picUrl}></Image>
<View className={styles.fonst}>{fonst}</View> <View className={styles.fonst}>{text}</View>
</View> </View>
) )
}) })

View File

@ -3,8 +3,8 @@ import React, { memo, ReactNode, useMemo, useState } from 'react'
import style from './index.module.scss' import style from './index.module.scss'
import DotLoading from '@/components/dotLoading' import DotLoading from '@/components/dotLoading'
import LoadingCard from '../loadingCard' import LoadingCard from '../loadingCard'
import { useCustomTabItemTap } from '@/use/useCommon' import Empty from '@/components/empty'
import Taro from '@tarojs/taro' import { EMPTY_IMAGE, SEARCH_EMPTY_IMAGE } from '@/common/constant'
export type StatusParam = 0 | 1 | 2 | 3 export type StatusParam = 0 | 1 | 2 | 3
@ -27,6 +27,7 @@ type Params = {
refresherTriggered?: boolean refresherTriggered?: boolean
refresherEnabled?: boolean refresherEnabled?: boolean
enableBackToTop?: boolean enableBackToTop?: boolean
emptySlot?: React.ReactNode
} }
export default memo( export default memo(
({ ({
@ -48,6 +49,7 @@ export default memo(
moreStatus = true, moreStatus = true,
statusMore = 0, statusMore = 0,
enableBackToTop = true, enableBackToTop = true,
emptySlot
}: Params) => { }: Params) => {
const scrollToLower = () => { const scrollToLower = () => {
selfonScrollToLower?.() selfonScrollToLower?.()
@ -105,7 +107,7 @@ export default memo(
</View> </View>
)} )}
{statusMore == 0 && <LoadingCard />} {statusMore == 0 && <LoadingCard />}
{statusMore == 1 && <LoadingCard loadingIcon={false} title='暂无数据' />} {statusMore == 1 && emptySlot ? emptySlot : <Empty picUrl={SEARCH_EMPTY_IMAGE} text='暂无数据'/>}
</> </>
) )
} }

View File

@ -2,6 +2,7 @@ import { View, Image } from '@tarojs/components'
import Loading from '@/components/loading' import Loading from '@/components/loading'
import style from './index.module.scss' import style from './index.module.scss'
import { memo } from 'react' import { memo } from 'react'
import Empty from '@/components/empty'
type Params = { type Params = {
title?: string title?: string

View File

@ -3,7 +3,7 @@ import React, { useCallback, memo, useEffect, useMemo, useRef, useState } from '
import Search from '@/components/search' import Search from '@/components/search'
import styles from "./index.module.scss" import styles from "./index.module.scss"
import classnames from "classnames"; import classnames from "classnames";
import Empty from './components/empty' import Empty from '@/components/empty'
import Taro, { useDidShow } from '@tarojs/taro'; import Taro, { useDidShow } from '@tarojs/taro';
import Goods from './components/goods' import Goods from './components/goods'
import { mpproductlist } from "@/api/search" import { mpproductlist } from "@/api/search"
@ -376,7 +376,7 @@ export default memo(() => {
</View> </View>
} }
{ {
!histroyList.length && <Empty picUrl='https://cdn.zzfzyc.com/empty.png' fonst={'无搜索历史'}></Empty> !histroyList.length && <Empty picUrl='https://cdn.zzfzyc.com/empty.png' text={'无搜索历史'}></Empty>
} }
</> </>
} }
@ -396,7 +396,7 @@ export default memo(() => {
}) })
} }
{ {
!searchList.length && <Empty picUrl='https://cdn.zzfzyc.com/empty.png' fonst={'暂无数据'}></Empty> !searchList.length && <Empty picUrl='https://cdn.zzfzyc.com/empty.png' text={'暂无数据'}></Empty>
} }
</> </>
} }

View File

@ -1,5 +1,6 @@
.layoutBlock{ .layoutBlock{
margin: 24px; margin: 20px;
padding: 24px;
} }
.topBar { .topBar {
font-size: 28px; font-size: 28px;
@ -8,13 +9,16 @@
flex-flow: row nowrap; flex-flow: row nowrap;
justify-content: space-between; justify-content: space-between;
color: $color_font_one; color: $color_font_one;
.orderNo{
font-weight: bold;
}
} }
&__orderType { &__orderType {
color: rgba($color: #000000, $alpha: 0.6); color: rgba($color: #000000, $alpha: 0.6);
font-weight: 550; font-weight: bold;
} }
&__orderStatus { &__orderStatus {
font-weight: 550; font-weight: bold;
&--finished{ &--finished{
color: $color_font_three; color: $color_font_three;
} }

View File

@ -52,7 +52,7 @@ const ItemList:FC<PropsType> = (props) => {
<LayoutBlock circle customClassName={styles.layoutBlock}> <LayoutBlock circle customClassName={styles.layoutBlock}>
<View className={styles.topBar}> <View className={styles.topBar}>
<View className={styles.topBar__orderNo}> <View className={styles.topBar__orderNo}>
<View>{itemData?.take_goods_order_no}</View> <View className={styles.orderNo}>{itemData?.take_goods_order_no}</View>
{itemData?.take_goods_status === 0 && ( {itemData?.take_goods_status === 0 && (
<View className={classnames(styles.topBar__orderStatus, styles['topBar__orderStatus--takingGoods'])}></View> <View className={classnames(styles.topBar__orderStatus, styles['topBar__orderStatus--takingGoods'])}></View>
)} )}
@ -60,18 +60,17 @@ const ItemList:FC<PropsType> = (props) => {
</View> </View>
<Text className={styles.topBar__orderType}>{itemData?.take_goods_order_type_name}</Text> <Text className={styles.topBar__orderType}>{itemData?.take_goods_order_type_name}</Text>
</View> </View>
<Divider direction='horizontal' customStyles={{ margin: '30rpx 0' }}></Divider> <Divider direction='horizontal' customStyles={{ margin: '20rpx 0 10rpx 0' }}></Divider>
<View className={styles.content}> <View className={styles.content}>
<View className={classnames(styles.content__row, styles.bord)}> <View className={classnames(styles.content__row, styles.bord)}>
<View className={styles.content__row__left}></View> <View className={styles.content__row__left}></View>
<View className={styles.content__row__right}> <View className={styles.content__row__right}>
<SaleModeTag saleMode={itemData.sale_mode} size='small' customClassName={styles.tag}></SaleModeTag> <SaleModeTag saleMode={itemData.sale_mode} size='small' customClassName={styles.tag}></SaleModeTag>
{/* TODO: 面料字段、颜色字段 */}
{itemData.delivery_product_nums}{itemData.delivery_product_color_nums} {itemData.delivery_product_nums}{itemData.delivery_product_color_nums}
{itemData?.sale_mode === EnumSaleMode.Bulk ? `${itemData?.take_roll}` : `${formatMeterDiv(itemData?.take_meters)}`} {itemData?.sale_mode === EnumSaleMode.Bulk ? `${itemData?.take_roll}` : `${formatMeterDiv(itemData?.take_meters)}`}
</View> </View>
</View> </View>
<View className={styles.content__row}> <View className={classnames(styles.content__row, styles.bord)}>
<View className={styles.content__row__left}></View> <View className={styles.content__row__left}></View>
<View className={styles.content__row__right}>{itemData?.supplier_name || '空'}</View> <View className={styles.content__row__right}>{itemData?.supplier_name || '空'}</View>
</View> </View>
@ -85,7 +84,7 @@ const ItemList:FC<PropsType> = (props) => {
customClassName={styles.bottomBar__button} customClassName={styles.bottomBar__button}
type='info' type='info'
plain plain
customStyles={{ color: '#8e8e8e', borderColor: '#8e8e8e' }} customStyles={{ color: '#636363', borderColor: '#c8c8c8' }}
round round
onClick={() => handleDetail(itemData)}> onClick={() => handleDetail(itemData)}>

View File

@ -25,7 +25,7 @@ page {
height: 100%; height: 100%;
&--total { &--total {
display: block; display: block;
margin-top: 24px; margin-top: 20px;
padding: 0 24px; padding: 0 24px;
font-size: 24px; font-size: 24px;
color: #9d9d9d; color: #9d9d9d;

View File

@ -14,6 +14,8 @@ import DeliveryStatusList from './components/DeliveryStatusList'
import Popup from '@/components/popup' import Popup from '@/components/popup'
import DeliveryFilter, { SearchField } from './components/Filter' import DeliveryFilter, { SearchField } from './components/Filter'
import TimePickerPopup from '@/components/timePickerPopup' import TimePickerPopup from '@/components/timePickerPopup'
import Empty from '@/components/empty'
import { LIST_EMPTY_IMAGE } from '@/common/constant'
type SearchData = { type SearchData = {
take_goods_order_no?: string // 提货单号 take_goods_order_no?: string // 提货单号
@ -41,7 +43,7 @@ const Delivery: FC = () => {
const { fetchData: FetchDeliveryOrderList, state: orderState } = TakeGoodsOrderList() const { fetchData: FetchDeliveryOrderList, state: orderState } = TakeGoodsOrderList()
//数据加载状态 //数据加载状态
const statusMore = useMemo(() => { const statusMore = useMemo(() => {
return dataLoadingStatus({ list: takeDeliveryOrderList.list, total: takeDeliveryOrderList.total, status: orderState.loading }) return dataLoadingStatus({ list: takeDeliveryOrderList.list, total: takeDeliveryOrderList.total, status: orderState.loading! })
}, [takeDeliveryOrderList, orderState]) }, [takeDeliveryOrderList, orderState])
//输入搜索关键字 //输入搜索关键字
@ -175,6 +177,7 @@ const Delivery: FC = () => {
<View className={styles.listBox}> <View className={styles.listBox}>
<InfiniteScroll <InfiniteScroll
emptySlot={<Empty picUrl={LIST_EMPTY_IMAGE} text='暂无数据'/>}
statusMore={statusMore} statusMore={statusMore}
selfonScrollToLower={getScrollToLower} selfonScrollToLower={getScrollToLower}
refresherEnabled={true} refresherEnabled={true}

View File

@ -19,7 +19,7 @@ page {
font-size: 28px; font-size: 28px;
} }
.topBar__orderType { .topBar__orderType {
color: rgba($color: #000000, $alpha: 0.6); color: #6e6e6e;
font-size: 28px; font-size: 28px;
font-weight: 550; font-weight: 550;
} }
@ -44,6 +44,8 @@ page {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
font-size: 28px; font-size: 28px;
font-weight: bold;
color: #424242;
padding: 10px 0; padding: 10px 0;
} }
&--detail { &--detail {
@ -53,6 +55,7 @@ page {
align-items: center; align-items: center;
padding: 10px 0; padding: 10px 0;
font-size: 28px; font-size: 28px;
color: #6e6e6e;
} }
&--name { &--name {
} }
@ -71,20 +74,23 @@ page {
.orderNo { .orderNo {
font-size: 28px; font-size: 28px;
color: #424242;
font-weight: 550; font-weight: 550;
} }
.status { .status {
font-size: 28px; font-size: 28px;
&--takingGoods { &--takingGoods {
font-weight: bold;
color: $color_main; color: $color_main;
} }
&--finished { &--finished {
font-weight: bold;
color: $color_font_three; color: $color_font_three;
} }
} }
.divider { .divider {
margin: 24px 0; margin: 20px 0 10px 0;
} }
.total { .total {
margin-top: 24px; margin-top: 24px;

View File

@ -160,7 +160,7 @@ const TakeDeliveryDetail: FC = () => {
return ( return (
<View className={styles.deliveryDetail}> <View className={styles.deliveryDetail}>
<View className={styles.content}> <View className={styles.content}>
<LayoutBlock circle> <LayoutBlock circle customStyle={{padding: '24rpx'}}>
<View className={styles.detailTop}> <View className={styles.detailTop}>
<View className={styles.orderNo}>{detailInfo?.take_order_no}</View> <View className={styles.orderNo}>{detailInfo?.take_order_no}</View>
{detailInfo?.take_goods_status === 0 ? ( {detailInfo?.take_goods_status === 0 ? (
@ -182,12 +182,12 @@ const TakeDeliveryDetail: FC = () => {
</LayoutBlock> </LayoutBlock>
{detailInfo?.take_goods_order_type !== 0 && ( {detailInfo?.take_goods_order_type !== 0 && (
<> <>
<LayoutBlock circle> <LayoutBlock circle customStyle={{padding: '24rpx'}}>
<View className={styles.orderInfoTop}>退</View> <View className={styles.orderInfoTop}>退</View>
<Divider direction='horizontal' customClassName={styles.divider}></Divider> <Divider direction='horizontal' customClassName={styles.divider}></Divider>
<UploadImage onlyRead={detailInfo?.status !== 0} onChange={handleUploadChange} defaultList={detailInfo?.fabric_piece_accessory_url}></UploadImage> <UploadImage onlyRead={detailInfo?.status !== 0} onChange={handleUploadChange} defaultList={detailInfo?.fabric_piece_accessory_url}></UploadImage>
</LayoutBlock> </LayoutBlock>
<LayoutBlock circle> <LayoutBlock circle customStyle={{padding: '24rpx'}}>
<View className={styles.orderInfoTop}>退</View> <View className={styles.orderInfoTop}>退</View>
<Divider direction='horizontal' customClassName={styles.divider}></Divider> <Divider direction='horizontal' customClassName={styles.divider}></Divider>
<UploadImage onlyRead={detailInfo?.status !== 0} onChange={handleUploadChange} defaultList={detailInfo?.accessory_url}></UploadImage> <UploadImage onlyRead={detailInfo?.status !== 0} onChange={handleUploadChange} defaultList={detailInfo?.accessory_url}></UploadImage>
@ -195,17 +195,17 @@ const TakeDeliveryDetail: FC = () => {
</> </>
)} )}
<LayoutBlock circle> <LayoutBlock circle customStyle={{padding: '24rpx'}}>
<View className={styles.orderInfoTop}></View> <View className={styles.orderInfoTop}></View>
<Divider direction='horizontal' customClassName={styles.divider}></Divider> <Divider direction='horizontal' customClassName={styles.divider}></Divider>
<View className='orderInfoDetail'> <View className='orderInfoDetail'>
<Cell title='提货人:' desc={detailInfo?.auditor_name}></Cell> <Cell title='提货人:' desc={detailInfo?.auditor_name || '暂无提货人'}></Cell>
<Cell title='创建时间:' desc={formatDateTime(detailInfo?.create_time)}></Cell> <Cell title='创建时间:' desc={formatDateTime(detailInfo?.create_time) || '暂无创建时间'}></Cell>
<Cell title='提货时间:' desc={formatDateTime(detailInfo?.audit_time)}></Cell> <Cell title='提货时间:' desc={formatDateTime(detailInfo?.audit_time) || '暂无提货时间'}></Cell>
</View> </View>
</LayoutBlock> </LayoutBlock>
{detailInfo?.take_goods_order_type !== 0 && ( {detailInfo?.take_goods_order_type !== 0 && (
<LayoutBlock circle> <LayoutBlock circle customStyle={{padding: '24rpx'}}>
<View className={styles.orderInfoTop}></View> <View className={styles.orderInfoTop}></View>
<Divider direction='horizontal' customClassName={styles.divider}></Divider> <Divider direction='horizontal' customClassName={styles.divider}></Divider>
<View className='orderInfoDetail'>{detailInfo?.remark}</View> <View className='orderInfoDetail'>{detailInfo?.remark}</View>