123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- import { createRouter, createWebHashHistory } from 'vue-router'
- const router = createRouter({
- history: createWebHashHistory(),
- routes: [
- {
- path: '/',
- redirect: '/purchaseOrder/create/0',
- },
- {
- name: 'purchaseOrder',
- path: '/purchaseOrder',
- component: () => import('@/pages/purchase-order/index.vue'),
- // redirect: 'create',
- children: [
- {
- path: 'create/:id',
- name: 'purchaseOrderEdit',
- component: () => import('@/pages/purchase-order/edit.vue'),
- },
- ],
- },
- {
- name: 'paymentRecord',
- path: '/payment-record',
- component: () => import('@/pages/payment-record/index.vue'),
- },
- {
- name: 'paymentRecord2',
- path: '/payment-record2',
- component: () => import('@/pages/payment-record2/index.vue'),
- },
- {
- name: 'paymentRecord3',
- path: '/payment-record3',
- component: () => import('@/pages/payment-record3/index.vue'),
- },
- // {
- // name: 'paymentRecord4',
- // path: '/payment-record4',
- // component: () => import('@/pages/payment-record3/index.vue'),
- // },
- {
- name: 'wecomApproval',
- path: '/wecom-approval/:id',
- component: () => import('@/pages/wecom-approval/index.vue'),
- },
- {
- name: 'wecomAdminPortal',
- path: '/wecom-admin-portal',
- component: () => import('@/pages/wecom-approval/admin-portal.vue'),
- },
- {
- name: 'indentManage',
- path: '/indent-manage',
- component: () => import('@/pages/indent-manage/index.vue'),
- children: [
- {
- path: 'indent',
- name: 'indent',
- component: () => import('@/pages/indent-manage/indent/index.vue'),
- children: [
- {
- path: 'list',
- name: 'list',
- component: () => import('@/pages/indent-manage/indent/list.vue'),
- },
- ],
- },
- {
- path: 'product',
- name: 'indent-product',
- component: () => import('@/pages/indent-manage/product/index.vue'),
- children: [
- {
- path: 'list',
- name: 'indent-product-list',
- component: () => import('@/pages/indent-manage/product/list.vue'),
- },
- {
- path: 'cagegoryList',
- name: 'indent-category-list',
- component: () =>
- import('@/pages/indent-manage/product/category/index.vue'),
- },
- ],
- },
- {
- path: 'supplier',
- name: 'indent-supplier',
- component: () => import('@/pages/indent-manage/supplier/index.vue'),
- children: [
- {
- path: 'list',
- name: 'indent-supplier-list',
- component: () =>
- import('@/pages/indent-manage/supplier/list.vue'),
- },
- ],
- },
- {
- path: 'user',
- name: 'indent-user',
- component: () => import('@/pages/indent-manage/user/index.vue'),
- },
- {
- path: 'login',
- name: 'indent-user-login',
- component: () => import('@/pages/indent-manage/login.vue'),
- },
- ],
- },
- {
- name: 'soSearch',
- path: '/so-search',
- component: () => import('@/pages/so-search/index.vue'),
- },
- {
- name: 'cargoConsolidationRequest',
- path: '/cargo-consolidation-request',
- component: () => import('@/pages/cargo-consolidation-request/index.vue'),
- },
- {
- path: '/:pathMatch(.*)*',
- name: 'pageNotFound',
- component: () => import('@/pages/404.vue'),
- },
- ],
- scrollBehavior(to, from, savedPosition) {
- if (savedPosition) {
- return savedPosition
- } else {
- return { left: 0, top: 0 }
- }
- },
- })
- export default router
|