Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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-admin
Commits
2d1194fe
Commit
2d1194fe
authored
Aug 13, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 跟进商品优惠券相关
parent
543720aa
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
57 deletions
+32
-57
platformCouponManageRoute.ts
config/routes/platformCouponManageRoute.ts
+2
-1
menu.ts
src/locales/zh-CN/menu.ts
+18
-18
index.tsx
...platformCouponManage/components/ApplicableGoods/index.tsx
+2
-2
add.tsx
...es/platformCouponManage/platformCouponUnsubmitted/add.tsx
+1
-1
index.tsx
...nUnsubmitted/components/ApplicableGoodsFormItem/index.tsx
+1
-7
useBusinessEffects.ts
...itted/components/CouponForm/effects/useBusinessEffects.ts
+0
-11
index.tsx
...platformCouponUnsubmitted/components/CouponForm/index.tsx
+4
-4
index.tsx
...latformCouponUnsubmitted/components/GoodsDrawer/index.tsx
+4
-13
No files found.
config/routes/platformCouponManageRoute.ts
View file @
2d1194fe
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-03 17:34:51
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-
03 18:06:51
* @LastEditTime: 2021-08-
13 15:43:29
* @Description:
*/
const
platformCouponManageRoute
=
{
...
...
@@ -78,6 +78,7 @@ const platformCouponManageRoute = {
component
:
'@/pages/platformCouponManage/platformCouponNotVerify1/verify'
,
hideInMenu
:
true
,
noMargin
:
true
,
hidePageHeader
:
true
,
},
// 待审核商家优惠劵(二级)
{
...
...
src/locales/zh-CN/menu.ts
View file @
2d1194fe
...
...
@@ -259,24 +259,24 @@ export default {
'menu.returnManage.orderDetail'
:
'查看订单'
,
// 营销能力
'menu.platformCouponManage'
:
'
商家
优惠劵管理'
,
'menu.platformCouponManage.query'
:
'
商家
优惠劵查询'
,
'menu.platformCouponManage.queryDetail'
:
'查看
商家
优惠劵'
,
'menu.platformCouponManage.unsubmitted'
:
'待提交审核
商家
优惠劵'
,
'menu.platformCouponManage.addCoupon'
:
'新增
商家
优惠券'
,
'menu.platformCouponManage.editCoupon'
:
'编辑
商家
优惠券'
,
'menu.platformCouponManage.notVerify1'
:
'待审核
商家
优惠劵(一级)'
,
'menu.platformCouponManage.notVerify1Detail'
:
'查看待审核
商家
优惠劵(一级)'
,
'menu.platformCouponManage.verify1'
:
'审核
商家
优惠劵(一级)'
,
'menu.platformCouponManage.notVerify2'
:
'待审核
商家
优惠劵(二级)'
,
'menu.platformCouponManage.notVerify2Detai'
:
'查看待审核
商家
优惠劵(二级)'
,
'menu.platformCouponManage.verify2'
:
'审核
商家
优惠劵(二级)'
,
'menu.platformCouponManage.toConfirm'
:
'待提交
商家
优惠劵'
,
'menu.platformCouponManage.toConfirmDetail'
:
'查看待提交
商家
优惠劵'
,
'menu.platformCouponManage.confirmVerify'
:
'提交
商家
优惠劵'
,
'menu.platformCouponManage.analysis'
:
'
商家
优惠劵执行'
,
'menu.platformCouponManage.analysisDetail'
:
'查看
商家
优惠劵执行'
,
'menu.platformCouponManage.analysisDeliver'
:
'
商家
优惠劵发券'
,
'menu.platformCouponManage'
:
'
平台
优惠劵管理'
,
'menu.platformCouponManage.query'
:
'
平台
优惠劵查询'
,
'menu.platformCouponManage.queryDetail'
:
'查看
平台
优惠劵'
,
'menu.platformCouponManage.unsubmitted'
:
'待提交审核
平台
优惠劵'
,
'menu.platformCouponManage.addCoupon'
:
'新增
平台
优惠券'
,
'menu.platformCouponManage.editCoupon'
:
'编辑
平台
优惠券'
,
'menu.platformCouponManage.notVerify1'
:
'待审核
平台
优惠劵(一级)'
,
'menu.platformCouponManage.notVerify1Detail'
:
'查看待审核
平台
优惠劵(一级)'
,
'menu.platformCouponManage.verify1'
:
'审核
平台
优惠劵(一级)'
,
'menu.platformCouponManage.notVerify2'
:
'待审核
平台
优惠劵(二级)'
,
'menu.platformCouponManage.notVerify2Detai'
:
'查看待审核
平台
优惠劵(二级)'
,
'menu.platformCouponManage.verify2'
:
'审核
平台
优惠劵(二级)'
,
'menu.platformCouponManage.toConfirm'
:
'待提交
平台
优惠劵'
,
'menu.platformCouponManage.toConfirmDetail'
:
'查看待提交
平台
优惠劵'
,
'menu.platformCouponManage.confirmVerify'
:
'提交
平台
优惠劵'
,
'menu.platformCouponManage.analysis'
:
'
平台
优惠劵执行'
,
'menu.platformCouponManage.analysisDetail'
:
'查看
平台
优惠劵执行'
,
'menu.platformCouponManage.analysisDeliver'
:
'
平台
优惠劵发券'
,
}
// export default utils.transformDataPre(data, 'menu')
src/pages/platformCouponManage/components/ApplicableGoods/index.tsx
View file @
2d1194fe
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-22 17:12:38
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
7-20 11:04:28
* @LastEditTime: 2021-0
8-13 15:44:43
* @Description: 适用商品
*/
import
React
from
'react'
;
...
...
@@ -70,7 +70,7 @@ const ApplicableGoods: React.FC<IProps> = (props) => {
},
{
title
:
'商品图片'
,
dataIndex
:
'
productImg
'
,
dataIndex
:
'
mainPic
'
,
align
:
'center'
,
render
:
(
text
)
=>
<
img
src=
{
text
}
className=
{
styles
[
'product-img'
]
}
/>
},
...
...
src/pages/platformCouponManage/platformCouponUnsubmitted/add.tsx
View file @
2d1194fe
...
...
@@ -3,7 +3,7 @@
* @Date: 2021-06-24 14:09:49
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-24 14:09:50
* @Description: 新增
商家
优惠券
* @Description: 新增
平台
优惠券
*/
import
React
from
'react'
;
import
CouponForm
from
'./components/CouponForm'
;
...
...
src/pages/platformCouponManage/platformCouponUnsubmitted/components/ApplicableGoodsFormItem/index.tsx
View file @
2d1194fe
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-07-19 14:19:31
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-
03 16:37:37
* @LastEditTime: 2021-08-
13 15:38:09
* @Description: 适用商品 Form Item
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -19,7 +19,6 @@ const ApplicableGoodsFormItem = (props) => {
mutators
,
editable
,
}
=
props
;
const
XComponentProps
=
props
.
props
[
'x-component-props'
]
||
{};
const
[
visibleGoodsDrawer
,
setVisibleGoodsDrawer
]
=
useState
(
false
);
...
...
@@ -99,10 +98,6 @@ const ApplicableGoodsFormItem = (props) => {
};
const
handleSelectGoods
=
()
=>
{
if
(
!
XComponentProps
.
shopIds
)
{
message
.
warning
(
'请先选择商城'
);
return
;
}
handleVisibleGoodsDrawer
(
true
);
};
...
...
@@ -133,7 +128,6 @@ const ApplicableGoodsFormItem = (props) => {
<
GoodsDrawer
visible=
{
visibleGoodsDrawer
}
shopIds=
{
XComponentProps
.
shopIds
}
onClose=
{
handleVisibleGoodsDrawer
}
checkeds=
{
value
}
onSubmit=
{
handleGoodsDrawerSubmit
}
...
...
src/pages/platformCouponManage/platformCouponUnsubmitted/components/CouponForm/effects/useBusinessEffects.ts
View file @
2d1194fe
...
...
@@ -255,14 +255,4 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
linkage
.
show
(
'invalidDay'
);
}
});
// 适用商城
onFieldValueChange$
(
'suitableMallTypes'
).
subscribe
(
state
=>
{
const
{
value
}
=
state
;
setFieldState
(
'goodsList'
,
fieldState
=>
{
FormPath
.
setIn
(
fieldState
,
'props.x-component-props'
,
Object
.
assign
({},
fieldState
.
props
[
'x-component-props'
],
{
shopIds
:
value
,
}));
});
});
}
\ No newline at end of file
src/pages/platformCouponManage/platformCouponUnsubmitted/components/CouponForm/index.tsx
View file @
2d1194fe
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 13:47:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-
03 16:04:57
* @LastEditTime: 2021-08-
13 15:14:24
* @Description: 新增/修改 优惠券表单
*/
import
React
,
{
useState
,
useMemo
,
useEffect
}
from
'react'
;
...
...
@@ -304,7 +304,7 @@ const CouponForm: React.FC<IProps> = (props) => {
content
:
'正在添加,请稍候...'
,
duration
:
0
,
});
PublicApi
.
postMarketingCouponWaitAuditAdd
(
payload
,
{
PublicApi
.
postMarketingCoupon
Platform
WaitAuditAdd
(
payload
,
{
timeout
:
0
,
}).
then
((
res
)
=>
{
if
(
res
.
code
!==
1000
)
{
...
...
@@ -324,7 +324,7 @@ const CouponForm: React.FC<IProps> = (props) => {
content
:
'正在修改,请稍候...'
,
duration
:
0
,
});
PublicApi
.
postMarketingCouponWaitAuditUpdate
({
PublicApi
.
postMarketingCoupon
Platform
WaitAuditUpdate
({
id
,
...
payload
,
},
{
...
...
@@ -355,7 +355,7 @@ const CouponForm: React.FC<IProps> = (props) => {
return
(
<
Spin
spinning=
{
infoLoading
}
>
<
AnchorPage
title=
"新增
商家
优惠券"
title=
"新增
平台
优惠券"
anchors=
{
anchorsArr
}
extra=
{
[
<
Button
...
...
src/pages/platformCouponManage/platformCouponUnsubmitted/components/GoodsDrawer/index.tsx
View file @
2d1194fe
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 16:11:55
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
7-30 10:10:15
* @LastEditTime: 2021-0
8-13 15:39:44
* @Description: 商品选择抽屉
*/
import
React
,
{
useEffect
}
from
'react'
;
...
...
@@ -77,10 +77,6 @@ interface IProps {
* 抽屉关闭事件
*/
onClose
:
()
=>
void
,
/**
* 商城id
*/
shopIds
:
number
[],
}
type
ExtraFetchType
=
FetchParamsType
&
{
...
...
@@ -104,7 +100,6 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
checkeds
,
onSubmit
,
onClose
,
shopIds
,
}
=
props
;
const
[
rowSelection
,
rowCtl
]
=
useRowSelectionTable
({
type
:
'checkbox'
,
customKey
:
'id'
});
...
...
@@ -116,12 +111,8 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
},
[
checkeds
]);
const
fetchData
=
async
(
params
:
ExtraFetchType
)
=>
{
if
(
!
shopIds
||
!
shopIds
.
length
)
{
return
{
data
:
[],
totalCount
:
0
};
}
const
res
=
await
PublicApi
.
postProductCommodityGetCommoditySkuListByShopId
({
const
res
=
await
PublicApi
.
postProductCommodityCommonGetCommodityListByPlatform
({
...
params
,
shopIdList
:
shopIds
,
},
{
ctlType
:
'none'
,
});
...
...
@@ -194,7 +185,7 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
// 获取品牌
const
fetchBrand
=
async
(
name
=
''
)
=>
{
const
res
=
await
PublicApi
.
getProductSelectGetSelectBrand
({
const
res
=
await
PublicApi
.
getProductSelectGetSelect
Platform
Brand
({
name
,
});
if
(
res
.
code
===
1000
)
{
...
...
@@ -205,7 +196,7 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
// 获取会员品类
const
fetchCustomerCategory
=
async
()
=>
{
const
res
=
await
PublicApi
.
getProduct
CustomerGetCustomer
CategoryTree
();
const
res
=
await
PublicApi
.
getProduct
PlatformGet
CategoryTree
();
if
(
res
.
code
===
1000
)
{
return
res
.
data
;
}
...
...
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