<template>
	<view>
		<view class="">
			<view class="list" :style="[{height:pageHeight+'px'}]">
				<zb-table :show-header="true" :columns="column" :stripe="true" :fit="false" :border="true"
					:data="List" :height="pageHeight+'px'"></zb-table>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapGetters,
		mapActions
	} from 'vuex'
	export default {
		data() {
			return {
				column: [{
						name: 'plate_number',
						label: '车牌号',
						fixed: true,
						align: 'center'
					},
					{
						name: 'seq',
						label: '名次',
						align: 'center'
					},
					{
						name: 'product',
						label: '物料',
						align: 'center'
					},
					{
						name: 'partner',
						label: '客户/供应商',
						align: 'center'
					},
					{
						name: 'wait_time',
						label: '排队时间',
						align: 'center'
					}
				],
				List:[],
				partner:'',
				product:'',
				plate_number:''
			}
		},
		onLoad(option) {
			this.getlist()
		},
		computed: {
			...mapGetters(['screenHeight', 'customTabBarHeight', 'naviStatusHeight']),
			pageHeight() {
				return this.screenHeight - this.naviStatusHeight
			},
		},
		methods: {
			getlist(){
				let that=this
				uni.showLoading({
					
				})
				wx.request({
					url: 'http://ykykt.newerp.rokedata.com/ykt/kanban/appointment',
					method: "POST",
					data: {
						
					},
					success(res) {
						console.log('appointment_state', res)
						if (res.data.result.state=='success') {
							that.List=res.data.result.data
							uni.hideLoading()
						} else {
							uni.hideLoading()
							wx.showModal({
								title: '提示',
								content: res.data.result.msg,
								showCancel: false
							})
						}
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.search{
		background-color: #fff;
		display: flex;
		width: 100%;
	}
	.li{
		width: 100%;
		padding: 10rpx 10rpx;
	}
</style>