Commit b505a8bd authored by zhengke's avatar zhengke

增加添加条数

parent 56fe5017
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
text-align: center; text-align: center;
height: 40px; height: 40px;
} }
.busManagerTalbe tr td{
padding:0 5px;
}
.commonBackColor { .commonBackColor {
background-color: #E6E6E6; background-color: #E6E6E6;
color: #333; color: #333;
...@@ -25,7 +27,15 @@ ...@@ -25,7 +27,15 @@
color: #fff; color: #fff;
border: 1px solid #d1d1d1; border: 1px solid #d1d1d1;
} }
.addHandBook{
margin-right: 5px;
color: seagreen;
cursor: pointer;
visibility: hidden;
}
.addHandBookDIS{
visibility: visible!important;
}
</style> </style>
<template> <template>
<div> <div>
...@@ -73,9 +83,10 @@ ...@@ -73,9 +83,10 @@
<td class="commonBackColor">ホテル</td> <td class="commonBackColor">ホテル</td>
<td class="commonBackColor">ホテルTEL</td> <td class="commonBackColor">ホテルTEL</td>
</tr> </tr>
<tr v-for="subItem in DataObj.Details_Extends"> <tr v-for="(subItem,index) in DataObj.Details_Extends">
<td> <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>
<td> <td>
<el-input type="text" v-model="subItem.BusType" /> <el-input type="text" v-model="subItem.BusType" />
...@@ -163,6 +174,7 @@ ...@@ -163,6 +174,7 @@
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.DataObj = res.data.data; this.DataObj = res.data.data;
console.log(this.DataObj,'dataObj');
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -182,6 +194,30 @@ ...@@ -182,6 +194,30 @@
this.isSave = false; this.isSave = false;
}, err => {}) }, 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() { 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