@extends('admin.layout')

@section('content')

<?php
    if(!isset($data)) $data = array();
    if(!$data && session("data")){
        $data = session("data");
    }
    if(!$data && session('_old_input')){
        $data = session("_old_input");
    }
?>
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>单据管理1</h5>
					<div class="ibox-tools">
						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
						</a>
					</div>
				</div>
				<div class="ibox-content">
                    @if(role('Medical/Order/index'))
				    <div class="row">
    					<div class="col-sm-3 pull-right">
    					   <a href="{{ U('Medical/Order/index')}}" class="btn btn-sm btn-primary pull-right">返回列表</a>
    					</div>
					</div>
                    @endif

		            <div class="row">
                        <div class="col-lg-10">
                            <form name="form_product" id="form-validation" action="" class="form-horizontal form-validation" accept-charset="UTF-8" method="post">

                                    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">客户电话号</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_mobile" name="data[mobile]" class="form-control" value="{{ $data['mobile'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">受检者姓名</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_name" name="data[name]" class="form-control" value="{{ $data['name'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">民族</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_nationality" name="data[nationality]" class="form-control" value="{{ $data['nationality'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">性别</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_sex" name="data[sex]" class="form-control" value="{{ $data['sex'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">电子邮件地址</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_email" name="data[email]" class="form-control" value="{{ $data['email'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">籍贯</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_native_place" name="data[native_place]" class="form-control" value="{{ $data['native_place'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">职业</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_work" name="data[work]" class="form-control" value="{{ $data['work'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">通讯地址</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_address" name="data[address]" class="form-control" value="{{ $data['address'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">样本类型</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_sample_type" name="data[sample_type]" class="form-control" value="{{ $data['sample_type'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    

                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">总价</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_total_price" name="data[total_price]" class="form-control" value="{{ $data['total_price'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">条形码</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_code" name="data[code]" class="form-control" value="{{ $data['code'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">备注</label>
                                    
                   <div class="col-sm-9">
                       {!! editor('local') !!}
                       <script id="container" name="data[comment]" type="text/plain">
                           {!! $data['comment'] or '' !!}
                       </script>
                    </div>
                                
                </div>

                                <div class="form-group">

                                    <label class="control-label col-sm-3">PDF上传</label>
                                    <div class="col-sm-9">
                                        {{--{!!  widget('Tools.ImgUpload')->single2('/upload/attr','attr',"attr",  isset($data['attr'])? $data['attr'] : '',array("sizex"=>1920,"sizey"=>1080)) !!}--}}
                                        {!!  widget('Tools.FileUpload')->single('/upload/pdf','pdf',"data[pdf]",  isset($data['pdf'])? $data['pdf'] : '') !!}
                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="control-label col-sm-3">&nbsp;</label>
                                    <div class="col-sm-9">
                                        <input type="hidden" name="_referer" value="<?php echo urlencode(request()->server('HTTP_REFERER'));?>"/>
                                        <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"/>
                                        <input type="submit" class="btn btn-success" style="margin-right:20px;">
                                        <input type="reset" class="btn btn-default" >
                                    </div>
                                </div>
        
                            </form>
                        </div>
                        <!-- /.col-lg-10 -->
                    </div>
                    <!-- /.row -->
				</div>
			</div>
		</div>
	</div>

@endsection