/*
 *   异议投诉-路由表
 * */
import layout from '@/components/layout/layout'
// 检测认证-回复异议（不重要）
const replyObjection = [
  {
    path: 'replyObjectionList',
    name: 'ReplyObjectionList',
    component: () => import('@/views/testAndCertify/objection/replyObjection-list')
  }
]

export const ObjectionHandle = [
  /* 异议tab页*/
  {
    path: 'objectionTabs',
    meta: { path: 'objectionList' },
    component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/objectionTabs'),
    children: [
      // ======受理=========
      // 异议回复受理
      {
        path: 'objectionAcceptanceAdd',
        name: 'ObjectionAcceptanceAdd',
        component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/objectionAcceptance-add')
      },
      // 异议回复函编辑
      {
        path: 'makeReplyLetterAdd',
        name: 'MakeReplyLetterAdd',
        component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/makeReplyLetter-add')
      },
      // 异议回复函提交
      {
        path: 'submitObjectionAcceptance',
        name: 'SubmitObjectionAcceptance',
        component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/submitObjectionAcceptance')
      },
      // 发送异议回复函(审批情况)
      {
        path: 'sendReply',
        name: 'SendReply',
        meta: {
          name: '异议回复函'
        },
        component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/sendReply')
      },
      // 查看异议受理
      {
        path: 'objectionAcceptanceDetail',
        name: 'ObjectionAcceptanceDetail',
        meta: {
          name: '异议回复审批单'
        },
        component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/objectionAcceptance-detail')
      },
      // ======不受理=========
      // 异议不受理
      {
        path: 'objectionNotAcceptanceAdd',
        name: 'ObjectionNotAcceptanceAdd',
        component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/objectionNotAcceptance-add')
      },
      // 发送不予受理通知函
      {
        path: 'sendNotice',
        name: 'SendNotice',
        meta: {
          name: '异议不予受理通知函'
        },
        component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/sendNotice')
      },
      // 查看异议不予受理
      {
        path: 'objectionNotAcceptanceDetail',
        name: 'ObjectionNotAcceptanceDetail',
        meta: {
          name: '异议不予受理审批单'
        },
        component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/objectionNotAcceptance-detail')
      },
      // 异议复核
      {
        path: 'objectionAcceptanceRecheck',
        name: 'ObjectionAcceptanceRecheck',
        meta: {
          name: '异议复核'
        },
        component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/objectionAcceptanceRecheck')
      }
    ]
  }
]
/* 风险控制部提出异议*/
export const Objection = [
  {
    path: '/objection',
    component: layout,
    children: [
      // 项目经理-投诉异议列表
      {
        path: 'objectionList',
        component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/objection-list')
      },
      // 风险控制部-投诉异议列表
      {
        path: 'riskDepartObjectionList',
        component: () => import('@/views/bidding/bidClarification/tenderObjection/riskDepart/riskDepartObjection-list')
      },
      // 风险控制部-提交投诉异议（新增）
      {
        path: 'riskDepartObjectionAdd',
        name: 'RiskDepartObjectionAdd',
        meta: { path: 'riskDepartObjectionList' },
        component: () => import('@/views/bidding/bidClarification/tenderObjection/riskDepart/riskDepartObjection-add')
      },
      // 风险控制部-提交投诉异议详情
      {
        path: 'riskDepartObjectionDetail',
        name: 'RiskDepartObjectionDetail',
        meta: { path: 'riskDepartObjectionList' },
        component: () => import('@/views/bidding/bidClarification/tenderObjection/riskDepart/riskDepartObjection-detail')
      },
      ...ObjectionHandle,
      ...replyObjection // 检测认证-回复异议（不重要）
    ]
  }
]

/* 工作流处理风险控制部异议*/
export const ObjectionFlow = [
  // 风险控制部-提交投诉异议（新增）
  {
    path: 'riskDepartObjectionAdd',
    name: 'RiskDepartObjectionAddFlow',
    component: () => import('@/views/bidding/bidClarification/tenderObjection/riskDepart/riskDepartObjection-add')
  },
  // 风险控制部-提交投诉异议详情
  {
    path: 'riskDepartObjectionDetail',
    name: 'RiskDepartObjectionDetailFlow',
    component: () => import('@/views/bidding/bidClarification/tenderObjection/riskDepart/riskDepartObjection-detail')
  },
  /* 项目经理-投诉异议受理/不受理*/
  // ======受理=========
  // 异议回复受理
  {
    path: 'objectionAcceptanceAddFlow',
    name: 'ObjectionAcceptanceAddFlow',
    component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/objectionAcceptance-add')
  },
  // 异议回复函编辑
  {
    path: 'makeReplyLetterAddFlow',
    name: 'MakeReplyLetterAddFlow',
    component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/makeReplyLetter-add')
  },
  // 异议回复函提交
  {
    path: 'submitObjectionAcceptanceFlow',
    name: 'SubmitObjectionAcceptanceFlow',
    component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/submitObjectionAcceptance')
  },
  // 发送异议回复函(审批情况)
  {
    path: 'sendReply',
    name: 'SendReplyFlow',
    component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/sendReply')
  },
  // 查看异议受理
  {
    path: 'objectionAcceptanceDetail',
    name: 'ObjectionAcceptanceDetailFlow',
    component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/objectionAcceptance-detail')
  },
  // ======不受理=========
  // 异议不受理
  {
    path: 'objectionNotAcceptanceAddFlow',
    name: 'ObjectionNotAcceptanceAddFlow',
    component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/objectionNotAcceptance-add')
  },
  // 发送不予受理通知函
  {
    path: 'sendNotice',
    name: 'SendNoticeFlow',
    component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/sendNotice')
  },
  // 查看异议不予受理
  {
    path: 'objectionNotAcceptanceDetail',
    name: 'ObjectionNotAcceptanceDetailFlow',
    component: () => import('@/views/bidding/bidClarification/tenderObjection/viewObjection/objectionNotAcceptance-detail')
  }

]

/* 审批投诉异议*/
export const AuditObjection = [
  // 审核项目经理受理/不受理-异议投诉审核列表
  {
    path: 'auditRecordObjectionList',
    meta: { path: 'auditRecordObjectionList' },
    component: () => import('@/views/bidding/bidClarification/tenderObjection/objectionAudit/auditRecordObjection-list')
  },
  // 审核项目经理受理/不受理-审核异议投诉
  {
    path: 'auditRecordObjectionContent',
    name: 'AuditRecordObjection',
    meta: { path: 'auditRecordObjectionList' },
    component: () => import('@/views/bidding/bidClarification/tenderObjection/objectionAudit/auditRecordObjectionContent')
  },
  // 审核供应商/风险控制审核列表
  {
    path: 'auditObjectionList',
    component: () => import('@/views/bidding/bidClarification/tenderObjection/objectionAudit/auditObjection-list')
  },
  // 审核供应商/风险控制审核列表
  {
    path: 'auditObjectionContent',
    name: 'AuditObjection',
    meta: { path: 'auditObjectionList' },
    component: () => import('@/views/bidding/bidClarification/tenderObjection/objectionAudit/auditObjectionContent')
  }
]
export default [...Objection, ...AuditObjection, ...ObjectionFlow]
