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
project
jinfa-admin
Commits
f6fb6bec
Commit
f6fb6bec
authored
Dec 01, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-system
into v2
parents
0bb4e16d
34a66518
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
21 deletions
+24
-21
index.tsx
...gManage/platformCoupon/components/DeliverCoupon/index.tsx
+2
-2
index.tsx
...ingManage/platformCoupon/components/RunningInfo/index.tsx
+9
-6
schema.tsx
...Coupon/platformCouponQuery/components/EditForm/schema.tsx
+1
-1
useBusinessEffects.ts
...itted/components/CouponForm/effects/useBusinessEffects.ts
+9
-9
schema.tsx
...latformCouponUnsubmitted/components/CouponForm/schema.tsx
+3
-3
No files found.
src/pages/marketingManage/platformCoupon/components/DeliverCoupon/index.tsx
View file @
f6fb6bec
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-29 09:36:25
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-1
1-15 18:12:20
* @LastEditTime: 2021-1
2-01 09:57:24
* @Description: 发券明细
*/
import
React
,
{
useState
,
useMemo
}
from
'react'
;
...
...
@@ -205,7 +205,7 @@ const DeliverCoupon: React.FC<IProps> = (props) => {
},
{
title
:
'适用用户'
,
dataIndex
:
'
memberAge
TypeName'
,
dataIndex
:
'
suitableMember
TypeName'
,
},
{
title
:
'会员类型'
,
...
...
src/pages/marketingManage/platformCoupon/components/RunningInfo/index.tsx
View file @
f6fb6bec
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-28 18:06:53
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-
12 14:25:22
* @LastEditTime: 2021-11-
30 19:46:56
* @Description: 执行明细
*/
import
React
,
{
useRef
,
}
from
'react'
;
...
...
@@ -178,19 +178,22 @@ const RunningInfo: React.FC<IProps> = (props) => {
},
{
title
:
'适用用户'
,
dataIndex
:
'
bransuitableMemberTypeNamed
'
,
dataIndex
:
'
suitableMemberTypeName
'
,
},
{
title
:
'领(发)放劵时间'
,
dataIndex
:
'createTimeStart'
,
dataIndex
:
'createTime'
,
render
:
(
text
)
=>
text
?
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
},
{
title
:
'劵有效期起始时间'
,
dataIndex
:
'effectiveTimeStart'
,
dataIndex
:
'validTimeStart'
,
render
:
(
text
)
=>
text
?
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
},
{
title
:
'券有效期截止时间'
,
dataIndex
:
'effectiveTimeEnd'
,
dataIndex
:
'validTimeEnd'
,
render
:
(
text
)
=>
text
?
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
},
{
title
:
'关联订单'
,
...
...
@@ -207,7 +210,7 @@ const RunningInfo: React.FC<IProps> = (props) => {
{
title
:
'订单金额'
,
dataIndex
:
'amount'
,
render
:
(
text
)
=>
`¥
${
text
||
''
}
`
,
render
:
(
text
)
=>
`¥
${
text
||
'
0
'
}
`
,
},
{
title
:
'订单状态'
,
...
...
src/pages/marketingManage/platformCoupon/platformCouponQuery/components/EditForm/schema.tsx
View file @
f6fb6bec
...
...
@@ -40,7 +40,7 @@ const schema: ISchema = {
},
disabledDate
:
(
current
)
=>
current
&&
current
<
moment
().
startOf
(
'day'
),
disabledTime
:
(
current
,
type
)
=>
{
if
(
type
===
'start'
&&
moment
().
isSame
(
current
,
'day'
))
{
if
(
(
type
===
'start'
||
type
||
'end'
)
&&
moment
().
isSame
(
current
,
'day'
))
{
return
{
disabledHours
:
()
=>
range
(
0
,
24
).
splice
(
0
,
moment
().
get
(
'hour'
)),
disabledMinutes
:
()
=>
range
(
0
,
60
).
splice
(
0
,
moment
().
get
(
'minute'
)),
...
...
src/pages/marketingManage/platformCoupon/platformCouponUnsubmitted/components/CouponForm/effects/useBusinessEffects.ts
View file @
f6fb6bec
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:04:16
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-
12 15:22:51
* @LastEditTime: 2021-11-
30 20:08:50
* @Description:
*/
import
{
FormEffectHooks
,
FormPath
,
IFormActions
}
from
'@formily/antd'
;
...
...
@@ -260,17 +260,17 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
// 领(发)券起始时间
onFieldValueChange$
(
'[releaseTimeStart, releaseTimeEnd]'
).
subscribe
(
state
=>
{
const
{
value
}
=
state
;
const
releaseTime
StartValue
=
value
?.[
0
];
const
releaseTime
EndValue
=
value
?.[
1
];
const
effectiveTime
=
getFieldValue
(
'[effectiveTimeStart, effectiveTimeEnd]'
);
// 券有效期
const
effectiveTimeStartValue
=
effectiveTime
?.[
0
];
if
(
releaseTime
Start
Value
releaseTime
End
Value
&&
effectiveTimeStartValue
&&
moment
(
releaseTime
Start
Value
)
>
moment
(
effectiveTimeStartValue
)
&&
moment
(
releaseTime
End
Value
)
>
moment
(
effectiveTimeStartValue
)
)
{
setFieldState
(
'[releaseTimeStart, releaseTimeEnd]'
,
fieldState
=>
{
FormPath
.
setIn
(
fieldState
,
'errors'
,
'领(发)券
起始
时间应该小于券有效期起始时间'
);
FormPath
.
setIn
(
fieldState
,
'errors'
,
'领(发)券
截止
时间应该小于券有效期起始时间'
);
});
}
else
{
actions
.
clearErrors
(
'[releaseTimeStart, releaseTimeEnd]'
);
...
...
@@ -282,15 +282,15 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
const
{
value
}
=
state
;
const
effectiveTimeStartValue
=
value
?.[
0
];
const
releaseTime
=
getFieldValue
(
'[releaseTimeStart, releaseTimeEnd]'
);
// 券有效期
const
releaseTime
StartValue
=
releaseTime
?.[
0
];
const
releaseTime
EndValue
=
releaseTime
?.[
1
];
if
(
effectiveTimeStartValue
&&
releaseTime
Start
Value
&&
moment
(
effectiveTimeStartValue
)
<
moment
(
releaseTime
Start
Value
)
&&
releaseTime
End
Value
&&
moment
(
effectiveTimeStartValue
)
<
moment
(
releaseTime
End
Value
)
)
{
setFieldState
(
'[effectiveTimeStart, effectiveTimeEnd]'
,
fieldState
=>
{
FormPath
.
setIn
(
fieldState
,
'errors'
,
'券有效期起始时间应该大于等于领(发)券
起始
时间'
);
FormPath
.
setIn
(
fieldState
,
'errors'
,
'券有效期起始时间应该大于等于领(发)券
截止
时间'
);
});
}
else
{
actions
.
clearErrors
(
'[effectiveTimeStart, effectiveTimeEnd]'
);
...
...
src/pages/marketingManage/platformCoupon/platformCouponUnsubmitted/components/CouponForm/schema.tsx
View file @
f6fb6bec
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:05:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-
15 14:22:39
* @LastEditTime: 2021-11-
30 20:14:44
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
...
...
@@ -106,7 +106,7 @@ const schema: ISchema = {
showTime
:
true
,
disabledDate
:
(
current
)
=>
current
&&
current
<
moment
().
startOf
(
'day'
),
disabledTime
:
(
current
,
type
)
=>
{
if
(
type
===
'start'
&&
moment
().
isSame
(
current
,
'day'
))
{
if
(
(
type
===
'start'
||
type
||
'end'
)
&&
moment
().
isSame
(
current
,
'day'
))
{
return
{
disabledHours
:
()
=>
range
(
0
,
24
).
splice
(
0
,
moment
().
get
(
'hour'
)),
disabledMinutes
:
()
=>
range
(
0
,
60
).
splice
(
0
,
moment
().
get
(
'minute'
)),
...
...
@@ -303,7 +303,7 @@ const schema: ISchema = {
showTime
:
true
,
disabledDate
:
(
current
)
=>
current
&&
current
<
moment
().
startOf
(
'day'
),
disabledTime
:
(
current
,
type
)
=>
{
if
(
type
===
'start'
&&
moment
().
isSame
(
current
,
'day'
))
{
if
(
(
type
===
'start'
||
type
||
'end'
)
&&
moment
().
isSame
(
current
,
'day'
))
{
return
{
disabledHours
:
()
=>
range
(
0
,
24
).
splice
(
0
,
moment
().
get
(
'hour'
)),
disabledMinutes
:
()
=>
range
(
0
,
60
).
splice
(
0
,
moment
().
get
(
'minute'
)),
...
...
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