Commit 1a35e3a0 authored by zhengke's avatar zhengke

行程下载修改信息增加上移下移

parent 68d43c62
......@@ -454,7 +454,7 @@
</div>
</div>
</div>
<el-dialog title="修改信息" :visible.sync="editMsgShow" center>
<el-dialog title="修改信息" custom-class="confirmOrder" :visible.sync="editMsgShow" center>
<el-form :model="editForm" label-width="100px">
<p class="edit_form_box_tit">集合地点&联系人</p>
<div class="edit_form_box">
......@@ -527,6 +527,14 @@
<el-button type="danger" icon="el-icon-delete" @click="removePriceFlight(index,priceFlight,1)"
circle></el-button>
</el-tooltip>
<el-tooltip class="item" v-if="index!=0" style="margin-left:0" effect="dark" content="上移" placement="top-start">
<el-button type="danger" icon="iconfont icon-shangyi" @click="MoveItem(priceFlight,index,0)"
circle></el-button>
</el-tooltip>
<el-tooltip class="item" v-if="index!=editForm.travelOrderFlightList.length-1" style="margin-left:0" effect="dark" content="下移" placement="top-start">
<el-button type="danger" icon="iconfont icon-xiayi1" @click="MoveItem(priceFlight,index,1)"
circle></el-button>
</el-tooltip>
</td>
</tr>
</table>
......@@ -1115,7 +1123,29 @@
this.$set(this.tripList, j, x)
x.dateTime = this.setDate(j);
})
}
},
//上移下移(IsUp:0上移,1下移)
MoveItem(item, subIndex, IsUp) {
var currentItem = this.editForm.travelOrderFlightList[subIndex];
//上移
if (IsUp == 0) {
if (subIndex > 0) {
var upItem = this.editForm.travelOrderFlightList[subIndex - 1];
this.$set(this.editForm.travelOrderFlightList, subIndex - 1, currentItem);
this.$set(this.editForm.travelOrderFlightList, subIndex, upItem);
this.$forceUpdate();
}
} else {
//下移
if (subIndex != this.editForm.travelOrderFlightList.length - 1) {
var downItem = this.editForm.travelOrderFlightList[subIndex + 1];
this.$set(this.editForm.travelOrderFlightList, subIndex + 1, currentItem);
this.$set(this.editForm.travelOrderFlightList, subIndex, downItem);
this.$forceUpdate();
}
}
},
},
components: {
oneday,
......
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