Commit b505a8bd authored by zhengke's avatar zhengke

增加添加条数

parent 56fe5017
......@@ -9,7 +9,9 @@
text-align: center;
height: 40px;
}
.busManagerTalbe tr td{
padding:0 5px;
}
.commonBackColor {
background-color: #E6E6E6;
color: #333;
......@@ -25,7 +27,15 @@
color: #fff;
border: 1px solid #d1d1d1;
}
.addHandBook{
margin-right: 5px;
color: seagreen;
cursor: pointer;
visibility: hidden;
}
.addHandBookDIS{
visibility: visible!important;
}
</style>
<template>
<div>
......@@ -73,9 +83,10 @@
<td class="commonBackColor">ホテル</td>
<td class="commonBackColor">ホテルTEL</td>
</tr>
<tr v-for="subItem in DataObj.Details_Extends">
<tr v-for="(subItem,index) in DataObj.Details_Extends">
<td>
{{subItem.UseDate}}
<i class="iconfont icon-bumenguanli-tianjia addHandBook" :class="{'addHandBookDIS':index==0||index==DataObj.Details_Extends.length-1}" @click="addHand(index)"></i>
<el-date-picker v-model='subItem.UseDate' class='w135' value-format="yyyy-MM-dd" type="date"></el-date-picker>
</td>
<td>
<el-input type="text" v-model="subItem.BusType" />
......@@ -163,6 +174,7 @@
this.loading = false;
if (res.data.resultCode == 1) {
this.DataObj = res.data.data;
console.log(this.DataObj,'dataObj');
} else {
this.Error(res.data.message);
}
......@@ -182,6 +194,30 @@
this.isSave = false;
}, err => {})
}
},
//添加
addHand(index){
var obj = {
BusContent:'',
BusType:'',
FlightNum:'',
HotelName:'',
HotelTel:'',
Id:0,
MainId:0,
UseDate:''
}
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
var UseDate = year+'-'+month+"-"+day;
obj.UseDate = UseDate
if(index==0){
this.DataObj.Details_Extends.unshift(obj)
}else{
this.DataObj.Details_Extends.push(obj);
}
}
},
mounted() {
......
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