|
|
@ -4,8 +4,8 @@
|
|
|
|
<a-col :md="24" :sm="24" style="padding: 0 0 0 0">
|
|
|
|
<a-col :md="24" :sm="24" style="padding: 0 0 0 0">
|
|
|
|
<div class="nav-box">
|
|
|
|
<div class="nav-box">
|
|
|
|
<div class="nav" @click="addBooking"><i class="iconfont icon-jiahao2fill"></i>新建</div>
|
|
|
|
<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" @click="copyBooking"><i class="iconfont icon-fuzhi"></i>复制</div>
|
|
|
|
<div class="nav"><i class="iconfont icon-fuzhi1"></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-bianjiwenjian"></i>批量编辑</div>
|
|
|
|
<div class="nav"><i class="iconfont icon-shujushangchuan-shixin"></i>批量VGM</div>
|
|
|
|
<div class="nav"><i class="iconfont icon-shujushangchuan-shixin"></i>批量VGM</div>
|
|
|
|
<div class="nav"><i class="iconfont icon-shishijifei"></i>定时订舱</div>
|
|
|
|
<div class="nav"><i class="iconfont icon-shishijifei"></i>定时订舱</div>
|
|
|
@ -57,7 +57,7 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</vxe-toolbar>
|
|
|
|
</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 }">
|
|
|
|
<template #operate="{ row }">
|
|
|
|
<vxe-button type="text" icon="vxe-icon-edit" @click="editColumns(row)"></vxe-button>
|
|
|
|
<vxe-button type="text" icon="vxe-icon-edit" @click="editColumns(row)"></vxe-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -371,6 +371,9 @@ export default {
|
|
|
|
console.log('=新的clomn=', this.columns)
|
|
|
|
console.log('=新的clomn=', this.columns)
|
|
|
|
this.$forceUpdate()
|
|
|
|
this.$forceUpdate()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
handledbclick ({row}) {
|
|
|
|
|
|
|
|
this.editColumns(row)
|
|
|
|
|
|
|
|
},
|
|
|
|
editColumns(row) {
|
|
|
|
editColumns(row) {
|
|
|
|
console.log(row)
|
|
|
|
console.log(row)
|
|
|
|
this.$router.push({ name: 'BookingDetail', query: { id: row.id, type: row.carrierid } })
|
|
|
|
this.$router.push({ name: 'BookingDetail', query: { id: row.id, type: row.carrierid } })
|
|
|
@ -413,8 +416,33 @@ export default {
|
|
|
|
addBooking() {
|
|
|
|
addBooking() {
|
|
|
|
this.addVisible = !this.addVisible
|
|
|
|
this.addVisible = !this.addVisible
|
|
|
|
},
|
|
|
|
},
|
|
|
|
addBooking1() {
|
|
|
|
copyBooking() {
|
|
|
|
this.$router.push({ name: 'BookingDetail', query: { id: 22 } })
|
|
|
|
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() {
|
|
|
|
addSubmit() {
|
|
|
|
this.addVisible = false
|
|
|
|
this.addVisible = false
|
|
|
|