From 70ee2b1c6c0738ffb25d73b7b0a74c2e7aa7d24c Mon Sep 17 00:00:00 2001 From: sunzehua Date: Wed, 6 Dec 2023 09:34:36 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 +- .env.development | 8 +- .env.preview | 8 +- src/api/modular/main/BookingLedger.js | 16 + src/api/modular/main/CommondbCtnlist.js | 48 ++ src/store/getters.js | 1 + src/store/modules/booking.js | 26 +- src/utils/request.js | 15 +- .../detail/components/selectView.vue | 15 +- src/views/main/BookingLedger/detail/index.vue | 104 +++- .../detail/modules/basicInfo.vue | 2 + .../detail/modules/mailingInfo.vue | 2 +- src/views/main/BookingLedger/list/index.vue | 456 ++++++++++-------- src/views/main/carrierAgent/index.vue | 426 ++++++++++++++++ src/views/main/carrierYard/index.vue | 411 ++++++++++++++++ src/views/main/vesselinfo/addForm.vue | 21 +- src/views/main/vesselinfo/editForm.vue | 20 +- src/views/main/vesselinfo/index.vue | 6 + src/views/system/user/addForm.vue | 14 + src/views/system/user/editForm.vue | 17 +- 20 files changed, 1363 insertions(+), 257 deletions(-) create mode 100644 src/views/main/carrierAgent/index.vue create mode 100644 src/views/main/carrierYard/index.vue diff --git a/.env b/.env index af3850a..e769c09 100644 --- a/.env +++ b/.env @@ -4,10 +4,10 @@ VUE_APP_PREVIEW=true # VUE_APP_API_BASE_URL=http://127.0.0.1:5000 # VUE_APP_API_BASE_URL=http://60.209.125.238:25805 # 和川大简云正式 -VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api +# VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api # VUE_APP_API_BASE_URL=http://localhost:5010 # 和川大简云测试 -# VUE_APP_API_BASE_URL=http://60.209.125.238:35100 +VUE_APP_API_BASE_URL=http://60.209.125.238:35100 # 大简云 # VUE_APP_API_BASE_URL=http://47.104.222.4:5020 diff --git a/.env.development b/.env.development index a404dd8..e6224fa 100644 --- a/.env.development +++ b/.env.development @@ -7,11 +7,11 @@ VUE_APP_PREVIEW=true # process.env.VUE_APP_API_BASE_URL # 和川大简云正式 -VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api -VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345/api +# VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api +# VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345/api # 和川大简云测试 -# VUE_APP_API_BASE_URL=http://60.209.125.238:35100 -# VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100 +VUE_APP_API_BASE_URL=http://60.209.125.238:35100 +VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100 # # 大简云 # VUE_APP_API_BASE_URL=http://47.104.222.4:5020 # VUE_APP_SOCKET_BASE_URL=http://47.104.222.4:5020 diff --git a/.env.preview b/.env.preview index b2b613c..d081c56 100644 --- a/.env.preview +++ b/.env.preview @@ -3,13 +3,13 @@ VUE_APP_PREVIEW=true # VUE_APP_API_BASE_URL=http://60.209.125.238:25805 # VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:25805 # 和川大简云正式 -VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api -VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345/api +# VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api +# VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345/api # VUE_APP_API_BASE_URL=http://localhost:5010 # VUE_APP_SOCKET_BASE_URL=http://localhost:5010 # 和川大简云测试 -# VUE_APP_API_BASE_URL=http://60.209.125.238:35100 -# VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100 +VUE_APP_API_BASE_URL=http://60.209.125.238:35100 +VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100 # 大简云 # VUE_APP_API_BASE_URL=http://47.104.222.4:5020 # VUE_APP_SOCKET_BASE_URL=http://47.104.222.4:5020 \ No newline at end of file diff --git a/src/api/modular/main/BookingLedger.js b/src/api/modular/main/BookingLedger.js index bcfafee..d7f7ca2 100644 --- a/src/api/modular/main/BookingLedger.js +++ b/src/api/modular/main/BookingLedger.js @@ -1223,4 +1223,20 @@ export function DownloadVOLTAEdiSI(parameter) { data: parameter, responseType: 'blob' }) +} + +export function BachUpdateShipagency(parameter) { + return axios({ + url: '/BookingOrder/BachUpdateShipagency', + method: 'post', + data: parameter + }) +} + +export function ListAgentByCarrier(parameter) { + return axios({ + url: '/BookingCarrierRelation/ListAgentByCarrier', + method: 'get', + params: parameter + }) } \ No newline at end of file diff --git a/src/api/modular/main/CommondbCtnlist.js b/src/api/modular/main/CommondbCtnlist.js index 6cc3c75..e50dfc2 100644 --- a/src/api/modular/main/CommondbCtnlist.js +++ b/src/api/modular/main/CommondbCtnlist.js @@ -55,3 +55,51 @@ export function commondbCarrierlist(parameter) { params: parameter }) } + +export function pageYard(parameter) { + return axios({ + url: '/BookingCarrierRelation/pageYard', + method: 'get', + params: parameter + }) +} + +export function saveYard(parameter) { + return axios({ + url: '/BookingCarrierRelation/saveYard', + method: 'post', + data: parameter + }) +} + +export function deleteYard(parameter) { + return axios({ + url: '/BookingCarrierRelation/deleteYard', + method: 'post', + params: parameter + }) +} + +export function pageAgent(parameter) { + return axios({ + url: '/BookingCarrierRelation/pageAgent', + method: 'get', + params: parameter + }) +} + +export function saveAgent(parameter) { + return axios({ + url: '/BookingCarrierRelation/saveAgent', + method: 'post', + data: parameter + }) +} + +export function deleteAgent(parameter) { + return axios({ + url: '/BookingCarrierRelation/deleteAgent', + method: 'post', + params: parameter + }) +} \ No newline at end of file diff --git a/src/store/getters.js b/src/store/getters.js index a612526..b09a5f8 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -31,6 +31,7 @@ const getters = { deleteId: state => state.booking.deleteId, saveNeedCar: state => state.booking.saveNeedCar, lineList: state => state.booking.lineList, + agentFilter: state => state.booking.agentFilter, bookingInitData: state => state.booking.bookingInitData, sourceList: state => state.booking.sourceList, countryList: state => state.booking.countryList, diff --git a/src/store/modules/booking.js b/src/store/modules/booking.js index bc3a7f7..1e6da42 100644 --- a/src/store/modules/booking.js +++ b/src/store/modules/booking.js @@ -34,6 +34,7 @@ const booking = { lineList: [], sourceList: [], countryList: [], + agentFilter: [], saveNeedCar: '', bookingInitData: { customernameInitList: [], @@ -129,6 +130,9 @@ const booking = { }, SET_PROJECTDICT: (state, list) => { state.projectDict = list + }, + SET_AgentFilter: (state, list) => { + state.agentFilter = list } }, @@ -459,23 +463,23 @@ const booking = { setdpTreeList({ commit }, obj) { return new Promise(resolve => { sysOrgTreeList().then(response => { - if (response.success) { - const data = response.data - commit('SET_DPTREELIST', data) - resolve(response.data) - } else { - // eslint-disable-next-line no-undef - reject(new Error(data.message)) - } - }) + if (response.success) { + const data = response.data + commit('SET_DPTREELIST', data) + resolve(response.data) + } else { + // eslint-disable-next-line no-undef + reject(new Error(data.message)) + } + }) .catch(error => { // eslint-disable-next-line no-undef reject(error) }) }) }, - // 设置需要保存页面 - setSET_SAVEFLAG({ commit }, type) { + // 设置需要保存页面 + setSET_SAVEFLAG({ commit }, type) { return new Promise(resolve => { commit('SET_SAVEFLAG', type) resolve() diff --git a/src/utils/request.js b/src/utils/request.js index a8254db..fb35104 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -49,18 +49,10 @@ const err = error => { // request interceptor service.interceptors.request.use(config => { const token = Vue.ls.get(ACCESS_TOKEN) - // const XToken = Vue.ls.get(X_ACCESS_TOKEN) + const XToken = Vue.ls.get(X_ACCESS_TOKEN) if (token) { config.headers['Authorization'] = 'Bearer ' + token - // const tokenX = token.replace(/_/g, "/").replace(/-/g, "+"); - // var json = decodeURIComponent(escape(window.atob(tokenX.split(".")[1]))); - // const data = JSON.parse(json) - // const expire = data.exp - // const nowTime = Math.floor(Date.now() / 1000); - // const time = expire - nowTime - // if (time <= 50000) { - // config.headers['X-Authorization'] = 'Bearer ' + XToken - // } + config.headers['X-Authorization'] = 'Bearer ' + XToken } return config }, err) @@ -76,6 +68,9 @@ service.interceptors.response.use(response => { if (response.headers['x-access-token']) { Vue.ls.set(X_ACCESS_TOKEN, response.headers['x-access-token']) } + if (response.headers['access-token']) { + Vue.ls.set(ACCESS_TOKEN, response.headers['access-token']) + } const code = response.data.code if (code === 1011006 || code === 1011007 || code === 1011008 || code === 1011009 || code === 401) { Vue.ls.remove(ACCESS_TOKEN) diff --git a/src/views/main/BookingLedger/detail/components/selectView.vue b/src/views/main/BookingLedger/detail/components/selectView.vue index d3ec9f9..19d41d9 100644 --- a/src/views/main/BookingLedger/detail/components/selectView.vue +++ b/src/views/main/BookingLedger/detail/components/selectView.vue @@ -140,7 +140,8 @@ export default { 'lineList', 'bookingInitData', 'sourceList', - 'countryList' + 'countryList', + 'agentFilter' ]) }, watch: { @@ -469,6 +470,7 @@ export default { if ( ![ 'vessel', + 'forwarder', 'lineName', 'notifypartycountry', 'consigneecountry', @@ -495,8 +497,17 @@ export default { } this.inLoading = true this.getFromSelectData(this.emnuSelectApi(this.searchApi), this.searchQuery).then(data => { + console.log(data, this.agentFilter,4444444) if (data.rows) { - this.selectList = data.rows + if (this.searchApi === 'DjyCustomerSuggest') { + if (this.agentFilter.length === 0) { + this.selectList = data.rows + } else { + console.log(this.selectList, data.rows) + } + } else { + this.selectList = data.rows + } } else { this.selectList = data } diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index 2c1dd79..8120e3f 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -24,7 +24,8 @@ @copy="copyBookingFun" @addSedList="addSedList" @removeOrder="removeOrderFun" - @frompre="frompre"> + @frompre="frompre"> +