import {
	createRouter,
	createWebHashHistory
} from 'vue-router'
import login from '../views/login.vue'
import main from '../views/main.vue'
const routes = [{
		path: '/',
		name: 'login',
		component: login
	},
	{
		path: '/about',
		name: 'about',
		component: () => import('../views/AboutView.vue')
	},
	{
		path: '/main',
		name: 'main',
		component: main,
		redirect: '/main/equipment',
		children: [{
				path: 'equipment',
				name: '设备列表',
				component: () => import('../views/equipment/index.vue')
			},
			{
				path: 'working',
				name: '工作台',
				component: () => import('../views/working/index.vue')
			},
			{
				path: 'warpKnitting/:id',
				name: '经编机',
				component: () => import('../views/equipment/warpKnitting.vue')
			},

			//仓库模块
			{
				path: 'warehouseConfig',
				name: '仓库维护',
				component: () => import('../views/warehouse/warehouseConfig/index.vue')
			},
			{
				path: 'warehouseConfigAdd',
				name: '仓库新增',
				component: () => import('../views/warehouse/warehouseConfig/add.vue')
			},
			{
				path: 'manualOutbound',
				name: '手动出库',
				component: () => import('../views/purchase-sales/inbound-outbound/manualOutbound/index.vue')
			},
			{
				path: 'manualOutboundAdd',
				name: '手动出库新增',
				component: () => import('../views/purchase-sales/inbound-outbound/manualOutbound/add.vue')
			},
			{
				path: 'manualInbound',
				name: '手动入库',
				component: () => import('../views/purchase-sales/inbound-outbound/manualInbound/index.vue')
			},
			{
				path: 'manualInboundAdd',
				name: '手动入库新增',
				component: () => import('../views/purchase-sales/inbound-outbound/manualInbound/add.vue')
			},
			{
				path: 'waitInbound',
				name: '待入库',
				component: () => import('../views/purchase-sales/inbound-outbound/waitInbound/index.vue')
			},
			{
				path: 'waitInboundAdd',
				name: '入库',
				component: () => import('../views/purchase-sales/inbound-outbound/waitInbound/add.vue')
			},

			{
				path: 'transferWarehouse',
				name: '调仓',
				component: () => import('../views/purchase-sales/inbound-outbound/transferWarehouse/index.vue')
			},
			{
				path: 'sendTransferWarehouse',
				name: '发起调仓',
				component: () => import('../views/purchase-sales/inbound-outbound/transferWarehouse/add.vue')
			},
			{
				path: 'inventoryQuery',
				name: '库存查询',
				component: () => import('../views/purchase-sales/inventory-management/inventoryQuery/index.vue')
			},
			{
				path: 'outInList',
				name: '出入库流水',
				component: () => import('../views/purchase-sales/inventory-management/outInList/index.vue')
			},
		]
	},

]

const router = createRouter({
	history: createWebHashHistory(),
	routes
})

export default router