import Vue from 'vue'
import Router from 'vue-router'
import index from '@/page/index'
import layout from '@/page/Layout/layout.vue'
//财务报表
import financialStatement from './financialStatement'
//业务报表
import bordereaux from './bordereaux'
//保管报表
import keepStatements from './keepStatements'
//应急报表
import emergencyReport from './emergencyReport'
//仓储业务统计表
import warehousing from './warehousing'
//最低最高库存量核定汇总表
import inventory from './inventory'
//监督检查报表
import jdjcbb from './jdjcbb'
//粮库上报数据采集
import grainDepotReport from '@/page/bordereaux/grainDepotReport'

//调节储备审核
import adjustingReserves from '@/page/adjustingReserves/index'
import adjustingReservesDetail from '@/page/adjustingReserves/detail'
import ReservesDetailYear from '@/page/adjustingReserves/detailYear'
//调节储备报表汇总
import reportDataSummary from '@/page/reportDataSummary/index'
import reportDataSummaryDetail from '@/page/reportDataSummary/detail'
import detailYear from '@/page/reportDataSummary/detailYear'
import detailDistribution from '@/page/reportDataSummary/detailDistribution'
// 交易报表
import dealStatistical from "@/page/statisticalReport/dealStatistical/index.vue";
import dealStatisticalDetails from "@/page/statisticalReport/dealStatistical/details.vue";
import commissionStatistical from "@/page/statisticalReport/commissionStatistical/index.vue";
import commissionStatisticalDetail from "@/page/statisticalReport/commissionStatistical/details.vue";
import transactionSummary from "@/page/statisticalReport/transactionSummary/index.vue";
import transactionStatisticsSummary from "@/page/statisticalReport/transactionStatisticsSummary/index.vue";
import registrationStatus from "@/page/statisticalReport/registrationStatus/index.vue";
//进销存补贴
import storageFee from '@/page/purchaseSubsidy/storageFee/receive/index'
import storageFeeDetail from '@/page/purchaseSubsidy/storageFee/receive/detail'
import storageFeebtDetail from '@/page/purchaseSubsidy/storageFee/receive/btDetail'
import storageFeeSummary from '@/page/purchaseSubsidy/storageFee/Summary/index'
import storageFeeSummaryDetail from '@/page/purchaseSubsidy/storageFee/Summary/detail'
import storageFeeSummarybtDetail from '@/page/purchaseSubsidy/storageFee/Summary/btDetail'
import receive from '@/page/purchaseSubsidy/adjustingReserves/receive/index'
import ARreceiveDetail from '@/page/purchaseSubsidy/adjustingReserves/receive/detail'
import ARreceivebtDetail from '@/page/purchaseSubsidy/adjustingReserves/receive/btDetail'
import arSummary from '@/page/purchaseSubsidy/adjustingReserves/Summary/index'
import arSummaryDetail from '@/page/purchaseSubsidy/adjustingReserves/Summary/detail'
import arSummarybtDetail from '@/page/purchaseSubsidy/adjustingReserves/Summary/btDetail'
//轮换包干补贴
import bglhbtIndex from '@/page/bglhbt/index.vue'
import bglhbtDetail from '@/page/bglhbt/detail.vue'
import ysbtsummaryIndex from '@/page/bglhbtSummary/ysbtsummary/index'
import ysbtsummaryysDetail from '@/page/bglhbtSummary/ysbtsummary/ysDetail'
import qsbtsummaryIndex from '@/page/bglhbtSummary/qsbtsummary/index'
import qsbtsummaryDetail from '@/page/bglhbtSummary/qsbtsummary/qsDetail'

//倒仓移库补贴
import reverseSubsidyIndex from '@/page/reverseSubsidy/index.vue'
import reverseSubsidyDetail from '@/page/reverseSubsidy/detail.vue'
import reverseSubsidyYketail from '@/page/reverseSubsidy/ykdetail.vue'
//储备规模报表
import escalationIndex from '@/page/reserveScaleReport/escalation/index.vue'
import escalationDetail from '@/page/reserveScaleReport/escalation/detail.vue'
import receiveIndex from '@/page/reserveScaleReport/receive/index.vue'
import receiveDetail from '@/page/reserveScaleReport/receive/detail.vue'
import summaryIndex from '@/page/reserveScaleReport/summary/index.vue'
import summaryDetail from '@/page/reserveScaleReport/summary/detail.vue'
//非调节储备报表---市级储备粮油报表
import reportDataReview from '@/page/unregulatedReserves/reportDataReview/index'
import reportDataReviewDetail from '@/page/unregulatedReserves/reportDataReview/detail'
import reportDataReviewDetailYear from '@/page/unregulatedReserves/reportDataReview/detailYear'
//非调节储备报表汇总
import reportSummary from '@/page/unregulatedReserves/reportSummary/index'
import reportSummaryDetail from '@/page/unregulatedReserves/reportSummary/detail'
import RsummarydetailYear from '@/page/unregulatedReserves/reportSummary/detailYear'
import RsdetailDistribution from '@/page/unregulatedReserves/reportSummary/detailDistribution'

//大米月报
import riceReceiveIndex from '@/page/riceMonthReport/receive/index'
import riceReceiveDetail from '@/page/riceMonthReport/receive/detail'
import riceSummaryIndex from '@/page/riceMonthReport/Summary/index'
import riceSummaryDetail from '@/page/riceMonthReport/Summary/detail'
//按生产年份汇总统计表
import productionYearIndex from '@/page/productionYear/index'
import productionYearDetail from '@/page/productionYear/detail'

Vue.use(Router)

export default new Router({
	// mode:'history',
	routes: [{
		// 业务报表
		path: '/ywbb',
		name: 'index',
		component: index,
		children: [{
			path: '/ywbb',
			name: 'layout',
			component: layout,
			children: [
				financialStatement, bordereaux, keepStatements, emergencyReport, warehousing, inventory, jdjcbb,
				{
					path: '/ywbb/grainDepotReport',
					name: 'grainDepotReport',
					component: grainDepotReport,
					meta: {
						title: '粮库上报数据采集'
					}
				},
				{
					path: '/ywbb/adjustingReserves/index',
					name: 'adjustingReserves',
					component: {
						render(c) {
							return c('router-view')
						}
					},
					// component: adjustingReserves,
					meta: {
						title: '调节储备报表'
					},
					children: [
						{
							path: '/ywbb/adjustingReserves/index',
							name: 'adjustingReserves',
							meta: {
								title: '报表数据审核列表'
							},
							component: adjustingReserves
						}, 
						{
							path: '/ywbb/adjustingReserves/detail',
							name: 'adjustingReservesDetail',
							meta: {
								title: '市级储备粮进销存表'
							},
							component: adjustingReservesDetail
						},
						{
							path: '/ywbb/adjustingReserves/detailYear',
							name: 'ReservesDetailYear',
							meta: {
								title: '市级储备粮库存年份表'
							},
							component: ReservesDetailYear
						},
						{
							path: '/ywbb/reportDataSummary/index',
							name: 'reportDataSummary',
							meta: {
								title: '调节储备报表汇总'
							},
							component: reportDataSummary
						},
						{
							path: '/ywbb/reportDataSummary/detail',
							name: 'reportDataSummaryDetail',
							meta: {
								title: '进销存表详情'
							},
							component: reportDataSummaryDetail
						},
						{
							path: '/ywbb/reportDataSummary/detailYear',
							name: 'detailYear',
							meta: {
								title: '库存年限表详情'
							},
							component: detailYear
						},
						{
							path: '/ywbb/reportDataSummary/detailDistribution',
							name: 'detailDistribution',
							meta: {
								title: '库存分布表详情'
							},
							component: detailDistribution
						},

					]
				},
				{
					path: "/statisticalReport",
					name: "statisticalReport",
					meta: {
						title: "交易中心统计报表",
					},
					component: {
						render(c) {
							return c("router-view");
						},
					},
					children: [{
							path: "/ywbb/statisticalReport/dealStatistical/index",
							name: "dealStatistical",
							meta: {
								title: "市级储备成交统计表",
							},
							component: dealStatistical,
						},
						{
							path: "/ywbb/statisticalReport/dealStatistical/details",
							name: "dealStatisticalDetails",
							meta: {
								title: "成交统计表",
							},
							component: dealStatisticalDetails,
						},
						{
							path: "/ywbb/statisticalReport/commissionStatistical/index",
							name: "commissionStatistical",
							meta: {
								title: "手续费统计表",
							},
							component: commissionStatistical,
						},
						{
							path: "/ywbb/statisticalReport/commissionStatistical/details",
							name: "commissionStatisticalDetail",
							meta: {
								title: "手续费统计表详情",
							},
							component: commissionStatisticalDetail,
						},
						{
							path: "/ywbb/statisticalReport/transactionSummary/index",
							name: "transactionSummary",
							meta: {
								title: "交易结果汇总表",
							},
							component: transactionSummary,
						},
						{
							path:"/ywbb/statisticalReport/transactionStatisticsSummary/index",
							name: "transactionStatisticsSummary",
							meta: {
								title: "交易统计汇总表",
							},
							component: transactionStatisticsSummary,
						},
						{
							path: "/ywbb/registrationStatus/index",
							name: "registrationStatus",
							meta: {
								title: "报名情况统计表",
							},
							component: registrationStatus,
							children:[]
						},
					],
				},
				{
					path: '/purchaseSubsidy',
					name: 'purchaseSubsidy',
					component: {
						render(c) {
							return c('router-view')
						}
					},
					// component: adjustingReserves,
					meta: {
						title: '进销存补贴报表'
					},
					children: [
						{
							path: '/storageFee',
							name: 'storageFee',
							component: {
								render(c) {
									return c('router-view')
								}
							},
							// component: adjustingReserves,
							meta: {
								title: '储存费补贴报表'
							},
							children: [
								{
									path: '/ywbb/purchaseSubsidy/storageFee/receive/index',
									name: 'storageFee',
									meta: {
										title: '储存费补贴接收'
									},
									component: storageFee
								}, {
									path: '/ywbb/purchaseSubsidy/storageFee/receive/detail',
									name: 'storageFeeDetail',
									meta: {
										title: '储存费补贴接收详情'
									},
									component: storageFeeDetail
								},{
									path: '/ywbb/purchaseSubsidy/storageFee/receive/btDetail',
									name: 'storageFeebtDetail',
									meta: {
										title: '储存费补贴接收详情'
									},
									component: storageFeebtDetail
								},
								{
									path: '/ywbb/purchaseSubsidy/storageFee/Summary/index',
									name: 'storageFeeSummary',
									meta: {
										title: '储存费补贴汇总'
									},
									component: storageFeeSummary
								},
								{
									path: '/ywbb/purchaseSubsidy/storageFee/Summary/detail',
									name: 'storageFeeSummaryDetail',
									meta: {
										title: '储存费补贴汇总'
									},
									component: storageFeeSummaryDetail
								},
								{
									path: '/ywbb/purchaseSubsidy/storageFee/Summary/btDetail',
									name: 'storageFeeSummarybtDetail',
									meta: {
										title: '储存费补贴汇总'
									},
									component: storageFeeSummarybtDetail
								}
							],
						},
						{
							path: '/adjustingReservesbb',
							name: 'adjustingReservesbb',
							component: {
								render(c) {
									return c('router-view')
								}
							},
							// component: adjustingReserves,
							meta: {
								title: '调节储备补贴报表'
							},
							children: [
								{
									path: '/ywbb/purchaseSubsidy/adjustingReserves/receive/index',
									name: 'receive',
									meta: {
										title: '调节储备补贴'
									},
									component: receive
								}, {
									path: '/ywbb/purchaseSubsidy/adjustingReserves/receive/detail',
									name: 'ARreceiveDetail',
									meta: {
										title: '调节储备补贴接收详情'
									},
									component: ARreceiveDetail
								},{
									path: '/ywbb/purchaseSubsidy/adjustingReserves/receive/btDetail',
									name: 'ARreceivebtDetail',
									meta: {
										title: '调节储备补贴接收详情'
									},
									component: ARreceivebtDetail
								},
								{
									path: '/ywbb/purchaseSubsidy/adjustingReserves/Summary/index',
									name: 'arSummary',
									meta: {
										title: '调节储备补贴汇总'
									},
									component: arSummary
								},
								{
									path: '/ywbb/purchaseSubsidy/adjustingReserves/Summary/detail',
									name: 'arSummaryDetail',
									meta: {
										title: '调节储备补贴汇总'
									},
									component: arSummaryDetail
								},
								{
									path: '/ywbb/purchaseSubsidy/adjustingReserves/Summary/btDetail',
									name: 'arSummarybtDetail',
									meta: {
										title: '调节储备补贴汇总'
									},
									component: arSummarybtDetail
								}
							]
						}
						
					],
					
				},
				{
					//轮换计划执行
					path: "/ywbb/bglhbt",
					name: "bglhbt",
					meta: {
						title: "轮换包干补贴",
					},
					component: {
						render(c) {
							return c("router-view");
						},
					},
					children: [
						{
							path: '/ywbb/bglhbt/index',
							name: 'bglhbtIndex',
							meta: {
								title: '轮换包干补贴'
							},
							component: bglhbtIndex
						},
						{
							path: '/ywbb/bglhbt/detail',
							name: 'bglhbtDetail',
							meta: {
								title: '轮换包干补贴详情'
							},
							component: bglhbtDetail
						},
						{
							path: '/ywbb/bglhbtSummary/ysbtsummary/index',
							name: 'ysbtsummaryIndex',
							meta: {
								title: '轮换包干预算审批'
							},
							component: ysbtsummaryIndex
						},
						{
							path: '/ywbb/bglhbtSummary/ysbtsummary/ysDetail',
							name: 'ysbtsummaryysDetail',
							meta: {
								title: '轮换包干预算审批详情'
							},
							component: ysbtsummaryysDetail
						},
						{
							path: '/ywbb/bglhbtSummary/qsbtsummaryIndex/index',
							name: 'qsbtsummaryIndex',
							meta: {
								title: '轮换包干清算审批'
							},
							component: qsbtsummaryIndex
						},
						{
							path: '/ywbb/bglhbtSummary/qsbtsummaryIndex/qsDetail',
							name: 'qsbtsummaryDetail',
							meta: {
								title: '轮换包干清算审批详情'
							},
							component: qsbtsummaryDetail
						}
						
					],
				},
				{
					path: "/reverseSubsidy",
					name: "reverseSubsidy",
					meta: {
						title: "倒仓移库补贴",
					},
					component: {
						render(c) {
							return c("router-view");
						},
					},
					children: [
						{
							path: '/ywbb/reverseSubsidy/index',
							name: 'reverseSubsidyIndex',
							meta: {
								title: '倒仓移库补贴列表'
							},
							component: reverseSubsidyIndex
						},
						{
							path: '/ywbb/reverseSubsidy/detail',
							name: 'reverseSubsidyDetail',
							meta: {
								title: '倒仓补贴审批详情'
							},
							component: reverseSubsidyDetail
						},
						{
							path: '/ywbb/reverseSubsidy/detail',
							name: 'reverseSubsidyYketail',
							meta: {
								title: '移库补贴审批详情'
							},
							component: reverseSubsidyYketail
						},
					],
				},
				{
					path: "/reserveScaleReport",
					name: "reserveScaleReport",
					meta: {
						title: "储备规模报表",
					},
					component: {
						render(c) {
							return c("router-view");
						},
					},
					children: [
						{
							path: '/ywbb/escalation/index',
							name: 'escalationIndex',
							meta: {
								title: '储备规模报表上报列表'
							},
							component: escalationIndex
						},
						{
							path: '/ywbb/escalation/detail',
							name: 'escalationDetail',
							meta: {
								title: '储备规模报表上报详情'
							},
							component: escalationDetail
						},
						{
							path: '/ywbb/receive/index',
							name: 'receiveIndex',
							meta: {
								title: '储备规模接收列表'
							},
							component: receiveIndex
						},
						{
							path: '/ywbb/receive/detail',
							name: 'receiveDetail',
							meta: {
								title: '储备规模列表详情'
							},
							component: receiveDetail
						},
						{
							path: '/ywbb/summary/index',
							name: 'summaryIndex',
							meta: {
								title: '储备规模汇总列表'
							},
							component: summaryIndex
						},
						{
							path: '/ywbb/summary/detail',
							name: 'summaryDetail',
							meta: {
								title: '储备规模汇总详情'
							},
							component: summaryDetail
						}
					],
				},
				//非调节储备报表---市级储备粮油报表
				{
					path: '/ywbb/reportDataReview/index',
					name: 'reportDataReview',
					component: {
						render(c) {
							return c('router-view')
						}
					},
					// component: adjustingReserves,
					meta: {
						title: '市级储备粮油报表'
					},
					children: [
						{
							path: '/ywbb/reportDataReview/index',
							name: 'reportDataReview',
							meta: {
								title: '非调节储备报表接收'
							},
							component: reportDataReview
						}, 
						{
							path: '/ywbb/reportDataReview/detail',
							name: 'reportDataReviewDetail',
							meta: {
								title: '市级储备粮进销存表'
							},
							component: reportDataReviewDetail
						},
						{
							path: '/ywbb/reportDataReview/detailYear',
							name: 'reportDataReviewDetailYear',
							meta: {
								title: '市级储备粮油库存年份表'
							},
							component: reportDataReviewDetailYear
						},
						{
							path: '/ywbb/reportSummary/index',
							name: 'reportSummary',
							meta: {
								title: '市级储备粮油报表汇总'
							},
							component: reportSummary
						},
						{
							path: '/ywbb/reportSummary/detail',
							name: 'reportSummaryDetail',
							meta: {
								title: '进销存表详情'
							},
							component: reportSummaryDetail
						},
						{
							path: '/ywbb/reportSummary/detailYear',
							name: 'RsummarydetailYear',
							meta: {
								title: '库存年限表详情'
							},
							component: RsummarydetailYear
						},
						{
							path: '/ywbb/reportSummary/detailDistribution',
							name: 'RsdetailDistribution',
							meta: {
								title: '库存分布表详情'
							},
							component: RsdetailDistribution
						},
				
					]
				},
				{
					path: '/ywbb/riceMonthReport/receive/index',
					name: 'riceReceiveIndex',
					component: {
						render(c) {
							return c('router-view')
						}
					},
					// component: adjustingReserves,
					meta: {
						title: '大米月报报表'
					},
					children: [
						{
							path: '/ywbb/riceMonthReport/receive/index',
							name: 'riceReceiveIndex',
							meta: {
								title: '大米月报接收'
							},
							component: riceReceiveIndex
						}, 
						{
							path: '/ywbb/reportDataReview/receive/detail',
							name: 'riceReceiveDetail',
							meta: {
								title: '大米月报接收详情'
							},
							component: riceReceiveDetail
						},
						{
							path: '/ywbb/riceMonthReport/Summary/index',
							name: 'riceSummaryIndex',
							meta: {
								title: '大米月报汇总'
							},
							component: riceSummaryIndex
						}, 
						{
							path: '/ywbb/reportDataReview/Summary/detail',
							name: 'riceSummaryDetail',
							meta: {
								title: '大米月报汇总详情'
							},
							component: riceSummaryDetail
						}
					]
				},
				{
					path: 'ywbb/productionYear/index',
					name:'productionYearIndex',
					component:{
						render(c) {
							return c('router-view')
						}
					},
					meta:{
						title:'按生产年份汇总统计表'
					},
					children:[
						{
							path: '/ywbb/productionYear/index',
							name: 'productionYearIndex',
							meta: {
								title: '按生产年份汇总统计表列表'
							},
							component: productionYearIndex
						}, 
						{
							path: '/ywbb/productionYear/detail',
							name: 'productionYearDetail',
							meta: {
								title: '按生产年份汇总统计表详情'
							},
							component: productionYearDetail
						}
					]
				}
			]
		}]
	}, ]
})