diff --git a/project.private.config.json b/project.private.config.json
index 26bc576..9f46e75 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -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
}
]
}
diff --git a/src/api/customer.ts b/src/api/customer.ts
index ee34004..1219c70 100644
--- a/src/api/customer.ts
+++ b/src/api/customer.ts
@@ -35,3 +35,11 @@ export const MpPurchaserLabelAdd = () => {
method: 'post',
})
}
+
+// [枚举] 平台来源
+export const EnumSourcePlatform = () => {
+ return useRequest({
+ url: '/v1/mp/enum/sourcePlatform',
+ method: 'get',
+ })
+}
diff --git a/src/pages/customerDetails/index.tsx b/src/pages/customerDetails/index.tsx
index f486271..5ece8ff 100644
--- a/src/pages/customerDetails/index.tsx
+++ b/src/pages/customerDetails/index.tsx
@@ -86,6 +86,9 @@ const CustomerDetails = () => {
{infoObj?.phone}
+
+ {infoObj?.platform_source_name || '暂无'}
+
{infoObj?.purchaser_type_name || '暂无'}
diff --git a/src/pages/customerManagement/components/ItemList/index.tsx b/src/pages/customerManagement/components/ItemList/index.tsx
index 0b8e387..8b9bd3c 100644
--- a/src/pages/customerManagement/components/ItemList/index.tsx
+++ b/src/pages/customerManagement/components/ItemList/index.tsx
@@ -84,6 +84,9 @@ const ItemList = (props: Props) => {
)
})
}
+
+ {props.obj.platform_source_name}
+
diff --git a/src/pages/customerManagement/components/Tag/index.tsx b/src/pages/customerManagement/components/Tag/index.tsx
index 23082ca..9b5edec 100644
--- a/src/pages/customerManagement/components/Tag/index.tsx
+++ b/src/pages/customerManagement/components/Tag/index.tsx
@@ -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([])
+ const [platformList, setPlatformList] = useState([])
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 (
@@ -96,7 +114,7 @@ const Tag = (props: Props, ref) => {
{
list.map((item, index) => {
return (
- handItem?.(item)}>{item.name}
+ handItem(item)}>{item.name}
)
})
}
@@ -106,11 +124,27 @@ const Tag = (props: Props, ref) => {
{
taglist.map((item, index) => {
return (
- handTag?.(item)}>{item.name}
+ handTag(item)}>{item.name}
)
})
}
+ 平台来源
+
+ {
+ platformList.map((item, index) => {
+ // 过滤 未知
+ if (item.id !== 0) {
+ return (
+ handlePlatformSource(item)}>{item.name}
+ )
+ }
+ else {
+ return null
+ }
+ })
+ }
+
)
diff --git a/src/pages/customerManagement/index.tsx b/src/pages/customerManagement/index.tsx
index 0ac8e7c..81059ce 100644
--- a/src/pages/customerManagement/index.tsx
+++ b/src/pages/customerManagement/index.tsx
@@ -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 (
@@ -143,7 +157,7 @@ const CustomerManagement = () => {
true}>
true}>
- true}>
+ true}>
diff --git a/src/pages/customerPage/index.module.scss b/src/pages/customerPage/index.module.scss
index 74b52ca..1a0a1ee 100644
--- a/src/pages/customerPage/index.module.scss
+++ b/src/pages/customerPage/index.module.scss
@@ -1,112 +1,80 @@
page {
- background: #f7f7f7;
+ background: #f7f7f7;
}
.cussBox {
+ .searchBox {
+ position: sticky;
+ top: 0;
+ width: 100%;
+ height: 96px;
+ background: #ffffff;
+ display: flex;
+ align-items: center;
- .searchBox {
- position: sticky;
- top: 0;
- width: 100%;
- height: 96px;
- background: #FFFFFF;
- display: flex;
- align-items: center;
+ .two {
+ width: 702px;
+ height: 72px;
+ margin-left: 24px;
+ }
+ }
- .two {
- width: 702px;
- height: 72px;
- margin-left: 24px;
- }
+ .listBox {
+ height: calc(100vh - 170px);
+ }
+
+ .itemBox {
+ margin-left: 24px;
+ margin-right: 24px;
+ padding: 0 36px;
+ height: 104px;
+ background: #ffffff;
+ border-radius: 16px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-top: 24px;
+ box-sizing: border-box;
+
+ .cussName {
+ flex: 1;
+ height: 34px;
+ font-size: 28px;
+ font-weight: 500;
+ color: #000000;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+ .platform_source_name {
+ flex: 1;
}
- .listBox {
- height: calc(100vh - 170px);
+ .phone {
+ flex: 1;
+ font-size: 28px;
+ color: #000000;
}
- .itemBox {
- 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;
-
- .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;
- }
+ .woker {
+ flex: 1;
+ font-size: 28px;
+ 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;
- }
- }
-}
\ No newline at end of file
+ .acticveitemBox {
+ 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;
+}
diff --git a/src/pages/customerPage/index.tsx b/src/pages/customerPage/index.tsx
index 197e0ec..b97c364 100644
--- a/src/pages/customerPage/index.tsx
+++ b/src/pages/customerPage/index.tsx
@@ -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 (
- { selectClient(item) }}>
- {item.name}
+ { selectClient(item) }}>
+
+ { item.name }
+
+ {
+ item?.platform_source_name
+ &&
+ { item?.platform_source_name }
+
+ }
{item.phone}
{item.sale_user_name}
diff --git a/src/pages/order/components/itemList/index.module.scss b/src/pages/order/components/itemList/index.module.scss
index b003522..0375734 100644
--- a/src/pages/order/components/itemList/index.module.scss
+++ b/src/pages/order/components/itemList/index.module.scss
@@ -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;
diff --git a/src/pages/order/components/itemList/index.tsx b/src/pages/order/components/itemList/index.tsx
index 2f5b944..9ef912d 100644
--- a/src/pages/order/components/itemList/index.tsx
+++ b/src/pages/order/components/itemList/index.tsx
@@ -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 (
navTo(e)}>
- 单号:{props?.obj?.order_no}
- {props?.obj?.status_name}
+ 单号:{obj?.order_no}
+ {obj?.status_name}
- {props?.obj?.purchaser_name}
+
+ {obj?.purchaser_name}
+ {
+ obj?.platform_source_name
+ &&
+ { obj?.platform_source_name }
+
+ }
+
{
- props?.obj?.is_modify && 已修改
+ obj?.is_modify && 已修改
}
-
- 颜色 ({props?.obj?.total_colors})
+
+ 颜色 ({obj?.total_colors})
- {props?.obj?.product_list[0]?.code} {props?.obj?.product_list[0]?.name}
- {props?.obj?.sale_mode === 0 ? '大货' : props?.obj?.sale_mode === 1 ? '剪版' : '散剪'}
+ {obj?.product_list[0]?.code} {obj?.product_list[0]?.name}
+ {obj?.sale_mode === 0 ? '大货' : obj?.sale_mode === 1 ? '剪版' : '散剪'}
- {props?.obj?.shipment_mode_name}
+ {obj?.shipment_mode_name}
- {props?.obj?.product_list[0]?.product_colors[0]?.code} {props?.obj?.product_list[0]?.product_colors[0]?.name}
- 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'}
- ¥ {props?.obj?.product_list[0]?.product_colors[0]?.sale_price / 100}/{props?.obj?.sale_mode == 1 ? 'm' : 'kg'}
+ {obj?.product_list[0]?.product_colors[0]?.code} {obj?.product_list[0]?.product_colors[0]?.name}
+ 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'}
+ ¥ {obj?.product_list[0]?.product_colors[0]?.sale_price / 100}/{obj?.sale_mode == 1 ? 'm' : 'kg'}
{
- props?.obj?.product_list[0]?.product_colors?.length > 1 && <>
+ obj?.product_list[0]?.product_colors?.length > 1 && <>
- {props?.obj?.product_list[0]?.product_colors[1]?.code} {props?.obj?.product_list[0]?.product_colors[1]?.name}
- 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'}
- ¥ {props?.obj?.product_list[0]?.product_colors[1]?.sale_price / 100}/{props?.obj?.sale_mode == 1 ? 'm' : 'kg'}
+ {obj?.product_list[0]?.product_colors[1]?.code} {obj?.product_list[0]?.product_colors[1]?.name}
+ 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'}
+ ¥ {obj?.product_list[0]?.product_colors[1]?.sale_price / 100}/{obj?.sale_mode == 1 ? 'm' : 'kg'}
>
}
@@ -91,20 +101,20 @@ const ItemList = (props: propsObj) => {
布料信息:
- {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'}
+ {obj?.total_fabrics} 种面料,{obj?.total_colors} 种颜色,共 {obj?.sale_mode === 0 ? obj?.total_number : obj?.total_number / 100} {obj?.sale_mode === 0 ? '条' : 'm'}
{
- props?.obj.status != 5 &&
+ obj.status != 5 &&
{monyFont}
¥{formatPriceDiv(totalMoney)}
}
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)}
>
diff --git a/src/pages/orderDetails/index.module.scss b/src/pages/orderDetails/index.module.scss
index fdffa40..603cc99 100644
--- a/src/pages/orderDetails/index.module.scss
+++ b/src/pages/orderDetails/index.module.scss
@@ -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;
+}
diff --git a/src/pages/orderDetails/index.tsx b/src/pages/orderDetails/index.tsx
index 5474df8..0be4d6b 100644
--- a/src/pages/orderDetails/index.tsx
+++ b/src/pages/orderDetails/index.tsx
@@ -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 = () => {
>
{infoObj.purchaser_name}
+
+
+ {infoObj?.platform_source_name || '暂无'}
+
+
{infoObj.purchaser_phone}