🐞 fix(#1000663#16#17#18#19#20): 修复发货列表|发货详情的样式问题
This commit is contained in:
@@ -177,4 +177,4 @@
|
||||
height: 480px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+225
@@ -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<string>
|
||||
| { [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<Mark>
|
||||
|
||||
isActive?: boolean
|
||||
|
||||
isToday?: boolean
|
||||
|
||||
isBeforeMin?: boolean
|
||||
|
||||
isAfterMax?: boolean
|
||||
|
||||
isDisabled?: boolean
|
||||
|
||||
isSelected?: boolean
|
||||
|
||||
isSelectedHead?: boolean
|
||||
|
||||
isSelectedTail?: boolean
|
||||
}
|
||||
|
||||
export interface GroupOptions {
|
||||
validDates: Array<ValidDate>
|
||||
|
||||
marks: Array<Mark>
|
||||
|
||||
format: string
|
||||
|
||||
selectedDates: Array<SelectedDate>
|
||||
|
||||
minDate?: DateArg
|
||||
|
||||
maxDate?: DateArg
|
||||
}
|
||||
|
||||
export type List<T> = Array<T>
|
||||
|
||||
export type ListInfo<T> = {
|
||||
value: number
|
||||
|
||||
list: List<T>
|
||||
}
|
||||
|
||||
export interface SelectedDate {
|
||||
end?: Calendar.DateArg
|
||||
|
||||
start: Calendar.DateArg
|
||||
}
|
||||
}
|
||||
|
||||
export default Calendar
|
||||
export { Calendar }
|
||||
// #endregion
|
||||
|
||||
// #region AtCalendar
|
||||
export interface AtCalendarPropsBase {
|
||||
format?: string
|
||||
|
||||
validDates?: Array<Calendar.ValidDate>
|
||||
|
||||
minDate?: Calendar.DateArg
|
||||
|
||||
maxDate?: Calendar.DateArg
|
||||
|
||||
isSwiper?: boolean
|
||||
|
||||
marks?: Array<Calendar.Mark>
|
||||
|
||||
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<Calendar.ValidDate>
|
||||
|
||||
marks: Array<Calendar.Mark>
|
||||
|
||||
currentDate: Calendar.DateArg | Calendar.SelectedDate
|
||||
|
||||
monthFormat: string
|
||||
|
||||
hideArrow: boolean
|
||||
|
||||
isVertical: boolean
|
||||
|
||||
isMultiSelect: boolean
|
||||
|
||||
selectedDates: Array<Calendar.SelectedDate>
|
||||
}
|
||||
|
||||
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<Calendar.ListInfo<Calendar.Item>>
|
||||
|
||||
export interface AtCalendarBodyProps {
|
||||
format: string
|
||||
|
||||
validDates: Array<Calendar.ValidDate>
|
||||
|
||||
marks: Array<Calendar.Mark>
|
||||
|
||||
isSwiper: boolean
|
||||
|
||||
minDate?: Calendar.DateArg
|
||||
|
||||
maxDate?: Calendar.DateArg
|
||||
|
||||
isVertical: boolean
|
||||
|
||||
generateDate: number
|
||||
|
||||
selectedDate: Calendar.SelectedDate
|
||||
|
||||
selectedDates: Array<Calendar.SelectedDate> | []
|
||||
|
||||
onDayClick: (item: Calendar.Item) => void
|
||||
|
||||
onSwipeMonth: (vectorCount: number) => void
|
||||
|
||||
onLongClick: (item: Calendar.Item) => void
|
||||
}
|
||||
|
||||
export interface AtCalendarBodyState {
|
||||
isAnimate: boolean
|
||||
|
||||
offsetSize: number
|
||||
|
||||
listGroup: AtCalendarBodyListGroup
|
||||
}
|
||||
// #endregion
|
||||
@@ -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<Props> {
|
||||
<View className='extra-marks'>
|
||||
{item.marks.map((mark, key) => (
|
||||
<Text key={key} className='mark'>
|
||||
{mark.value}
|
||||
{mark.value as React.ReactNode}
|
||||
</Text>
|
||||
))}
|
||||
</View>
|
||||
|
||||
@@ -49,6 +49,7 @@ $am-ms: 200ms;
|
||||
justify-content: center;
|
||||
height: 80px;
|
||||
font-size: 29px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
@@ -14,17 +14,17 @@ const SaleModeTag: FC<SaleModeProps> = (props) => {
|
||||
return (
|
||||
<>
|
||||
{saleMode === EnumSaleMode.Bulk && (
|
||||
<Tag circle type='primary' size={size} customClassName={customClassName}>
|
||||
<Tag circle type='bulk' size={size} customClassName={customClassName}>
|
||||
大货
|
||||
</Tag>
|
||||
)}
|
||||
{saleMode === EnumSaleMode.Plate && (
|
||||
<Tag circle type='danger' size={size} customClassName={customClassName}>
|
||||
<Tag circle type='plate' size={size} customClassName={customClassName}>
|
||||
剪板
|
||||
</Tag>
|
||||
)}
|
||||
{saleMode === EnumSaleMode.BulkCut && (
|
||||
<Tag circle type='warning' size={size} customClassName={customClassName}>
|
||||
<Tag circle type='bulkCut' size={size} customClassName={customClassName}>
|
||||
散剪
|
||||
</Tag>
|
||||
)}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
.time-box {
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
.sure-box {
|
||||
margin-left: 102px;
|
||||
margin-right: 102px;
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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 (
|
||||
<>
|
||||
<View className='time-box'>
|
||||
<View className={styles['time-box']}>
|
||||
<AtCalendar
|
||||
isMultiSelect
|
||||
format='YYYY-MM-DD 00:00:00'
|
||||
@@ -43,9 +44,10 @@ export default memo((props: Props) => {
|
||||
onSelectDate={(e) => handTime?.(e)}
|
||||
/>
|
||||
</View>
|
||||
<View className='sure-box' onClick={() => onSelectDate?.(time)}>
|
||||
<NormalButton type='primary' onClick={() => onSelectDate?.(time)} size="normal" round customClassName={styles['sure-box']}>确认</NormalButton>
|
||||
{/* <View className='sure-box' onClick={() => onSelectDate?.(time)}>
|
||||
确认
|
||||
</View>
|
||||
</View> */}
|
||||
</>
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user