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
5087397f
Commit
5087397f
authored
Jan 26, 2022
by
Bill
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
115f576e
58ce212d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
26 deletions
+43
-26
index.tsx
src/components/RangeTime/index.tsx
+25
-11
merchantCoupon.ts
src/locales/en-US/marketingAbility/merchantCoupon.ts
+1
-1
merchantCoupon.ts
src/locales/ko-KR/marketingAbility/merchantCoupon.ts
+1
-1
merchantCoupon.ts
src/locales/zh-CN/marketingAbility/merchantCoupon.ts
+1
-1
channelSchema.tsx
src/pages/commodity/products/schema/channelSchema.tsx
+10
-8
FormList.tsx
src/pages/contract/manage/add/components/FormList.tsx
+1
-1
index.tsx
...bility/merchantCoupon/merchantCouponUnsubmitted/index.tsx
+4
-3
No files found.
src/components/RangeTime/index.tsx
View file @
5087397f
...
...
@@ -37,7 +37,6 @@ interface Iprops {
const
RangeTime
:
React
.
FC
<
Iprops
>
=
(
props
:
Iprops
)
=>
{
const
{
containerStyle
,
rangeTime
,
onChange
,
placeholader
,
shouldGtCurrent
,
disabled
,
showTime
}
=
props
;
const
currentDay
=
moment
();
const
endOfUnit
=
showTime
?
'second'
:
'day'
;
const
[
innerRangeTime
,
setInnerRangeTime
]
=
useState
({
startTime
:
null
,
...
...
@@ -53,11 +52,24 @@ const RangeTime: React.FC<Iprops> = (props: Iprops) => {
},
[
props
.
rangeTime
]);
const
handleChange
=
(
date
:
Moment
|
null
,
dateString
:
string
,
mode
:
"startTime"
|
"endTime"
)
=>
{
const
reverseMode
=
mode
===
'startTime'
?
'endTime'
:
'startTime'
;
const
newObject
=
{
...
innerRangeTime
,
[
mode
]:
date
,
};
// 对调位置,可以省去很多复杂且不必要的判断
if
(
date
&&
newObject
[
reverseMode
])
{
if
(
mode
===
'startTime'
&&
date
>
newObject
[
reverseMode
])
{
newObject
[
mode
]
=
newObject
[
reverseMode
];
newObject
[
reverseMode
]
=
date
;
}
if
(
mode
===
'endTime'
&&
date
<
newObject
[
reverseMode
])
{
newObject
[
mode
]
=
newObject
[
reverseMode
];
newObject
[
reverseMode
]
=
date
;
}
}
if
(
onChange
)
{
onChange
?.([
newObject
.
startTime
as
unknown
as
Moment
,
newObject
.
endTime
as
unknown
as
Moment
]);
}
else
{
...
...
@@ -67,37 +79,39 @@ const RangeTime: React.FC<Iprops> = (props: Iprops) => {
const
getDisableDate
=
useCallback
((
current
:
Moment
,
mode
:
"startTime"
|
"endTime"
)
=>
{
const
reverseMode
=
mode
===
'startTime'
?
'endTime'
:
'startTime'
;
const
modeTime
:
Moment
|
null
=
innerRangeTime
[
reverseMode
]
;
const
modeTime
:
Moment
|
null
=
moment
(
innerRangeTime
[
reverseMode
])
;
// current 为当前日历上的日期, 如果返回值为true,那么表示当前日期为禁用状态
if
(
!
modeTime
)
{
if
(
shouldGtCurrent
)
{
return
current
<
currentDay
.
endOf
(
endOfUnit
)
;
return
current
<
currentDay
;
}
return
false
;
}
if
(
mode
===
'startTime'
)
{
return
shouldGtCurrent
?
(
current
<
currentDay
.
endOf
(
endOfUnit
)
||
current
>
(
modeTime
as
Moment
).
endOf
(
endOfUnit
))
:
current
>
(
modeTime
as
Moment
).
endOf
(
endOfUnit
);
return
shouldGtCurrent
?
(
current
<
currentDay
||
current
>
modeTime
.
endOf
(
'day'
))
:
current
>
modeTime
.
endOf
(
'day'
);
}
else
{
//现在的时间要大于开始的时间, true 为禁用
return
shouldGtCurrent
?
(
current
<
currentDay
.
endOf
(
endOfUnit
)
||
current
<
(
modeTime
as
Moment
).
endOf
(
endOfUnit
))
:
current
<
(
modeTime
as
Moment
).
endOf
(
endOfUnit
);
return
shouldGtCurrent
?
(
current
<
currentDay
||
current
<
modeTime
)
:
current
<
modeTime
.
endOf
(
'day'
);
}
},
[
innerRangeTime
]);
const
disabledDateTime
=
(
current
:
Moment
,
partial
:
'start'
|
'end'
)
=>
{
const
{
startTime
}
=
innerRangeTime
;
const
hours
=
range
(
0
,
24
);
const
minutes
=
range
(
0
,
60
);
if
(
partial
===
'start'
)
{
return
{
disabledHours
:
()
=>
range
(
0
,
24
).
splice
(
0
,
moment
().
get
(
'hour'
)
),
disabledMinutes
:
()
=>
range
(
0
,
60
).
splice
(
0
,
moment
().
get
(
'minute'
)
),
disabledSeconds
:
()
=>
range
(
0
,
60
).
splice
(
0
,
moment
().
get
(
'second'
)
),
disabledHours
:
()
=>
hours
.
splice
(
0
,
current
&&
current
.
isSame
(
currentDay
,
'day'
)
?
moment
().
get
(
'hour'
)
:
0
),
disabledMinutes
:
()
=>
minutes
.
splice
(
0
,
current
&&
current
.
isSame
(
currentDay
,
'day'
)
?
moment
().
get
(
'minute'
)
:
0
),
disabledSeconds
:
()
=>
minutes
.
splice
(
0
,
current
&&
current
.
isSame
(
currentDay
,
'day'
)
?
moment
().
get
(
'second'
)
:
0
),
};
}
if
(
partial
===
'end'
)
{
return
{
disabledHours
:
()
=>
range
(
0
,
24
)
.
splice
(
0
,
startTime
?.
get
(
'hour'
)),
disabledMinutes
:
()
=>
range
(
0
,
60
)
.
splice
(
0
,
current
&&
current
.
isSame
(
startTime
,
'hour'
)
?
startTime
?.
get
(
'minute'
)
:
0
),
disabledSeconds
:
()
=>
range
(
0
,
60
)
.
splice
(
0
,
current
&&
current
.
isSame
(
startTime
,
'hour'
)
&&
current
.
isSame
(
startTime
,
'minute'
)
?
startTime
?.
get
(
'second'
)
+
1
:
0
),
disabledHours
:
()
=>
hours
.
splice
(
0
,
startTime
?.
get
(
'hour'
)),
disabledMinutes
:
()
=>
minutes
.
splice
(
0
,
current
&&
current
.
isSame
(
startTime
,
'hour'
)
?
startTime
?.
get
(
'minute'
)
:
0
),
disabledSeconds
:
()
=>
minutes
.
splice
(
0
,
current
&&
current
.
isSame
(
startTime
,
'hour'
)
&&
current
.
isSame
(
startTime
,
'minute'
)
?
startTime
?.
get
(
'second'
)
+
1
:
0
),
};
}
return
{};
...
...
src/locales/en-US/marketingAbility/merchantCoupon.ts
View file @
5087397f
...
...
@@ -169,7 +169,7 @@ export default {
"merchantCoupon.useTimeStart"
:
"Deadline for receiving (issuing) coupons"
,
"merchantCoupon.useTimeEnd"
:
"수령권 종료 시간"
,
"merchantCoupon.CustomerID"
:
"Customer ID"
,
"merchantCoupon.DeterminepassCoupon
?"
:
"Are you sure you want to pass the selected coupon
"
,
"merchantCoupon.DeterminepassCoupon
"
:
"Are you sure you want to pass the selected coupon?
"
,
"merchantCoupon.giveCouponStartTime"
:
"Start time for receiving (issuing) coupons"
,
"merchantCoupon.giveCouponEndTime"
:
"The deadline for receiving (issuing) coupons"
,
"merchantCoupon.CollarAll"
:
"Coupon Method (All)"
,
...
...
src/locales/ko-KR/marketingAbility/merchantCoupon.ts
View file @
5087397f
...
...
@@ -169,7 +169,7 @@ export default {
"merchantCoupon.useTimeStart"
:
"주문 (사용) 시작 시간"
,
"merchantCoupon.useTimeEnd"
:
"주문 (사용) 종료 시간"
,
"merchantCoupon.CustomerID"
:
'고객 ID'
,
"merchantCoupon.DeterminepassCoupon
?
"
:
'선택한 쿠폰을 통과하시겠습니까?'
,
"merchantCoupon.DeterminepassCoupon"
:
'선택한 쿠폰을 통과하시겠습니까?'
,
"merchantCoupon.giveCouponStartTime"
:
'상품권 수령 시작 시간'
,
"merchantCoupon.giveCouponEndTime"
:
'상품권 수령 마감 시간'
,
"merchantCoupon.CollarAll"
:
'쿠폰 수령 방식(모두)'
,
...
...
src/locales/zh-CN/marketingAbility/merchantCoupon.ts
View file @
5087397f
...
...
@@ -169,7 +169,7 @@ export default {
"merchantCoupon.useTimeStart"
:
"下单(使用)起始时间"
,
"merchantCoupon.useTimeEnd"
:
"下单(使用)止时间"
,
"merchantCoupon.CustomerID"
:
"客户ID"
,
"merchantCoupon.DeterminepassCoupon
?"
:
"确定要通过选中的优惠券吗
"
,
"merchantCoupon.DeterminepassCoupon
"
:
"确定要通过选中的优惠券吗?
"
,
"merchantCoupon.giveCouponStartTime"
:
"领(发)劵起始时间"
,
"merchantCoupon.giveCouponEndTime"
:
"领(发)劵截止时间"
,
"merchantCoupon.CollarAll"
:
"领劵方式(所有)"
,
...
...
src/pages/commodity/products/schema/channelSchema.tsx
View file @
5087397f
...
...
@@ -38,7 +38,7 @@ export const channelSchema: ISchema = {
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'
no
wrap'
,
flexWrap
:
'wrap'
,
},
colStyle
:
{
marginLeft
:
20
,
...
...
@@ -48,21 +48,22 @@ export const channelSchema: ISchema = {
productId
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
getIntl
().
formatMessage
({
id
:
'commodity.products.schema.productSchema.productId'
})
placeholder
:
getIntl
().
formatMessage
({
id
:
'commodity.products.schema.productSchema.productId'
}),
style
:
{
width
:
174
},
}
},
memberName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
getIntl
().
formatMessage
({
id
:
'commodity.products.schema.channelSchema.memberName'
}),
style
:
{
width
:
1
00
},
style
:
{
width
:
1
74
},
},
},
memberRoleName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
getIntl
().
formatMessage
({
id
:
'commodity.products.schema.channelSchema.memberRoleName'
}),
style
:
{
width
:
1
00
},
style
:
{
width
:
1
74
},
},
},
brandId
:
{
...
...
@@ -75,7 +76,7 @@ export const channelSchema: ISchema = {
defaultActiveFirstOption
:
false
,
filterOption
:
false
,
notFoundContent
:
null
,
style
:
{
width
:
1
00
},
style
:
{
width
:
1
74
},
searchValue
:
null
,
dataoption
:
[],
},
...
...
@@ -87,7 +88,7 @@ export const channelSchema: ISchema = {
placeholder
:
getIntl
().
formatMessage
({
id
:
'commodity.products.schema.channelSchema.customerCategoryId'
}),
showSearch
:
true
,
notFoundContent
:
null
,
style
:
{
width
:
'174px'
},
style
:
{
width
:
174
},
dataoption
:
[],
fieldNames
:
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
},
},
...
...
@@ -106,7 +107,7 @@ export const channelSchema: ISchema = {
],
'x-component-props'
:
{
placeholder
:
getIntl
().
formatMessage
({
id
:
'commodity.products.schema.channelSchema.source.placeholder'
}),
style
:
{
width
:
1
00
},
style
:
{
width
:
1
74
},
},
},
statusList
:
{
...
...
@@ -127,7 +128,7 @@ export const channelSchema: ISchema = {
],
'x-component-props'
:
{
placeholder
:
getIntl
().
formatMessage
({
id
:
'commodity.products.schema.channelSchema.statusList.placeholder'
}),
style
:
{
width
:
1
00
},
style
:
{
width
:
1
74
},
},
},
// priceTypeList: {
...
...
@@ -156,6 +157,7 @@ export const channelSchema: ISchema = {
'x-component'
:
'NumberRange'
,
'x-component-props'
:
{
placeholder
:
[
getIntl
().
formatMessage
({
id
:
'commodity.products.schema.channelSchema.min'
}),
getIntl
().
formatMessage
({
id
:
'commodity.products.schema.channelSchema.max'
})],
style
:
{
width
:
'230px'
},
},
},
submit
:
{
...
...
src/pages/contract/manage/add/components/FormList.tsx
View file @
5087397f
...
...
@@ -125,7 +125,7 @@ const FormList = (props: any) => {
if
(
res
.
code
===
1000
)
{
let
data
=
res
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
{
materielId
:
_filterArr
(
sourceType
,
item
,
[
''
,
'goodsId'
,
'
i
d'
,
''
]),
materielId
:
_filterArr
(
sourceType
,
item
,
[
''
,
'goodsId'
,
'
goodsI
d'
,
''
]),
code
:
_filter
(
sourceType
,
item
,
[
''
,
'number'
,
'code'
,
'number'
]),
// 物料编号
name
:
_filter
(
sourceType
,
item
,
[
''
,
'name'
,
'name'
,
'name'
]),
//物料名称
type
:
_filter
(
sourceType
,
item
,
[
''
,
'model'
,
'type'
,
'model'
]),
//物料规格
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/index.tsx
View file @
5087397f
...
...
@@ -6,7 +6,7 @@
* @Description: 待提交审核商家优惠劵
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
,
useIntl
}
from
'umi'
;
import
{
Card
,
Space
,
...
...
@@ -31,8 +31,6 @@ import { getMarketingCouponTypeList, getMarketingCouponWaitAuditPage, GetMarketi
import
useSpliceArray
from
'@/hooks/useSpliceArray'
;
import
{
querySchema
}
from
'./schema'
;
import
commonColumn
from
'../common/columns/coupon'
;
import
{
useIntl
}
from
'umi'
const
{
confirm
}
=
Modal
;
...
...
@@ -144,6 +142,9 @@ const MerchantCouponUnsubmitted: React.FC = () => {
setSelectedRowKeys
(
keys
);
},
selectedRowKeys
:
selectedRowKeys
,
getCheckboxProps
:
(
record
:
GetMarketingCouponWaitAuditPageResponseDetail
)
=>
({
disabled
:
record
.
status
!==
1
,
// 状态不等于待提交审核的禁用
}),
};
// 初始化高级筛选选项
...
...
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