<template>
	<view class="homePage" :style="'height:' + screenHeight + 'px;'">
		<view class="title">广州市宝绅科技应用</view>
		<view class="lines"></view>
		<view class="boxs">
			<uni-section v-for="(item, index) in tableData" :key="index" :title="item.title" type="line">
				<u-row gutter="10">
					<u-col v-for="(v, i) in item.list" :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>
								<text>{{ v.text }}</text>
							</view>
						</navigator>
					</u-col>
				</u-row>
			</uni-section>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			screenHeight: 0,
			src: require('@/static/images/cgrk.png'),
			tableData: [
				{
					title: '仓库扫描作业',
					list: [
						{
							src: require('@/static/images/cgrk.png'),
							text: '采购入库',
							url: '/pages/purchaseStorage/purchaseStorage'
						},
						{
							src: require('@/static/images/cgrk.png'),
							text: '采购下架',
							url: '/pages/purchase/purchaseRemove'
						},
						{
							src: require('@/static/images/fclyk.png'),
							text: '仓位调拨',
							url: '/pages/positionTansfer/positionTansfer'
						},
						{
							src: require('@/static/images/kglrk.png'),
							text: '完工入库',
							url: '/pages/confirComplete/confirComplete'
						},
						{
							src: require('@/static/images/qtck.png'),
							text: '库存盘点',
							url: '/pages/inventoryCounting/inventoryCounting'
						},
						{
							src: require('@/static/images/scfl.png'),
							text: '生产发料',
							url: '/pages/productionIssuance/productionIssuance'
						},
						{
							src: require('@/static/images/xsth.png'),
							text: '销售退货',
							url: '/pages/salesReturns/salesReturns'
						},
						{
							src: require('@/static/images/sctl.png'),
							text: '生产退料',
							url: '/pages/produceReturn/produceReturn'
						},
						{
							src: require('@/static/images/wwfl.png'),
							text: '委外发料',
							url: '/pages/outsourcedMaterial/outsourcedMaterial'
						},
						{
							src: require('@/static/images/wwfl.png'),
							text: '委外退料',
							url: '/pages/outsourcedReturn/outsourcedReturn'
						},
						{
							src: require('@/static/images/xsck.png'),
							text: '销售拣货',
							url: '/pages/salesOutbound/salesOutbound'
						},
						{
							src: require('@/static/images/xsck.png'),
							text: '装箱',
							url: '/pages/packing/packing'
						},
						{
							src: require('@/static/images/xsck.png'),
							text: '发货过账',
							url: '/pages/posting/posting'
						},
						{
							src: require('@/static/images/xsck.png'),
							text: '反冲料移库',
							url: '/pages/recoil/recoilMaterial'
						},
					]
				}
			]
		};
	},
	created() {
		this.screenHeight = uni.getSystemInfoSync().screenHeight;
	},
	methods: {
		handleClick(v) {
			uni.nav;
		}
	}
};
</script>

<style lang="scss" scoped>
.homePage {
	background: #fff;
	.title {
		background: #fff;
		padding-top: 20rpx;
		height: 60rpx;
		font-size: 28rpx;
		line-height: 40rpx;
		padding-left: 32rpx;
		font-weight: 600;
	}
	.lines {
		height: 32rpx;
		background: #f8f8f8;
	}
}

.demo-layout {
	height: 164rpx;
	border-radius: 4px;
	margin-bottom: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text {
		margin-top: 24rpx;
		font-size: 24rpx;
		color: #000;
	}
}
</style>
