|
|
|
@ -509,146 +509,215 @@
|
|
|
|
|
// )
|
|
|
|
|
})
|
|
|
|
|
onBeforeRouteUpdate((to, from, next) => {
|
|
|
|
|
if (inAddSave.value) {
|
|
|
|
|
next()
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
if (isCopy.value) {
|
|
|
|
|
const hisData = {
|
|
|
|
|
bookingDetails: bookingDetails.value,
|
|
|
|
|
excuteRules: excuteRules.value,
|
|
|
|
|
excuteRulesType: excuteRulesType.value,
|
|
|
|
|
isAdd: isAdd.value,
|
|
|
|
|
tabActiveKey: tabActiveKey.value,
|
|
|
|
|
mainOrderActiveKey: mainOrderActiveKey.value,
|
|
|
|
|
// type: type.value,
|
|
|
|
|
isCopy: isCopy.value,
|
|
|
|
|
id: id.value,
|
|
|
|
|
}
|
|
|
|
|
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// const secActive = RefsedOrder.value.$data.editIndex
|
|
|
|
|
// hisData.RefsedOrder = secActive
|
|
|
|
|
// }
|
|
|
|
|
historyData.value[`copy-${id.value}`] = hisData
|
|
|
|
|
} else if (route.query.addNum) {
|
|
|
|
|
const hisData = {
|
|
|
|
|
bookingDetails: bookingDetails.value,
|
|
|
|
|
excuteRules: excuteRules.value,
|
|
|
|
|
excuteRulesType: excuteRulesType.value,
|
|
|
|
|
isAdd: isAdd.value,
|
|
|
|
|
tabActiveKey: tabActiveKey.value,
|
|
|
|
|
mainOrderActiveKey: mainOrderActiveKey.value,
|
|
|
|
|
// type: type.value,
|
|
|
|
|
isCopy: isCopy.value,
|
|
|
|
|
// id: id.value
|
|
|
|
|
}
|
|
|
|
|
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// const secActive = RefsedOrder.value.$data.editIndex
|
|
|
|
|
// hisData.RefsedOrder = secActive
|
|
|
|
|
// }
|
|
|
|
|
historyData.value[`add-${route.query.addNum}`] = hisData
|
|
|
|
|
} else {
|
|
|
|
|
const hisData = {
|
|
|
|
|
bookingDetails: bookingDetails.value,
|
|
|
|
|
excuteRules: excuteRules.value,
|
|
|
|
|
excuteRulesType: excuteRulesType.value,
|
|
|
|
|
isAdd: isAdd.value,
|
|
|
|
|
tabActiveKey: tabActiveKey.value,
|
|
|
|
|
mainOrderActiveKey: mainOrderActiveKey.value,
|
|
|
|
|
// type: type.value,
|
|
|
|
|
isCopy: isCopy.value,
|
|
|
|
|
id: id.value,
|
|
|
|
|
}
|
|
|
|
|
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// const secActive = RefsedOrder.value.$data.editIndex
|
|
|
|
|
// hisData.secActive = secActive
|
|
|
|
|
// }
|
|
|
|
|
historyData.value[id.value] = hisData
|
|
|
|
|
}
|
|
|
|
|
if (appStore.getfeeShow) {
|
|
|
|
|
const mapFrame = iframe.value
|
|
|
|
|
const iframeWin = mapFrame.contentWindow
|
|
|
|
|
iframeWin.postMessage(
|
|
|
|
|
{
|
|
|
|
|
type: 'save',
|
|
|
|
|
},
|
|
|
|
|
'*',
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
next()
|
|
|
|
|
}, 100)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
getRouterHis()
|
|
|
|
|
}, 800)
|
|
|
|
|
console.log(to, from, next, 'onBeforeRouteUpdate')
|
|
|
|
|
next()
|
|
|
|
|
})
|
|
|
|
|
onBeforeRouteLeave((to, from, next) => {
|
|
|
|
|
inChildLoading.value = true
|
|
|
|
|
if (isCopy.value) {
|
|
|
|
|
const hisData = {
|
|
|
|
|
bookingDetails: bookingDetails.value,
|
|
|
|
|
excuteRules: excuteRules.value,
|
|
|
|
|
excuteRulesType: excuteRulesType.value,
|
|
|
|
|
isAdd: isAdd.value,
|
|
|
|
|
tabActiveKey: tabActiveKey.value,
|
|
|
|
|
mainOrderActiveKey: mainOrderActiveKey.value,
|
|
|
|
|
// type: type.value,
|
|
|
|
|
isCopy: isCopy.value,
|
|
|
|
|
id: id.value,
|
|
|
|
|
}
|
|
|
|
|
// if (Object.keys(this.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// const secActive = RefsedOrder.value.$data.editIndex
|
|
|
|
|
// hisData.secActive = secActive
|
|
|
|
|
// }
|
|
|
|
|
if (!route.query.copyId) {
|
|
|
|
|
historyData.value[`copy-${id.value}`] = hisData
|
|
|
|
|
} else {
|
|
|
|
|
historyData.value[`copy-${id.value}-${route.query.copyId}`] = hisData
|
|
|
|
|
}
|
|
|
|
|
} else if (route.query.addNum) {
|
|
|
|
|
const hisData = {
|
|
|
|
|
bookingDetails: bookingDetails.value,
|
|
|
|
|
excuteRules: excuteRules.value,
|
|
|
|
|
excuteRulesType: excuteRulesType.value,
|
|
|
|
|
isAdd: isAdd.value,
|
|
|
|
|
tabActiveKey: tabActiveKey.value,
|
|
|
|
|
mainOrderActiveKey: mainOrderActiveKey.value,
|
|
|
|
|
// type: type.value,
|
|
|
|
|
isCopy: isCopy.value,
|
|
|
|
|
// id: id.value
|
|
|
|
|
}
|
|
|
|
|
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// const secActive = RefsedOrder.value.$data.editIndex
|
|
|
|
|
// hisData.secActive = secActive
|
|
|
|
|
// }
|
|
|
|
|
historyData.value[`add-${route.query.addNum}`] = hisData
|
|
|
|
|
// onBeforeRouteUpdate((to, from, next) => {
|
|
|
|
|
// if (inAddSave.value) {
|
|
|
|
|
// next()
|
|
|
|
|
// return false
|
|
|
|
|
// }
|
|
|
|
|
// if (isCopy.value) {
|
|
|
|
|
// const hisData = {
|
|
|
|
|
// bookingDetails: bookingDetails.value,
|
|
|
|
|
// excuteRules: excuteRules.value,
|
|
|
|
|
// excuteRulesType: excuteRulesType.value,
|
|
|
|
|
// isAdd: isAdd.value,
|
|
|
|
|
// tabActiveKey: tabActiveKey.value,
|
|
|
|
|
// mainOrderActiveKey: mainOrderActiveKey.value,
|
|
|
|
|
// // type: type.value,
|
|
|
|
|
// isCopy: isCopy.value,
|
|
|
|
|
// id: id.value,
|
|
|
|
|
// }
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// // const secActive = RefsedOrder.value.$data.editIndex
|
|
|
|
|
// // hisData.RefsedOrder = secActive
|
|
|
|
|
// // }
|
|
|
|
|
// historyData.value[`copy-${id.value}`] = hisData
|
|
|
|
|
// } else if (route.query.addNum) {
|
|
|
|
|
// const hisData = {
|
|
|
|
|
// bookingDetails: bookingDetails.value,
|
|
|
|
|
// excuteRules: excuteRules.value,
|
|
|
|
|
// excuteRulesType: excuteRulesType.value,
|
|
|
|
|
// isAdd: isAdd.value,
|
|
|
|
|
// tabActiveKey: tabActiveKey.value,
|
|
|
|
|
// mainOrderActiveKey: mainOrderActiveKey.value,
|
|
|
|
|
// // type: type.value,
|
|
|
|
|
// isCopy: isCopy.value,
|
|
|
|
|
// // id: id.value
|
|
|
|
|
// }
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// // const secActive = RefsedOrder.value.$data.editIndex
|
|
|
|
|
// // hisData.RefsedOrder = secActive
|
|
|
|
|
// // }
|
|
|
|
|
// historyData.value[`add-${route.query.addNum}`] = hisData
|
|
|
|
|
// } else {
|
|
|
|
|
// const hisData = {
|
|
|
|
|
// bookingDetails: bookingDetails.value,
|
|
|
|
|
// excuteRules: excuteRules.value,
|
|
|
|
|
// excuteRulesType: excuteRulesType.value,
|
|
|
|
|
// isAdd: isAdd.value,
|
|
|
|
|
// tabActiveKey: tabActiveKey.value,
|
|
|
|
|
// mainOrderActiveKey: mainOrderActiveKey.value,
|
|
|
|
|
// // type: type.value,
|
|
|
|
|
// isCopy: isCopy.value,
|
|
|
|
|
// id: id.value,
|
|
|
|
|
// }
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// // const secActive = RefsedOrder.value.$data.editIndex
|
|
|
|
|
// // hisData.secActive = secActive
|
|
|
|
|
// // }
|
|
|
|
|
// historyData.value[id.value] = hisData
|
|
|
|
|
// }
|
|
|
|
|
// if (appStore.getfeeShow) {
|
|
|
|
|
// const mapFrame = iframe.value
|
|
|
|
|
// const iframeWin = mapFrame.contentWindow
|
|
|
|
|
// iframeWin.postMessage(
|
|
|
|
|
// {
|
|
|
|
|
// type: 'save',
|
|
|
|
|
// },
|
|
|
|
|
// '*',
|
|
|
|
|
// )
|
|
|
|
|
// }
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// next()
|
|
|
|
|
// }, 100)
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// getRouterHis()
|
|
|
|
|
// }, 800)
|
|
|
|
|
// })
|
|
|
|
|
// onBeforeRouteLeave((to, from, next) => {
|
|
|
|
|
// inChildLoading.value = true
|
|
|
|
|
// if (isCopy.value) {
|
|
|
|
|
// const hisData = {
|
|
|
|
|
// bookingDetails: bookingDetails.value,
|
|
|
|
|
// excuteRules: excuteRules.value,
|
|
|
|
|
// excuteRulesType: excuteRulesType.value,
|
|
|
|
|
// isAdd: isAdd.value,
|
|
|
|
|
// tabActiveKey: tabActiveKey.value,
|
|
|
|
|
// mainOrderActiveKey: mainOrderActiveKey.value,
|
|
|
|
|
// // type: type.value,
|
|
|
|
|
// isCopy: isCopy.value,
|
|
|
|
|
// id: id.value,
|
|
|
|
|
// }
|
|
|
|
|
// // if (Object.keys(this.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// // const secActive = RefsedOrder.value.$data.editIndex
|
|
|
|
|
// // hisData.secActive = secActive
|
|
|
|
|
// // }
|
|
|
|
|
// if (!route.query.copyId) {
|
|
|
|
|
// historyData.value[`copy-${id.value}`] = hisData
|
|
|
|
|
// } else {
|
|
|
|
|
// historyData.value[`copy-${id.value}-${route.query.copyId}`] = hisData
|
|
|
|
|
// }
|
|
|
|
|
// } else if (route.query.addNum) {
|
|
|
|
|
// const hisData = {
|
|
|
|
|
// bookingDetails: bookingDetails.value,
|
|
|
|
|
// excuteRules: excuteRules.value,
|
|
|
|
|
// excuteRulesType: excuteRulesType.value,
|
|
|
|
|
// isAdd: isAdd.value,
|
|
|
|
|
// tabActiveKey: tabActiveKey.value,
|
|
|
|
|
// mainOrderActiveKey: mainOrderActiveKey.value,
|
|
|
|
|
// // type: type.value,
|
|
|
|
|
// isCopy: isCopy.value,
|
|
|
|
|
// // id: id.value
|
|
|
|
|
// }
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// // const secActive = RefsedOrder.value.$data.editIndex
|
|
|
|
|
// // hisData.secActive = secActive
|
|
|
|
|
// // }
|
|
|
|
|
// historyData.value[`add-${route.query.addNum}`] = hisData
|
|
|
|
|
// } else {
|
|
|
|
|
// const hisData = {
|
|
|
|
|
// bookingDetails: bookingDetails.value,
|
|
|
|
|
// excuteRules: excuteRules.value,
|
|
|
|
|
// excuteRulesType: excuteRulesType.value,
|
|
|
|
|
// isAdd: isAdd.value,
|
|
|
|
|
// tabActiveKey: tabActiveKey.value,
|
|
|
|
|
// mainOrderActiveKey: mainOrderActiveKey.value,
|
|
|
|
|
// // type: type.value,
|
|
|
|
|
// isCopy: isCopy.value,
|
|
|
|
|
// id: id.value,
|
|
|
|
|
// }
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// // const secActive = RefsedOrder.value.$data.editIndex
|
|
|
|
|
// // hisData.secActive = secActive
|
|
|
|
|
// // }
|
|
|
|
|
// historyData.value[id.value] = hisData
|
|
|
|
|
// }
|
|
|
|
|
// if (appStore.gethasbookingDetail) {
|
|
|
|
|
// bookingDetails.value = { ...initDetail }
|
|
|
|
|
// }
|
|
|
|
|
// next()
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// inChildLoading.value = false
|
|
|
|
|
// }, 2000)
|
|
|
|
|
// })
|
|
|
|
|
// ============================================
|
|
|
|
|
|
|
|
|
|
init()
|
|
|
|
|
// 初始化
|
|
|
|
|
function init() {
|
|
|
|
|
bookingDetails.value = { ...initDetail }
|
|
|
|
|
excuteRules.value = []
|
|
|
|
|
excuteRulesType.value = ''
|
|
|
|
|
Showtabs.value = false
|
|
|
|
|
if (id.value) {
|
|
|
|
|
isAdd.value = false
|
|
|
|
|
getDetail()
|
|
|
|
|
getRightAll()
|
|
|
|
|
} else {
|
|
|
|
|
const hisData = {
|
|
|
|
|
bookingDetails: bookingDetails.value,
|
|
|
|
|
excuteRules: excuteRules.value,
|
|
|
|
|
excuteRulesType: excuteRulesType.value,
|
|
|
|
|
isAdd: isAdd.value,
|
|
|
|
|
tabActiveKey: tabActiveKey.value,
|
|
|
|
|
mainOrderActiveKey: mainOrderActiveKey.value,
|
|
|
|
|
// type: type.value,
|
|
|
|
|
isCopy: isCopy.value,
|
|
|
|
|
id: id.value,
|
|
|
|
|
}
|
|
|
|
|
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// const secActive = RefsedOrder.value.$data.editIndex
|
|
|
|
|
// hisData.secActive = secActive
|
|
|
|
|
// }
|
|
|
|
|
historyData.value[id.value] = hisData
|
|
|
|
|
isAdd.value = true
|
|
|
|
|
detailsLoadOver.value = false
|
|
|
|
|
// bookingDetails.value.carrierid = type.value
|
|
|
|
|
// bookingDetails.value.carrier = type.value
|
|
|
|
|
isLockBooking.value = false
|
|
|
|
|
getFilter()
|
|
|
|
|
getDefaultVal()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// RefsedOrder.value.init([])
|
|
|
|
|
// }
|
|
|
|
|
// if (Object.keys(that.$refs).includes('goodsTable')) {
|
|
|
|
|
// RefgoodsTable.value.init()
|
|
|
|
|
// }
|
|
|
|
|
detailsLoadOver.value = true
|
|
|
|
|
}, 200)
|
|
|
|
|
}
|
|
|
|
|
if (appStore.gethasbookingDetail) {
|
|
|
|
|
bookingDetails.value = { ...initDetail }
|
|
|
|
|
FngetDjyTenantConfig()
|
|
|
|
|
}
|
|
|
|
|
// 获取详情
|
|
|
|
|
function getDetail() {
|
|
|
|
|
if (inPageLoading.value) {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
next()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
inChildLoading.value = false
|
|
|
|
|
}, 2000)
|
|
|
|
|
})
|
|
|
|
|
// ============================================
|
|
|
|
|
inPageLoading.value = true
|
|
|
|
|
inChildLoading.value = true
|
|
|
|
|
detailsLoadOver.value = false
|
|
|
|
|
notification.open({ message: '加载中...' })
|
|
|
|
|
BookingOrderGet({
|
|
|
|
|
id: id.value,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (route.query.isCopy) {
|
|
|
|
|
console.log(res, 123123123)
|
|
|
|
|
res.data = {
|
|
|
|
|
...res.data,
|
|
|
|
|
id: '',
|
|
|
|
|
customerNo: '',
|
|
|
|
|
isBusinessLocking: '',
|
|
|
|
|
isFeeLocking: '',
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log(res)
|
|
|
|
|
|
|
|
|
|
notification.destroy()
|
|
|
|
|
setDeatilsFun(res, false)
|
|
|
|
|
appStore.settopDown(false)
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
appStore.settopDown(false)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//点击保存
|
|
|
|
|
function saveFun() {
|
|
|
|
|
bookingOrderUpdate()
|
|
|
|
@ -1028,226 +1097,254 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 复制
|
|
|
|
|
function copyBookingFun() {
|
|
|
|
|
console.log(route.query.id, 'copyBookingFun')
|
|
|
|
|
if (route.query.isCopy) {
|
|
|
|
|
notification.error({ message: '当前已为,复制页', duration: 3 })
|
|
|
|
|
} else if (route.query.id) {
|
|
|
|
|
go(`/BookingDetail?id=${id.value}&isCopy=true`)
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: '仅详情页,可复制', duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 刷新
|
|
|
|
|
function refreshPage() {
|
|
|
|
|
if (appStore.getfeeShow) {
|
|
|
|
|
const mapFrame = iframe.value
|
|
|
|
|
const iframeWin = mapFrame.contentWindow
|
|
|
|
|
iframeWin.postMessage(
|
|
|
|
|
{
|
|
|
|
|
id: bookingDetails.valueid,
|
|
|
|
|
type: 'empty',
|
|
|
|
|
},
|
|
|
|
|
'*',
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
init()
|
|
|
|
|
RefrightContent.value.init()
|
|
|
|
|
}, 100)
|
|
|
|
|
}
|
|
|
|
|
// ============================================
|
|
|
|
|
function getRouterHis() {
|
|
|
|
|
inChildLoading.value = true
|
|
|
|
|
const newId = route.query.id ? route.query.id.toString() : ''
|
|
|
|
|
if (
|
|
|
|
|
(Object.keys(historyData.value).includes(`copy-${newId}`) ||
|
|
|
|
|
Object.keys(historyData.value).includes(`copy-${newId}-${route.query.copyId}`)) &&
|
|
|
|
|
route.query.isCopy === 'true'
|
|
|
|
|
) {
|
|
|
|
|
if (!route.query.copyId) {
|
|
|
|
|
const $data = JSON.parse(JSON.stringify(historyData.value[`copy-${newId}`]))
|
|
|
|
|
bookingDetails.value = $data.bookingDetails
|
|
|
|
|
oldBookingDetails.value = JSON.parse(JSON.stringify(bookingDetails.value))
|
|
|
|
|
excuteRules.value = $data.excuteRules
|
|
|
|
|
excuteRulesType.value = $data.excuteRulesType
|
|
|
|
|
isAdd.value = $data.isAdd
|
|
|
|
|
tabActiveKey.value = $data.tabActiveKey
|
|
|
|
|
mainOrderActiveKey.value = $data.mainOrderActiveKey
|
|
|
|
|
} else {
|
|
|
|
|
const $data = JSON.parse(
|
|
|
|
|
JSON.stringify(historyData.value[`copy-${newId}-${route.query.copyId}`]),
|
|
|
|
|
)
|
|
|
|
|
bookingDetails.value = $data.bookingDetails
|
|
|
|
|
oldBookingDetails.value = JSON.parse(JSON.stringify(bookingDetails.value))
|
|
|
|
|
excuteRules.value = $data.excuteRules
|
|
|
|
|
excuteRulesType.value = $data.excuteRulesType
|
|
|
|
|
isAdd.value = $data.isAdd
|
|
|
|
|
tabActiveKey.value = $data.tabActiveKey
|
|
|
|
|
mainOrderActiveKey.value = $data.mainOrderActiveKey
|
|
|
|
|
}
|
|
|
|
|
id.value = route.query.id
|
|
|
|
|
isCopy.value = route.query.isCopy
|
|
|
|
|
inPageLoading.value = false
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
if (bookingDetails.value.hbList && bookingDetails.value.hbList.length > 0) {
|
|
|
|
|
Showtabs.value = true
|
|
|
|
|
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// RefsedOrder.value.init(bookingDetails.value.hbList)
|
|
|
|
|
// }
|
|
|
|
|
} else {
|
|
|
|
|
Showtabs.value = false
|
|
|
|
|
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// RefsedOrder.value.init([])
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
// if (Object.keys(that.$refs).includes('goodsTable')) {
|
|
|
|
|
// RefgoodsTable.value.init()
|
|
|
|
|
// }
|
|
|
|
|
}, 200)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
const key = route.fullPath
|
|
|
|
|
const detailsChange = Object.keys(appStore.getneedSavePages).includes(key)
|
|
|
|
|
? !!appStore.getneedSavePages[key].details
|
|
|
|
|
: false
|
|
|
|
|
checkSaveFun({ type: 'details', hasChange: detailsChange })
|
|
|
|
|
// function getRouterHis() {
|
|
|
|
|
// inChildLoading.value = true
|
|
|
|
|
// const newId = route.query.id ? route.query.id.toString() : ''
|
|
|
|
|
// if (
|
|
|
|
|
// (Object.keys(historyData.value).includes(`copy-${newId}`) ||
|
|
|
|
|
// Object.keys(historyData.value).includes(`copy-${newId}-${route.query.copyId}`)) &&
|
|
|
|
|
// route.query.isCopy === 'true'
|
|
|
|
|
// ) {
|
|
|
|
|
// if (!route.query.copyId) {
|
|
|
|
|
// const $data = JSON.parse(JSON.stringify(historyData.value[`copy-${newId}`]))
|
|
|
|
|
// bookingDetails.value = $data.bookingDetails
|
|
|
|
|
// oldBookingDetails.value = JSON.parse(JSON.stringify(bookingDetails.value))
|
|
|
|
|
// excuteRules.value = $data.excuteRules
|
|
|
|
|
// excuteRulesType.value = $data.excuteRulesType
|
|
|
|
|
// isAdd.value = $data.isAdd
|
|
|
|
|
// tabActiveKey.value = $data.tabActiveKey
|
|
|
|
|
// mainOrderActiveKey.value = $data.mainOrderActiveKey
|
|
|
|
|
// } else {
|
|
|
|
|
// const $data = JSON.parse(
|
|
|
|
|
// JSON.stringify(historyData.value[`copy-${newId}-${route.query.copyId}`]),
|
|
|
|
|
// )
|
|
|
|
|
// bookingDetails.value = $data.bookingDetails
|
|
|
|
|
// oldBookingDetails.value = JSON.parse(JSON.stringify(bookingDetails.value))
|
|
|
|
|
// excuteRules.value = $data.excuteRules
|
|
|
|
|
// excuteRulesType.value = $data.excuteRulesType
|
|
|
|
|
// isAdd.value = $data.isAdd
|
|
|
|
|
// tabActiveKey.value = $data.tabActiveKey
|
|
|
|
|
// mainOrderActiveKey.value = $data.mainOrderActiveKey
|
|
|
|
|
// }
|
|
|
|
|
// id.value = route.query.id
|
|
|
|
|
// isCopy.value = route.query.isCopy
|
|
|
|
|
// inPageLoading.value = false
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// if (bookingDetails.value.hbList && bookingDetails.value.hbList.length > 0) {
|
|
|
|
|
// Showtabs.value = true
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// // RefsedOrder.value.init(bookingDetails.value.hbList)
|
|
|
|
|
// // }
|
|
|
|
|
// } else {
|
|
|
|
|
// Showtabs.value = false
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// // RefsedOrder.value.init([])
|
|
|
|
|
// // }
|
|
|
|
|
// }
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('goodsTable')) {
|
|
|
|
|
// // RefgoodsTable.value.init()
|
|
|
|
|
// // }
|
|
|
|
|
// }, 200)
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// const key = route.fullPath
|
|
|
|
|
// const detailsChange = Object.keys(appStore.getneedSavePages).includes(key)
|
|
|
|
|
// ? !!appStore.getneedSavePages[key].details
|
|
|
|
|
// : false
|
|
|
|
|
// checkSaveFun({ type: 'details', hasChange: detailsChange })
|
|
|
|
|
|
|
|
|
|
const hbListChange = !!appStore.getneedSavePages[key].hbList
|
|
|
|
|
checkSaveFun({ type: 'hbList', hasChange: hbListChange })
|
|
|
|
|
inChildLoading.value = false
|
|
|
|
|
}, 500)
|
|
|
|
|
isLockBooking.value = false
|
|
|
|
|
getFilter()
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
} else if (
|
|
|
|
|
Object.keys(historyData.value).includes(`add-${route.query.addNum}`) &&
|
|
|
|
|
route.query.addNum
|
|
|
|
|
) {
|
|
|
|
|
const $data = JSON.parse(JSON.stringify(historyData.value[`add-${route.query.addNum}`]))
|
|
|
|
|
bookingDetails.value = $data.bookingDetails
|
|
|
|
|
oldBookingDetails.value = JSON.parse(JSON.stringify(bookingDetails.value))
|
|
|
|
|
excuteRules.value = $data.excuteRules
|
|
|
|
|
excuteRulesType.value = $data.excuteRulesType
|
|
|
|
|
isAdd.value = $data.isAdd
|
|
|
|
|
tabActiveKey.value = $data.tabActiveKey
|
|
|
|
|
mainOrderActiveKey.value = $data.mainOrderActiveKey
|
|
|
|
|
isCopy.value = route.query.isCopy || false
|
|
|
|
|
inPageLoading.value = false
|
|
|
|
|
if (isCopy.value && !$data.isCopy) {
|
|
|
|
|
bookingDetails.value.mblno = ''
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
if (bookingDetails.value.hbList && bookingDetails.value.hbList.length > 0) {
|
|
|
|
|
Showtabs.value = true
|
|
|
|
|
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// RefsedOrder.value.init(bookingDetails.value.hbList)
|
|
|
|
|
// }
|
|
|
|
|
} else {
|
|
|
|
|
Showtabs.value = false
|
|
|
|
|
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// RefsedOrder.value.init([])
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
// if (Object.keys(that.$refs).includes('goodsTable')) {
|
|
|
|
|
// RefgoodsTable.value.init()
|
|
|
|
|
// }
|
|
|
|
|
}, 200)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
const key = route.fullPath
|
|
|
|
|
// const hbListChange = !!appStore.getneedSavePages[key].hbList
|
|
|
|
|
// checkSaveFun({ type: 'hbList', hasChange: hbListChange })
|
|
|
|
|
// inChildLoading.value = false
|
|
|
|
|
// }, 500)
|
|
|
|
|
// isLockBooking.value = false
|
|
|
|
|
// getFilter()
|
|
|
|
|
// that.$forceUpdate()
|
|
|
|
|
// } else if (
|
|
|
|
|
// Object.keys(historyData.value).includes(`add-${route.query.addNum}`) &&
|
|
|
|
|
// route.query.addNum
|
|
|
|
|
// ) {
|
|
|
|
|
// const $data = JSON.parse(JSON.stringify(historyData.value[`add-${route.query.addNum}`]))
|
|
|
|
|
// bookingDetails.value = $data.bookingDetails
|
|
|
|
|
// oldBookingDetails.value = JSON.parse(JSON.stringify(bookingDetails.value))
|
|
|
|
|
// excuteRules.value = $data.excuteRules
|
|
|
|
|
// excuteRulesType.value = $data.excuteRulesType
|
|
|
|
|
// isAdd.value = $data.isAdd
|
|
|
|
|
// tabActiveKey.value = $data.tabActiveKey
|
|
|
|
|
// mainOrderActiveKey.value = $data.mainOrderActiveKey
|
|
|
|
|
// isCopy.value = route.query.isCopy || false
|
|
|
|
|
// inPageLoading.value = false
|
|
|
|
|
// if (isCopy.value && !$data.isCopy) {
|
|
|
|
|
// bookingDetails.value.mblno = ''
|
|
|
|
|
// }
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// if (bookingDetails.value.hbList && bookingDetails.value.hbList.length > 0) {
|
|
|
|
|
// Showtabs.value = true
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// // RefsedOrder.value.init(bookingDetails.value.hbList)
|
|
|
|
|
// // }
|
|
|
|
|
// } else {
|
|
|
|
|
// Showtabs.value = false
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// // RefsedOrder.value.init([])
|
|
|
|
|
// // }
|
|
|
|
|
// }
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('goodsTable')) {
|
|
|
|
|
// // RefgoodsTable.value.init()
|
|
|
|
|
// // }
|
|
|
|
|
// }, 200)
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// const key = route.fullPath
|
|
|
|
|
|
|
|
|
|
const detailsChange = Object.keys(appStore.getneedSavePages).includes(key)
|
|
|
|
|
? !!appStore.getneedSavePages[key].details
|
|
|
|
|
: false
|
|
|
|
|
checkSaveFun({ type: 'details', hasChange: detailsChange })
|
|
|
|
|
// const detailsChange = Object.keys(appStore.getneedSavePages).includes(key)
|
|
|
|
|
// ? !!appStore.getneedSavePages[key].details
|
|
|
|
|
// : false
|
|
|
|
|
// checkSaveFun({ type: 'details', hasChange: detailsChange })
|
|
|
|
|
|
|
|
|
|
const hbListChange = !!appStore.getneedSavePages[key].hbList
|
|
|
|
|
checkSaveFun({ type: 'hbList', hasChange: hbListChange })
|
|
|
|
|
inChildLoading.value = false
|
|
|
|
|
}, 500)
|
|
|
|
|
isLockBooking.value = false
|
|
|
|
|
getFilter()
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
} else if (Object.keys(historyData.value).includes(newId)) {
|
|
|
|
|
id.value = route.query.id
|
|
|
|
|
const $data = JSON.parse(JSON.stringify(historyData.value[newId]))
|
|
|
|
|
isCopy.value = route.query.isCopy
|
|
|
|
|
excuteRules.value = $data.excuteRules
|
|
|
|
|
excuteRulesType.value = $data.excuteRulesType
|
|
|
|
|
isAdd.value = $data.isAdd
|
|
|
|
|
tabActiveKey.value = $data.tabActiveKey
|
|
|
|
|
mainOrderActiveKey.value = $data.mainOrderActiveKey
|
|
|
|
|
inPageLoading.value = false
|
|
|
|
|
if ($data.bookingDetails.goodsStatus && isCopy.value) {
|
|
|
|
|
$data.bookingDetails.goodsStatus.forEach((item) => {
|
|
|
|
|
delete item.isPublic
|
|
|
|
|
delete item.finishUserId
|
|
|
|
|
delete item.finishTime
|
|
|
|
|
delete item.finishUser
|
|
|
|
|
delete item.remark
|
|
|
|
|
delete item.extData
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (isCopy.value && !$data.isCopy) {
|
|
|
|
|
const copyData = {
|
|
|
|
|
customername: $data.bookingDetails.customername,
|
|
|
|
|
portloadid: $data.bookingDetails.portloadid,
|
|
|
|
|
carrierid: $data.bookingDetails.carrierid,
|
|
|
|
|
carrier: $data.bookingDetails.carrier,
|
|
|
|
|
portload: $data.bookingDetails.portload,
|
|
|
|
|
issueplace: $data.bookingDetails.issueplace,
|
|
|
|
|
prepardat: $data.bookingDetails.prepardat,
|
|
|
|
|
route: $data.bookingDetails.route,
|
|
|
|
|
shippingMethod: $data.bookingDetails.shippingMethod,
|
|
|
|
|
shipper: $data.bookingDetails.shipper,
|
|
|
|
|
consignee: $data.bookingDetails.consignee,
|
|
|
|
|
notifyparty: $data.bookingDetails.notifyparty,
|
|
|
|
|
goodsStatus: $data.bookingDetails.goodsStatus,
|
|
|
|
|
sale: $data.bookingDetails.sale,
|
|
|
|
|
}
|
|
|
|
|
bookingDetails.value = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
|
|
|
|
|
oldBookingDetails.value = JSON.parse(JSON.stringify(bookingDetails.value))
|
|
|
|
|
} else {
|
|
|
|
|
bookingDetails.value = $data.bookingDetails
|
|
|
|
|
oldBookingDetails.value = JSON.parse(JSON.stringify(bookingDetails.value))
|
|
|
|
|
if (appStore.gettopDown) {
|
|
|
|
|
getDetail()
|
|
|
|
|
}
|
|
|
|
|
getRightAll()
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
if (bookingDetails.value.hbList && bookingDetails.value.hbList.length > 0) {
|
|
|
|
|
Showtabs.value = true
|
|
|
|
|
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// RefsedOrder.value.init(bookingDetails.value.hbList)
|
|
|
|
|
// }
|
|
|
|
|
} else {
|
|
|
|
|
Showtabs.value = false
|
|
|
|
|
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// RefsedOrder.value.init([])
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
// if (Object.keys(that.$refs).includes('goodsTable')) {
|
|
|
|
|
// RefgoodsTable.value.init()
|
|
|
|
|
// }
|
|
|
|
|
}, 200)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
const key = route.fullPath
|
|
|
|
|
sendMessageFY()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
const detailsChange = Object.keys(appStore.getneedSavePages).includes(key)
|
|
|
|
|
? !!appStore.getneedSavePages[key].details
|
|
|
|
|
: false
|
|
|
|
|
checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
const hbListChange = !!appStore.getneedSavePages[key].hbList
|
|
|
|
|
checkSaveFun({ type: 'hbList', hasChange: hbListChange })
|
|
|
|
|
inChildLoading.value = false
|
|
|
|
|
}, 1300)
|
|
|
|
|
}, 500)
|
|
|
|
|
getFilter()
|
|
|
|
|
if (!bookingDetails.value.extendState) {
|
|
|
|
|
isLockBooking.value = false
|
|
|
|
|
} else {
|
|
|
|
|
isLockBooking.value = bookingDetails.value.extendState.isLockBooking
|
|
|
|
|
}
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
id.value = route.query.id
|
|
|
|
|
// type.value = route.query.type || 'CMA'
|
|
|
|
|
isCopy.value = route.query.isCopy || false
|
|
|
|
|
tabActiveKey.value = '1'
|
|
|
|
|
mainOrderActiveKey.value = '1-1'
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
init()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
const key = route.fullPath
|
|
|
|
|
// const hbListChange = !!appStore.getneedSavePages[key].hbList
|
|
|
|
|
// checkSaveFun({ type: 'hbList', hasChange: hbListChange })
|
|
|
|
|
// inChildLoading.value = false
|
|
|
|
|
// }, 500)
|
|
|
|
|
// isLockBooking.value = false
|
|
|
|
|
// getFilter()
|
|
|
|
|
// that.$forceUpdate()
|
|
|
|
|
// } else if (Object.keys(historyData.value).includes(newId)) {
|
|
|
|
|
// id.value = route.query.id
|
|
|
|
|
// const $data = JSON.parse(JSON.stringify(historyData.value[newId]))
|
|
|
|
|
// isCopy.value = route.query.isCopy
|
|
|
|
|
// excuteRules.value = $data.excuteRules
|
|
|
|
|
// excuteRulesType.value = $data.excuteRulesType
|
|
|
|
|
// isAdd.value = $data.isAdd
|
|
|
|
|
// tabActiveKey.value = $data.tabActiveKey
|
|
|
|
|
// mainOrderActiveKey.value = $data.mainOrderActiveKey
|
|
|
|
|
// inPageLoading.value = false
|
|
|
|
|
// if ($data.bookingDetails.goodsStatus && isCopy.value) {
|
|
|
|
|
// $data.bookingDetails.goodsStatus.forEach((item) => {
|
|
|
|
|
// delete item.isPublic
|
|
|
|
|
// delete item.finishUserId
|
|
|
|
|
// delete item.finishTime
|
|
|
|
|
// delete item.finishUser
|
|
|
|
|
// delete item.remark
|
|
|
|
|
// delete item.extData
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// if (isCopy.value && !$data.isCopy) {
|
|
|
|
|
// const copyData = {
|
|
|
|
|
// customername: $data.bookingDetails.customername,
|
|
|
|
|
// portloadid: $data.bookingDetails.portloadid,
|
|
|
|
|
// carrierid: $data.bookingDetails.carrierid,
|
|
|
|
|
// carrier: $data.bookingDetails.carrier,
|
|
|
|
|
// portload: $data.bookingDetails.portload,
|
|
|
|
|
// issueplace: $data.bookingDetails.issueplace,
|
|
|
|
|
// prepardat: $data.bookingDetails.prepardat,
|
|
|
|
|
// route: $data.bookingDetails.route,
|
|
|
|
|
// shippingMethod: $data.bookingDetails.shippingMethod,
|
|
|
|
|
// shipper: $data.bookingDetails.shipper,
|
|
|
|
|
// consignee: $data.bookingDetails.consignee,
|
|
|
|
|
// notifyparty: $data.bookingDetails.notifyparty,
|
|
|
|
|
// goodsStatus: $data.bookingDetails.goodsStatus,
|
|
|
|
|
// sale: $data.bookingDetails.sale,
|
|
|
|
|
// }
|
|
|
|
|
// bookingDetails.value = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
|
|
|
|
|
// oldBookingDetails.value = JSON.parse(JSON.stringify(bookingDetails.value))
|
|
|
|
|
// } else {
|
|
|
|
|
// bookingDetails.value = $data.bookingDetails
|
|
|
|
|
// oldBookingDetails.value = JSON.parse(JSON.stringify(bookingDetails.value))
|
|
|
|
|
// if (appStore.gettopDown) {
|
|
|
|
|
// getDetail()
|
|
|
|
|
// }
|
|
|
|
|
// getRightAll()
|
|
|
|
|
// }
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// if (bookingDetails.value.hbList && bookingDetails.value.hbList.length > 0) {
|
|
|
|
|
// Showtabs.value = true
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// // RefsedOrder.value.init(bookingDetails.value.hbList)
|
|
|
|
|
// // }
|
|
|
|
|
// } else {
|
|
|
|
|
// Showtabs.value = false
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// // RefsedOrder.value.init([])
|
|
|
|
|
// // }
|
|
|
|
|
// }
|
|
|
|
|
// // if (Object.keys(that.$refs).includes('goodsTable')) {
|
|
|
|
|
// // RefgoodsTable.value.init()
|
|
|
|
|
// // }
|
|
|
|
|
// }, 200)
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// const key = route.fullPath
|
|
|
|
|
// sendMessageFY()
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// const detailsChange = Object.keys(appStore.getneedSavePages).includes(key)
|
|
|
|
|
// ? !!appStore.getneedSavePages[key].details
|
|
|
|
|
// : false
|
|
|
|
|
// checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
// const hbListChange = !!appStore.getneedSavePages[key].hbList
|
|
|
|
|
// checkSaveFun({ type: 'hbList', hasChange: hbListChange })
|
|
|
|
|
// inChildLoading.value = false
|
|
|
|
|
// }, 1300)
|
|
|
|
|
// }, 500)
|
|
|
|
|
// getFilter()
|
|
|
|
|
// if (!bookingDetails.value.extendState) {
|
|
|
|
|
// isLockBooking.value = false
|
|
|
|
|
// } else {
|
|
|
|
|
// isLockBooking.value = bookingDetails.value.extendState.isLockBooking
|
|
|
|
|
// }
|
|
|
|
|
// that.$forceUpdate()
|
|
|
|
|
// } else {
|
|
|
|
|
// id.value = route.query.id
|
|
|
|
|
// // type.value = route.query.type || 'CMA'
|
|
|
|
|
// isCopy.value = route.query.isCopy || false
|
|
|
|
|
// tabActiveKey.value = '1'
|
|
|
|
|
// mainOrderActiveKey.value = '1-1'
|
|
|
|
|
// that.$forceUpdate()
|
|
|
|
|
// init()
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// const key = route.fullPath
|
|
|
|
|
|
|
|
|
|
const detailsChange = Object.keys(appStore.getneedSavePages).includes(key)
|
|
|
|
|
? !!appStore.getneedSavePages[key].details
|
|
|
|
|
: false
|
|
|
|
|
checkSaveFun({ type: 'details', hasChange: detailsChange })
|
|
|
|
|
// const detailsChange = Object.keys(appStore.getneedSavePages).includes(key)
|
|
|
|
|
// ? !!appStore.getneedSavePages[key].details
|
|
|
|
|
// : false
|
|
|
|
|
// checkSaveFun({ type: 'details', hasChange: detailsChange })
|
|
|
|
|
|
|
|
|
|
const hbListChange = !!appStore.getneedSavePages[key].hbList
|
|
|
|
|
checkSaveFun({ type: 'hbList', hasChange: hbListChange })
|
|
|
|
|
inChildLoading.value = false
|
|
|
|
|
}, 500)
|
|
|
|
|
}
|
|
|
|
|
// RefbasicInfo.value.$refs.RefbasicFrom.clearValidate()
|
|
|
|
|
// RefmailingInfo.value.$refs.RefmailingFrom.clearValidate()
|
|
|
|
|
// RefcargoInfo.value.$refs.RefcargoFrom.clearValidate()
|
|
|
|
|
}
|
|
|
|
|
// const hbListChange = !!appStore.getneedSavePages[key].hbList
|
|
|
|
|
// checkSaveFun({ type: 'hbList', hasChange: hbListChange })
|
|
|
|
|
// inChildLoading.value = false
|
|
|
|
|
// }, 500)
|
|
|
|
|
// }
|
|
|
|
|
// // RefbasicInfo.value.$refs.RefbasicFrom.clearValidate()
|
|
|
|
|
// // RefmailingInfo.value.$refs.RefmailingFrom.clearValidate()
|
|
|
|
|
// // RefcargoInfo.value.$refs.RefcargoFrom.clearValidate()
|
|
|
|
|
// }
|
|
|
|
|
function fileNewUpadte(file) {
|
|
|
|
|
bookingDetails.value.tempFiles.push({
|
|
|
|
|
tempPathName: file.tempPathName,
|
|
|
|
@ -1399,52 +1496,7 @@
|
|
|
|
|
RefsedOrder.value.init(bookingDetails.value.hbList)
|
|
|
|
|
}, 100)
|
|
|
|
|
}
|
|
|
|
|
function refreshPage() {
|
|
|
|
|
if (appStore.getfeeShow) {
|
|
|
|
|
const mapFrame = iframe.value
|
|
|
|
|
const iframeWin = mapFrame.contentWindow
|
|
|
|
|
iframeWin.postMessage(
|
|
|
|
|
{
|
|
|
|
|
id: bookingDetails.valueid,
|
|
|
|
|
type: 'empty',
|
|
|
|
|
},
|
|
|
|
|
'*',
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
init()
|
|
|
|
|
RefrightContent.value.init()
|
|
|
|
|
}, 100)
|
|
|
|
|
}
|
|
|
|
|
function init() {
|
|
|
|
|
bookingDetails.value = { ...initDetail }
|
|
|
|
|
excuteRules.value = []
|
|
|
|
|
excuteRulesType.value = ''
|
|
|
|
|
Showtabs.value = false
|
|
|
|
|
if (id.value) {
|
|
|
|
|
isAdd.value = false
|
|
|
|
|
getDetail()
|
|
|
|
|
getRightAll()
|
|
|
|
|
} else {
|
|
|
|
|
isAdd.value = true
|
|
|
|
|
detailsLoadOver.value = false
|
|
|
|
|
// bookingDetails.value.carrierid = type.value
|
|
|
|
|
// bookingDetails.value.carrier = type.value
|
|
|
|
|
isLockBooking.value = false
|
|
|
|
|
getFilter()
|
|
|
|
|
getDefaultVal()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
|
|
|
|
|
// RefsedOrder.value.init([])
|
|
|
|
|
// }
|
|
|
|
|
// if (Object.keys(that.$refs).includes('goodsTable')) {
|
|
|
|
|
// RefgoodsTable.value.init()
|
|
|
|
|
// }
|
|
|
|
|
detailsLoadOver.value = true
|
|
|
|
|
}, 200)
|
|
|
|
|
}
|
|
|
|
|
FngetDjyTenantConfig()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function FngetDjyTenantConfig() {
|
|
|
|
|
getDjyTenantConfig({
|
|
|
|
|
type: 'booking_form_col',
|
|
|
|
@ -1634,29 +1686,9 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function getFilter() {
|
|
|
|
|
listYardBwCarrier({ carrierCode: bookingDetails.value.carrierid }).then((res) => {
|
|
|
|
|
appStore.setyardFilter(res.data)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function getDetail() {
|
|
|
|
|
if (inPageLoading.value) {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
inPageLoading.value = true
|
|
|
|
|
inChildLoading.value = true
|
|
|
|
|
detailsLoadOver.value = false
|
|
|
|
|
notification.open({ message: '加载中...' })
|
|
|
|
|
BookingOrderGet({
|
|
|
|
|
id: id.value,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
notification.destroy()
|
|
|
|
|
setDeatilsFun(res, false)
|
|
|
|
|
appStore.settopDown(false)
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
appStore.settopDown(false)
|
|
|
|
|
})
|
|
|
|
|
// listYardBwCarrier({ carrierCode: bookingDetails.value.carrierid }).then((res) => {
|
|
|
|
|
// appStore.setyardFilter(res.data)
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ocrUpflie(file) {
|
|
|
|
@ -1690,14 +1722,7 @@
|
|
|
|
|
changePage(type)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function copyBookingFun() {
|
|
|
|
|
if (!saveBtnFlag.value) {
|
|
|
|
|
router.push({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: { id: id.value, isCopy: 'true', type: bookingDetails.value.carrierid },
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function addSedList() {
|
|
|
|
|
if (isAdd.value) {
|
|
|
|
|
notification.error({ message: '请先保存主单', duration: 3 })
|
|
|
|
@ -2191,16 +2216,21 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
defineExpose({
|
|
|
|
|
getRouterHis,
|
|
|
|
|
// getRouterHis,
|
|
|
|
|
init,
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import { defineComponent } from 'vue'
|
|
|
|
|
import { object } from 'vue-types'
|
|
|
|
|
import { log } from 'console'
|
|
|
|
|
// import { object } from 'vue-types'
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
beforeRouteEnter(to, from, next) {
|
|
|
|
|
next((vm) => {
|
|
|
|
|
vm.getRouterHis()
|
|
|
|
|
// vm.getRouterHis()
|
|
|
|
|
console.log('beforeRouteEnter')
|
|
|
|
|
|
|
|
|
|
vm.init()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|