<template>
	<view class="homePage" :style="'height:' + screenHeight + 'px;'">
		<NavBar :title="$t('希迈条码系统')" left="" right="person"  @clickRight="jumpUser"></NavBar>
		<view class="boxs">
			<u-row gutter="10">
				<u-col v-for="(v, i) in tableData" :key="i" span="3">
					<navigator :url="v.url" open-type="navigate">
						<view class="demo-layout">
							<u-image :src="v.src" width="100rpx" height="100rpx"></u-image>
							<view style="height: 50rpx">{{ v.text }}</view>
						</view>
					</navigator>
				</u-col>
			</u-row>
		</view>
	</view>
</template>

<script>
import i18n from '../../lang/index'

	export default {
		data() {
			return {
				screenHeight: 0,
				tableData: [{
							src: require('@/static/images/print.png'),
							text: i18n.t('到货条码打印'),
							url: '/pages/abnormal/abnormalRemove'
						},
						{
							src: require('@/static/images/check.png'),
							text: i18n.t('到货检验'),
							url: '/pages/forcheck/forcheckMain'
						},
						{
							src: require('@/static/images/keyin.png'),
							text: i18n.t('录入进货单'),
							url: '/pages/forcreate/Main'
						},
						// {
						// 	src: require('@/static/images/print.png'),
						// 	text: i18n.t('委外进货打印标签'),
						// 	url: '/pages/forprint/Main'
						// },
						// {
						// 	src: require('@/static/images/check.png'),
						// 	text: i18n.t('委外检验'),
						// 	url: '/pages/mocthforcheck/Main'
						// },
						// {
						// 	src: require('@/static/images/takeup.png'),
						// 	text: i18n.t('委外扫码上架'),
						// 	url: '/pages/mocthgetforputon/Main'
						// },
						{
							src: require('@/static/images/keyin.png'),
							text: i18n.t('录入领料单'),
							url: '/pages/moctcforcreate/Main'
						},
						{
							src: require('@/static/images/keyin.png'),
							text: i18n.t('录入入库单'),
							url: '/pages/forstorage/Main'
						},
						{
							src: require('@/static/images/infor.png'),
							text: i18n.t('品号信息'),
							url: '/pages/invmbinfo/Main'
						},
						{
							src: require('@/static/images/keyin.png'),
							text: i18n.t('采购到货'),
							url: '/pages/dhd/Main'
						},
						{
							src: require('@/static/images/item.png'),
							text: i18n.t('销售出库'),
							url: '/pages/saleck/Main'
						},
						{
							src: require('@/static/images/keyin.png'),
							text: i18n.t('库存调拨'),
							url: '/pages/stockTransfer/index'
						},
						{
							src: require('@/static/images/keyin.png'),
							text: i18n.t('库存盘点'),
							url: '/pages/stockCheck/index'
						}
					]
			};
		},
		computed: {
			factoryCode: {
				get() {
					return this.vuex_user_factory || 1000
				},
				set(e) {
					this.$u.vuex('vuex_user_factory', e)
				}
			}
		},
		created() {
			this.screenHeight = uni.getSystemInfoSync().screenHeight;
		},
		methods: {
			jumpUser() {
				uni.navigateTo({
					url: '/pages/sys/user/user'
				});
			},
			factoryChange(e) {
				console.log(e, 'factoryChange')
			},
		}
	};
</script>

<style lang="scss" scoped>
	.homePage {
		background: #fff;

		.title {
			background: #fff;
			padding: 20rpx 32rpx;
			font-size: 28rpx;
			line-height: 40rpx;
			font-weight: 600;
			display: flex;
			flex-direction: row;
			align-items: center;
		}

		.lines {
			height: 32rpx;
			background: #f8f8f8;
		}
	}

	.demo-layout {
		height: 164rpx;
		border-radius: 4px;
		margin-bottom: 50px;
		display: flex;
		flex-direction: column;
		align-items: center;

		text {
			margin-top: 24rpx;
			font-size: 24rpx;
			color: #000;
		}
	}
	.boxs {
		padding-top: 50rpx;
	}
</style>
