<%@ 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" />
    <style>
        .img-big{
            background-position: center center;
            background-size: contain;
            background-repeat: no-repeat;
            width:100%;
            height:100%;
        }
        #lookImg{
            width:100%;
            height:100%;
        }

        html {
            background-color: #fff;
        }
    </style>
</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-row layui-col-xs12 bj-msg overHidden">
                    <div class="layui-col-xs6 mb-5">
                        <label class="layui-form-label">物料号：</label>
                        <div class="layui-input-block">
                            <input type="text" id="fittingCode" class="layui-input layui-bg-gray" value="${refundRecord.columns.fitting_code}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs6 mb-5">
                        <label class="layui-form-label">旧件名称：</label>
                        <div class="layui-input-block">
                            <input type="text" id="fittingName" class="layui-input layui-bg-gray" value="${refundRecord.columns.fitting_name}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs6 mb-5">
                        <label class="layui-form-label">旧件型号：</label>
                        <div class="layui-input-block">
                            <input type="text"  class="layui-input layui-bg-gray" value="${refundRecord.columns.fitting_version}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs6 mb-5">
                        <label class="layui-form-label">登记数量：</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="${refundRecord.columns.refund_num}" maxFractionDigits="2"/>" disabled>
                        </div>
                    </div>

                    <%--<div class="layui-col-xs6 mb-5">
                        <label class="layui-form-label">是否原配：</label>
                        <div class="layui-input-block">
                            <c:if test="${refundRecord.columns.fitting_type eq 0}">
                                <input type="text"  class="layui-input layui-bg-gray" value="是" disabled>
                            </c:if>
                            <c:if test="${refundRecord.columns.fitting_type eq 1}">
                                <input type="text"  class="layui-input layui-bg-gray" value="否" disabled>
                            </c:if>
                            <c:if test="${empty refundRecord.columns.fitting_type }">
                                <input type="text"  class="layui-input layui-bg-gray"  disabled>
                            </c:if>
                        </div>
                    </div>--%>
                    <div class="layui-col-xs6 mb-5">
                        <label class="layui-form-label">服务工程师：</label>
                        <div class="layui-input-block">
                            <input type="text"  class="layui-input layui-bg-gray" value="${refundRecord.columns.employe_name}" disabled>
                        </div>
                    </div>

                    <div class="layui-col-xs12 mb-5">
                        <label class="layui-form-label">旧件图片：</label>
                        <div class="layui-input-block">
                            <c:forEach var="fittingImg" items="${fittingImgs}">
                                <div id="imgsDiv">
                                    <div class="bj-img">
                                        <img src="${commonStaticImgPath}${fittingImg}" data-img="${commonStaticImgPath}${fittingImg}" class="selectImg" height="700" width="1200"/>
                                    </div>
                                </div>
                            </c:forEach>
                        </div>
                    </div>
                </div>
                <div class="layui-row layui-col-space12 pb-25">
                    <div class="layui-elem-quote">
                        <p>工单信息</p >
                    </div>
                    <div class="layui-col-xs6 layui-form-item">
                        <label class="layui-form-label">工单编号：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input layui-bg-gray" value="${refundRecord.columns.order_number}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs6 layui-form-item">
                        <label class="layui-form-label">电站名称：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input layui-bg-gray" value="${refundRecord.columns.power_station_name}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs6 layui-form-item">
                        <label class="layui-form-label">保修类型：</label>
                        <div class="layui-input-block">
                            <c:if test="${refundRecord.columns.warranty_type eq 1}">
                                <input type="text" class="layui-input layui-bg-gray" value="保内" disabled>
                            </c:if>
                            <c:if test="${refundRecord.columns.warranty_type eq 2}">
                                <input type="text" class="layui-input layui-bg-gray" value="保外" disabled>
                            </c:if>
                        </div>
                    </div>
                    <div class="layui-col-xs6 layui-form-item">
                        <label class="layui-form-label">用户姓名：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input layui-bg-gray" value="${refundRecord.columns.customer_name}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs6 layui-form-item">
                        <label class="layui-form-label">用户电话：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input layui-bg-gray" value="${refundRecord.columns.customer_mobile}"  disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs6 layui-form-item">
                        <label class="layui-form-label">用户地址：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input layui-bg-gray" value="${refundRecord.columns.Address}"  disabled>
                        </div>
                    </div>

                </div>

            </form>
        </div>
        <div class="operate-footer">
            <button type="button" class="layui-btn layui-btn-primary" onclick="cancels()">取消</button>
        </div>
    </div>
</div>
<div id="lookImg" class="hide">
    <div style="position:relative;width:100%;height:100%;">
        <div class="text-c img-big" id="image" style="width:100%;height:100%;">
            <%--<img src="" width="80%">--%>

        </div>
        <i class="layui-icon xuanZhuan" style="position:absolute;bottom: 15px;left:50%;">&#xe9aa;</i>
    </div>
</div>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script>
    layui.use(['form', 'jquery','laydate'], function () {
        var $ = layui.$
            , element = layui.element
            , form = layui.form
            , laydate = layui.laydate;

        //点击放大查看图片
        $(".selectImg").click(function(){
            var img = $(this).attr("data-img");
            $('.img-big').css('backgroundImage',"url("+img+")");
            layer.open({
                type:1,
                title:false,
                area:['500px','380px'],
                content:$("#lookImg")
            })
        })

        //旋转
        var deg = 0;
        $(".xuanZhuan").click(function(){
            deg += 90;
            document.getElementById("image").style.transform = "rotate(" + deg + "deg)";
        })

       /* $('.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 cancels(){
        parent.layer.closeAll();
    }

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