<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<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">
    <meta name="decorator" content="base" />
    <link rel="stylesheet" type="text/css" href="${ctxPlugin}/static/css/reset.css" />
</head>
<body>
<div class="layui-fluid pd-0">
    <div class="layui-card pl-30 pr-30 pt-10">
        <div class="layui-card-body">
            <form class="layui-form delivery" action="" lay-filter="component-form-element">
                <div class="layui-col-xs12 layadmin-form-right mb-10">
                    <div class="layui-col-xs6 layui-btn-group text-l">
                        <button class="layui-btn deliveryMsg" type="button">备件信息</button>
                        <button class="layui-btn layui-btn-primary deliveryMsg" type="button">编辑记录</button>
                    </div>
                </div>
                <div class="layui-row layui-col-xs12 bj-msg overHidden">
                    <div class="layui-col-xs4 mb-5">
                        <label class="layui-form-label"><i class="mark hide">*</i>备件名称：</label>
                        <div class="layui-input-block">
                            <input type="text" id="fittingName" class="layui-input layui-bg-gray" value="${refund.fittingName}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs4 mb-5">
                        <label class="layui-form-label"><i class="mark hide">*</i>备件条码：</label>
                        <div class="layui-input-block">
                            <input type="text" id="fittingCode" class="layui-input layui-bg-gray" value="${refund.fittingCode}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs4 mb-5">
                        <label class="layui-form-label"><i class="mark hide">*</i>备件数量：</label>
                        <div class="layui-input-block">
                            <input type="text" lay-verify="ling" name="applyNum" id="applyNum" class="layui-input layui-bg-gray" value="<fmt:formatNumber type="number" value="${refund.refundNum}" maxFractionDigits="2"/>" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs4 mb-5">
                        <label class="layui-form-label">物流名称：</label>
                        <div class="layui-input-block">
                            <input type="text"  class="layui-input layui-bg-gray" value="${refund.logisticsNames}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs4 mb-5">
                        <label class="layui-form-label">物流单号：</label>
                        <div class="layui-input-block">
                            <input type="text"  class="layui-input layui-bg-gray" value="${refund.logisticsNumber}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs4 mb-5">
                        <label class="layui-form-label">发货时间：</label>
                        <div class="layui-input-block">
                            <input type="text"  class="layui-input layui-bg-gray" value="${refund.sendTime}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs12 mb-5">
                        <label class="layui-form-label">备注：</label>
                        <div class="layui-input-block">
                            <input type="text"  class="layui-input layui-bg-gray" value="${refund.marks}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs12 mb-5">
                        <label class="layui-form-label"><i class="mark hide">*</i>快递单图片：</label>
                        <div class="layui-input-block">
                            <div id="imgsDiv">
                                <c:forEach var="img" items="${refund.logisticsImgs}">
                                    <div class="bj-img imgSpan">

                                        <img src="${commonStaticImgPath}${img}" height="700" width="1200"/>
                                        <input type="hidden" class="imgPicker" value="${img}"/>
                                    </div>
                                </c:forEach>
                            </div>
                            <div class="upload-container hide" id="uploader">
                                <img src="" alt="img placeholder" id="imgsAdd">
                            </div>
                          <%--  <input type="hidden" id="imgs" value="${refund.logisticsImgs}"/>--%>
                        </div>
                    </div>
                </div>
                <div class="layui-row layui-col-xs12 layui-hide re-record">
                    <ul class="layui-col-xs12 border pl-30 pr-30 h-160">
                        <c:forEach var="pros" items="${fns:getProcess(message)}">
                            <li class=" re-List mb-10">
                                <span class="layui-col-xs2 fs-12"><span>${pros.t}</span>:</span>
                                <span class="layui-col-xs10 fs-12">${pros.c}</span>
                            </li>
                        </c:forEach>
                    </ul>
                </div>
                <div class="layui-row layui-col-space12 pb-25">
                    <h1 class="title layui-col-xs12 mb-20 mt-10">
                        <span>工单信息</span>
                    </h1>
                    <div class="layui-col-xs4 layui-form-item">
                        <label class="layui-form-label">工单编号：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input layui-bg-gray" value="${order.number}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs4 layui-form-item">
                        <label class="layui-form-label">工单状态：</label>
                        <div class="layui-input-block">
                            <%--1.待派工 2.服务中 3.待回访 4.待结算 5.已完成 6.无效工单 7.取消工单--%>
                            <c:choose>
                                <c:when test="${order.status eq '1'}">
                                    <input type="text" class="layui-input layui-bg-gray" value="待派工" disabled>
                                </c:when>
                                <c:when test="${order.status eq '2'}">
                                    <input type="text" class="layui-input layui-bg-gray" value="服务中" disabled>
                                </c:when>
                                <c:when test="${order.status eq '3'}">
                                    <input type="text" class="layui-input layui-bg-gray" value="待回访" disabled>
                                </c:when>
                                <c:when test="${order.status eq '4'}">
                                    <input type="text" class="layui-input layui-bg-gray" value="待结算" disabled>
                                </c:when>
                                <c:when test="${order.status eq '5'}">
                                    <input type="text" class="layui-input layui-bg-gray" value="已完成" disabled>
                                </c:when>
                                <c:when test="${order.status eq '6'}">
                                    <input type="text" class="layui-input layui-bg-gray" value="无效工单" disabled>
                                </c:when>
                                <c:when test="${order.status eq '7'}">
                                    <input type="text" class="layui-input layui-bg-gray" value="取消工单" disabled>
                                </c:when>
                                <c:otherwise>
                                    <input type="text" class="layui-input layui-bg-gray" value="" disabled>
                                </c:otherwise>
                            </c:choose>
                        </div>
                    </div>
                    <div class="layui-col-xs4 layui-form-item">
                        <label class="layui-form-label">产品品牌：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input layui-bg-gray" value="${order.applianceBrand}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs4 layui-form-item">
                        <label class="layui-form-label">产品品类：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input layui-bg-gray" value="${order.applianceCategory}"  disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs4 layui-form-item">
                        <label class="layui-form-label">产品型号：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input layui-bg-gray" value="${order.applianceModel}" disabled>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item layui-hide">

                    <%--<input type="button" lay-submit lay-filter="sureSubmit" id="sureSubmit" value="确认">--%>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script>
    layui.use(['form', 'jquery','laydate'], function () {
        $ = layui.$
            , element = layui.element
            , form = layui.form
            , laydate = layui.laydate;


        $('.deliveryMsg').click(function () {
            var index = $(this).index();
            $(this).removeClass('layui-btn-primary').siblings().addClass('layui-btn-primary')
            if (index == '1') {
                $('.re-record').removeClass('layui-hide');
                $('.bj-msg').addClass('layui-hide');
            } else {
                $('.bj-msg').removeClass('layui-hide');
                $('.re-record').addClass('layui-hide');
            }
        })

    });

    function isBlank(val) {
        if (val == null || val == '' || val == undefined) {
            return true;
        }
        return false;
    }
</script>
</body>
</html>