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
a0446621
Commit
a0446621
authored
Oct 09, 2018
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into test
parents
53654687
cdbe76a1
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 @
a0446621
...
...
@@ -50,6 +50,14 @@ class PublicCarApply extends Component {
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
=
()
=>
{
if
(
!
this
.
state
.
categoryId
)
{
Toast
.
fail
(
'请选择用车类型'
);
...
...
@@ -103,8 +111,10 @@ class PublicCarApply extends Component {
applyPublicCar
(
entity
)
.
then
(
res
=>
{
console
.
log
(
'res: '
+
res
);
Toast
.
success
(
res
.
msg
)
;
const
{
history
}
=
this
.
props
;
this
.
resetForm
();
Toast
.
success
(
res
.
msg
);
history
.
replace
(
'/publicCar/PublicCarList'
);
})
.
catch
(
err
=>
{
console
.
log
(
'err: '
+
err
);
...
...
@@ -191,11 +201,12 @@ class PublicCarApply extends Component {
<
div
className
=
{
styles
.
itemValue
}
>
<
input
className
=
{
styles
.
itemInput
}
type
=
"text"
type
=
"tel"
maxLength
=
"5"
value
=
{
this
.
state
.
userCount
}
onChange
=
{
e
=>
this
.
setState
({
userCount
:
e
.
target
.
value
,
userCount
:
e
.
target
.
value
.
replace
(
/
\D
/g
,
''
)
,
})
}
/
>
...
...
@@ -206,7 +217,8 @@ class PublicCarApply extends Component {
<
div
className
=
{
styles
.
itemSelect
}
>
<
DatePicker
value
=
{
this
.
state
.
beginDate
}
onChange
=
{
date
=>
this
.
setState
({
beginDate
:
date
})}
onChange
=
{
this
.
onChangeBeginDate
}
minDate
=
{
new
Date
()}
>
<
CustomChildren
className
=
{
styles
.
DateInnerWrap
}
/
>
<
/DatePicker
>
...
...
@@ -216,9 +228,9 @@ class PublicCarApply extends Component {
<
div
className
=
{
styles
.
itemLabel
}
>
用车结束时间
<
/div
>
<
div
className
=
{
styles
.
itemSelect
}
>
<
DatePicker
className
=
{
styles
.
DateWrap
}
value
=
{
this
.
state
.
endDate
}
onChange
=
{
date
=>
this
.
setState
({
endDate
:
date
})}
minDate
=
{
this
.
state
.
beginDate
}
>
<
CustomChildren
className
=
{
styles
.
DateInnerWrap
}
/
>
<
/DatePicker
>
...
...
src/containers/PublicCar/index.js
View file @
a0446621
...
...
@@ -22,6 +22,7 @@ class PublicCar extends Component {
<
NavLink
className
=
{
styles
[
'footer-item'
]}
to
=
"/publicCar/PublicCarApply"
replace
>
约车服务
<
/NavLink
>
...
...
@@ -29,6 +30,7 @@ class PublicCar extends Component {
<
NavLink
className
=
{
styles
[
'footer-item'
]}
to
=
"/publicCar/PublicCarList"
replace
>
约车记录
<
/NavLink
>
...
...
src/containers/Repair/ReprtRepair.js
View file @
a0446621
...
...
@@ -185,10 +185,12 @@ class ReprtRepair extends Component {
.
then
(
res
=>
{
console
.
log
(
res
);
const
{
data
}
=
res
;
const
{
history
}
=
this
.
props
;
console
.
log
(
'resetForm'
);
this
.
resetApplyForm
();
Toast
.
hide
();
Toast
.
success
(
data
.
msg
);
history
.
replace
(
'/repair/RepairList'
);
})
.
catch
(
err
=>
{
console
.
log
(
err
);
...
...
src/containers/Repair/index.js
View file @
a0446621
...
...
@@ -27,11 +27,19 @@ class index extends Component {
<
/Switch
>
<
/div
>
<
div
className
=
{
styles
.
footer
}
>
<
NavLink
className
=
{
styles
[
'footer-item'
]}
to
=
"/repair/ReprtRepair"
>
<
NavLink
className
=
{
styles
[
'footer-item'
]}
to
=
"/repair/ReprtRepair"
replace
>
报修服务
<
/NavLink
>
<
span
className
=
{
styles
.
line
}
/
>
<
NavLink
className
=
{
styles
[
'footer-item'
]}
to
=
"/repair/RepairList"
>
<
NavLink
className
=
{
styles
[
'footer-item'
]}
to
=
"/repair/RepairList"
replace
>
报修记录
<
/NavLink
>
<
/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