From 7ecd61622296d43fc953746186211f1fa1ff1edc Mon Sep 17 00:00:00 2001 From: sunzehua Date: Thu, 16 May 2024 18:02:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/router.config.js | 5 + src/permission.js | 2 +- src/views/ServiceItems/index.vue | 145 +--- src/views/flowList/1.png | Bin 0 -> 5488 bytes src/views/flowList/index.vue | 698 ++++++++++++++++++ src/views/flowList/u1041.svg | 6 + src/views/main/BookingLedger/detail/index.vue | 170 +++-- .../detail/modules/goodsTable.vue | 1 - src/views/main/CabinManagement/details.vue | 88 ++- src/views/main/CabinManagement/index.vue | 48 +- src/views/main/DJYTenantParam/addItemForm.vue | 10 + .../main/DJYTenantParam/editItemForm.vue | 13 +- src/views/main/DJYTenantParam/indexItem.vue | 18 +- src/views/main/carrierAgent/index.vue | 1 - src/views/main/customerParam/addItemForm.vue | 5 + src/views/main/customerParam/editItemForm.vue | 5 + src/views/main/customerParam/index.vue | 6 +- 17 files changed, 1000 insertions(+), 221 deletions(-) create mode 100644 src/views/flowList/1.png create mode 100644 src/views/flowList/index.vue create mode 100644 src/views/flowList/u1041.svg diff --git a/src/config/router.config.js b/src/config/router.config.js index 33c2e42..40517a4 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -87,6 +87,11 @@ export const constantRouterMap = [ path: '/ServiceItems', component: () => import('@/views/ServiceItems/index') }, + { + name: 'flowList', + path: '/flowList', + component: () => import('@/views/flowList/index') + }, { path: '/404', component: () => import(/* webpackChunkName: "fail" */ '@/views/system/exception/404') diff --git a/src/permission.js b/src/permission.js index d56ae77..4de61f6 100644 --- a/src/permission.js +++ b/src/permission.js @@ -10,7 +10,7 @@ import { ACCESS_TOKEN, ALL_APPS_MENU } from '@/store/mutation-types' import { Modal, notification } from 'ant-design-vue' // NProgress Configuration import { timeFix } from '@/utils/util' /// es/notification NProgress.configure({ showSpinner: false }) -const whiteList = ['login', 'register', 'registerResult', 'notifications', 'getway', 'ServiceItems'] // no redirect whitelist +const whiteList = ['login', 'register', 'registerResult', 'notifications', 'getway', 'ServiceItems', 'flowList'] // no redirect whitelist // 无默认首页的情况 const defaultRoutePath = '/welcome' diff --git a/src/views/ServiceItems/index.vue b/src/views/ServiceItems/index.vue index 5338f66..95e959e 100644 --- a/src/views/ServiceItems/index.vue +++ b/src/views/ServiceItems/index.vue @@ -1,6 +1,6 @@ + + + + diff --git a/src/views/flowList/u1041.svg b/src/views/flowList/u1041.svg new file mode 100644 index 0000000..0d865c8 --- /dev/null +++ b/src/views/flowList/u1041.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index 03251d4..8021501 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -143,7 +143,8 @@ @rules="getRules" @upDateRight="upDateRightFun" @inGoodsSave="inGoodsSaveFun" - @handleRefsh="handleRefshRight"> + @handleRefsh="handleRefshRight"> + @@ -502,6 +503,7 @@ export default { ) }, beforeRouteUpdate(to, from, next) { + console.log(222) if (this.inAddSave) { next() return false @@ -522,7 +524,11 @@ export default { const secActive = this.$refs.sedOrder.$data.editIndex hisData.secActive = secActive } - this.$set(this.historyData, `copy-${this.id}`, hisData) + if (!this.$route.query.copyId) { + this.$set(this.historyData, `copy-${this.id}`, hisData) + } else { + this.$set(this.historyData, `copy-${this.id}-${this.$route.query.copyId}`, hisData) + } } else if (this.$route.query.addNum) { const hisData = { bookingDetails: this.bookingDetails, @@ -574,6 +580,7 @@ export default { }, 800) }, beforeRouteLeave(to, from, next) { + console.log(3333) this.inChildLoading = true if (this.isCopy) { const hisData = { @@ -595,6 +602,7 @@ export default { this.$set(this.historyData, `copy-${this.id}`, hisData) } else { this.$set(this.historyData, `copy-${this.id}-${this.$route.query.copyId}`, hisData) + console.log(this.historyData,this.$route.query.copyId) } } else if (this.$route.query.addNum) { const hisData = { @@ -640,6 +648,7 @@ export default { }, 2000) }, beforeRouteEnter(to, from, next) { + console.log(1111) next(vm => { vm.getRouterHis() }) @@ -742,8 +751,7 @@ export default { getRouterHis() { this.inChildLoading = true const newId = this.$route.query.id ? this.$route.query.id.toString() : '' - if ((Object.keys(this.historyData).includes(`copy-${newId}`) || Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) && - this.$route.query.isCopy === 'true') { + if ((Object.keys(this.historyData).includes(`copy-${newId}`)) && this.$route.query.isCopy === 'true' && !this.$route.query.copyId) { if (!this.$route.query.copyId) { const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`])) this.bookingDetails = $data.bookingDetails @@ -753,15 +761,6 @@ export default { this.isAdd = $data.isAdd this.tabActiveKey = $data.tabActiveKey this.mainOrderActiveKey = $data.mainOrderActiveKey - } else { - const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`])) - this.bookingDetails = $data.bookingDetails - this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails)) - this.excuteRules = $data.excuteRules - this.excuteRulesType = $data.excuteRulesType - this.isAdd = $data.isAdd - this.tabActiveKey = $data.tabActiveKey - this.mainOrderActiveKey = $data.mainOrderActiveKey } this.id = this.$route.query.id this.isCopy = this.$route.query.isCopy @@ -796,6 +795,48 @@ export default { this.isLockBooking = false this.getFilter() this.$forceUpdate() + } else if (this.$route.query.isCopy === 'true' && this.$route.query.copyId && Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) { + const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`])) + this.bookingDetails = $data.bookingDetails + this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails)) + this.excuteRules = $data.excuteRules + this.excuteRulesType = $data.excuteRulesType + this.isAdd = $data.isAdd + this.tabActiveKey = $data.tabActiveKey + this.mainOrderActiveKey = $data.mainOrderActiveKey + this.id = this.$route.query.id + this.isCopy = this.$route.query.isCopy + this.inPageLoading = false + setTimeout(() => { + if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) { + this.Showtabs = true + if (Object.keys(this.$refs).includes('sedOrder')) { + this.$refs.sedOrder.init(this.bookingDetails.hbList) + } + } else { + this.Showtabs = false + if (Object.keys(this.$refs).includes('sedOrder')) { + this.$refs.sedOrder.init([]) + } + } + if (Object.keys(this.$refs).includes('goodsTable')) { + this.$refs.goodsTable.init() + } + }, 200) + setTimeout(() => { + const key = this.$route.fullPath + const detailsChange = Object.keys(this.needSavePages).includes(key) + ? !!this.needSavePages[key].details + : false + this.checkSaveFun({ type: 'details', hasChange: detailsChange }) + + const hbListChange = !!this.needSavePages[key].hbList + this.checkSaveFun({ type: 'hbList', hasChange: hbListChange }) + this.inChildLoading = false + }, 500) + this.isLockBooking = false + this.getFilter() + this.$forceUpdate() } else if ( Object.keys(this.historyData).includes(`add-${this.$route.query.addNum}`) && this.$route.query.addNum @@ -950,6 +991,7 @@ export default { this.$refs.basicInfo.$refs.basicFrom.clearValidate() this.$refs.mailingInfo.$refs.mailingFrom.clearValidate() this.$refs.cargoInfo.$refs.cargoFrom.clearValidate() + console.log(this.historyData) }, init() { this.bookingDetails = JSON.parse(JSON.stringify(initDetail)) @@ -1249,24 +1291,24 @@ export default { }, getVGM() { GetBookingVGMResult({ id: this.$route.query.id }).then(res => { - if (res.data && res.data.length > 0) { - if (this.bookingDetails.ctnInputs && this.bookingDetails.ctnInputs.length > 0) { - this.bookingDetails.ctnInputs.forEach(item => { - item.vgm = false - res.data.forEach(ite => { - if (ite.cntrNo === item.cntrno) { - item.vgm = true - item.vgmWeight = ite.vgmWeight - item.isMissing = ite.isMissing - item.submissionDeadLine = ite.submissionDeadLine - item.vgmWeightUnit = ite.vgmWeightUnit - item.vgmWeightMethod = ite.vgmWeightMethod - } - }) + if (res.data && res.data.length > 0) { + if (this.bookingDetails.ctnInputs && this.bookingDetails.ctnInputs.length > 0) { + this.bookingDetails.ctnInputs.forEach(item => { + item.vgm = false + res.data.forEach(ite => { + if (ite.cntrNo === item.cntrno) { + item.vgm = true + item.vgmWeight = ite.vgmWeight + item.isMissing = ite.isMissing + item.submissionDeadLine = ite.submissionDeadLine + item.vgmWeightUnit = ite.vgmWeightUnit + item.vgmWeightMethod = ite.vgmWeightMethod + } }) - this.$refs.goodsTable.init() - } + }) + this.$refs.goodsTable.init() } + } }) }, setDeatilsFun(res, overSet = false, refshFlag = false) { @@ -1330,16 +1372,16 @@ export default { delete res.data.id const arr = localStorage.getItem('booking_form_copy') ? JSON.parse(localStorage.getItem('booking_form_copy')) : [] const copyData = { - bookingEDIExt: {} + bookingEDIExt: {} + } + arr.forEach(item => { + if (item.includes('bookingEDIExt')) { + const str = item.replace('bookingEDIExt.', '') + copyData.bookingEDIExt[str] = res.data.bookingEDIExt[str] + } else { + copyData[item] = res.data[item] } - arr.forEach(item => { - if (item.includes('bookingEDIExt')) { - const str = item.replace('bookingEDIExt.', '') - copyData.bookingEDIExt[str] = res.data.bookingEDIExt[str] - } else { - copyData[item] = res.data[item] - } - }) + }) if (arr.includes('ctnall')) { copyData.ctnInputs = res.data.ctnInputs } @@ -1892,32 +1934,32 @@ export default { } setTimeout(() => { this.bookingDetails = JSON.parse(JSON.stringify(initDetail)) - this.excuteRules = [] - this.excuteRulesType = '' - this.Showtabs = false - if (this.id) { - this.isAdd = false - this.getDetail(true) - this.getRightAll() - } else { - this.isAdd = true - this.detailsLoadOver = false - this.bookingDetails.carrierid = this.type - this.bookingDetails.carrier = this.type - this.isLockBooking = false - this.getFilter() - this.getDefaultVal() - setTimeout(() => { - if (Object.keys(this.$refs).includes('sedOrder')) { - this.$refs.sedOrder.init([]) - } - if (Object.keys(this.$refs).includes('goodsTable')) { - this.$refs.goodsTable.init() - } - this.detailsLoadOver = true - }, 200) - } - this.getDjyTenantConfig() + this.excuteRules = [] + this.excuteRulesType = '' + this.Showtabs = false + if (this.id) { + this.isAdd = false + this.getDetail(true) + this.getRightAll() + } else { + this.isAdd = true + this.detailsLoadOver = false + this.bookingDetails.carrierid = this.type + this.bookingDetails.carrier = this.type + this.isLockBooking = false + this.getFilter() + this.getDefaultVal() + setTimeout(() => { + if (Object.keys(this.$refs).includes('sedOrder')) { + this.$refs.sedOrder.init([]) + } + if (Object.keys(this.$refs).includes('goodsTable')) { + this.$refs.goodsTable.init() + } + this.detailsLoadOver = true + }, 200) + } + this.getDjyTenantConfig() this.$refs.rightContent.init() }, 100); }, diff --git a/src/views/main/BookingLedger/detail/modules/goodsTable.vue b/src/views/main/BookingLedger/detail/modules/goodsTable.vue index bff2cff..7066161 100644 --- a/src/views/main/BookingLedger/detail/modules/goodsTable.vue +++ b/src/views/main/BookingLedger/detail/modules/goodsTable.vue @@ -1503,7 +1503,6 @@ export default { this.tableData = arr this.tableLoaded = true this.totalCtnall = '' - console.log(this.tableData) } else { this.tableData = [] this.tableLoaded = true diff --git a/src/views/main/CabinManagement/details.vue b/src/views/main/CabinManagement/details.vue index 20bcded..b096aca 100644 --- a/src/views/main/CabinManagement/details.vue +++ b/src/views/main/CabinManagement/details.vue @@ -1,7 +1,7 @@ - + +