/* Layout */
import Layout from '@/layout'

export default {
  path: '/myTrade',
  component: Layout,
  redirect: '/purchaseSalesContract',
  meta: {
    title: '我的贸易', // 我的贸易
    icon: 'myTrade'
  },
  children: [
    {
      path: '/purchaseSalesContract',
      name: 'PurchaseSalesContract',
      component: () => import('@/views/myTrade/purchaseAndSaleContract/index'),
      meta: {
        title: '购销合同' // 购销合同
      },
      children: [
        {
          path: 'salesContractAdd',
          name: 'SalesContractAdd',
          component: () => import('@/views/myTrade/purchaseAndSaleContract/salesContract/salesContractAdd.vue'),
          hidden: true,
          meta: {
            title: '添加销售合同', activeMenu: '/purchaseSalesContract'
          }
        },
        {
          path: 'salesContractEdit',
          name: 'SalesContractEdit',
          component: () => import('@/views/myTrade/purchaseAndSaleContract/salesContract/saleContractEdit.vue'),
          hidden: true,
          meta: {
            title: '编辑销售合同', activeMenu: '/purchaseSalesContract'
          }
        },
        {
          path: 'salesContractDetail',
          name: 'SalesContractDetail',
          component: () => import('@/views/myTrade/purchaseAndSaleContract/salesContract/saleContractDetail.vue'),
          hidden: true,
          meta: {
            title: '查看销售合同', activeMenu: '/purchaseSalesContract'
          }
        },
        // {
        //   path: '/tradeRelations/importer',
        //   name: 'ImporterEdit',
        //   component: () => import('@/views/businessManage/tradeRelations/tradeRelationsEdit'),
        //   hidden: true,
        //   meta: { title: '进口商管理', activeMenu: '/businessManage' }
        // },
        // {
        //   path: '/tradeRelations/supplier',
        //   name: 'Supplier',
        //   component: () => import('@/views/businessManage/tradeRelations/tradeRelationsEdit'),
        //   hidden: true,
        //   meta: { title: '供应商管理', activeMenu: '/businessManage' }
        // },
        // {
        //   path: '/tradeRelations/tradeRelationsEdit/:id',
        //   name: 'TradeRelationsEdit',
        //   component: () => import('@/views/businessManage/tradeRelations/tradeRelationsEdit'),
        //   hidden: true,
        //   meta: { title: '添加关系企业', activeMenu: '/businessManage' }
        // }
        {
          path: 'purchaseContractEdit',
          name: 'PurchaseContractEdit',
          component: () => import('@/views/myTrade/purchaseAndSaleContract/purchaseContract/edit.vue'),
          hidden: true,
          meta: {
            title: '采购合同编辑', activeMenu: '/purchaseSalesContract'
          }
        },
        {
          path: 'purchaseContractView',
          name: 'PurchaseContractView',
          component: () => import('@/views/myTrade/purchaseAndSaleContract/purchaseContract/view.vue'),
          hidden: true,
          meta: {
            title: '采购合同详情', activeMenu: '/purchaseSalesContract'
          }
        }
      ]
    },
    {
      path: '/salesBill',
      name: 'SalesBill',
      component: () => import('@/views/myTrade/salesBill/index'),
      meta: {
        title: '销售单据' // 销售单据
      },
      children: [
        {
          path: 'salesOrderAdd',
          name: 'SalesOrderAdd',
          component: () => import('@/views/myTrade/salesBill/salesOrder/add'),
          hidden: true,
          meta: {
            title: '创建销售订单', activeMenu: '/salesBill'
          }
        },
        {
          path: 'salesOrderEdit',
          name: 'SalesOrderEdit',
          component: () => import('@/views/myTrade/salesBill/salesOrder/edit'),
          hidden: true,
          meta: {
            title: '销售订单编辑', activeMenu: '/salesBill'
          }
        },
        {
          path: 'salesOrderView',
          name: 'SalesOrderView',
          component: () => import('@/views/myTrade/salesBill/salesOrder/view'),
          hidden: true,
          meta: {
            title: '销售订单详情', activeMenu: '/salesBill'
          }
        },
        {
          path: 'salesOrderTrans',
          name: 'SalesOrderTrans',
          component: () => import('@/views/myTrade/salesBill/salesOrder/trans'),
          hidden: true,
          meta: {
            title: '销售订单发货', activeMenu: '/salesBill'
          }
        },
        {
          path: 'salesInvoiceView',
          name: 'SalesInvoiceView',
          component: () => import('@/views/myTrade/salesBill/salesInvoices/view'),
          hidden: true,
          meta: {
            title: '销售发票详情', activeMenu: '/salesBill'
          }
        },
        {
          path: 'salesTransportView',
          name: 'SalesTransportView',
          component: () => import('@/views/myTrade/salesBill/salesTransport/view'),
          hidden: true,
          meta: {
            title: '销售物流详情', activeMenu: '/salesBill'
          }
        }
      ]
    },
    {
      path: '/purchaseBill',
      name: 'PurchaseBill',
      component: () => import('@/views/myTrade/purchaseBill/index'),
      meta: {
        title: '采购单据' // 采购单据
      },
      children: [
        {
          path: 'purchaseOrderView',
          name: 'PurchaseOrderView',
          component: () => import('@/views/myTrade/purchaseBill/purchaseOrder/view'),
          hidden: true,
          meta: {
            title: '采购订单详情', activeMenu: '/purchaseBill'
          }
        }
      ]
    }
  ]
}
