<template>
	<view>
		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="备品备件详情" @clickLeft="back">
		</uni-nav-bar>
		<view style="padding-bottom: 110rpx;" v-if="'worksheetInfo'">
			<uni-collapse ref="collapse">
				<uni-collapse-item :open="(worksheetInfo && worksheetInfo.status.id == '99') ? false : true" :typeOpen="1" title="基本信息">
					<view class="bg">
						<CellInfo label="来源单号" :value="'OUT662615458256'"></CellInfo>
						<CellInfo label="领取人" :value="'张三'"></CellInfo>
						<CellInfo label="领取时间" :value="'2022-01-02 09:00:00'"></CellInfo>
					</view>
				</uni-collapse-item>
			</uni-collapse>
			<!-- 选择归还区域 -->
			<template>
				<CellTip title="选择归还区域"> </CellTip>
				<Cell cellType="more" title="选择仓库">
					<view class="cell-list-more" slot="more" >
						<text>仓库一</text>
						<uni-icons type="right" size="18" color="#ccc"></uni-icons>
					</view>
				</Cell>
				<Cell cellType="more" title="选择库区">
					<view class="cell-list-more" slot="more" >
						<text>仓库一</text>
						<uni-icons type="right" size="18" color="#ccc"></uni-icons>
					</view>
				</Cell>
			</template>
			<!-- 选择备品备件 -->

			<uni-collapse ref="collapse">
				<uni-collapse-item :open="false" :typeOpen="1" title="申请的备品备件">
					
				</uni-collapse-item>
			</uni-collapse>
			<uni-collapse ref="collapse">
				<uni-collapse-item :open="false" :typeOpen="1" title="已使用的备品备件">
					
					<view class="btn-main-box">
						<view class="btn btn-primary" @click="goSparepart('1')">
							选择
						</view>
					</view>

				</uni-collapse-item>
			</uni-collapse>
			
		</view>
		<view class="footer-btn">
			<view class="btns btns-first">
				已用完，无需归还
			</view>
			<view class="btns">
				归还
			</view>
		</view>
	</view>
</template>

<script>
	import Cell from '@/components/Cell.vue'
	import CellTip from '@/components/CellTip.vue'
	import CellInfo from '@/components/CellInfo.vue'
	import OrderDeatil from '../components/OrderDeatil.vue'
	export default {
		components: {
			Cell,
			OrderDeatil,
			CellTip,
			CellInfo
		},
		data() {
			return {
				worksheetInfo: null
			}
		},
		methods: {
			goSparepart(id) {
				uni.navigateTo({
					url: '../sparepart/sparepart?id=' + id
				})
			},
			
		}
	}
</script>

<style lang="scss" scoped>
	.btn-main-box {
		padding: 20rpx 0;

		.btn-primary {
			margin: 20rpx auto;
			width: 80rpx;
			text-align: center;
		}
	}
</style>
