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
linweijiong
jinfa-admin
Commits
95f005f5
Commit
95f005f5
authored
Dec 28, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:处理订单重置和时间筛选异常
parent
886063cf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
183 additions
and
58 deletions
+183
-58
index.tsx
src/pages/orderSystem/index.tsx
+101
-36
index.tsx
src/pages/orderSystem/readyConfirmPayList/index.tsx
+42
-16
index.ts
src/pages/orderSystem/readyConfirmPayList/schema/index.ts
+40
-6
No files found.
src/pages/orderSystem/index.tsx
View file @
95f005f5
import
React
,
{
useState
}
from
'react'
import
React
,
{
use
Ref
,
use
State
}
from
'react'
import
{
Card
,
Button
,
Modal
}
from
'antd'
import
{
StandardTable
}
from
'god'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
...
...
@@ -8,33 +8,75 @@ import { formatTimeString } from '@/utils'
import
{
ORDER_TYPE
,
PurchaseOrderOutWorkStateTexts
,
PurchaseOrderInsideWorkStateTexts
}
from
'@/constants'
import
StatusColors
from
'./components/StatusColors'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
ISchema
}
from
'@formily/antd'
import
{
createFormActions
,
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'
import
NiceForm
from
'@/components/NiceForm'
const
formActions
=
createFormActions
();
const
tableListSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
// orderNo: {
// type: 'string',
// "x-component": 'SearchFilter',
// 'x-component-props': {
// placeholder: '请输入订单编号',
// align: 'flex-end',
// },
// },
// [FORM_FILTER_PATH]: {
// type: 'object',
// 'x-component': 'flex-layout',
// 'x-component-props': {
// inline: true,
// colStyle: {
// marginLeft: 20
// }
// },
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
topLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{controllerBtns}}'
,
},
},
orderNo
:
{
type
:
'string'
,
"x-component"
:
'SearchFilter
'
,
"x-component"
:
'Search
'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-end'
,
},
}
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
rowStyle
:
{
flexWrap
:
'nowrap'
,
},
colStyle
:
{
marginLeft
:
20
}
marginLeft
:
20
,
},
},
properties
:
{
orderThe
:
{
type
:
'string'
,
...
...
@@ -67,7 +109,7 @@ const tableListSchema: ISchema = {
children
:
'查询'
,
},
},
},
},
}}
},
}
}
...
...
@@ -159,10 +201,6 @@ export const baseOrderListColumns: any[] = [
export
interface
SaleOrderProps
{
}
const
fetchTableData
=
async
(
params
)
=>
{
// 格式化查询时间
params
.
startCreateTime
=
params
.
startCreateTime
?
moment
(
params
.
startCreateTime
).
valueOf
()
:
undefined
params
.
endCreateTime
=
params
.
endCreateTime
?
moment
(
params
.
endCreateTime
).
valueOf
()
:
undefined
const
{
data
}
=
await
PublicApi
.
getOrderPlatformOrderList
(
params
)
return
data
}
...
...
@@ -171,46 +209,73 @@ const fetchTableData = async (params) => {
// 最后一步开始调试 TODO
const
SaleOrder
:
React
.
FC
<
SaleOrderProps
>
=
(
props
)
=>
{
const
ref
=
useRef
<
any
>
({})
const
secondColumns
:
any
[]
=
baseOrderListColumns
.
concat
([
])
const
controllerBtns
=
<
Button
style=
{
{
width
:
140
}
}
onClick=
{
()
=>
{}
}
type=
'default'
>
导出
</
Button
>
return
<
Card
>
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
columns=
{
secondColumns
}
formilyLayouts=
{
{
justify
:
'space-between'
}
}
formilyChilds=
{
{
layouts
:
{
order
:
2
},
children
:
<
Button
style=
{
{
width
:
140
}
}
onClick=
{
()
=>
{}
}
type=
'default'
>
导出
</
Button
>
currentRef=
{
ref
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
expressionScope=
{
{
controllerBtns
,
}
}
formilyProps=
{
{
ctx
:
{
inline
:
false
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'orderNo'
,
FORM_FILTER_PATH
,
)
;
}
,
components
:
{
DateRangePicker
:
DatePicker
.
RangePicker
,
)
}
}
schema=
{
tableListSchema
}
components=
{
{
DateRangePickerUnix
,
Submit
}
},
layouts
:
{
order
:
3
,
span
:
16
}
}
}
/>
}
// formilyLayouts={{
// justify: 'space-between'
// }}
// formilyChilds={{
// layouts: {
// order: 2
// },
// children: <Button style={{width: 140}} onClick={() => {}} type='default'>导出</Button>
// }}
// formilyProps={{
// ctx: {
// inline: false,
// schema: tableListSchema,
// effects: ($, actions) => {
// useStateFilterSearchLinkageEffect(
// $,
// actions,
// 'orderNo',
// FORM_FILTER_PATH,
// );
// },
// components: {
// DateRangePicker: DatePicker.RangePicker,
// DateRangePickerUnix,
// Submit
// }
// },
// layouts: {
// order: 3,
// span: 16
// }
// }}
/>
</
Card
>
}
...
...
src/pages/orderSystem/readyConfirmPayList/index.tsx
View file @
95f005f5
import
React
from
'react'
import
React
,
{
useRef
}
from
'react'
import
{
Card
}
from
'antd'
import
{
StandardTable
}
from
'god'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
...
...
@@ -9,7 +9,10 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
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'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
}
from
'@formily/antd'
const
formActions
=
createFormActions
();
// 待确认支付结果订单
...
...
@@ -22,6 +25,7 @@ const fetchTableData = async (params) => {
// TODO
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
ref
=
useRef
<
any
>
({})
const
{
columns
}
=
useSelfTable
()
...
...
@@ -30,30 +34,52 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
columns=
{
columns
}
rowKey=
{
'orderNo'
}
formilyLayouts=
{
{
justify
:
'space-between'
tableProps=
{
{
rowKey
:
'orderNo'
}
}
formilyProps=
{
{
ctx
:
{
inline
:
false
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
currentRef=
{
ref
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'orderNo'
,
FORM_FILTER_PATH
,
)
;
}
,
components
:
{
DateRangePicker
:
DatePicker
.
RangePicker
,
)
}
}
schema=
{
tableListSchema
}
components=
{
{
DateRangePickerUnix
,
Submit
}
}
}
}
/>
}
// formilyLayouts={{
// justify: 'space-between'
// }}
// formilyProps={{
// ctx: {
// inline: false,
// schema: tableListSchema,
// effects: ($, actions) => {
// useStateFilterSearchLinkageEffect(
// $,
// actions,
// 'orderNo',
// FORM_FILTER_PATH,
// );
// },
// components: {
// DateRangePicker: DatePicker.RangePicker,
// DateRangePickerUnix,
// Submit
// }
// }
// }}
/>
</
Card
>
}
...
...
src/pages/orderSystem/readyConfirmPayList/schema/index.ts
View file @
95f005f5
...
...
@@ -7,23 +7,57 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
export
const
tableListSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
// orderNo: {
// type: 'string',
// "x-component": 'SearchFilter',
// 'x-component-props': {
// placeholder: '请输入订单编号',
// align: 'flex-start',
// },
// },
// [FORM_FILTER_PATH]: {
// type: 'object',
// 'x-component': 'flex-layout',
// 'x-component-props': {
// inline: true,
// colStyle: {
// marginRight: 20
// }
// },
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
topLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
orderNo
:
{
type
:
'string'
,
"x-component"
:
'SearchFilter
'
,
"x-component"
:
'Search
'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-start'
,
align
:
'flex-end'
,
},
}
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
rowStyle
:
{
flexWrap
:
'nowrap'
,
},
colStyle
:
{
marginRight
:
20
}
marginLeft
:
20
,
},
},
properties
:
{
orderThe
:
{
type
:
'string'
,
...
...
@@ -50,7 +84,7 @@ export const tableListSchema: ISchema = {
children
:
'查询'
,
},
},
},
},
}}
},
}
}
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