<template>
	<view>				 
		<uni-list>
			<uni-list-item v-if="listData.mainEntity">
				<view slot="body" class="slot-box">
					<view class="row">
						<view class="column-left">领料编号：</view>
						<view class="column-right">{{listData.mainEntity.materialOutCode}}</view>
					</view>
					<view class="row">
						<view class="column-left">状态：</view>
						<view class="column-right">{{listData.mainEntity.statusName}}</view>
					</view>
					<view class="row">
						<view class="column-left">领料类型：</view>
						<view class="column-right">{{listData.mainEntity.groupName}}</view>
					</view>
					<view class="row">
						<view class="column-left">调拨人：</view>
						<view class="column-right">{{listData.mainEntity.outPersonName}}</view>
					</view>
					<view class="row">
						<view class="column-left">领料日期：</view>
						<view class="column-right">{{listData.mainEntity.outDate}}</view>
					</view>
					<view class="row">
						<view class="column-left">工程合同：</view>
						<view class="column-right">{{listData.mainEntity.contractName}}</view>
					</view>
					<view class="row">
						<view class="column-left">施工单位：</view>
						<view class="column-right">{{listData.mainEntity.supplierName}}</view>
					</view>
					
					<view class="row">
						<view class="column-left">制单人：</view>
						<view class="column-right">{{listData.mainEntity.inputPersonName}}</view>
					</view>
					<view class="row">
						<view class="column-left">制单日期：</view>
						<view class="column-right">{{listData.mainEntity.inputDate}}</view>
					</view>
					<view class="row">
						<view class="column-left">审核人：</view>
						<view class="column-right">{{listData.mainEntity.checkPersonName}}</view>
					</view>
					<view class="row">
						<view class="column-left">审核日期：</view>
						<view class="column-right">{{listData.mainEntity.checkDate}}</view>
					</view>
				</view>
			</uni-list-item>
		</uni-list>
		 
		
		<uni-section title="领料明细"  type="line"></uni-section>
		<uni-list>
			<uni-list-item v-if="listData.subList"  v-for="(item, index) in listData.subList"  :key="index">
				<view slot="body" class="slot-box">
					<view class="row">
						<view class="column-left">材料名称：</view>
						<view class="column-right">{{item.materialName}}</view>
					</view>
					<view class="row">
						<view class="column-left">规格：</view>
						<view class="column-right">{{item.spec}}</view>
					</view>
					<view class="row">
						<view class="column-left">单位：</view>
						<view class="column-right">{{item.unit}}</view>
					</view>
					<view class="row">
						<view class="column-left">领用数量：</view>
						<view class="column-right">{{item.outQty}}</view>
					</view>
					<view class="row">
						<view class="column-left">领用单价：</view>
						<view class="column-right">{{item.outPrice}}</view>
					</view>
					<view class="row">
						<view class="column-left">领用总价：</view>
						<view class="column-right">{{item.outCash}}</view>
					</view>
					<view class="row">
						<view class="column-left">材料计划单：</view>
						<view class="column-right">{{item.materialBudgetName}}</view>
					</view>
					<view class="row">
						<view class="column-left">入库单号：</view>
						<view class="column-right">{{item.materialInID}}</view>
					</view>
					
				</view>
			</uni-list-item>
		</uni-list>
	</view>
</template>

<script>
	import {
		 GetMaterialOutDetail
	} from "@/common/api/MaterialInOut.js";
	export default {
		data() {
			return {
				listData: [],
				isShow:false
			}
		},
		onLoad() {
			//console.info("当前登录状态:" + this.$store.state.isLogin);
			//console.info(this);
			this.$util.persistLogin(this);
		},
		created: function() {
			this.getDetail(this.$util.getQuery("id"));
		},
		methods: {
			getDetail(id) {
				let that = this;
				GetMaterialOutDetail(id).then((res) => {
					console.info('GetMaterialOutDetail',res);
					that.listData=res;
					 
					//console.info(that.listData);
				});
			},
			 
		}
	}
</script>

<style>
  /deep/ .uni-section__content-title{
	  font-size:15px;
	  font-weight: 600;
  }
  
 /deep/ .uni-list-item{
	  background-color: #f8f8f8;
  }
  .slot-box{
	  background-color: #fff;
	  padding: 5px 8px;
  }
</style>
