<template>
	<view>
		<view class="upper-search">
			<h4>合肥市机具设备分公司</h4>
			<uni-easyinput prefixIcon="search" v-model="iptVal" placeholder="搜索" @iconClick="iconClick"></uni-easyinput>
		</view>
		<h4 class="tit">业务办理</h4>
		<view class="secs">
			<view @click="jumpUrl('fetchMaterial')">
				<image src="/static/getMaterial.png" mode=""></image>
				<span>领料申请</span>
			</view>
			<view @click="jumpUrl('exitMaterial')">
				<image src="/static/exitMaterial.png" mode=""></image>
				<span>退料申请</span>
			</view>
			<!-- <view @click="toast">
				<image src="/static/getWorkMaterial.png" mode=""></image>
				<span>工器具领料申请</span>
			</view>
			<view @click="toast">
				<image src="/static/exitWorkMaterial.png" mode=""></image>
				<span>工器具退料申请</span>
			</view> -->
		</view>
		<h4 class="tit">移动办公</h4>
		<view class="secs">
			<view @click="jumpUrl('fetchExam')">
				<image src="/static/s-llsp.png" mode=""></image>
				<span>领料审批</span>
			</view>
			<view @click="jumpUrl('exitExam')">
				<image src="/static/s-tlsp.png" mode=""></image>
				<span>退料审批</span>
			</view>
			<view @click="jumpUrl('newInStore')">
				<image src="/static/s-xgrk.png" mode=""></image>
				<span>新购入库</span>
			</view>
			<view @click="jumpUrl('backMaterialInStore')">
				<image src="/static/s-tlrk.png" mode=""></image>
				<span>退料入库</span>
			</view>
			<view @click="jumpUrl('repairTestInStore')">
				<image src="/static/s-xsrk.png" mode=""></image>
				<span>修试入库</span>
			</view>
			<view @click="jumpUrl('fetchMaterialOutStore')">
				<image src="/static/s-llck.png" mode=""></image>
				<span>领料出库</span>
			</view>
			<view @click="jumpUrl('backMaterialReceive')">
				<image src="/static/s-tljs.png" mode=""></image>
				<span>退料接收</span>
			</view>
			<view @click="jumpUrl('fix')">
				<image src="/static/s-wx.png" mode=""></image>
				<span>维修</span>
			</view>
			<view @click="jumpUrl('crashExam')">
				<image src="/static/s-bfsh.png" mode=""></image>
				<span>报废审核</span>
			</view>
			<view @click="jumpUrl('testExam')">
				<image src="/static/s-syjy.png" mode=""></image>
				<span>试验检验审核</span>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				iptVal: ''
			}
		},
		methods: {
			iconClick () {
				console.log(this.iptVal);
			},
			jumpUrl (path) {
				uni.navigateTo({
					url: `/pages/${path}/${path}`
				})
			},
			toast () {
				uni.showToast({
					icon: 'none',
					title: '敬请期待！'
				})
			}
		}
	}
</script>

<style lang="scss">
	body{
		background: url('/static/workspace-bgd.png');
		background-repeat: no-repeat;
		background-size: 100% 100%;
	}
	.upper-search{
		width: 85%;
		margin: 5vh auto;
		color: #fff;
		h4{
			margin-bottom: 1vh;
		}
	}
	.tit{
		width: 85%;
		margin: 4vh auto;
		margin-bottom: 2vh;
	}
	.secs{
		width: 90%;
		margin: 0 auto;
		display: flex;
		flex-wrap: wrap;
		view{
			width: 25%;
			display: flex;
			flex-direction: column;
			align-items: center;
			margin-bottom: 2vh;
			image{
				width: 50%;
				height: 6vh;
				margin-bottom: 10rpx;
			}
			span{
				font-size: 20rpx;
			}
		}
	}
</style>
