|
|
|
@ -5,43 +5,52 @@
|
|
|
|
|
<div class="sed-order-list">
|
|
|
|
|
<div class="sed-order-title"><i class="iconfont icon-liebiao"></i> 分提单列表</div>
|
|
|
|
|
<div class="sec-order">
|
|
|
|
|
<div class="sed-order-label active"><i class="iconfont icon-dingdan"></i> 分单1: QE1234567</div>
|
|
|
|
|
<div class="sed-order-label"><i class="iconfont icon-dingdan"></i> 分单1: QE1234567</div>
|
|
|
|
|
<div class="sed-order-btn"><i class="iconfont icon-jiahao2fill"></i>添加分单</div>
|
|
|
|
|
<div class="sed-order-label" v-for="(sedDetail, sindex) in sedOrderList" :key="sindex" :class="{'active': editIndex === sindex}" @click="changeOrder(sindex)">
|
|
|
|
|
<i class="iconfont icon-dingdan"></i>
|
|
|
|
|
分单{{ sindex+1 }}: {{ sedDetail.hblno || '请填写分单号' }}
|
|
|
|
|
<span class="no-save" v-if="sedDetail.isNoSave && editIndex !== sindex">(未保存) </span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="sed-order-btn" @click="addSedOrder"><i class="iconfont icon-jiahao2fill"></i>添加分单</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="19">
|
|
|
|
|
<template v-if="!inPageLoading">
|
|
|
|
|
<div class="order-title"><i class="iconfont icon-liebiao1"></i> 当前分单号: 1234567</div>
|
|
|
|
|
<sedOperationArea :details="secOrderetails" @refresh="refreshPage" @save="saveFun"></sedOperationArea>
|
|
|
|
|
<template v-if="editDetails">
|
|
|
|
|
<div class="order-title"><i class="iconfont icon-liebiao1"></i> 当前分单号: {{ editDetails.hblno }}</div>
|
|
|
|
|
<sedOperationArea :details="editDetails" @save="saveFun" @copy="copyFun"></sedOperationArea>
|
|
|
|
|
<a-tabs type="card">
|
|
|
|
|
<a-tab-pane key="1" tab="基础信息">
|
|
|
|
|
<div class="pane-box">
|
|
|
|
|
<!-- 基本信息 -->
|
|
|
|
|
<basicInfo :type="type" :details="secOrderetails" @changeDetail="changeDetailFun"></basicInfo>
|
|
|
|
|
<basicInfo :type="type" :details="editDetails" :ishd="true" @changeDetail="changeDetailFun"></basicInfo>
|
|
|
|
|
<!-- 收发通信息 -->
|
|
|
|
|
<mailingInfo :details="secOrderetails" @changeDetail="changeDetailFun"></mailingInfo>
|
|
|
|
|
<mailingInfo :details="editDetails" @changeDetail="changeDetailFun"></mailingInfo>
|
|
|
|
|
<!-- 货物信息 -->
|
|
|
|
|
<cargoInfo :details="secOrderetails" @changeDetail="changeDetailFun"></cargoInfo>
|
|
|
|
|
<cargoInfo :details="editDetails" @changeDetail="changeDetailFun"></cargoInfo>
|
|
|
|
|
<!-- 签单信息 -->
|
|
|
|
|
<billInfo :details="secOrderetails" @changeDetail="changeDetailFun"></billInfo>
|
|
|
|
|
<billInfo :details="editDetails" @changeDetail="changeDetailFun"></billInfo>
|
|
|
|
|
<!-- 备注信息 -->
|
|
|
|
|
<remarksInfo :details="secOrderetails" @changeDetail="changeDetailFun"></remarksInfo>
|
|
|
|
|
<remarksInfo :details="editDetails" @changeDetail="changeDetailFun"></remarksInfo>
|
|
|
|
|
<!-- 箱型 -->
|
|
|
|
|
<goodsTable :details="secOrderetails" @changeDetail="changeDetailFun"></goodsTable>
|
|
|
|
|
<goodsTable :details="editDetails" @changeDetail="changeDetailFun"></goodsTable>
|
|
|
|
|
</div>
|
|
|
|
|
</a-tab-pane>
|
|
|
|
|
<a-tab-pane key="2" tab="EDI补充信息">
|
|
|
|
|
<ediMore
|
|
|
|
|
class="pane-box"
|
|
|
|
|
:details="secOrderetails"
|
|
|
|
|
:details="editDetails"
|
|
|
|
|
@changeDetail="changeDetailFun"
|
|
|
|
|
v-if="!inPageLoading"
|
|
|
|
|
></ediMore>
|
|
|
|
|
</a-tab-pane>
|
|
|
|
|
</a-tabs>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
<div class="sed-no-data">
|
|
|
|
|
<i class="iconfont icon-meiyoudingdan"></i>
|
|
|
|
|
<div class="no-data-text">暂无分单, <span class="btn" @click="addSedOrder">添加分单</span></div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</div>
|
|
|
|
@ -57,15 +66,26 @@ import goodsTable from '../modules/goodsTable'
|
|
|
|
|
import basicItem from './basicItem'
|
|
|
|
|
import ediMore from './ediMore'
|
|
|
|
|
|
|
|
|
|
import { BookingOrderUpdate, BookingOrderAdd } from '@/api/modular/main/BookingLedger'
|
|
|
|
|
export default {
|
|
|
|
|
name: 'SedOrder',
|
|
|
|
|
props: {
|
|
|
|
|
secOrderetails: {
|
|
|
|
|
type: Object,
|
|
|
|
|
sedOrderList: {
|
|
|
|
|
type: Array,
|
|
|
|
|
default: () => {
|
|
|
|
|
return {}
|
|
|
|
|
return []
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
isAdd: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false
|
|
|
|
|
},
|
|
|
|
|
details: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => {
|
|
|
|
|
return {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
sedOperationArea,
|
|
|
|
@ -82,27 +102,223 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
type: this.$route.query.type,
|
|
|
|
|
id: this.$route.query.id,
|
|
|
|
|
inPageLoading: false
|
|
|
|
|
inPageLoading: false,
|
|
|
|
|
editDetails: null,
|
|
|
|
|
editIndex: 0,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: { },
|
|
|
|
|
watch: {
|
|
|
|
|
sedOrderList (nval, oval) {
|
|
|
|
|
if (nval.length > 0) {
|
|
|
|
|
// this.editDetails = nval[this.editIndex]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
editDetails: {
|
|
|
|
|
handler (nval, oval) {
|
|
|
|
|
if (nval !== oval && oval) {
|
|
|
|
|
// this.sedOrderList[this.editIndex].isNoSave = true
|
|
|
|
|
// console.log(this.editIndex, this.sedOrderList[this.editIndex].isNoSave)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
if (this.sedOrderList.length > 0) {
|
|
|
|
|
this.editDetails = JSON.parse(JSON.stringify(this.sedOrderList[0]))
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
addSedOrder () {
|
|
|
|
|
if (this.isAdd) {
|
|
|
|
|
this.$message.error('请先保存主单')
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
const data = {
|
|
|
|
|
id: 0,
|
|
|
|
|
parentId: this.details.id,
|
|
|
|
|
isNoSave: true,
|
|
|
|
|
// 基本信息
|
|
|
|
|
customername: '',
|
|
|
|
|
carrier: '',
|
|
|
|
|
carrierid: this.type,
|
|
|
|
|
forwarder: '',
|
|
|
|
|
pono: '',
|
|
|
|
|
mblno: this.details.mblno,
|
|
|
|
|
hblno: '',
|
|
|
|
|
bookingno: '',
|
|
|
|
|
contractno: '',
|
|
|
|
|
vessel: '',
|
|
|
|
|
voyno: '',
|
|
|
|
|
voynoinner: '',
|
|
|
|
|
lanecode: '',
|
|
|
|
|
etd: '',
|
|
|
|
|
atd: '',
|
|
|
|
|
lanename: '',
|
|
|
|
|
shipagency: '',
|
|
|
|
|
sale: '',
|
|
|
|
|
op: '',
|
|
|
|
|
doc: '',
|
|
|
|
|
custservice: '',
|
|
|
|
|
// 收发通信息
|
|
|
|
|
shipper: '',
|
|
|
|
|
consignee: '',
|
|
|
|
|
notifyparty: '',
|
|
|
|
|
yard: '',
|
|
|
|
|
customser: '',
|
|
|
|
|
trucker: '',
|
|
|
|
|
agentid: '',
|
|
|
|
|
eta: '',
|
|
|
|
|
closingdate: '',
|
|
|
|
|
closedocdate: '',
|
|
|
|
|
closevgmdate: '',
|
|
|
|
|
portload: '',
|
|
|
|
|
portloadid: '',
|
|
|
|
|
transport: '',
|
|
|
|
|
transportid: '',
|
|
|
|
|
portdischarge: '',
|
|
|
|
|
portdischargeid: '',
|
|
|
|
|
destination: '',
|
|
|
|
|
destinationid: '',
|
|
|
|
|
placedelivery: '',
|
|
|
|
|
placedeliveryid: '',
|
|
|
|
|
placereceipt: '',
|
|
|
|
|
placereceiptid: '',
|
|
|
|
|
pkgs: 0,
|
|
|
|
|
kindpkgs: '',
|
|
|
|
|
kgs: 0,
|
|
|
|
|
cbm: 0,
|
|
|
|
|
// 货物信息
|
|
|
|
|
marks: '',
|
|
|
|
|
cargoid: '',
|
|
|
|
|
hscode: '',
|
|
|
|
|
description: '',
|
|
|
|
|
totalno: '',
|
|
|
|
|
// 签单信息
|
|
|
|
|
issuetype: '',
|
|
|
|
|
issuedate: '',
|
|
|
|
|
issueplace: '',
|
|
|
|
|
issueplaceid: '',
|
|
|
|
|
nobill: 'THREE',
|
|
|
|
|
copynobilll: 'ONE',
|
|
|
|
|
prepardat: '',
|
|
|
|
|
payableat: '',
|
|
|
|
|
blfrt: '',
|
|
|
|
|
thirdpayaddr: '',
|
|
|
|
|
service: '',
|
|
|
|
|
reeferf: '',
|
|
|
|
|
tempset: '',
|
|
|
|
|
tempid: '',
|
|
|
|
|
tempmin: '',
|
|
|
|
|
tempmax: '',
|
|
|
|
|
humidity: '',
|
|
|
|
|
dclass: '',
|
|
|
|
|
dunno: '',
|
|
|
|
|
dpage: '',
|
|
|
|
|
dlabel: '',
|
|
|
|
|
linkman: '',
|
|
|
|
|
// 备注信息
|
|
|
|
|
soremark: '',
|
|
|
|
|
siremark: '',
|
|
|
|
|
// 箱型
|
|
|
|
|
ctnInputs: [],
|
|
|
|
|
// edi补充信息 (edi联系人等暂无字段)
|
|
|
|
|
weituo: '',
|
|
|
|
|
freightpayer: '',
|
|
|
|
|
scaccode: '',
|
|
|
|
|
itncode: '',
|
|
|
|
|
iscontainersoc: 0
|
|
|
|
|
}
|
|
|
|
|
this.editDetails = data
|
|
|
|
|
this.editIndex = this.sedOrderList.length
|
|
|
|
|
this.sedOrderList.push(data)
|
|
|
|
|
},
|
|
|
|
|
changeDetailFun (data) {
|
|
|
|
|
const { detail, type } = data
|
|
|
|
|
// this.secOrderetails = detail
|
|
|
|
|
console.log('主要数据变化', detail)
|
|
|
|
|
this.editDetails = detail
|
|
|
|
|
this.sedOrderList[this.editDetails] = detail
|
|
|
|
|
this.editDetails.isNoSave = true
|
|
|
|
|
this.sedOrderList[this.editIndex].isNoSave = true
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
},
|
|
|
|
|
// 操作按钮
|
|
|
|
|
refreshPage() {
|
|
|
|
|
// this.init()
|
|
|
|
|
},
|
|
|
|
|
saveFun () {
|
|
|
|
|
// if (this.id) {
|
|
|
|
|
// this.bookingOrderUpdate()
|
|
|
|
|
// } else {
|
|
|
|
|
// this.bookingOrderAdd()
|
|
|
|
|
debugger
|
|
|
|
|
if (this.editDetails.id !== 0) {
|
|
|
|
|
this.bookingOrderUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
this.bookingOrderAdd()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
bookingOrderUpdate () {
|
|
|
|
|
console.log('保存', this.editDetails)
|
|
|
|
|
if (!this.editDetails.hblno) {
|
|
|
|
|
this.$message.error('请输入分提单号')
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
let data = JSON.parse(JSON.stringify(this.editDetails))
|
|
|
|
|
delete data.isNoSave
|
|
|
|
|
debugger
|
|
|
|
|
BookingOrderUpdate(data)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.sedOrderList[this.editIndex].isNoSave = false
|
|
|
|
|
this.editDetails.isNoSave = false
|
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
bookingOrderAdd () {
|
|
|
|
|
console.log('新增', this.editDetails)
|
|
|
|
|
if (!this.editDetails.hblno) {
|
|
|
|
|
this.$message.error('请输入分提单号')
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
let data = JSON.parse(JSON.stringify(this.editDetails))
|
|
|
|
|
delete data.isNoSave
|
|
|
|
|
BookingOrderAdd(data)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.sedOrderList[this.editIndex].isNoSave = false
|
|
|
|
|
this.editDetails.isNoSave = false
|
|
|
|
|
this.sedOrderList[this.editIndex].id = res.data
|
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
changeOrder (index) {
|
|
|
|
|
// if (!this.editDetails.isNoSave) {
|
|
|
|
|
// this.$message.error(`分单${this.editDetails.hblno}未保存`)
|
|
|
|
|
// }
|
|
|
|
|
this.editIndex = index
|
|
|
|
|
this.editDetails = this.sedOrderList[index]
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
copyFun () {
|
|
|
|
|
let _data = this.editDetails
|
|
|
|
|
_data.isNoSave = true
|
|
|
|
|
_data.hblno = ''
|
|
|
|
|
this.editDetails = _data
|
|
|
|
|
this.editIndex = this.sedOrderList.length
|
|
|
|
|
this.sedOrderList.push(_data)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
@ -217,4 +433,31 @@ export default {
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.sed-no-data {
|
|
|
|
|
margin:220px auto;
|
|
|
|
|
text-align: center;
|
|
|
|
|
width: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
i{
|
|
|
|
|
display: block;
|
|
|
|
|
line-height: 140px;
|
|
|
|
|
font-size: 120px;
|
|
|
|
|
color: #999;
|
|
|
|
|
}
|
|
|
|
|
.no-data-text{
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #666;
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
.btn {
|
|
|
|
|
color: @primary-color;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.no-save{
|
|
|
|
|
float: right;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #999;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|