<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>配件出库</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body" pad15>
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <form class="layui-form" action="" lay-filter="component-form-element">
                        <div class="layui-upload">
                          <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                            <div class="layui-upload-list" id="show_image" style="display: flex;flex-wrap: wrap;"></div>
                         </blockquote>
                        </div>

                    </form>

                </div>
            </div>
        </div>
    </div>
</div>

  <script src="../../layuiadmin/layui/layui.js"></script>
  <script>
   var main_id = null;
  layui.link('../../../layuiadmin/style/autocomplete.css');
  layui.config({
    base: '../../../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index',
    autocomplete: 'autocomplete'
  }).use(['index','utils', 'form', 'element', 'upload'], function(){
    var $ = layui.$
    ,admin = layui.admin
    ,element = layui.element
    ,form = layui.form
    ,upload = layui.upload;

    var id = layui.view.getParameterByName('id');
    main_id = id;

    form.render(null, 'component-form-element');
    element.render('breadcrumb', 'breadcrumb');
    admin.req({
        url: '/vehicle_order/drive_reserve/?id=' + id,
        done: function (res) {
            $('#show_image').html('');
            var data = res.data[0];
            if (data.img1_url) {
                var html1 = '<div style="margin-top: 10px;"><a href="' + data.img1_url + '" target="_blank"><img src="' + data.img1_url + '" class="layui-upload-img" style="margin-left: 5px;min-width: 80px; height: 100px;max-width: 200px;"></a>'+
                      '<div align="center" style="margin-top: 3px;" >驾驶证正面</div></div>';
                $('#show_image').append(html1)
            }
            if (data.img2_url) {
                var html2 = '<div style="margin-top: 10px;"><a href="' + data.img2_url + '" target="_blank"><img src="' + data.img2_url + '" class="layui-upload-img" style="margin-left: 5px;min-width: 80px; height: 100px;max-width: 200px;"></a>'+
                      '<div align="center" style="margin-top: 3px;" >驾驶证反面</div></div>';
                $('#show_image').append(html2)
            }
        }
    });
  });


  </script>
</body>
</html>
