Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
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
黄庭坚
jinfa-platform
Commits
e26813a4
Commit
e26813a4
authored
Jun 25, 2021
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-srm' of 10.0.0.22:lingxi/lingxi-business-paltform into dev-srm
parents
eb28d5f3
6e6fff31
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
95 additions
and
8 deletions
+95
-8
index.tsx
...ity/logisticsBillSubmit/waitSbumitLogisticsBill/index.tsx
+9
-1
index.tsx
...saction/purchaseAbility/components/detail/modal/index.tsx
+5
-1
index.tsx
...ansaction/purchaseAbility/confirmOffer/contrast/index.tsx
+1
-1
index.tsx
...ction/purchaseAbility/onlineBid/readyBid/detail/index.tsx
+3
-2
index.tsx
...chaseBid/readyBid/management/components/rankRow/index.tsx
+3
-2
demand.tsx
...eAbility/purchaseInquiry/addInquiry/components/demand.tsx
+1
-1
im.tsx
src/utils/im.tsx
+73
-0
No files found.
src/pages/transaction/logisticsAbility/logisticsBillSubmit/waitSbumitLogisticsBill/index.tsx
View file @
e26813a4
...
...
@@ -21,6 +21,12 @@ const LogisticsBillQuery = () => {
})
}
const
handleSubmit
=
(
id
:
number
)
=>
{
PublicApi
.
postLogisticsOrderWaitSubmitSubmit
({
id
:
id
}).
then
(
res
=>
{
reload
.
current
.
reload
()
})
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'物流单号'
,
...
...
@@ -76,8 +82,10 @@ const LogisticsBillQuery = () => {
key
:
'submitOrUpdateOrDel'
,
dataIndex
:
'submitOrUpdateOrDel'
,
render
:
(
text
,
data
)
=>
text
&&
<>
<
Button
type=
'link'
>
提交
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logisticsBillSubmit/waitSbumitLogisticsBill/edit?id=${data.id}`
)
}
>
编辑
</
Button
>
<
Popconfirm
title=
"确定要提交吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleSubmit
(
data
.
id
)
}
>
<
Button
type=
'link'
>
提交
</
Button
>
</
Popconfirm
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelete
(
data
.
id
)
}
>
<
Button
type=
'link'
>
删除
...
...
src/pages/transaction/purchaseAbility/components/detail/modal/index.tsx
View file @
e26813a4
...
...
@@ -116,7 +116,11 @@ const BidModal: React.FC<IProps> = (props: any) => {
urls
:
files
,
priceParityInfos
,
}
for
(
let
i
=
0
;
i
<
dataSource
.
length
;
i
++
)
{
if
(
isEmpty
(
priceParityInfos
))
{
message
.
warning
(
'请核对比价信息授标是否勾选!'
);
return
}
for
(
let
i
=
0
;
i
<
dataSource
.
length
;
i
++
)
{
const
count
=
sumBy
(
dataSource
[
i
].
company
,
'awardTaxProbability'
);
if
(
count
>
100
||
count
<
100
)
{
message
.
warning
(
`
${
dataSource
[
i
].
number
}
授标百分比分配不准确,请核对!`
);
...
...
src/pages/transaction/purchaseAbility/confirmOffer/contrast/index.tsx
View file @
e26813a4
...
...
@@ -191,7 +191,7 @@ const ContrastPrice = () => {
link
===
'preview'
?
null
:
<
Button
type=
'primary'
disabled=
{
disabled
}
//
disabled=
{
disabled
}
onClick=
{
()
=>
setVisible
(
true
)
}
>
<
CheckCircleOutlined
/>
...
...
src/pages/transaction/purchaseAbility/onlineBid/readyBid/detail/index.tsx
View file @
e26813a4
...
...
@@ -7,7 +7,8 @@ import { observer } from 'mobx-react'
import
{
PublicApi
}
from
'@/services/api'
;
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
{
formatTimeString
}
from
'@/utils'
import
{
formatTimeString
}
from
'@/utils'
;
import
{
toChatRoom
}
from
'@/utils/im'
;
import
{
usePurchaseBidStore
}
from
'@/store/purchaseBid'
;
import
StatusBox
from
'../../../purchaseBid/readyBid/management/components/statusBox'
;
...
...
@@ -98,7 +99,7 @@ const Detail = () => {
<
div
className=
{
styles
.
warp
}
>
<
div
className=
{
styles
.
header
}
>
<
ArrowLeftOutlined
className=
{
styles
.
goBack
}
onClick=
{
()
=>
history
.
goBack
()
}
/>
<
div
className=
{
styles
.
title
}
>
{
dataSource
?.
details
}
<
span
>
{
dataSource
?.
createMemberName
}
</
span
><
IMBtn
func=
{
()
=>
console
.
log
(
'ok'
)
}
/></
div
>
<
div
className=
{
styles
.
title
}
>
{
dataSource
?.
details
}
<
span
>
{
dataSource
?.
createMemberName
}
</
span
><
IMBtn
func=
{
()
=>
toChatRoom
(
dataSource
.
memberId
)
}
/></
div
>
</
div
>
<
div
className=
{
styles
.
layout
}
>
<
Row
gutter=
{
[
8
,
8
]
}
>
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyBid/management/components/rankRow/index.tsx
View file @
e26813a4
...
...
@@ -5,6 +5,7 @@ import level1 from '@/assets/icons/the_first.png';
import
level2
from
'@/assets/icons/the_second.png'
;
import
level3
from
'@/assets/icons/the_third.png'
;
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
{
toChatRoom
}
from
'@/utils/im'
;
import
IMBtn
from
'../../../../../components/detail/components/iMBtn'
;
...
...
@@ -55,7 +56,7 @@ const RankRow: React.FC<RankRowProps> = (props: any) => {
</
div
>
<
div
className=
{
styles
.
rankRowRight
}
>
{
detail
.
contacts
}
<
IMBtn
func=
{
()
=>
console
.
log
(
1
)
}
/>
<
IMBtn
func=
{
()
=>
toChatRoom
(
detail
.
memberId
)
}
/>
</
div
>
</
div
>
)
...
...
@@ -71,7 +72,7 @@ const RankRow: React.FC<RankRowProps> = (props: any) => {
<
div
>
<
div
className=
{
styles
.
rankRowRight
}
>
{
detail
.
contacts
}
<
IMBtn
func=
{
()
=>
console
.
log
(
1
)
}
/>
<
IMBtn
func=
{
()
=>
toChatRoom
(
detail
.
memberId
)
}
/>
</
div
>
</
div
>
</
div
>
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/components/demand.tsx
View file @
e26813a4
...
...
@@ -262,7 +262,7 @@ const Demand: React.FC<Iprops> = (props: any) => {
rules=
{
[{
required
:
true
,
message
:
'请选择对接方式'
}]
}
>
<
Radio
.
Group
onChange=
{
changeRadio
}
>
<
Radio
value=
{
1
}
><
Tooltip
placement=
"topLeft"
title=
{
<>
需求发布至
企业商城求购频道
</>
}
>
发布至平台
<
QuestionCircleOutlined
style=
{
{
marginLeft
:
'5px'
}
}
/></
Tooltip
></
Radio
>
<
Radio
value=
{
1
}
><
Tooltip
placement=
"topLeft"
title=
{
<>
需求发布至
采购门户
</>
}
>
发布至平台
<
QuestionCircleOutlined
style=
{
{
marginLeft
:
'5px'
}
}
/></
Tooltip
></
Radio
>
<
Radio
value=
{
2
}
><
Tooltip
placement=
"topLeft"
title=
{
<>
系统通过需求单品类、商品属性、适用地市与平台会员发布的商品品类、商品属性、归属地区进行匹配,推荐满足条件的平台会员
</>
}
>
系统匹配
<
QuestionCircleOutlined
style=
{
{
marginLeft
:
'5px'
}
}
/></
Tooltip
></
Radio
>
<
Radio
value=
{
3
}
><
Tooltip
placement=
"topLeft"
title=
{
<>
选择与当前会员有归属关系的会员且角色类型为服务提供的会员(供应商),需求只发送给指定会员
</>
}
>
邀请会员
<
QuestionCircleOutlined
style=
{
{
marginLeft
:
'5px'
}
}
/></
Tooltip
></
Radio
>
</
Radio
.
Group
>
...
...
src/utils/im.tsx
0 → 100644
View file @
e26813a4
import
React
from
'react'
;
import
{
Button
,
notification
,
message
}
from
'antd'
;
import
BASE_CONFIG
from
'../../config/base.config.json'
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SHOP_TYPE
}
from
'@/constants'
;
import
{
getAuth
}
from
'@/utils/auth'
;
const
DOMAIN
=
{...
BASE_CONFIG
}.
global
.
siteInfo
.
siteUrl
.
replace
(
'www'
,
''
);
//document.domain
const
CHATROOM_URL
=
`http://chatroom
${
DOMAIN
}
/chatRoom`
;
const
COOKIEPREFIX
=
'CHATROOM_'
;
// 主动调起聊天室 mmeberId 为接收人的memberId
export
const
toChatRoom
=
(
memberId
:
string
=
''
,
shopType
:
number
=
1
)
=>
{
const
_curUserInfo
=
getAuth
();
if
(
!
memberId
){
document
.
cookie
=
`
${
COOKIEPREFIX
}
userInfo=
${
JSON
.
stringify
(
_curUserInfo
)}
;path=/;domain=
${
DOMAIN
}
`
;
document
.
cookie
=
`
${
COOKIEPREFIX
}
shopType=
${
shopType
}
;path=/;domain=
${
DOMAIN
}
`
;
window
.
open
(
CHATROOM_URL
);
return
;
}
PublicApi
.
getMessageImHistorySession
({
memberId
:
memberId
,
currMemberId
:
String
(
_curUserInfo
.
memberId
)
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
_userId
=
res
.
data
.
data
?.[
0
]?.
userList
?.[
0
]?.
userId
if
(
_userId
)
{
document
.
cookie
=
`
${
COOKIEPREFIX
}
curMemberId=
${
memberId
}
;path=/;domain=
${
DOMAIN
}
`
;
document
.
cookie
=
`
${
COOKIEPREFIX
}
curUserId=
${
_userId
}
;path=/;domain=
${
DOMAIN
}
`
;
document
.
cookie
=
`
${
COOKIEPREFIX
}
userInfo=
${
JSON
.
stringify
(
_curUserInfo
)}
;path=/;domain=
${
DOMAIN
}
`
;
document
.
cookie
=
`
${
COOKIEPREFIX
}
shopType=
${
shopType
}
;path=/;domain=
${
DOMAIN
}
`
;
window
.
open
(
CHATROOM_URL
);
}
else
{
message
.
error
(
'该会员底下没有客服!'
);
}
}
})
}
interface
NotificationChatRoomProps
{
//通知消息
detail
:
any
}
// 被动从websocket调起聊天室
export
const
notificationChatRoom
=
(
props
:
NotificationChatRoomProps
)
=>
{
const
{
detail
}
=
props
const
_curUserInfo
=
getAuth
();
const
close
=
()
=>
{
console
.
log
(
'Notification was closed. Either the close button was clicked or duration time elapsed.'
,
);
};
const
key
=
`open
${
Date
.
now
()}
`
;
const
btn
=
(
<
Button
type=
"primary"
size=
"small"
onClick=
{
()
=>
{
document
.
cookie
=
`${COOKIEPREFIX}userInfo=${JSON.stringify(_curUserInfo)};path=/;domain=${DOMAIN}`
;
document
.
cookie
=
`${COOKIEPREFIX}shopType=${shopType};path=/;domain=${DOMAIN}`
;
window
.
open
(
CHATROOM_URL
);
notification
.
close
(
key
)
}
}
>
查看
</
Button
>
);
notification
.
open
({
message
:
'你收到一条消息'
,
description
:
'A function will be be called after the notification is closed (automatically after the "duration" time of manually).'
,
btn
,
key
,
duration
:
10
,
onClose
:
close
,
});
}
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