Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform-ui
Commits
956f08d4
Commit
956f08d4
authored
Jun 21, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车型管理-创建车型
parent
5ebca190
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
6 deletions
+56
-6
vehicleType.js
src/api/vehicleType.js
+11
-1
index.vue
src/views/vehicleType/index.vue
+3
-2
oneType.vue
src/views/vehicleType/modal/oneType.vue
+42
-3
No files found.
src/api/vehicleType.js
View file @
956f08d4
...
@@ -100,7 +100,6 @@ export function updateAndAdd(params) {
...
@@ -100,7 +100,6 @@ export function updateAndAdd(params) {
});
});
}
}
// vehicle/vehicleModel/app/update
/**
/**
* 编辑一条车型数据
* 编辑一条车型数据
* */
* */
...
@@ -111,3 +110,14 @@ export function updateVehicleModel(params) {
...
@@ -111,3 +110,14 @@ export function updateVehicleModel(params) {
data
:
params
data
:
params
});
});
}
}
/*
* 新建一条车型数据
* */
export
function
addVehicleModel
(
params
)
{
return
fetch
({
url
:
'/vehicle/vehicleModel/app/add'
,
method
:
'post'
,
data
:
params
});
}
src/views/vehicleType/index.vue
View file @
956f08d4
...
@@ -49,13 +49,13 @@
...
@@ -49,13 +49,13 @@
<el-table-column
width=
"200"
align=
"center"
label=
"乘卧数量"
>
<el-table-column
width=
"200"
align=
"center"
label=
"乘卧数量"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
number
.
n
ame
}}
</span>
<span>
{{
scope
.
row
.
number
N
ame
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"200"
align=
"center"
label=
"品牌"
>
<el-table-column
width=
"200"
align=
"center"
label=
"品牌"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
brand
.
n
ame
}}
</span>
<span>
{{
scope
.
row
.
brand
N
ame
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -204,6 +204,7 @@
...
@@ -204,6 +204,7 @@
* */
* */
handleCreate
()
{
handleCreate
()
{
this
.
modalTitle
=
'创建'
;
this
.
modalTitle
=
'创建'
;
this
.
oneRow
=
{};
this
.
oneTypeDialogVisible
=
true
;
this
.
oneTypeDialogVisible
=
true
;
},
},
/**
/**
...
...
src/views/vehicleType/modal/oneType.vue
View file @
956f08d4
...
@@ -186,7 +186,8 @@
...
@@ -186,7 +186,8 @@
getOneTypeById
,
getOneTypeById
,
getAllParentLabel
,
getAllParentLabel
,
getLabelList
,
getLabelList
,
updateVehicleModel
updateVehicleModel
,
addVehicleModel
}
from
'api/vehicleType'
;
}
from
'api/vehicleType'
;
import
rsCode
from
'../../../utils/rsCode'
;
import
rsCode
from
'../../../utils/rsCode'
;
import
{
import
{
...
@@ -366,7 +367,45 @@
...
@@ -366,7 +367,45 @@
/**
/**
* 创建
* 创建
* */
* */
create
(){},
create
(){
let
params
=
{
number
:
this
.
form
.
number
,
//乘卧数量
brand
:
this
.
form
.
brand
,
//房车品牌
name
:
this
.
form
.
name
,
//房车名称
config
:
this
.
totalLabel
.
join
(
","
),
//房车配置
keyword
:
this
.
form
.
keyword
,
//房车关键标签
modelsDetails
:
this
.
form
.
modelsDetails
,
//房车详情
modelParam
:
JSON
.
stringify
(
this
.
form
.
modelParam
),
//房车参数
picture
:
this
.
form
.
picture
,
//轮播图
price
:
this
.
form
.
price
,
//租车价格
deposit
:
this
.
form
.
deposit
,
//总押金
vioDeposit
:
this
.
form
.
vioDeposit
,
// "hotSign": this.form.hotSign,//热门车型
// "rentDiscountStatus":"0",//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值
// "RentDiscountPrice":"",//租车优惠价格 固定优化价格
buyPrice
:
this
.
form
.
buyPrice
,
//购买价格
};
console
.
log
(
params
);
console
.
log
(
this
.
form
);
addVehicleModel
(
params
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'创建成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
$emit
(
"oneDialogEvent"
,
true
);
}
else
{
this
.
$notify
({
title
:
'创建失败'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
});
},
/**
/**
* 编辑
* 编辑
* */
* */
...
@@ -693,7 +732,7 @@
...
@@ -693,7 +732,7 @@
config
:
""
,
//房车配置
config
:
""
,
//房车配置
keyword
:
""
,
//房车关键标签
keyword
:
""
,
//房车关键标签
modelsDetails
:
""
,
//房车详情
modelsDetails
:
""
,
//房车详情
modelParam
:
""
,
//房车参数
modelParam
:
[]
,
//房车参数
picture
:
""
,
//轮播图
picture
:
""
,
//轮播图
price
:
0
,
//租车价格
price
:
0
,
//租车价格
deposit
:
20000
,
//总押金
deposit
:
20000
,
//总押金
...
...
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