|
|
@ -1,16 +1,16 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="main">
|
|
|
|
<div class="main">
|
|
|
|
<div class="btn-list">
|
|
|
|
<div class="btn-list">
|
|
|
|
<a-input
|
|
|
|
<span v-if="details.bookingno">{{ details.bookingno }}</span>
|
|
|
|
style="display: inline-block;width: 160px;"
|
|
|
|
|
|
|
|
v-if="details.bookingno"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
v-model="details.bookingno" />
|
|
|
|
|
|
|
|
<a-button type="primary" @click="handleSave">保存</a-button>
|
|
|
|
<a-button type="primary" @click="handleSave">保存</a-button>
|
|
|
|
<a-button type="primary" @click="handleCopy">复制</a-button>
|
|
|
|
<a-button type="primary" @click="handleCopy">复制</a-button>
|
|
|
|
<a-button type="primary">存为模板</a-button>
|
|
|
|
<a-button type="primary">存为模板</a-button>
|
|
|
|
<a-button type="danger" @click="handleDelete">删除</a-button>
|
|
|
|
<a-button type="danger" v-if="details.bsstatus == '已录入'" @click="handleDelete">删除</a-button>
|
|
|
|
<a-button type="primary">发送订舱</a-button>
|
|
|
|
<a-button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
@click="handleSubimt"
|
|
|
|
|
|
|
|
v-if="details.bsstatus == '已录入' || details.bsstatus == '已驳回'">发送订舱</a-button>
|
|
|
|
|
|
|
|
<a-button type="danger" @click="handleCancle" v-if="details.bsstatus == '已提交'">撤销</a-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<a-spin :spinning="loading">
|
|
|
|
<a-spin :spinning="loading">
|
|
|
|
<div class="box">
|
|
|
|
<div class="box">
|
|
|
@ -726,7 +726,10 @@ import datePickerView from '../../BookingLedger/detail/components/datePickerView
|
|
|
|
import autoView from '../../BookingLedger/detail/components/autoView'
|
|
|
|
import autoView from '../../BookingLedger/detail/components/autoView'
|
|
|
|
import textareaView from '../../BookingLedger/detail/components/textareaView'
|
|
|
|
import textareaView from '../../BookingLedger/detail/components/textareaView'
|
|
|
|
import { UploadTempFile, BookingCustomerOrderGetFile } from '@/api/modular/system/fileManage'
|
|
|
|
import { UploadTempFile, BookingCustomerOrderGetFile } from '@/api/modular/system/fileManage'
|
|
|
|
import { BookingCustomerOrderSave, BookingTemplateAdd, BookingCustomerOrderGet, BookingCustomerOrderDelete } from '@/api/modular/main/BookingLedger'
|
|
|
|
import {
|
|
|
|
|
|
|
|
BookingCustomerOrderSave, BookingTemplateAdd, BookingCustomerOrderGet,
|
|
|
|
|
|
|
|
BookingCustomerOrderDelete, BookingCustomerOrderSubmit, BookingCustomerOrderCancelSubmit
|
|
|
|
|
|
|
|
} from '@/api/modular/main/BookingLedger'
|
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
@ -748,6 +751,7 @@ export default {
|
|
|
|
const hisData = {
|
|
|
|
const hisData = {
|
|
|
|
bookingDetails: this.details,
|
|
|
|
bookingDetails: this.details,
|
|
|
|
isCopy: this.isCopy,
|
|
|
|
isCopy: this.isCopy,
|
|
|
|
|
|
|
|
fileList: this.fileList,
|
|
|
|
id: this.id
|
|
|
|
id: this.id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (Object.keys(this.$refs).includes('sedOrder')) {
|
|
|
|
if (Object.keys(this.$refs).includes('sedOrder')) {
|
|
|
@ -759,6 +763,7 @@ export default {
|
|
|
|
const hisData = {
|
|
|
|
const hisData = {
|
|
|
|
bookingDetails: this.details,
|
|
|
|
bookingDetails: this.details,
|
|
|
|
isCopy: this.isCopy,
|
|
|
|
isCopy: this.isCopy,
|
|
|
|
|
|
|
|
fileList: this.fileList,
|
|
|
|
id: this.id
|
|
|
|
id: this.id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$set(this.historyData, this.id, hisData)
|
|
|
|
this.$set(this.historyData, this.id, hisData)
|
|
|
@ -773,6 +778,7 @@ export default {
|
|
|
|
if (this.isCopy) {
|
|
|
|
if (this.isCopy) {
|
|
|
|
const hisData = {
|
|
|
|
const hisData = {
|
|
|
|
bookingDetails: this.details,
|
|
|
|
bookingDetails: this.details,
|
|
|
|
|
|
|
|
fileList: this.fileList,
|
|
|
|
isCopy: this.isCopy,
|
|
|
|
isCopy: this.isCopy,
|
|
|
|
id: this.id
|
|
|
|
id: this.id
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -785,6 +791,7 @@ export default {
|
|
|
|
const hisData = {
|
|
|
|
const hisData = {
|
|
|
|
bookingDetails: this.details,
|
|
|
|
bookingDetails: this.details,
|
|
|
|
isCopy: this.isCopy,
|
|
|
|
isCopy: this.isCopy,
|
|
|
|
|
|
|
|
fileList: this.fileList,
|
|
|
|
id: this.id
|
|
|
|
id: this.id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$set(this.historyData, this.id, hisData)
|
|
|
|
this.$set(this.historyData, this.id, hisData)
|
|
|
@ -853,6 +860,7 @@ export default {
|
|
|
|
if (Object.keys(this.historyData).includes(`copy-${newId}`) && this.$route.query.isCopy === 'true') {
|
|
|
|
if (Object.keys(this.historyData).includes(`copy-${newId}`) && this.$route.query.isCopy === 'true') {
|
|
|
|
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`]))
|
|
|
|
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`]))
|
|
|
|
this.details = $data.bookingDetails
|
|
|
|
this.details = $data.bookingDetails
|
|
|
|
|
|
|
|
this.fileList = $data.fileList
|
|
|
|
this.id = this.$route.query.id
|
|
|
|
this.id = this.$route.query.id
|
|
|
|
this.isCopy = this.$route.query.isCopy
|
|
|
|
this.isCopy = this.$route.query.isCopy
|
|
|
|
this.$forceUpdate()
|
|
|
|
this.$forceUpdate()
|
|
|
@ -861,11 +869,13 @@ export default {
|
|
|
|
this.isCopy = this.$route.query.isCopy
|
|
|
|
this.isCopy = this.$route.query.isCopy
|
|
|
|
const $data = JSON.parse(JSON.stringify(this.historyData[newId]))
|
|
|
|
const $data = JSON.parse(JSON.stringify(this.historyData[newId]))
|
|
|
|
this.details = $data.bookingDetails
|
|
|
|
this.details = $data.bookingDetails
|
|
|
|
|
|
|
|
this.fileList = $data.fileList
|
|
|
|
if (this.isCopy && !$data.isCopy) {
|
|
|
|
if (this.isCopy && !$data.isCopy) {
|
|
|
|
$data.bookingDetails.copyId = this.$route.query.id
|
|
|
|
$data.bookingDetails.copyId = this.$route.query.id
|
|
|
|
$data.bookingDetails.id = 0
|
|
|
|
$data.bookingDetails.id = 0
|
|
|
|
$data.bookingDetails.bookingno = ''
|
|
|
|
$data.bookingDetails.bookingno = ''
|
|
|
|
$data.bookingDetails.files = {}
|
|
|
|
$data.bookingDetails.files = {}
|
|
|
|
|
|
|
|
this.fileList = []
|
|
|
|
$data.bookingDetails.tempFileNames = []
|
|
|
|
$data.bookingDetails.tempFileNames = []
|
|
|
|
this.details = $data.bookingDetails
|
|
|
|
this.details = $data.bookingDetails
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -885,23 +895,18 @@ export default {
|
|
|
|
item.label = item.name
|
|
|
|
item.label = item.name
|
|
|
|
item.value = item.code
|
|
|
|
item.value = item.code
|
|
|
|
})
|
|
|
|
})
|
|
|
|
// const shipperScroll = document.getElementById('shipper-scroll')
|
|
|
|
if (this.$route.query.id) {
|
|
|
|
// if (shipperScroll) {
|
|
|
|
|
|
|
|
// shipperScroll.addEventListener('scroll', () => {
|
|
|
|
|
|
|
|
// document.getElementById('shipper-scroll-right').scrollTop = shipperScroll.scrollTop
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// const consigneeScroll = document.getElementById('consignee-scroll')
|
|
|
|
|
|
|
|
// consigneeScroll.addEventListener('scroll', () => {
|
|
|
|
|
|
|
|
// document.getElementById('consignee-scroll-right').scrollTop = consigneeScroll.scrollTop
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// const notifypartyScroll = document.getElementById('notifyparty-scroll')
|
|
|
|
|
|
|
|
// notifypartyScroll.addEventListener('scroll', () => {
|
|
|
|
|
|
|
|
// document.getElementById('notifyparty-scroll-right').scrollTop = notifypartyScroll.scrollTop
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
if (this.id) {
|
|
|
|
|
|
|
|
this.isAdd = false
|
|
|
|
this.isAdd = false
|
|
|
|
this.getDetail()
|
|
|
|
this.getDetail()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.details = {
|
|
|
|
|
|
|
|
shipper: '',
|
|
|
|
|
|
|
|
serviceList: [],
|
|
|
|
|
|
|
|
notifyparty: '',
|
|
|
|
|
|
|
|
consignee: '',
|
|
|
|
|
|
|
|
ctnList: []
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.fileList = []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleCopy() {
|
|
|
|
handleCopy() {
|
|
|
@ -910,6 +915,32 @@ export default {
|
|
|
|
query: { id: this.id, isCopy: true }
|
|
|
|
query: { id: this.id, isCopy: true }
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
handleSubimt() {
|
|
|
|
|
|
|
|
this.loading = true
|
|
|
|
|
|
|
|
BookingCustomerOrderSubmit([this.details.id]).then(res => {
|
|
|
|
|
|
|
|
if (res.success) {
|
|
|
|
|
|
|
|
this.loading = false
|
|
|
|
|
|
|
|
this.$message.success('提交成功')
|
|
|
|
|
|
|
|
this.getDetail()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
|
|
|
this.loading = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleCancle() {
|
|
|
|
|
|
|
|
this.loading = true
|
|
|
|
|
|
|
|
BookingCustomerOrderCancelSubmit([this.details.id]).then(res => {
|
|
|
|
|
|
|
|
if (res.success) {
|
|
|
|
|
|
|
|
this.loading = false
|
|
|
|
|
|
|
|
this.$message.success('撤销成功')
|
|
|
|
|
|
|
|
this.getDetail()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
|
|
|
this.loading = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
getDetail() {
|
|
|
|
getDetail() {
|
|
|
|
const data = {
|
|
|
|
const data = {
|
|
|
|
id: this.id
|
|
|
|
id: this.id
|
|
|
@ -993,21 +1024,29 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (Object.values(data.files).length === 0) {
|
|
|
|
if (data.files && Object.values(data.files).length === 0) {
|
|
|
|
delete data.files
|
|
|
|
delete data.files
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!data.id && !this.isCopy) {
|
|
|
|
if (!data.id && !this.isCopy) {
|
|
|
|
data.id = this.id
|
|
|
|
data.id = this.id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.loading = true
|
|
|
|
this.loading = true
|
|
|
|
BookingCustomerOrderSave(data).then(res => {
|
|
|
|
BookingCustomerOrderSave(data).then(res => {
|
|
|
|
if (res.success) {
|
|
|
|
if (res.success) {
|
|
|
|
this.$message.success('操作成功')
|
|
|
|
this.$message.success('操作成功')
|
|
|
|
this.loading = false
|
|
|
|
this.loading = false
|
|
|
|
|
|
|
|
this.getDetail()
|
|
|
|
|
|
|
|
this.id = res.data.id
|
|
|
|
if (this.isCopy) {
|
|
|
|
if (this.isCopy) {
|
|
|
|
this.isCopy = false
|
|
|
|
this.isCopy = false
|
|
|
|
this.id = res.data.id
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.$router.replace({
|
|
|
|
|
|
|
|
name: 'BookingCustomerDetail',
|
|
|
|
|
|
|
|
query: {
|
|
|
|
|
|
|
|
id: res.data.id
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.loading = false
|
|
|
|
this.loading = false
|
|
|
|
this.$message.error(res.message)
|
|
|
|
this.$message.error(res.message)
|
|
|
@ -1367,6 +1406,7 @@ export default {
|
|
|
|
.main {
|
|
|
|
.main {
|
|
|
|
padding-bottom: 60px;
|
|
|
|
padding-bottom: 60px;
|
|
|
|
position: sticky;
|
|
|
|
position: sticky;
|
|
|
|
|
|
|
|
|
|
|
|
.box {
|
|
|
|
.box {
|
|
|
|
background: white;
|
|
|
|
background: white;
|
|
|
|
padding: 10px;
|
|
|
|
padding: 10px;
|
|
|
@ -1380,6 +1420,7 @@ export default {
|
|
|
|
margin-bottom: 15px;
|
|
|
|
margin-bottom: 15px;
|
|
|
|
position: sticky;
|
|
|
|
position: sticky;
|
|
|
|
top: 0;
|
|
|
|
top: 0;
|
|
|
|
|
|
|
|
|
|
|
|
button {
|
|
|
|
button {
|
|
|
|
margin: 0 7px;
|
|
|
|
margin: 0 7px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|