🐞 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
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 = {
SearchScene: 0, //商城面料搜索

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@ import React, { useCallback, memo, useEffect, useMemo, useRef, useState } from '
import Search from '@/components/search'
import styles from "./index.module.scss"
import classnames from "classnames";
import Empty from './components/empty'
import Empty from '@/components/empty'
import Taro, { useDidShow } from '@tarojs/taro';
import Goods from './components/goods'
import { mpproductlist } from "@/api/search"
@ -376,7 +376,7 @@ export default memo(() => {
</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{
margin: 24px;
margin: 20px;
padding: 24px;
}
.topBar {
font-size: 28px;
@ -8,13 +9,16 @@
flex-flow: row nowrap;
justify-content: space-between;
color: $color_font_one;
.orderNo{
font-weight: bold;
}
}
&__orderType {
color: rgba($color: #000000, $alpha: 0.6);
font-weight: 550;
font-weight: bold;
}
&__orderStatus {
font-weight: 550;
font-weight: bold;
&--finished{
color: $color_font_three;
}

View File

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

View File

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

View File

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

View File

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

View File

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