szh_zidingyibiaoti
张同海 2 years ago
commit ffd66cdff4

@ -717,6 +717,24 @@ export function BookingOrderDeleteRemark(parameter) {
return axios({
url: '/BookingOrder/DeleteRemark',
method: 'post',
data: parameter
})
}
// 服务项目
export function SaveServiceItem(parameter) {
return axios({
url: '/BookingOrder/SaveServiceItem',
method: 'post',
data: parameter
})
}
// 服务项目
export function GetServiceItemList(parameter) {
return axios({
url: '/BookingOrder/GetServiceItemList',
method: 'get',
params: parameter
})
}

@ -13,7 +13,7 @@ export default {
}
},
computed: {
...mapGetters(['needSavePages'])
...mapGetters(['needSavePages', 'hasbookingDetail'])
},
created() {
// bind event
@ -44,7 +44,7 @@ export default {
this.selectedLastPath()
},
methods: {
...mapActions(['setNeedSavePages']),
...mapActions(['setNeedSavePages', 'setHasBookingDetail']),
onEdit(targetKey, action) {
const _that = this
if (targetKey.includes('BookingDetail')) {
@ -80,6 +80,13 @@ export default {
if (!this.fullPathList.includes(this.activeKey)) {
this.selectedLastPath()
}
let hasDetail = false
this.fullPathList.map((item, index) => {
if (item.includes('/BookingDetail')) {
hasDetail = true
}
})
this.setHasBookingDetail(hasDetail)
},
selectedLastPath() {
this.activeKey = this.fullPathList[this.fullPathList.length - 1]

@ -17,8 +17,8 @@ const getters = {
multiTab: state => state.app.multiTab,
lang: state => state.i18n.lang,
bookingList: state => state.user.bookingList,
needSavePages: state => state.user.needSavePages
needSavePages: state => state.user.needSavePages,
hasbookingDetail: state => state.user.hasbookingDetail
}
export default getters

@ -21,7 +21,8 @@ const user = {
info: {},
notices: [], // 接收的通知公告
bookingList: {}, // 订舱台账列表
needSavePages: {} // 需要保存的页面
needSavePages: {}, // 需要保存的页面
hasbookingDetail: false // 订舱详情是否销毁
},
mutations: {
@ -77,6 +78,9 @@ const user = {
},
SET_NEEDSAVEPAGES: (state, list) => {
state.needSavePages = list
},
SET_HASBOOKINGDETAIL: (state, obj) => {
state.hasbookingDetail = obj
}
},
@ -272,6 +276,14 @@ const user = {
commit('SET_NEEDSAVEPAGES', obj)
resolve()
})
},
// 设置订舱页是否需要销毁
setHasBookingDetail({ commit }, obj) {
return new Promise(resolve => {
commit('SET_HASBOOKINGDETAIL', obj)
resolve()
})
}
}
}

@ -310,7 +310,7 @@ export default {
}
},
computed: {
...mapGetters(['bookingList', 'needSavePages'])
...mapGetters(['bookingList', 'needSavePages', 'hasbookingDetail'])
},
created() {
// console.log('== - created ==')
@ -390,7 +390,6 @@ export default {
}, 800)
},
beforeRouteLeave(to, from, next) {
// console.log('== - beforeRouteLeave ==')
this.inChildLoading = true
if (this.isCopy) {
const hisData = {
@ -444,6 +443,9 @@ export default {
}
this.$set(this.historyData, this.id, hisData)
}
if (this.hasbookingDetail) {
this.bookingDetails = {}
}
next()
setTimeout(() => {
this.inChildLoading = false
@ -451,7 +453,6 @@ export default {
},
beforeRouteEnter(to, from, next) {
next(vm => {
// console.log('== - beforeRouteEnter ==')
vm.getRouterHis()
})
},

@ -846,6 +846,7 @@ export default {
immediate: true,
handler(nD, oD) {
this.id = this.$route.query.id
this.bookingModelFrom.id = this.$route.query.id
}
},
PrintType(newdata, oldData) {
@ -1133,6 +1134,8 @@ export default {
}
this.bookingModelFrom.send = type === 'send'
this.bookingModelFrom.orderNo = this.details.mblno
this.bookingModelFrom.id = this.$route.query.id
// console.log('==== ====', this.bookingModelFrom)
if (type == 'save') {
this.EDISloading = true
this.downloadBookingOrEDI(type)

@ -246,7 +246,9 @@ import {
BookingOrderGetFile,
ExcuteRulesOceanBooking,
BookingOrderDownload,
BookingOrderDeleteRemark
BookingOrderDeleteRemark,
GetServiceItemList,
SaveServiceItem
} from '@/api/modular/main/BookingLedger'
export default {
@ -302,6 +304,7 @@ export default {
this.$bus.$on('WebTest001', val => {
this.WebTest001(val)
})
this.init()
},
watch: {
'$route.query': {
@ -316,7 +319,7 @@ export default {
this.remarkList = []
this.logList = []
} else if (nD.id && this.$route.name === 'BookingDetail') {
// this.init()
this.init()
}
}
}
@ -328,6 +331,7 @@ export default {
this.getBookingLog()
this.getLog()
this.getLocal()
// this.getServiceItem()
let items = null
if (window.localStorage.getItem('locaService')) {
items = JSON.parse(window.localStorage.getItem('locaService'))[this.id]
@ -336,8 +340,21 @@ export default {
},
getLocal() {
this.bookingServiceItem = this.$options.filters['dictData']('booking_service_item')
console.log('== 服务项目 ==', this.bookingServiceItem)
this.bookingAttachType = this.$options.filters['dictData']('booking_attach_type')
},
getServiceItem () {
GetServiceItemList({
bookingId: this.id
})
.then(res => {
debugger
if (res.success) { }
})
.catch((err) => {
console.log(err)
})
},
//
checkFun() {
this.$message.loading({ content: '校验中...' })

Loading…
Cancel
Save