<template>
<view>
	<view class="detail_wraper" :class="show ? 'detailshow' : 'detailhide'" >
		<view class="allwidth">
			<view v-if="data.type === 1 || data.type === 3 || data.type === 4" class="allwidth font1">{{data.data.djbh}}</view>
			<table v-if="data.type === 1" class="detail_table">
				<tr>
					<td>单据ID</td>
					<td>{{data.data.djid}}</td>
				</tr>
				<tr>
					<td>审核结果</td>
					<td>{{data.data.shjg}}</td>
				</tr>
				<tr>
					<td>来源部门</td>
					<td>{{data.data.bmmc}}</td>
				</tr>
				<tr>
					<td>去向部门</td>
					<td>{{data.data.zzmc}}</td>
				</tr>
				<tr>
					<td>仓库名称</td>
					<td>{{data.data.ckmc}}</td>
				</tr>
				<tr>
					<td>状态</td>
					<td>{{data.data.djzt}}</td>
				</tr>
				<tr>
					<td>制单日期</td>
					<td>{{data.data.cjsj}}</td>
				</tr>
				<tr>
					<td>制单人</td>
					<td>{{data.data.cjr}}</td>
				</tr>
				<tr>
					<td>业务日期</td>
					<td>{{data.data.ywrq}}</td>
				</tr>
				<tr>
					<td>操作人</td>
					<td>{{data.data.update_name}}</td>
				</tr>
				<tr>
					<td>操作日期</td>
					<td>{{data.data.update_time}}</td>
				</tr>
				<tr>
					<td>备注</td>
					<td>{{data.data.remark}}</td>
				</tr>
				<tr>
					<td>修改人工号</td>
					<td>{{data.data.update_id}}</td>
				</tr>
				<tr>
					<td>修改人姓名</td>
					<td>{{data.data.update_name}}</td>
				</tr>
				<tr>
					<td>修改时间</td>
					<td>{{data.data.update_time}}</td>
				</tr>
			</table>
			<table v-if="data.type === 2" class="detail_table">
				<tr>
					<td>单据ID</td>
					<td>{{data.data.djid}}</td>
				</tr>
				<tr>
					<td>分录ID</td>
					<td>{{data.data.flid}}</td>
				</tr>
				<tr>
					<td>仓库名称</td>
					<td>{{data.data.ckmc}}</td>
				</tr>
				<tr>
					<td>物料编号</td>
					<td>{{data.data.wlbm}}</td>
				</tr>
				<tr>
					<td>物料名称</td>
					<td>{{data.data.wlmc}}</td>
				</tr>
				<tr>
					<td>规格型号</td>
					<td>{{data.data.ggxh}}</td>
				</tr>
				<tr>
					<td>单位</td>
					<td>{{data.data.jldw}}</td>
				</tr>
				<tr>
					<td>数量</td>
					<td>{{data.data.sl}}</td>
				</tr>
				<tr>
					<td>{{crType === 'IN'? '已入数量':'已出数量'}}</td>
					<td>{{data.data.czsl}}</td>
				</tr>
				<tr>
					<td>剩余数量</td>
					<td>{{data.data.sysl}}</td>
				</tr>
				<tr>
					<td>已分配数量</td>
					<td>{{data.data.assign_qty}}</td>
				</tr>
				<tr>
					<td>库存</td>
					<td>{{data.data.kcsl}}</td>
				</tr>
				<tr>
					<td>操作人</td>
					<td>{{data.data.update_name}}</td>
				</tr>
				<tr>
					<td>操作日期</td>
					<td>{{data.data.update_time}}</td>
				</tr>
				
				<tr>
					<td>备注</td>
					<td>{{data.data.remark}}</td>
				</tr>
			</table>
			<table v-if="data.type === 3" class="detail_table">
				<tr>
					<td>单据ID</td>
					<td>{{data.data.djid}}</td>
				</tr>
				<tr>
					<td>审核结果</td>
					<td>{{data.data.shjg}}</td>
				</tr>
				<tr>
					<td>业务类型</td>
					<td>{{data.data.ywlx}}</td>
				</tr>
				<tr>
					<td>业务日期</td>
					<td>{{data.data.ywrq}}</td>
				</tr>
				<tr>
					<td>调出库存组织编码</td>
					<td>{{data.data.dckcbm}}</td>
				</tr>
				<tr>
					<td>调出库存组织名称</td>
					<td>{{data.data.dckcmc}}</td>
				</tr>
				<tr>
					<td>调入库存组织编码</td>
					<td>{{data.data.drkcbm}}</td>
				</tr>
				<tr>
					<td>调入库存组织名称</td>
					<td>{{data.data.drkcmc}}</td>
				</tr>
				<tr>
					<td>调出部门</td>
					<td>{{data.data.dcbm}}</td>
				</tr>
				<tr>
					<td>调入部门</td>
					<td>{{data.data.drbm}}</td>
				</tr>
				<tr>
					<td>表头备注</td>
					<td>{{data.data.btbz}}</td>
				</tr>
				<tr>
					<td>制单时间</td>
					<td>{{data.data.cjsj}}</td>
				</tr>
				<tr>
					<td>创建人</td>
					<td>{{data.data.cjr}}</td>
				</tr>
				<tr>
					<td>单据状态</td>
					<td>{{data.data.djzt}}</td>
				</tr>
				<tr>
					<td>分录ID</td>
					<td>{{data.data.flid}}</td>
				</tr>
				<tr>
					<td>分录序号</td>
					<td>{{data.data.flxh}}</td>
				</tr>
				<tr>
					<td>物料编码</td>
					<td>{{data.data.wlbm}}</td>
				</tr>
				<tr>
					<td>物料名称</td>
					<td>{{data.data.wlmc}}</td>
				</tr>
				<tr>
					<td>规格型号</td>
					<td>{{data.data.ggxh}}</td>
				</tr>
				<tr>
					<td>批次</td>
					<td>{{data.data.pc}}</td>
				</tr>
				<tr>
					<td>辅助属性</td>
					<td>{{data.data.fzsx}}</td>
				</tr>
				<tr>
					<td>计量单位</td>
					<td>{{data.data.jldw}}</td>
				</tr>
				<tr>
					<td>基本计量单位</td>
					<td>{{data.data.jbjldw}}</td>
				</tr>
				<tr>
					<td>数量</td>
					<td>{{data.data.sl}}</td>
				</tr>
				<tr>
					<td>基本数量</td>
					<td>{{data.data.jbsl}}</td>
				</tr>
				<tr>
					<td>库存类型</td>
					<td>{{data.data.kclx}}</td>
				</tr>
				<tr>
					<td>库存状态</td>
					<td>{{data.data.kczt}}</td>
				</tr>
				<tr>
					<td>调出仓库编码</td>
					<td>{{data.data.dcckbm}}</td>
				</tr>
				<tr>
					<td>调出仓库名称</td>
					<td>{{data.data.dcckmc}}</td>
				</tr>
				<tr>
					<td>调出库位编码</td>
					<td>{{data.data.dckwbm}}</td>
				</tr>
				<tr>
					<td>调出库位名称</td>
					<td>{{data.data.dckwmc}}</td>
				</tr>
				<tr>
					<td>调入仓库编码</td>
					<td>{{data.data.drckbm}}</td>
				</tr>
				<tr>
					<td>调入仓库名称</td>
					<td>{{data.data.drckmc}}</td>
				</tr>
				<tr>
					<td>调入库位编码</td>
					<td>{{data.data.drkwbm}}</td>
				</tr>
				<tr>
					<td>调入库位名称</td>
					<td>{{data.data.drkwmc}}</td>
				</tr>
				<tr>
					<td>跟踪号</td>
					<td>{{data.data.gzh}}</td>
				</tr>
				<tr>
					<td>计划调入日期</td>
					<td>{{data.data.jhdrrq}}</td>
				</tr>
				<tr>
					<td>计划调出日期</td>
					<td>{{data.data.jhdcrq}}</td>
				</tr>
				<tr>
					<td>分录备注</td>
					<td>{{data.data.flbz}}</td>
				</tr>
				<tr>
					<td>修改人工号</td>
					<td>{{data.data.update_id}}</td>
				</tr>
				<tr>
					<td>修改人姓名</td>
					<td>{{data.data.update_name}}</td>
				</tr>
				<tr>
					<td>修改时间</td>
					<td>{{data.data.update_time}}</td>
				</tr>
			</table>
			<table v-if="data.type === 4" class="detail_table">
				<tr>
					<td>单据ID</td>
					<td>{{data.data.djid}}</td>
				</tr>
				<tr>
					<td>审核结果</td>
					<td>{{data.data.shjg}}</td>
				</tr>
				<tr>
					<td>业务类型</td>
					<td>{{data.data.ywlx}}</td>
				</tr>
				<tr>
					<td>送货日期</td>
					<td>{{data.data.ywrq}}</td>
				</tr>
				<tr>
					<td>提交时间</td>
					<td>{{data.data.tjsj}}</td>
				</tr>
				<tr>
					<td>采购订单号</td>
					<td>{{data.data.cgbh}}</td>
				</tr>
				<tr>
					<td>采购公司</td>
					<td>{{data.data.cggs}}</td>
				</tr>
				<tr>
					<td>物料编码</td>
					<td>{{data.data.wlbm}}</td>
				</tr>
				<tr>
					<td>物科名称</td>
					<td>{{data.data.wlmc}}</td>
				</tr>
				<tr>
					<td>规格型号</td>
					<td>{{data.data.ggxh}}</td>
				</tr>
				<tr>
					<td>单位</td>
					<td>{{data.data.jldw}}</td>
				</tr>
				<tr>
					<td>订单量</td>
					<td>{{data.data.ddsl}}</td>
				</tr>
				<tr>
					<td>本次送货数量</td>
					<td>{{data.data.bcshsl}}</td>
				</tr>
				<tr>
					<td>收货数量</td>
					<td>{{data.data.shsl}}</td>
				</tr>
				<tr>
					<td>件数</td>
					<td>{{data.data.num}}</td>
				</tr>
				<tr>
					<td>是否质检</td>
					<td>{{data.data.sfzj}}</td>
				</tr>
				<tr>
					<td>批次管理</td>
					<td>{{data.data.pcgl}}</td>
				</tr>
				<tr>
					<td>批次</td>
					<td>{{data.data.pc}}</td>
				</tr>
				<tr>
					<td>所属厂区</td>
					<td>{{data.data.sscq}}</td>
				</tr>
				<tr>
					<td>供应商编码</td>
					<td>{{data.data.gysbm}}</td>
				</tr>
				<tr>
					<td>供应商</td>
					<td>{{data.data.gys}}</td>
				</tr>
				<tr>
					<td>到货日期</td>
					<td>{{data.data.dhrq}}</td>
				</tr>
				<tr>
					<td>创建人</td>
					<td>{{data.data.cjr}}</td>
				</tr>
				<tr>
					<td>创建日期</td>
					<td>{{data.data.cjrq}}</td>
				</tr>
				<tr>
					<td>采购员</td>
					<td>{{data.data.cgy}}</td>
				</tr>
				<tr>
					<td>送货人</td>
					<td>{{data.data.shy}}</td>
				</tr>
				<tr>
					<td>收货人</td>
					<td>{{data.data.shr}}</td>
				</tr>
				<tr>
					<td>预计到货日期</td>
					<td>{{data.data.yjdhrq}}</td>
				</tr>
				<tr>
					<td>收货地址</td>
					<td>{{data.data.shdz}}</td>
				</tr>
				<tr>
					<td>包装类别</td>
					<td>{{data.data.bzlb}}</td>
				</tr>
				<tr>
					<td>收货组织编码</td>
					<td>{{data.data.zzbm}}</td>
				</tr>
				<tr>
					<td>收货组织名称</td>
					<td>{{data.data.zzmc}}</td>
				</tr>
				<tr>
					<td>收货仓库名称</td>
					<td>{{data.data.ckmc}}</td>
				</tr>
				<tr>
					<td>收货仓库编码</td>
					<td>{{data.data.ckbm}}</td>
				</tr>
				<tr>
					<td>收货库位编码</td>
					<td>{{data.data.kwbm}}</td>
				</tr>
				<tr>
					<td>收货库位名称</td>
					<td>{{data.data.kwmc}}</td>
				</tr>
				<tr>
					<td>单据状态</td>
					<td>{{data.data.djzt}}</td>
				</tr>
				<tr>
					<td>分录ID</td>
					<td>{{data.data.flid}}</td>
				</tr>
				<tr>
					<td>分录序号</td>
					<td>{{data.data.flxh}}</td>
				</tr>
				<tr>
					<td>备注</td>
					<td>{{data.data.bz}}</td>
				</tr>
				<tr>
					<td>表头备注</td>
					<td>{{data.data.btbz}}</td>
				</tr>
				<tr>
					<td>修改人工号</td>
					<td>{{data.data.update_id}}</td>
				</tr>
				<tr>
					<td>修改人姓名</td>
					<td>{{data.data.update_name}}</td>
				</tr>
				<tr>
					<td>修改时间</td>
					<td>{{data.data.update_time}}</td>
				</tr>
			</table>
		</view>
	</view>
	<view v-show="show" class="modal" @tap="$emit('closeDetail')"></view>
</view>
</template>

<script>
	export default {
		name:"GridDetail",
		data() {
			return {
				
			};
		},
		props: {
			show: Boolean,
			data: Object,
			crType: String
		}
	}
</script>

<style lang="stylus" scoped>
@import '../common/style/mixin.styl';
.detailshow {
	transform: translateX(0);
}
.detailhide {
	transform: translateX(-100%);
}
.detail_wraper
	position fixed
	_wh(40%,100%)
	z-index 101
	top 0
	left 0
	background-color rgba(255,255,255,.95)
	box-shadow 2px 0 4px 0px rgba(1, 27, 46, 90%)
	overflow-y auto
	padding 10px 10px
	transition: all .3s linear;
.modal
	background-color rgba(0,0,0,0.4)
.font1
	font-size: 16px;
	color: #000;
	line-height: 18px;
	margin-bottom: 10px;
	font-family: 'YouSheBiaoTiHei';
.detail_table
	border-collapse: separate;
	border-spacing: 0;
	width 100%
	border-top 1px solid #0490DD
	border-left 1px solid #0490DD
	border-right 1px solid #0490DD
	td
		vertical-align middle
		text-align center
		padding 5px 2px
		border-bottom 1px solid #0490DD
		&:nth-child(1)
			width 32%
			font-size: 12px;
			line-height: 13px;
			color: #333;
			font-weight: bold;
			border-right 1px solid #0490DD
			word-break: break-all;
		&:nth-child(2)
			width 68%
			font-size: 12px;
			line-height: 13px;
			color: #333;
			word-break: break-all;
</style>