✨ feat:客户管理70%

This commit is contained in:
Haiyi
2022-10-25 17:39:37 +08:00
parent 9764f9f1bc
commit bc9e43f8ea
11 changed files with 270 additions and 122 deletions
@@ -12,7 +12,8 @@ interface Props {
export default memo((props: Props) => {
const handPhone = () => {
const handPhone = (e) => {
e.stopPropagation()
Taro.makePhoneCall({
phoneNumber: props.obj?.phone
})
@@ -28,27 +29,27 @@ export default memo((props: Props) => {
<View className={styles.mainItem} onClick={() => handNav()}>
<View className={styles.itemTop}>
<View className={styles.itemLeft}>
<View className={styles.itemCile}>欧</View>
<View className={styles.itemCile}>{props.obj.name[0]}</View>
<View className={styles.item_top_one}>
<View className={styles.item_top_one_flex}>
<View className={styles.itemName}>欧阳斌峰</View>
<View className={styles.itemPhone}>133****7761</View>
<View className={styles.itemName}>{props.obj.name}</View>
<View className={styles.itemPhone}>{props.obj.phone}</View>
</View>
<View className={styles.item_tag_box}>
<View className={styles.item_tagItem}>二批</View>
<View className={styles.item_tagItem}>二批</View>
<View className={styles.item_tagItem}>{props.obj.sale_user_name}</View>
</View>
</View>
</View>
<View className={styles.itemRight} onClick={() => handPhone()}>
<IconFont name={'icon-dizhi'} size={30} color={'#5C5C66'}></IconFont>
<View className={styles.itemRight} onClick={(e) => handPhone(e)}>
<IconFont name={'icon-dianhua'} size={30} color={'#337FFF'}></IconFont>
<View className={styles.phoneFont}>联系TA</View>
</View>
</View>
<View className={styles.line}></View>
<View className={styles.flex_bottom}>
<View className={styles.flex_left}>广东省广州市海珠区</View>
<View className={styles.flex_right}>更新时间:2022-09-20 17:10</View>
<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(props.obj.recent_order_time)}</View>
</View>
</View >
)
+6 -6
View File
@@ -15,7 +15,7 @@ import Search from '@/components/search'
import ItemLiist from "./components/ItemList"
import InfiniteScroll from '@/components/infiniteScroll'
import { ClientListApi } from '@/api/order'
import { goLink } from '@/common/common'
export default () => {
const [searchField, setSearchField] = useState<{ page: number; size: number; order_no: string }>({
@@ -42,9 +42,9 @@ export default () => {
//输入了搜索关键字
const getSearchData = useCallback((e) => {
// pageNum.current.page = 1
// setOrderData(() => ({ list: [], total: 0 }))
// setSearchField((val) => ({ ...val, order_no: e, size: 10 }))
pageNum.current.page = 1
setOrderData(() => ({ list: [], total: 0 }))
setSearchField((val) => ({ ...val, order_no: e, size: 10 }))
}, [])
//数据加载状态
@@ -92,7 +92,7 @@ export default () => {
<Tag></Tag>
</View>
</View>
<View className={styles.totalFont}>共 36 个客户</View>
<View className={styles.totalFont}>共 {orderData?.total || 0} 个客户</View>
<View className={styles.order_list}>
<InfiniteScroll
statusMore={statusMore}
@@ -108,7 +108,7 @@ export default () => {
</InfiniteScroll>
</View>
<View className={styles.bottom_box}>
<View className={styles.bottom_btn}>新建用户</View>
<View className={styles.bottom_btn} onClick={() => goLink('/pages/customerEditor/index?type=add')}>新建用户</View>
</View>
</View>
)