<template>
	<view>
		<u-navbar :is-back="false" title="WMS PDA" :background="background" />
		<scroll-view scroll-y class="page">
			<view class="nav-list">
				<u-row class="mt-10">
					<navigator hover-class="none" :url="'/pages/material/features/' + item.name" class="nav-li"
						navigateTo :class="'bg-'+item.color" 
						v-for="item in elements">
						<view class="nav-title">{{item.title}}</view>
						<view class="nav-name">{{item.name}}</view>
						<text :class="'cuIcon-' + item.cuIcon"></text>
					</navigator>
				</u-row>
			</view>
		</scroll-view>
		<u-gap height="70"></u-gap>
	</view>
</template>

<script>
	import store from '../../store/index.js'
	export default {
		created() {

		},
		mounted() {

		},
		data() {
			return {
				title: '物料仓库主界面',
				background: {
					backgroundImage: 'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))'
				},
				//要展示的数组元素
				elements: [
					{
						title: 'PO入库',
						name: 'PoStockIn',
						color: 'red',
						cuIcon: 'backwardfill',
						label: 'PO入库'
					},
					{
						title: '采购退料',
						name: 'PurReturnPage',
						color: 'pink',
						cuIcon: 'deliver',
						label: '采购退料'
					},
					
					{
						title: '生产领料',
						name: 'ProducePickPage',
						color: 'red',
						cuIcon: 'backwardfill',
						label: '生产领料'				
					},
					{
						title: '其他出库',
						name: 'OtherPickPage',
						color: 'cyan',
						cuIcon: 'backwardfill',
						label: '其他出库'												
					},
					{
						title: '生产退料',
						name: 'ProduceReturnPage',
						color: 'blue',
						cuIcon: 'down',
						label: '生产退料'
					},
					{
						title: '简单生产退料',
						name: 'SimpleReturnPage',
						color: 'mauve',
						cuIcon: 'edit',
						label: '简单生产退料'
					},
					{
						title: '其他出库退货',
						name: 'OtherReturnPage',
						color: 'green',
						cuIcon: 'exit',
						label: '其他出库退货'
					},
					{
						title: '调拨',
						name: 'TransferPage',
						color: 'yellow',
						cuIcon: 'backwardfill',
						label: '调拨'						
					},
					{
						title: '储位移动',
						name: 'LocationRemove',
						color: 'mauve',
						cuIcon: 'backwardfill',
						label: '储位移动'
					},
					{
						title: 'ERP库位移动',
						name: 'ErpLocationRemove',
						color: 'mauve',
						cuIcon: 'backwardfill',
						label: 'ERP库位移动'
					},
					{
						title: '新条码入库',
						name: 'InitialInstockPage',
						color: 'pink',
						cuIcon: 'backwardfill',
						label: '新条码入库'
					},
					{
						title: '拆分',
						name: 'SplitBoxPage',
						color: 'pink',
						cuIcon: 'backwardfill',
						label: '拆分'
					},
					{
						title: '合并BOX',
						name: 'MergeBoxPage',
						color: 'pink',
						cuIcon: 'backwardfill',
						label: '合并BOX'
					},
					{
						title: '跨组织收料',
						name: 'AcrossOrgReceivePage',
						color: 'red',
						cuIcon: 'backwardfill',
						label: '跨组织收料' 
					},
					{
						title: 'IQC质检',
						name: 'IQCPage',
						color: 'mauve',
						cuIcon: 'backwardfill',
						label: 'IQC质检' 
					},
					{
						title: '材损退料入库',
						name: 'MaterialStockIn',
						color: 'mauve',
						cuIcon: 'backwardfill',
						label: '材损退料入库' 
					},
					{
						title: '预留退料入库',
						name: 'ShipStockInMDC',
						color: 'pink',
						cuIcon: 'backwardfill',
						label: '预留退料入库' 
					},
					{
						title: 'PMS退库入库',
						name: 'PmsReturnStockInPage',
						color: 'cyan',
						cuIcon: 'backwardfill',
						label: 'PMS退库入库' 
					},
					{
					
						title: '配送单出库拣配',
						name: 'StockOutToMODForBOX',
						color: 'red',
						cuIcon: 'backwardfill',
						label: '配送单出库拣配' 
					},
					{
						title: 'PMS报废出库',
						name: 'StockOutPMS',
						color: 'cyan',
						cuIcon: 'backwardfill',
						label: 'PMS报废出库' 
					},
					{
						title: '财务报废入无价值工厂',
						name: 'ScrapPickPage',
						color: 'cyan',
						cuIcon: 'backwardfill',
						label: '财务报废入无价值工厂' 
					},
					{
						title: '实物报废出库',
						name: 'ScrapOutPickPage',
						color: 'cyan',
						cuIcon: 'backwardfill',
						label: '实物报废出库' 
					},
					{
						title: '调拨出库',
						name: 'TransferOutPickPage',
						color: 'cyan',
						cuIcon: 'backwardfill',
						label: '调拨出库' 
					},
					{
						title: '调拨入库',
						name: 'TransferStockIn',
						color: 'cyan',
						cuIcon: 'backwardfill',
						label: '调拨入库' 
					},
					{
						title: '预留出库',
						name: 'MaterialOutPickPage',
						color: 'cyan',
						cuIcon: 'backwardfill',
						label: '预留出库' 
					},
					{
						title: '素玻璃PO入库',
						name: 'GlassPoStockIn',
						color: 'cyan',
						cuIcon: 'backwardfill',
						label: '素玻璃PO入库' 
					},
					{
						title: 'OEM收货',
						name: 'OEMPoStockIn',
						color: 'cyan',
						cuIcon: 'backwardfill',
						label: 'OEM收货' 
					}
					
				],
			}
		},
		computed: {
			tabbar() {
				return store.vuex_tabbar
			}
		},
	}
</script>

<style lang="scss" scoped>
	.demo-layout {
		height: 80rpx;
		border-radius: 8rpx;
	}

	.bg-purple {
		background: #d3dce6;
	}

	.mt-10 {
		margin-top: 10px;
	}

	.nav-li {
		padding: 30upx;
		border-radius: 12upx;
		width: 45%;
		margin: 0 2.5% 40upx;
		background-image: url('../../static/img/background.png');
		background-size: cover;
		background-position: center;
		position: relative;
		z-index: 1;
	}

	.nav-li::after {
		content: "";
		position: absolute;
		z-index: -1;
		background-color: inherit;
		width: 100%;
		height: 100%;
		left: 0;
		bottom: -10%;
		border-radius: 10upx;
		opacity: 0.2;
		transform: scale(0.9, 0.9);
	}

	.nav-li.cur {
		color: #fff;
		background: rgb(94, 185, 94);
		box-shadow: 4upx 4upx 6upx rgba(94, 185, 94, 0.4);
	}

	.nav-title {
		font-size: 32upx;
		font-weight: 300;
	}

	.nav-title::first-letter {
		font-size: 40upx;
		margin-right: 4upx;
	}

	.nav-name {
		font-size: 28upx;
		text-transform: Capitalize;
		margin-top: 20upx;
		position: relative;
	}

	.nav-name::before {
		content: "";
		position: absolute;
		display: block;
		width: 40upx;
		height: 6upx;
		background: #fff;
		bottom: 0;
		right: 0;
		opacity: 0.5;
	}

	.nav-name::after {
		content: "";
		position: absolute;
		display: block;
		width: 100upx;
		height: 1px;
		background: #fff;
		bottom: 0;
		right: 40upx;
		opacity: 0.3;
	}

	.nav-name::first-letter {
		font-weight: bold;
		font-size: 36upx;
		margin-right: 1px;
	}

	.nav-li text {
		position: absolute;
		right: 30upx;
		top: 30upx;
		font-size: 52upx;
		width: 60upx;
		height: 60upx;
		text-align: center;
		line-height: 60upx;
	}

	.text-light {
		font-weight: 300;
	}

	@keyframes show {
		0% {
			transform: translateY(-50px);
		}

		60% {
			transform: translateY(40upx);
		}

		100% {
			transform: translateY(0px);
		}
	}

	@-webkit-keyframes show {
		0% {
			transform: translateY(-50px);
		}

		60% {
			transform: translateY(40upx);
		}

		100% {
			transform: translateY(0px);
		}
	}
</style>
