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
a377f684
Commit
a377f684
authored
Jun 11, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix: 修改采购需求计划BUG
parent
8cfdcfa2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
15 deletions
+17
-15
DateSelect.tsx
src/components/NiceForm/components/DateSelect.tsx
+7
-6
reset.less
src/global/styles/reset.less
+1
-2
drawer.tsx
...s/detail/components/purchasePlanMaterialLayout/drawer.tsx
+5
-3
index.tsx
...transaction/purchaseAbility/purchasePlan/demand/index.tsx
+2
-2
index.tsx
...transaction/purchaseAbility/purchasePlan/detail/index.tsx
+2
-2
No files found.
src/components/NiceForm/components/DateSelect.tsx
View file @
a377f684
...
...
@@ -18,7 +18,9 @@ const getPrevTime = (num, flag) => {
const
DateSelect
=
(
props
)
=>
{
const
{
value
,
mutators
}
=
props
const
todayStartTime
=
moment
().
startOf
(
'day'
).
format
(
'x'
)
const
nowTime
=
moment
().
format
(
'x'
).
valueOf
()
// const nowTime = moment().format('x').valueOf()
/** 当天的23:59:59 */
const
nowTime
=
moment
().
endOf
(
'day'
).
valueOf
()
const
dateMemo
=
useMemo
(()
=>
[
{
label
:
'今天'
,
value
:
`
${
todayStartTime
}
,
${
nowTime
}
`
},
{
label
:
'一周内'
,
value
:
`
${
getPrevTime
(
1
,
'week'
)}
,
${
nowTime
}
`
},
...
...
@@ -28,8 +30,8 @@ const DateSelect = (props) => {
{
label
:
'一年内'
,
value
:
`
${
getPrevTime
(
1
,
'year'
)}
,
${
nowTime
}
`
},
{
label
:
'一年前'
,
value
:
`0,
${
getPrevTime
(
1
,
'year'
)}
`
},
],
[])
const
handleChange
=
(
e
)
=>
{
mutators
.
change
(
e
?
e
.
split
(
','
)
:
''
);
}
...
...
@@ -37,7 +39,7 @@ const DateSelect = (props) => {
const
val
=
!
value
||
!
value
.
length
?
undefined
:
value
.
join
();
return
(
<
Select
<
Select
style=
{
{
minWidth
:
160
}
}
placeholder=
{
placeholder
}
onChange=
{
handleChange
}
...
...
@@ -52,4 +54,4 @@ DateSelect.defaultProps = {}
DateSelect
.
isFieldComponent
=
true
;
export
default
DateSelect
\ No newline at end of file
export
default
DateSelect
src/global/styles/reset.less
View file @
a377f684
...
...
@@ -293,4 +293,4 @@
> label.ant-form-item-required::before {
order: 10;
margin-left: -6px;
}
\ No newline at end of file
}
src/pages/transaction/purchaseAbility/components/detail/components/purchasePlanMaterialLayout/drawer.tsx
View file @
a377f684
...
...
@@ -33,8 +33,8 @@ const DrawerLayout: React.FC<DrawerLayoutProps> = (props: any) => {
dataIndex
:
'startTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
size=
{
0
}
>
<
Typography
.
Text
>
{
format
(
text
)
}
</
Typography
.
Text
>
<
Typography
.
Text
>
{
format
(
record
.
endTime
)
}
</
Typography
.
Text
>
<
Typography
.
Text
>
{
format
(
text
,
"YYYY-MM-DD"
)
}
</
Typography
.
Text
>
<
Typography
.
Text
>
{
format
(
record
.
endTime
,
"YYYY-MM-DD"
)
}
</
Typography
.
Text
>
</
Space
>
)
},
...
...
@@ -57,17 +57,19 @@ const DrawerLayout: React.FC<DrawerLayoutProps> = (props: any) => {
title
:
'成本价'
,
key
:
'costPrice'
,
dataIndex
:
'costPrice'
,
render
:
(
text
:
any
)
=>
(<>
{
text
?
`¥${text.toFixed(2)}`
:
`¥0`
}
</>)
},
{
title
:
'需求金额'
,
key
:
'needPrice'
,
dataIndex
:
'needPrice'
,
render
:
(
text
:
any
)
=>
(<>
{
text
?
`¥${text.toFixed(2)}`
:
`¥0`
}
</>)
},
{
title
:
'到货日期'
,
key
:
'arriveTime'
,
dataIndex
:
'arriveTime'
,
render
:
(
text
:
any
)
=>
format
(
text
)
render
:
(
text
:
any
)
=>
format
(
text
,
"YYYY-MM-DD"
)
},
]
...
...
src/pages/transaction/purchaseAbility/purchasePlan/demand/index.tsx
View file @
a377f684
...
...
@@ -48,8 +48,8 @@ const DemandDetailed = () => {
},
{
col
:
[
{
label
:
'需求计划开始'
,
extra
:
format
(
data
.
startTime
)
},
{
label
:
'需求计划截止'
,
extra
:
format
(
data
.
endTime
)
},
{
label
:
'需求计划开始'
,
extra
:
format
(
data
.
startTime
,
"YYYY-MM-DD"
)
},
{
label
:
'需求计划截止'
,
extra
:
format
(
data
.
endTime
,
"YYYY-MM-DD"
)
},
]
},
{
...
...
src/pages/transaction/purchaseAbility/purchasePlan/detail/index.tsx
View file @
a377f684
...
...
@@ -83,7 +83,7 @@ const PurchasePlanDetailed = () => {
{
label
:
'采购计划开始'
,
extra
:
(
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
,
width
:
'100%'
}
}
>
<
span
>
{
format
(
data
.
startTime
)
}
</
span
>
<
span
>
{
format
(
data
.
startTime
,
"YYYY-MM-DD"
)
}
</
span
>
{
(
pathPci
===
'purchasePlanSubmit'
&&
path
===
'detail'
)
&&
(<
span
onClick=
{
()
=>
handleEidt
(
data
.
startTime
,
'计划开始时间'
,
'startTime'
)
}
style=
{
{
padding
:
0
,
color
:
'#00B37A'
,
cursor
:
'pointer'
}
}
>
修改时间
</
span
>)
}
</
div
>
)
...
...
@@ -91,7 +91,7 @@ const PurchasePlanDetailed = () => {
{
label
:
'采购计划截止'
,
extra
:
(
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
,
width
:
'100%'
}
}
>
<
span
>
{
format
(
data
.
endTime
)
}
</
span
>
<
span
>
{
format
(
data
.
endTime
,
"YYYY-MM-DD"
)
}
</
span
>
{
(
pathPci
===
'purchasePlanSubmit'
&&
path
===
'detail'
)
&&
(<
span
onClick=
{
()
=>
handleEidt
(
data
.
endTime
,
'计划结束时间'
,
'endTime'
)
}
style=
{
{
padding
:
0
,
color
:
'#00B37A'
,
cursor
:
'pointer'
}
}
>
修改时间
</
span
>)
}
</
div
>
)
...
...
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