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
282690c1
Commit
282690c1
authored
Apr 13, 2022
by
前端-许冠华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-0418-bug' into 'v2-220418'
fix: 更换代客下单优惠券领取和查询优惠券列表的接口 See merge request linkseeks-design/pro-platform!267
parents
6f6b2e04
f2a9fd9b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
12 deletions
+32
-12
index.tsx
...urchaseOrder/commodityDetail/components/Coupons/index.tsx
+14
-5
index.tsx
...on/saleOrder/agentPurchaseOrder/commodityDetail/index.tsx
+2
-0
index.tsx
...ction/saleOrder/agentPurchaseOrder/order/coupon/index.tsx
+2
-4
commodityItem.tsx
...eOrder/agentPurchaseOrder/purchaseOrder/commodityItem.tsx
+14
-3
No files found.
src/pages/transaction/saleOrder/agentPurchaseOrder/commodityDetail/components/Coupons/index.tsx
View file @
282690c1
...
...
@@ -4,7 +4,7 @@ import { CaretDownOutlined, CaretUpOutlined, CheckCircleFilled } from '@ant-desi
import
{
TagList
}
from
'@linkseeks/lingxi-mall-components'
import
{
LinkTo
}
from
'../../../utils'
import
moment
from
'moment'
import
{
postMarketingWebCouponReceive
}
from
'@/services/MarketingV2Api'
import
{
postMarketingWeb
Agent
CouponReceive
}
from
'@/services/MarketingV2Api'
import
{
CouponDataType
}
from
'../../types'
import
{
getMessage
}
from
'../../../utils'
import
styles
from
'./index.less'
...
...
@@ -12,10 +12,12 @@ import styles from './index.less'
interface
CouponsProps
{
data
:
CouponDataType
[]
|
undefined
,
mallId
:
number
,
agentMemberId
:
number
,
agentRoleId
:
number
,
}
const
Coupons
:
React
.
FC
<
CouponsProps
>
=
(
props
)
=>
{
const
{
data
,
mallId
}
=
props
const
{
data
,
mallId
,
agentMemberId
,
agentRoleId
}
=
props
const
[
couponsList
,
setCouponsList
]
=
useState
<
CouponDataType
[]
>
()
const
[
expand
,
setExpand
]
=
useState
<
boolean
>
(
false
)
const
SHOW_COUNT
=
2
// 默认显示数量
...
...
@@ -42,10 +44,15 @@ const Coupons: React.FC<CouponsProps> = (props) => {
belongType
:
couponInfo
.
belongType
,
couponId
:
couponInfo
.
couponId
}
const
res
=
await
postMarketingWebCouponReceive
(
param
)
message
.
destroy
()
const
headers
:
any
=
{
agentMemberId
,
agentRoleId
,
}
const
res
=
await
postMarketingWebAgentCouponReceive
(
param
,
{
headers
})
if
(
res
.
code
===
1000
&&
res
.
data
)
{
if
(
res
.
data
?.
canReceive
===
3
)
{
message
.
destroy
()
if
(
res
.
data
?.
canReceive
!==
1
)
{
const
newCoupons
=
couponsList
?
couponsList
.
map
((
item
)
=>
{
return
{
...
item
,
...
...
@@ -83,6 +90,8 @@ const Coupons: React.FC<CouponsProps> = (props) => {
</
div
>
)
})
}
else
{
message
.
info
(
getMessage
(
'coupons.incompatible'
))
}
}
}
catch
(
error
)
{
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/commodityDetail/index.tsx
View file @
282690c1
...
...
@@ -582,6 +582,8 @@ const CommodityDetail: React.FC = (props: any) => {
<
Coupons
data=
{
marketingData
?.
couponList
}
mallId=
{
mallId
}
agentMemberId=
{
agentPurchaseOrderInfo
?.
memberId
}
agentRoleId=
{
agentPurchaseOrderInfo
?.
roleId
}
/>
)
}
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/order/coupon/index.tsx
View file @
282690c1
...
...
@@ -75,10 +75,8 @@ const CouponSelect: React.FC<InvoicePropsType> = (props) => {
skuIdList
:
[],
};
item
.
orderList
.
forEach
((
newCommodity
)
=>
{
obj
.
memberId
=
buyerInfo
.
memberId
obj
.
roleId
=
buyerInfo
.
roleId
// obj.memberId = newCommodity.vendorMemberId
// obj.roleId = newCommodity.vendorRoleId
obj
.
memberId
=
newCommodity
.
vendorMemberId
obj
.
roleId
=
newCommodity
.
vendorRoleId
obj
.
skuIdList
.
push
(
newCommodity
.
id
);
});
skuIdListObj
.
push
(
obj
);
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/purchaseOrder/commodityItem.tsx
View file @
282690c1
...
...
@@ -6,7 +6,7 @@ import { Link } from 'react-router-dom';
import
{
fnGetActivityTips
}
from
'./callBlackTips'
;
import
{
CaretDownOutlined
,
RightOutlined
}
from
'@ant-design/icons'
;
import
InputNumber
from
'../components/InputNumber'
;
import
{
getMarketingWeb
CouponListByShop
,
postMarketingMobile
CouponReceive
}
from
'@/services/MarketingV2Api'
;
import
{
getMarketingWeb
AgentCouponListByShop
,
postMarketingWebAgent
CouponReceive
}
from
'@/services/MarketingV2Api'
;
import
{
priceFormat
,
numFormat
}
from
'../utils/numFormat'
import
{
LinkTo
,
getMessage
}
from
'../utils'
;
...
...
@@ -376,7 +376,13 @@ const CommodityItem: React.FC<any> = (props) => {
memberId
:
newShop
.
memberId
,
roleId
:
newShop
.
memberRoleId
,
};
getMarketingWebCouponListByShop
(
parmas
).
then
((
res
)
=>
{
const
headers
:
any
=
{
agentMemberId
:
buyerInfo
?.
memberId
,
agentRoleId
:
buyerInfo
?.
roleId
,
}
getMarketingWebAgentCouponListByShop
(
parmas
,
{
headers
}).
then
((
res
)
=>
{
setShowIsLoading
(
false
);
if
(
res
.
code
===
1000
)
{
setcouponList
(
res
.
data
);
...
...
@@ -405,8 +411,13 @@ const CommodityItem: React.FC<any> = (props) => {
belongType
:
item
.
belongType
,
couponId
:
item
.
couponId
,
}
postMarketingMobileCouponReceive
(
parmas
).
then
((
res
)
=>
{
const
headers
:
any
=
{
agentMemberId
:
buyerInfo
?.
memberId
,
agentRoleId
:
buyerInfo
?.
roleId
,
}
postMarketingWebAgentCouponReceive
(
parmas
,
{
headers
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
message
.
destroy
();
message
.
success
(
getMessage
(
'purchaseOrder.lingquchenggong'
,
'领取成功'
))
item
.
completeReceive
=
3
;
setcouponList
([...
couponList
]);
...
...
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