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
shenshaokai
jinfa-platform
Commits
7d1c67f2
Commit
7d1c67f2
authored
Jan 24, 2022
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 对接待发货订单拼团链接分享
parent
e361acf8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
24 deletions
+41
-24
order.ts
src/constants/order.ts
+6
-0
index.less
...es/transaction/purchaseOrder/readyDelevedOrder/index.less
+9
-0
index.tsx
...ges/transaction/purchaseOrder/readyDelevedOrder/index.tsx
+24
-18
index.tsx
src/pages/transaction/saleOrder/index.tsx
+2
-6
No files found.
src/constants/order.ts
View file @
7d1c67f2
...
...
@@ -637,3 +637,9 @@ export const PurchaseOrderInsideWorkStateTexts = {
19
:
'已归档'
,
20
:
'待确认电子合同'
,
}
/** 需要app扫码 访问的h5下载链接地址 */
export
const
h5PageAddressByScan
=
'http://download-h5.shushangyun.com:13880/download'
/** 需要app扫码 访问拼团详情链接地址 */
export
const
groupDetailByScan
=
'http://pt-h5.shushangyun.com:13880/'
src/pages/transaction/purchaseOrder/readyDelevedOrder/index.less
View file @
7d1c67f2
...
...
@@ -26,9 +26,18 @@
span {
font-size: 12px;
}
.originPrice {
text-decoration: line-through;
color: #91959B;
margin-left: 5px;
}
}
& > p {
margin-bottom: 0;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
}
}
...
...
src/pages/transaction/purchaseOrder/readyDelevedOrder/index.tsx
View file @
7d1c67f2
...
...
@@ -7,10 +7,10 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
{
getOrderBuyerValidateDeliveryPage
}
from
'@/services/OrderNewV2Api'
import
{
getOrderBuyer
DeliveryMiniAppCode
,
getOrderBuyer
ValidateDeliveryPage
}
from
'@/services/OrderNewV2Api'
import
{
useIntl
,
history
}
from
'umi'
import
TableOperation
from
'@/components/TableOperation'
import
{
ORDER_TYPE_POINTS
}
from
'@/constants/order'
import
{
groupDetailByScan
,
ORDER_TYPE_POINTS
}
from
'@/constants/order'
import
SaleAfter
from
'../components/saleAfter'
import
styles
from
'./index.less'
import
appImg
from
'@/assets/icons/app.png'
...
...
@@ -73,23 +73,23 @@ const ReadyDelevedOrder:React.FC<ReadyDelevedOrderProps> = () => {
const
[
activityInfo
,
setActivityInfo
]
=
useState
<
any
>
()
useEffect
(()
=>
{
console
.
log
(
activityInfo
,
'aaa'
)
if
(
payModel
===
STORE_ENV_MAP
[
"WEB"
])
{
console
.
log
(
activityInfo
,
'activityInfo'
)
const
element
=
document
.
getElementById
(
'linkInput'
)
element
[
'value'
]
=
`原价¥
${
activityInfo
.
price
}
,
${
activityInfo
.
assembleNum
}
人团 ,只需¥
${
activityInfo
.
activityPrice
}
,
${
activityInfo
.
productName
}
http://lx-
${
activityInfo
.
shopPrefix
}
.
${
TOP_DOMAIN
}
/shop/
${
activityInfo
.
supplierMemberId
}
_
${
activityInfo
.
supplierRoleId
}
/group/detail/
${
activityInfo
.
productId
}
?groupId=
${
activityInfo
.
groupId
}
`
;
}
else
if
(
payModel
===
STORE_ENV_MAP
[
"APP"
])
{
// 生成二维码
QRCode
.
toDataURL
(
`
lingxi://detail/
${
activityInfo
.
productId
}
/
${
activityInfo
.
shopId
}
/
${
activityInfo
.
skuId
}
/
${
activityInfo
.
groupId
}
`
).
then
((
url
:
any
)
=>
{
QRCode
.
toDataURL
(
`
${
groupDetailByScan
}
?commodityId=
${
activityInfo
.
skuId
}
&teamId=
${
activityInfo
.
groupId
}
&shopId=
${
activityInfo
.
shopId
}
&shopType=
${
activityInfo
.
shopType
}
`
).
then
((
url
:
any
)
=>
{
setQrCode
(
url
)
}).
catch
((
err
)
=>
{
console
.
error
(
err
)
})
}
else
if
(
payModel
===
STORE_ENV_MAP
[
"小程序"
]){
// getOrderVendorMiniAppCode({orderId: currentPay
Ref.current.orderId + ''}).then(res => {
//
setQrCode(res.data)
//
})
getOrderBuyerDeliveryMiniAppCode
({
orderId
:
currentOrder
Ref
.
current
.
orderId
+
''
}).
then
(
res
=>
{
setQrCode
(
res
.
data
)
})
}
},
[
payModel
])
},
[
payModel
,
currentOrderRef
.
current
])
// 售后唤起弹窗
const
handleSaleAfter
=
({
orderId
,
orderType
})
=>
{
...
...
@@ -148,7 +148,14 @@ const ReadyDelevedOrder:React.FC<ReadyDelevedOrderProps> = () => {
currentPayRef
.
current
=
data
currentOrderRef
.
current
=
record
// 加入商城链接前缀 拼团id和商城id
setActivityInfo
({...
data
,
shopPrefix
:
shopInfo
.
filter
(
item
=>
item
.
id
===
record
.
shopId
)[
0
][
'url'
],
groupId
:
record
.
groupId
,
shopId
:
record
.
shopId
})
const
shop
=
shopInfo
.
filter
(
item
=>
item
.
id
===
record
.
shopId
)[
0
]
setActivityInfo
({
...
data
,
shopPrefix
:
shop
[
'url'
],
groupId
:
record
.
groupId
,
shopId
:
record
.
shopId
,
shopType
:
shop
[
'type'
]
})
setPayModel
(
data
.
environmentList
[
0
])
})
setShareVisible
(
true
)
...
...
@@ -253,15 +260,14 @@ const ReadyDelevedOrder:React.FC<ReadyDelevedOrderProps> = () => {
footer=
{
false
}
width=
{
600
}
destroyOnClose=
{
true
}
afterClose=
{
()
=>
setQrCode
(
''
)
}
>
<
div
>
<
div
style=
{
{
marginBottom
:
10
}
}
>
<
p
>
{
intl
.
formatMessage
({
id
:
'saleOrder.xuanzeleixin'
,
defaultMessage
:
'选择类型:'
})
}
</
p
>
<
Radio
.
Group
onChange=
{
onChangePayModel
}
value=
{
payModel
}
>
{
activityInfo
?.
environmentList
.
map
(
item
=>
Object
.
keys
(
EnvironmentStore
).
includes
(
item
+
''
)
&&
<>
<
Radio
value=
{
item
}
>
{
EnvironmentStore
[
item
]
}
</
Radio
>
</>)
activityInfo
?.
environmentList
.
map
(
item
=>
Object
.
keys
(
EnvironmentStore
).
includes
(
item
+
''
)
&&
<
Radio
key=
{
item
}
value=
{
item
}
>
{
EnvironmentStore
[
item
]
}
</
Radio
>)
}
</
Radio
.
Group
>
<
p
style=
{
{
marginTop
:
24
}
}
>
...
...
@@ -302,11 +308,11 @@ const ReadyDelevedOrder:React.FC<ReadyDelevedOrderProps> = () => {
<
Col
span=
{
16
}
>
<
div
className=
{
styles
.
appPayCommodity
}
>
<
div
className=
{
styles
.
commodityImage
}
>
<
img
src=
{
activityInfo
?.
productImgUrl
}
alt=
""
width=
{
88
}
height=
{
88
}
/>
<
img
src=
{
activityInfo
?.
productImgUrl
}
alt=
{
activityInfo
?.
productName
}
width=
{
88
}
height=
{
88
}
/>
</
div
>
<
div
className=
{
styles
.
commodityDescription
}
>
<
p
><
Tag
color=
"red"
>
{
activityInfo
?.
assembleNum
}
人团
</
Tag
><
span
>
{
activityInfo
?.
productName
}
</
span
></
p
>
<
p
className=
{
styles
.
commodityPrice
}
><
span
>
{
intl
.
formatMessage
({
id
:
'commodity.products.directChannel.columns.currency'
})
}
</
span
>
3580.00
</
p
>
<
p
className=
{
styles
.
commodityPrice
}
><
span
>
{
intl
.
formatMessage
({
id
:
'commodity.products.directChannel.columns.currency'
})
}
</
span
>
{
Number
(
activityInfo
?.
activityPrice
).
toFixed
(
2
)
}
<
span
className=
{
styles
.
originPrice
}
>
{
Number
(
activityInfo
?.
price
).
toFixed
(
2
)
}
</
span
>
</
p
>
</
div
>
</
div
>
</
Col
>
...
...
@@ -334,17 +340,17 @@ const ReadyDelevedOrder:React.FC<ReadyDelevedOrderProps> = () => {
<
Col
span=
{
16
}
>
<
div
className=
{
styles
.
appPayCommodity
}
>
<
div
className=
{
styles
.
commodityImage
}
>
<
img
src=
{
miniappImg
}
alt=
""
width=
{
88
}
height=
{
88
}
/>
<
img
src=
{
activityInfo
?.
productImgUrl
}
alt=
{
activityInfo
?.
productName
}
width=
{
88
}
height=
{
88
}
/>
</
div
>
<
div
className=
{
styles
.
commodityDescription
}
>
<
p
><
Tag
color=
"red"
>
3人团
</
Tag
><
span
>
普卷 Q235B 4.5*1500 沧州铁直普卷 Q235B 4.5*1500 沧州铁直普卷 Q235B 4.5*1500 沧州铁直
</
span
></
p
>
<
p
className=
{
styles
.
commodityPrice
}
><
span
>
{
intl
.
formatMessage
({
id
:
'commodity.products.directChannel.columns.currency'
})
}
</
span
>
3580.00
</
p
>
<
p
><
Tag
color=
"red"
>
{
activityInfo
?.
assembleNum
}
人团
</
Tag
><
span
>
{
activityInfo
?.
productName
}
</
span
></
p
>
<
p
className=
{
styles
.
commodityPrice
}
><
span
>
{
intl
.
formatMessage
({
id
:
'commodity.products.directChannel.columns.currency'
})
}
</
span
>
{
Number
(
activityInfo
?.
activityPrice
).
toFixed
(
2
)
}
<
span
className=
{
styles
.
originPrice
}
>
{
Number
(
activityInfo
?.
price
).
toFixed
(
2
)
}
</
span
>
</
p
>
</
div
>
</
div
>
</
Col
>
<
Col
span=
{
8
}
>
<
div
className=
{
styles
.
appPayQrCode
}
>
<
img
src=
{
miniappImg
}
alt=
""
width=
{
128
}
height=
{
128
}
/
>
<
div
>
{
qrCode
?
<
img
id=
"qrcodeElement"
src=
{
qrCode
}
alt=
""
width=
{
130
}
height=
{
130
}
/>
:
<
Spin
/>
}
</
div
>
<
p
><
img
src=
{
scanImg
}
alt=
""
width=
{
16
}
height=
{
16
}
/>
{
intl
.
formatMessage
({
id
:
'saleOrder.saomacanyupintuan'
,
defaultMessage
:
'扫码参与拼团'
})
}
</
p
>
</
div
>
</
Col
>
...
...
src/pages/transaction/saleOrder/index.tsx
View file @
7d1c67f2
...
...
@@ -22,6 +22,7 @@ import { getOrderVendorGeneratePayLink, getOrderVendorMiniAppCode, getOrderVendo
import
appImg
from
'@/assets/icons/app.png'
import
miniappImg
from
'@/assets/icons/miniapp.png'
import
scanImg
from
'@/assets/icons/scan.png'
import
{
h5PageAddressByScan
}
from
'@/constants/order'
;
// 销售订单查询
...
...
@@ -117,12 +118,7 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
payForm
.
setFieldsValue
({
'payChart'
:
`
${
window
.
location
.
origin
}
/memberCenter/tranactionAbility/purchaseOrder/readyPayOrder/detail?id=
${
currentPayRef
.
current
.
orderId
}
`
})
}
else
if
(
payModel
===
"app"
)
{
// 生成二维码
QRCode
.
toDataURL
(
JSON
.
stringify
({
path
:
'MycommodityDetails'
,
orderId
:
currentPayRef
.
current
.
orderId
,
buyerMemberId
:
currentPayRef
.
current
.
buyerMemberId
,
buyerRoleId
:
currentPayRef
.
current
.
buyerRoleId
})).
then
((
url
:
any
)
=>
{
QRCode
.
toDataURL
(
`
${
h5PageAddressByScan
}
?path=MycommodityDetails&orderId=
${
currentPayRef
.
current
.
orderId
}
`
).
then
((
url
:
any
)
=>
{
setQrCode
(
url
)
}).
catch
((
err
:
any
)
=>
{
console
.
error
(
err
)
...
...
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