🎈 perf(按钮): 优化normalButton组件
This commit is contained in:
+14
-20
@@ -36,6 +36,10 @@ export default defineAppConfig({
|
||||
'custom-wrapper': '/custom-wrapper',
|
||||
},
|
||||
subPackages: [
|
||||
{
|
||||
root: 'pages/saleStatistic',
|
||||
pages: ['index'],
|
||||
},
|
||||
{
|
||||
root: 'pages/takeDelivery',
|
||||
pages: ['index'],
|
||||
@@ -101,34 +105,24 @@ export default defineAppConfig({
|
||||
pages: ['index'],
|
||||
},
|
||||
{
|
||||
root: "pages/applyMoney",
|
||||
pages: [
|
||||
"index"
|
||||
]
|
||||
root: 'pages/applyMoney',
|
||||
pages: ['index'],
|
||||
},
|
||||
{
|
||||
root: "pages/newCollection",
|
||||
pages: [
|
||||
"index"
|
||||
]
|
||||
root: 'pages/newCollection',
|
||||
pages: ['index'],
|
||||
},
|
||||
{
|
||||
root: "pages/addCollection",
|
||||
pages: [
|
||||
"index"
|
||||
]
|
||||
root: 'pages/addCollection',
|
||||
pages: ['index'],
|
||||
},
|
||||
{
|
||||
root: "pages/accountPage",
|
||||
pages: [
|
||||
"index"
|
||||
]
|
||||
root: 'pages/accountPage',
|
||||
pages: ['index'],
|
||||
},
|
||||
{
|
||||
root: "pages/collectionDetail",
|
||||
pages: [
|
||||
"index"
|
||||
]
|
||||
root: 'pages/collectionDetail',
|
||||
pages: ['index'],
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.dropDownItem{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState, memo } from 'react'
|
||||
import styles from './index.module.scss'
|
||||
import classnames from 'classnames'
|
||||
import Iconfont from '../iconfont/iconfont'
|
||||
// 弹窗选择向上弹窗还是向下弹窗
|
||||
type Direction = 'up' | 'down'
|
||||
// 配置 菜单可选项
|
||||
type Options = {
|
||||
text: string
|
||||
value: number
|
||||
}
|
||||
|
||||
interface DropDownEvent {
|
||||
change: (value: Options['value']) => void // value 变化时触发
|
||||
}
|
||||
|
||||
interface PropsType extends DropDownEvent{
|
||||
direction?: Direction
|
||||
title: string // 已选中的菜单标题
|
||||
options?: Options[]
|
||||
value?: number | string // 当前选中的值
|
||||
children?: React.ReactNode
|
||||
activeColor?: string
|
||||
}
|
||||
|
||||
export default (props: PropsType) => {
|
||||
const { children, direction = 'down', title, value, options, change, activeColor } = props
|
||||
|
||||
const defaultOptions = () => {
|
||||
return options?.map(({text, value})=>{
|
||||
return (
|
||||
<View>
|
||||
<Text>{text}</Text>
|
||||
<Iconfont name='icon-bianji' size={40} color={value !== options[0].value ? activeColor : '#333'}></Iconfont>
|
||||
</View>
|
||||
)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<View className={styles.dropDownItem}>
|
||||
<View >
|
||||
<Text className='' style={{ color: activeColor }}>
|
||||
{title}
|
||||
</Text>
|
||||
<Iconfont name='icon-bianji' size={40} color={value !== options![0].value ? activeColor : '#333'}></Iconfont>
|
||||
</View>
|
||||
{children ? children : defaultOptions()}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
.filterButton {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 20px;
|
||||
box-sizing: border-box;
|
||||
border: 0 solid transparent;
|
||||
background-color: #f6f6f6;
|
||||
border-radius: 8px;
|
||||
font-size: 28px;
|
||||
height: 72px;
|
||||
&--text {
|
||||
color: #909090;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
&:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
&--active {
|
||||
border: 1px solid $color_main;
|
||||
background-color: #eaf2ff;
|
||||
.filterButton--text {
|
||||
color: $color_main;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import classnames from "classnames"
|
||||
import { FC } from "react"
|
||||
import NormalButton from "../normalButton"
|
||||
import styles from './index.module.scss'
|
||||
|
||||
interface ButtonPropsType {
|
||||
isActive: boolean
|
||||
onClick?: Function
|
||||
children?: React.ReactNode
|
||||
customClassName?: string
|
||||
}
|
||||
|
||||
const FilterButton: FC<ButtonPropsType> = props => {
|
||||
const { onClick, children, isActive = false, customClassName } = props
|
||||
const handleClick = () => {
|
||||
onClick?.()
|
||||
}
|
||||
return (
|
||||
<NormalButton
|
||||
customTextClassName={styles['filterButton--text']}
|
||||
customClassName={classnames(styles.filterButton, isActive && styles['filterButton--active'], customClassName)}
|
||||
onClick={handleClick}>
|
||||
{children}
|
||||
</NormalButton>
|
||||
)
|
||||
}
|
||||
export default FilterButton
|
||||
@@ -1,5 +1,4 @@
|
||||
.button {
|
||||
$current_color: #fff;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: center;
|
||||
@@ -10,6 +9,7 @@
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
&--normal {
|
||||
height: 72px;
|
||||
font-size: $font_size_medium;
|
||||
@@ -24,24 +24,23 @@
|
||||
// 按钮类型
|
||||
&--primary {
|
||||
border: 1px solid $color_main;
|
||||
color: $color_main;
|
||||
$current_color: $color_main;
|
||||
background-color: $color_main;
|
||||
color: white;
|
||||
}
|
||||
&--danger {
|
||||
border: 1px solid $color_danger;
|
||||
color: $color_danger;
|
||||
$current_color: $color_danger;
|
||||
background-color: $color_danger;
|
||||
color: white;
|
||||
}
|
||||
&--warning {
|
||||
border: 1px solid $color_warning;
|
||||
color: $color_warning;
|
||||
$current_color: $color_warning;
|
||||
background-color: $color_warning;
|
||||
color: white;
|
||||
}
|
||||
&--info {
|
||||
border: 1px solid $color_info;
|
||||
color: $color_info;
|
||||
$current_color: $color_info;
|
||||
|
||||
background-color: $color_info;
|
||||
color: white;
|
||||
}
|
||||
&--round {
|
||||
border-radius: 50px;
|
||||
@@ -49,11 +48,24 @@
|
||||
&--circle {
|
||||
border-radius: 16px;
|
||||
}
|
||||
// 朴素按钮
|
||||
&--plain {
|
||||
background-color: currentColor;
|
||||
border-color: currentColor;
|
||||
.button--text {
|
||||
color: #fff;
|
||||
background-color: white;
|
||||
&.button--primary {
|
||||
border: 1px solid $color_main;
|
||||
color: $color_main;
|
||||
}
|
||||
&.button--danger {
|
||||
border: 1px solid $color_danger;
|
||||
color: $color_danger;
|
||||
}
|
||||
&.button--warning {
|
||||
border: 1px solid $color_warning;
|
||||
color: $color_warning;
|
||||
}
|
||||
&.button--info {
|
||||
border: 1px solid $color_info;
|
||||
color: $color_info;
|
||||
}
|
||||
}
|
||||
&--text {
|
||||
|
||||
@@ -11,7 +11,7 @@ interface PropsType {
|
||||
type?: ButtonType
|
||||
round?: boolean // 大圆角
|
||||
disabled?: boolean
|
||||
plain?: boolean // 填满背景颜色
|
||||
plain?: boolean // plain
|
||||
circle?: boolean // 小圆角
|
||||
children?: ReactNode
|
||||
onClick?: Function
|
||||
|
||||
@@ -73,3 +73,6 @@
|
||||
padding-left: 20px !important;
|
||||
}
|
||||
}
|
||||
.customRightSlot{
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
@@ -101,22 +101,21 @@ export default memo(
|
||||
disabled={disabled}
|
||||
value={inputCon}
|
||||
placeholder={placeholder}
|
||||
onInput={(e) => onInputEven(e)}
|
||||
onInput={e => onInputEven(e)}
|
||||
/>
|
||||
<View className={styles.search_closeBtn}>
|
||||
{!!inputCon && <CloseBtn onClose={() => clearInput()} styleObj={{ width: '20rpx', height: '20rpx', backgroundColor: '#fff', border: '0' }} />}
|
||||
</View>
|
||||
{
|
||||
showScan && <View onClick={() => {
|
||||
handScan?.()
|
||||
}}>
|
||||
<IconFont
|
||||
name={'icon-saomiao'} size={40} color={'#337FFF'}
|
||||
></IconFont>
|
||||
{showScan && (
|
||||
<View
|
||||
onClick={() => {
|
||||
handScan?.()
|
||||
}}>
|
||||
<IconFont name={'icon-saomiao'} size={40} color={'#337FFF'}></IconFont>
|
||||
</View>
|
||||
}
|
||||
)}
|
||||
|
||||
<View>{customRightSlot}</View>
|
||||
<View className={styles.customRightSlot}>{customRightSlot}</View>
|
||||
</View>
|
||||
</View>
|
||||
{showBtn && (
|
||||
|
||||
@@ -145,7 +145,7 @@ const DeliveryFilter = memo<DeliveryPropsType>((props) => {
|
||||
不限
|
||||
</FilterButton>
|
||||
{!!typeList?.length &&
|
||||
typeList?.map((item) => {
|
||||
typeList?.map(item => {
|
||||
return (
|
||||
<FilterButton isActive={searchFilter.type === item?.id} onClick={() => handleSelectedType(item?.id)}>
|
||||
{item.name}
|
||||
@@ -171,10 +171,10 @@ const DeliveryFilter = memo<DeliveryPropsType>((props) => {
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.filterController}>
|
||||
<NormalButton type='primary' round customClassName={classnames(styles.btn, styles.rest_btn)} onClick={handleReset}>
|
||||
<NormalButton plain type='primary' round customClassName={classnames(styles.btn, styles.rest_btn)} onClick={handleReset}>
|
||||
重置
|
||||
</NormalButton>
|
||||
<NormalButton type='primary' plain round customClassName={classnames(styles.btn, styles.verify_btn)} onClick={handleConfirm}>
|
||||
<NormalButton type='primary' round customClassName={classnames(styles.btn, styles.verify_btn)} onClick={handleConfirm}>
|
||||
确认
|
||||
</NormalButton>
|
||||
</View>
|
||||
|
||||
@@ -81,6 +81,7 @@ const ItemList:FC<PropsType> = (props) => {
|
||||
<View className={styles.bottomBar}>
|
||||
<NormalButton
|
||||
customClassName={styles.bottomBar__button}
|
||||
plain
|
||||
type='info'
|
||||
customStyles={{ color: '#8e8e8e', borderColor: '#8e8e8e' }}
|
||||
round
|
||||
@@ -88,7 +89,7 @@ const ItemList:FC<PropsType> = (props) => {
|
||||
查看详情
|
||||
</NormalButton>
|
||||
{itemData?.status === 0 && (
|
||||
<NormalButton customClassName={styles.bottomBar__button} type='primary' round onClick={() => handleAudit(itemData?.id)}>
|
||||
<NormalButton customClassName={styles.bottomBar__button} type='primary' plain round onClick={() => handleAudit(itemData?.id)}>
|
||||
确认审核
|
||||
</NormalButton>
|
||||
)}
|
||||
|
||||
@@ -120,10 +120,10 @@ const DeliveryDetail: FC = () => {
|
||||
const BottomBar = useMemo(() => {
|
||||
return (
|
||||
<View className={styles.bottomBar}>
|
||||
<NormalButton type='primary' round onClick={handleUploadPic}>
|
||||
<NormalButton plain type='primary' round onClick={handleUploadPic}>
|
||||
上传附件
|
||||
</NormalButton>
|
||||
<NormalButton type='primary' plain round onClick={handleAudit}>
|
||||
<NormalButton type='primary' round onClick={handleAudit}>
|
||||
确认审核
|
||||
</NormalButton>
|
||||
</View>
|
||||
|
||||
@@ -115,7 +115,7 @@ const Login: FC = () => {
|
||||
<Text className={styles.isForgetPwd}>忘记密码?</Text>
|
||||
</View>
|
||||
</View>
|
||||
<NormalButton circle plain onClick={handleLogin} customClassName={styles['login-button']}>
|
||||
<NormalButton circle onClick={handleLogin} customClassName={styles['login-button']}>
|
||||
登录
|
||||
</NormalButton>
|
||||
<QuickLogin />
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
export default {
|
||||
navigationBarTitleText: '销售统计',
|
||||
enablePullDownRefresh: true,
|
||||
}
|
||||
@@ -0,0 +1,370 @@
|
||||
page {
|
||||
background: #f7f7f7;
|
||||
}
|
||||
|
||||
.mainBox {
|
||||
.pussBox {
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.pussName {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.pussPhone {
|
||||
margin-left: 88px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
.total {
|
||||
margin-top: 44px;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
margin-left: 32px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.productBox {
|
||||
width: 702px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16px;
|
||||
margin-left: 24px;
|
||||
padding-bottom: 36px;
|
||||
overflow: hidden;
|
||||
|
||||
.flexMoney {
|
||||
display: flex;
|
||||
margin-top: 32px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.flexTotalBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.totalFont {
|
||||
margin-left: 32px;
|
||||
margin-right: 8px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.tishi {
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.shoudPay {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #F64861;
|
||||
margin-right: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.defaltBox {
|
||||
margin: 24px;
|
||||
padding: 24px 32px 24px 24px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16px;
|
||||
|
||||
.titleBox {
|
||||
width: 638px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.modeName {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #337FFF;
|
||||
}
|
||||
}
|
||||
|
||||
.modeLine {
|
||||
margin-top: 24px;
|
||||
width: 638px;
|
||||
height: 1px;
|
||||
background: #000000;
|
||||
opacity: 0.1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.goodsBox {
|
||||
margin-top: 24px;
|
||||
overflow: hidden;
|
||||
border-bottom: 8px solid #F7F7F7;
|
||||
|
||||
.goodsProduct {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
margin-left: 32px;
|
||||
}
|
||||
|
||||
.goodsLine {
|
||||
width: 638px;
|
||||
height: 1px;
|
||||
background: #000000;
|
||||
opacity: 0.1;
|
||||
margin-left: 32px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.itemGoods {
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
|
||||
.itemPic {
|
||||
margin-left: 32px;
|
||||
margin-right: 42px;
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
background: #322F2F;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.itemRight {
|
||||
padding-bottom: 24px;
|
||||
width: 495px;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
|
||||
.item_right_top {
|
||||
margin-bottom: 41px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.itemName {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.itemNums {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
.item_right_Bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.itemMoney {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.itemMoneyOne {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.itemGoods:last-child {
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
|
||||
.itemPic {
|
||||
margin-left: 32px;
|
||||
margin-right: 42px;
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
background: #322F2F;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.itemRight {
|
||||
padding-bottom: 24px;
|
||||
width: 495px;
|
||||
border-bottom: none;
|
||||
|
||||
.item_right_top {
|
||||
margin-bottom: 41px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.itemName {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.itemNums {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
.item_right_Bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.itemMoney {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.itemMoneyOne {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.goodsBox:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.detailBox {
|
||||
display: flex;
|
||||
margin-top: 24px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.detailRightFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.detailRight {
|
||||
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.detailBtn {
|
||||
margin-left: 16px;
|
||||
width: 65px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
border: 1PX solid #337FFF;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #337FFF;
|
||||
text-align: center;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.detailFont {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
.remarkFont {
|
||||
margin-top: 24px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.safeBottom {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.bottomBox {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 750px;
|
||||
height: 160px;
|
||||
background: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
padding-bottom: 24px;
|
||||
// position: relative;
|
||||
|
||||
.moreFont {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
margin-left: 48px;
|
||||
}
|
||||
|
||||
.posssBox {
|
||||
position: absolute;
|
||||
left: 32px;
|
||||
z-index: 99;
|
||||
bottom: 170px;
|
||||
// width: 120px;
|
||||
padding: 24px;
|
||||
background: #fff;
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 2px 2px 2px #ccc;
|
||||
}
|
||||
|
||||
.posssBox:after {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
bottom: -20px;
|
||||
z-index: 88;
|
||||
// left: 5px;
|
||||
width: 0;
|
||||
height: 0px;
|
||||
content: '';
|
||||
border-style: solid;
|
||||
border-width: 20px;
|
||||
border-color: #fff #fff transparent transparent;
|
||||
transform: rotate(135deg);
|
||||
box-shadow: 2px -2px 2px #ccc;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { View } from "@tarojs/components"
|
||||
|
||||
|
||||
const saleStatistic = () => {
|
||||
return <View>销售统计</View>
|
||||
}
|
||||
export default saleStatistic
|
||||
@@ -43,7 +43,7 @@ export default memo<PropsType>((props) => {
|
||||
</MCheckbox>
|
||||
</View>
|
||||
<View className={styles.bottomRight}>
|
||||
<NormalButton plain round type='danger' size='normal' onClick={handleSettle} customStyles={{ backgroundColor: '#F44761' }}>
|
||||
<NormalButton round type='danger' size='normal' onClick={handleSettle} customStyles={{ backgroundColor: '#F44761' }}>
|
||||
<Text style={{ fontSize: '32rpx' }}>删除</Text>
|
||||
</NormalButton>
|
||||
</View>
|
||||
|
||||
@@ -26,7 +26,7 @@ export default memo<PropsType>((props) => {
|
||||
</Text>
|
||||
</View>
|
||||
<View className={styles.bottomRight}>
|
||||
<NormalButton plain type='primary' round size='normal' onClick={handleSettle}>
|
||||
<NormalButton type='primary' round size='normal' onClick={handleSettle}>
|
||||
<Text style={{fontSize: '32rpx'}}>结算</Text>
|
||||
</NormalButton>
|
||||
</View>
|
||||
|
||||
@@ -21,13 +21,7 @@
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
}
|
||||
.filterTypeButton {
|
||||
padding: 0 24px;
|
||||
font-size: 28px;
|
||||
}
|
||||
.filterTypeText {
|
||||
color: #6e6e6e !important;
|
||||
}
|
||||
|
||||
.filterTimeButton {
|
||||
grid-column-start: span 2;
|
||||
}
|
||||
@@ -35,36 +29,6 @@
|
||||
background-color: #eaf2ff;
|
||||
}
|
||||
|
||||
.filterButton {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 20px;
|
||||
box-sizing: border-box;
|
||||
border: 0 solid transparent;
|
||||
background-color: #f6f6f6;
|
||||
border-radius: 8px;
|
||||
font-size: 28px;
|
||||
height: 72px;
|
||||
&--text {
|
||||
color: #909090;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
&:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
&--active {
|
||||
border: 1px solid $color_main;
|
||||
background-color: #eaf2ff;
|
||||
.filterButton--text {
|
||||
color: $color_main;
|
||||
}
|
||||
}
|
||||
}
|
||||
.filterController {
|
||||
margin-top: 60px;
|
||||
width: 100%;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import NormalButton from '@/components/normalButton'
|
||||
import Popup from '@/components/popup'
|
||||
import { View } from '@tarojs/components'
|
||||
import classnames from 'classnames'
|
||||
import styles from './index.module.scss'
|
||||
@@ -9,7 +8,7 @@ import IconFont from '@/components/iconfont/iconfont'
|
||||
import { EnumTakeGoodsOrderTypeList } from '@/api/index'
|
||||
import dayjs from 'dayjs'
|
||||
import { getFilterData } from '@/common/util'
|
||||
import Taro from '@tarojs/taro'
|
||||
import FilterButton from '@/components/filterButton'
|
||||
|
||||
interface SearchFilter {
|
||||
take_goods_order_type?: number
|
||||
@@ -28,13 +27,6 @@ interface DeliveryPropsType {
|
||||
onReset?: () => void
|
||||
}
|
||||
|
||||
interface ButtonPropsType {
|
||||
isActive: boolean
|
||||
onClick?: Function
|
||||
children?: React.ReactNode
|
||||
customClassName?: string
|
||||
}
|
||||
|
||||
export const filterTimeOptions = {
|
||||
0: {
|
||||
name: '不限',
|
||||
@@ -147,11 +139,14 @@ const DeliveryFilter = memo<DeliveryPropsType>((props) => {
|
||||
不限
|
||||
</FilterButton>
|
||||
{!!typeList?.length &&
|
||||
typeList?.map((item) => {
|
||||
typeList?.map(item => {
|
||||
return (
|
||||
<FilterButton isActive={searchFilter.take_goods_order_type === item?.id} onClick={() => handleSelectedType(item?.id)}>
|
||||
{item.name}
|
||||
</FilterButton>
|
||||
// <NormalButton type='info' circle onClick={() => handleSelectedType(item?.id)}>
|
||||
// {item.name}
|
||||
// </NormalButton>
|
||||
)
|
||||
})}
|
||||
</View>
|
||||
@@ -173,10 +168,10 @@ const DeliveryFilter = memo<DeliveryPropsType>((props) => {
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.filterController}>
|
||||
<NormalButton type='primary' round customClassName={classnames(styles.btn, styles.rest_btn)} onClick={handleReset}>
|
||||
<NormalButton type='primary' plain round customClassName={classnames(styles.btn, styles.rest_btn)} onClick={handleReset}>
|
||||
重置
|
||||
</NormalButton>
|
||||
<NormalButton type='primary' plain round customClassName={classnames(styles.btn, styles.verify_btn)} onClick={handleConfirm}>
|
||||
<NormalButton type='primary' round customClassName={classnames(styles.btn, styles.verify_btn)} onClick={handleConfirm}>
|
||||
确认
|
||||
</NormalButton>
|
||||
</View>
|
||||
@@ -184,16 +179,5 @@ const DeliveryFilter = memo<DeliveryPropsType>((props) => {
|
||||
)
|
||||
})
|
||||
|
||||
const FilterButton: FC<ButtonPropsType> = (props) => {
|
||||
const { onClick, children, isActive = false, customClassName } = props
|
||||
const handleClick = () => {
|
||||
onClick?.()
|
||||
}
|
||||
return (
|
||||
<View className={classnames(styles.filterButton, isActive && styles['filterButton--active'], customClassName)} onClick={handleClick}>
|
||||
<View className={classnames(styles['filterButton--text'])}>{children}</View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
export default DeliveryFilter
|
||||
|
||||
@@ -84,13 +84,14 @@ const ItemList:FC<PropsType> = (props) => {
|
||||
<NormalButton
|
||||
customClassName={styles.bottomBar__button}
|
||||
type='info'
|
||||
plain
|
||||
customStyles={{ color: '#8e8e8e', borderColor: '#8e8e8e' }}
|
||||
round
|
||||
onClick={() => handleDetail(itemData)}>
|
||||
查看详情
|
||||
</NormalButton>
|
||||
{itemData?.status === 0 && (
|
||||
<NormalButton customClassName={styles.bottomBar__button} type='primary' round onClick={() => handleAudit(itemData?.id)}>
|
||||
<NormalButton plain customClassName={styles.bottomBar__button} type='primary' round onClick={() => handleAudit(itemData?.id)}>
|
||||
确认审核
|
||||
</NormalButton>
|
||||
)}
|
||||
|
||||
@@ -138,7 +138,7 @@ const TakeDeliveryDetail: FC = () => {
|
||||
// 采购提货
|
||||
return (
|
||||
<View className={styles.bottomBar}>
|
||||
<NormalButton type='primary' plain round onClick={handleAudit} customStyles={{ width: '100%' }}>
|
||||
<NormalButton type='primary' round onClick={handleAudit} customStyles={{ width: '100%' }}>
|
||||
确认提货
|
||||
</NormalButton>
|
||||
</View>
|
||||
@@ -147,10 +147,10 @@ const TakeDeliveryDetail: FC = () => {
|
||||
// 退货提货
|
||||
return (
|
||||
<View className={styles.bottomBar} style={{ justifyContent: 'space-between' }}>
|
||||
<NormalButton type='primary' round onClick={handleRefuse} customStyles={{ width: '25%' }}>
|
||||
<NormalButton type='primary' plain round onClick={handleRefuse} customStyles={{ width: '25%' }}>
|
||||
拒收
|
||||
</NormalButton>
|
||||
<NormalButton type='primary' plain round onClick={handleAudit} customStyles={{ width: '25%' }}>
|
||||
<NormalButton type='primary' round onClick={handleAudit} customStyles={{ width: '25%' }}>
|
||||
确认提货
|
||||
</NormalButton>
|
||||
</View>
|
||||
|
||||
@@ -82,7 +82,7 @@ const statisticAnalysis: IconCardType[] = [
|
||||
{
|
||||
iconName: 'icon-xiaoshou',
|
||||
name: '销售',
|
||||
path: '',
|
||||
path: '/pages/saleStatistic/index',
|
||||
},
|
||||
{
|
||||
iconName: 'icon-duizhang',
|
||||
@@ -135,7 +135,7 @@ const UserInfo: FC = () => {
|
||||
<Text className={styles.userno}>{userInfo.userInfo.user_code}</Text>
|
||||
</View>
|
||||
<View className={styles.right}>
|
||||
<NormalButton type='primary' round size='normal' onClick={handleLogout}>
|
||||
<NormalButton plain type='primary' round size='normal' onClick={handleLogout}>
|
||||
退出登录
|
||||
</NormalButton>
|
||||
</View>
|
||||
@@ -151,7 +151,7 @@ const UserInfo: FC = () => {
|
||||
<LayoutBlock circle>
|
||||
<View className={styles.layoutTitle}>功能特色</View>
|
||||
<View className={styles['grid-container']}>
|
||||
{feature.map((item) => {
|
||||
{feature.map(item => {
|
||||
return <IconCard iconName={item.iconName} title={item.name} onClick={() => handleClickIconCard(item)}></IconCard>
|
||||
})}
|
||||
</View>
|
||||
@@ -159,7 +159,7 @@ const UserInfo: FC = () => {
|
||||
<LayoutBlock circle>
|
||||
<View className={styles.layoutTitle}>布料取色</View>
|
||||
<View className={styles['grid-container']}>
|
||||
{fabric.map((item) => {
|
||||
{fabric.map(item => {
|
||||
return <IconCard iconName={item.iconName} title={item.name} onClick={() => handleClickIconCard(item)}></IconCard>
|
||||
})}
|
||||
</View>
|
||||
@@ -167,7 +167,7 @@ const UserInfo: FC = () => {
|
||||
<LayoutBlock circle>
|
||||
<View className={styles.layoutTitle}>统计分析</View>
|
||||
<View className={styles['grid-container']}>
|
||||
{statisticAnalysis.map((item) => {
|
||||
{statisticAnalysis.map(item => {
|
||||
return <IconCard iconName={item.iconName} title={item.name} onClick={() => handleClickIconCard(item)}></IconCard>
|
||||
})}
|
||||
</View>
|
||||
|
||||
@@ -2,12 +2,12 @@ $color_bg_one: #f8f8f8;
|
||||
$color_font_one: rgba($color: #000000, $alpha: 0.8);
|
||||
$color_font_two: #ababab;
|
||||
$color_font_three: #707070;
|
||||
$color_main: #4581ff;
|
||||
|
||||
$color_main: #4581ff;
|
||||
$color_danger: #e64340;
|
||||
$color_warning: #e6a23c;
|
||||
$color_money: #F64861;
|
||||
$color_info: rgba($color: #B3B3B3, $alpha: 0.2);
|
||||
$color_info: #909090;
|
||||
|
||||
$opacity-disabled: 0.3;
|
||||
$borderStyle: solid;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/* Project id 3619513 */
|
||||
// url('/src/styles/iconfont.ttf') format('truetype');
|
||||
src:
|
||||
url('iconfont.ttf?t=1663556335905') format('truetype');
|
||||
url('/src/styles/iconfont.ttf?t=1663556335905') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@@ -296,4 +296,4 @@
|
||||
|
||||
.icon-gouwu:before {
|
||||
content: "\e607";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user