|
|
|
@ -1,7 +1,10 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="main">
|
|
|
|
|
<div class="btn-list">
|
|
|
|
|
<a-button type="primary" v-if="details.bsstatus=='' || !details.bsstatus || details.bsstatus == '已录入' || details.bsstatus == '已驳回'" @click="handleSave">保存</a-button>
|
|
|
|
|
<a-button
|
|
|
|
|
type="primary"
|
|
|
|
|
v-if="details.bsstatus == '' || !details.bsstatus || details.bsstatus == '已录入' || details.bsstatus == '已驳回'"
|
|
|
|
|
@click="handleSave">保存</a-button>
|
|
|
|
|
<a-button type="primary" @click="handleCopy">复制</a-button>
|
|
|
|
|
<a-button type="primary">存为模板</a-button>
|
|
|
|
|
<a-button type="primary" v-if="details.bsstatus" @click="handleOpenStatus">状态历史</a-button>
|
|
|
|
@ -382,7 +385,7 @@
|
|
|
|
|
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cargoid" label="货物类型">
|
|
|
|
|
<selectView
|
|
|
|
|
type="cargoid"
|
|
|
|
|
:defaultVal="details.cargoid"
|
|
|
|
|
:defaultVal="details.cargoName"
|
|
|
|
|
searchApi="cargoData"
|
|
|
|
|
:searchQuery="{ name: '' }"
|
|
|
|
|
:showLabel="['name']"
|
|
|
|
@ -393,7 +396,14 @@
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hscode" label="HS编码">
|
|
|
|
|
<a-input v-model="details.hscode" size="small" allow-clear placeholder="请输入HS编码" />
|
|
|
|
|
<a-input-number
|
|
|
|
|
:precision="1"
|
|
|
|
|
style="width: 115px;"
|
|
|
|
|
decimalSeparator="1"
|
|
|
|
|
v-model="details.hscode"
|
|
|
|
|
size="small"
|
|
|
|
|
allow-clear
|
|
|
|
|
placeholder="请输入HS编码" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
@ -407,7 +417,7 @@
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="kgs">
|
|
|
|
|
<div class="line-box">
|
|
|
|
|
<a-input size="small" :allowClear="true" v-model="details.kgs" />
|
|
|
|
|
<a-input-number size="small" :allowClear="true" v-model="details.kgs" />
|
|
|
|
|
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('kgs')"></i>
|
|
|
|
|
<span class="unit">KGS</span>
|
|
|
|
|
</div>
|
|
|
|
@ -422,7 +432,7 @@
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="cbm">
|
|
|
|
|
<div class="line-box">
|
|
|
|
|
<a-input size="small" :allowClear="true" v-model="details.cbm" />
|
|
|
|
|
<a-input-number size="small" :allowClear="true" v-model="details.cbm" />
|
|
|
|
|
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('cbm')"></i>
|
|
|
|
|
<span class="unit">CBM</span>
|
|
|
|
|
</div>
|
|
|
|
@ -458,7 +468,14 @@
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="pkgs">
|
|
|
|
|
<div class="line-box">
|
|
|
|
|
<a-input :allowClear="true" size="small" v-model="details.pkgs" type="number" />
|
|
|
|
|
<a-input-number
|
|
|
|
|
:precision="1"
|
|
|
|
|
style="width: 115px;"
|
|
|
|
|
decimalSeparator="1"
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
size="small"
|
|
|
|
|
v-model="details.pkgs"
|
|
|
|
|
type="number" />
|
|
|
|
|
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('pkgs')"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
@ -511,12 +528,7 @@
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="tempset">
|
|
|
|
|
<div class="line-box">
|
|
|
|
|
<inputView
|
|
|
|
|
type="tempset"
|
|
|
|
|
:ishd="details.cargoid !== 'R'"
|
|
|
|
|
size="small"
|
|
|
|
|
:parentVal="details.tempset"
|
|
|
|
|
@getInputChange="inputChange" />
|
|
|
|
|
<a-input size="small" v-model="details.tempset" />
|
|
|
|
|
</div>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
@ -542,7 +554,7 @@
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="reeferf">
|
|
|
|
|
<inputView type="reeferf" size="small" :parentVal="details.reeferf" @getInputChange="inputChange" />
|
|
|
|
|
<a-input size="small" v-model="details.reeferf" />
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
@ -592,7 +604,42 @@
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-row style="display: flex;" >
|
|
|
|
|
<a-row v-if="details.cargoid == 'O'">
|
|
|
|
|
<a-col :span="6">
|
|
|
|
|
<a-form-model-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="长"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="dunno">
|
|
|
|
|
<a-input size="small" v-model="details.dunno" />
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="6">
|
|
|
|
|
<a-form-model-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="宽"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="dclass">
|
|
|
|
|
<a-input size="small" v-model="details.dclass" />
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="6">
|
|
|
|
|
<a-form-model-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="高"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="linkman">
|
|
|
|
|
<a-input size="small" v-model="details.linkman" />
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-row style="display: flex;">
|
|
|
|
|
<a-upload
|
|
|
|
|
:customRequest="customRequest"
|
|
|
|
|
:showUploadList="false"
|
|
|
|
@ -720,12 +767,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<a-modal
|
|
|
|
|
title="状态历史"
|
|
|
|
|
:maskClosable="false"
|
|
|
|
|
:width="800"
|
|
|
|
|
:visible="statusFlag"
|
|
|
|
|
@cancel="statusFlag=false">
|
|
|
|
|
<a-modal title="状态历史" :maskClosable="false" :width="800" :visible="statusFlag" @cancel="statusFlag = false">
|
|
|
|
|
<div>
|
|
|
|
|
<vxe-table border ref="xTable" :data="statusList">
|
|
|
|
|
<vxe-column field="status" title="业务状态">
|
|
|
|
@ -754,6 +796,19 @@ import {
|
|
|
|
|
BookingCustomerOrderDelete, BookingCustomerOrderSubmit, BookingCustomerOrderCancelSubmit
|
|
|
|
|
} from '@/api/modular/main/BookingLedger'
|
|
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
|
const startDetails = {
|
|
|
|
|
shipper: '',
|
|
|
|
|
serviceList: [],
|
|
|
|
|
service: 'CY-CY',
|
|
|
|
|
portloadid: 'CNTAO',
|
|
|
|
|
portload: 'QINGDAO',
|
|
|
|
|
blfrt: 'FREIGHT PREPAID',
|
|
|
|
|
notifyparty: '',
|
|
|
|
|
consignee: '',
|
|
|
|
|
cargoid: '',
|
|
|
|
|
ctnList: [],
|
|
|
|
|
tempid: 'C'
|
|
|
|
|
}
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
XCard,
|
|
|
|
@ -835,6 +890,7 @@ export default {
|
|
|
|
|
modelconfirm: false,
|
|
|
|
|
modelVisible: false,
|
|
|
|
|
statusFlag: false,
|
|
|
|
|
saveFlag: false,
|
|
|
|
|
textEntryModalVisible: false,
|
|
|
|
|
textEntryModalTitle: '',
|
|
|
|
|
historyData: {},
|
|
|
|
@ -869,30 +925,16 @@ export default {
|
|
|
|
|
details: {
|
|
|
|
|
shipper: '',
|
|
|
|
|
serviceList: [],
|
|
|
|
|
service: 'CY-CY',
|
|
|
|
|
portloadid: 'CNTAO',
|
|
|
|
|
portload: 'QINGDAO',
|
|
|
|
|
blfrt: 'FREIGHT PREPAID',
|
|
|
|
|
notifyparty: '',
|
|
|
|
|
consignee: '',
|
|
|
|
|
cargoid: '',
|
|
|
|
|
ctnList: []
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
linkman: [
|
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
dclass: [
|
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
dunno: [
|
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
tempset: [
|
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
tempid: [
|
|
|
|
|
{ required: true, message: '请选择', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
reeferf: [
|
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
loading: false
|
|
|
|
@ -990,13 +1032,7 @@ export default {
|
|
|
|
|
this.getDetail()
|
|
|
|
|
} else {
|
|
|
|
|
this.isAdd = true
|
|
|
|
|
this.details = {
|
|
|
|
|
shipper: '',
|
|
|
|
|
serviceList: [],
|
|
|
|
|
notifyparty: '',
|
|
|
|
|
consignee: '',
|
|
|
|
|
ctnList: []
|
|
|
|
|
}
|
|
|
|
|
this.details = JSON.parse(JSON.stringify(startDetails))
|
|
|
|
|
this.fileList = []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -1043,6 +1079,20 @@ export default {
|
|
|
|
|
BookingCustomerOrderGet(data).then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.loading = false
|
|
|
|
|
if (res.data.cargoid) {
|
|
|
|
|
if (res.data.cargoid === 'S') {
|
|
|
|
|
res.data.cargoName = 'S 普通货'
|
|
|
|
|
}
|
|
|
|
|
if (res.data.cargoid === 'R') {
|
|
|
|
|
res.data.cargoName = 'R 冻柜'
|
|
|
|
|
}
|
|
|
|
|
if (res.data.cargoid === 'D') {
|
|
|
|
|
res.data.cargoName = 'D 危险品'
|
|
|
|
|
}
|
|
|
|
|
if (res.data.cargoid === 'O') {
|
|
|
|
|
res.data.cargoName = 'O 超限箱'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.details = res.data
|
|
|
|
|
if (this.details.serviceItemList && this.details.serviceItemList.length > 0) {
|
|
|
|
|
this.details.serviceList = this.details.serviceItemList.map(item => {
|
|
|
|
@ -1074,97 +1124,104 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleSave() {
|
|
|
|
|
this.$refs.basicFrom.validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
const data = {
|
|
|
|
|
...this.details
|
|
|
|
|
}
|
|
|
|
|
if (!this.details.serviceList) {
|
|
|
|
|
this.details.serviceList = []
|
|
|
|
|
}
|
|
|
|
|
if (this.details.serviceList.length > 0) {
|
|
|
|
|
const arr = []
|
|
|
|
|
this.options.forEach(item => {
|
|
|
|
|
this.details.serviceList.forEach(ite => {
|
|
|
|
|
if (item.code === ite) {
|
|
|
|
|
arr.push({
|
|
|
|
|
code: item.code,
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (!this.saveFlag) {
|
|
|
|
|
this.$refs.basicFrom.validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
const data = {
|
|
|
|
|
...this.details
|
|
|
|
|
}
|
|
|
|
|
data.files = filesArr
|
|
|
|
|
data.tempFileNames = tempFileNamesArr
|
|
|
|
|
}
|
|
|
|
|
if (data.ctnList.length > 0) {
|
|
|
|
|
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.details.serviceList) {
|
|
|
|
|
this.details.serviceList = []
|
|
|
|
|
}
|
|
|
|
|
if (this.details.serviceList.length > 0) {
|
|
|
|
|
const arr = []
|
|
|
|
|
this.options.forEach(item => {
|
|
|
|
|
this.details.serviceList.forEach(ite => {
|
|
|
|
|
if (item.code === ite) {
|
|
|
|
|
arr.push({
|
|
|
|
|
code: item.code,
|
|
|
|
|
value: item.name
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
if (this.isCopy) {
|
|
|
|
|
delete item.id
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (data.files && Object.values(data.files).length === 0) {
|
|
|
|
|
delete data.files
|
|
|
|
|
}
|
|
|
|
|
if (!data.id && !this.isCopy) {
|
|
|
|
|
data.id = this.id
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.loading = true
|
|
|
|
|
BookingCustomerOrderSave(data).then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.id = res.data.id
|
|
|
|
|
this.getDetail()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
if (this.isCopy || this.isAdd) {
|
|
|
|
|
this.$router.replace({
|
|
|
|
|
name: 'BookingCustomerDetail',
|
|
|
|
|
query: {
|
|
|
|
|
id: res.data.id,
|
|
|
|
|
noOpenTab: true
|
|
|
|
|
data.files = filesArr
|
|
|
|
|
data.tempFileNames = tempFileNamesArr
|
|
|
|
|
}
|
|
|
|
|
if (data.ctnList.length > 0) {
|
|
|
|
|
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) {
|
|
|
|
|
this.isCopy = false
|
|
|
|
|
delete item.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, 500);
|
|
|
|
|
} else {
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.warning('请检查必填项')
|
|
|
|
|
}
|
|
|
|
|
console.log(valid)
|
|
|
|
|
})
|
|
|
|
|
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.saveFlag = true
|
|
|
|
|
BookingCustomerOrderSave(data).then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.saveFlag = false
|
|
|
|
|
}, 5000);
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.id = res.data.id
|
|
|
|
|
this.getDetail()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
if (this.isCopy || this.isAdd) {
|
|
|
|
|
this.$router.replace({
|
|
|
|
|
name: 'BookingCustomerDetail',
|
|
|
|
|
query: {
|
|
|
|
|
id: res.data.id,
|
|
|
|
|
noOpenTab: true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (this.isCopy) {
|
|
|
|
|
this.isCopy = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, 500);
|
|
|
|
|
} else {
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.saveFlag = false
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.warning('请检查必填项')
|
|
|
|
|
this.saveFlag = false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleDelete() {
|
|
|
|
|
BookingCustomerOrderDelete([this.id]).then(res => {
|
|
|
|
@ -1321,7 +1378,7 @@ export default {
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
},
|
|
|
|
|
handlePushCtn() {
|
|
|
|
|
const data = { oper: '' }
|
|
|
|
|
const data = { oper: '', ctnnum: 1 }
|
|
|
|
|
this.details.ctnList.push(data)
|
|
|
|
|
},
|
|
|
|
|
filterOption1(input, option) {
|
|
|
|
@ -1406,7 +1463,34 @@ export default {
|
|
|
|
|
this.details.goodsname = res.goodsNameEN || ''
|
|
|
|
|
} else if (type === 'cargoid') {
|
|
|
|
|
this.details.cargoid = res.code || ''
|
|
|
|
|
console.log(res)
|
|
|
|
|
this.details.cargoName = res.name || ''
|
|
|
|
|
if (this.details.cargoid === 'D') {
|
|
|
|
|
this.rules = {
|
|
|
|
|
linkman: [
|
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
dclass: [
|
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
dunno: [
|
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (this.details.cargoid === 'R') {
|
|
|
|
|
this.rules = {
|
|
|
|
|
tempset: [
|
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
tempid: [
|
|
|
|
|
{ required: true, message: '请选择', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
reeferf: [
|
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.$refs.basicFrom.clearValidate()
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
} else if (type === 'carrierid') {
|
|
|
|
|
this.details.carrier = res.enName || ''
|
|
|
|
|