<template>
	<view class="overCloth">
		<uni-search-bar @confirm="getData" v-model="req.keyword" @cancel="reload">
		</uni-search-bar>
		
		<view class="addQrcode-list" v-for="(i,index) in listData" :key="index" @click="toRouter(i.id)">
			<view class="fl">
				<view class="" style="color: #aaaaaa;">
					物料编码：{{i.code}} 
				</view>
				<view class="" style="color: #aaaaaa;">
					仓库名称：{{i.houseName}} 
				</view>
				<view class="">
					物料名称：<span>{{i.name}}</span>
				</view>
				<view class="">
					待过布：{{i.notOut}} 
					<span style="color: #0066CC;margin-left: 40rpx;" >过布出库：{{i.alreadyOut}}</span>
					<span style="color: #F59A23;margin-left: 40rpx;" >已过布待归还：{{i.notIn}}</span>
				</view>
			</view>
			<view class="fr">
				<uni-icons type="forward" color="#0066CC"  size="30"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
	import {
	    getInfo
	} from "@/util/api.js";
	import {dateFormat,getTime} from '../../util/uitl.js'
	export default {
		data() {
			return {
				listData:[],
				req:{
					keyword:null,
				}
			}
		},
		onLoad() {
			const v = this
			v.getData()
			
		},
		methods: {
			reload(){
				this.req.keyword = null
				this.getData()
			},
			getData(){
				const v = this
				v.$post('/wx/shrinkHandle/getShrinkHandleList',v.req).then(res=>{
					
					
					v.listData = res.data
				})
			},
			toRouter(id){
				const v = this
				console.log(id)
				uni.navigateTo({
					url: '/pages/Inventory/InventoryDtl?id=' + id
				})
			},
		},
	}
</script>

<style lang="less">
	.overCloth{
		.addQrcode-list {
			height: 100rpx;
			display: flex;
			justify-content: space-between;
			padding: 15rpx;
			border-bottom: 1rpx solid #dcdcdc;
			font-size: 24rpx;
			.fr {
				line-height: 100rpx;
				color: #0066CC;
			}
		}
	}
	
</style>
