<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE HTML>
<html>
<head>
    <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/infor.css">
</head>
<body class="">

<div class="layui-fluid">
    <div class="layui-card tanwidth">
        <form id="searchForm" action="${ctx}${url}" method="post">
            <input type="hidden" id="page" name="page" value="${page.page }">
            <input type="hidden" id="pageSize" name="limit" value="${page.limit }">
            <input type="hidden" id="pageCount" name="pageCount" value="${count }">
            <input type="hidden" name="orderId" value="${order.id }">
            <input type="hidden" id="status" name="" value="${order.status }">
            <!-- 工单状态 -->
            <input type="hidden" id="serialNo" name="" value="${serialNo}">
            <input type="hidden" id="tel" name="" value="${tel}">
        </form>
        <div class="layui-card-body">
            <div class="incomimg">
                <div class="incontext">共有 ${callTimes} 次来电，<font>${unfinished+finished}</font>条工单信息（未完成<font>${unfinished}</font>条，已完成<font>${finished}</font>条）</div>
                <div class="incomleft">
                    <div>
                        <a href="${ctx}/main/redirect/telephoneNotifyOrder?tel=${tel}&serialNo=${serialNo}&pageNo=${prevPageNo}&pageSize=1" class="incomprev">上一条</a>
                        <span class="dangzt">当前<font>&nbsp;<a class="num">${page.page}</a>&nbsp;/&nbsp;<a class="num">${page.count}</a>&nbsp;&nbsp;</font>条</span>
                        <a href="${ctx}/main/redirect/telephoneNotifyOrder?tel=${tel}&serialNo=${serialNo}&pageNo=${nextPageNo}&pageSize=1" class="incomprev">下一条</a>
                        <span class="di">第</span>
                        <input type="text" class="numtext" id="forwardPage"  value="${page.page}">
                        <span class="tiaowb">条</span>
                        <input type="submit" value="跳转" class="tiaoz" href="javascript:gotoPage();" >
                    </div>
                    <a href="#" class="incomright"  onclick="newOrder('${order.id}')" >新建工单</a>
                </div>
            </div>

            <!--基本信息-->
            <div class="jibborder"><span class="jibinf">基本信息</span></div>
            <div class="inforinner ">
                <div class="inforitem layui-col-md3 layui-col-sm6 layui-col-xs12">
                    <lable class="inforlable">工单编号：</lable>
                    <input type="text" class="inforinput" value="${order.number }" readonly>
                </div>
                <div class="inforitem layui-col-md3 layui-col-sm6 layui-col-xs12">
                    <lable class="inforlable">用户姓名：</lable>
                    <input type="text" class="inforinput smallwidth" value="${order.customerName }" readonly>
                </div>
                <div class="inforitem layui-col-md3 layui-col-sm6 layui-col-xs12">
                    <lable class="inforlable">联系方式1：</lable>
                    <input type="text" class="inforinput smallwidth" value="${order.customerMobile }" readonly>
                </div>
                <div class="inforitem layui-col-md3 layui-col-sm6 layui-col-xs12">
                    <lable class="inforlable2">服务方式2：</lable>
                    <input type="text" class="inforinput smallwidth" value="${order.customerTelephone }" readonly>
                </div>
            </div>

            <div class="inforitem2 layui-col-xs12 clearfix">
                <lable class="inforlable">用户地址：</lable>
                <div class="dizhiinner">
                    <form class="layui-form" >
                        <div class="">
                            <div class="layui-inline addwidth">
                                <select name="province" class="province" lay-verify="required" lay-search lay-filter="province">
                                    <option value="">${order.province }</option>
                                </select>
                            </div>
                            <div class="layui-inline addwidth">
                                <select name="city" class="city" lay-verify="required" lay-search lay-filter="city">
                                    <option value="">${order.city }</option>
                                </select>
                            </div>
                            <div class="layui-inline addwidth">
                                <select name="district" class="district" lay-verify="required" lay-search>
                                    <option value="">${order.area }</option>
                                </select>
                            </div>
                            <input type="text" class="inforinput2" value="${order.customerAddress }" readonly>
                        </div>
                    </form>
                </div>
            </div>

            <div class="clearfix">
                <div class="inforitem layui-col-md3 layui-col-sm6 layui-col-xs12 clearfix">
                    <lable class="inforlable">电站名称：</lable>
                    <input type="text" class="inforinput" value="${order.powerStationName }" readonly>
                </div>
                <div class="inforitem layui-col-md3 layui-col-sm6 layui-col-xs12 clearfix">
                    <lable class="inforlable2">设备类型：</lable>

                    <input type="text" class="inforinput" value="${order.applianceCategory }" readonly>
                </div>
                <div class="inforitem layui-col-md3 layui-col-sm6 layui-col-xs12">
                    <lable class="inforlable2">容量：</lable>
                    <input type="text" class="inforinput smallwidth" value="${order.applianceCapacity }" readonly>
                </div>
                <div class="inforitem layui-col-md3 layui-col-sm6 layui-col-xs12 clearfix">
                    <lable class="inforlable2">设备型号：</lable>
                    <input type="text" class="inforinput smallwidth" value="${order.applianceModel }" readonly>
                </div>
            </div>



            <div class="inforinner clearfix">
                <div class="inforitem layui-col-lg3 layui-col-md4 layui-col-sm6 layui-col-xs12">
                    <lable class="inforlable">投运时间：</lable>
                    <input type="text" class="inforinput"   value="${order.applianceBuyTime }" readonly>
                </div>
                <div class="inforitem layui-col-lg3 layui-col-md4 layui-col-sm6 layui-col-xs12">
                    <lable class="inforlable2">设备品牌：</lable>
                    <input type="text" class="inforinput"  value="${order.applianceBrand }" readonly>
                </div>
                <div class="inforitem layui-col-lg3 layui-col-md4 layui-col-sm6 layui-col-xs12">
                    <lable class="inforlable2">设备序列号：</lable>
                    <input type="text" class="inforinput smallwidth"  value="${order.applianceMachineCode }" readonly>
                </div>
                <div class="inforitem layui-col-lg3 layui-col-md4 layui-col-sm6 layui-col-xs12">
                    <lable class="inforlable2">保修类型：</lable>
                    <input type="text" class="inforinput smallwidth"  value="${order.warrantyType eq '1'?'保内':'保外' }" readonly>
                </div>
            </div>

            <div class="inforinner clearfix">

                <div class="inforitem layui-col-md4 layui-col-sm3 layui-col-xs12">
                    <lable class="inforlable2">重要程度：</lable>
                    <input type="text" class="inforinput"  value="${order.level eq '1'?'紧急 ':'一般' }" readonly>
                </div>
                <div class="inforitem layui-col-md4 layui-col-sm3 layui-col-xs12">
                    <lable class="inforlable2">销售商：</lable>
                    <input type="text" class="inforinput" value="${order.pleaseReferMall }" readonly>
                </div>
                <div class="inforitem layui-col-md4 layui-col-sm3 layui-col-xs12">
                    <lable class="inforlable2">发票号码：</lable>
                    <input type="text" class="inforinput" value="${order.invoice }" readonly>
                </div>



            </div>

            <div>
                <div class="jibborder"><span class="jibinf">服务反馈</span></div>
                <div class="inforinner clearfix">

                    <div class="inforitem layui-col-md4 layui-col-sm4 layui-col-xs12">
                        <lable class="inforlable2">信息来源：</lable>
                        <c:choose>
                            <c:when test="${order.orderType eq 1}"> <input type="text" class="inforinput" value="用户报修" readonly></c:when>
                            <c:when test="${order.orderType eq 2}"> <input type="text" class="inforinput" value="平台录入" readonly></c:when>
                            <c:when test="${order.orderType eq 4}"> <input type="text" class="inforinput" value="电子商务" readonly></c:when>
                            <c:otherwise> <input type="text" class="inforinput" value="其他" readonly></c:otherwise>
                        </c:choose>

                    </div>

                    <div class="inforitem layui-col-md4 layui-col-sm4 layui-col-xs12">
                        <lable class="inforlable2">服务类型：</lable>
                      <input type="text" class="inforinput" value="${order.serviceType}" readonly>

                    </div>

                    <div class="inforitem layui-col-md4 layui-col-sm4 layui-col-xs12">
                        <lable class="inforlable2">服务措施：</lable>
                        <input type="text" class="inforinput" value="${order.serviceMeasures}" readonly>
                    </div>

                </div>

                <div class="inforinner clearfix">
                    <div class="inforitem layui-col-md4 layui-col-sm4 layui-col-xs12">
                        <lable class="inforlable">预约时间：</lable>
                        <input type="text" class="inforinput" value="${order.promiseTime}" readonly>
                    </div>
                    <div class="inforitem layui-col-md4 layui-col-sm4 layui-col-xs12">
                        <lable class="inforlable2">时间要求：</lable>
                        <input type="text" class="inforinput" value="${order.promiseLimit}" readonly>
                    </div>
                    <div class="inforitem layui-col-md4 layui-col-sm4 layui-col-xs12">
                        <lable class="inforlable2">报单时间：</lable>
                        <input type="text" class="inforinput" value="${order.repairTime}" readonly>
                    </div>

                </div>


                <div class="serciinerov clearfix">
                    <label class="inforlable">反馈内容：</label>
                    <!--<textarea class="fankui"></textarea>-->
                    <div class="fl">
                        <c:forEach var="fbItems" items="${feedbackInfo.feedbackResults}">
                            <span class="fanknr">${fbItems.feedbackTime} ${fbItems.feedbackName }：${fbItems.feedbackResults }</span>

                        </c:forEach>

                    </div>
                </div>
                <div class="clearfix">
                    <label class="fl">过程图片：</label>

                    <c:forEach var="fbImgItems" items="${feedbackInfo.feedbackImgs}">
                        <c:if test="${not empty fbImgItems.fbImgPath }">
                            <c:forEach var="fbImgItem" items="${fbImgItems.fbImgPath}">
                                <div class="guopicter">

                                        <img src="https://nhet.oss-cn-shanghai.aliyuncs.com/${fbImgItem}" height="80" width="80">
                                        <p class="lh-20">${fbImgItems.fbImgTime}</p>

                                </div>

                <%--                <div class="guopicter"><img src="http://192.168.2.24:80/sfimggroup/sfimg02/M00/00/79/wKgCGF34S4iAYqLRAAHcofqVbP889..jpg" height="80" width="80"></div>--%>
                            </c:forEach>
                        </c:if>
                    </c:forEach>
                </div>
            </div>

        </div>
    </div>
</div>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script>
var $;
    var reg = /^(?:[1-9]\d*|0)(?:\.\d+)?$/;
    layui.config({
        base: '${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'layedit', 'laydate','jquery','upload','layer'], function () {
          $ = layui.$
            , form = layui.form
            , layer = layui.layer

    });


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

function newOrder(id) {


    var tel = $("#tel").val();
    window.location.href = "${ctx}/main/redirect/newBuildOrder?id=" + id + "&tel=" + tel ;
}

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