|
|
@ -310,13 +310,17 @@ const initDetail = {
|
|
|
|
exRemark4: '',
|
|
|
|
exRemark4: '',
|
|
|
|
// == 以下为太平 ==
|
|
|
|
// == 以下为太平 ==
|
|
|
|
consigneeEdiCode: '',
|
|
|
|
consigneeEdiCode: '',
|
|
|
|
shipperEdiCode: 'CN218868',
|
|
|
|
shipperEdiCode: '',
|
|
|
|
notifyCdoe: '',
|
|
|
|
notifyCdoe: '',
|
|
|
|
salerCode: 'CN087',
|
|
|
|
// salerCode: 'CN087',
|
|
|
|
salerCodeName: 'GRACE SUN',
|
|
|
|
// salerCodeName: 'GRACE SUN',
|
|
|
|
|
|
|
|
salerCode: '',
|
|
|
|
|
|
|
|
salerCodeName: '',
|
|
|
|
emanifestHbl: '',
|
|
|
|
emanifestHbl: '',
|
|
|
|
masterBolIndicator: '3',
|
|
|
|
// masterBolIndicator: '3',
|
|
|
|
masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL',
|
|
|
|
// masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL',
|
|
|
|
|
|
|
|
masterBolIndicator: '',
|
|
|
|
|
|
|
|
masterBolIndicatorName: '',
|
|
|
|
s0CC0C: '',
|
|
|
|
s0CC0C: '',
|
|
|
|
ckhi: '',
|
|
|
|
ckhi: '',
|
|
|
|
cncm: '',
|
|
|
|
cncm: '',
|
|
|
@ -353,13 +357,17 @@ const bookingEDIExt = {
|
|
|
|
exRemark4: '',
|
|
|
|
exRemark4: '',
|
|
|
|
// == 以下为太平 ==
|
|
|
|
// == 以下为太平 ==
|
|
|
|
consigneeEdiCode: '',
|
|
|
|
consigneeEdiCode: '',
|
|
|
|
shipperEdiCode: 'CN218868',
|
|
|
|
shipperEdiCode: '',
|
|
|
|
notifyCdoe: '',
|
|
|
|
notifyCdoe: '',
|
|
|
|
salerCode: 'CN087',
|
|
|
|
// salerCode: 'CN087',
|
|
|
|
salerCodeName: 'GRACE SUN',
|
|
|
|
// salerCodeName: 'GRACE SUN',
|
|
|
|
|
|
|
|
salerCode: '',
|
|
|
|
|
|
|
|
salerCodeName: '',
|
|
|
|
emanifestHbl: '',
|
|
|
|
emanifestHbl: '',
|
|
|
|
masterBolIndicator: '3',
|
|
|
|
// masterBolIndicator: '3',
|
|
|
|
masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL',
|
|
|
|
// masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL',
|
|
|
|
|
|
|
|
masterBolIndicator: '',
|
|
|
|
|
|
|
|
masterBolIndicatorName: '',
|
|
|
|
s0CC0C: '',
|
|
|
|
s0CC0C: '',
|
|
|
|
ckhi: '',
|
|
|
|
ckhi: '',
|
|
|
|
cncm: '',
|
|
|
|
cncm: '',
|
|
|
@ -740,7 +748,7 @@ export default {
|
|
|
|
this.detailsLoadOver = false
|
|
|
|
this.detailsLoadOver = false
|
|
|
|
this.bookingDetails.carrierid = this.type
|
|
|
|
this.bookingDetails.carrierid = this.type
|
|
|
|
this.bookingDetails.carrier = this.type
|
|
|
|
this.bookingDetails.carrier = this.type
|
|
|
|
// this.getDefaultVal()
|
|
|
|
this.getDefaultVal()
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
if (Object.keys(this.$refs).includes('sedOrder')) {
|
|
|
|
if (Object.keys(this.$refs).includes('sedOrder')) {
|
|
|
|
this.$refs.sedOrder.init([])
|
|
|
|
this.$refs.sedOrder.init([])
|
|
|
@ -760,7 +768,7 @@ export default {
|
|
|
|
}).then(res => {
|
|
|
|
}).then(res => {
|
|
|
|
const defaultData = JSON.parse(res.data.configJson)
|
|
|
|
const defaultData = JSON.parse(res.data.configJson)
|
|
|
|
this.defaultData = defaultData
|
|
|
|
this.defaultData = defaultData
|
|
|
|
console.log(defaultData)
|
|
|
|
console.log('==== 获取默认值设置 ====', defaultData)
|
|
|
|
defaultData.map((item, index) => {
|
|
|
|
defaultData.map((item, index) => {
|
|
|
|
const field = item.field.split('.')
|
|
|
|
const field = item.field.split('.')
|
|
|
|
let label = field[1].toLowerCase()
|
|
|
|
let label = field[1].toLowerCase()
|
|
|
@ -946,7 +954,6 @@ export default {
|
|
|
|
delete item.id
|
|
|
|
delete item.id
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!res.data.bookingEDIExt) {
|
|
|
|
if (!res.data.bookingEDIExt) {
|
|
|
|
res.data.bookingEDIExt = bookingEDIExt
|
|
|
|
res.data.bookingEDIExt = bookingEDIExt
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -969,7 +976,6 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (res.data.hbList.length > 0) {
|
|
|
|
if (res.data.hbList.length > 0) {
|
|
|
|
res.data.hbList.map((item, index) => {
|
|
|
|
res.data.hbList.map((item, index) => {
|
|
|
|
// item.bookingEDIExt.shipperEdiCode = item.bookingEDIExt.shipperEdiCode ? item.bookingEDIExt.shipperEdiCode : 'CN218868'
|
|
|
|
|
|
|
|
const newBookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...item.bookingEDIExt }
|
|
|
|
const newBookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...item.bookingEDIExt }
|
|
|
|
item = { ...JSON.parse(JSON.stringify(initDetail)), ...item, ...{ bookingEDIExt: newBookingEDIExt } }
|
|
|
|
item = { ...JSON.parse(JSON.stringify(initDetail)), ...item, ...{ bookingEDIExt: newBookingEDIExt } }
|
|
|
|
if (item.ctnInputs.length > 0) {
|
|
|
|
if (item.ctnInputs.length > 0) {
|
|
|
@ -985,11 +991,10 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
res.data.feeself = !!res.data.feeself
|
|
|
|
res.data.feeself = !!res.data.feeself
|
|
|
|
// res.data.bookingEDIExt.shipperEdiCode = res.data.bookingEDIExt.shipperEdiCode ? res.data.bookingEDIExt.shipperEdiCode : 'CN218868'
|
|
|
|
|
|
|
|
const $BookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...res.data.bookingEDIExt }
|
|
|
|
const $BookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...res.data.bookingEDIExt }
|
|
|
|
this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data, ...{ bookingEDIExt: $BookingEDIExt } })
|
|
|
|
this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data, ...{ bookingEDIExt: $BookingEDIExt } })
|
|
|
|
this.inPageLoading = false
|
|
|
|
this.inPageLoading = false
|
|
|
|
// this.getDefaultVal()
|
|
|
|
this.getDefaultVal()
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
// console.log('== 5. 设置主单保存数据 - false ==')
|
|
|
|
// console.log('== 5. 设置主单保存数据 - false ==')
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
@ -1124,7 +1129,11 @@ export default {
|
|
|
|
let FnOk = () => {
|
|
|
|
let FnOk = () => {
|
|
|
|
const _data = JSON.parse(JSON.stringify(that.bookingDetails))
|
|
|
|
const _data = JSON.parse(JSON.stringify(that.bookingDetails))
|
|
|
|
delete _data.hbList
|
|
|
|
delete _data.hbList
|
|
|
|
|
|
|
|
if (this.isCopy) {
|
|
|
|
|
|
|
|
delete _data.bookingno
|
|
|
|
|
|
|
|
}
|
|
|
|
this.$message.loading({ content: '保存中...' })
|
|
|
|
this.$message.loading({ content: '保存中...' })
|
|
|
|
|
|
|
|
|
|
|
|
BookingOrderSave(_data)
|
|
|
|
BookingOrderSave(_data)
|
|
|
|
.then(res => {
|
|
|
|
.then(res => {
|
|
|
|
if (res.success) {
|
|
|
|
if (res.success) {
|
|
|
|