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
e9fec2f9
Commit
e9fec2f9
authored
Sep 08, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
f7d7a504
98b39cb0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
1 deletion
+57
-1
DateSelect.tsx
src/components/NiceForm/components/DateSelect.tsx
+53
-0
index.tsx
src/components/NiceForm/index.tsx
+2
-0
menu.ts
src/locales/zh-CN/menu.ts
+1
-0
index.tsx
src/pages/user/index.tsx
+1
-1
No files found.
src/components/NiceForm/components/DateSelect.tsx
0 → 100644
View file @
e9fec2f9
import
React
,
{
useRef
,
useEffect
,
useMemo
}
from
'react'
import
{
Select
}
from
'antd'
;
import
moment
from
'moment'
export
enum
DATE_SELECT_TYPE
{
TODAY
,
WITHIN_WEEK
,
WITHIN_MONTH
,
WITHIN_THREE_MONTH
,
WITHIN_SIX_MONTH
,
WITHIN_YEAR
,
A_YEAR_AGO
}
const
getPrevTime
=
(
num
,
flag
)
=>
{
return
moment
().
subtract
(
num
,
flag
).
valueOf
()
}
const
DateSelect
=
(
props
)
=>
{
const
{
value
=
[],
mutators
}
=
props
const
todayStartTime
=
moment
().
startOf
(
'day'
).
format
(
'x'
)
const
nowTime
=
moment
().
format
(
'x'
).
valueOf
()
const
dateMemo
=
useMemo
(()
=>
[
{
label
:
'今天'
,
value
:
`
${
todayStartTime
}
,
${
nowTime
}
`
},
{
label
:
'一周内'
,
value
:
`
${
getPrevTime
(
1
,
'week'
)}
,
${
nowTime
}
`
},
{
label
:
'一月内'
,
value
:
`
${
getPrevTime
(
1
,
'month'
)}
,
${
nowTime
}
`
},
{
label
:
'三月内'
,
value
:
`
${
getPrevTime
(
3
,
'month'
)}
,
${
nowTime
}
`
},
{
label
:
'六月内'
,
value
:
`
${
getPrevTime
(
6
,
'month'
)}
,
${
nowTime
}
`
},
{
label
:
'一年内'
,
value
:
`
${
getPrevTime
(
1
,
'year'
)}
,
${
nowTime
}
`
},
{
label
:
'一年前'
,
value
:
`0,
${
getPrevTime
(
1
,
'year'
)}
`
},
],
[])
const
handleChange
=
(
e
)
=>
{
mutators
.
change
(
e
.
split
(
','
))
}
const
{
placeholder
,
dataSource
=
dateMemo
}
=
props
.
props
[
"x-component-props"
]
||
{}
return
(
<
Select
style=
{
{
minWidth
:
160
}
}
placeholder=
{
placeholder
}
onChange=
{
handleChange
}
value=
{
value
.
join
()
}
options=
{
dataSource
}
/>
)
}
DateSelect
.
defaultProps
=
{}
DateSelect
.
isFieldComponent
=
true
;
export
default
DateSelect
\ No newline at end of file
src/components/NiceForm/index.tsx
View file @
e9fec2f9
...
...
@@ -23,6 +23,7 @@ import SearchSelect from './components/SearchSelect';
import
TableTagList
from
'./components/TableTagList'
;
import
'./index.less'
import
{
Checkbox
}
from
'@formily/antd-components'
;
import
DateSelect
from
'./components/DateSelect'
;
export
interface
NiceFormProps
extends
IAntdSchemaFormProps
{}
...
...
@@ -88,6 +89,7 @@ export const componentExport = {
SearchSelect
,
DateRangePicker
:
DatePicker
.
RangePicker
,
TableTagList
,
DateSelect
}
const
NiceForm
:
React
.
FC
<
NiceFormProps
>
=
props
=>
{
const
{
children
,
components
,
...
reset
}
=
props
;
...
...
src/locales/zh-CN/menu.ts
View file @
e9fec2f9
...
...
@@ -114,6 +114,7 @@ export default {
'menu.tranactionAbility.enquirySubmit.addEnquiry'
:
'新增需求单'
,
'menu.tranactionAbility.enquirySubmit.viewEnquiryDetail'
:
'需求单详情'
,
'menu.tranactionAbility.enquirySubmit.enquiryOne'
:
'待审核报价单(一级)'
,
'menu.tranactionAbility.enquirySubmit.viewEnquiryDetail'
:
'需求报价单'
,
'menu.tranactionAbility.enquirySubmit.enquiryTwo'
:
'待审核报价单(二级)'
,
'menu.tranactionAbility.purchaseOrder'
:
'采购订单'
,
'menu.tranactionAbility.purchaseOrder.purchaseOrderSearch'
:
'订单查询'
,
...
...
src/pages/user/index.tsx
View file @
e9fec2f9
...
...
@@ -34,7 +34,7 @@ const User: React.FC = () => {
<
div
className=
{
'adBox'
}
>
{
/*<img src={leftPicture} alt="数商云"/>*/
}
<
h2
>
欢迎来到数商云
</
h2
>
<
p
>
数商云是知名云计算及数据服务提供商,在海量文件存储、CDN 内容分发、视频点播、互动直播及大规模异构数据的智能分析与处理等技术深度投入,致力以数据科技驱动数字化未来,赋能各行业全面进入数据时代
。
</
p
>
<
p
>
广州市数商云网络科技有限公司(软件企业编号:粤RO-2018-0284 | 高新科技企业编号:GR201844008227),简称「数商云」,是一家领先的企业全链数字化运营服务提供商。致力于通过大数据、云计算等新技术协助企业打造渠道端—营销端—数据端等全链数字化运营体系,全面提升企业运营效益与智慧数字化商业转型。自2013年成立以来,数商云致力于提供企业数字化运营产品及解决方案。目前,数商云拥有数商云贸、数商云销、数商云批、数商云MA、数商云DMP五大产品,分别为企业提供大型B2B供应链电商系统开发、企业级B2C电商系统开发、批发销售管理系统、大数据营销自动化、大数据管理平台全链数字化运营解决方案
。
</
p
>
</
div
>
</
Col
>
<
Col
className=
{
cx
(
'loginItem'
,
'loginCtl'
)
}
>
...
...
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