Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wecom-sidebar
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanghuihui
wecom-sidebar
Commits
8882ed40
Commit
8882ed40
authored
Feb 22, 2022
by
Aivs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:客户信息对接
parent
850b2147
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
65 deletions
+64
-65
order.css
src/css/order.css
+1
-1
Home.tsx
src/pages/Home.tsx
+5
-9
Order.tsx
src/pages/Order.tsx
+26
-23
findCustom.tsx
src/pages/findCustom.tsx
+5
-7
person.tsx
src/pages/person.tsx
+27
-25
No files found.
src/css/order.css
View file @
8882ed40
...
...
@@ -50,6 +50,6 @@
.pad20
{
padding
:
20px
0px
;
border-bottom
:
1px
solid
#F3F3F3
;
width
:
9
8
%
;
width
:
9
0
%
;
margin
:
auto
;
}
\ No newline at end of file
src/pages/Home.tsx
View file @
8882ed40
...
...
@@ -147,10 +147,6 @@ const layout = {
const
res
=
await
updateBaseInfoFromCompanyWx
(
data
)
console
.
log
(
res
)
}
const
back
=
async
()
=>
{
debugger
console
.
log
(
'dddd'
)
}
const
getExternalUserInfo
=
async
()
=>
{
const
res
=
await
jsSdk
.
invoke
<
{
userId
?:
string
}
>
(
'getCurExternalContact'
,
{})
if
(
!
res
||
!
res
.
userId
)
return
...
...
@@ -220,10 +216,10 @@ const layout = {
setOrderInfo
(
orderInfo
.
data
)
}
const
Goto
=
async
()
=>
{
console
.
log
(
orderInfo
,
"ddddddddddddddd"
)
//
//
页面跳转方法
history
.
push
({
pathname
:
'/Order'
,
state
:
{
orderInfo
}})
const
Goto
=
async
()
=>
{
if
(
!
userId
)
return
// 页面跳转方法
history
.
push
({
pathname
:
'/Order'
,
state
:
{
orderInfo
,
userId
}})
}
useEffect
(()
=>
{
getUserInfo
();
...
...
@@ -239,7 +235,7 @@ const layout = {
<
div
className=
"flex spaceBetween mg20"
>
{
!
customInfoEdit
?
<
span
className=
'wordKb'
>
用户看板中心
</
span
>:
<
span
className=
'wordKb'
><
LeftOutlined
onClick=
{
back
}
/>
客户信息
</
span
>
!
customInfoEdit
?
<
span
className=
'wordKb'
>
用户看板中心
</
span
>:
<
span
className=
'wordKb'
><
LeftOutlined
/>
客户信息
</
span
>
}
{
!
customInfoEdit
?
<
Link
to=
"/findCustom"
><
Button
type=
"primary"
icon=
{
<
SearchOutlined
/>
}
>
查找客户
</
Button
></
Link
>:
...
...
src/pages/Order.tsx
View file @
8882ed40
...
...
@@ -3,26 +3,13 @@ import {FC, useEffect, useState}from 'react'
import
{
LeftOutlined
,
DownOutlined
,
RightOutlined
}
from
'@ant-design/icons'
;
import
'./../css/order.css'
import
{
useHistory
,
Link
,
withRouter
}
from
'react-router-dom'
import
{
getOrderInfoByWxId
}
from
"../api"
;
const
Order
:
React
.
FC
=
()
=>
{
const
history
:
any
=
useHistory
()
const
[
openFlag
,
setOpenFlag
]
=
useState
<
any
>
([
true
,
false
,
false
,
false
])
const
[
customData
,
setCustomData
]
=
useState
<
any
>
([
{
id
:
1
,
name
:
'第十六届商学院戈壁挑战赛'
,
team
:
'AB队'
},
{
name
:
'第十六届商学院戈壁挑战赛'
,
team
:
'AB队'
},
{
name
:
'第十六届商学院戈壁挑战赛'
,
team
:
'AB队'
}
])
const
[
customData
,
setCustomData
]
=
useState
<
any
>
([])
const
[
orderInfo
,
setOrderInfo
]
=
useState
<
any
>
([])
const
open
=
async
(
index
:
any
)
=>
{
let
arr
=
[...
openFlag
]
...
...
@@ -32,22 +19,38 @@ const Order: React.FC = () => {
}
//路由跳转过来携带的数据
const
GetRouterData
=
async
()
=>
{
console
.
log
(
history
,
'props'
)
setOrderInfo
(
history
.
location
.
state
.
orderInfo
)
setCustomData
(
history
.
location
.
state
.
orderInfo
.
clientOrderInfos
)
debugger
// console.log(history, 'props')
// setOrderInfo(history.location.state.orderInfo)
// setCustomData(history.location.state.orderInfo.clientOrderInfos)
let
userId
=
history
.
location
.
state
.
userId
getorderInfo
(
userId
)
}
const
Goto
=
async
(
props
:
any
,
userItem
:
any
)
=>
{
//获取订单信息
const
getorderInfo
=
async
(
id
:
any
)
=>
{
// const res = await jsSdk.invoke<{ userId?: string }>('getCurExternalContact', {})
// if (!res || !res.userId) return
// setUserId(res.userId)
let
data
:
any
=
{
wxId
:
id
}
const
orderInfo
=
await
getOrderInfoByWxId
(
data
)
setOrderInfo
(
orderInfo
.
data
)
setCustomData
(
orderInfo
.
data
.
clientOrderInfos
)
}
const
Goto
=
async
(
userItem
:
any
)
=>
{
// // 页面跳转方法
history
.
push
({
pathname
:
'/Person'
,
state
:
{
userItem
}})
history
.
push
({
pathname
:
'/Person'
,
state
:
{
userItem
,
orderInfo
}})
}
const
back
=
async
()
=>
{
// history.back()
history
.
push
({
pathname
:
'/'
})
}
useEffect
(()
=>
{
GetRouterData
();
},[]
)
},[
orderInfo
]
)
return
(
<
div
>
<
div
className=
"orderItem"
><
LeftOutlined
/>
订单信息
</
div
>
<
div
className=
"orderItem"
onClick=
{
back
}
><
LeftOutlined
/>
订单信息
</
div
>
<
div
className=
"orders"
>
<
div
className=
"flex spaceBetween head"
>
<
p
>
客户中心
{
openFlag
}
</
p
>
...
...
src/pages/findCustom.tsx
View file @
8882ed40
...
...
@@ -90,8 +90,6 @@ const Actions: React.FC = () => {
//取消关联
const
unlink
=
async
(
value
:
any
,
index
:
any
)
=>
{
const
res
=
await
jsSdk
.
invoke
<
{
userId
?:
string
}
>
(
'getCurExternalContact'
,
{})
// alert(JSON.stringify(res))
debugger
if
(
!
res
||
!
res
.
userId
)
return
let
data
:
any
=
{
wxId
:
res
.
userId
,
userId
:
value
.
id
}
const
linkdata
=
await
unlinkData
(
data
)
...
...
@@ -154,16 +152,16 @@ const Actions: React.FC = () => {
<
TabPane
tab=
{
item
}
key=
{
idx
}
>
<
div
className=
"content"
>
{
listData
.
length
===
0
?
<
p
className=
'detail'
>
暂无数据,请输入查询条件
</
p
>:
listData
.
map
((
list
:
any
,
index
:
number
)
=>
{
listData
.
length
===
0
?
<
p
className=
'detail
Word
'
>
暂无数据,请输入查询条件
</
p
>:
listData
.
map
((
list
:
any
,
index
:
number
)
=>
<
div
className=
"customItem"
>
<
div
className=
"flex spaceBetween w100"
>
<
div
className=
"leftItem"
>
<
p
className=
'customName'
>
{
list
.
realName
}
</
p
>
<
p
className=
'customFhone'
>
{
list
.
mobileNumber
}
</
p
>
<
p
className=
"detail"
>
{
list
.
sex
===
1
?
'男'
:
'女'
}
</
p
>
<
p
className=
"detail"
>
{
list
.
email
}
</
p
>
<
p
className=
"detail"
>
身份证
</
p
>
<
p
className=
"detail"
>
{
list
.
idNumber
}
</
p
>
<
p
className=
"detail
Word
"
>
{
list
.
sex
===
1
?
'男'
:
'女'
}
</
p
>
<
p
className=
"detail
Word
"
>
{
list
.
email
}
</
p
>
<
p
className=
"detail
Word
"
>
身份证
</
p
>
<
p
className=
"detail
Word
"
>
{
list
.
idNumber
}
</
p
>
</
div
>
<
div
className=
"rightItem"
>
{
list
.
avatar
?<
img
src=
{
list
.
avatar
}
className=
'avatar'
alt=
""
/>:(
<
div
className=
"avatar"
></
div
>
)
}
...
...
src/pages/person.tsx
View file @
8882ed40
...
...
@@ -12,18 +12,20 @@ const Person: React.FC = () => {
const
[
customData
,
setCustomData
]
=
useState
<
any
>
({
id
:
33599
})
const
[
orderInfo
,
setOrderInfo
]
=
useState
<
any
>
([])
const
back
=
async
()
=>
{
location
.
goBack
()
// location.back()
location
.
push
({
pathname
:
'/Order'
,
state
:
{
orderInfo
}})
}
//路由跳转过来携带的数据
const
GetRouterData
=
async
()
=>
{
console
.
log
(
location
,
'props'
)
debugger
setCustomData
(
location
.
location
.
state
.
userItem
)
setOrderInfo
(
location
.
location
.
state
.
orderInfo
)
}
useEffect
(()
=>
{
GetRouterData
()
},
[])
},
[
customData
])
return
(
<
div
>
{
/* <Top text={'dddd'}/> */
}
...
...
@@ -48,80 +50,80 @@ const Person: React.FC = () => {
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
赛事名称:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
gobiName
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
分组:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
rolesName
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
证件类型:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
cardTypeName
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
电话:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
enrollPhone
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
性别:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
genderTypes
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
邮箱:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
email
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
证件号:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
Card
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
操作者电话:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
operateUserPhone
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
昵称:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
realName
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
头像:
</
p
>
<
img
className=
'avatar'
alt=
""
src=
""
></
img
>
<
img
className=
'avatar'
alt=
""
src=
{
customData
.
prettyImg
}
></
img
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
组织ID:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
i
d
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
organizeI
d
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
是否在线支持:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
i
d
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
i
sOnlinePay
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
价格:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
price
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
国籍:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
nationality
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
省:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
province
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
市:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
city
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
区:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
district
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
详细地址:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
address
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
行业:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
businessName
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
公司:
</
p
>
...
...
@@ -130,11 +132,11 @@ const Person: React.FC = () => {
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
职务:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'rightword'
>
{
customData
.
dutyTypesName
}
</
p
>
</
div
>
<
div
className=
"flex spaceBetween"
>
<
p
className=
'leftword'
>
职务:
</
p
>
<
p
className=
'rightword'
>
{
customData
.
id
}
</
p
>
<
p
className=
'leftword'
>
身高
</
p
>
<
p
className=
'rightword'
>
{
customData
.
height
}
</
p
>
</
div
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment