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
eaad0500
Commit
eaad0500
authored
Dec 16, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:处理订单列表高级筛选异常
parent
1c0bd081
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
9 deletions
+59
-9
DateRangePickerUnix.tsx
src/components/NiceForm/components/DateRangePickerUnix.tsx
+45
-0
index.tsx
src/components/NiceForm/index.tsx
+4
-2
index.tsx
src/pages/orderSystem/index.tsx
+5
-3
index.tsx
src/pages/orderSystem/readyConfirmPayList/index.tsx
+2
-0
useSelfTable.tsx
...es/orderSystem/readyConfirmPayList/model/useSelfTable.tsx
+1
-1
index.ts
src/pages/orderSystem/readyConfirmPayList/schema/index.ts
+2
-3
No files found.
src/components/NiceForm/components/DateRangePickerUnix.tsx
0 → 100644
View file @
eaad0500
import
React
,
{
useRef
,
useEffect
,
useMemo
}
from
'react'
import
{
DatePicker
}
from
'antd'
;
import
moment
from
'moment'
;
/**
* Unix时间戳格式的时间范围选择
*/
const
{
RangePicker
}
=
DatePicker
;
const
DateRangePickerUnix
=
(
props
)
=>
{
const
{
value
,
mutators
}
=
props
const
{
placeholder
,
dataSource
,
...
rest
}
=
props
.
props
[
"x-component-props"
]
||
{}
const
handleChange
=
(
dates
,
dateString
)
=>
{
if
(
dateString
.
length
===
2
)
{
mutators
.
change
([
dateString
[
0
]
?
moment
(
dateString
[
0
]).
format
(
'x'
)
:
null
,
dateString
[
1
]
?
moment
(
dateString
[
1
]).
format
(
'x'
)
:
null
]);
}
}
let
v
:
any
=
[]
if
(
value
.
length
)
{
let
startTime
=
moment
(
Number
(
value
[
0
])).
format
(
'YYYY-MM-DD HH:mm:ss'
)
let
endTime
=
moment
(
Number
(
value
[
1
])).
format
(
'YYYY-MM-DD HH:mm:ss'
)
v
=
[
moment
(
startTime
,
'YYYY-MM-DD HH:mm:ss'
),
moment
(
endTime
,
'YYYY-MM-DD HH:mm:ss'
)]
}
return
(
<
RangePicker
showTime=
{
true
}
style=
{
{
minWidth
:
160
}
}
placeholder=
{
placeholder
}
onChange=
{
handleChange
}
value=
{
v
}
{
...
rest
}
/>
)
}
DateRangePickerUnix
.
defaultProps
=
{}
DateRangePickerUnix
.
isFieldComponent
=
true
;
export
default
DateRangePickerUnix
src/components/NiceForm/index.tsx
View file @
eaad0500
...
...
@@ -23,6 +23,7 @@ import SearchSelect from './components/SearchSelect';
import
TableTagList
from
'./components/TableTagList'
;
import
{
Checkbox
}
from
'@formily/antd-components'
;
import
DateSelect
from
'./components/DateSelect'
;
import
DateRangePickerUnix
from
'./components/DateRangePickerUnix'
;
import
SmilingFace
from
'./components/SmilingFace'
;
import
'./index.less'
...
...
@@ -90,8 +91,9 @@ export const componentExport = {
SearchSelect
,
DateRangePicker
:
DatePicker
.
RangePicker
,
TableTagList
,
DateSelect
,
SmilingFace
,
DateSelect
,
DateRangePickerUnix
,
SmilingFace
,
}
const
NiceForm
:
React
.
FC
<
NiceFormProps
>
=
props
=>
{
const
{
children
,
components
,
...
reset
}
=
props
;
...
...
src/pages/orderSystem/index.tsx
View file @
eaad0500
...
...
@@ -12,6 +12,7 @@ import { ISchema } from '@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
DatePicker
}
from
'@formily/antd-components'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
moment
from
'moment'
const
tableListSchema
:
ISchema
=
{
...
...
@@ -44,18 +45,18 @@ const tableListSchema: ISchema = {
"supplyMembersName"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请输入
采购
会员名称'
placeholder
:
'请输入
供应
会员名称'
}
},
"memberName"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请输入
供应
会员名称'
placeholder
:
'请输入
采购
会员名称'
}
},
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'
daterangepicker
'
,
"x-component"
:
'
DateRangePickerUnix
'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
...
...
@@ -200,6 +201,7 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => {
},
components
:
{
DateRangePicker
:
DatePicker
.
RangePicker
,
DateRangePickerUnix
,
Submit
}
},
...
...
src/pages/orderSystem/readyConfirmPayList/index.tsx
View file @
eaad0500
...
...
@@ -8,6 +8,7 @@ import { tableListSchema } from './schema'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
{
DatePicker
}
from
'@formily/antd-components'
// 待确认支付结果订单
...
...
@@ -47,6 +48,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
},
components
:
{
DateRangePicker
:
DatePicker
.
RangePicker
,
DateRangePickerUnix
,
Submit
}
}
...
...
src/pages/orderSystem/readyConfirmPayList/model/useSelfTable.tsx
View file @
eaad0500
...
...
@@ -103,7 +103,7 @@ export const useSelfTable = () => {
width
:
200
},
{
title
:
'已支付'
,
align
:
'center'
,
dataIndex
:
'alreadyPay'
,
key
:
'alreadyPay'
},
{
title
:
'当前支付'
,
align
:
'center'
,
dataIndex
:
'currentPayments'
,
render
:
(
text
,
record
)
=>
text
},
{
title
:
'当前支付'
,
align
:
'center'
,
dataIndex
:
'currentPayments'
,
render
:
(
text
,
record
)
=>
`
${
text
}
/
${
record
.
sum
}
次`
},
{
title
:
'订单类型'
,
align
:
'center'
,
...
...
src/pages/orderSystem/readyConfirmPayList/schema/index.ts
View file @
eaad0500
...
...
@@ -39,7 +39,7 @@ export const tableListSchema: ISchema = {
},
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'
daterangepicker
'
,
"x-component"
:
'
DateRangePickerUnix
'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
...
...
@@ -53,4 +53,4 @@ export const tableListSchema: ISchema = {
},
},
}
}
\ No newline at end of file
}
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