Commit 87025d5f authored by 黄奎's avatar 黄奎

车辆修改

parent 03c13027
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
} }
.busInfo .carPlanOne span { .busInfo .carPlanOne span {
display:inline-block; display: inline-block;
margin-right: 3px; margin-right: 3px;
} }
...@@ -105,21 +105,24 @@ ...@@ -105,21 +105,24 @@
.BusTyleFirst .w150 { .BusTyleFirst .w150 {
margin-right: 22px; margin-right: 22px;
} }
.busAddbtn{
display:inline-block; .busAddbtn {
width:30px; display: inline-block;
height:30px; width: 30px;
border:1px solid #d1d1d1; height: 30px;
border: 1px solid #d1d1d1;
text-align: center; text-align: center;
line-height: 30px; line-height: 30px;
border-radius:50%; border-radius: 50%;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
top:2px; top: 2px;
} }
.busAddbtn:hover i{
color:#e95252; .busAddbtn:hover i {
color: #e95252;
} }
</style> </style>
<template> <template>
<div class="flexOne busInfo"> <div class="flexOne busInfo">
...@@ -186,25 +189,27 @@ ...@@ -186,25 +189,27 @@
</div> </div>
</td> </td>
<td class="carPlanOne" :class="{'otherSpan':index!=0&&index!=PlanTableData.length-1}"> <td class="carPlanOne" :class="{'otherSpan':index!=0&&index!=PlanTableData.length-1}">
<div class="w320"> <div class="w320" v-for="(subItem,subIndex) in item.DetailList">
<!--接机送机-->
<em> <em>
<el-select class="w150" placeholder="请选择" v-model="item.AirportPickUp" :disabled="forbidInput"> <!--接机送机-->
<el-select class="w150" placeholder="请选择" v-model="subItem.AirportPickUp" :disabled="forbidInput">
<el-option :key="0" :value="0" label="请选择"></el-option> <el-option :key="0" :value="0" label="请选择"></el-option>
<el-option v-for="item in BusAirportPickUpList" :key="item.Id" :label="item.Name" :value="item.Id"> <el-option v-for="childitem in BusAirportPickUpList" :key="childitem.Id" :label="childitem.Name"
:value="childitem.Id">
</el-option> </el-option>
</el-select> </el-select>
</em> </em>
<!--用车类型--> <!--用车类型-->
<span v-for="subItem in UseTypeArray"> <span v-for="childItem in UseTypeArray">
<span v-if="subItem.Id==1" class="subName" <span v-if="childItem.Id==1" class="subName"
:class="{'spanCked':item.UseType==subItem.Id,'disSpan':forbidInput==true}" :class="{'spanCked':subItem.UseType==childItem.Id,'disSpan':forbidInput==true}"
@click="UseTypeClick(subItem.Id,index);getBusPrice(item)">{{subItem.Name}}</span> @click="UseTypeClick(childItem.Id,index,subIndex);getBusPrice(subItem)">{{childItem.Name}}</span>
</span> </span>
<span class="busAddbtn" @click=""> <a v-if="subIndex>0" @click="DeleteSubItem(item,subIndex)" style="color:blue;cursor:pointer">删除</a>
</div>
<span class="busAddbtn" @click="AddSubItem(item)">
<i class="iconfont icon-img_haha"></i> <i class="iconfont icon-img_haha"></i>
</span> </span>
</div>
</td> </td>
<td> <td>
<el-input class='w170' type="text" v-model="item.BookGroup"></el-input> <el-input class='w170' type="text" v-model="item.BookGroup"></el-input>
...@@ -501,6 +506,18 @@ ...@@ -501,6 +506,18 @@
obj.CostPrice = money obj.CostPrice = money
} }
}, },
AddSubItem(item) {
item.DetailList.push({
DetailId: 0,
UseType: 0,
BusPlanId: 0,
AirportPickUp: 0
});
},
DeleteSubItem(item,index)
{
item.DetailList.splice(index,1);
},
/*获取车辆类型列表*/ /*获取车辆类型列表*/
getBusTypeList() { getBusTypeList() {
this.apipost( this.apipost(
...@@ -545,7 +562,6 @@ ...@@ -545,7 +562,6 @@
x.BookGroup = this.$route.query.NewCombinationNum; x.BookGroup = this.$route.query.NewCombinationNum;
} }
}) })
console.log(this.PlanTableData,'datalist');
} }
}, },
null null
...@@ -602,17 +618,17 @@ ...@@ -602,17 +618,17 @@
}, err => {}) }, err => {})
}, },
//用车类型点击事件 //用车类型点击事件
UseTypeClick(value, index) { UseTypeClick(value, index,subIndex) {
if (this.forbidInput == true) { if (this.forbidInput == true) {
return; return;
} }
if ( if (
this.PlanTableData[index].UseType == "0" || this.PlanTableData[index].DetailList[subIndex].UseType == "0" ||
this.PlanTableData[index].UseType != value this.PlanTableData[index].DetailList[subIndex].UseType != value
) { ) {
this.PlanTableData[index].UseType = value; this.PlanTableData[index].DetailList[subIndex].UseType = value;
} else if (this.PlanTableData[index].UseType == value) { } else if (this.PlanTableData[index].DetailList[subIndex].UseType == value) {
this.PlanTableData[index].UseType = "0"; this.PlanTableData[index].DetailList[subIndex].UseType = "0";
} }
}, },
//司机住宿点击事件 //司机住宿点击事件
...@@ -773,4 +789,5 @@ ...@@ -773,4 +789,5 @@
this.getSupplierList(); this.getSupplierList();
} }
}; };
</script> </script>
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