feat(ID1000891): 【用户账号】区分出新商城用户与陆盈渠道用户的关系;

【【用户账号】区分出新商城用户与陆盈渠道用户的关系;】 https://www.tapd.cn/53459131/prong/stories/view/1153459131001000891
This commit is contained in:
xuan 2023-02-21 15:30:01 +08:00
parent 888fa5ff5a
commit 5e3b81e7ce
12 changed files with 226 additions and 197 deletions

View File

@ -297,53 +297,25 @@
"scene": null
},
{
"name": "领取色卡",
"pathName": "pages/getColorCard/index",
"name": "",
"pathName": "pages/customerPage/index",
"query": "clientId=1750",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/customerDetails/index",
"query": "purchaser_id=1750",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/customerManagement/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "添加色卡订单",
"pathName": "pages/getColorCard/addColorCard/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "色卡列表",
"pathName": "pages/getColorCard/colorCardList/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "色卡详情",
"pathName": "pages/getColorCard/colorCardDetail/index",
"query": "id=20",
"launchMode": "default",
"scene": null
},
{
"name": "领取剪样",
"pathName": "pages/sampleCutting/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "添加剪样",
"pathName": "pages/sampleCutting/sampleCuttingList/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "剪样详情",
"pathName": "pages/sampleCutting/sampleCuttingDetail/index",
"query": "id=1",
"launchMode": "default",
"scene": null
}
]
}

View File

@ -35,3 +35,11 @@ export const MpPurchaserLabelAdd = () => {
method: 'post',
})
}
// [枚举] 平台来源
export const EnumSourcePlatform = () => {
return useRequest({
url: '/v1/mp/enum/sourcePlatform',
method: 'get',
})
}

View File

@ -86,6 +86,9 @@ const CustomerDetails = () => {
<View className={styles.itemPhone}>{infoObj?.phone}</View>
</View>
<View className={styles.item_tag_box}>
<Tag type="primary" size="normal" circle customClassName={styles.item_tagItem} plain>
{infoObj?.platform_source_name || '暂无'}
</Tag>
<Tag type="primary" size="normal" circle customClassName={styles.item_tagItem} plain>
{infoObj?.purchaser_type_name || '暂无'}
</Tag>

View File

@ -84,6 +84,9 @@ const ItemList = (props: Props) => {
)
})
}
<Tag type="primary" size="normal" circle customClassName={styles.item_tagItem}>
{props.obj.platform_source_name}
</Tag>
</View>
</View>
</View>

View File

@ -7,11 +7,12 @@ import { alert } from '@/common/common'
import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
import { EnumPurchaserType } from '@/api/order'
import DropDownItem from '@/components/dropDown-item'
import { MpPurchaserList } from '@/api/customer'
import { EnumSourcePlatform, MpPurchaserList } from '@/api/customer'
interface Props {
handType: (any) => void
handTags: (any) => void
handPlatform: (any) => void
value?: any
onCloseOverlay?: () => void
}
@ -49,14 +50,20 @@ const Tag = (props: Props, ref) => {
])
const { fetchData: fetchPurchaserType } = EnumPurchaserType()
const { fetchData: fetchSourcePlatform } = EnumSourcePlatform()
const { fetchData } = MpPurchaserList()
const [taglist, settaglist] = useState<any[]>([])
const [platformList, setPlatformList] = useState<any[]>([])
const getList = async() => {
const res = await fetchData()
const purchaserType = await fetchPurchaserType()
const sourcePlatform = await fetchSourcePlatform()
if (res.data) {
settaglist([...res.data.list])
setlist([...purchaserType.data.list])
setPlatformList([...sourcePlatform.data.list])
}
}
useEffect(() => {
@ -88,6 +95,17 @@ const Tag = (props: Props, ref) => {
props.handTags(taglist)
}
const handlePlatformSource = (it) => {
platformList.map((item) => {
if (item.id == it.id) {
item.checked = !item.checked
}
return item
})
setPlatformList([...platformList])
props?.handPlatform(platformList)
}
return (
<DropDownItem ref={DropDownItemRef} title="自定标签" value={currentValue} activeColor="#337fff" onCloseOverlay={props?.onCloseOverlay}>
<View className={styles.mainBox}>
@ -96,7 +114,7 @@ const Tag = (props: Props, ref) => {
{
list.map((item, index) => {
return (
<View key={index} className={classnames(item.checked && styles.active, styles.itemFlex)} onClick={() => handItem?.(item)}>{item.name}</View>
<View key={index} className={classnames(item.checked && styles.active, styles.itemFlex)} onClick={() => handItem(item)}>{item.name}</View>
)
})
}
@ -106,11 +124,27 @@ const Tag = (props: Props, ref) => {
{
taglist.map((item, index) => {
return (
<View key={index} className={classnames(item.checked ? styles.active : styles.itemFlex)} onClick={() => handTag?.(item)}>{item.name}</View>
<View key={index} className={classnames(item.checked ? styles.active : styles.itemFlex)} onClick={() => handTag(item)}>{item.name}</View>
)
})
}
</View>
<View className={styles.pussTitle}></View>
<View className={classnames(styles.pussBox)}>
{
platformList.map((item, index) => {
// 过滤 未知
if (item.id !== 0) {
return (
<View key={index} className={classnames(item.checked ? styles.active : styles.itemFlex)} onClick={() => handlePlatformSource(item)}>{item.name}</View>
)
}
else {
return null
}
})
}
</View>
</View>
</DropDownItem>
)

View File

@ -27,6 +27,7 @@ const CustomerManagement = () => {
province_id: any[] | string
city_id: any[] | string
abstract_sort_key: string
platform_source: string
}
>({
page: 1,
@ -37,6 +38,7 @@ const CustomerManagement = () => {
province_id: '',
city_id: '',
abstract_sort_key: '',
platform_source: '',
})
const [orderData, setOrderData] = useState<{ list: any[]; total: number }>({ list: [], total: 0 })
@ -133,6 +135,18 @@ const CustomerManagement = () => {
setSearchField(val => ({ ...val, size: 10, label_ids: arr.length === 0 ? '' : res }))
}, [])
// 选择标签
const handPlatform = useCallback((val) => {
const arr: any[] = []
const arrOne = val.filter((item) => { return item.checked })
arrOne.forEach((item) => {
arr.push(item.id)
})
pageNum.current.page = 1
const res = arr.toString()
setSearchField(val => ({ ...val, size: 10, platform_source: arr.length === 0 ? '' : res }))
}, [])
return (
<View className={styles.mainBox}>
<View className={styles.topBox}>
@ -143,7 +157,7 @@ const CustomerManagement = () => {
<SelectGroup>
<Sort ref={SortRef} handSort={handSort} onCloseOverlay={() => true}></Sort>
<ChoseCity ref={ChoseCityRef} handCity={handCity} onCloseOverlay={() => true}></ChoseCity>
<Tag ref={TagRef} handTags={handTags} handType={handType} onCloseOverlay={() => true}></Tag>
<Tag ref={TagRef} handTags={handTags} handType={handType} handPlatform={handPlatform} onCloseOverlay={() => true}></Tag>
</SelectGroup>
</View>
</View>

View File

@ -3,13 +3,12 @@ page {
}
.cussBox {
.searchBox {
position: sticky;
top: 0;
width: 100%;
height: 96px;
background: #FFFFFF;
background: #ffffff;
display: flex;
align-items: center;
@ -27,86 +26,55 @@ page {
.itemBox {
margin-left: 24px;
margin-right: 24px;
// width: 702px;
padding: 0 36px;
height: 104px;
background: #FFFFFF;
background: #ffffff;
border-radius: 16px;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 24px;
box-sizing: border-box;
.cussName {
margin-left: 48px;
width: 168px;
flex: 1;
height: 34px;
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #000000;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.platform_source_name {
flex: 1;
}
.phone {
margin-left: 88px;
flex: 1;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
.woker {
margin-left: 88px;
flex: 1;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
text-align: right;
}
}
.acticveitemBox {
margin-left: 24px;
margin-right: 24px;
// width: 702px;
height: 104px;
background: #FFFFFF;
border-radius: 16px;
display: flex;
align-items: center;
margin-top: 24px;
box-sizing: border-box;
border: 1px solid #337FFF;
.cussName {
margin-left: 48px;
width: 168px;
height: 34px;
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #000000;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.phone {
margin-left: 88px;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
.woker {
margin-left: 88px;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
border: 1px solid #337fff;
}
}
.platform_name {
background: #ecf2ff;
border-radius: 6px;
margin-left: 10px;
font-size: 20px;
border: none !important;
text-align: center;
color: #007aff;
padding: 4px 10px;
}

View File

@ -7,6 +7,7 @@ import Search from '@/components/search'
import { ClientListApi } from '@/api/order'
import InfiniteScroll from '@/components/infiniteScroll'
import { dataLoadingStatus, getFilterData } from '@/common/util'
import Tag from '@/components/tag'
const CustomerPage = () => {
const [search, setSearch] = useState({
@ -132,8 +133,16 @@ const CustomerPage = () => {
{
clentList.list.map((item, index) => {
return (
<View className={classnames(item.checked ? styles.acticveitemBox : styles.itemBox)} key={index} onClick={() => { selectClient(item) }}>
<View className={styles.cussName}>{item.name}</View>
<View className={classnames(styles.itemBox, item.checked ? styles.acticveitemBox : null)} key={index} onClick={() => { selectClient(item) }}>
<View className={styles.cussName}>
{ item.name }
</View>
<View className={styles.platform_source_name}>{
item?.platform_source_name
&& <Tag type="primary" size="small" circle plain customClassName={styles.platform_name}>
{ item?.platform_source_name }
</Tag>
}</View>
<View className={styles.phone}>{item.phone}</View>
<View className={styles.woker}>{item.sale_user_name}</View>
</View>

View File

@ -37,9 +37,18 @@
.pussName {
margin-left: 32px;
font-size: 28px;
font-weight: 500;
color: #000000;
margin-right: 10px;
}
.platform_name {
background: #ecf2ff;
border-radius: 6px;
font-size: 20px;
border: 0;
text-align: center;
color: #007aff;
padding: 4px 10px;
}
.editFont {
margin-right: 32px;

View File

@ -6,6 +6,7 @@ import styles from './index.module.scss'
import BottomBtns from '@/components/BottomBtns'
import { formatPriceDiv } from '@/common/format'
import LabAndImg from '@/components/LabAndImg'
import Tag from '@/components/tag'
interface propsObj {
obj: any
@ -14,30 +15,31 @@ interface propsObj {
toPay?: (arg: any, obj: any) => void
}
const ItemList = (props: propsObj) => {
const { obj } = props
const navTo = (e) => {
Taro.navigateTo({
url: `/pages/orderDetails/index?id=${props?.obj?.id}`,
url: `/pages/orderDetails/index?id=${obj?.id}`,
})
}
const totalMoney = useMemo(() => {
if (props?.obj.status == 0 || props?.obj.status == 1 || props?.obj.status == 2) {
return props?.obj?.estimate_amount
if (obj.status == 0 || obj.status == 1 || obj.status == 2) {
return obj?.estimate_amount
}
else {
return props?.obj?.bill_total_sale_price
return obj?.bill_total_sale_price
}
}, [props?.obj])
}, [obj])
// 待接单、配布中、已配布状态时,叫预估金额,其他状态叫合计金额。
const monyFont = useMemo(() => {
if (props?.obj?.status === 0 || props?.obj?.status === 1) {
if (obj?.status === 0 || obj?.status === 1) {
return '预估金额'
}
else {
return '合计金额'
}
}, [props?.obj])
}, [obj])
const labAndImgObj = useCallback((item) => {
return { lab: item.lab, rgb: item.rgb, texture_url: item.texture_url }
@ -46,43 +48,51 @@ const ItemList = (props: propsObj) => {
return (
<View className={styles.itemBox} onClick={e => navTo(e)}>
<View className={styles.topItem}>
<View className={styles.orderNo}>{props?.obj?.order_no}</View>
<View className={styles.status}>{props?.obj?.status_name}</View>
<View className={styles.orderNo}>{obj?.order_no}</View>
<View className={styles.status}>{obj?.status_name}</View>
</View>
<View className={styles.flexBox}>
<View className={styles.pussName}>{props?.obj?.purchaser_name}</View>
<View className={styles.flexBox}>
<View className={styles.pussName}>{obj?.purchaser_name}</View>
{
props?.obj?.is_modify && <View className={styles.editFont}></View>
obj?.platform_source_name
&& <Tag type="primary" size="small" circle plain customClassName={styles.platform_name}>
{ obj?.platform_source_name }
</Tag>
}
</View>
{
obj?.is_modify && <View className={styles.editFont}></View>
}
</View>
<View className={styles.line}></View>
<View className={styles.contBox}>
<View style={{ minWidth: '24%' }}>
<View className={styles.leftCont}>
<LabAndImg value={labAndImgObj(props?.obj?.product_list?.[0])} />
<View className={styles.leftContNums}> ({props?.obj?.total_colors})</View>
<LabAndImg value={labAndImgObj(obj?.product_list?.[0])} />
<View className={styles.leftContNums}> ({obj?.total_colors})</View>
</View>
</View>
<View className={styles.rightCont}>
<View className={styles.rightTop}>
<View className={styles.productBox}>
<View className={styles.productName}>{props?.obj?.product_list[0]?.code} {props?.obj?.product_list[0]?.name}</View>
<View className={styles.productMode}>{props?.obj?.sale_mode === 0 ? '大货' : props?.obj?.sale_mode === 1 ? '剪版' : '散剪'}</View>
<View className={styles.productName}>{obj?.product_list[0]?.code} {obj?.product_list[0]?.name}</View>
<View className={styles.productMode}>{obj?.sale_mode === 0 ? '大货' : obj?.sale_mode === 1 ? '剪版' : '散剪'}</View>
</View>
<View className={styles.shipMode}>{props?.obj?.shipment_mode_name}</View>
<View className={styles.shipMode}>{obj?.shipment_mode_name}</View>
</View>
<View className={styles.colorsBox}>
<View className={styles.colorNameOne}>{props?.obj?.product_list[0]?.product_colors[0]?.code} {props?.obj?.product_list[0]?.product_colors[0]?.name}</View>
<View className={styles.colorName}>x{props?.obj?.sale_mode === 0 ? props?.obj?.product_list[0]?.product_colors[0]?.roll : props?.obj?.product_list[0]?.product_colors[0]?.length / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View>
<View className={styles.colorNameTwo}>¥ {props?.obj?.product_list[0]?.product_colors[0]?.sale_price / 100}/{props?.obj?.sale_mode == 1 ? 'm' : 'kg'}</View>
<View className={styles.colorNameOne}>{obj?.product_list[0]?.product_colors[0]?.code} {obj?.product_list[0]?.product_colors[0]?.name}</View>
<View className={styles.colorName}>x{obj?.sale_mode === 0 ? obj?.product_list[0]?.product_colors[0]?.roll : obj?.product_list[0]?.product_colors[0]?.length / 100} {obj?.sale_mode === 0 ? '条' : 'm'}</View>
<View className={styles.colorNameTwo}>¥ {obj?.product_list[0]?.product_colors[0]?.sale_price / 100}/{obj?.sale_mode == 1 ? 'm' : 'kg'}</View>
</View>
{
props?.obj?.product_list[0]?.product_colors?.length > 1 && <>
obj?.product_list[0]?.product_colors?.length > 1 && <>
<View className={styles.colorsBox}>
<View className={styles.colorNameOne}>{props?.obj?.product_list[0]?.product_colors[1]?.code} {props?.obj?.product_list[0]?.product_colors[1]?.name}</View>
<View className={styles.colorName}>x{props?.obj?.sale_mode === 0 ? props?.obj?.product_list[0]?.product_colors[1]?.roll : props?.obj?.product_list[0]?.product_colors[1]?.length / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View>
<View className={styles.colorNameTwo}>¥ {props?.obj?.product_list[0]?.product_colors[1]?.sale_price / 100}/{props?.obj?.sale_mode == 1 ? 'm' : 'kg'}</View>
<View className={styles.colorNameOne}>{obj?.product_list[0]?.product_colors[1]?.code} {obj?.product_list[0]?.product_colors[1]?.name}</View>
<View className={styles.colorName}>x{obj?.sale_mode === 0 ? obj?.product_list[0]?.product_colors[1]?.roll : obj?.product_list[0]?.product_colors[1]?.length / 100} {obj?.sale_mode === 0 ? '条' : 'm'}</View>
<View className={styles.colorNameTwo}>¥ {obj?.product_list[0]?.product_colors[1]?.sale_price / 100}/{obj?.sale_mode == 1 ? 'm' : 'kg'}</View>
</View>
</>
}
@ -91,20 +101,20 @@ const ItemList = (props: propsObj) => {
<View className={styles.lineOne}></View>
<View className={styles.bottomMsg}>
<View className={styles.msgLeft}></View>
<View className={styles.msgRight}>{props?.obj?.total_fabrics} {props?.obj?.total_colors} {props?.obj?.sale_mode === 0 ? props?.obj?.total_number : props?.obj?.total_number / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View>
<View className={styles.msgRight}>{obj?.total_fabrics} {obj?.total_colors} {obj?.sale_mode === 0 ? obj?.total_number : obj?.total_number / 100} {obj?.sale_mode === 0 ? '条' : 'm'}</View>
</View>
{
props?.obj.status != 5 && <View className={styles.bottomMsg}>
obj.status != 5 && <View className={styles.bottomMsg}>
<View className={styles.msgLeft}>{monyFont}</View>
<View className={styles.msgRightOne}>¥{formatPriceDiv(totalMoney)}</View>
</View>
}
<View className={styles.bottomBox}>
<BottomBtns
obj={props?.obj}
cancle={e => props?.cancle?.(e, props?.obj)}
nextBuy={e => props?.nextBuy?.(e, props?.obj)}
toPay={e => props?.toPay?.(e, props?.obj)}
obj={obj}
cancle={e => props?.cancle?.(e, obj)}
nextBuy={e => props?.nextBuy?.(e, obj)}
toPay={e => props?.toPay?.(e, obj)}
></BottomBtns>
</View>
</View >

View File

@ -10,14 +10,12 @@ page {
.pussName {
font-size: 28px;
font-weight: 400;
color: #000000;
}
.pussPhone {
margin-left: 88px;
font-size: 28px;
font-weight: 400;
color: #000000;
}
}
@ -25,7 +23,6 @@ page {
.total {
margin-top: 44px;
font-size: 24px;
font-weight: 400;
color: #000000;
margin-left: 32px;
margin-bottom: 8px;
@ -54,7 +51,6 @@ page {
margin-left: 32px;
margin-right: 8px;
font-size: 28px;
font-weight: 400;
color: #000000;
}
@ -161,13 +157,11 @@ page {
.itemName {
font-size: 28px;
font-weight: 400;
color: #000000;
}
.itemNums {
font-size: 28px;
font-weight: 400;
color: #000000;
}
}
@ -181,12 +175,10 @@ page {
.itemMoney {
font-size: 28px;
margin-right: 10px;
font-weight: 400;
color: #000000;
}
.lastBox {
font-size: 28px;
font-weight: 400;
text-decoration: line-through;
color: #7f7f7f;
}
@ -227,13 +219,11 @@ page {
.itemName {
font-size: 28px;
font-weight: 400;
color: #000000;
}
.itemNums {
font-size: 28px;
font-weight: 400;
color: #000000;
}
}
@ -248,12 +238,10 @@ page {
.itemMoney {
font-size: 28px;
margin-right: 10px;
font-weight: 400;
color: #000000;
}
.lastBox {
font-size: 28px;
font-weight: 400;
text-decoration: line-through;
color: #7f7f7f;
}
@ -285,7 +273,6 @@ page {
.detailRight {
font-size: 28px;
font-weight: 400;
color: #000000;
}
@ -296,7 +283,6 @@ page {
border-radius: 8px;
border: 1px solid #337fff;
font-size: 24px;
font-weight: 400;
color: #337fff;
text-align: center;
line-height: 32px;
@ -305,7 +291,6 @@ page {
.detailFont {
font-size: 28px;
font-weight: 400;
color: #b8b8b8;
}
}
@ -313,7 +298,6 @@ page {
.remarkFont {
margin-top: 24px;
font-size: 28px;
font-weight: 400;
color: #000000;
}
@ -339,7 +323,6 @@ page {
.moreFont {
font-size: 28px;
font-weight: 400;
color: rgba(0, 0, 0, 0.8);
margin-left: 48px;
}
@ -388,3 +371,13 @@ page {
margin-right: 24px;
margin-bottom: 20px;
}
.platform_name {
background: #ecf2ff;
border-radius: 6px;
margin-left: 10px;
font-size: 20px;
border: none !important;
text-align: center;
color: #007aff;
padding: 4px 10px;
}

View File

@ -34,6 +34,7 @@ import IconFont from '@/components/iconfont/iconfont'
import { PAY_H5_CODE_URL } from '@/common/constant'
import SaleCodeList from '@/components/SaleCodeList'
import LabAndImg from '@/components/LabAndImg'
import Tag from '@/components/tag'
// 卡片盒子元素
interface Obs {
title?: string
@ -817,6 +818,11 @@ const OrderDetails = () => {
>
<View className={styles.pussBox}>
<View className={styles.pussName}>{infoObj.purchaser_name}</View>
<View className={styles.pussName}>
<Tag type="primary" size="normal" circle customClassName={styles.platform_name} plain>
{infoObj?.platform_source_name || '暂无'}
</Tag>
</View>
<View className={styles.pussPhone}>{infoObj.purchaser_phone}</View>
</View>
</DefaultBox>