Showing
7 changed files
with
610 additions
and
143 deletions
| ... | @@ -38,7 +38,7 @@ export function searchList(data) { | ... | @@ -38,7 +38,7 @@ export function searchList(data) { |
| 38 | // 搜索订单号 | 38 | // 搜索订单号 |
| 39 | export function searchOrderNo(data) { | 39 | export function searchOrderNo(data) { |
| 40 | return request({ | 40 | return request({ |
| 41 | - url: "/bus-customer/mockReceipt/searchOrderNo", | 41 | + url: "/bus-customer/mockReceipt/searchLogisticsNo", |
| 42 | method: "get", | 42 | method: "get", |
| 43 | params: data, | 43 | params: data, |
| 44 | }); | 44 | }); | ... | ... |
| 1 | -import { constantRoutes } from '@/router' | 1 | +import { constantRoutes } from "@/router"; |
| 2 | -import { getRouters,getUserRouters } from '@/api/menu' | 2 | +import { getUserRouters } from "@/api/menu"; |
| 3 | -import Layout from '@/layout/index' | 3 | +import Layout from "@/layout/index"; |
| 4 | -import ParentView from '@/components/ParentView'; | 4 | +import ParentView from "@/components/ParentView"; |
| 5 | -import { titleCase } from '@/utils/index.js' | 5 | +import { titleCase } from "@/utils/index.js"; |
| 6 | -import { getToken } from '@/utils/auth' | 6 | +import { auth_code } from "../../utils/auth"; |
| 7 | 7 | ||
| 8 | const permission = { | 8 | const permission = { |
| 9 | state: { | 9 | state: { |
| ... | @@ -11,15 +11,15 @@ const permission = { | ... | @@ -11,15 +11,15 @@ const permission = { |
| 11 | addRoutes: [], | 11 | addRoutes: [], |
| 12 | defaultRoutes: [], | 12 | defaultRoutes: [], |
| 13 | topbarRouters: [], | 13 | topbarRouters: [], |
| 14 | - sidebarRouters: [] | 14 | + sidebarRouters: [], |
| 15 | }, | 15 | }, |
| 16 | mutations: { | 16 | mutations: { |
| 17 | SET_ROUTES: (state, routes) => { | 17 | SET_ROUTES: (state, routes) => { |
| 18 | - state.addRoutes = routes | 18 | + state.addRoutes = routes; |
| 19 | - state.routes = constantRoutes.concat(routes) | 19 | + state.routes = constantRoutes.concat(routes); |
| 20 | }, | 20 | }, |
| 21 | SET_DEFAULT_ROUTES: (state, routes) => { | 21 | SET_DEFAULT_ROUTES: (state, routes) => { |
| 22 | - state.defaultRoutes = constantRoutes.concat(routes) | 22 | + state.defaultRoutes = constantRoutes.concat(routes); |
| 23 | }, | 23 | }, |
| 24 | SET_TOPBAR_ROUTES: (state, routes) => { | 24 | SET_TOPBAR_ROUTES: (state, routes) => { |
| 25 | // 顶部导航菜单默认添加统计报表栏指向首页 | 25 | // 顶部导航菜单默认添加统计报表栏指向首页 |
| ... | @@ -30,181 +30,209 @@ const permission = { | ... | @@ -30,181 +30,209 @@ const permission = { |
| 30 | // state.topbarRouters = routes.concat(index); | 30 | // state.topbarRouters = routes.concat(index); |
| 31 | }, | 31 | }, |
| 32 | SET_SIDEBAR_ROUTERS: (state, routes) => { | 32 | SET_SIDEBAR_ROUTERS: (state, routes) => { |
| 33 | - state.sidebarRouters = routes | 33 | + state.sidebarRouters = routes; |
| 34 | }, | 34 | }, |
| 35 | }, | 35 | }, |
| 36 | actions: { | 36 | actions: { |
| 37 | // 生成路由 | 37 | // 生成路由 |
| 38 | async GenerateRoutes({ commit }) { | 38 | async GenerateRoutes({ commit }) { |
| 39 | - return new Promise(resolve => { | 39 | + return new Promise((resolve) => { |
| 40 | // 向后端请求路由数据 | 40 | // 向后端请求路由数据 |
| 41 | - getUserRouters().then(res => { | 41 | + getUserRouters().then((res) => { |
| 42 | - const sdata = JSON.parse(JSON.stringify(routeItemInfo(res.data))) | 42 | + const authCode = findNodeTypeTwo(res.data); |
| 43 | - const rdata = JSON.parse(JSON.stringify(routeItemInfo(res.data))) | 43 | + localStorage.setItem(auth_code, JSON.stringify(authCode)); |
| 44 | - const sidebarRoutes = filterAsyncRouter(sdata) | 44 | + |
| 45 | - const rewriteRoutes = filterAsyncRouter(rdata, false, true) | 45 | + const sdata = JSON.parse(JSON.stringify(routeItemInfo(res.data))); |
| 46 | - rewriteRoutes.push({ path: '*', redirect: '/reportingData', hidden: true }) | 46 | + const rdata = JSON.parse(JSON.stringify(routeItemInfo(res.data))); |
| 47 | - commit('SET_ROUTES', rewriteRoutes) | 47 | + const sidebarRoutes = filterAsyncRouter(sdata); |
| 48 | - commit('SET_SIDEBAR_ROUTERS', sidebarRoutes) | 48 | + const rewriteRoutes = filterAsyncRouter(rdata, false, true); |
| 49 | - commit('SET_DEFAULT_ROUTES', sidebarRoutes) | 49 | + rewriteRoutes.push({ |
| 50 | - commit('SET_TOPBAR_ROUTES', sidebarRoutes) | 50 | + path: "*", |
| 51 | - resolve(rewriteRoutes) | 51 | + redirect: "/reportingData", |
| 52 | - }) | 52 | + hidden: true, |
| 53 | - }) | 53 | + }); |
| 54 | + commit("SET_ROUTES", rewriteRoutes); | ||
| 55 | + commit("SET_SIDEBAR_ROUTERS", sidebarRoutes); | ||
| 56 | + commit("SET_DEFAULT_ROUTES", sidebarRoutes); | ||
| 57 | + commit("SET_TOPBAR_ROUTES", sidebarRoutes); | ||
| 58 | + resolve(rewriteRoutes); | ||
| 59 | + }); | ||
| 60 | + }); | ||
| 54 | }, | 61 | }, |
| 55 | changeRoutes({ commit }, routes) { | 62 | changeRoutes({ commit }, routes) { |
| 56 | - commit('SET_ROUTES', routes) | 63 | + commit("SET_ROUTES", routes); |
| 57 | - commit('SET_SIDEBAR_ROUTERS', routes) | 64 | + commit("SET_SIDEBAR_ROUTERS", routes); |
| 58 | - commit('SET_DEFAULT_ROUTES', routes) | 65 | + commit("SET_DEFAULT_ROUTES", routes); |
| 59 | - commit('SET_TOPBAR_ROUTES', routes) | 66 | + commit("SET_TOPBAR_ROUTES", routes); |
| 67 | + }, | ||
| 68 | + }, | ||
| 69 | +}; | ||
| 70 | + | ||
| 71 | +function findNodeTypeTwo(data) { | ||
| 72 | + const permissions = []; | ||
| 73 | + | ||
| 74 | + const traverse = (nodes) => { | ||
| 75 | + nodes.forEach((node) => { | ||
| 76 | + if (node.nodeType === "2" && node.permission) { | ||
| 77 | + permissions.push(node.permission); | ||
| 60 | } | 78 | } |
| 79 | + if (node.children && node.children.length > 0) { | ||
| 80 | + traverse(node.children); | ||
| 61 | } | 81 | } |
| 82 | + }); | ||
| 83 | + }; | ||
| 84 | + | ||
| 85 | + traverse(data); | ||
| 86 | + return permissions; | ||
| 62 | } | 87 | } |
| 63 | 88 | ||
| 64 | // 遍历后台传来的路由字符串,转换为组件对象 | 89 | // 遍历后台传来的路由字符串,转换为组件对象 |
| 65 | function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { | 90 | function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { |
| 66 | - return asyncRouterMap.filter(route => { | 91 | + return asyncRouterMap.filter((route) => { |
| 67 | // // 屏蔽包含 summary 的路由,master分支不屏蔽 | 92 | // // 屏蔽包含 summary 的路由,master分支不屏蔽 |
| 68 | // if (route.path.includes('summary')) { | 93 | // if (route.path.includes('summary')) { |
| 69 | // return false; | 94 | // return false; |
| 70 | // } | 95 | // } |
| 71 | if (type && route.children) { | 96 | if (type && route.children) { |
| 72 | - route.children = filterChildren(route.children) | 97 | + route.children = filterChildren(route.children); |
| 73 | } | 98 | } |
| 74 | if (route.component) { | 99 | if (route.component) { |
| 75 | // Layout ParentView 组件特殊处理 | 100 | // Layout ParentView 组件特殊处理 |
| 76 | - if (route.component === 'Layout') { | 101 | + if (route.component === "Layout") { |
| 77 | - route.component = Layout | 102 | + route.component = Layout; |
| 78 | - } else if (route.component === 'ParentView') { | 103 | + } else if (route.component === "ParentView") { |
| 79 | - route.component = ParentView | 104 | + route.component = ParentView; |
| 80 | } else { | 105 | } else { |
| 81 | - route.component = loadView(route.component) | 106 | + route.component = loadView(route.component); |
| 82 | } | 107 | } |
| 83 | } | 108 | } |
| 84 | if (route.children != null && route.children && route.children.length) { | 109 | if (route.children != null && route.children && route.children.length) { |
| 85 | - route.children = filterAsyncRouter(route.children, route, type) | 110 | + route.children = filterAsyncRouter(route.children, route, type); |
| 86 | } else { | 111 | } else { |
| 87 | - delete route['children'] | 112 | + delete route["children"]; |
| 88 | - delete route['redirect'] | 113 | + delete route["redirect"]; |
| 89 | } | 114 | } |
| 90 | - return true | 115 | + return true; |
| 91 | - }) | 116 | + }); |
| 92 | } | 117 | } |
| 93 | 118 | ||
| 94 | function filterChildren(childrenMap, lastRouter = false) { | 119 | function filterChildren(childrenMap, lastRouter = false) { |
| 95 | - var children = [] | 120 | + console.log(childrenMap); |
| 121 | + | ||
| 122 | + var children = []; | ||
| 96 | childrenMap.forEach((el, index) => { | 123 | childrenMap.forEach((el, index) => { |
| 97 | if (el.children && el.children.length) { | 124 | if (el.children && el.children.length) { |
| 98 | - if (el.component === 'ParentView') { | 125 | + if (el.component === "ParentView") { |
| 99 | - el.children.forEach(c => { | 126 | + el.children.forEach((c) => { |
| 100 | - c.path = el.path + '/' + c.path | 127 | + c.path = el.path + "/" + c.path; |
| 101 | if (c.children && c.children.length) { | 128 | if (c.children && c.children.length) { |
| 102 | - children = children.concat(filterChildren(c.children, c)) | 129 | + children = children.concat(filterChildren(c.children, c)); |
| 103 | - return | 130 | + return; |
| 104 | } | 131 | } |
| 105 | - children.push(c) | 132 | + children.push(c); |
| 106 | - }) | 133 | + }); |
| 107 | - return | 134 | + return; |
| 108 | } | 135 | } |
| 109 | } | 136 | } |
| 110 | if (lastRouter) { | 137 | if (lastRouter) { |
| 111 | - el.path = lastRouter.path + '/' + el.path | 138 | + el.path = lastRouter.path + "/" + el.path; |
| 112 | } | 139 | } |
| 113 | - children = children.concat(el) | 140 | + children = children.concat(el); |
| 114 | - }) | 141 | + }); |
| 115 | - return children | 142 | + return children; |
| 116 | } | 143 | } |
| 117 | 144 | ||
| 118 | - | ||
| 119 | //针对出口数据结构特殊处理 | 145 | //针对出口数据结构特殊处理 |
| 120 | //对ext框架route数据结构进行初始化 | 146 | //对ext框架route数据结构进行初始化 |
| 121 | function setRoute(route, childrens) { | 147 | function setRoute(route, childrens) { |
| 122 | - let rootRoute = {} | 148 | + let rootRoute = {}; |
| 123 | - let arr = [] | 149 | + let arr = []; |
| 124 | - childrens.forEach(item => { | 150 | + childrens.forEach((item) => { |
| 125 | - route.forEach(val => { | 151 | + route.forEach((val) => { |
| 126 | - val.id == 999999 ? rootRoute = val : '' | 152 | + val.id == 999999 ? (rootRoute = val) : ""; |
| 127 | if (item.parentId == val.id) { | 153 | if (item.parentId == val.id) { |
| 128 | - item.component = `${titleCase(val.name, 'low') != '' ? '/' + titleCase(val.name, 'low') : ''}${item.component}` | 154 | + item.component = `${ |
| 129 | - val.children.push(item) | 155 | + titleCase(val.name, "low") != "" |
| 130 | - val.component = 'Layout' | 156 | + ? "/" + titleCase(val.name, "low") |
| 157 | + : "" | ||
| 158 | + }${item.component}`; | ||
| 159 | + val.children.push(item); | ||
| 160 | + val.component = "Layout"; | ||
| 131 | // val.meta = item.meta | 161 | // val.meta = item.meta |
| 132 | - val.alwaysShow = false | 162 | + val.alwaysShow = false; |
| 133 | 163 | ||
| 134 | - if (val.path == '/newui_entryIO_parent') { | 164 | + if (val.path == "/newui_entryIO_parent") { |
| 135 | - val.hidden = true | 165 | + val.hidden = true; |
| 136 | - item.name = 'ol' + item.name | 166 | + item.name = "ol" + item.name; |
| 137 | } | 167 | } |
| 138 | } | 168 | } |
| 139 | - }) | 169 | + }); |
| 140 | - }) | 170 | + }); |
| 141 | - return route | 171 | + return route; |
| 142 | } | 172 | } |
| 143 | 173 | ||
| 144 | function routeItemInfo(data) { | 174 | function routeItemInfo(data) { |
| 145 | const routes = [ | 175 | const routes = [ |
| 146 | { | 176 | { |
| 147 | - path: '/redirect', | 177 | + path: "/redirect", |
| 148 | component: Layout, | 178 | component: Layout, |
| 149 | hidden: true, | 179 | hidden: true, |
| 150 | children: [ | 180 | children: [ |
| 151 | { | 181 | { |
| 152 | - path: '/redirect/:path(.*)', | 182 | + path: "/redirect/:path(.*)", |
| 153 | - component: (resolve) => require(['@/views/redirect'], resolve) | 183 | + component: (resolve) => require(["@/views/redirect"], resolve), |
| 154 | - } | 184 | + }, |
| 155 | - ] | 185 | + ], |
| 156 | }, | 186 | }, |
| 157 | { | 187 | { |
| 158 | - path: '/404', | 188 | + path: "/404", |
| 159 | - component: (resolve) => require(['@/views/error/404'], resolve), | 189 | + component: (resolve) => require(["@/views/error/404"], resolve), |
| 160 | - hidden: true | 190 | + hidden: true, |
| 161 | }, | 191 | }, |
| 162 | { | 192 | { |
| 163 | - path: '/401', | 193 | + path: "/401", |
| 164 | - component: (resolve) => require(['@/views/error/401'], resolve), | 194 | + component: (resolve) => require(["@/views/error/401"], resolve), |
| 165 | - hidden: true | 195 | + hidden: true, |
| 166 | }, | 196 | }, |
| 167 | { | 197 | { |
| 168 | - path: '/login', | 198 | + path: "/login", |
| 169 | - component: (resolve) => require(['@/views/login'], resolve), | 199 | + component: (resolve) => require(["@/views/login"], resolve), |
| 170 | hidden: true, | 200 | hidden: true, |
| 171 | - meta: { noCache: true } | 201 | + meta: { noCache: true }, |
| 172 | }, | 202 | }, |
| 173 | { | 203 | { |
| 174 | - path: '/relogin', | 204 | + path: "/relogin", |
| 175 | - component: (resolve) => require(['@/views/redjrectLogin'], resolve), | 205 | + component: (resolve) => require(["@/views/redjrectLogin"], resolve), |
| 176 | hidden: true, | 206 | hidden: true, |
| 177 | - meta: { noCache: true, breadcrumb: false } | 207 | + meta: { noCache: true, breadcrumb: false }, |
| 178 | - } | 208 | + }, |
| 179 | ]; | 209 | ]; |
| 180 | 210 | ||
| 181 | - data.forEach(item => { | 211 | + data.forEach((item) => { |
| 182 | - const isParent=item.parentId==0 && item.children.length==0; | 212 | + const isParent = item.parentId == 0 && item.children.length == 0; |
| 183 | const route = { | 213 | const route = { |
| 184 | path: item.path, | 214 | path: item.path, |
| 185 | component: "Layout", | 215 | component: "Layout", |
| 186 | alwaysShow: true, | 216 | alwaysShow: true, |
| 187 | hidden: false, | 217 | hidden: false, |
| 188 | meta: { title: item.name, icon: item.icon }, | 218 | meta: { title: item.name, icon: item.icon }, |
| 189 | - children: !isParent ? item.children.map(child => ({ | 219 | + children: !isParent |
| 220 | + ? item.children.map((child) => ({ | ||
| 190 | path: child.path, | 221 | path: child.path, |
| 191 | component: `${child.path}`, | 222 | component: `${child.path}`, |
| 192 | hidden: false, | 223 | hidden: false, |
| 193 | name: child.name, | 224 | name: child.name, |
| 194 | - meta: { title: child.name, icon: child.icon || '' } | 225 | + meta: { title: child.name, icon: child.icon || "" }, |
| 195 | })) | 226 | })) |
| 196 | - : | 227 | + : [ |
| 197 | - [ | ||
| 198 | { | 228 | { |
| 199 | path: item.path, | 229 | path: item.path, |
| 200 | component: `${item.path}`, | 230 | component: `${item.path}`, |
| 201 | hidden: false, | 231 | hidden: false, |
| 202 | name: item.name, | 232 | name: item.name, |
| 203 | - meta: { title: item.name, icon: item.icon || '' } | 233 | + meta: { title: item.name, icon: item.icon || "" }, |
| 204 | - } | 234 | + }, |
| 205 | - ] | 235 | + ], |
| 206 | - | ||
| 207 | - | ||
| 208 | }; | 236 | }; |
| 209 | routes.push(route); | 237 | routes.push(route); |
| 210 | }); | 238 | }); |
| ... | @@ -213,8 +241,9 @@ function routeItemInfo(data) { | ... | @@ -213,8 +241,9 @@ function routeItemInfo(data) { |
| 213 | return routes; | 241 | return routes; |
| 214 | } | 242 | } |
| 215 | 243 | ||
| 216 | -export const loadView = (view) => { // 路由懒加载 | 244 | +export const loadView = (view) => { |
| 217 | - return (resolve) => require([`@/views${view}/index.vue`], resolve) | 245 | + // 路由懒加载 |
| 218 | -} | 246 | + return (resolve) => require([`@/views${view}/index.vue`], resolve); |
| 247 | +}; | ||
| 219 | 248 | ||
| 220 | -export default permission | 249 | +export default permission; | ... | ... |
| 1 | - | 1 | +const TokenKey = "Ecom-Token"; |
| 2 | -const TokenKey = 'Ecom-Token' | 2 | +export const auth_code = "PERMISSION_AUTH_CODE"; |
| 3 | - | ||
| 4 | export function getToken() { | 3 | export function getToken() { |
| 5 | - return localStorage.getItem(TokenKey) | 4 | + return localStorage.getItem(TokenKey); |
| 6 | // return sessionStorage.getItem(TokenKey) | 5 | // return sessionStorage.getItem(TokenKey) |
| 7 | } | 6 | } |
| 8 | 7 | ||
| 9 | export function setToken(token) { | 8 | export function setToken(token) { |
| 10 | - setTime(new Date().getTime()) | 9 | + setTime(new Date().getTime()); |
| 11 | - return localStorage.setItem(TokenKey, token) | 10 | + return localStorage.setItem(TokenKey, token); |
| 12 | // return sessionStorage.setItem(TokenKey, token) | 11 | // return sessionStorage.setItem(TokenKey, token) |
| 13 | } | 12 | } |
| 14 | 13 | ||
| 15 | export function removeToken() { | 14 | export function removeToken() { |
| 16 | - sessionStorage.removeItem('magicFcl') | 15 | + sessionStorage.removeItem("magicFcl"); |
| 17 | - return localStorage.removeItem(TokenKey) | 16 | + return localStorage.removeItem(TokenKey); |
| 18 | // return sessionStorage.removeItem(TokenKey) | 17 | // return sessionStorage.removeItem(TokenKey) |
| 19 | } | 18 | } |
| 20 | 19 | ||
| 21 | export function getUserId() { | 20 | export function getUserId() { |
| 22 | - return localStorage.getItem('EcomUser') | 21 | + return localStorage.getItem("EcomUser"); |
| 23 | // return sessionStorage.getItem(TokenKey) | 22 | // return sessionStorage.getItem(TokenKey) |
| 24 | } | 23 | } |
| 25 | 24 | ||
| 26 | export function setUserId(id) { | 25 | export function setUserId(id) { |
| 27 | - return localStorage.setItem('EcomUser', id) | 26 | + return localStorage.setItem("EcomUser", id); |
| 28 | // return sessionStorage.setItem(TokenKey, token) | 27 | // return sessionStorage.setItem(TokenKey, token) |
| 29 | } | 28 | } |
| 30 | 29 | ||
| 31 | export function removeUserId() { | 30 | export function removeUserId() { |
| 32 | - return localStorage.removeItem('EcomUser') | 31 | + return localStorage.removeItem("EcomUser"); |
| 33 | // return sessionStorage.getItem(TokenKey) | 32 | // return sessionStorage.getItem(TokenKey) |
| 34 | } | 33 | } |
| 35 | 34 | ||
| 36 | export function setCookie(cookie) { | 35 | export function setCookie(cookie) { |
| 37 | - return localStorage.setItem('EcomLoginTIp', cookie) | 36 | + return localStorage.setItem("EcomLoginTIp", cookie); |
| 38 | } | 37 | } |
| 39 | 38 | ||
| 40 | export function getCookie() { | 39 | export function getCookie() { |
| 41 | - return localStorage.getItem('EcomLoginTIp') | 40 | + return localStorage.getItem("EcomLoginTIp"); |
| 42 | } | 41 | } |
| 43 | 42 | ||
| 44 | export function setTime(date) { | 43 | export function setTime(date) { |
| 45 | - return localStorage.setItem('EcomLoginTime', date) | 44 | + return localStorage.setItem("EcomLoginTime", date); |
| 46 | } | 45 | } |
| 47 | 46 | ||
| 48 | export function getTime() { | 47 | export function getTime() { |
| 49 | - return localStorage.getItem('EcomLoginTime') | 48 | + return localStorage.getItem("EcomLoginTime"); |
| 50 | } | 49 | } |
| 51 | 50 | ||
| 52 | export function removeTime() { | 51 | export function removeTime() { |
| 53 | - return localStorage.removeItem('EcomLoginTime') | 52 | + return localStorage.removeItem("EcomLoginTime"); |
| 54 | } | 53 | } |
| 55 | 54 | ||
| 56 | export function setLoginType(type) { | 55 | export function setLoginType(type) { |
| 57 | - return sessionStorage.setItem('magicFcl', type) | 56 | + return sessionStorage.setItem("magicFcl", type); |
| 58 | } | 57 | } |
| 59 | 58 | ||
| 60 | export function getLoginType() { | 59 | export function getLoginType() { |
| 61 | - return sessionStorage.getItem('magicFcl') | 60 | + return sessionStorage.getItem("magicFcl"); |
| 62 | } | 61 | } |
| 63 | 62 | ||
| 64 | export function removeLoginType() { | 63 | export function removeLoginType() { |
| 65 | - return sessionStorage.removeItem('magicFcl') | 64 | + return sessionStorage.removeItem("magicFcl"); |
| 66 | } | 65 | } |
| 67 | 66 | ||
| 68 | export function setEntrySreachType(type) { | 67 | export function setEntrySreachType(type) { |
| 69 | - return sessionStorage.setItem('sreachEntryType', type) | 68 | + return sessionStorage.setItem("sreachEntryType", type); |
| 70 | } | 69 | } |
| 71 | 70 | ||
| 72 | export function getEntrySreachType() { | 71 | export function getEntrySreachType() { |
| 73 | - return sessionStorage.getItem('sreachEntryType') | 72 | + return sessionStorage.getItem("sreachEntryType"); |
| 74 | } | 73 | } |
| 75 | 74 | ||
| 76 | export function removeEntrySreachType() { | 75 | export function removeEntrySreachType() { |
| 77 | - return sessionStorage.removeItem('sreachEntryType') | 76 | + return sessionStorage.removeItem("sreachEntryType"); |
| 77 | +} | ||
| 78 | + | ||
| 79 | +// 用于解放权限 | ||
| 80 | +export function removeAuthCode() { | ||
| 81 | + return localStorage.removeItem(auth_code); | ||
| 82 | +} | ||
| 83 | + | ||
| 84 | +// 获取权限 并判断传进来的code 是否有权限 | ||
| 85 | +export function isHasAuth(code) { | ||
| 86 | + const authCode = localStorage.getItem(auth_code); | ||
| 87 | + const stored = authCode ? JSON.parse(authCode) : []; | ||
| 88 | + console.log(stored); | ||
| 89 | + | ||
| 90 | + if (stored.includes(code)) { | ||
| 91 | + return true; | ||
| 92 | + } else { | ||
| 93 | + return false; | ||
| 94 | + } | ||
| 78 | } | 95 | } | ... | ... |
src/views/exportListDetail/dialog.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <el-dialog | ||
| 3 | + class="entryDialog classCUploadDialog" | ||
| 4 | + title="新增模拟回执管理" | ||
| 5 | + :visible.sync="outerVisible" | ||
| 6 | + :show-close="false" | ||
| 7 | + width="960px" | ||
| 8 | + :close-on-click-modal="false" | ||
| 9 | + :destroy-on-close="true" | ||
| 10 | + v-loading="loadings.dialogLoading" | ||
| 11 | + @close="close(false)" | ||
| 12 | + > | ||
| 13 | + <div class="modelItem"> | ||
| 14 | + <el-form | ||
| 15 | + class="fedexFormStyle" | ||
| 16 | + ref="formData" | ||
| 17 | + :model="formData" | ||
| 18 | + :rules="rules" | ||
| 19 | + label-position="top" | ||
| 20 | + size="small" | ||
| 21 | + > | ||
| 22 | + <el-row :gutter="5"> | ||
| 23 | + <el-col :span="8"> | ||
| 24 | + <Formitem label="回执类型" prop="receiptType" type="edit"> | ||
| 25 | + <el-select | ||
| 26 | + type="text" | ||
| 27 | + id="inputInner-edit-receiptType" | ||
| 28 | + v-model="formData.receiptType" | ||
| 29 | + clearable | ||
| 30 | + filterable | ||
| 31 | + placeholder="" | ||
| 32 | + @change="getOrderList" | ||
| 33 | + > | ||
| 34 | + <el-option | ||
| 35 | + v-for="item in receiptTypeList" | ||
| 36 | + :key="item.value" | ||
| 37 | + :label="item.itemChineseName" | ||
| 38 | + :value="item.itemValue" | ||
| 39 | + ></el-option> | ||
| 40 | + </el-select> | ||
| 41 | + </Formitem> | ||
| 42 | + </el-col> | ||
| 43 | + <el-col :span="8"> | ||
| 44 | + <Formitem label="物流运单编号" prop="logisticsNo" type="edit"> | ||
| 45 | + <el-select | ||
| 46 | + type="text" | ||
| 47 | + id="inputInner-edit-logisticsNo" | ||
| 48 | + v-model="formData.logisticsNo" | ||
| 49 | + :remote="true" | ||
| 50 | + clearable | ||
| 51 | + filterable | ||
| 52 | + collapse-tags | ||
| 53 | + :remote-method="remoteMethod" | ||
| 54 | + placeholder="" | ||
| 55 | + @change="receiptXml" | ||
| 56 | + class="order-select-warp-ol" | ||
| 57 | + > | ||
| 58 | + <el-option | ||
| 59 | + v-for="item in orderNoList" | ||
| 60 | + :key="item" | ||
| 61 | + :label="item" | ||
| 62 | + :value="item" | ||
| 63 | + ></el-option> | ||
| 64 | + </el-select> | ||
| 65 | + </Formitem> | ||
| 66 | + </el-col> | ||
| 67 | + <el-col :span="8"> | ||
| 68 | + <Formitem label="回执状态" prop="receiptStatus" type="edit"> | ||
| 69 | + <el-select | ||
| 70 | + type="text" | ||
| 71 | + id="inputInner-edit-receiptStatus" | ||
| 72 | + v-model="formData.receiptStatus" | ||
| 73 | + clearable | ||
| 74 | + filterable | ||
| 75 | + placeholder="" | ||
| 76 | + @change="receiptXml" | ||
| 77 | + > | ||
| 78 | + <el-option | ||
| 79 | + v-for="item in receiptStatusList" | ||
| 80 | + :key="item.itemValue" | ||
| 81 | + :label="item.itemChineseName" | ||
| 82 | + :value="item.itemValue" | ||
| 83 | + ></el-option> | ||
| 84 | + </el-select> | ||
| 85 | + </Formitem> | ||
| 86 | + </el-col> | ||
| 87 | + </el-row> | ||
| 88 | + <el-row :gutter="5" v-if="formData.receiptType == 'list'"> | ||
| 89 | + <el-col :span="8"> | ||
| 90 | + <Formitem label="电子口岸编号" prop="preNo" type="edit"> | ||
| 91 | + <el-input | ||
| 92 | + type="text" | ||
| 93 | + class="inputShadow" | ||
| 94 | + id="inputInner-edit-preNo" | ||
| 95 | + resize="none" | ||
| 96 | + v-model="formData.preNo" | ||
| 97 | + clearable | ||
| 98 | + placeholder="" | ||
| 99 | + @blur="receiptXml" | ||
| 100 | + ></el-input> | ||
| 101 | + </Formitem> | ||
| 102 | + </el-col> | ||
| 103 | + <el-col :span="8"> | ||
| 104 | + <Formitem label="清单编号" prop="invtNo" type="edit"> | ||
| 105 | + <el-input | ||
| 106 | + type="text" | ||
| 107 | + class="inputShadow" | ||
| 108 | + id="inputInner-edit-invtNo" | ||
| 109 | + resize="none" | ||
| 110 | + v-model="formData.invtNo" | ||
| 111 | + clearable | ||
| 112 | + placeholder="" | ||
| 113 | + @blur="receiptXml" | ||
| 114 | + ></el-input> | ||
| 115 | + </Formitem> | ||
| 116 | + </el-col> | ||
| 117 | + </el-row> | ||
| 118 | + <el-row :gutter="5"> | ||
| 119 | + <el-col :span="24"> | ||
| 120 | + <!-- <Formitem label="回执文本" prop="receiptInfo" type="edit"> | ||
| 121 | + <el-input | ||
| 122 | + type="textarea" | ||
| 123 | + :rows="4" | ||
| 124 | + class="inputShadow" | ||
| 125 | + id="inputInner-edit-receiptInfo" | ||
| 126 | + resize="none" | ||
| 127 | + v-model="formData.receiptInfo" | ||
| 128 | + clearable | ||
| 129 | + placeholder="" | ||
| 130 | + ></el-input> | ||
| 131 | + </Formitem> --> | ||
| 132 | + <div class="textarea-text"> | ||
| 133 | + <div style="color: #777777; margin-bottom: 10px">回执文本</div> | ||
| 134 | + <el-input | ||
| 135 | + type="textarea" | ||
| 136 | + :rows="4" | ||
| 137 | + class="inputShadow" | ||
| 138 | + resize="none" | ||
| 139 | + :readonly="true" | ||
| 140 | + v-model="receiptInfo" | ||
| 141 | + ></el-input> | ||
| 142 | + </div> | ||
| 143 | + </el-col> | ||
| 144 | + </el-row> | ||
| 145 | + </el-form> | ||
| 146 | + </div> | ||
| 147 | + <div class="dialogOption entrySave"> | ||
| 148 | + <el-button | ||
| 149 | + class="entrySaveButton" | ||
| 150 | + :disabled="loadings.submitLoading" | ||
| 151 | + @click="submit" | ||
| 152 | + >确 定</el-button | ||
| 153 | + > | ||
| 154 | + <el-button class="entrySaveButton" @click="close(false)">关 闭</el-button> | ||
| 155 | + </div> | ||
| 156 | + </el-dialog> | ||
| 157 | +</template> | ||
| 158 | + | ||
| 159 | +<script> | ||
| 160 | +import { | ||
| 161 | + searchOrderNo, | ||
| 162 | + generateReceiptXml, | ||
| 163 | + addInfo, | ||
| 164 | +} from "@/api/receiptManagement-api.js"; | ||
| 165 | +export default { | ||
| 166 | + props: { | ||
| 167 | + outerVisible: { | ||
| 168 | + type: Boolean, | ||
| 169 | + default: false, | ||
| 170 | + }, | ||
| 171 | + receiptStatusList: { | ||
| 172 | + type: Array, | ||
| 173 | + default: () => { | ||
| 174 | + return []; | ||
| 175 | + }, | ||
| 176 | + }, | ||
| 177 | + receiptTypeList: { | ||
| 178 | + type: Array, | ||
| 179 | + default: () => { | ||
| 180 | + return []; | ||
| 181 | + }, | ||
| 182 | + }, | ||
| 183 | + logisticsNo: { | ||
| 184 | + type: String, | ||
| 185 | + default: "", | ||
| 186 | + }, | ||
| 187 | + }, | ||
| 188 | + | ||
| 189 | + watch: { | ||
| 190 | + outerVisible(val) { | ||
| 191 | + console.log(val); | ||
| 192 | + if (val) { | ||
| 193 | + this.formData.logisticsNo = this.logisticsNo; | ||
| 194 | + this.formData.receiptType = "list"; | ||
| 195 | + } | ||
| 196 | + }, | ||
| 197 | + }, | ||
| 198 | + | ||
| 199 | + data() { | ||
| 200 | + return { | ||
| 201 | + formData: { | ||
| 202 | + receiptType: "", | ||
| 203 | + logisticsNo: "", | ||
| 204 | + receiptStatus: "", | ||
| 205 | + preNo: "", | ||
| 206 | + invtNo: "", | ||
| 207 | + }, | ||
| 208 | + receiptInfo: "", | ||
| 209 | + rules: { | ||
| 210 | + receiptType: [ | ||
| 211 | + { | ||
| 212 | + required: true, | ||
| 213 | + trigger: "blur", | ||
| 214 | + message: "请选择回执类型!", | ||
| 215 | + }, | ||
| 216 | + ], | ||
| 217 | + logisticsNo: [ | ||
| 218 | + { | ||
| 219 | + required: true, | ||
| 220 | + trigger: "blur", | ||
| 221 | + message: "物流运单编号不能为空!", | ||
| 222 | + }, | ||
| 223 | + ], | ||
| 224 | + receiptStatus: [ | ||
| 225 | + { | ||
| 226 | + required: true, | ||
| 227 | + trigger: "blur", | ||
| 228 | + message: "请选择回执状态!", | ||
| 229 | + }, | ||
| 230 | + ], | ||
| 231 | + preNo: [ | ||
| 232 | + { | ||
| 233 | + required: true, | ||
| 234 | + trigger: "blur", | ||
| 235 | + message: "电子口岸编号不能为空!", | ||
| 236 | + }, | ||
| 237 | + ], | ||
| 238 | + invtNo: [ | ||
| 239 | + { | ||
| 240 | + required: true, | ||
| 241 | + trigger: "blur", | ||
| 242 | + message: "清单编号不能为空!", | ||
| 243 | + }, | ||
| 244 | + ], | ||
| 245 | + }, | ||
| 246 | + orderNoList: [], | ||
| 247 | + loadings: { | ||
| 248 | + dialogLoading: false, | ||
| 249 | + submitLoading: false, | ||
| 250 | + }, | ||
| 251 | + loadingText: "", | ||
| 252 | + }; | ||
| 253 | + }, | ||
| 254 | + | ||
| 255 | + methods: { | ||
| 256 | + // 生成xml | ||
| 257 | + receiptXml() { | ||
| 258 | + if (!this.formData.receiptType) { | ||
| 259 | + return; | ||
| 260 | + } | ||
| 261 | + if (!this.formData.logisticsNo) { | ||
| 262 | + return; | ||
| 263 | + } | ||
| 264 | + if (!this.formData.receiptStatus) { | ||
| 265 | + return; | ||
| 266 | + } | ||
| 267 | + if (!this.formData.preNo) { | ||
| 268 | + return; | ||
| 269 | + } | ||
| 270 | + if (!this.formData.invtNo) { | ||
| 271 | + return; | ||
| 272 | + } | ||
| 273 | + generateReceiptXml({ | ||
| 274 | + ...this.formData, | ||
| 275 | + logisticsNo: this.formData.logisticsNo, | ||
| 276 | + }).then((res) => { | ||
| 277 | + console.log(res); | ||
| 278 | + if (res.code === "200") { | ||
| 279 | + this.receiptInfo = res.data; | ||
| 280 | + } else { | ||
| 281 | + this.alertWarningMsg(res.message); | ||
| 282 | + } | ||
| 283 | + }); | ||
| 284 | + }, | ||
| 285 | + remoteMethod(query) { | ||
| 286 | + console.log(query); | ||
| 287 | + this.getOrderList(query, true); | ||
| 288 | + }, | ||
| 289 | + getOrderList(val, flag) { | ||
| 290 | + if (!this.formData.receiptType) { | ||
| 291 | + return; | ||
| 292 | + } | ||
| 293 | + searchOrderNo({ | ||
| 294 | + receiptType: this.formData.receiptType, | ||
| 295 | + logisticsNo: flag ? val : "", | ||
| 296 | + }).then((res) => { | ||
| 297 | + if (res.code === "200") { | ||
| 298 | + this.orderNoList = res.data; | ||
| 299 | + } else { | ||
| 300 | + this.alertWarningMsg(res.message); | ||
| 301 | + } | ||
| 302 | + }); | ||
| 303 | + this.receiptXml(); | ||
| 304 | + }, | ||
| 305 | + //数据保存 | ||
| 306 | + submit() { | ||
| 307 | + let obj = { | ||
| 308 | + ...this.formData, | ||
| 309 | + }; | ||
| 310 | + this.$refs.formData.validate((valid) => { | ||
| 311 | + if (valid) { | ||
| 312 | + this.addapi({ | ||
| 313 | + ...obj, | ||
| 314 | + logisticsNos: [this.formData.logisticsNo], | ||
| 315 | + }); | ||
| 316 | + } | ||
| 317 | + }); | ||
| 318 | + }, | ||
| 319 | + //新增 | ||
| 320 | + addapi(val) { | ||
| 321 | + this.loadings.dialogLoading = true; | ||
| 322 | + addInfo(val) | ||
| 323 | + .then((res) => { | ||
| 324 | + if (res.code === "200") { | ||
| 325 | + this.msgSuccess(res.message); | ||
| 326 | + this.close(true); | ||
| 327 | + } else { | ||
| 328 | + this.alertWarningMsg(res.message); | ||
| 329 | + } | ||
| 330 | + }) | ||
| 331 | + .catch((err) => { | ||
| 332 | + console.log(err); | ||
| 333 | + this.loadings.dialogLoading = false; | ||
| 334 | + }); | ||
| 335 | + }, | ||
| 336 | + | ||
| 337 | + close(flag) { | ||
| 338 | + this.formData = { | ||
| 339 | + receiptType: "", | ||
| 340 | + logisticsNo: "", | ||
| 341 | + receiptStatus: "", | ||
| 342 | + }; | ||
| 343 | + this.loadings.dialogLoading = false; | ||
| 344 | + this.receiptInfo = ""; | ||
| 345 | + this.$emit("close", flag); | ||
| 346 | + }, | ||
| 347 | + }, | ||
| 348 | +}; | ||
| 349 | +</script> | ||
| 350 | + | ||
| 351 | +<style lang="scss" scoped> | ||
| 352 | +@import "@/assets/styles/variables.scss"; | ||
| 353 | + | ||
| 354 | +.fedexFormStyle { | ||
| 355 | + .order-select-warp-ol { | ||
| 356 | + ::v-deep { | ||
| 357 | + .el-select__input { | ||
| 358 | + width: 35px !important; | ||
| 359 | + padding-top: 0 !important; | ||
| 360 | + } | ||
| 361 | + } | ||
| 362 | + } | ||
| 363 | +} | ||
| 364 | +</style> |
| ... | @@ -305,7 +305,6 @@ | ... | @@ -305,7 +305,6 @@ |
| 305 | ></el-input> | 305 | ></el-input> |
| 306 | </Formitem> | 306 | </Formitem> |
| 307 | </el-col> | 307 | </el-col> |
| 308 | - | ||
| 309 | </el-row> | 308 | </el-row> |
| 310 | <el-row :gutter="5"> | 309 | <el-row :gutter="5"> |
| 311 | <!-- 贸易方式 --> | 310 | <!-- 贸易方式 --> |
| ... | @@ -440,7 +439,6 @@ | ... | @@ -440,7 +439,6 @@ |
| 440 | </el-select> | 439 | </el-select> |
| 441 | </Formitem> | 440 | </Formitem> |
| 442 | </el-col> | 441 | </el-col> |
| 443 | - | ||
| 444 | </el-row> | 442 | </el-row> |
| 445 | <el-row :gutter="5"> | 443 | <el-row :gutter="5"> |
| 446 | <!-- 运费 --> | 444 | <!-- 运费 --> |
| ... | @@ -575,7 +573,6 @@ | ... | @@ -575,7 +573,6 @@ |
| 575 | ></el-input> | 573 | ></el-input> |
| 576 | </Formitem> | 574 | </Formitem> |
| 577 | </el-col> | 575 | </el-col> |
| 578 | - | ||
| 579 | </el-row> | 576 | </el-row> |
| 580 | <el-row :gutter="5"> | 577 | <el-row :gutter="5"> |
| 581 | <!-- 净重(公斤) --> | 578 | <!-- 净重(公斤) --> |
| ... | @@ -696,6 +693,7 @@ | ... | @@ -696,6 +693,7 @@ |
| 696 | :class="{ entryTitle: true, titleBorder: logtableType ? false : true }" | 693 | :class="{ entryTitle: true, titleBorder: logtableType ? false : true }" |
| 697 | style="margin-top: 10px" | 694 | style="margin-top: 10px" |
| 698 | > | 695 | > |
| 696 | + <div style="display: flex; justify-content: space-between; width: 100%"> | ||
| 699 | <div> | 697 | <div> |
| 700 | 回执信息 | 698 | 回执信息 |
| 701 | <el-button type="text" @click="hiddenLogTable"> | 699 | <el-button type="text" @click="hiddenLogTable"> |
| ... | @@ -703,6 +701,19 @@ | ... | @@ -703,6 +701,19 @@ |
| 703 | <svg-icon v-else icon-class="upIcon"></svg-icon> | 701 | <svg-icon v-else icon-class="upIcon"></svg-icon> |
| 704 | </el-button> | 702 | </el-button> |
| 705 | </div> | 703 | </div> |
| 704 | + <div> | ||
| 705 | + <template v-show="isHasAuth('queryMgr:exportList:add')"> | ||
| 706 | + <el-button | ||
| 707 | + class="entrySaveButton" | ||
| 708 | + icon="el-icon-plus" | ||
| 709 | + size="small" | ||
| 710 | + @click="outerVisible = true" | ||
| 711 | + > | ||
| 712 | + 新增模拟回执 | ||
| 713 | + </el-button> | ||
| 714 | + </template> | ||
| 715 | + </div> | ||
| 716 | + </div> | ||
| 706 | </div> | 717 | </div> |
| 707 | <ReceiptInfoTable | 718 | <ReceiptInfoTable |
| 708 | v-if="logtableType" | 719 | v-if="logtableType" |
| ... | @@ -715,6 +726,14 @@ | ... | @@ -715,6 +726,14 @@ |
| 715 | :bodyHeader="detialHeaderData" | 726 | :bodyHeader="detialHeaderData" |
| 716 | /> | 727 | /> |
| 717 | <div style="margin-bottom: 20px; text-align: center"></div> | 728 | <div style="margin-bottom: 20px; text-align: center"></div> |
| 729 | + <!-- 新增模拟回执 --> | ||
| 730 | + <DialogVue | ||
| 731 | + :outerVisible="outerVisible" | ||
| 732 | + @close="dialogClose" | ||
| 733 | + :receiptStatusList="receiptStatusList" | ||
| 734 | + :receiptTypeList="receiptTypeList" | ||
| 735 | + :logisticsNo="formData.logisticsNo" | ||
| 736 | + /> | ||
| 718 | </div> | 737 | </div> |
| 719 | </template> | 738 | </template> |
| 720 | 739 | ||
| ... | @@ -722,13 +741,20 @@ | ... | @@ -722,13 +741,20 @@ |
| 722 | import ReceiptInfoTable from "../components/ReceiptInfoTable/index.vue"; | 741 | import ReceiptInfoTable from "../components/ReceiptInfoTable/index.vue"; |
| 723 | import ProductDetailTable from "../components/ProductDetailTable/index.vue"; | 742 | import ProductDetailTable from "../components/ProductDetailTable/index.vue"; |
| 724 | import { getListDetail } from "@/api/exportDetail-api.js"; | 743 | import { getListDetail } from "@/api/exportDetail-api.js"; |
| 744 | +import { getDictData } from "@/api/system/dict-api.js"; | ||
| 745 | + | ||
| 746 | +import DialogVue from "./dialog.vue"; | ||
| 747 | +import { isHasAuth } from "../../utils/auth"; | ||
| 748 | + | ||
| 725 | export default { | 749 | export default { |
| 726 | name: "", | 750 | name: "", |
| 727 | - components: { ProductDetailTable, ReceiptInfoTable }, | 751 | + components: { ProductDetailTable, ReceiptInfoTable, DialogVue }, |
| 728 | data() { | 752 | data() { |
| 729 | return { | 753 | return { |
| 730 | id: null, | 754 | id: null, |
| 731 | - formData: {}, | 755 | + formData: { |
| 756 | + logisticsNo: "", | ||
| 757 | + }, | ||
| 732 | logData: [], | 758 | logData: [], |
| 733 | logHeaderData: [ | 759 | logHeaderData: [ |
| 734 | { | 760 | { |
| ... | @@ -831,6 +857,9 @@ export default { | ... | @@ -831,6 +857,9 @@ export default { |
| 831 | entryLoading: false, | 857 | entryLoading: false, |
| 832 | }, | 858 | }, |
| 833 | logtableType: true, | 859 | logtableType: true, |
| 860 | + outerVisible: false, | ||
| 861 | + receiptStatusList: [], | ||
| 862 | + receiptTypeList: [], | ||
| 834 | }; | 863 | }; |
| 835 | }, | 864 | }, |
| 836 | created() { | 865 | created() { |
| ... | @@ -840,8 +869,36 @@ export default { | ... | @@ -840,8 +869,36 @@ export default { |
| 840 | } else { | 869 | } else { |
| 841 | this.back(); | 870 | this.back(); |
| 842 | } | 871 | } |
| 872 | + this.fetchReceiptStatus(); | ||
| 843 | }, | 873 | }, |
| 844 | methods: { | 874 | methods: { |
| 875 | + fetchReceiptStatus() { | ||
| 876 | + getDictData({ doctCode: "RECEIPT_TYPE" }) | ||
| 877 | + .then((res) => { | ||
| 878 | + if (res.code == "200") { | ||
| 879 | + this.receiptTypeList = res.data; | ||
| 880 | + } | ||
| 881 | + }) | ||
| 882 | + .catch((err) => { | ||
| 883 | + console.error(err); | ||
| 884 | + }); | ||
| 885 | + getDictData({ doctCode: "MOCK_RECEIPT_STATUS" }) | ||
| 886 | + .then((res) => { | ||
| 887 | + if (res.code == "200") { | ||
| 888 | + this.receiptStatusList = res.data; | ||
| 889 | + } | ||
| 890 | + }) | ||
| 891 | + .catch((err) => { | ||
| 892 | + console.error(err); | ||
| 893 | + }); | ||
| 894 | + }, | ||
| 895 | + dialogClose(flag = false) { | ||
| 896 | + this.outerVisible = false; | ||
| 897 | + if (flag) { | ||
| 898 | + // this.search(0); | ||
| 899 | + this.searchData(); | ||
| 900 | + } | ||
| 901 | + }, | ||
| 845 | searchData() { | 902 | searchData() { |
| 846 | this.loadings.entryLoading = true; | 903 | this.loadings.entryLoading = true; |
| 847 | getListDetail({ listId: this.id }) | 904 | getListDetail({ listId: this.id }) | ... | ... |
| ... | @@ -41,11 +41,11 @@ | ... | @@ -41,11 +41,11 @@ |
| 41 | </Formitem> | 41 | </Formitem> |
| 42 | </el-col> | 42 | </el-col> |
| 43 | <el-col :span="8"> | 43 | <el-col :span="8"> |
| 44 | - <Formitem label="订单编号" prop="orderNo" type="edit"> | 44 | + <Formitem label="物流运单编号" prop="logisticsNo" type="edit"> |
| 45 | <el-select | 45 | <el-select |
| 46 | type="text" | 46 | type="text" |
| 47 | - id="inputInner-edit-orderNo" | 47 | + id="inputInner-edit-logisticsNo" |
| 48 | - v-model="formData.orderNo" | 48 | + v-model="formData.logisticsNo" |
| 49 | :remote="true" | 49 | :remote="true" |
| 50 | clearable | 50 | clearable |
| 51 | filterable | 51 | filterable |
| ... | @@ -186,7 +186,7 @@ export default { | ... | @@ -186,7 +186,7 @@ export default { |
| 186 | return { | 186 | return { |
| 187 | formData: { | 187 | formData: { |
| 188 | receiptType: "", | 188 | receiptType: "", |
| 189 | - orderNo: "", | 189 | + logisticsNo: "", |
| 190 | receiptStatus: "", | 190 | receiptStatus: "", |
| 191 | preNo: "", | 191 | preNo: "", |
| 192 | invtNo: "", | 192 | invtNo: "", |
| ... | @@ -200,11 +200,11 @@ export default { | ... | @@ -200,11 +200,11 @@ export default { |
| 200 | message: "请选择回执类型!", | 200 | message: "请选择回执类型!", |
| 201 | }, | 201 | }, |
| 202 | ], | 202 | ], |
| 203 | - orderNo: [ | 203 | + logisticsNo: [ |
| 204 | { | 204 | { |
| 205 | required: true, | 205 | required: true, |
| 206 | trigger: "blur", | 206 | trigger: "blur", |
| 207 | - message: "订单编号不能为空!", | 207 | + message: "物流运单编号不能为空!", |
| 208 | }, | 208 | }, |
| 209 | ], | 209 | ], |
| 210 | receiptStatus: [ | 210 | receiptStatus: [ |
| ... | @@ -244,7 +244,7 @@ export default { | ... | @@ -244,7 +244,7 @@ export default { |
| 244 | if (!this.formData.receiptType) { | 244 | if (!this.formData.receiptType) { |
| 245 | return; | 245 | return; |
| 246 | } | 246 | } |
| 247 | - if (!this.formData.orderNo) { | 247 | + if (!this.formData.logisticsNo) { |
| 248 | return; | 248 | return; |
| 249 | } | 249 | } |
| 250 | if (!this.formData.receiptStatus) { | 250 | if (!this.formData.receiptStatus) { |
| ... | @@ -258,7 +258,7 @@ export default { | ... | @@ -258,7 +258,7 @@ export default { |
| 258 | } | 258 | } |
| 259 | generateReceiptXml({ | 259 | generateReceiptXml({ |
| 260 | ...this.formData, | 260 | ...this.formData, |
| 261 | - orderNo: this.formData.orderNo, | 261 | + logisticsNo: this.formData.logisticsNo, |
| 262 | }).then((res) => { | 262 | }).then((res) => { |
| 263 | console.log(res); | 263 | console.log(res); |
| 264 | if (res.code === "200") { | 264 | if (res.code === "200") { |
| ... | @@ -278,7 +278,7 @@ export default { | ... | @@ -278,7 +278,7 @@ export default { |
| 278 | } | 278 | } |
| 279 | searchOrderNo({ | 279 | searchOrderNo({ |
| 280 | receiptType: this.formData.receiptType, | 280 | receiptType: this.formData.receiptType, |
| 281 | - orderNo: flag ? val : "", | 281 | + logisticsNo: flag ? val : "", |
| 282 | }).then((res) => { | 282 | }).then((res) => { |
| 283 | if (res.code === "200") { | 283 | if (res.code === "200") { |
| 284 | this.orderNoList = res.data; | 284 | this.orderNoList = res.data; |
| ... | @@ -297,7 +297,7 @@ export default { | ... | @@ -297,7 +297,7 @@ export default { |
| 297 | if (valid) { | 297 | if (valid) { |
| 298 | this.addapi({ | 298 | this.addapi({ |
| 299 | ...obj, | 299 | ...obj, |
| 300 | - orderNo: [this.formData.orderNo], | 300 | + logisticsNos: [this.formData.logisticsNo], |
| 301 | }); | 301 | }); |
| 302 | } | 302 | } |
| 303 | }); | 303 | }); |
| ... | @@ -323,7 +323,7 @@ export default { | ... | @@ -323,7 +323,7 @@ export default { |
| 323 | close(flag) { | 323 | close(flag) { |
| 324 | this.formData = { | 324 | this.formData = { |
| 325 | receiptType: "", | 325 | receiptType: "", |
| 326 | - orderNo: "", | 326 | + logisticsNo: "", |
| 327 | receiptStatus: "", | 327 | receiptStatus: "", |
| 328 | }; | 328 | }; |
| 329 | this.loadings.dialogLoading = false; | 329 | this.loadings.dialogLoading = false; | ... | ... |
-
Please register or login to post a comment