<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta name="crm" content="http://{{env('CRM_DOMAIN','kefu.liweijia.com')}}/"/>
    <title>订单信息</title>

    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <link href="/base/css/bootstrap.min.css?v=3.4.0.css" rel="stylesheet">
    <link href="/base/css/font-awesome.min.css?v=4.3.0.css" rel="stylesheet">

    <!-- Data Tables -->
    <link href="/base/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

    <link href="/base/css/animate.min.css?v={{config("sys.version")}}" rel="stylesheet">
    <link href="/base/css/style.min.css?v={{config("sys.version")}}" rel="stylesheet">

    <!-- fine-uploader -->
    <!--     <link rel="stylesheet" href="/base/plugins/fine-uploader/fine-uploader-new.min.css"> -->

    <!-- cropperjs -->
    <link rel="stylesheet" href="/base/plugins/cropperjs/cropper.min.css">

    <!-- 全局js -->
    <script src="/base/js/jquery-2.1.1.min.js?v={{config("sys.version")}}"></script>
    <script src="/base/js/bootstrap.min.js?v=3.4.0"></script>
    <script src="/base/js/layer/layer.js?v={{config("sys.version")}}"></script>

    <script type="text/javascript">
        function doPrint() {
            bdhtml = window.document.body.innerHTML;
            sprnstr = "<!--startprint-->";
            eprnstr = "<!--endprint-->";
            prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
            prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
            window.document.body.innerHTML = prnhtml;
            window.print();
        }
    </script>

</head>

<body>
<!--startprint-->
<div class="row">∂∂
    <div class="ibox-content">
        <table class="table table-bordered">
            <tr>
                <td style="width: 80px"><h4>订单号</h4></td>
                <td colspan="3">{{ $data['sno'] or ''}}</td>
                <td><h4>费用</h4></td>
                <td colspan="2">{{ $data['price'] or ''}}</td>
                <td><h4>二维码</h4></td>
                <td rowspan="3"><img style="height: 150px" src="{{ $data['qrcode'] }}" alt=""></td>
            </tr>

            <tr>
                <td><h4>订单状态</h4></td>
                <td colspan="3">{{ $data->status()}}</td>
                <td style="width: 80px"><h4>产品分类</h4></td>
                <td colspan="3">{{ $data['category'] or ''}}</td>
            </tr>
            <tr>
                <td><h4>产品型号</h4></td>
                <td colspan="3">{{ $data['type'] or ''}}</td>
                <td><h4>颜色</h4></td>
                <td colspan="3">{{ $data['color'] or ''}}</td>
            </tr>
            <tr>
                <td><h4>产品图片</h4></td>
                <td colspan="8">@foreach($img as $item)
                        <img height="150px" style="margin-right: 10px;cursor: pointer" src="{{ $item }}">@endforeach
                </td>
            </tr>
            <tr>
                <td><h4>问题描述</h4></td>
                <td colspan="8">{{ $data['question'] or ''}}</td>
            </tr>
            <tr>
                <td><h4>客户姓名</h4></td>
                <td colspan="3">{{ $data['customer_name'] or ''}}</td>
                <td><h4>联系方式</h4></td>
                <td colspan="4">{{ $data['customer_phone'] or ''}}</td>
            </tr>
            <tr>
                <td><h4>地址</h4></td>
                <td colspan="8">{{ $data['customer_address'] or ''}}</td>
            </tr>

        </table>

        <h4 style="text-align: center">补件清单</h4>
        <table class="table table-bordered">
            <tr>
                <th colspan="2">配件清单</th>
                <th colspan="2">工序流程</th>
            </tr>
            @foreach($parts as $part)
                <tr>
                    <td>{{ $part->name }}</td>
                    <td>{{ $part->count }}</td>
                    <td></td>
                    <td></td>
                </tr>
            @endforeach

            <tr>
                <td></td>
                <td></td>
                <td>木工段</td>
                <td>油漆段</td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td>包装段</td>
                <td>入库</td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td>费用</td>
                <td>备注</td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td rowspan="2">生产负责人：</td>
                <td rowspan="2">跟单负责人：</td>
            </tr>


        </table>

    </div>
</div>
<!--endprint-->
<div class="row" style="text-align: center;padding-bottom: 20px">
    <button type="button" class="btn btn-primary" onclick="doPrint()">打印</button>
</div>

</body>
