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
c8d80a89
Commit
c8d80a89
authored
Jul 29, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
a1df5c2f
de9187bf
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
241 additions
and
111 deletions
+241
-111
paltformSignRoute.ts
config/routes/marketingRoute/paltformSignRoute.ts
+0
-0
NormalTable.tsx
src/components/PolymericTable/NormalTable.tsx
+3
-2
marketing.ts
src/constants/marketing.ts
+20
-0
Roles.tsx
src/layouts/components/Roles.tsx
+1
-0
index.tsx
src/pages/handling/assign/create/index.tsx
+4
-1
basicInfo.tsx
src/pages/member/memberQuery/detailed/basicInfo.tsx
+3
-3
index.tsx
src/pages/member/memberQuery/detailed/index.tsx
+10
-10
inquiryProduct.tsx
...oductInquiry/waitAddInquiry/components/inquiryProduct.tsx
+1
-3
index.tsx
...ility/merchantCoupon/components/ApplicableGoods/index.tsx
+3
-1
index.tsx
...Ability/merchantCoupon/components/DeliverCoupon/index.tsx
+0
-0
schema.tsx
...bility/merchantCoupon/components/DeliverCoupon/schema.tsx
+36
-19
index.tsx
...y/merchantCoupon/merchantCouponAnalysis/deliver/index.tsx
+55
-7
index.tsx
...nUnsubmitted/components/ApplicableGoodsFormItem/index.tsx
+4
-2
index.tsx
...CouponUnsubmitted/components/CouponForm/effects/index.tsx
+35
-4
useBusinessEffects.ts
...itted/components/CouponForm/effects/useBusinessEffects.ts
+8
-6
schema.tsx
...erchantCouponUnsubmitted/components/CouponForm/schema.tsx
+2
-23
index.tsx
...erchantCouponUnsubmitted/components/GoodsDrawer/index.tsx
+9
-4
schema.tsx
...rchantCouponUnsubmitted/components/GoodsDrawer/schema.tsx
+6
-5
utils.ts
...ages/transaction/marketingAbility/merchantCoupon/utils.ts
+4
-1
index.tsx
...ransaction/marketingAbility/paltformSign/detail/index.tsx
+24
-11
index.tsx
...ransaction/marketingAbility/paltformSign/search/index.tsx
+1
-1
material.tsx
...bility/demandPlan/demandPlanAdded/components/material.tsx
+1
-0
demand.tsx
...eAbility/purchaseInquiry/addInquiry/components/demand.tsx
+7
-5
selectMenber.tsx
...Ability/purchaseInquiry/addInquiry/modal/selectMenber.tsx
+4
-3
No files found.
config/routes/marketingRoute/paltformSignRoute.ts
View file @
c8d80a89
src/components/PolymericTable/NormalTable.tsx
View file @
c8d80a89
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-08-20 16:15:59
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-
16 11:45:36
* @LastEditTime: 2021-07-
28 17:39:18
* @Description: 可以带查询的表格,内置 formily,如果需要其他Form可以传入 customRenderSearchForm 配合 reload() 实现查询
*/
import
React
,
{
useState
,
useEffect
,
useRef
,
useImperativeHandle
}
from
'react'
;
...
...
@@ -90,6 +90,7 @@ const NormalTable: React.ForwardRefRenderFunction<NormalTableRefHandleType, Norm
return
{
...
prevState
,
data
:
props
.
dataSource
as
T
[],
totalCount
:
props
.
dataSource
.
length
,
}
});
}
...
...
@@ -141,7 +142,7 @@ const NormalTable: React.ForwardRefRenderFunction<NormalTableRefHandleType, Norm
reload
,
}));
const
totalCount
=
tableData
.
totalCount
||
pagination
?.
total
||
0
;
const
totalCount
=
pagination
?.
total
||
tableData
.
totalCount
||
0
;
const
paginationProps
:
PaginationProps
=
pagination
?
{
current
:
current
,
...
...
src/constants/marketing.ts
View file @
c8d80a89
...
...
@@ -47,3 +47,22 @@ export const MERCHANT_COUPON_RECEIVE_ACTIVITY = 3;
* 会员运营用券
*/
export
const
MERCHANT_COUPON_RECEIVE_OPERATE
=
4
;
/* --------------------------------- 商家优惠券适用用户 -------------------------------- */
/**
* 新用户(不包含会员)
*/
export
const
SUITABLE_TYPE_NEW_USER
=
1
;
/**
* 老用户(不包含会员)
*/
export
const
SUITABLE_TYPE_OLD_USER
=
2
;
/**
* 新会员(仅会员用户)
*/
export
const
SUITABLE_TYPE_NEW_MEMBER
=
3
;
/**
* 老会员(仅会员用户)
*/
export
const
SUITABLE_TYPE_OLD_MEMBER
=
4
;
\ No newline at end of file
src/layouts/components/Roles.tsx
View file @
c8d80a89
...
...
@@ -24,6 +24,7 @@ const Roles: React.FC = () => {
},
[]);
const
handleSelect
=
(
item
:
MemberRole
)
=>
{
console
.
log
(
item
)
const
{
memberRoleId
}
=
item
;
if
(
memberRoleId
===
curRole
.
memberRoleId
)
{
return
;
...
...
src/pages/handling/assign/create/index.tsx
View file @
c8d80a89
...
...
@@ -283,6 +283,7 @@ const Create = () => {
},
[])
const
handleBeforeProductChecked
=
useCallback
(
async
(
record
:
GetProductCommodityCommonGetCommodityListByBuyerResponseDetail
,
selected
:
boolean
,
list
:
GetProductCommodityCommonGetCommodityListByBuyerResponseDetail
[])
=>
{
if
(
selected
)
{
const
postData
=
list
.
map
((
item
)
=>
{
return
{
/** * 这里指的是skuid, 而接口getProductCommodityCommonGetCommodityListByBuyer 的主键id 就是skuid, 不是(commodityId)*/
...
...
@@ -296,6 +297,8 @@ const Create = () => {
})
const
{
flag
}
=
await
checkProcessEnum
(
postData
);
return
flag
;
}
return
true
},
[])
/** @review 总感觉这个接口有大问题,能力中心没办法拿到shopId,不知道这个shopId 的意义在哪里 */
...
...
@@ -982,7 +985,7 @@ const Create = () => {
}
}
components=
{
{
Cascader
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
name
'
,
FORM_FILTER_PATH
);
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
orderNo
'
,
FORM_FILTER_PATH
);
}
}
mode=
{
"checkbox"
}
beforeChecked=
{
handleBeforeOrderChecked
}
...
...
src/pages/member/memberQuery/detailed/basicInfo.tsx
View file @
c8d80a89
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:35
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-
19 10:06:58
* @LastEditTime: 2021-07-
28 10:02:03
* @Description: 会员基础信息详情
*/
import
React
from
'react'
;
...
...
@@ -70,7 +70,7 @@ const MemberBasicInfo: React.FC<MemberBasicInfoProps> = ({
{
/* 渠道信息 */
}
{
/* 平台录入的会员不需要填渠道信息的 */
}
{
/* {
{
memberInfo
?.
memberTypeEnum
===
MEMBER_TYPE_CHANNEL_CORPORATE
||
memberInfo
?.
memberTypeEnum
===
MEMBER_TYPE_CHANNEL_INDIVIDUAL
?
(
...
...
@@ -87,7 +87,7 @@ const MemberBasicInfo: React.FC<MemberBasicInfoProps> = ({
</
Col
>
)
:
null
}
*/
}
}
{
/* 其他注册信息 */
}
{
...
...
src/pages/member/memberQuery/detailed/index.tsx
View file @
c8d80a89
...
...
@@ -112,16 +112,16 @@ const MemberQueryDetailed: React.FC<QueryProps> = props => {
key
:
'basicInfo'
,
name
:
'基本信息'
,
},
//
//
平台录入的会员不需要填渠道信息的
//
(
//
memberInfo?.memberTypeEnum === MEMBER_TYPE_CHANNEL_CORPORATE
//
|| memberInfo?.memberTypeEnum === MEMBER_TYPE_CHANNEL_INDIVIDUAL
//
? {
//
key: 'channelInfo',
//
name: '渠道信息',
//
}
//
: null
//
),
// 平台录入的会员不需要填渠道信息的
(
memberInfo
?.
memberTypeEnum
===
MEMBER_TYPE_CHANNEL_CORPORATE
||
memberInfo
?.
memberTypeEnum
===
MEMBER_TYPE_CHANNEL_INDIVIDUAL
?
{
key
:
'channelInfo'
,
name
:
'渠道信息'
,
}
:
null
),
...(
memberInfo
&&
memberInfo
.
groups
?
memberInfo
.
groups
.
map
((
item
,
index
)
=>
({
...
...
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/components/inquiryProduct.tsx
View file @
c8d80a89
...
...
@@ -228,9 +228,7 @@ const InquiryProductLayout: React.FC<InquiryProductLayoutProps> = (props: any) =
rowKey=
"productId"
columns=
{
columns
}
dataSource=
{
dataSource
}
pagination=
{
{
size
:
'small'
}
}
pagination=
{
false
}
/>
</
Form
.
Item
>
<
TableModal
...
...
src/pages/transaction/marketingAbility/merchantCoupon/components/ApplicableGoods/index.tsx
View file @
c8d80a89
...
...
@@ -96,7 +96,9 @@ const ApplicableGoods: React.FC<IProps> = (props) => {
dataIndex
:
'unitPrice'
,
render
:
(
text
)
=>
{
const
unitPrice
=
normalizeUnitPrice
(
text
);
return
`¥
${
unitPrice
[
0
]?.
price
}
~
$
{
unitPrice
[
unitPrice
.
length
-
1
]?.
price
}
`;
const
start
=
unitPrice
[
0
]?.
price
;
const
end
=
unitPrice
[
unitPrice
.
length
-
1
].
price
;
return
start
!==
end
?
`¥
${
start
}
~
${
end
}
`
:
`¥
${
start
}
`
;
},
},
];
...
...
src/pages/transaction/marketingAbility/merchantCoupon/components/DeliverCoupon/index.tsx
View file @
c8d80a89
This diff is collapsed.
Click to expand it.
src/pages/transaction/marketingAbility/merchantCoupon/components/DeliverCoupon/schema.tsx
View file @
c8d80a89
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-29 09:36:35
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
6-29 10:18:11
* @LastEditTime: 2021-0
7-28 17:49:07
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
...
...
@@ -31,7 +31,7 @@ export const querySchema: ISchema = {
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
tip
:
'输入
优惠劵
名称 进行搜索'
,
tip
:
'输入
会员
名称 进行搜索'
,
},
},
},
...
...
@@ -45,33 +45,48 @@ export const querySchema: ISchema = {
},
},
properties
:
{
i
d
:
{
memberI
d
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'
优惠劵
ID'
,
placeholder
:
'
会员
ID'
,
allowClear
:
true
,
style
:
{
width
:
160
,
},
},
memberType
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'会员类型(所有)'
,
allowClear
:
true
,
},
},
'[startTime2, endTime2]'
:
{
type
:
'object'
,
'x-component'
:
'RangePicker'
,
level
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
[
'劵有效期起始时间'
,
'劵有效期截止时间'
]
,
showTime
:
true
,
placeholder
:
'会员等级(所有)'
,
allowClear
:
true
,
},
},
t
ype
:
{
suitableMemberT
ype
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'
优惠劵类型
(所有)'
,
placeholder
:
'
适用用户
(所有)'
,
allowClear
:
true
,
},
},
'[startTime2, endTime2]'
:
{
type
:
'string'
,
'x-component'
:
'RangePicker'
,
'x-component-props'
:
{
placeholder
:
[
'成为会员起始时间'
,
'成为会员截止时间'
],
showTime
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
...
...
@@ -105,17 +120,19 @@ export const drawerSchema: ISchema = {
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
4
,
},
properties
:
{
i
d
:
{
memberI
d
:
{
type
:
'string'
,
'x-component'
:
'NumberPicker'
,
'x-component-props'
:
{
placeholder
:
'会员ID'
,
allowClear
:
true
,
},
},
memberType
:
{
memberType
Enum
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
...
...
@@ -124,7 +141,7 @@ export const drawerSchema: ISchema = {
allowClear
:
true
,
},
},
memberL
evel
:
{
l
evel
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
...
...
@@ -133,7 +150,7 @@ export const drawerSchema: ISchema = {
allowClear
:
true
,
},
},
applicabl
e
:
{
suitableMemberTyp
e
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
...
...
@@ -142,7 +159,7 @@ export const drawerSchema: ISchema = {
allowClear
:
true
,
},
},
'[
startTime2, endTime2
]'
:
{
'[
becomeTimeStart, becomeTimeEnd
]'
:
{
type
:
'string'
,
'x-component'
:
'RangePicker'
,
'x-component-props'
:
{
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponAnalysis/deliver/index.tsx
View file @
c8d80a89
...
...
@@ -2,15 +2,21 @@
* @Author: XieZhiXiong
* @Date: 2021-06-28 17:51:33
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-
06 14:07:32
* @Description:
* @LastEditTime: 2021-07-
28 17:33:55
* @Description:
商家优惠劵发劵
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Row
,
Col
,
Spin
,
Button
,
message
,
}
from
'antd'
;
import
{
SendOutlined
,
}
from
'@ant-design/icons'
;
import
{
history
}
from
'umi'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetMarketingCouponWaiteExecuteGetResponse
}
from
'@/services/MarketingApi'
;
...
...
@@ -19,18 +25,21 @@ import AnchorPage from '@/layouts/AnchorPage';
import
AuditProcess
from
'@/components/AuditProcess'
;
import
BacisInfo
from
'../../components/BacisInfo'
;
import
CouponRules
from
'../../components/CouponRules'
;
import
DeliverCoupon
from
'../../components/DeliverCoupon'
;
import
DeliverCoupon
,
{
SuitableMemberType
}
from
'../../components/DeliverCoupon'
;
const
MerchantCouponAnalysisDeliver
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
id
}
=
usePageStatus
();
const
[
couponInfo
,
setCouponInfo
]
=
useState
<
GetMarketingCouponWaiteExecuteGetResponse
>
(
null
);
const
[
infoLoading
,
setInfoLoaading
]
=
useState
(
false
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
deliverRef
=
useRef
<
SuitableMemberType
[]
>
([]);
const
getBasicInfo
=
()
=>
{
if
(
!
id
)
{
return
;
}
setInfoLoa
a
ding
(
true
);
setInfoLoading
(
true
);
PublicApi
.
getMarketingCouponWaiteExecuteGet
({
id
,
}).
then
(
res
=>
{
...
...
@@ -38,7 +47,7 @@ const MerchantCouponAnalysisDeliver: React.FC<{}> = () => {
setCouponInfo
(
res
.
data
);
}
}).
finally
(()
=>
{
setInfoLoa
a
ding
(
false
);
setInfoLoading
(
false
);
});
};
...
...
@@ -46,6 +55,34 @@ const MerchantCouponAnalysisDeliver: React.FC<{}> = () => {
getBasicInfo
();
},
[]);
const
handleDeliverChange
=
(
value
:
SuitableMemberType
[])
=>
{
deliverRef
.
current
=
value
;
};
const
handleSubmit
=
()
=>
{
if
(
!
id
)
{
return
;
}
if
(
!
deliverRef
.
current
.
length
)
{
message
.
warning
(
'未选择任何会员'
);
return
;
}
setSubmitLoading
(
true
);
PublicApi
.
postMarketingCouponWaiteExecuteGrant
({
id
:
+
id
,
grantMembers
:
deliverRef
.
current
.
map
((
item
)
=>
({
subMemberId
:
item
.
memberId
,
subRoleId
:
item
.
roleId
})),
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
};
const
anchorsArr
=
[
{
key
:
'verifySteps'
,
...
...
@@ -70,6 +107,16 @@ const MerchantCouponAnalysisDeliver: React.FC<{}> = () => {
<
AnchorPage
title=
{
couponInfo
?.
name
}
anchors=
{
anchorsArr
}
extra=
{
(
<
Button
type=
"primary"
icon=
{
<
SendOutlined
style=
{
{
transform
:
`rotate(-45deg)`
,
position
:
'relative'
,
top
:
-
2
}
}
/>
}
onClick=
{
handleSubmit
}
loading=
{
submitLoading
}
>
提交
</
Button
>
)
}
>
<
Row
gutter=
{
[
16
,
16
]
}
>
{
/* 流转记录 */
}
...
...
@@ -121,6 +168,7 @@ const MerchantCouponAnalysisDeliver: React.FC<{}> = () => {
{
/* 优惠券规则 */
}
<
Col
span=
{
24
}
>
<
DeliverCoupon
onChange=
{
handleDeliverChange
}
id=
"deliverCoupon"
/>
</
Col
>
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/ApplicableGoodsFormItem/index.tsx
View file @
c8d80a89
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-07-19 14:19:31
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-
19 18:18:38
* @LastEditTime: 2021-07-
28 11:01:30
* @Description: 适用商品 Form Item
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -70,7 +70,9 @@ const ApplicableGoodsFormItem = (props) => {
align
:
'center'
,
render
:
(
text
)
=>
{
const
unitPrice
=
normalizeUnitPrice
(
text
);
return
`¥
${
unitPrice
[
0
]?.
price
}
~
$
{
unitPrice
[
unitPrice
.
length
-
1
]?.
price
}
`;
const
start
=
unitPrice
[
0
]?.
price
;
const
end
=
unitPrice
[
unitPrice
.
length
-
1
].
price
;
return
start
!==
end
?
`¥
${
start
}
~
${
end
}
`
:
`¥
${
start
}
`
;
},
},
(
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/CouponForm/effects/index.tsx
View file @
c8d80a89
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:03:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-
08 16:35:58
* @LastEditTime: 2021-07-
28 14:58:01
* @Description:
*/
import
{
FormPath
,
FormEffectHooks
}
from
'@formily/antd'
;
...
...
@@ -25,7 +25,10 @@ const fetchCouponTypes = async () => {
type
:
data
.
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
value
})),
};
}
return
{};
return
{
data
:
[],
totalCount
:
0
,
};
};
// 初始化 领券方式
...
...
@@ -38,7 +41,10 @@ const fetchCouponGetWay = async () => {
getWay
:
data
.
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
value
})),
};
}
return
{};
return
{
data
:
[],
totalCount
:
0
,
};
};
// 初始化 适用用户角色
...
...
@@ -60,7 +66,26 @@ const fetchApplicationUserRole = async () => {
applicationUserRole
:
options
,
};
}
return
{};
return
{
data
:
[],
totalCount
:
0
,
};
};
// 初始化 适用用户
const
fetchSuitableUser
=
async
()
=>
{
const
res
=
await
PublicApi
.
getMarketingCouponSuitableMemberTypeList
();
if
(
res
.
code
===
1000
)
{
const
{
data
=
[]
}
=
res
;
return
{
suitableMemberTypes
:
data
.
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
value
})),
};
}
return
{
data
:
[],
totalCount
:
0
,
};
};
// 获取 实用会员选项
...
...
@@ -80,6 +105,10 @@ const fetchMemberOtions: (params: { current: string, pageSize: string, levelConf
totalCount
:
res
.
data
.
totalCount
,
};
}
return
{
data
:
[],
totalCount
:
0
,
};
};
export
const
createEffects
=
(
context
,
actions
)
=>
{
...
...
@@ -93,6 +122,8 @@ export const createEffects = (context, actions) => {
useAsyncInitSelect
([
'applicationUserRole'
],
fetchApplicationUserRole
);
useAsyncInitSelect
([
'suitableMemberTypes'
],
fetchSuitableUser
);
// 初始化 品牌数据
onFieldMount$
(
'applicableBrands'
).
subscribe
(()
=>
{
PublicApi
.
getProductSelectGetSelectBrand
().
then
((
res
)
=>
{
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/CouponForm/effects/useBusinessEffects.ts
View file @
c8d80a89
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:04:16
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-2
3 17:36:48
* @LastEditTime: 2021-07-2
8 14:33:19
* @Description:
*/
import
{
FormEffectHooks
,
FormPath
,
IFormActions
}
from
'@formily/antd'
;
...
...
@@ -16,6 +16,10 @@ import {
MERCHANT_COUPON_RECEIVE_DESIGNATED
,
MERCHANT_COUPON_RECEIVE_ACTIVITY
,
MERCHANT_COUPON_RECEIVE_OPERATE
,
SUITABLE_TYPE_NEW_USER
,
SUITABLE_TYPE_OLD_USER
,
SUITABLE_TYPE_NEW_MEMBER
,
SUITABLE_TYPE_OLD_MEMBER
,
}
from
'@/constants/marketing'
;
const
{
...
...
@@ -31,8 +35,6 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
// 优惠券类型
onFieldInputChange$
(
'type'
).
subscribe
(
state
=>
{
const
{
value
}
=
state
;
const
denominationValue
=
getFieldValue
(
'denomination'
);
// 券面额
const
useConditionMoneyValue
=
getFieldValue
(
'useConditionMoney'
);
// 使用条件
// 0元抵扣券
if
(
value
===
MERCHANT_COUPON_TYPE_VOUCHER
)
{
...
...
@@ -192,8 +194,8 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
value
===
MERCHANT_COUPON_RECEIVE_DESIGNATED
||
value
===
MERCHANT_COUPON_RECEIVE_OPERATE
)
&&
(
newItem
.
value
===
1
||
newItem
.
value
===
2
newItem
.
value
===
SUITABLE_TYPE_NEW_USER
||
newItem
.
value
===
SUITABLE_TYPE_OLD_USER
)
)
{
newItem
.
disabled
=
true
;
...
...
@@ -233,7 +235,7 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
const
{
value
}
=
state
;
// 包含新会员(仅会员用户) 或者 老会员(仅会员用户),展示 适用用户角色 与 会员等级列表
if
(
value
&&
(
value
.
includes
(
3
)
||
value
.
includes
(
4
)))
{
if
(
value
&&
(
value
.
includes
(
SUITABLE_TYPE_NEW_MEMBER
)
||
value
.
includes
(
SUITABLE_TYPE_OLD_MEMBER
)))
{
linkage
.
show
(
'*(applicationUserRole,applicationMemberLevel)'
);
}
else
{
linkage
.
hide
(
'*(applicationUserRole,applicationMemberLevel)'
);
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/CouponForm/schema.tsx
View file @
c8d80a89
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:05:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-
19 17:20:56
* @LastEditTime: 2021-07-
28 14:38:37
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
...
...
@@ -441,28 +441,7 @@ const schema: ISchema = {
suitableMemberTypes
:
{
title
:
'适用用户'
,
type
:
'string'
,
enum
:
[
{
label
:
'新用户(不包含会员)'
,
value
:
1
,
disabled
:
false
,
},
{
label
:
'老用户(不包含会员)'
,
value
:
2
,
disabled
:
false
,
},
{
label
:
'新会员(仅会员用户)'
,
value
:
3
,
disabled
:
false
,
},
{
label
:
'老会员(仅会员用户)'
,
value
:
4
,
disabled
:
false
,
},
],
enum
:
[],
default
:
[],
required
:
true
,
'x-component'
:
'TofuCheckGroup'
,
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/GoodsDrawer/index.tsx
View file @
c8d80a89
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 16:11:55
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-2
0 10:29:12
* @LastEditTime: 2021-07-2
8 14:13:43
* @Description: 商品选择抽屉
*/
import
React
,
{
useEffect
}
from
'react'
;
...
...
@@ -101,13 +101,16 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
},
[
checkeds
]);
const
fetchData
=
async
(
params
:
ExtraFetchType
)
=>
{
le
t
res
=
await
PublicApi
.
getProductCommodityGetCommoditySkuListByShopId
({
cons
t
res
=
await
PublicApi
.
getProductCommodityGetCommoditySkuListByShopId
({
...
params
,
current
:
`
${
params
.
current
}
`
,
pageSize
:
`
${
params
.
pageSize
}
`
,
shopId
:
`
${
shopIds
[
0
]
||
''
}
`
,
});
if
(
res
.
code
===
1000
)
{
return
res
.
data
;
}
return
{
data
:
[],
totalCount
:
0
};
};
const
handleClose
=
()
=>
{
...
...
@@ -150,11 +153,13 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
},
{
title
:
'商品价格'
,
dataIndex
:
'
p
rice'
,
dataIndex
:
'
unitP
rice'
,
align
:
'center'
,
render
:
(
text
)
=>
{
const
unitPrice
=
normalizeUnitPrice
(
text
);
return
`¥
${
unitPrice
[
0
]?.
price
}
~
$
{
unitPrice
[
unitPrice
.
length
-
1
]?.
price
}
`;
const
start
=
unitPrice
[
0
]?.
price
;
const
end
=
unitPrice
[
unitPrice
.
length
-
1
].
price
;
return
start
!==
end
?
`¥
${
start
}
~
${
end
}
`
:
`¥
${
start
}
`
;
},
},
];
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/GoodsDrawer/schema.tsx
View file @
c8d80a89
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 16:19:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
6-24 16:19:18
* @LastEditTime: 2021-0
7-28 10:54:23
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
...
...
@@ -26,11 +26,12 @@ export const querySchema: ISchema = {
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'
flex
-layout'
,
'x-component'
:
'
mega
-layout'
,
'x-component-props'
:
{
colStyle
:
{
marginLeft
:
20
,
},
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
6
,
},
properties
:
{
category
:
{
...
...
src/pages/transaction/marketingAbility/merchantCoupon/utils.ts
View file @
c8d80a89
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-07-20 10:10:55
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-2
3 15:00:55
* @LastEditTime: 2021-07-2
8 16:48:48
* @Description:
*/
import
{
OptionItemType
}
from
'../components/ApplicableList'
;
...
...
@@ -69,6 +69,9 @@ export type BrandItemType = {
}
export
function
normalizeUnitPrice
(
unitPrice
:
UnitPriceType
):
UnitPriceType
[]
{
if
(
!
unitPrice
)
{
return
;
}
const
ret
=
[];
const
objKeys
=
Object
.
keys
(
unitPrice
).
sort
((
a
,
b
)
=>
parseFloat
(
a
)
-
parseFloat
(
b
));
...
...
src/pages/transaction/marketingAbility/paltformSign/detail/index.tsx
View file @
c8d80a89
import
React
,
{
Fragment
,
useState
}
from
'react'
;
import
React
,
{
Fragment
,
use
Callback
,
use
State
}
from
'react'
;
import
{
Space
,
Tooltip
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
Context
}
from
'@/pages/transaction/components/detailLayout/components/context'
;
import
PeripheralLayout
from
'@/pages/transaction/components/detailLayout'
;
import
{
_data
}
from
'./data'
;
...
...
@@ -16,6 +17,7 @@ import DemandLayout from '../../components/demandLayout';
import
ListLayout
from
'@/pages/transaction/components/detailLayout/components/listLayout'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
TABLINK
=
[
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
...
...
@@ -28,6 +30,9 @@ const TABLINK = [
]
const
DetialLayout
=
()
=>
{
const
{
query
:
{
activityId
},
pathname
}
=
history
.
location
;
const
[
path
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
]);
const
[
pathPci
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
2
]);
const
format
=
(
text
,
fmt
?:
string
)
=>
{
return
<>
{
moment
(
text
).
format
(
fmt
||
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
...
...
@@ -40,24 +45,23 @@ const DetialLayout = () => {
setBasicEffect
([
{
col
:
[
{
label
:
'活动ID'
,
extra
:
data
.
activityI
d
},
{
label
:
'活动ID'
,
extra
:
data
.
i
d
},
{
label
:
'活动名称'
,
extra
:
data
.
activityName
},
{
label
:
'外部状态'
,
extra
:
data
.
externalState
Name
},
{
label
:
'内部状态'
,
extra
:
data
.
in
teriorState
Name
},
{
label
:
'外部状态'
,
extra
:
data
.
outerStatus
Name
},
{
label
:
'内部状态'
,
extra
:
data
.
in
nerStatus
Name
},
]
},
{
col
:
[
{
label
:
'活动类型'
,
extra
:
ACTIVITYTYPENAME
[
data
.
activityType
]
},
{
label
:
'
下单模式'
,
extra
:
data
.
orderModal
},
{
label
:
'活动开始时间'
,
extra
:
format
(
data
.
activityS
tartTime
)
},
{
label
:
'活动结束时间'
,
extra
:
format
(
data
.
activityE
ndTime
)
},
{
label
:
'活动类型'
,
extra
:
data
.
activityTypeName
},
{
label
:
'
活动参与类型'
,
extra
:
data
.
activitySignUpTypeName
},
{
label
:
'活动开始时间'
,
extra
:
format
(
data
.
s
tartTime
)
},
{
label
:
'活动结束时间'
,
extra
:
format
(
data
.
e
ndTime
)
},
]
},
{
col
:
[
{
label
:
'会员名称'
,
extra
:
data
.
membersName
},
{
label
:
'创建时间'
,
extra
:
format
(
data
.
creationTime
)
},
{
label
:
'要求报名时间'
,
extra
:
<>
{
format
(
data
.
signUpStartTime
)
}
~
{
format
(
data
.
signUpEndTime
)
}
</>
},
]
},
])
...
...
@@ -161,8 +165,17 @@ const DetialLayout = () => {
},
]
const
fetchDataSource
=
useCallback
(
async
()
=>
{
await
PublicApi
.
getMarketingPlatformActivitySignupDetail
({
activityId
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
handleBasicEffect
(
res
.
data
)
}).
catch
(()
=>
{})
},
[])
useEffect
(()
=>
{
handleBasicEffect
(
_data
);
fetchDataSource
(
);
handleGeneralEffect
(
_data
);
},
[])
...
...
src/pages/transaction/marketingAbility/paltformSign/search/index.tsx
View file @
c8d80a89
...
...
@@ -21,7 +21,7 @@ const Search = () => {
title
:
'活动名称'
,
key
:
'activityName'
,
dataIndex
:
'activityName'
,
render
:
(
text
)
=>
<
EyePreview
>
{
text
}
</
EyePreview
>
render
:
(
text
,
record
)
=>
<
EyePreview
url=
{
`/memberCenter/marketingAbility/paltformSign/search/detail?activityId=${record.activityId}`
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'活动类型'
,
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/components/material.tsx
View file @
c8d80a89
...
...
@@ -260,6 +260,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
rowKey=
"id"
columns=
{
columns
}
dataSource=
{
dataSource
}
pagination=
{
false
}
/>
{
/* 选择货品 */
}
<
SelectProduct
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/components/demand.tsx
View file @
c8d80a89
...
...
@@ -166,22 +166,23 @@ const Demand: React.FC<Iprops> = (props: any) => {
/** 获取会员列表 */
const
handleMenberList
=
(
e
:
any
)
=>
{
const
RowCtl
=
e
.
selectRow
;
console
.
log
(
e
)
if
(
RowCtl
.
length
>
0
)
{
setMenberVidible
(
false
)
const
data
:
any
=
[]
RowCtl
.
forEach
(
item
=>
{
data
.
push
({
id
:
item
.
id
,
isSubMember
:
1
,
isSubMember
:
item
.
isSubMember
||
1
,
memberId
:
item
.
memberId
,
memberName
:
item
.
name
,
memberName
:
item
.
name
||
item
.
memberName
,
memberTypeName
:
item
.
memberTypeName
,
roleId
:
item
.
roleId
,
roleName
:
item
.
roleName
,
levelTag
:
item
.
levelTag
,
membershipOrNot
:
1
,
state
:
1
,
type
:
2
,
membershipOrNot
:
item
.
membershipOrNot
||
1
,
state
:
item
.
state
||
1
,
type
:
item
.
type
||
2
,
})
})
form
.
setFieldsValue
({
"rowCol"
:
data
})
...
...
@@ -313,6 +314,7 @@ const Demand: React.FC<Iprops> = (props: any) => {
<
Table
columns=
{
columns
}
dataSource=
{
rowCtl
}
pagination=
{
false
}
/>
</
Form
.
Item
>
)
}
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/modal/selectMenber.tsx
View file @
c8d80a89
...
...
@@ -24,7 +24,7 @@ interface Iprops {
const
SelectMenber
:
React
.
FC
<
Iprops
>
=
(
props
:
any
)
=>
{
const
ref
=
useRef
({});
const
{
visible
,
onclose
,
confirm
,
rowCtl
}
=
props
;
const
[
rowSelection
,
RowCtl
]
=
useRowSelectionTable
({
customKey
:
'
i
d'
});
const
[
rowSelection
,
RowCtl
]
=
useRowSelectionTable
({
customKey
:
'
memberI
d'
});
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'会员ID'
,
...
...
@@ -65,8 +65,9 @@ const SelectMenber: React.FC<Iprops> = (props: any) => {
useEffect
(()
=>
{
if
(
rowCtl
)
{
console
.
log
(
rowCtl
)
RowCtl
.
setSelectRow
(
rowCtl
)
RowCtl
.
setSelectedRowKeys
(
rowCtl
.
map
(
v
=>
v
.
i
d
))
RowCtl
.
setSelectedRowKeys
(
rowCtl
.
map
(
v
=>
v
.
memberI
d
))
}
},
[
visible
])
...
...
@@ -94,7 +95,7 @@ const SelectMenber: React.FC<Iprops> = (props: any) => {
<
StandardTable
currentRef=
{
ref
}
columns=
{
columns
}
tableProps=
{
{
rowKe
w
:
'i
d'
}
}
tableProps=
{
{
rowKe
y
:
'memberI
d'
}
}
rowSelection=
{
rowSelection
}
fetchTableData=
{
(
params
)
=>
fetchGoodsData
(
params
)
}
formilyProps=
{
...
...
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