|
|
|
@ -4,8 +4,8 @@
|
|
|
|
|
<a-col :md="24" :sm="24" style="padding: 0 0 0 0">
|
|
|
|
|
<div class="nav-box">
|
|
|
|
|
<div class="nav" @click="addBooking"><i class="iconfont icon-jiahao2fill"></i>新建</div>
|
|
|
|
|
<div class="nav" @click="addBooking1"><i class="iconfont icon-fuzhi"></i>复制</div>
|
|
|
|
|
<div class="nav"><i class="iconfont icon-fuzhi1"></i>复制多票</div>
|
|
|
|
|
<div class="nav" @click="copyBooking"><i class="iconfont icon-fuzhi"></i>复制</div>
|
|
|
|
|
<div class="nav" @click="copyBookingMore"><i class="iconfont icon-fuzhi1"></i>复制多票</div>
|
|
|
|
|
<div class="nav"><i class="iconfont icon-bianjiwenjian"></i>批量编辑</div>
|
|
|
|
|
<div class="nav"><i class="iconfont icon-shujushangchuan-shixin"></i>批量VGM</div>
|
|
|
|
|
<div class="nav"><i class="iconfont icon-shishijifei"></i>定时订舱</div>
|
|
|
|
@ -57,7 +57,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-toolbar>
|
|
|
|
|
<vxe-grid ref="xGrid" v-bind="gridOptions" @page-change="handlePageChange" @cell-dblclick="editColumns">
|
|
|
|
|
<vxe-grid ref="xGrid" v-bind="gridOptions" @page-change="handlePageChange" @cell-dblclick="handledbclick">
|
|
|
|
|
<template #operate="{ row }">
|
|
|
|
|
<vxe-button type="text" icon="vxe-icon-edit" @click="editColumns(row)"></vxe-button>
|
|
|
|
|
</template>
|
|
|
|
@ -371,6 +371,9 @@ export default {
|
|
|
|
|
console.log('=新的clomn=', this.columns)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
},
|
|
|
|
|
handledbclick ({row}) {
|
|
|
|
|
this.editColumns(row)
|
|
|
|
|
},
|
|
|
|
|
editColumns(row) {
|
|
|
|
|
console.log(row)
|
|
|
|
|
this.$router.push({ name: 'BookingDetail', query: { id: row.id, type: row.carrierid } })
|
|
|
|
@ -413,8 +416,33 @@ export default {
|
|
|
|
|
addBooking() {
|
|
|
|
|
this.addVisible = !this.addVisible
|
|
|
|
|
},
|
|
|
|
|
addBooking1() {
|
|
|
|
|
this.$router.push({ name: 'BookingDetail', query: { id: 22 } })
|
|
|
|
|
copyBooking() {
|
|
|
|
|
const select = this.$refs.xGrid.getCheckboxRecords()
|
|
|
|
|
const pkIdArr = select.map((item, index) => {
|
|
|
|
|
return item.id
|
|
|
|
|
})
|
|
|
|
|
if (pkIdArr.length > 1) {
|
|
|
|
|
this.$message.error('请选择一条数据')
|
|
|
|
|
return false
|
|
|
|
|
} else if (pkIdArr.length === 0) {
|
|
|
|
|
this.$message.error('请至少选择一条数据')
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
this.$router.push({ name: 'BookingDetail', query: { id: pkIdArr[0], isCopy: true } })
|
|
|
|
|
},
|
|
|
|
|
copyBookingMore() {
|
|
|
|
|
const select = this.$refs.xGrid.getCheckboxRecords()
|
|
|
|
|
const pkIdArr = select.map((item, index) => {
|
|
|
|
|
return item.id
|
|
|
|
|
})
|
|
|
|
|
if (pkIdArr.length === 0) {
|
|
|
|
|
this.$message.error('请至少选择一条数据')
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
// 有问题
|
|
|
|
|
// pkIdArr.map((item, index) => {
|
|
|
|
|
// this.$router.push({ name: 'BookingDetail', query: { id: item, isCopy: true } })
|
|
|
|
|
// })
|
|
|
|
|
},
|
|
|
|
|
addSubmit() {
|
|
|
|
|
this.addVisible = false
|
|
|
|
|