<template>
	<view class="check">
		<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.houseName}} 
				</view>
				<view class="">
					发起时间：<span>{{i.taskRunMinTime}}</span>
				</view>
				<view class="">
					待盘点物料：{{i.notRecordNum}} <span style="color: #F59A23;margin-left: 40rpx;" >待盘点</span>
				</view>
			</view>
			<view class="fr">
				<uni-icons type="forward" color="#0066CC"  size="30"></uni-icons>
			</view>
		</view>
		<view class="commons-no-data" v-if="listData.length == 0">
			已经没有数据了。。
		</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/record/getList',v.req).then(res=>{
					
					for (var i = 0; i < res.data.length; i++) {
						// res.data[i].taskRunMinTime = dateFormat(res.data[i].taskRunMinTime)
						
					}
					v.listData = res.data
				})
			},
			toRouter(id){
				const v = this
				console.log(id)
				uni.navigateTo({
					url: '/pages/Inventory/InventoryDtl?id=' + id
				})
			},
		},
	}
</script>

<style lang="less">
	.check{
		.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>
