From 851902873bebdc30aaf6bafd78fabe6e11b45e95 Mon Sep 17 00:00:00 2001 From: xuan Date: Wed, 9 Nov 2022 18:46:39 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(#1000663#16#17#18#19#20):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=91=E8=B4=A7=E5=88=97=E8=A1=A8|?= =?UTF-8?q?=E5=8F=91=E8=B4=A7=E8=AF=A6=E6=83=85=E7=9A=84=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/calendar/index.scss | 2 +- src/components/calendar/types/calendar.d.ts | 225 ++++++++++++++++++ .../calendar/ui/date-list/index.tsx | 4 +- src/components/popup/index.module.scss | 1 + src/components/saleModeTag/index.tsx | 6 +- src/components/tag/index.module.scss | 30 +++ src/components/tag/index.tsx | 2 +- src/components/timePicker/index.module.scss | 12 + src/components/timePicker/index.scss | 19 -- src/components/timePicker/index.tsx | 10 +- .../components/Filter/index.module.scss | 12 +- .../components/ItemList/index.module.scss | 12 +- .../delivery/components/ItemList/index.tsx | 6 +- src/pages/delivery/index.module.scss | 2 +- src/pages/delivery/index.tsx | 2 +- src/pages/deliveryDetail/index.module.scss | 8 +- src/pages/deliveryDetail/index.tsx | 14 +- src/styles/common.scss | 4 + 18 files changed, 320 insertions(+), 51 deletions(-) create mode 100644 src/components/calendar/types/calendar.d.ts create mode 100644 src/components/timePicker/index.module.scss delete mode 100644 src/components/timePicker/index.scss diff --git a/src/components/calendar/index.scss b/src/components/calendar/index.scss index 08a9c23..7aad719 100644 --- a/src/components/calendar/index.scss +++ b/src/components/calendar/index.scss @@ -177,4 +177,4 @@ height: 480px; } } - } \ No newline at end of file + } diff --git a/src/components/calendar/types/calendar.d.ts b/src/components/calendar/types/calendar.d.ts new file mode 100644 index 0000000..6a47531 --- /dev/null +++ b/src/components/calendar/types/calendar.d.ts @@ -0,0 +1,225 @@ +import dayjs from 'dayjs' +// import { BaseEvent } from '@tarojs/components/types/common' + +// #region Calendar +declare namespace Calendar { + export type DateArg = string | number | Date + + export type classNameType = + | string + | Array + | { [key: string]: boolean } + + export interface Mark { + value: DateArg + } + + export interface ValidDate { + value: DateArg + } + + export interface Item { + value: string + + _value: dayjs.Dayjs + + text: number + + type: number + + marks: Array + + isActive?: boolean + + isToday?: boolean + + isBeforeMin?: boolean + + isAfterMax?: boolean + + isDisabled?: boolean + + isSelected?: boolean + + isSelectedHead?: boolean + + isSelectedTail?: boolean + } + + export interface GroupOptions { + validDates: Array + + marks: Array + + format: string + + selectedDates: Array + + minDate?: DateArg + + maxDate?: DateArg + } + + export type List = Array + + export type ListInfo = { + value: number + + list: List + } + + export interface SelectedDate { + end?: Calendar.DateArg + + start: Calendar.DateArg + } +} + +export default Calendar +export { Calendar } +// #endregion + +// #region AtCalendar +export interface AtCalendarPropsBase { + format?: string + + validDates?: Array + + minDate?: Calendar.DateArg + + maxDate?: Calendar.DateArg + + isSwiper?: boolean + + marks?: Array + + monthFormat?: string + + hideArrow?: boolean + + isVertical?: boolean + + className?: Calendar.classNameType + + onClickPreMonth?: () => void + + onClickNextMonth?: () => void + + onSelectDate?: (item: { value: Calendar.SelectedDate }) => void + + onDayClick?: (item: { value: string }) => void + + onDayLongClick?: (item: { value: string }) => void + + onMonthChange?: (value: string) => void +} + +export interface AtCalendarSingleSelectedProps extends AtCalendarPropsBase { + isMultiSelect?: false + + currentDate?: Calendar.DateArg +} + +export interface AtCalendarMutilSelectedProps extends AtCalendarPropsBase { + isMultiSelect?: true + + currentDate?: Calendar.SelectedDate +} + +export type AtCalendarProps = + | AtCalendarSingleSelectedProps + | AtCalendarMutilSelectedProps + +export interface AtCalendarDefaultProps { + format: string + + isSwiper: boolean + + validDates: Array + + marks: Array + + currentDate: Calendar.DateArg | Calendar.SelectedDate + + monthFormat: string + + hideArrow: boolean + + isVertical: boolean + + isMultiSelect: boolean + + selectedDates: Array +} + +export interface AtCalendarState { + generateDate: number + + selectedDate: Calendar.SelectedDate +} + +export type AtCalendarPropsWithDefaults = AtCalendarProps & + AtCalendarDefaultProps +// #endregion + +// #region AtCalendarController +export interface AtCalendarControllerProps { + generateDate: Calendar.DateArg + + minDate?: Calendar.DateArg + + maxDate?: Calendar.DateArg + + hideArrow: boolean + + monthFormat: string + + onPreMonth: () => void + + onNextMonth: () => void + + onSelectDate: (e: any) => void +} + +export interface AtCalendarControllerState {} +// #endregion + +// #region AtCalendarBody +export type AtCalendarBodyListGroup = Array> + +export interface AtCalendarBodyProps { + format: string + + validDates: Array + + marks: Array + + isSwiper: boolean + + minDate?: Calendar.DateArg + + maxDate?: Calendar.DateArg + + isVertical: boolean + + generateDate: number + + selectedDate: Calendar.SelectedDate + + selectedDates: Array | [] + + onDayClick: (item: Calendar.Item) => void + + onSwipeMonth: (vectorCount: number) => void + + onLongClick: (item: Calendar.Item) => void +} + +export interface AtCalendarBodyState { + isAnimate: boolean + + offsetSize: number + + listGroup: AtCalendarBodyListGroup +} +// #endregion diff --git a/src/components/calendar/ui/date-list/index.tsx b/src/components/calendar/ui/date-list/index.tsx index 6f807d7..6c3a6b6 100644 --- a/src/components/calendar/ui/date-list/index.tsx +++ b/src/components/calendar/ui/date-list/index.tsx @@ -1,7 +1,7 @@ import classnames from 'classnames' import React from 'react' import { Text, View } from '@tarojs/components' -import { Calendar } from '../../../../../types/calendar' +import { Calendar } from '../../types/calendar' import * as constant from '../../common/constant' const MAP: { [key: number]: string } = { @@ -66,7 +66,7 @@ export default class AtCalendarList extends React.Component { {item.marks.map((mark, key) => ( - {mark.value} + {mark.value as React.ReactNode} ))} diff --git a/src/components/popup/index.module.scss b/src/components/popup/index.module.scss index 39c811a..5146bc0 100644 --- a/src/components/popup/index.module.scss +++ b/src/components/popup/index.module.scss @@ -49,6 +49,7 @@ $am-ms: 200ms; justify-content: center; height: 80px; font-size: 29px; + font-weight: bold; color: #000000; padding-top: 10px; } diff --git a/src/components/saleModeTag/index.tsx b/src/components/saleModeTag/index.tsx index f425535..8e45fde 100644 --- a/src/components/saleModeTag/index.tsx +++ b/src/components/saleModeTag/index.tsx @@ -14,17 +14,17 @@ const SaleModeTag: FC = (props) => { return ( <> {saleMode === EnumSaleMode.Bulk && ( - + 大货 )} {saleMode === EnumSaleMode.Plate && ( - + 剪板 )} {saleMode === EnumSaleMode.BulkCut && ( - + 散剪 )} diff --git a/src/components/tag/index.module.scss b/src/components/tag/index.module.scss index 0bb8ba5..635b0ff 100644 --- a/src/components/tag/index.module.scss +++ b/src/components/tag/index.module.scss @@ -35,6 +35,24 @@ background-color: $color_warning; color: white; } + // 大货 + &--bulk { + border: 1px solid $color_bulk; + background-color: $color_bulk; + color: white; + } + // 剪板 + &--plate { + border: 1px solid $color_plate; + background-color: $color_plate; + color: white; + } + // 散剪 + &--bulkCut { + border: 1px solid $color_bulkCut; + background-color: $color_bulkCut; + color: white; + } &--info { border: 1px solid $color_info; background-color: $color_info; @@ -54,6 +72,18 @@ border: 1px solid $color_warning; color: $color_warning; } + &.tag--bulk { + border: 1px solid $color_bulk; + color: $color_bulk; + } + &.tag--plate { + border: 1px solid $color_plate; + color: $color_plate; + } + &.tag--bulkCut { + border: 1px solid $color_bulkCut; + color: $color_bulkCut; + } &.tag--info { border: 1px solid $color_info; color: $color_info; diff --git a/src/components/tag/index.tsx b/src/components/tag/index.tsx index ade0c13..bf30efb 100644 --- a/src/components/tag/index.tsx +++ b/src/components/tag/index.tsx @@ -4,7 +4,7 @@ import classnames from 'classnames' import styles from './index.module.scss' export type TagSize = 'small' | 'normal' -type TagType = 'primary' | 'danger' | 'warning' | 'info' +type TagType = 'primary' | 'danger' | 'warning' | 'info' | 'bulk' | 'plate' | 'bulkCut' interface PropsType { type?: TagType diff --git a/src/components/timePicker/index.module.scss b/src/components/timePicker/index.module.scss new file mode 100644 index 0000000..e59600b --- /dev/null +++ b/src/components/timePicker/index.module.scss @@ -0,0 +1,12 @@ + + +.time-box { + padding: 40px; +} + +.sure-box { + margin-left: 102px; + margin-right: 102px; + font-size: 28px; + font-weight: 500; +} diff --git a/src/components/timePicker/index.scss b/src/components/timePicker/index.scss deleted file mode 100644 index b808aa6..0000000 --- a/src/components/timePicker/index.scss +++ /dev/null @@ -1,19 +0,0 @@ - - -.time-box { - padding: 40px; -} - -.sure-box { - // padding: 16px 102px 30px 102px; - margin-left: 102px; - margin-right: 102px; - height: 80px; - background: #337FFF; - border-radius: 44px; - font-size: 28px; - font-weight: 500; - color: #FFFFFF; - text-align: center; - line-height: 80px; -} diff --git a/src/components/timePicker/index.tsx b/src/components/timePicker/index.tsx index 92a369f..d578a0e 100644 --- a/src/components/timePicker/index.tsx +++ b/src/components/timePicker/index.tsx @@ -1,9 +1,10 @@ import Popup from '@/components/popup' import { useState, memo } from 'react' import { View } from '@tarojs/components' -import './index.scss' +import styles from './index.module.scss' import AtCalendar from '@/components/calendar/index' import dayjs from 'dayjs' +import NormalButton from '../normalButton' type DateArg = string | number | Date interface Props { @@ -32,7 +33,7 @@ export default memo((props: Props) => { return ( <> - + { onSelectDate={(e) => handTime?.(e)} /> - onSelectDate?.(time)}> + onSelectDate?.(time)} size="normal" round customClassName={styles['sure-box']}>确认 + {/* onSelectDate?.(time)}> 确认 - + */} ) }) diff --git a/src/pages/delivery/components/Filter/index.module.scss b/src/pages/delivery/components/Filter/index.module.scss index 175fa29..fc96a9e 100644 --- a/src/pages/delivery/components/Filter/index.module.scss +++ b/src/pages/delivery/components/Filter/index.module.scss @@ -48,11 +48,12 @@ font-size: 28px; height: 72px; &--text { - color: #909090; + color: #696969; display: flex; flex-flow: row nowrap; justify-content: center; align-items: center; + font-weight: lighter; } &:hover { opacity: 0.7; @@ -62,6 +63,7 @@ background-color: #eaf2ff; .filterButton--text { color: $color_main; + font-weight: 550; } } } @@ -74,11 +76,13 @@ justify-content: space-around; padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); + .btn { + width: 40%; + &:hover{ + filter: blur(.7); + } - btn:hover{ - filter: blur(.7); } - .rest_btn { font-size: 28px; } diff --git a/src/pages/delivery/components/ItemList/index.module.scss b/src/pages/delivery/components/ItemList/index.module.scss index 10a3502..500720c 100644 --- a/src/pages/delivery/components/ItemList/index.module.scss +++ b/src/pages/delivery/components/ItemList/index.module.scss @@ -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; + color: #6e6e6e; + font-weight: bold; } &__orderStatus { - font-weight: 550; + font-weight: bold; &--toBeAudited{ color: #e42945; } diff --git a/src/pages/delivery/components/ItemList/index.tsx b/src/pages/delivery/components/ItemList/index.tsx index 755b9a6..c0edb29 100644 --- a/src/pages/delivery/components/ItemList/index.tsx +++ b/src/pages/delivery/components/ItemList/index.tsx @@ -53,13 +53,13 @@ const ItemList:FC = (props) => { - 单号:{itemData?.order_no} + 单号:{itemData?.order_no} {itemData?.status === 1 && 已审核} {itemData?.status === 0 && 待审核} {itemData?.type_name} - + 货品信息: @@ -83,7 +83,7 @@ const ItemList:FC = (props) => { customClassName={styles.bottomBar__button} plain type='info' - customStyles={{ color: '#8e8e8e', borderColor: '#8e8e8e' }} + customStyles={{ color: '#636363', borderColor: '#c8c8c8' }} round onClick={() => handleDetail(itemData)}> 查看详情 diff --git a/src/pages/delivery/index.module.scss b/src/pages/delivery/index.module.scss index d31e751..c68e0d4 100644 --- a/src/pages/delivery/index.module.scss +++ b/src/pages/delivery/index.module.scss @@ -25,7 +25,7 @@ page { height: 100%; &--total { display: block; - margin-top: 24px; + margin-top: 20px; padding: 0 24px; font-size: 24px; color: #9d9d9d; diff --git a/src/pages/delivery/index.tsx b/src/pages/delivery/index.tsx index c7e6b55..962c545 100644 --- a/src/pages/delivery/index.tsx +++ b/src/pages/delivery/index.tsx @@ -41,7 +41,7 @@ const Delivery: FC = () => { const { fetchData: FetchDeliveryOrderList, state: orderState } = DeliverNoticeOrderList() //数据加载状态 const statusMore = useMemo(() => { - return dataLoadingStatus({ list: deliveryOrderList.list, total: deliveryOrderList.total, status: orderState.loading }) + return dataLoadingStatus({ list: deliveryOrderList.list, total: deliveryOrderList.total, status: orderState.loading! }) }, [deliveryOrderList, orderState]) //输入搜索关键字 diff --git a/src/pages/deliveryDetail/index.module.scss b/src/pages/deliveryDetail/index.module.scss index 9023243..99f6141 100644 --- a/src/pages/deliveryDetail/index.module.scss +++ b/src/pages/deliveryDetail/index.module.scss @@ -38,6 +38,8 @@ page { justify-content: space-between; align-items: center; font-size: 28px; + font-weight: bold; + color: #424242; padding: 10px 0; } &--detail { @@ -47,6 +49,7 @@ page { align-items: center; padding: 10px 0; font-size: 28px; + color: #6e6e6e; } &--name{ @@ -69,19 +72,22 @@ page { .orderNo { font-size: 28px; font-weight: 550; + color: #424242; } .status { font-size: 28px; &--toBeAudit { color: $color_danger; + font-weight: bold; } &--audited { color: $color_main; + font-weight: bold; } } .divider { - margin: 24px 0; + margin: 20px 0 10px 0; } .total { margin-top: 24px; diff --git a/src/pages/deliveryDetail/index.tsx b/src/pages/deliveryDetail/index.tsx index 359669c..f9bcc72 100644 --- a/src/pages/deliveryDetail/index.tsx +++ b/src/pages/deliveryDetail/index.tsx @@ -132,7 +132,7 @@ const DeliveryDetail: FC = () => { return ( - + 发货单号:{detailInfo?.order_no} {detailInfo?.status === 0 ? 待审核 : 已完成} @@ -147,17 +147,17 @@ const DeliveryDetail: FC = () => { - + 订单信息 - - - - + + + + - + 附件 diff --git a/src/styles/common.scss b/src/styles/common.scss index 39e7cb0..47575cd 100644 --- a/src/styles/common.scss +++ b/src/styles/common.scss @@ -9,6 +9,10 @@ $color_warning: #e6a23c; $color_money: #F64861; $color_info: #909090; +$color_bulk: #0D7CFF; // 大货 +$color_plate: #F79B31; // 剪板 +$color_bulkCut: #0AC76F; // 散剪 + $opacity-disabled: 0.3; $borderStyle: solid; $borderColor: #ebebeb;