<script>


$(function () {

	$('#indocputllist').datagrid({
		title: '上架单明细',
		url : '<?php echo $url?>in/docput/get_docputlist/'+<?=$id?>,		
		fitColumns : true,
		striped : true,
		rownumbers : true,
		border : false,
		toolbar : '#indocputllist_tool',
        singleSelect:true,  
        fitColumns: false,       
		columns : [[
			{
				field : 'goods_id',
				title : '自动编号',
				width : 100,
				checkbox : true,
			},
			{
				field : 'goods_name',
				title : '货品名称',
				width : 200,
			},
			{
				field : 'goods_code',
				title : '货品编号',
				width : 150,
			},
			{
				field : 'goods_unit',
				title : '基本单位',
				width : 100,
			},
			{
				field : 'goods_status',
				title : '货品状态',
				width : 100,
			},
			{
				field : 'goods_nums',
				title : '货品数量',
				width : 100,
			},
			{
				field : 'goods_postil',
				title : '批注',
				width : 100,
			},
			{
				field : 'area_id',
				title : '库区',
				width : 100,
				formatter: function(value,row,index){
			        <?php foreach ($area as $key=>$value): ?>               
					if (row.area_id==<?= $value->area_id?>){
						return '<?=$value->area_name?>';
					} 		        
		        <?php endforeach; ?>         						
				}					
			},
			{
				field : 'position_id',
				title : '储位',
				width : 150,
				formatter: function(value,row,index){
			        <?php foreach ($position as $key=>$value): ?>               
					if (row.position_id==<?= $value->position_id?>){
						return '<?=$value->position_name?>';
					} 		        
		        <?php endforeach; ?>         						
				}			
			}									
		]]
	});


	
});



</script>

<div id="indocputlhead" class="easyui-panel" title="上架单头" border="false" style="background:#f4f4f4;width:100%;height:210px;padding:5px;">
   <form id="docputl_edit" style="margin:0;padding:5px 0 0 25px;color:#333;">
        <p>上架单号：<input  disabled="true"  value="<?=$docputhead['docput_number']?>" type="text" class="textbox" style="width:200px;" ></p>
        <p>入库单号：<input  disabled="true"  value="<?=$docputhead['docin_number']?>" type="text" class="textbox" style="width:200px;" ></p>
    	<p>送货单号：<input  disabled="true"  value="<?=$docputhead['docin_send_number']?>" type="text"  class="textbox" style="width:200px;"></p>
    </form>
</div>

<table id="indocputllist"></table>

