<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <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">
    <meta name="decorator" content="base"/>
    <link rel="stylesheet" href="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/style/admin.css" media="all">
    <link rel="stylesheet" href="${ctxPlugin}/static/css/reset.css" media="all">
    <style>
        html{background-color: #fff;padding-bottom: 50px;}
        .layui-form-select dl{
            max-height:200px;
            width: 80%;
        }
        .layui-text h3 {
            font-size: 14px !important;
        }
        .fontColor1{
            color: #409eff !important;
        }
    </style>
</head>
<body>


<div class="layui-form">
    <div class="layui-card mt-10">

        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
            <%--<ul class="layui-tab-title">
                <li class="layui-this">表单信息</li>
            </ul>
--%>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <input name="id" value="${order.columns.id}" hidden>
                    <div class="layui-card">
                        <blockquote class="layui-elem-quote">订单信息</blockquote>

                        <div class="layui-col-xs12 pr-30 mt-10">
                            <div class="layui-col-xs3 pr-30">
                                <label class="layui-form-label w-130">下单类型：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input layui-bg-gray"
                                    <c:choose>
                                        <c:when test="${orderType == '1'}">
                                               value="现金下单"
                                        </c:when>
                                        <c:when test="${orderType == '2'}">
                                               value="结算扣除"
                                        </c:when>
                                        <c:when test="${orderType == '3'}">
                                               value="打款"
                                        </c:when>
                                        <c:otherwise>
                                               value=""
                                        </c:otherwise>
                                    </c:choose>
                                           disabled>
                                </div>
                            </div>

                            <div class="layui-col-xs3 pr-30">
                                <label class="layui-form-label w-130">入库仓库：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input layui-bg-gray" value="${order.columns.inWarehouseName}" disabled>
                                </div>
                            </div>
                            <div class="layui-col-xs3  pr-30">
                                <label class="layui-form-label w-130">接货人：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input layui-bg-gray" value="${order.columns.person_in_charge}" disabled>
                                </div>
                            </div>
                            <div class="layui-col-xs3 pr-30">
                                <label class="layui-form-label w-130">联系电话：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input layui-bg-gray" value="${order.columns.deliverMobile}"  disabled>
                                </div>
                            </div>

                        </div>
                        <div class="layui-col-xs12 pr-30 mt-10">

                        </div>
                        <div class="layui-col-xs12 pr-30 mt-10">
                            <div class="layui-col-xs12 pr-30">
                                <label class="layui-form-label w-130">仓库地址：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input layui-bg-gray" value="${order.columns.warehouseAddress}" disabled>
                                </div>
                            </div>

                        </div>
                        <div class="layui-col-xs12 pr-30 mt-10 mb-10">
                            <div class="layui-col-xs12 pr-30">
                                <label class="layui-form-label w-130">订单备注：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input layui-bg-gray" value="${order.columns.remarks}"  disabled>
                                </div>
                            </div>
                        </div>

                        <blockquote class="layui-elem-quote" style="clear: both;">物料信息</blockquote>

                        <div class="layui-col-xs12 mt-10 mb-10 pr-30 pl-30">
                            <table class="layui-table">
                                <thead>
                                <th>序号</th>
                                <th>物料代码</th>
                                <th>物料名称</th>
                                <th>物料类型</th>
                                <th>物料品牌</th>
                                <th>物料规格</th>
                                <th>计划数量</th>
                                <th>发货数量</th>
                                <th>零售单价</th>
                                </thead>
                                <tbody id="materialTbody">
                                <c:forEach items="${details}" var="applyDetail" varStatus="vs">
                                    <tr data-id="${applyDetail.columns.id}"
                                        data-materialId="${applyDetail.columns.material_id}"
                                        data-applyAmount="${applyDetail.columns.apply_amount}">
                                        <td>${vs.count}</td>
                                        <td>${applyDetail.columns.code}</td>
                                        <td>${applyDetail.columns.material_name}</td>
                                        <td>${applyDetail.columns.material_type}</td>
                                        <td>${applyDetail.columns.material_brand}</td>
                                        <td>${applyDetail.columns.material_spec}</td>
                                        <td>${applyDetail.columns.apply_amount}</td>
                                        <td>${applyDetail.columns.out_amount}</td>
                                        <td>${applyDetail.columns.sales_price}</td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                        </div>
                    </div>

                    <div class="layui-col-xs12  pr-30 mt-10">
                        <label class="layui-form-label w-130">备注：</label>
                        <div class="layui-input-block">
                            <input type="text" autocomplete="off" placeholder="" class="layui-input layui-bg-gray" disabled value="${order.columns.audit_remark}">
                        </div>
                    </div>
                </div>
            </div>

        </div>

        <div class="layui-col-xs12 mb-20 pr-30 mt-20">
        </div>
    </div>
    <div class="operate-footer">
        <input type="button"   value="取消" class="layui-btn layui-btn-primary " onclick="closeDiv();" >
    </div>
</div>

<div id="lookImg" class="hide pos-r">
    <div style="position:relative;width:90%;height:450px;">
        <div class="w-500 h-450 lookImg">
            <img src="" width="80%" id="image">
        </div>
    </div>
</div>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script type="text/javascript">
    //初始数据
    var $form;
    var form;
    var upload;
    var $;
    var myreg=/^[1][3,4,5,6,7,8,9][0-9]{9}$/;
    layui.use(['form', 'table', 'upload', 'jquery','element'], function () {
        $ = layui.jquery;
        form = layui.form;
        upload = layui.upload;
        $form = $('form');
        var element = layui.element;

    })

    function  closeDiv() {
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        parent.layer.close(index);
    }

    function isBlank(val) {
        if (val == null || val == '' || val == undefined) {
            return true;
        }
        return false;
    }

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


