Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cdsf-wx-app
Project
Overview
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
姜雷
cdsf-wx-app
Commits
cdbe76a1
Commit
cdbe76a1
authored
Oct 09, 2018
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加用车选择最小时间,和提交申请后跳转记录列表
parent
d326ebf7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
7 deletions
+31
-7
PublicCarApply.js
src/containers/PublicCar/PublicCarApply.js
+17
-5
index.js
src/containers/PublicCar/index.js
+2
-0
ReprtRepair.js
src/containers/Repair/ReprtRepair.js
+2
-0
index.js
src/containers/Repair/index.js
+10
-2
No files found.
src/containers/PublicCar/PublicCarApply.js
View file @
cdbe76a1
...
@@ -50,6 +50,14 @@ class PublicCarApply extends Component {
...
@@ -50,6 +50,14 @@ class PublicCarApply extends Component {
showAllCategory
:
!
showAllCategory
,
showAllCategory
:
!
showAllCategory
,
}));
}));
};
};
onChangeBeginDate
=
date
=>
{
const
{
endDate
}
=
this
.
state
;
if
(
endDate
&&
endDate
.
getTime
()
<
date
.
getTime
())
{
this
.
setState
({
beginDate
:
date
,
endDate
:
date
});
}
else
{
this
.
setState
({
beginDate
:
date
});
}
};
validateForm
=
()
=>
{
validateForm
=
()
=>
{
if
(
!
this
.
state
.
categoryId
)
{
if
(
!
this
.
state
.
categoryId
)
{
Toast
.
fail
(
'请选择用车类型'
);
Toast
.
fail
(
'请选择用车类型'
);
...
@@ -103,8 +111,10 @@ class PublicCarApply extends Component {
...
@@ -103,8 +111,10 @@ class PublicCarApply extends Component {
applyPublicCar
(
entity
)
applyPublicCar
(
entity
)
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
'res: '
+
res
);
console
.
log
(
'res: '
+
res
);
Toast
.
success
(
res
.
msg
)
;
const
{
history
}
=
this
.
props
;
this
.
resetForm
();
this
.
resetForm
();
Toast
.
success
(
res
.
msg
);
history
.
replace
(
'/publicCar/PublicCarList'
);
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
'err: '
+
err
);
console
.
log
(
'err: '
+
err
);
...
@@ -191,11 +201,12 @@ class PublicCarApply extends Component {
...
@@ -191,11 +201,12 @@ class PublicCarApply extends Component {
<
div
className
=
{
styles
.
itemValue
}
>
<
div
className
=
{
styles
.
itemValue
}
>
<
input
<
input
className
=
{
styles
.
itemInput
}
className
=
{
styles
.
itemInput
}
type
=
"text"
type
=
"tel"
maxLength
=
"5"
value
=
{
this
.
state
.
userCount
}
value
=
{
this
.
state
.
userCount
}
onChange
=
{
e
=>
onChange
=
{
e
=>
this
.
setState
({
this
.
setState
({
userCount
:
e
.
target
.
value
,
userCount
:
e
.
target
.
value
.
replace
(
/
\D
/g
,
''
)
,
})
})
}
}
/
>
/
>
...
@@ -206,7 +217,8 @@ class PublicCarApply extends Component {
...
@@ -206,7 +217,8 @@ class PublicCarApply extends Component {
<
div
className
=
{
styles
.
itemSelect
}
>
<
div
className
=
{
styles
.
itemSelect
}
>
<
DatePicker
<
DatePicker
value
=
{
this
.
state
.
beginDate
}
value
=
{
this
.
state
.
beginDate
}
onChange
=
{
date
=>
this
.
setState
({
beginDate
:
date
})}
onChange
=
{
this
.
onChangeBeginDate
}
minDate
=
{
new
Date
()}
>
>
<
CustomChildren
className
=
{
styles
.
DateInnerWrap
}
/
>
<
CustomChildren
className
=
{
styles
.
DateInnerWrap
}
/
>
<
/DatePicker
>
<
/DatePicker
>
...
@@ -216,9 +228,9 @@ class PublicCarApply extends Component {
...
@@ -216,9 +228,9 @@ class PublicCarApply extends Component {
<
div
className
=
{
styles
.
itemLabel
}
>
用车结束时间
<
/div
>
<
div
className
=
{
styles
.
itemLabel
}
>
用车结束时间
<
/div
>
<
div
className
=
{
styles
.
itemSelect
}
>
<
div
className
=
{
styles
.
itemSelect
}
>
<
DatePicker
<
DatePicker
className
=
{
styles
.
DateWrap
}
value
=
{
this
.
state
.
endDate
}
value
=
{
this
.
state
.
endDate
}
onChange
=
{
date
=>
this
.
setState
({
endDate
:
date
})}
onChange
=
{
date
=>
this
.
setState
({
endDate
:
date
})}
minDate
=
{
this
.
state
.
beginDate
}
>
>
<
CustomChildren
className
=
{
styles
.
DateInnerWrap
}
/
>
<
CustomChildren
className
=
{
styles
.
DateInnerWrap
}
/
>
<
/DatePicker
>
<
/DatePicker
>
...
...
src/containers/PublicCar/index.js
View file @
cdbe76a1
...
@@ -22,6 +22,7 @@ class PublicCar extends Component {
...
@@ -22,6 +22,7 @@ class PublicCar extends Component {
<
NavLink
<
NavLink
className
=
{
styles
[
'footer-item'
]}
className
=
{
styles
[
'footer-item'
]}
to
=
"/publicCar/PublicCarApply"
to
=
"/publicCar/PublicCarApply"
replace
>
>
约车服务
约车服务
<
/NavLink
>
<
/NavLink
>
...
@@ -29,6 +30,7 @@ class PublicCar extends Component {
...
@@ -29,6 +30,7 @@ class PublicCar extends Component {
<
NavLink
<
NavLink
className
=
{
styles
[
'footer-item'
]}
className
=
{
styles
[
'footer-item'
]}
to
=
"/publicCar/PublicCarList"
to
=
"/publicCar/PublicCarList"
replace
>
>
约车记录
约车记录
<
/NavLink
>
<
/NavLink
>
...
...
src/containers/Repair/ReprtRepair.js
View file @
cdbe76a1
...
@@ -185,10 +185,12 @@ class ReprtRepair extends Component {
...
@@ -185,10 +185,12 @@ class ReprtRepair extends Component {
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
const
{
data
}
=
res
;
const
{
data
}
=
res
;
const
{
history
}
=
this
.
props
;
console
.
log
(
'resetForm'
);
console
.
log
(
'resetForm'
);
this
.
resetApplyForm
();
this
.
resetApplyForm
();
Toast
.
hide
();
Toast
.
hide
();
Toast
.
success
(
data
.
msg
);
Toast
.
success
(
data
.
msg
);
history
.
replace
(
'/repair/RepairList'
);
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
...
...
src/containers/Repair/index.js
View file @
cdbe76a1
...
@@ -27,11 +27,19 @@ class index extends Component {
...
@@ -27,11 +27,19 @@ class index extends Component {
<
/Switch
>
<
/Switch
>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
footer
}
>
<
div
className
=
{
styles
.
footer
}
>
<
NavLink
className
=
{
styles
[
'footer-item'
]}
to
=
"/repair/ReprtRepair"
>
<
NavLink
className
=
{
styles
[
'footer-item'
]}
to
=
"/repair/ReprtRepair"
replace
>
报修服务
报修服务
<
/NavLink
>
<
/NavLink
>
<
span
className
=
{
styles
.
line
}
/
>
<
span
className
=
{
styles
.
line
}
/
>
<
NavLink
className
=
{
styles
[
'footer-item'
]}
to
=
"/repair/RepairList"
>
<
NavLink
className
=
{
styles
[
'footer-item'
]}
to
=
"/repair/RepairList"
replace
>
报修记录
报修记录
<
/NavLink
>
<
/NavLink
>
<
/div
>
<
/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