diff --git a/src/api/views/AmsIndex.js b/src/api/views/AmsIndex.js index 4b4f1ad..232e4bd 100644 --- a/src/api/views/AmsIndex.js +++ b/src/api/views/AmsIndex.js @@ -11,22 +11,46 @@ const GetToken = (data) => { }); }; // 查询 -const Load = (params) => { +const PageData = (params) => { return request({ data: { - url: "/api/Ams/Load", + url: "/api/Afr/PageData", method: "get", params, headers: { Authorization: localStorage.getItem("token") }, }, }); }; +// 获取历史记录 +const GetHistory = (params) => { + return request({ + data: { + url: "/api/Afr/GetHistory", + method: "get", + params, + headers: { Authorization: localStorage.getItem("token") }, + }, + }); +}; + +// 查询 +const Detail = (params) => { + return request({ + data: { + url: "/api/Afr/Detail", + method: "get", + params, + headers: { Authorization: localStorage.getItem("token") }, + }, + }); +}; + // 删除 const Del = (params) => { return request({ data: { - url: "/api/Ams/Del", - method: "get", + url: "/api/Afr/Del", + method: "post", params, headers: { Authorization: localStorage.getItem("token") }, }, @@ -36,7 +60,7 @@ const Del = (params) => { const AddOrUpdate = (data) => { return request({ data: { - url: "/api/Ams/AddOrUpdate", + url: "/api/Afr/AddOrUpdate", method: "post", data, headers: { Authorization: localStorage.getItem("token") }, @@ -47,7 +71,7 @@ const AddOrUpdate = (data) => { const Send = (params) => { return request({ data: { - url: "/api/Ams/Send", + url: "/api/Afr/Send", method: "get", params, headers: { Authorization: localStorage.getItem("token") }, @@ -58,7 +82,7 @@ const Send = (params) => { const GetCARRIER = () => { return request({ data: { - url: "/GetCARRIER", + url: "/api/Common/GetCARRIER", method: "get", headers: { Authorization: localStorage.getItem("token") }, }, @@ -68,7 +92,7 @@ const GetCARRIER = () => { const GetCTNALL = () => { return request({ data: { - url: "/GetCTNALL", + url: "/api/Common/GetCTNALL", method: "get", headers: { Authorization: localStorage.getItem("token") }, }, @@ -78,7 +102,7 @@ const GetCTNALL = () => { const GetKINDPKGS = () => { return request({ data: { - url: "/GetPackage", + url: "/api/Common/GetPackage", method: "get", headers: { Authorization: localStorage.getItem("token") }, }, @@ -99,7 +123,7 @@ const GetDangerousGoods = (params) => { const GetCountry = () => { return request({ data: { - url: "/GetCountry", + url: "/api/Common/GetCountry", method: "get", headers: { Authorization: localStorage.getItem("token") }, }, @@ -109,7 +133,7 @@ const GetCountry = () => { const GetCodePortLoad = (params) => { return request({ data: { - url: "/GetCodePortLoad", + url: "/api/Common/GetPort", method: "get", headers: { Authorization: localStorage.getItem("token") }, params, @@ -120,7 +144,7 @@ const GetCodePortLoad = (params) => { const GetPort = (params) => { return request({ data: { - url: "/GetPort", + url: "/api/Common/GetPort", method: "get", headers: { Authorization: localStorage.getItem("token") }, params, @@ -131,7 +155,7 @@ const GetPort = (params) => { const GetVessel = (params) => { return request({ data: { - url: "/GetVessel", + url: "/api/Common/GetVessel", method: "get", headers: { Authorization: localStorage.getItem("token") }, params, @@ -195,7 +219,9 @@ const GetSASCCODE = (params) => { }); }; export { - Load, + PageData, + GetHistory, + Detail, Del, Send, AddOrUpdate, diff --git a/src/api/views/DAmsIndex.js b/src/api/views/DAmsIndex.js index db7924c..77e13d9 100644 --- a/src/api/views/DAmsIndex.js +++ b/src/api/views/DAmsIndex.js @@ -58,7 +58,7 @@ const Send = (params) => { const GetCARRIER = () => { return request({ data: { - url: "/AMS/GetCARRIER", + url: "/AFR/GetCARRIER", method: "get", headers: { Authorization: localStorage.getItem("token") }, }, @@ -68,7 +68,7 @@ const GetCARRIER = () => { const GetCTNALL = () => { return request({ data: { - url: "/AMS/GetCTNALL", + url: "/AFR/GetCTNALL", method: "get", headers: { Authorization: localStorage.getItem("token") }, }, @@ -78,7 +78,7 @@ const GetCTNALL = () => { const GetKINDPKGS = () => { return request({ data: { - url: "/AMS/GetPackage", + url: "/AFR/GetPackage", method: "get", headers: { Authorization: localStorage.getItem("token") }, }, @@ -88,7 +88,7 @@ const GetKINDPKGS = () => { const GetDangerousGoods = (params) => { return request({ data: { - url: "/AMS/GetDangerousGoods", + url: "/AFR/GetDangerousGoods", method: "get", params, headers: { Authorization: localStorage.getItem("token") }, @@ -99,7 +99,7 @@ const GetDangerousGoods = (params) => { const GetCountry = () => { return request({ data: { - url: "/AMS/GetCountry", + url: "/AFR/GetCountry", method: "get", headers: { Authorization: localStorage.getItem("token") }, }, @@ -109,7 +109,7 @@ const GetCountry = () => { const GetCodePortLoad = (params) => { return request({ data: { - url: "/AMS/GetCodePortLoad", + url: "/AFR/GetCodePortLoad", method: "get", headers: { Authorization: localStorage.getItem("token") }, params, @@ -120,7 +120,7 @@ const GetCodePortLoad = (params) => { const GetPort = (params) => { return request({ data: { - url: "/AMS/GetPort", + url: "/AFR/GetPort", method: "get", headers: { Authorization: localStorage.getItem("token") }, params, @@ -131,7 +131,7 @@ const GetPort = (params) => { const GetVessel = (params) => { return request({ data: { - url: "/AMS/GetVessel", + url: "/AFR/GetVessel", method: "get", headers: { Authorization: localStorage.getItem("token") }, params, diff --git a/src/main.js b/src/main.js index a2c6ce0..892a1c9 100644 --- a/src/main.js +++ b/src/main.js @@ -12,6 +12,7 @@ Vue.use(VueEasytable); Vue.use(VueRouter); Vue.use(ElementUI); Vue.config.productionTip = false; +// axios.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8"; Vue.prototype.$axios = axios; const router = new VueRouter({ routes: routes, diff --git a/src/utils/axios.js b/src/utils/axios.js index 748bd4e..aad81a8 100644 --- a/src/utils/axios.js +++ b/src/utils/axios.js @@ -16,7 +16,7 @@ export default ({ data }) => { function (config) { // if (data.url !== "/user/login") { // config.headers["Authorization"] = - // "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkQ1RTkxMDI5OUU0RURFNUZEM0EwNTJBMEFDRDUzMUQzIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NjkxMDE5NTMsImV4cCI6MTY2OTE0NTE1MywiaXNzIjoiaHR0cDovLzYwLjIwOS4xMjUuMjM4OjM1MTAxIiwiY2xpZW50X2lkIjoiZGp5dXNlciIsInN1YiI6ImQ4NWZkNTkwLWQ5ZjYtNDQxMC05M2ExLWY2ZmFjNzdiN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2ZmFjNzdiNjA2ZSIsImp0aSI6IjRENDgwNDg2NjIyNTUwNkRDQzUyNzc3NkY0QTkyNzZDIiwiaWF0IjoxNzA0MzU0NTUzLCJzY29wZSI6WyJvcGVuaWQiLCJwcm9maWxlIiwib2ZmbGluZV9hY2Nlc3MiXSwiYW1yIjpbIjIiXX0.qcr2OGT-g0rx9gl4cz21lZyn5Ry26S9BCoUa5KKqWK7WMUkZRLx-XBd3QadapsauUZ7_hHKcC2ijPX1YDC248S8TUrSdgIJ-ClLS8hHME-lr3GkHb5aEXwR2jQJq3trFEoEv-TD1mKCN9bqurqERLLC_a1wUKDIMX1aCH-sq0CjkwEUMoELddVpuwST7QtpGLpHgI3SwLmSdCAcXvKBlPRlOlXa-zpJCNBHeeUyyD70BPkdFWML0QTQ1Gwgqj34fAsmOgaziaRAjs8ofGXZw0bnTzC3TpVYTmJDd_1rnqaGyW7H9hPcPASDyWL6pxK4z8PxsVsj-hfbsJDy0F7yyXw"; // } return config; }, diff --git a/src/utils/store.js b/src/utils/store.js index 05382ae..589b41c 100644 --- a/src/utils/store.js +++ b/src/utils/store.js @@ -1,6 +1,6 @@ import Vue from "vue"; import Vuex from "vuex"; - +import { Detail, GetHistory } from "@/api/views/AmsIndex"; //1、注册 Vue.use(Vuex); @@ -11,7 +11,7 @@ const store = new Vuex.Store({ editableTabsValue: "0", editableTabs: [ { - title: "AMS列表", + title: "AFR列表", name: "0", }, ], @@ -28,15 +28,49 @@ const store = new Vuex.Store({ getters: {}, mutations: { AddTabs(state, payload) { - let newTabName = ++state.tabIndex + ""; - state.editableTabs.push({ - title: payload && payload.mblno ? payload.mblno : "New Tab", - name: newTabName, - data: payload ? payload : {}, - }); - state.editableTabsValue = newTabName; + console.log(payload); + if (payload && payload.mblno) { + Detail({ gid: payload.gid }).then((res) => { + let newTabName = ++state.tabIndex + ""; + state.editableTabs.push({ + title: payload.mblno, + name: newTabName, + data: res.data.result, + }); + state.editableTabsValue = newTabName; + }); + } else { + let newTabName = ++state.tabIndex + ""; + state.editableTabs.push({ + title: "New Tab", + name: newTabName, + data: {}, + }); + state.editableTabsValue = newTabName; + } }, AddSendTabs(state, payload) { + // let title = ""; + // if (payload) { + // if (payload.EditType == "历史记录") { + // title = "历史记录"; + // } else if (payload.EditType == "查看") { + // title = `查看${payload.mblno}`; + // } else if (payload.EditType == "复制") { + // title = `复制`; + // } else { + // title = payload.mblno; + // } + // } else { + // title = "New Tab"; + // } + // let newTabName = ++state.SendtabIndex + ""; + // state.SendeditableTabs.push({ + // title, + // name: newTabName, + // data: payload ? payload : {}, + // }); + // state.SendeditableTabsValue = newTabName; let title = ""; if (payload) { if (payload.EditType == "历史记录") { @@ -51,13 +85,51 @@ const store = new Vuex.Store({ } else { title = "New Tab"; } - let newTabName = ++state.SendtabIndex + ""; - state.SendeditableTabs.push({ - title, - name: newTabName, - data: payload ? payload : {}, - }); - state.SendeditableTabsValue = newTabName; + console.log(title, payload); + if (payload) { + Detail({ gid: payload.gid }).then((res) => { + if (payload.EditType == "复制") { + payload.gid = "CopyData"; + } + let newTabName = ++state.SendtabIndex + ""; + let data; + payload.houseList.forEach((item) => { + res.data.result.houseList.forEach((item2) => { + if (item2.gid == item.gid) { + data = { ...payload, houseList: [item2] }; + } + }); + }); + + if (payload.EditType == "历史记录") { + GetHistory({ gid: payload.gid }).then((res) => { + console.log(res); + data = { ...payload, history: res.data.result }; + state.SendeditableTabs.push({ + title, + name: newTabName, + data, + }); + state.SendeditableTabsValue = newTabName; + }); + } else { + state.SendeditableTabs.push({ + title, + name: newTabName, + data, + }); + state.SendeditableTabsValue = newTabName; + } + }); + } else { + let newTabName = ++state.SendtabIndex + ""; + state.SendeditableTabs.push({ + title, + name: newTabName, + data: {}, + }); + state.SendeditableTabsValue = newTabName; + } }, }, diff --git a/src/views/Ams/Edit.vue b/src/views/Ams/Edit.vue index 81508d2..1ad5b5a 100644 --- a/src/views/Ams/Edit.vue +++ b/src/views/Ams/Edit.vue @@ -2,285 +2,585 @@
{{ item.hblNo }}
+{{ item.houseBillNo }}
新的分单号
-是否要发送?
+{{ item.hblNo }}
-新的货代提单号
- -{{ item.houseBillNo }}
+新的分单号
+集装箱信息
-- 总件数:{{ AllPkgs }} -
-- 总毛重/KGS:{{ AllKGS }} -
-- 体积/CBM:{{ AllCBM }} -
-收发通信息
-- 真实发货人 - - 提示:请务必填写真实发货人信息,否则,被目的港退回、产生罚款等后果由用户自行承担。 - -
-
- 真实收货人
-
- 提示:请务必填写真实收货人信息,否则,被目的港退回、产生罚款等后果由用户自行承担。
-
-
- 真实通知人
-
- 提示:请务必填写真实通知人信息,否则,被目的港退回、产生罚款等后果由用户自行承担。
-
-
是否要原始重发?
+是否要修改发送?
+是否要删除发送?
+