给测试

dev
张同海 2 years ago
parent 6f74d27613
commit 5922afc86b

@ -26,6 +26,7 @@ const constantRouterComponents = {
// 默认首页 // 默认首页
Console: () => import('@/views/system/index/welcome'), Console: () => import('@/views/system/index/welcome'),
BookingDetail: () => import('@/views/main/BookingLedger/detail'), BookingDetail: () => import('@/views/main/BookingLedger/detail'),
BookingDetailNew: () => import('@/views/main/BookingLedgerNew/detail'),
CustomerInformationManagementAdd: () => import('@/views/main/Customer/addForm'), CustomerInformationManagementAdd: () => import('@/views/main/Customer/addForm'),
CustomerInformationManagementEdit: () => import('@/views/main/Customer/editForm') CustomerInformationManagementEdit: () => import('@/views/main/Customer/editForm')
} }
@ -190,7 +191,42 @@ const booking = [
component: 'CustomerInformationManagementEdit' component: 'CustomerInformationManagementEdit'
} }
] ]
// 订舱
const bookingNew = [
{
name: 'BookingDetailNew',
path: '/BookingDetailNew',
pid: 0,
id: 10031,
meta: {
title: '订舱详情',
show: false
},
component: 'BookingDetailNew'
},
{
name: 'CustomerInformationManagementAdd',
path: '/CustomerInformationManagementAdd',
pid: 0,
id: 10032,
meta: {
title: '新增客户',
show: false
},
component: 'CustomerInformationManagementAdd'
},
{
name: 'CustomerInformationManagementEdit',
path: '/CustomerInformationManagementEdit',
pid: 0,
id: 10033,
meta: {
title: '编辑客户',
show: false
},
component: 'CustomerInformationManagementEdit'
}
]
// 根级菜单 // 根级菜单
const rootRouter = { const rootRouter = {
key: '', key: '',
@ -223,6 +259,7 @@ export const generatorDynamicRouter = data => {
*/ */
listToTree(userAccount, childrenNav, 0) listToTree(userAccount, childrenNav, 0)
listToTree(booking, childrenNav, 0) listToTree(booking, childrenNav, 0)
listToTree(bookingNew, childrenNav, 0)
rootRouter.children = childrenNav rootRouter.children = childrenNav
menuNav.push(rootRouter) menuNav.push(rootRouter)
const routers = generator(menuNav) const routers = generator(menuNav)

@ -249,7 +249,7 @@ const initDetail = {
hbList: [] hbList: []
} }
export default { export default {
name: 'BookingDetail', name: 'BookingDetailNew',
inject: ['reload'], inject: ['reload'],
components: { components: {
operationArea, operationArea,
@ -953,7 +953,7 @@ export default {
} else { } else {
// console.log('1.2 == - ==', this.id) // console.log('1.2 == - ==', this.id)
this.$router.replace({ this.$router.replace({
name: 'BookingDetail', name: 'BookingDetailNew',
query: { query: {
id: this.id, id: this.id,
type: this.bookingDetails.carrierid, type: this.bookingDetails.carrierid,
@ -1058,7 +1058,7 @@ export default {
this.$message.success('保存成功') this.$message.success('保存成功')
// this.bookingDetails = JSON.parse(JSON.stringify(initDetail)) // this.bookingDetails = JSON.parse(JSON.stringify(initDetail))
this.$router.replace({ this.$router.replace({
name: 'BookingDetail', name: 'BookingDetailNew',
query: { query: {
id: res.data, id: res.data,
type: this.bookingDetails.carrierid, type: this.bookingDetails.carrierid,
@ -1146,7 +1146,7 @@ export default {
delete $data[this.$route.fullPath] delete $data[this.$route.fullPath]
this.setNeedSavePages($data) this.setNeedSavePages($data)
this.$router.replace({ this.$router.replace({
name: 'BookingDetail', name: 'BookingDetailNew',
query: { id: prevId, type: prevType, mblno: this.bookingList[prevId].mblno, noOpenTab: true } query: { id: prevId, type: prevType, mblno: this.bookingList[prevId].mblno, noOpenTab: true }
}) })
// this.$route.query.id = 1123 // this.$route.query.id = 1123
@ -1161,7 +1161,7 @@ export default {
delete $data[this.$route.fullPath] delete $data[this.$route.fullPath]
this.setNeedSavePages($data) this.setNeedSavePages($data)
this.$router.replace({ this.$router.replace({
name: 'BookingDetail', name: 'BookingDetailNew',
query: { id: nextId, type: nextType, mblno: this.bookingList[nextId].mblno, noOpenTab: true } query: { id: nextId, type: nextType, mblno: this.bookingList[nextId].mblno, noOpenTab: true }
}) })
} }
@ -1171,7 +1171,7 @@ export default {
}, },
copyBookingFun() { copyBookingFun() {
this.$router.push({ this.$router.push({
name: 'BookingDetail', name: 'BookingDetailNew',
query: { id: this.id, isCopy: true, type: this.bookingDetails.carrierid } query: { id: this.id, isCopy: true, type: this.bookingDetails.carrierid }
}) })
}, },

@ -577,7 +577,7 @@ import {
} from '@/api/modular/main/BookingLedger' } from '@/api/modular/main/BookingLedger'
export default { export default {
name: 'BookingDetail', name: 'BookingDetailNew',
components: { components: {
XCard, XCard,
AutoComplete AutoComplete

@ -778,7 +778,7 @@ export default {
this.getList(this.formRes) this.getList(this.formRes)
}, },
editPageSizeSave (pageSize = 10) { editPageSizeSave(pageSize = 10) {
const data = { const data = {
pageSize: pageSize pageSize: pageSize
} }
@ -790,7 +790,7 @@ export default {
}) })
}, },
getPageSize () { getPageSize() {
DjyUserConfigGet({ type: 'booking_list_page' }).then(res => { DjyUserConfigGet({ type: 'booking_list_page' }).then(res => {
if (res.data && JSON.parse(res.data.configJson)) { if (res.data && JSON.parse(res.data.configJson)) {
this.gridOptions.pagerConfig.pageSize = JSON.parse(res.data.configJson).pageSize this.gridOptions.pagerConfig.pageSize = JSON.parse(res.data.configJson).pageSize
@ -946,7 +946,7 @@ export default {
this.editColumns(row) this.editColumns(row)
}, },
editColumns(row) { editColumns(row) {
this.$router.push({ name: 'BookingDetail', query: { id: row.id, type: row.carrierid, mblno: row.mblno } }) this.$router.push({ name: 'BookingDetailNew', query: { id: row.id, type: row.carrierid, mblno: row.mblno } })
}, },
getList(queryParam = {}) { getList(queryParam = {}) {
this.$set(this.gridOptions, 'loading', true) this.$set(this.gridOptions, 'loading', true)
@ -1037,7 +1037,7 @@ export default {
this.$message.error('请至少选择一条数据') this.$message.error('请至少选择一条数据')
return false return false
} }
this.$router.push({ name: 'BookingDetail', query: { id: pkIdArr[0], isCopy: true } }) this.$router.push({ name: 'BookingDetailNew', query: { id: pkIdArr[0], isCopy: true } })
}, },
copyBookingMore() { copyBookingMore() {
const select = this.$refs.xGrid.getCheckboxRecords() const select = this.$refs.xGrid.getCheckboxRecords()
@ -1050,13 +1050,13 @@ export default {
} }
// //
// pkIdArr.map((item, index) => { // pkIdArr.map((item, index) => {
// this.$router.push({ name: 'BookingDetail', query: { id: item, isCopy: true } }) // this.$router.push({ name: 'BookingDetailNew', query: { id: item, isCopy: true } })
// }) // })
}, },
addSubmit() { addSubmit() {
this.addVisible = false this.addVisible = false
this.addNum = Math.round(Math.random() * 1000) this.addNum = Math.round(Math.random() * 1000)
this.$router.push({ name: 'BookingDetail', query: { type: this.carrierRadio, addNum: this.addNum } }) this.$router.push({ name: 'BookingDetailNew', query: { type: this.carrierRadio, addNum: this.addNum } })
}, },
addCancel() { addCancel() {
this.addVisible = false this.addVisible = false

Loading…
Cancel
Save