{% load i18n %}
<style>
    form div.lbl{
        margin-top:8px;
    }
     
</style>

<script type="text/javascript">
    $(document).ready(function(){
        $('#confirm-url-modal .btn-confirm').click(function(){    
            var me=$(this);
            $(me).hide();
            $.ajax({
                url: '{{request.path}}',
                type:'POST',
                dataType: "json",
                data: {
                    "id":$('#obj_id').val(),
                    "qc_name":$('#qc_name').val(),
                    "passed":$('#passed').val(),
                    "remark":$('#remark').val()                       
                },
                success: function(data) {
                    $(me).show();
                    $('#confirm-url-modal').modal('hide');  
                    $.RefreshContent('/mes/list/mat_qc/');
                }
            });
        });        
    });
</script>

<form class="form-horizontal">
    <input type='hidden' id='obj_id' value='{{obj.id}}' />
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '入库日期:' %} </label>
        <div class="col-sm-10 lbl">{{ obj.dt }}</div>
    </div>    
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '原材料名称:' %} </label>
        <div class="col-sm-10 lbl">{{ obj.materials.name }}</div>
    </div>   
    
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '生产批次:' %} </label>
        <div class="col-sm-10 lbl">{{ obj.batch_no }}</div>
    </div>       
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '数量:' %} </label>
        <div class="col-sm-10 lbl">{{ obj.qty }}{{obj.unit.name}}</div>
    </div>

    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '质检员:' %} </label>
        <div class="col-sm-10"><input class='form-control' id='qc_name' /></div>
    </div>
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '检验结果:' %} </label>
        <div class="col-sm-10"><select class='form-control' id='passed'>
            <option value='1'>合格</option>
            <option value='0'>不合格</option>
        </select></div>
    </div>
    
    <div class="form-group ">
        <label class="col-sm-2 control-label ">{% trans '备注说明:' %} </label>
        <div class="col-sm-10"><input class='form-control' id='remark'></input></div>
    </div>   
</form>   

