Commit ac5f983a authored by lixy's avatar lixy

车型列表

parent 9b697150
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
<el-table-column width="60" align="center" :label="item.day" v-for="item in tempDayList" :key="item.day"> <el-table-column width="60" align="center" :label="item.day" v-for="item in tempDayList" :key="item.day">
<template scope="scope"> <template scope="scope">
<div v-for="iitem in scope.row.temp" :key="iitem.day" v-if="iitem.time == item.time"> <div v-for="iitem in scope.row.temp" :key="iitem.day" v-if="iitem.time == item.time">
<div v-for="ii in iitem.children" :style="ii.timeEtr != '00'?'position:relative':'position:static'" :key="ii.time" :data-ii="ii.time" :data-endhour="ii.endhour" class="ii-day" :class="ii.bg" @click="toShowDialog(scope.row, iitem, ii)"> <div v-for="ii in iitem.children" :key="ii.time" :data-ii="ii.time" :data-endhour="ii.endhour" class="ii-day" :class="ii.bg" @click="toShowDialog(scope.row, iitem, ii)">
<span v-if="ii.timeEtr == '00'" style="position: absolute;color: #fff;left: -20px;bottom: 0">{{ii.timeEtr}}</span> <span v-if="ii.timeEtr == '00'" style="position: absolute;color: #fff;left: -20px;bottom: 0">{{ii.timeEtr}}</span>
<span v-else style="position: absolute;color: #fff;top: -24px;right: 0;">{{ii.timeEtr}}</span> <span v-else style="position: absolute;color: #fff;top: -24px;right: 0;">{{ii.timeEtr}}</span>
<span style="position: absolute;color: #fff;z-index: 11;left: 0;">{{ii.timeStr}}</span> <span style="position: absolute;color: #fff;z-index: 11;left: 0;">{{ii.timeStr}}</span>
...@@ -667,7 +667,7 @@ ...@@ -667,7 +667,7 @@
/** /**
* 根据片区id获取分公司列表 * 根据片区id获取分公司列表
* */ * */
getProvinceRegions(item) { getProvinceRegions(item) {debugger
this.listQuery.zoneId = item; this.listQuery.zoneId = item;
this.listQuery.subordinateBranch = undefined; this.listQuery.subordinateBranch = undefined;
getAllBranchCompanyByZoneId({zoneId: item}) getAllBranchCompanyByZoneId({zoneId: item})
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-form :model="form" :rules="rules" ref="form" label-width="90px"> <el-form :model="form" :rules="rules" ref="form" label-width="90px">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="车型名称"> <el-form-item label="车型名称" prop="name">
<el-input v-model="form.name" placeholder="请输入车型名称"></el-input> <el-input v-model="form.name" placeholder="请输入车型名称"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -189,8 +189,8 @@ ...@@ -189,8 +189,8 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
<el-button type="primary" v-if="title=='创建'" @click="create()">确 定</el-button> <el-button type="primary" v-if="title=='创建'" @click="create('form')">确 定</el-button>
<el-button type="primary" v-if="title=='编辑'&&vehicleTypeList_btn_edit" @click="update()">确 定</el-button> <el-button type="primary" v-if="title=='编辑'&&vehicleTypeList_btn_edit" @click="update('form')">确 定</el-button>
</div> </div>
<!--配置弹框--> <!--配置弹框-->
...@@ -304,20 +304,12 @@ import UE from '../../modal/Ueditor';//百度ue富文本 ...@@ -304,20 +304,12 @@ import UE from '../../modal/Ueditor';//百度ue富文本
showDestinationVisible: false,//编辑目的地 showDestinationVisible: false,//编辑目的地
showPathWayVisible: false,//编辑途径地 showPathWayVisible: false,//编辑途径地
rules: { rules: {
name: [ name: {
{
type: 'string', type: 'string',
required: true, required: true,
message: '请输入消息内容', message: '请输入车型名称',
trigger: 'blur'
},
{
min: 0,
max: 100,
message: '长度小于 100 个字符',
trigger: 'blur' trigger: 'blur'
} }
]
}, },
checkList:[],//已选中的标签 checkList:[],//已选中的标签
allCompanies: {}, allCompanies: {},
...@@ -473,94 +465,108 @@ import UE from '../../modal/Ueditor';//百度ue富文本 ...@@ -473,94 +465,108 @@ import UE from '../../modal/Ueditor';//百度ue富文本
/** /**
* 创建 * 创建
* */ * */
create(){ create(formName){
let params = { const set = this.$refs;
number: this.form.number,//乘卧数量 set[formName].validate(valid => {
brand: this.form.brand,//房车品牌 if (valid) {
name: this.form.name,//房车名称 let params = {
config: this.totalLabel.join(","),//房车配置 number: this.form.number,//乘卧数量
keyword: this.form.keyword,//房车关键标签 brand: this.form.brand,//房车品牌
modelsDetails: this.form.modelsDetails,//房车详情 name: this.form.name,//房车名称
modelParam: JSON.stringify(this.form.modelParam),//房车参数 config: this.totalLabel.join(","),//房车配置
picture: this.form.picture,//轮播图 keyword: this.form.keyword,//房车关键标签
coverPic: this.form.coverPic,//封面图 modelsDetails: this.form.modelsDetails,//房车详情
posterBackground: this.form.posterBackground,//海报背景 modelParam: JSON.stringify(this.form.modelParam),//房车参数
price: this.form.price,//租车价格 picture: this.form.picture,//轮播图
deposit: this.form.deposit,//总押金 coverPic: this.form.coverPic,//封面图
vioDeposit: this.form.vioDeposit, posterBackground: this.form.posterBackground,//海报背景
hotSign: this.form.hotSign,//热门车型 price: this.form.price,//租车价格
rentDiscountStatus: this.form.rentDiscountStatus,//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值 deposit: this.form.deposit,//总押金
buyPrice: this.form.buyPrice,//购买价格 vioDeposit: this.form.vioDeposit,
}; hotSign: this.form.hotSign,//热门车型
if(this.form.rentDiscountStatus == 2){ rentDiscountStatus: this.form.rentDiscountStatus,//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值
params.rentDiscountPrice = this.form.pPrice+","+this.form.hPrice+","+this.form.zPrice//租车优惠价格 固定优化价格 buyPrice: this.form.buyPrice,//购买价格
} };
console.log(params); if(this.form.rentDiscountStatus == 2){
console.log(this.form); params.rentDiscountPrice = this.form.pPrice+","+this.form.hPrice+","+this.form.zPrice//租车优惠价格 固定优化价格
addVehicleModel(params).then(response => { }
if (response.status === 200) { console.log(params);
this.$notify({ console.log(this.form);
title: '成功', addVehicleModel(params).then(response => {
message: '创建成功', if (response.status === 200) {
type: 'success', this.$notify({
duration: 2000 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
});
}
}); });
this.$emit("oneDialogEvent", true);
} else { } else {
this.$notify({ return;
title: '创建失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
} }
}); });
}, },
/** /**
* 编辑 * 编辑
* */ * */
update(){ update(formName){
let params = { const set = this.$refs;
id: this.form.id, set[formName].validate(valid => {
number: this.form.number,//乘卧数量 if (valid) {
brand: this.form.brand,//房车品牌 let params = {
name: this.form.name,//房车名称 id: this.form.id,
config: this.totalLabel.join(","),//房车配置 number: this.form.number,//乘卧数量
keyword: this.form.keyword,//房车关键标签 brand: this.form.brand,//房车品牌
modelsDetails: this.form.modelsDetails,//房车详情 name: this.form.name,//房车名称
modelParam: JSON.stringify(this.form.modelParam),//房车参数 config: this.totalLabel.join(","),//房车配置
picture: this.form.picture,//轮播图 keyword: this.form.keyword,//房车关键标签
price: this.form.price,//租车价格 modelsDetails: this.form.modelsDetails,//房车详情
coverPic: this.form.coverPic,//封面图 modelParam: JSON.stringify(this.form.modelParam),//房车参数
posterBackground: this.form.posterBackground,//海报背景 picture: this.form.picture,//轮播图
deposit: this.form.deposit,//总押金 price: this.form.price,//租车价格
vioDeposit: this.form.vioDeposit, coverPic: this.form.coverPic,//封面图
hotSign: this.form.hotSign,//热门车型 posterBackground: this.form.posterBackground,//海报背景
rentDiscountStatus: this.form.rentDiscountStatus,//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值 deposit: this.form.deposit,//总押金
vioDeposit: this.form.vioDeposit,
hotSign: this.form.hotSign,//热门车型
rentDiscountStatus: this.form.rentDiscountStatus,//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值
// rentDiscountPrice:this.form.pPrice+","+this.form.hPrice+","+this.form.zPrice,//租车优惠价格 固定优化价格 // rentDiscountPrice:this.form.pPrice+","+this.form.hPrice+","+this.form.zPrice,//租车优惠价格 固定优化价格
buyPrice: this.form.buyPrice,//购买价格 buyPrice: this.form.buyPrice,//购买价格
}; };
if(this.form.rentDiscountStatus == 2){ if(this.form.rentDiscountStatus == 2){
params.rentDiscountPrice = this.form.pPrice+","+this.form.hPrice+","+this.form.zPrice//租车优惠价格 固定优化价格 params.rentDiscountPrice = this.form.pPrice+","+this.form.hPrice+","+this.form.zPrice//租车优惠价格 固定优化价格
} }
console.log(params); console.log(params);
console.log(this.form); console.log(this.form);
updateVehicleModel(params).then(response => { updateVehicleModel(params).then(response => {
if (response.status === 200) { if (response.status === 200) {
this.$notify({ this.$notify({
title: '成功', title: '成功',
message: '编辑成功', message: '编辑成功',
type: 'success', type: 'success',
duration: 2000 duration: 2000
});
this.$emit("oneDialogEvent", true);
} else {
this.$notify({
title: '编辑失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
}); });
this.$emit("oneDialogEvent", true);
} else { } else {
this.$notify({ return;
title: '编辑失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
} }
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment