|
|
@ -1,8 +1,7 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="main">
|
|
|
|
<div class="main">
|
|
|
|
<div class="btn-list">
|
|
|
|
<div class="btn-list">
|
|
|
|
<span v-if="details.bookingno">{{ details.bookingno }}</span>
|
|
|
|
<a-button type="primary" v-if="details.bsstatus=='' || !details.bsstatus || details.bsstatus == '已录入' || details.bsstatus == '已驳回'" @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" v-if="details.bsstatus == '已录入'" @click="handleDelete">删除</a-button>
|
|
|
|
<a-button type="danger" v-if="details.bsstatus == '已录入'" @click="handleDelete">删除</a-button>
|
|
|
@ -11,6 +10,8 @@
|
|
|
|
@click="handleSubimt"
|
|
|
|
@click="handleSubimt"
|
|
|
|
v-if="details.bsstatus == '已录入' || details.bsstatus == '已驳回'">发送订舱</a-button>
|
|
|
|
v-if="details.bsstatus == '已录入' || details.bsstatus == '已驳回'">发送订舱</a-button>
|
|
|
|
<a-button type="danger" @click="handleCancle" v-if="details.bsstatus == '已提交'">撤销</a-button>
|
|
|
|
<a-button type="danger" @click="handleCancle" v-if="details.bsstatus == '已提交'">撤销</a-button>
|
|
|
|
|
|
|
|
<span v-if="details.bookingno" style="margin: 0 10px;">订舱编号:</span>
|
|
|
|
|
|
|
|
<span v-if="details.bookingno">{{ details.bookingno }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<a-spin :spinning="loading">
|
|
|
|
<a-spin :spinning="loading">
|
|
|
|
<div class="box">
|
|
|
|
<div class="box">
|
|
|
@ -147,8 +148,8 @@
|
|
|
|
:labelCol="labelCol"
|
|
|
|
:labelCol="labelCol"
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
has-feedback
|
|
|
|
has-feedback
|
|
|
|
prop="voyno">
|
|
|
|
prop="contractno">
|
|
|
|
<inputView type="voyno" :parentVal="details.voyno" @getInputChange="inputChange" />
|
|
|
|
<inputView type="contractno" :parentVal="details.contractno" @getInputChange="inputChange" />
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="'4-8'">
|
|
|
|
<a-col :span="'4-8'">
|
|
|
@ -320,6 +321,7 @@
|
|
|
|
class="save-btn"
|
|
|
|
class="save-btn"
|
|
|
|
type="link"
|
|
|
|
type="link"
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
style="color:black"
|
|
|
|
icon="save"
|
|
|
|
icon="save"
|
|
|
|
@click="saveModel('notifyparty')">保存</a-button>
|
|
|
|
@click="saveModel('notifyparty')">保存</a-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -365,6 +367,7 @@
|
|
|
|
<a-button
|
|
|
|
<a-button
|
|
|
|
class="save-btn"
|
|
|
|
class="save-btn"
|
|
|
|
type="link"
|
|
|
|
type="link"
|
|
|
|
|
|
|
|
style="color: black;"
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
icon="save"
|
|
|
|
icon="save"
|
|
|
|
@click="saveModel('description')">保存</a-button>
|
|
|
|
@click="saveModel('description')">保存</a-button>
|
|
|
@ -551,7 +554,7 @@
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
has-feedback
|
|
|
|
has-feedback
|
|
|
|
prop="dunno">
|
|
|
|
prop="dunno">
|
|
|
|
<inputView type="dunno" size="small" :parentVal="details.dunno" @getInputChange="inputChange" />
|
|
|
|
<a-input size="small" v-model="details.dunno" />
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="6">
|
|
|
|
<a-col :span="6">
|
|
|
@ -562,7 +565,7 @@
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
has-feedback
|
|
|
|
has-feedback
|
|
|
|
prop="dclass">
|
|
|
|
prop="dclass">
|
|
|
|
<inputView type="dclass" size="small" :parentVal="details.dclass" @getInputChange="inputChange" />
|
|
|
|
<a-input size="small" v-model="details.dclass" />
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="6">
|
|
|
|
<a-col :span="6">
|
|
|
@ -573,7 +576,7 @@
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
has-feedback
|
|
|
|
has-feedback
|
|
|
|
prop="linkman">
|
|
|
|
prop="linkman">
|
|
|
|
<inputView type="linkman" size="small" :parentVal="details.linkman" @getInputChange="inputChange" />
|
|
|
|
<a-input size="small" v-model="details.linkman" />
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="6">
|
|
|
|
<a-col :span="6">
|
|
|
@ -584,11 +587,11 @@
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
has-feedback
|
|
|
|
has-feedback
|
|
|
|
prop="linkman">
|
|
|
|
prop="linkman">
|
|
|
|
<inputView type="linkman" size="small" :parentVal="details.linkman" @getInputChange="inputChange" />
|
|
|
|
<a-input size="small" v-model="details.linkman" />
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
|
|
</a-row>
|
|
|
|
<a-row style="display: flex;" v-if="details.cargoid == 'D'">
|
|
|
|
<a-row style="display: flex;" >
|
|
|
|
<a-upload
|
|
|
|
<a-upload
|
|
|
|
:customRequest="customRequest"
|
|
|
|
:customRequest="customRequest"
|
|
|
|
:showUploadList="false"
|
|
|
|
:showUploadList="false"
|
|
|
@ -850,24 +853,25 @@ export default {
|
|
|
|
ctnList: []
|
|
|
|
ctnList: []
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
tempset: [
|
|
|
|
linkman: [
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
],
|
|
|
|
],
|
|
|
|
tempid: [
|
|
|
|
dclass: [
|
|
|
|
{ required: true, message: '请选择', trigger: 'blur' }
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
],
|
|
|
|
],
|
|
|
|
reeferf: [
|
|
|
|
dunno: [
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
],
|
|
|
|
],
|
|
|
|
linkman: [
|
|
|
|
tempset: [
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
],
|
|
|
|
],
|
|
|
|
dclass: [
|
|
|
|
tempid: [
|
|
|
|
{ required: true, message: '请选择', trigger: 'blur' }
|
|
|
|
{ required: true, message: '请选择', trigger: 'blur' }
|
|
|
|
],
|
|
|
|
],
|
|
|
|
dunno: [
|
|
|
|
reeferf: [
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
loading: false
|
|
|
|
loading: false
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -998,98 +1002,100 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleSave() {
|
|
|
|
handleSave() {
|
|
|
|
console.log(this.details)
|
|
|
|
|
|
|
|
this.$refs.basicFrom.validate(valid => {
|
|
|
|
this.$refs.basicFrom.validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
const data = {
|
|
|
|
const data = {
|
|
|
|
...this.details
|
|
|
|
...this.details
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!this.details.serviceList) {
|
|
|
|
if (!this.details.serviceList) {
|
|
|
|
this.details.serviceList = []
|
|
|
|
this.details.serviceList = []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.details.serviceList.length > 0) {
|
|
|
|
if (this.details.serviceList.length > 0) {
|
|
|
|
const arr = []
|
|
|
|
const arr = []
|
|
|
|
this.options.forEach(item => {
|
|
|
|
this.options.forEach(item => {
|
|
|
|
this.details.serviceList.forEach(ite => {
|
|
|
|
this.details.serviceList.forEach(ite => {
|
|
|
|
if (item.code === ite) {
|
|
|
|
if (item.code === ite) {
|
|
|
|
arr.push({
|
|
|
|
arr.push({
|
|
|
|
code: item.code,
|
|
|
|
code: item.code,
|
|
|
|
value: item.name
|
|
|
|
value: item.name
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
data.serviceItemList = arr
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
data.serviceItemList = []
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!this.isCopy) {
|
|
|
|
|
|
|
|
const filesArr = []
|
|
|
|
|
|
|
|
const tempFileNamesArr = []
|
|
|
|
|
|
|
|
if (this.fileList.length > 0) {
|
|
|
|
|
|
|
|
this.fileList.forEach(item => {
|
|
|
|
|
|
|
|
if (item.id.indexOf('\\') != -1) {
|
|
|
|
|
|
|
|
tempFileNamesArr.push(item.id)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
filesArr.push(item.id)
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
data.files = filesArr
|
|
|
|
})
|
|
|
|
data.tempFileNames = tempFileNamesArr
|
|
|
|
data.serviceItemList = arr
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (data.ctnList.length > 0) {
|
|
|
|
data.serviceItemList = []
|
|
|
|
data.ctnList.forEach(item => {
|
|
|
|
}
|
|
|
|
delete item._X_ROW_KEY
|
|
|
|
if (data.cargoid === 'D' && !this.isCopy) {
|
|
|
|
delete item.oper
|
|
|
|
const filesArr = []
|
|
|
|
this.ctnallList.forEach(ite => {
|
|
|
|
const tempFileNamesArr = []
|
|
|
|
if (ite.code === item.ctncode) {
|
|
|
|
if (this.fileList.length > 0) {
|
|
|
|
item.ctnall = ite.name
|
|
|
|
this.fileList.forEach(item => {
|
|
|
|
}
|
|
|
|
if (item.id.indexOf('\\') != -1) {
|
|
|
|
})
|
|
|
|
tempFileNamesArr.push(item.id)
|
|
|
|
if (this.isCopy) {
|
|
|
|
} else {
|
|
|
|
delete item.id
|
|
|
|
filesArr.push(item.id)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (data.files && Object.values(data.files).length === 0) {
|
|
|
|
data.files = filesArr
|
|
|
|
delete data.files
|
|
|
|
data.tempFileNames = tempFileNamesArr
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!data.id && !this.isCopy) {
|
|
|
|
if (data.ctnList.length > 0) {
|
|
|
|
data.id = this.id
|
|
|
|
data.ctnList.forEach(item => {
|
|
|
|
|
|
|
|
delete item._X_ROW_KEY
|
|
|
|
|
|
|
|
delete item.oper
|
|
|
|
|
|
|
|
this.ctnallList.forEach(ite => {
|
|
|
|
|
|
|
|
if (ite.code === item.ctncode) {
|
|
|
|
|
|
|
|
item.ctnall = ite.name
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (this.isCopy) {
|
|
|
|
|
|
|
|
delete item.id
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (data.files && Object.values(data.files).length === 0) {
|
|
|
|
|
|
|
|
delete data.files
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!data.id && !this.isCopy) {
|
|
|
|
|
|
|
|
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.id = res.data.id
|
|
|
|
this.id = res.data.id
|
|
|
|
if (this.isCopy || this.isAdd) {
|
|
|
|
this.getDetail()
|
|
|
|
this.$router.replace({
|
|
|
|
setTimeout(() => {
|
|
|
|
name: 'BookingCustomerDetail',
|
|
|
|
if (this.isCopy || this.isAdd) {
|
|
|
|
query: {
|
|
|
|
this.$router.replace({
|
|
|
|
id: res.data.id,
|
|
|
|
name: 'BookingCustomerDetail',
|
|
|
|
noOpenTab: true
|
|
|
|
query: {
|
|
|
|
|
|
|
|
id: res.data.id,
|
|
|
|
|
|
|
|
noOpenTab: true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (this.isCopy) {
|
|
|
|
|
|
|
|
this.isCopy = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, 500);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.loading = false
|
|
|
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if (this.isCopy) {
|
|
|
|
|
|
|
|
this.isCopy = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.loading = false
|
|
|
|
this.$message.warning('请检查必填项')
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log(valid)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleDelete() {
|
|
|
|
handleDelete() {
|
|
|
|
const data = {
|
|
|
|
BookingCustomerOrderDelete([this.id]).then(res => {
|
|
|
|
id: this.id
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
BookingCustomerOrderDelete(data).then(res => {
|
|
|
|
|
|
|
|
if (res.success) {
|
|
|
|
if (res.success) {
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
this.$router.push({ path: 'BookingCustomerLedger' })
|
|
|
|
this.$router.push({ path: 'BookingCustomerLedger' })
|
|
|
|