Commit ac5f983a authored by lixy's avatar lixy

车型列表

parent 9b697150
......@@ -128,7 +128,7 @@
<el-table-column width="60" align="center" :label="item.day" v-for="item in tempDayList" :key="item.day">
<template scope="scope">
<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-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>
......@@ -667,7 +667,7 @@
/**
* 根据片区id获取分公司列表
* */
getProvinceRegions(item) {
getProvinceRegions(item) {debugger
this.listQuery.zoneId = item;
this.listQuery.subordinateBranch = undefined;
getAllBranchCompanyByZoneId({zoneId: item})
......
......@@ -5,7 +5,7 @@
<el-form :model="form" :rules="rules" ref="form" label-width="90px">
<el-row>
<el-col :span="8">
<el-form-item label="车型名称">
<el-form-item label="车型名称" prop="name">
<el-input v-model="form.name" placeholder="请输入车型名称"></el-input>
</el-form-item>
</el-col>
......@@ -189,8 +189,8 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" v-if="title=='创建'" @click="create()">确 定</el-button>
<el-button type="primary" v-if="title=='编辑'&&vehicleTypeList_btn_edit" @click="update()">确 定</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('form')">确 定</el-button>
</div>
<!--配置弹框-->
......@@ -304,20 +304,12 @@ import UE from '../../modal/Ueditor';//百度ue富文本
showDestinationVisible: false,//编辑目的地
showPathWayVisible: false,//编辑途径地
rules: {
name: [
{
name: {
type: 'string',
required: true,
message: '请输入消息内容',
trigger: 'blur'
},
{
min: 0,
max: 100,
message: '长度小于 100 个字符',
message: '请输入车型名称',
trigger: 'blur'
}
]
},
checkList:[],//已选中的标签
allCompanies: {},
......@@ -473,94 +465,108 @@ import UE from '../../modal/Ueditor';//百度ue富文本
/**
* 创建
* */
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,//轮播图
coverPic: this.form.coverPic,//封面图
posterBackground: this.form.posterBackground,//海报背景
price: this.form.price,//租车价格
deposit: this.form.deposit,//总押金
vioDeposit: this.form.vioDeposit,
hotSign: this.form.hotSign,//热门车型
rentDiscountStatus: this.form.rentDiscountStatus,//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值
buyPrice: this.form.buyPrice,//购买价格
};
if(this.form.rentDiscountStatus == 2){
params.rentDiscountPrice = this.form.pPrice+","+this.form.hPrice+","+this.form.zPrice//租车优惠价格 固定优化价格
}
console.log(params);
console.log(this.form);
addVehicleModel(params).then(response => {
if (response.status === 200) {
this.$notify({
title: '成功',
message: '创建成功',
type: 'success',
duration: 2000
create(formName){
const set = this.$refs;
set[formName].validate(valid => {
if (valid) {
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,//轮播图
coverPic: this.form.coverPic,//封面图
posterBackground: this.form.posterBackground,//海报背景
price: this.form.price,//租车价格
deposit: this.form.deposit,//总押金
vioDeposit: this.form.vioDeposit,
hotSign: this.form.hotSign,//热门车型
rentDiscountStatus: this.form.rentDiscountStatus,//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值
buyPrice: this.form.buyPrice,//购买价格
};
if(this.form.rentDiscountStatus == 2){
params.rentDiscountPrice = this.form.pPrice+","+this.form.hPrice+","+this.form.zPrice//租车优惠价格 固定优化价格
}
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
});
}
});
this.$emit("oneDialogEvent", true);
} else {
this.$notify({
title: '创建失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
return;
}
});
},
/**
* 编辑
* */
update(){
let params = {
id: this.form.id,
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,//租车价格
coverPic: this.form.coverPic,//封面图
posterBackground: this.form.posterBackground,//海报背景
deposit: this.form.deposit,//总押金
vioDeposit: this.form.vioDeposit,
hotSign: this.form.hotSign,//热门车型
rentDiscountStatus: this.form.rentDiscountStatus,//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值
update(formName){
const set = this.$refs;
set[formName].validate(valid => {
if (valid) {
let params = {
id: this.form.id,
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,//租车价格
coverPic: this.form.coverPic,//封面图
posterBackground: this.form.posterBackground,//海报背景
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,//租车优惠价格 固定优化价格
buyPrice: this.form.buyPrice,//购买价格
};
if(this.form.rentDiscountStatus == 2){
params.rentDiscountPrice = this.form.pPrice+","+this.form.hPrice+","+this.form.zPrice//租车优惠价格 固定优化价格
}
console.log(params);
console.log(this.form);
updateVehicleModel(params).then(response => {
if (response.status === 200) {
this.$notify({
title: '成功',
message: '编辑成功',
type: 'success',
duration: 2000
buyPrice: this.form.buyPrice,//购买价格
};
if(this.form.rentDiscountStatus == 2){
params.rentDiscountPrice = this.form.pPrice+","+this.form.hPrice+","+this.form.zPrice//租车优惠价格 固定优化价格
}
console.log(params);
console.log(this.form);
updateVehicleModel(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
});
}
});
this.$emit("oneDialogEvent", true);
} else {
this.$notify({
title: '编辑失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
return;
}
});
},
......
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