<template>
	<view class="zd_container">
		<nav-bar :inner2="true" @goIn="goIn" title="木箱明细"></nav-bar>
		<view class="zd_content">
			<view class="zd_wrapper grid-wraper">
				<view class="slide_new">
					<table>
						<thead>
							<tr>
								<th>木箱号</th>
								<th>子卷号</th>
								<th>sap批次</th>
								<th>净重</th>
								<th>状态</th>
								<th>订单号</th>
								<th>客户编码</th>
								<th>客户名称</th>
								<th>幅宽</th>
								<th>厚度</th>
								<th>长度</th>
								<th>客户要求幅宽</th>
								<th>物料标准厚度</th>
								<th>保质期</th>
								<th>制造完成日期</th>
								<th>入库日期</th>
							</tr>
						</thead>
						<tbody>
							<tr v-for="(el, i) in dataList" :key="i">
								<td>{{el.package_box_sn}}</td>
								<td>{{el.container_name}}</td>
								<td>{{el.sap_pcsn}}</td>
								<td>{{el.net_weight}}</td>
								<td>{{el.status}}</td>
								<td>{{el.sale_order_name}}</td>
								<td>{{el.customer_name}}</td>
								<td>{{el.customer_description}}</td>
								<td>{{el.width}}</td>
								<td>{{el.thickness}}</td>
								<td>{{el.length}}</td>
								<td>{{el.width_standard}}</td>
								<td>{{el.thickness_request}}</td>
								<td>{{el.quality_guaran_period}}</td>
								<td>{{el.date_of_production}}</td>
								<td>{{el.date_of_fg_inbound}}</td>
							</tr>
						</tbody>
					</table>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import NavBar from '@/components/NavBar.vue'
	import {stivtbBoxDtlQuery} from '@/utils/getData1.js'
	export default {
		components: {
			NavBar,
		},
		data() {
			return {
				boxno: '',
				billCode: '',
				dataList: [],
				disabled1: false
			};
		},
		onLoad (option) {
			this.boxno = option.boxno
			this.billCode = option.billcode
			this._stivtbBoxDtlQuery()
		},
		methods: {
			goIn () {
				uni.navigateTo({
					url: '/pages/WarehouseManage/ProdDeliveryConfirm?billcode=' + this.billCode
				})
			},
			/** 初始化查询 */
			async _stivtbBoxDtlQuery () {
				let res = await stivtbBoxDtlQuery(this.boxno)
				this.dataList = [...res.data]
			}
		}
	}
</script>

<style lang="stylus">
	.zd_content
		padding-bottom 77rpx
	.slide_new table td:nth-child(1), .slide_new table th:nth-child(1)
		box-shadow 1px 0 2px rgba(0,0,0,.12)
	.bgyellow td
		background-color #E9B451
</style>
