Commit 24697171 authored by qiaoyajun's avatar qiaoyajun

修改航班时间

parent e2eb1c23
...@@ -65,11 +65,17 @@ ...@@ -65,11 +65,17 @@
</td> </td>
<td>{{priceFlight.DepartureAirPortName}}</td> <td>{{priceFlight.DepartureAirPortName}}</td>
<td> <td>
{{priceFlight.DepartureTime}} <el-input v-if="priceFlight.IsShowTime||priceFlight.IsShow" placeholder="起飞时间" class="w120"
v-model="priceFlight.DepartureTime">
</el-input>
<span v-else>{{priceFlight.DepartureTime}}</span>
</td> </td>
<td>{{priceFlight.ArrivalAirPortName}}</td> <td>{{priceFlight.ArrivalAirPortName}}</td>
<td> <td>
{{priceFlight.ArrivalTime}} <el-input v-if="priceFlight.IsShowTime||priceFlight.IsShow" placeholder="到达时间" class="w120"
v-model="priceFlight.ArrivalTime">
</el-input>
<span v-else> {{priceFlight.ArrivalTime}}</span>
</td> </td>
<td> <td>
<el-date-picker v-if="priceFlight.IsShow" class="w110" :clearable="false" v-model="priceFlight.StartDate" <el-date-picker v-if="priceFlight.IsShow" class="w110" :clearable="false" v-model="priceFlight.StartDate"
...@@ -86,6 +92,18 @@ ...@@ -86,6 +92,18 @@
<span v-else>{{priceFlight.TicketType==1?'去程':'回程'}}</span> <span v-else>{{priceFlight.TicketType==1?'去程':'回程'}}</span>
</td> </td>
<td> <td>
<el-tooltip class="item" effect="dark" content="修改时间" placement="top-start"
v-if="!priceFlight.IsShowTime">
<el-button v-if="IsBindFlight" type="primary" icon="el-icon-edit" @click="TimeStatusChange(priceFlight)"
circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="保存时间" placement="top-start" v-if="priceFlight.IsShowTime">
<el-button v-if="IsBindFlight" type="primary" icon="iconfont icon-baocun"
@click="saveAirticketFlightTime(priceFlight)" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="修改" placement="top-start" v-if="!priceFlight.IsShow"> <el-tooltip class="item" effect="dark" content="修改" placement="top-start" v-if="!priceFlight.IsShow">
<el-button v-if="!IsBindFlight" type="primary" icon="el-icon-edit" @click="StatusChange(priceFlight)" <el-button v-if="!IsBindFlight" type="primary" icon="el-icon-edit" @click="StatusChange(priceFlight)"
circle></el-button> circle></el-button>
...@@ -190,6 +208,10 @@ ...@@ -190,6 +208,10 @@
StatusChange (item) { StatusChange (item) {
item.IsShow = !item.IsShow item.IsShow = !item.IsShow
}, },
//状态切换
TimeStatusChange (item) {
item.IsShowTime = !item.IsShowTime
},
//初始化航空公司下拉 //初始化航空公司下拉
initAirlines () { initAirlines () {
this.apipost( this.apipost(
...@@ -253,7 +275,9 @@ ...@@ -253,7 +275,9 @@
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
if (res.data.data != null) { if (res.data.data != null) {
console.log('res.data.data', res.data.data)
res.data.data.forEach(x => { res.data.data.forEach(x => {
x['IsShowTime'] = false
this.priceFlightList.push(x) this.priceFlightList.push(x)
}) })
this.headCallBack() this.headCallBack()
...@@ -306,6 +330,26 @@ ...@@ -306,6 +330,26 @@
) )
this.headCallBack() this.headCallBack()
}, },
//保存时间信息
saveAirticketFlightTime (item) {
item.IsShowTime = false
let msg = {
id: item.ID,
departureTime: item.DepartureTime,
arriveTime: item.ArrivalTime,
}
console.log('msg', msg)
this.apipost('travel_post_ModifyAirticketFlightTimeById', msg, res => {
if (res.data.resultCode == 1) {
} else {
this.Warning(res.data.message)
}
},
err => {
}
)
},
//删除航班信息 //删除航班信息
removePriceFlight (index, item, type) { removePriceFlight (index, item, type) {
var that = this var that = this
......
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