<!-- 底部导航栏：仓库 -->
<template>
	<view class="content">
		<uni-card v-for="(item, index) in menuList" :key="item.id" :title="item.title" :isFull="true"
			class="custom-card">
			<view v-for="value in item.menuItem" :key="value.id" class="card_items" @click="value.click">
				<uv-image :src="value.icon" width="40rpx" height="40rpx" style="margin-top:10rpx" />
				<p> {{ value.title }} </p>
			</view>
		</uni-card>
	</view>
</template>

<script setup>
import { onShow } from '@dcloudio/uni-app';
import { removeStorage } from '../until';
const menuList = [
	{
		id: 'inventory',
		title: '库存信息',
		menuItem: [
			{
				id: "inventory_uniqueCodeInventory",
				icon: '../../static/warehousing/uniqueCodeInventory.png',
				title: '唯一码盘点',
				click: () => {
					console.log('唯一码盘点')
				}
			},
			{
				id: "inventory_ inventoryAgeQuery",
				icon: '../../static/warehousing/inventoryAgeQuery.png',
				title: '库龄查看',
				click: () => {
					console.log('库龄查看')
				}
			},
			{
				id: "inventory_inventoryWarning",
				icon: '../../static/warehousing/inventoryWarning.png',
				title: '库存预警',
				click: () => {
					console.log('库存预警')

				}
			},
		]
	},
	{
		id: 'report',
		title: '报表',
		menuItem: [
			{
				id: "report_inventoryDailyReport",
				icon: '../../static/report/inventoryDailyReport.png',
				title: '库存日报',
				click: () => {
					console.log('库存日报')
				}
			},
			{
				id: "report_ inventoryMonthlyReport",
				icon: '../../static/report/inventoryMonthlyReport.png',
				title: '库存月报',
				click: () => {
					console.log('库存月报')
				}
			},
			{
				id: "report_companyInventoryReport",
				icon: '../../static/report/companyInventoryReport.png',
				title: '公司库存报表',
				click: () => {
					console.log('公司库存报表')

				}
			},
			{
				id: "report_ warehouseInventoryReport",
				icon: '../../static/report/warehouseInventoryReport.png',
				title: '仓库库存报表',
				click: () => {
					console.log('仓库库存报表')

				}
			},
		]
	},
	{
		id: 'declarationForm',
		title: '申报单',
		menuItem: [
			{
				id: "declarationForm_materialsQuery",
				icon: '../../static/declarationForm/materialsQuery.png',
				title: '物资查询',
				click: () => {
					console.log('物资查询')
				}
			},
			{
				id: "declarationForm_createDeclarationForm",
				icon: '../../static/declarationForm/createDeclarationForm.png',
				title: '申报单开单',
				click: () => {
					console.log('申报单开单')
				}
			},
			{
				id: "declarationForm_myDeclarationForms",
				icon: '../../static/declarationForm/myDeclarationForms.png',
				title: '我的申报单',
				click: () => {
					console.log('我的申报单')

				}
			},
		]
	},
	{
		id: 'warehousingReceipt',
		title: '入库单',
		menuItem: [
			{
				id: "warehousingReceipt_stockInCreateOrder",
				icon: '../../static/stockInOrOut/stockInCreateOrder.png',
				title: '入库单开单',
				click: () => {
					removeStorage()
					console.log('入库单开单')
					uni.navigateTo({
						url: '/pages/warehousing/stockIn/create'
					});
				}
			},
			{
				id: "warehousingReceipt_myWarehousingReceipt",
				icon: '../../static/stockInOrOut/myWarehousingReceipt.png',
				title: '我的入库单',
				click: () => {
					console.log('我的入库单')
					removeStorage()
					uni.navigateTo({
						url: '/pages/warehousing/stockIn/my'
					});
				}
			},
			{
				id: "warehousingReceipt_stockIn",
				icon: '../../static/stockInOrOut/stockIn.png',
				title: '入库单入库',
				click: () => {
					console.log('入库单入库')
					uni.navigateTo({
						url: '/pages/warehousing/stockIn/putaway'
					});

				}
			},
		]
	},
	{
		id: 'outboundOrder',
		title: '出库单',
		menuItem: [
			{
				id: "outboundOrder_stockOutCreateOrder",
				icon: '../../static/stockInOrOut/stockOutCreateOrder.png',
				title: '出库单开单',
				click: () => {
					console.log('出库单开单')
					removeStorage()
					uni.navigateTo({
						url: '/pages/warehousing/stockOut/create'
					});
				}
			},
			{
				id: "outboundOrder_myOutboundOrder",
				icon: '../../static/stockInOrOut/myOutboundOrder.png',
				title: '我的出库单',
				click: () => {
					console.log('我的出库单')
					removeStorage()
					uni.navigateTo({
						url: '/pages/warehousing/stockOut/my'
					});
				}
			},
			{
				id: "outboundOrder_stockOut",
				icon: '../../static/stockInOrOut/stockOut.png',
				title: '出库单出库',
				click: () => {
					console.log('出库单出库')
					removeStorage()
					uni.navigateTo({
						url: '/pages/warehousing/stockOut/outbound'
					});

				}
			},
		]
	},
	{
		id: 'uniqueCode',
		title: '唯一码',
		menuItem: [
			{
				id: "uniqueCode_issueUniqueCode",
				icon: '../../static/uniqueCode/issueUniqueCode.png',
				title: '唯一码发放',
				click: () => {
					console.log('唯一码发放')
					uni.removeStorage('app_material')
					uni.navigateTo({
						url: '/pages/warehousing/uniqueCode/issueUniqueCode/index'
					});
				}
			},
			{
				id: "uniqueCode_myUniqueCode",
				icon: '../../static/uniqueCode/myUniqueCode.png',
				title: '唯一码',
				click: () => {
					console.log('唯一码')
					uni.navigateTo({
						url: '/pages/warehousing/uniqueCode/myUniqueCode/index'
					});
				}
			},
			{
				id: "uniqueCode_bindRFID",
				icon: '../../static/uniqueCode/bindRFID.png',
				title: '绑定RFID',
				click: () => {
					console.log('绑定RFID')

				}
			},
		]
	},
	{
		id: 'transportCheckIn',
		title: '运输打卡',
		menuItem: [
			{
				id: "transportCheckIn_transportCheckIn",
				icon: '../../static/transportCheckIn/transportCheckIn.png',
				title: '运输打卡',
				click: () => {
					console.log('运输打卡')
				}
			},
			{
				id: "transportCheckIn_myTransportCheckIn",
				icon: '../../static/transportCheckIn/myTransportCheckIn.png',
				title: '我的运输打卡',
				click: () => {
					console.log('我的运输打卡')
				}
			},
		]
	},
]
onShow(() => {
	uni.removeStorage({
		key: 'app_material',
		success: (result) => { },
		fail: (error) => { }
	})
})
</script>

<style scoped lang="scss">
::v-deep .custom-card.uni-card {
	margin-bottom: 6rpx !important;
	border-color: #F8F8FF !important;
	box-shadow: none !important;

	.uni-card__header {
		padding: 10rpx;

		.uni-card__header-box {
			.uni-card__header-content-title {
				font-weight: 800;
				font-size: 14px;

			}
		}
	}

	.uni-card__content {
		display: flex;
		align-items: center;
		justify-content: flex-start;
	}

	.card_items {
		width: 25%;
		display: flex;
		flex-direction: column;
		align-items: center;

		p {
			margin-top: 10rpx;
			font-size: 12px;
			color: #1b1b1b;
			;
		}
	}
}
</style>
