|
|
@ -22,16 +22,16 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<a-button class="order-btn" size="small">删除</a-button>
|
|
|
|
<a-button class="order-btn" size="small">删除</a-button>
|
|
|
|
</a-popconfirm>
|
|
|
|
</a-popconfirm>
|
|
|
|
<!-- <a-popconfirm
|
|
|
|
<a-button class="order-btn" size="small" @click="sendOrderFun()">发送</a-button>
|
|
|
|
title="是否发送当前选中预配舱单?"
|
|
|
|
<a-popconfirm
|
|
|
|
|
|
|
|
title="会覆盖当前数据,确认刷新吗?"
|
|
|
|
ok-text="是"
|
|
|
|
ok-text="是"
|
|
|
|
cancel-text="否"
|
|
|
|
cancel-text="否"
|
|
|
|
@confirm="sendOrderFun()"
|
|
|
|
@confirm="handleRef()"
|
|
|
|
@cancel="cancelRemove"
|
|
|
|
@cancel="cancelRemove"
|
|
|
|
> -->
|
|
|
|
>
|
|
|
|
<a-button class="order-btn" size="small" @click="sendOrderFun()">发送</a-button>
|
|
|
|
<a-button class="order-btn" style="margin-right: 0px !important;" size="small" >刷新</a-button>
|
|
|
|
<!-- <a-button class="order-btn" style="margin-right: 0px !important;" size="small" @click="handleRef">刷新</a-button> -->
|
|
|
|
</a-popconfirm>
|
|
|
|
<!-- </a-popconfirm> -->
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="sec-order">
|
|
|
|
<div class="sec-order">
|
|
|
|
<template v-for="(sedDetail, sindex) in orderList">
|
|
|
|
<template v-for="(sedDetail, sindex) in orderList">
|
|
|
@ -1892,7 +1892,108 @@ export default {
|
|
|
|
this.modelName = ''
|
|
|
|
this.modelName = ''
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleRef() {
|
|
|
|
handleRef() {
|
|
|
|
|
|
|
|
if (this.editIndex === 0) {
|
|
|
|
|
|
|
|
const $details = JSON.parse(JSON.stringify(this.details))
|
|
|
|
|
|
|
|
const $data = {
|
|
|
|
|
|
|
|
bookingId: $details.id,
|
|
|
|
|
|
|
|
id: this.orderDetails.id,
|
|
|
|
|
|
|
|
mblno: $details.mblno,
|
|
|
|
|
|
|
|
hblno: '',
|
|
|
|
|
|
|
|
isHBL: false,
|
|
|
|
|
|
|
|
etd: $details.etd,
|
|
|
|
|
|
|
|
forwarder: $details.shipagency || '',
|
|
|
|
|
|
|
|
vessel: $details.vessel,
|
|
|
|
|
|
|
|
// 要改
|
|
|
|
|
|
|
|
carrier: $details.carrier || '',
|
|
|
|
|
|
|
|
carrierid: $details.carrierid || '',
|
|
|
|
|
|
|
|
carrierName: $details.carrierName,
|
|
|
|
|
|
|
|
shippername: '',
|
|
|
|
|
|
|
|
shipperaddR1: '',
|
|
|
|
|
|
|
|
shippercountry: '',
|
|
|
|
|
|
|
|
shippercountryName: '',
|
|
|
|
|
|
|
|
shippertel: '',
|
|
|
|
|
|
|
|
consigneename: '',
|
|
|
|
|
|
|
|
consigneeaddR1: '',
|
|
|
|
|
|
|
|
consigneecountry: '',
|
|
|
|
|
|
|
|
consigneecountryName: '',
|
|
|
|
|
|
|
|
consigneetel: '',
|
|
|
|
|
|
|
|
notifypartyname: '',
|
|
|
|
|
|
|
|
notifypartyaddR1: '',
|
|
|
|
|
|
|
|
notifypartycountry: '',
|
|
|
|
|
|
|
|
voyno: $details.voynoinner,
|
|
|
|
|
|
|
|
notifypartycountryName: '',
|
|
|
|
|
|
|
|
notifypartytel: '',
|
|
|
|
|
|
|
|
portload: $details.portload || 'QINGDAO,CHINA',
|
|
|
|
|
|
|
|
portloadid: $details.portloadid || 'CNTAO',
|
|
|
|
|
|
|
|
portdischarge: $details.portdischarge,
|
|
|
|
|
|
|
|
portdischargeid: $details.portdischargeid,
|
|
|
|
|
|
|
|
description: $details.description,
|
|
|
|
|
|
|
|
cargoid: $details.cargoid,
|
|
|
|
|
|
|
|
tempset: $details.tempset,
|
|
|
|
|
|
|
|
tempid: $details.tempid,
|
|
|
|
|
|
|
|
reeferf: $details.reeferf,
|
|
|
|
|
|
|
|
dclass: $details.dclass,
|
|
|
|
|
|
|
|
marks: $details.marks,
|
|
|
|
|
|
|
|
dunno: $details.dunno,
|
|
|
|
|
|
|
|
dattn: $details.linkman,
|
|
|
|
|
|
|
|
dtel: '',
|
|
|
|
|
|
|
|
kindpkgs: $details.kindpkgs,
|
|
|
|
|
|
|
|
remarks: '',
|
|
|
|
|
|
|
|
placedelivery: $details.placereceipt || 'QINGDAO,CHINA',
|
|
|
|
|
|
|
|
placedeliveryid: $details.placereceiptid || 'CNTAO',
|
|
|
|
|
|
|
|
sendremark: '',
|
|
|
|
|
|
|
|
yardid: $details.yardid,
|
|
|
|
|
|
|
|
yard: $details.yard,
|
|
|
|
|
|
|
|
ediCtn: [
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$details.ctnInputs.forEach((item) => {
|
|
|
|
|
|
|
|
$data.ediCtn.push({
|
|
|
|
|
|
|
|
ctnall: item.ctnall,
|
|
|
|
|
|
|
|
cntrno: item.cntrno,
|
|
|
|
|
|
|
|
sealno: item.sealno,
|
|
|
|
|
|
|
|
pkgs: item.pkgs,
|
|
|
|
|
|
|
|
kindpkgs: item.kindpkgs,
|
|
|
|
|
|
|
|
kgs: item.kgs || 0,
|
|
|
|
|
|
|
|
cbm: item.cbm,
|
|
|
|
|
|
|
|
rowKey: item.rowKey
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if ($data.portloadid) {
|
|
|
|
|
|
|
|
$data.shippercountry = 'CN'
|
|
|
|
|
|
|
|
$data.shippercountryName = 'CN/中国'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($data.portdischargeid) {
|
|
|
|
|
|
|
|
GetPortlist({ KeyWord: $data.portdischargeid }).then((res) => {
|
|
|
|
|
|
|
|
if (res.data) {
|
|
|
|
|
|
|
|
$data.consigneecountry = res.data[0].countryCode
|
|
|
|
|
|
|
|
$data.consigneecountryName = `${res.data[0].countryCode}/${res.data[0].country}`
|
|
|
|
|
|
|
|
$data.notifypartycountry = res.data[0].countryCode
|
|
|
|
|
|
|
|
$data.notifypartycountryName = `${res.data[0].countryCode}/${res.data[0].country}`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($details.shipper) {
|
|
|
|
|
|
|
|
const newArr = $details.shipper.split('\n')
|
|
|
|
|
|
|
|
$data.shippername = newArr[0]
|
|
|
|
|
|
|
|
$data.shipperaddR1 = newArr[1]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($details.consignee) {
|
|
|
|
|
|
|
|
const newArr = $details.consignee.split('\n')
|
|
|
|
|
|
|
|
$data.consigneename = newArr[0]
|
|
|
|
|
|
|
|
$data.consigneeaddR1 = newArr[1]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($details.notifyparty) {
|
|
|
|
|
|
|
|
const newArr = $details.notifyparty.split('\n')
|
|
|
|
|
|
|
|
$data.notifypartyname = newArr[0]
|
|
|
|
|
|
|
|
$data.notifypartyaddR1 = newArr[1]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.orderDetails = $data
|
|
|
|
|
|
|
|
this.orderList[0] = $data
|
|
|
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.warning('只能刷新主提单')
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleModelSubmit() {
|
|
|
|
handleModelSubmit() {
|
|
|
|
if (!this.modelName) {
|
|
|
|
if (!this.modelName) {
|
|
|
@ -2564,30 +2665,6 @@ export default {
|
|
|
|
return str
|
|
|
|
return str
|
|
|
|
},
|
|
|
|
},
|
|
|
|
saveOrder() {
|
|
|
|
saveOrder() {
|
|
|
|
// let check = true
|
|
|
|
|
|
|
|
// this.$refs.basicFrom.validate(valid => {
|
|
|
|
|
|
|
|
// check = valid
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// if (!check) {
|
|
|
|
|
|
|
|
// this.$message.error('保存失败,请选择必填项')
|
|
|
|
|
|
|
|
// return false
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (this.orderDetails.ediCtn.length === 0) {
|
|
|
|
|
|
|
|
// this.$message.error('保存失败,箱信息未填写')
|
|
|
|
|
|
|
|
// return false
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// let tableErrTip = ''
|
|
|
|
|
|
|
|
// this.orderDetails.ediCtn.map((item, index) => {
|
|
|
|
|
|
|
|
// Object.keys(item).map((label, lindex) => {
|
|
|
|
|
|
|
|
// if (this.rules.ctnList[label] && this.rules.ctnList[label].required && !item[label]) {
|
|
|
|
|
|
|
|
// tableErrTip = `${tableErrTip} 序号${index + 1}中${this.rules.ctnList[label].title}未填写,`
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// if (tableErrTip !== '') {
|
|
|
|
|
|
|
|
// this.$message.error(`保存失败, 箱信息错误: ${tableErrTip.substr(0, tableErrTip.length - 1)}`, 3)
|
|
|
|
|
|
|
|
// return false
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
const $data = JSON.parse(JSON.stringify(this.orderDetails))
|
|
|
|
const $data = JSON.parse(JSON.stringify(this.orderDetails))
|
|
|
|
console.log($data)
|
|
|
|
console.log($data)
|
|
|
|
if ($data.isHBL && !$data.hblno) {
|
|
|
|
if ($data.isHBL && !$data.hblno) {
|
|
|
|