🌈 style(【ID:1000663】):修改部分样式
This commit is contained in:
@@ -106,6 +106,8 @@ export default memo(forwardRef((props: Props, ref) => {
|
||||
})
|
||||
setcityList([...res.data.list])
|
||||
}
|
||||
let provinceArr = list.filter(next => { return next.check })
|
||||
props.handCity?.(provinceArr, choseCityArr.current.list)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ export default memo((props: Props) => {
|
||||
}
|
||||
|
||||
const time = useMemo(() => {
|
||||
if (props?.sortId == '') {
|
||||
if (props?.sortId == '' || !props?.sortId) {
|
||||
return props?.obj?.recent_order_time
|
||||
}
|
||||
if (props?.sortId == 1 || props?.sortId == -1) {
|
||||
@@ -41,6 +41,21 @@ export default memo((props: Props) => {
|
||||
}
|
||||
}, [props?.sortId])
|
||||
|
||||
const timeFont = useMemo(() => {
|
||||
if (props?.sortId == '' || !props?.sortId) {
|
||||
return '下单时间'
|
||||
}
|
||||
if (props?.sortId == 1 || props?.sortId == -1) {
|
||||
return '下单时间'
|
||||
}
|
||||
if (props?.sortId == 2 || props?.sortId == -2) {
|
||||
return '创建时间'
|
||||
}
|
||||
if (props?.sortId == 3 || props?.sortId == -3) {
|
||||
return '更新时间'
|
||||
}
|
||||
}, [props?.sortId])
|
||||
|
||||
return (
|
||||
<View className={styles.mainItem} onClick={() => handNav()}>
|
||||
<View className={styles.itemTop}>
|
||||
@@ -75,7 +90,7 @@ export default memo((props: Props) => {
|
||||
<View className={styles.line}></View>
|
||||
<View className={styles.flex_bottom}>
|
||||
<View className={styles.flex_left}>{props.obj.default_address.province_name + props.obj.default_address.city_name + props.obj.default_address.district_name || '暂无'}</View>
|
||||
<View className={styles.flex_right}>更新时间:{formatDateTime(time) || '暂无'}</View>
|
||||
<View className={styles.flex_right}>{timeFont}:{formatDateTime(time) || '暂无'}</View>
|
||||
</View>
|
||||
</View >
|
||||
)
|
||||
|
||||
@@ -11,6 +11,12 @@ interface Props {
|
||||
value?: any
|
||||
}
|
||||
|
||||
type ListType = {
|
||||
name: string,
|
||||
id: string,
|
||||
checked: boolean
|
||||
}
|
||||
|
||||
export default memo(forwardRef((props: Props, ref) => {
|
||||
|
||||
const DropDownItemRef = useRef<any>()
|
||||
@@ -22,7 +28,7 @@ export default memo(forwardRef((props: Props, ref) => {
|
||||
}))
|
||||
|
||||
|
||||
const [list, setlist] = useState<any[]>([
|
||||
const [list, setlist] = useState<ListType[]>([
|
||||
{
|
||||
name: '下单时间正序',
|
||||
id: '1',
|
||||
|
||||
@@ -22,7 +22,7 @@ export default () => {
|
||||
{
|
||||
page: number;
|
||||
size: number;
|
||||
label_ids: any[] | '',
|
||||
label_ids: string,
|
||||
purchaser_type: number | string,
|
||||
name_phone_or_sale_user: string,
|
||||
province_id: any[] | string,
|
||||
@@ -108,9 +108,11 @@ export default () => {
|
||||
cityVal.length && cityVal.forEach(item => {
|
||||
cityArr.push(item.id)
|
||||
})
|
||||
console.log(provinceArr, cityArr)
|
||||
pageNum.current.page = 1
|
||||
setSearchField((val) => ({ ...val, province_id: provinceArr.length > 0 ? provinceArr : '', city_id: cityArr.length > 0 ? cityArr : '', size: 10 }))
|
||||
let provinceRes = provinceArr?.toString()
|
||||
let cityRes = cityArr?.toString()
|
||||
console.log(provinceRes, cityRes)
|
||||
setSearchField((val) => ({ ...val, province_id: provinceArr.length > 0 ? provinceRes : '', city_id: cityArr.length > 0 ? cityRes : '', size: 10 }))
|
||||
// ChoseCityRef.current.close()
|
||||
}, [])
|
||||
|
||||
@@ -123,13 +125,14 @@ export default () => {
|
||||
|
||||
//选择标签
|
||||
const handTags = useCallback((val) => {
|
||||
const arr: number[] = []
|
||||
const arr: any[] = []
|
||||
const arrOne = val.filter(item => { return item.checked })
|
||||
arrOne.forEach(item => {
|
||||
arr.push(item.id)
|
||||
})
|
||||
pageNum.current.page = 1
|
||||
setSearchField((val) => ({ ...val, size: 10, label_ids: arr.length === 0 ? '' : arr }))
|
||||
let res = arr.toString()
|
||||
setSearchField((val) => ({ ...val, size: 10, label_ids: arr.length === 0 ? '' : res }))
|
||||
}, [])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user