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
fc63fc0b
Commit
fc63fc0b
authored
Dec 16, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
8b808ced
0a575d43
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
68 additions
and
19 deletions
+68
-19
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
index.tsx
src/pages/pageCustomized/channelTemplate/index.tsx
+5
-5
index.tsx
src/pages/pageCustomized/shopCenterTemplate/index.tsx
+4
-5
No files found.
src/components/NiceForm/components/DateRangePickerUnix.tsx
0 → 100644
View file @
fc63fc0b
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 @
fc63fc0b
...
...
@@ -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 @
fc63fc0b
...
...
@@ -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 @
fc63fc0b
...
...
@@ -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 @
fc63fc0b
...
...
@@ -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 @
fc63fc0b
...
...
@@ -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
}
src/pages/pageCustomized/channelTemplate/index.tsx
View file @
fc63fc0b
...
...
@@ -3,7 +3,7 @@ import { Row, Col } from 'antd'
import
{
inject
}
from
'mobx-react'
import
TemplateItem
from
'../components/templateItem'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetTemplate
Platform
FindAllTemplateByTypeResponse
}
from
'@/services/TemplateApi'
import
{
GetTemplate
WebPageTemplateWeb
FindAllTemplateByTypeResponse
}
from
'@/services/TemplateApi'
import
{
TEMPLATE_TYPE
}
from
'@/constants'
import
styles
from
'./index.less'
...
...
@@ -14,15 +14,15 @@ interface ShopCenterTemplatePropsType {
const
ChannelTemplate
:
React
.
FC
<
ShopCenterTemplatePropsType
>
=
(
props
)
=>
{
const
{
SiteStore
:
{
siteId
}
}
=
props
const
[
templateList
,
setTemplateList
]
=
useState
<
GetTemplate
Platform
FindAllTemplateByTypeResponse
>
([])
const
[
templateList
,
setTemplateList
]
=
useState
<
GetTemplate
WebPageTemplateWeb
FindAllTemplateByTypeResponse
>
([])
useEffect
(()
=>
{
let
prarm
=
{
const
prarm
:
any
=
{
type
:
TEMPLATE_TYPE
.
chennel
,
siteId
}
//@ts-ignore
PublicApi
.
getTemplate
Platform
FindAllTemplateByType
(
prarm
).
then
(
res
=>
{
PublicApi
.
getTemplate
WebPageTemplateWeb
FindAllTemplateByType
(
prarm
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTemplateList
(
res
.
data
)
}
...
...
src/pages/pageCustomized/shopCenterTemplate/index.tsx
View file @
fc63fc0b
...
...
@@ -4,7 +4,7 @@ import TemplateItem from '../components/templateItem'
import
{
inject
}
from
'mobx-react'
import
{
PublicApi
}
from
'@/services/api'
import
{
TEMPLATE_TYPE
}
from
'@/constants'
import
{
GetTemplate
Platform
FindAllTemplateByTypeResponse
}
from
'@/services/TemplateApi'
import
{
GetTemplate
WebPageTemplateWeb
FindAllTemplateByTypeResponse
}
from
'@/services/TemplateApi'
import
styles
from
'./index.less'
interface
ShopCenterTemplatePropsType
{
...
...
@@ -13,15 +13,14 @@ interface ShopCenterTemplatePropsType {
const
ShopCenterTemplate
:
React
.
FC
<
ShopCenterTemplatePropsType
>
=
(
props
)
=>
{
const
{
SiteStore
:
{
siteId
}
}
=
props
const
[
templateList
,
setTemplateList
]
=
useState
<
GetTemplate
Platform
FindAllTemplateByTypeResponse
>
([])
const
[
templateList
,
setTemplateList
]
=
useState
<
GetTemplate
WebPageTemplateWeb
FindAllTemplateByTypeResponse
>
([])
useEffect
(()
=>
{
let
prarm
=
{
const
prarm
:
any
=
{
type
:
TEMPLATE_TYPE
.
mall
,
siteId
}
//@ts-ignore
PublicApi
.
getTemplatePlatformFindAllTemplateByType
(
prarm
).
then
(
res
=>
{
PublicApi
.
getTemplateWebPageTemplateWebFindAllTemplateByType
(
prarm
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTemplateList
(
res
.
data
)
}
...
...
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