✨ feat:客户管理50%

This commit is contained in:
Haiyi
2022-10-24 19:10:14 +08:00
parent 18df424f70
commit 9764f9f1bc
17 changed files with 1109 additions and 14 deletions
@@ -0,0 +1,83 @@
.mainItem {
margin-bottom: 40px;
display: flex;
align-items: center;
padding-bottom: 40px;
border-bottom: 1px solid #e8e8e8;
.leftItem {
width: 176px;
display: flex;
align-items: center;
font-size: 28px;
font-weight: 500;
color: #000000;
.xing {
font-size: 28px;
font-weight: 500;
color: #E42945;
}
}
.rightItem {
display: flex;
align-items: center;
width: 100%;
padding-left: 48px;
.placeholderStyle {
color: #f7f7f7;
font-size: 28px;
font-weight: 400;
}
.inputStyle {
width: 100%;
font-size: 28px;
font-weight: 400;
color: #000000;
}
}
}
.mainItemactive {
display: flex;
align-items: center;
border-bottom: none;
.leftItem {
width: 176px;
display: flex;
align-items: center;
font-size: 28px;
font-weight: 500;
color: #000000;
.xing {
font-size: 28px;
font-weight: 500;
color: #E42945;
}
}
.rightItem {
display: flex;
align-items: center;
width: 100%;
padding-left: 48px;
.placeholderStyle {
color: #f7f7f7;
font-size: 28px;
font-weight: 400;
}
.inputStyle {
width: 100%;
font-size: 28px;
font-weight: 400;
color: #000000;
}
}
}
@@ -0,0 +1,76 @@
import { View, ScrollView, Button, Input } from '@tarojs/components'
import React, { useCallback, memo, useEffect, useMemo, useRef, useState, ReactNode } from 'react'
import styles from "./index.module.scss"
import classnames from "classnames";
import Taro, { usePullDownRefresh, useRouter, useDidShow } from '@tarojs/taro';
import { alert } from '@/common/common'
import { formatPriceDiv, formatDateTime, formatWeightDiv } from '@/common/format'
import IconFont from '@/components/iconfont/iconfont'
import Popup from '@/components/popup';
import { goLink } from '@/common/common'
interface Props {
title: string
isQuire?: boolean,
placeholderFont?: string,
handBlur?: (any) => void,
inputValue?: string,
isDisabled?: boolean,
inputType?: any,
maxlength?: number,
children?: ReactNode,
showInput?: boolean,
showMore?: boolean,
showBorder?: boolean,
handNav?: () => void
}
export default memo((props: Props) => {
let {
title = '标题',
isQuire = true,
placeholderFont = '请输入',
handBlur,
handNav,
inputValue,
isDisabled,
inputType = "text",
maxlength = 999,
children,
showInput = true,
showMore = false,
showBorder = true
} = props
return (
<View className={classnames(showBorder ? styles.mainItem : styles.mainItemactive)}>
<View className={styles.leftItem}>{title}
{
isQuire && <View className={styles.xing}>*</View>
}
</View>
{
!children && <View className={styles.rightItem} onClick={() => handNav?.()}>
{
showInput && <Input
maxlength={maxlength}
type={inputType}
disabled={isDisabled}
className={styles.inputStyle}
placeholder={placeholderFont}
placeholderStyle={styles.placeholderStyle}
onBlur={(e) => handBlur?.(e.detail.value)}
value={inputValue}
></Input>
}
{
showMore && <IconFont name={'icon-chakanquanbukehu'} size={50} color={'#000000'}></IconFont>
}
</View>
}
{children}
</View>
)
})