<template>
	<view style="padding: 20rpx;">
		<scroll-view :scroll-y="true" class="page">
			<view class="cu-list menu card-menu margin-top">
				<view class="cu-item" style="margin-top: 10rpx;" v-for="(item, index) in reportData">
					<view class="content" @click="showReport2(item,rcvDate)">
						<view class="cu-form-group">
							<view class="title" style="min-width: calc(6em + 15px);">制衣生产车间</view>
							<text class="text-grey" style="flex: 1;">{{ item.filing.workshop.zyProductWorkshop }}</text>
						</view>
						<view class="cu-form-group">
							<view class="title" style="min-width: calc(6em + 15px);">制衣班组</view>
							<text class="text-grey" style="flex: 1;">{{ item.filing.team.zyTeam }}</text>
						</view>
						<view class="cu-form-group">
							<view class="title" style="min-width: calc(6em + 15px);">订单号</view>
							<text class="text-grey" style="flex: 1;">{{ item.filing.orderNo }}</text>
						</view>
						<view class="cu-form-group">
							<view class="title" style="min-width: calc(6em + 15px);" >时间</view>
							<text class="text-grey" style="flex: 1;">{{rcvDate}}</text>
						</view>
						<view class="cu-form-group">
							<view class="title" style="min-width: calc(6em + 15px);" >数量</view>
							<text class="text-grey" style="flex: 1;">{{ item.rcvCount }}</text>
						</view>
					</view>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
import { show } from '@/api/biz/report.js';
export default {
	data() {
		return {
			reportData: [],
			rcvDate:''
		};
	},
	onLoad(option) {
		const reportInfo = JSON.parse(decodeURIComponent(option.reportInfo));
		console.log(reportInfo.rcvDate);
		this.rcvDate = reportInfo.rcvDate;
		show(reportInfo.rcvDate).then(res => {
			if (res.success) {
				this.reportData = res.data;
			}
		});
		// this.formData.orderInfo = orderInfo
		// console.log(this.formData.orderInfo)
		// this.getWorkshop();
	},
	methods: {
		showReport2(item,rcvDate) {
			// console.log("item=========="+item);
			// console.log("rcvDate=========="+rcvDate);
			// console.log("filingid" + item.filing.id);
			uni.navigateTo({
				url: '/pages/report/show2?filing_id='+item.filing.id+'&rcvDate='+this.rcvDate
			})
		},
	}
};
</script>

<style></style>
