<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE HTML>
<html>
<head>
    <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">
</head>
<style>
    .orderCost td{
        padding: 5px 32px;
    }
    .orderTd{
        font-weight:bold;
    }
</style>
<body class="">
<div class="layui-fluid ">
    <div class="layui-card pl-30 pr-30 pt-10 over">
        <div class="layui-card-body layui-col-xs11">
    <form class="layui-form" action="" lay-filter="component-form-group" id="orderForm">
        <div class="layui-card">
            <input type="hidden" name="id" id="orderId" value="${order.id}">
            <input type="hidden" id="logisticName" name="logisticName" value="${order.logisticsName}">
            <input type="hidden" id="logisticNo" name="logisticNo" value="${order.logisticsNo}">
            <input type="hidden" name="sign" id="sign" value="${order.customerSignFlag}">
            <input type="hidden" name="fittingFlag" id="fittingFlag" value="${order.fittingFlag}">
          <%-- <fieldset class="layui-elem-field " >--%>
                <div class="site-demo-button siteOrderButten">
                    <button type="button" class="layui-btn layui-btn-primary ">基本信息</button>
                    <button type="button" class="layui-btn ">过程信息</button>
                    <button type="button" class="layui-btn ">物流信息</button>
                </div>
            <hr class="layui-bg-gray">
       <%-- </fieldset>--%>
            <div class="layui-card-header pt-10">
                <div class="layui-col-lg2 layui-col-sm4">
                    <label>工单编号：${order.number}</label>
                </div>
                <div class="layui-col-lg2 layui-col-sm4 layui-form" lay-filter="component-form-element">
               <%--     <label >下单时间：<fmt:formatDate value="${order.createTime}" pattern="yyyy-MM-dd HH:mm"/></label>--%>
                    <label >服务类型：${order.serviceType}</label>
                </div>

                <div class="layui-col-lg2 layui-col-sm4" style="position: relative">
                    <label >服务措施：${order.serviceMeasures}</label>
                </div>

            </div>
        </div>
        <div class="layui-card jibenxinxi ">
            <div class="layui-card-header pt-10">
                <h1 class="title">用户信息</h1>
            </div>
            <div class="layui-card-body orderfroma">
                <div class="layui-form" action="" lay-filter="component-form-element">
                    <div class="layui-row layui-col-space12 layui-form-item">

                        <div class="layui-col-lg3 layui-col-sm4">
                            <label class="layui-form-label"><i class="mark">*</i>用户姓名：</label>
                            <div class="layui-input-block">
                                <input type="text" name="customerName" id="customerName" lay-verify="required" placeholder=""
                                       autocomplete="off" class="layui-input layui-bg-gray" value="${order.customerName}" disabled>
                            </div>
                        </div>
                        <div class="layui-col-lg3 layui-col-sm4 layui-form" lay-filter="component-form-element">
                            <label class="layui-form-label">性别：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="customerSex" value="1" <c:if test="${order.customerSex eq 1}">checked</c:if> title="先生">
                                <input type="radio" name="customerSex" value="2" <c:if test="${order.customerSex eq 2}">checked</c:if>  title="女士" >
                            </div>
                        </div>

                        <div class="layui-col-lg3 layui-col-sm4" style="position: relative">
                            <label class="layui-form-label"><i class="mark">*</i>联系方式1：</label>
                            <div class="layui-input-block pr-30">
                                <input type="text" name="customerMobile" lay-verify="required" class="layui-input layui-bg-gray" value="${order.customerMobile}" disabled>
                            </div>
                        </div>
                        <div class="layui-col-lg3 layui-col-sm4">
                            <label class="layui-form-label">联系方式2：</label>
                            <div class="layui-input-block">
                                <input type="text" name="customerTelephone" id="customerTelephone"  placeholder=""
                                       autocomplete="off" class="layui-input layui-bg-gray" value="${order.customerTelephone}" disabled>
                            </div>
                        </div>
                        <div class="layui-col-lg8">
                            <div class="layui-col-xs12 layui-form-item">
                                <label class="layui-form-label"><i class="mark">*</i>用户地址：</label>
                                <div class="layui-input-block">
                                    <div class="layui-col-lg3 layui-col-sm3 pr-30">
                                        <select name="province" id="province" lay-verify="required" lay-filter="province" disabled lay-search>
                                            <option value=""></option>
                                            <c:forEach items="${pros}" var="pro">
                                                <option value="${pro.columns.ProvinceName}" <c:if test="${order.province eq pro.columns.ProvinceName}">selected</c:if> title="${pro.columns.ProvinceID }">${pro.columns.ProvinceName}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <div class="layui-col-lg2 layui-col-sm3 pr-30">
                                        <select name="city" id="city" lay-verify="required" lay-filter="city" disabled lay-search>
                                            <option value="">请选择</option>
                                            <c:forEach items="${faccitys}" var="city">
                                                <option value="${city.columns.CityName}" <c:if test="${order.city eq city.columns.CityName}">selected</c:if> title="${city.columns.CityID}">${city.columns.CityName}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <div class="layui-col-lg2 layui-col-sm3 pr-30">
                                        <select name="area" id="area" lay-verify="required" lay-filter="aihao" disabled lay-search>
                                            <option value="">请选择</option>
                                            <c:forEach items="${areas}" var="area">
                                                <option value="${area.columns.DistrictName}" <c:if test="${order.area eq area.columns.DistrictName}">selected</c:if> title="${area.columns.DistrictID}">${area.columns.DistrictName}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <div class="layui-col-lg6 layui-col-sm3">
                                        <input type="text" name="customerAddress" lay-verify="required" placeholder=""
                                               autocomplete="off" class="layui-input layui-col-lg2 layui-bg-gray" value="${order.customerAddress}" disabled>
                                    </div>
                                </div>

                            </div>

                        </div>
                    </div>
                </div>
            </div>

        </div>
        <div class="layui-card jibenxinxi">
            <div class="layui-card-header pt-10">
                <h1 class="title">服务信息</h1>
            </div>
            <div class="layui-card-body">
                <div class="layui-form" action="" lay-filter="component-form-element">
                    <div class="layui-row layui-col-space12 layui-form-item">

                        <div class="layui-col-lg2 layui-col-sm3">
                            <label class="layui-form-label"><i class="mark">*</i>产品品牌：</label>
                            <div class="layui-input-block">
                                <select name="applianceBrand" id="applianceBrand" lay-verify="required" lay-filter="applianceBrand" disabled>
                                    <c:forEach items="${product}" var="bran">
                                        <option value="${bran.columns.brand }" <c:if test="${bran.columns.brand eq order.applianceBrand}"> selected</c:if> >${bran.columns.brand}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>
                        <div class="layui-col-lg2 layui-col-sm3">
                            <label class="layui-form-label"><i class="mark">*</i>产品品类：</label>
                            <div class="layui-input-block">
                                <select name="applianceCategory" id="applianceCategory" lay-verify="required" disabled lay-filter="applianceCategory">
                                    <c:forEach items="${cate}" var="ca">
                                        <option value="${ca.columns.category }" <c:if test="${ca.columns.category eq order.applianceCategory}"> selected</c:if> >${ca.columns.category}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>

                        <div class="layui-col-lg2 layui-col-sm3">
                            <label class="layui-form-label">产品型号：</label>
                            <div class="layui-input-block">
                                <select name="applianceModel" id="applianceModel" lay-verify="required"  disabled class="layui-bg-gray">
                                    <option value="">请选择</option>
                                    <c:forEach items="${models}" var="modelList">
                                        <option value="${modelList}" <c:if test="${modelList == order.applianceModel}">selected</c:if>>${modelList}</option>
                                    </c:forEach>

                                </select>
                            </div>
                        </div>
                        <div class="layui-col-lg2 layui-col-sm3">
                            <label class="layui-form-label">产品数量：</label>
                            <div class="layui-input-block">
                                <input type="text" name="applianceNum" id="applianceNum"  placeholder=""
                                       autocomplete="off" class="layui-input layui-bg-gray" value="${order.applianceNum}" disabled>
                            </div>
                        </div>
                        <div class="layui-col-lg2 layui-col-sm3">
                            <label class="layui-form-label">机身条码：</label>
                            <div class="layui-input-block">
                                <input type="text" name="applianceBarcode"  placeholder="" id="applianceBarcode"
                                       autocomplete="off" class="layui-input layui-bg-gray" value="${order.applianceBarcode}" disabled>
                            </div>
                        </div>
                        <div class="layui-col-lg2 layui-col-sm3">
                            <label class="layui-form-label">购买时间：</label>
                            <div class="layui-input-block">
                                <input type="text" name="applianceBuyTime" id="applianceBuyTime"   placeholder="" disabled
                                       autocomplete="off" class="layui-input layui-bg-gray" value="<fmt:formatDate value="${order.applianceBuyTime}" pattern="yyyy-MM-dd" />">
                            </div>
                        </div>
                        <div class="layui-col-lg2 layui-col-sm3">
                            <label class="layui-form-label">购买渠道：</label>
                            <div class="layui-input-block">
                                <select  name="pleaseReferMall" id="pleaseReferMall"  lay-filter="aihao" class="layui-bg-gray" disabled>
                                    <option value=""></option>
                                    <c:forEach items="${mall}" var="mal">
                                        <option value="${mal.columns.mall_name}" <c:if test="${order.pleaseReferMall == mal.columns.mall_name}">selected</c:if> >${mal.columns.mall_name}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>
                        <div class="layui-col-lg3 layui-col-sm3 layui-form" lay-filter="component-form-element">
                            <label class="layui-form-label"><i class="mark">*</i>保修类型：</label>
                            <div class="layui-input-block">
                                <select  name="warrantyType" id="warrantyType"  lay-filter="aihao" class="layui-bg-gray" disabled>
                                    <option value="">请选择</option>
                                    <option value="1" <c:if test="${order.warrantyType eq 1}">selected</c:if> >保内</option>
                                    <option value="2" <c:if test="${order.warrantyType eq 2}">selected</c:if> >保外</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-col-lg2 layui-col-sm3">
                            <label class="layui-form-label">
                                工单加急：</label>
                            <div class="layui-input-block">
                                <select name="completeLimitLength" id="completeLimitLength"  lay-filter="completeLimitLength" class="layui-bg-gray" disabled>
                                    <option value="">请选择</option>
                                    <c:forEach var="jia" items="${jiajis}">
                                        <option value="${jia.columns.complete_limit_length}" title="${jia.columns.complete_extend_cost}" <c:if test="${jia.columns.complete_limit_length eq order.completeLimitLength}"> selected </c:if> >${jia.columns.complete_limit_length} 小时</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>
                        <div class="layui-col-lg2 layui-col-sm3 lh-30">
                            <input type="hidden" name="completeExtendCost"  id="completeExtendCost" value="${order.completeExtendCost}">
                            加急费：<span class="red completeExtendCost" id="seriousMoney">¥${order.completeExtendCost}</span>元
                        </div>
                        <div class="layui-col-xs12">
                            <label class="layui-form-label"><i class="red">*</i>故障描述：</label>
                            <div class="layui-input-block">
                                <textarea name="remarks" id="remarks" placeholder="" class="layui-textarea layui-bg-gray" lay-verify="required" disabled>${order.remarks}</textarea>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
    <div class="layui-card processInformation layui-hide">
        <ul class="layui-timeline guoChen">



        </ul>
    </div>

    <div class="layui-card over pl-10 logsticInfoNew layui-hide">
                <div class="layui-col-xs6 pr-20">
                    <h1 class="title mt-10">寄件物流</h1>
                    <div class="mt-5">
                        <div class="layui-collapse" lay-accordion="">
                            <c:choose>
                                <c:when test="${order.customerSignFlag eq '1'}">
                                    <div class="layui-colla-item">
                                        <h2 class="layui-colla-title productInfo">${order.applianceBrand}${order.applianceCategory}</h2>
                                        <div class="layui-colla-content">
                                            <ul class="layui-timeline logisticInfor" style="max-height: 200px;overflow-y: auto">
                                            </ul>
                                        </div>
                                    </div>
                                </c:when>
                                <c:otherwise>

                                </c:otherwise>
                            </c:choose>
                            <c:choose>
                                <c:when test="${order.fittingFlag eq '2'}">
                                    <div class="layui-colla-item">
                                        <h2 class="layui-colla-title fitRefundInfo">已发备件</h2>
                                        <div class="layui-colla-content">
                                            <ul class="layui-timeline logisticInfor" style="max-height: 200px;overflow-y: auto">

                                            </ul>
                                        </div>
                                    </div>
                                </c:when>
                                <c:otherwise>
                                </c:otherwise>
                            </c:choose>

                            <c:forEach items="${applyInfo}" var="info">
                                <c:choose>
                                    <c:when test="${info.columns.site_id eq ''}">

                                    </c:when>
                                    <c:when test="${info.columns.site_id eq null}">

                                    </c:when>
                                    <c:otherwise>
                                        <div class="layui-colla-item">
                                            <h2 class="layui-colla-title fitApplyInfo" data-logName="${info.columns.logistics_names}" data-logNumber="${info.columns.logistics_number}" >${info.columns.fitting_name}</h2>
                                            <div class="layui-colla-content">
                                                <ul class="layui-timeline logisticInfor" style="max-height: 200px;overflow-y: auto">

                                                </ul>
                                            </div>
                                        </div>
                                    </c:otherwise>
                                </c:choose>
                            </c:forEach>
                        </div>

                    </div>
                </div>
                <div class="layui-col-xs6 pr-20">
                    <h1 class="title mt-10">返件物流</h1>
                    <div class="mt-5">
                        <div class="layui-collapse" lay-accordion="">
                            <c:forEach items="${rd}" var="rdList">
                                <c:choose>
                                    <c:when test="${rdList.columns.fitting_name eq ''}">

                                    </c:when>
                                    <c:when test="${rdList.columns.fitting_name eq null}">

                                    </c:when>
                                    <c:otherwise>
                                        <div class="layui-colla-item">
                                            <h2 class="layui-colla-title returnFactoryInfo" data-logName="${rdList.columns.logistics_names}" data-logNum="${rdList.columns.logistics_number}">${rdList.columns.fitting_name}</h2>
                                            <div class="layui-colla-content">
                                                <ul class="layui-timeline returnFactory" style="max-height: 200px;overflow-y: auto">

                                                </ul>
                                            </div>
                                        </div>
                                    </c:otherwise>
                                </c:choose>
                            </c:forEach>
                        </div>
                    </div>
                </div>
            </div>

    <div class="layui-card orderqitaxinxi">
        <div class="site-demo-button fuwufankuiorder">

            <button type="button" class="layui-btn layui-btn-primary" >服务反馈</button>
            <button type="button" class="layui-btn ">跟进信息</button>
            <button type="button" class="layui-btn" >备件信息</button>
            <button type="button" class="layui-btn" >回访信息</button>
        </div>
        <div class="layui-card-body fuwufankui orderRelation">
            <div class="layui-form" action="" lay-filter="component-form-element">
                <div class="layui-row layui-col-space12 layui-form-item">
                    <div class="layui-col-lg2 layui-col-sm3">
                        <label class="layui-form-label">工单状态：</label>
                        <div class="layui-input-block">
                            <c:if test="${order.status eq 1}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="待派工"></c:if>
                            <c:if test="${order.status eq 2}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="服务中"></c:if>
                            <c:if test="${order.status eq 3}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="待回访"></c:if>
                            <c:if test="${order.status eq 4}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="待结算"></c:if>
                            <c:if test="${order.status eq 5}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="已完成"></c:if>
                            <c:if test="${order.status eq 6}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="无效工单"></c:if>
                        </div>
                    </div>
                    <div class="layui-col-lg2 layui-col-sm3">
                        <label class="layui-form-label">服务商：</label>
                        <div class="layui-input-block">
                            <input type="text"  placeholder=""
                                   autocomplete="off" class="layui-input layui-bg-gray" value="${order.siteName}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-lg2 layui-col-sm3">
                        <label class="layui-form-label">服务工程师：</label>
                        <div class="layui-input-block">
                            <input type="text"  placeholder=""
                                   autocomplete="off" class="layui-input layui-bg-gray" value="${order.employeName}" disabled>
                        </div>
                    </div>
                    <div class="layui-col-xs12">
                        <label class="layui-form-label">反馈内容：</label>
                        <div class="layui-input-block">
                            <c:forEach var="fbItems" items="${feedbackInfo.feedbackResults}">
                                <p class="processItem">
                                    <span class="time">${fbItems.feedbackTime} </span>
                                    <span>${fbItems.feedbackName }：${fbItems.feedbackResults }</span>
                                </p>
                            </c:forEach>
                        </div>
                    </div>
                    <div class="layui-col-xs12">
                        <label class="layui-form-label">过程图片：</label>
                        <div class="layui-input-block">
                            <c:forEach var="fbImgItems" items="${feedbackInfo.feedbackImgs}">
                                <c:if test="${not empty fbImgItems.fbImgPath }">
                                    <c:forEach var="fbImgItem" items="${fbImgItems.fbImgPath}">
                                        <div class="imgWrap1 f-l" id="img${da.index}">
                                            <div class="imgWrap text-c">
                                                <img src="${commonStaticImgPath}${fbImgItem}" data-img="${commonStaticImgPath}${fbImgItem}" class="w-80 h-80 selectImg" style="width:150px;">
                                                <p class="hei">${fbImgItems.fbImgTime}</p>
                                            </div>
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </c:forEach>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-card orderRelation layui-hide orderRelation">
            <ul class="layui-timeline">
                <c:forEach items="${detail}" var="deta">
                    <li class="layui-timeline-item"><i class="layui-icon layui-timeline-axis"></i>
                        <div class="layui-timeline-content layui-text">
                            <h4 class="layui-timeline-title">${deta.t}</h4>
                            <p>
                                    ${deta.c}
                            </p>
                        </div>
                    </li>

                </c:forEach>

            </ul>
        </div>
        <div class="layui-card  layui-hide orderRelation">
        <table class="layui-table beijianxinxi" style="table-layout:fixed;">
            <thead>
            <tr>
                <th width="13%">备件名称</th>
                <th width="13%">备件条码</th>
                <th width="13%">备件描述</th>
                <th width="13%">备件状态</th>
                <th width="13%">使用数量</th>
              <%--  <th width="13%">是否返旧</th>--%>
                <th width="13%">有无返旧</th>
                <th width="12%">收货人</th>
                <th width="14%">联系方式</th>
                <th width="15%">收货地址</th>
            </tr>
            </thead>
            <tbody class="bodyContent">


            </tbody>
        </table>
        </div>
        <div class="layui-card-body layui-hide orderRelation">
            <div class="" lay-filter="component-form-element">
                <div class="layui-row layui-col-space12 layui-form-item">
                    <div class="layui-col-lg2 layui-col-sm3">
                        <label class="layui-form-label">服务态度：</label>
                        <div class="layui-input-block">
                            <c:if test="${call.columns.service_attitude eq 1}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="十分不满意"></c:if>
                            <c:if test="${call.columns.service_attitude eq 2}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="不满意"></c:if>
                            <c:if test="${call.columns.service_attitude eq 3}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="一般 "></c:if>
                            <c:if test="${call.columns.service_attitude eq 4}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="满意"></c:if>
                            <c:if test="${call.columns.service_attitude eq 5}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="十分满意"></c:if>
                            <c:if test="${call.columns.service_attitude eq 6}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="无效回访"></c:if>
                        </div>
                    </div>
                    <div class="layui-col-lg2 layui-col-sm3">
                        <label class="layui-form-label">安全评价：</label>
                        <div class="layui-input-block">
                            <c:if test="${call.columns.safety_evaluation eq 1}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="按安全规范操作"></c:if>
                            <c:if test="${call.columns.safety_evaluation eq 2}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="未出示上岗证"></c:if>
                            <c:if test="${call.columns.safety_evaluation eq 3}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="未出示上岗证"></c:if>
                            <c:if test="${call.columns.safety_evaluation eq 4}"><input type="text"  class="layui-input layui-bg-gray layui-disabled" disabled value="未清理现场"></c:if>
                        </div>
                    </div>

                    <div class="layui-col-lg12 layui-col-sm10">
                        <label class="layui-form-label">回访内容：</label>
                        <div class="layui-input-block">
                            <input type="text"  placeholder=""
                                   autocomplete="off" class="layui-input layui-bg-gray" value="${call.columns.remarks}" disabled>
                        </div>
                    </div>


                    <table class="layui-table">
                        <colgroup>
                            <col width="100">
                            <col width="200">
                            <col>
                        </colgroup>
                        <thead>
                        <tr>
                            <th  style="padding: 5px 32px;">结算方案</th>
                            <th>${facset.columns.service_measures}</th>
                        </tr>
                        </thead>
                        <tbody class="orderCost">
                        <tr>
                            <td>费用类型</td>
                            <td>结算金额</td>
                        </tr>
                        <tr>
                            <td class="text-l">服务费</td>
                            <td>${facset.columns.service_costs}</td>
                        </tr>
                        <tr>
                            <td>里程费</td>
                            <td>${facset.columns.mileage_cost}</td>
                        </tr>
                        <tr>
                            <td>加急费</td>
                            <td>${facset.columns.exigency_costs}</td>
                        </tr>
                        <tr>
                            <td>其他费</td>
                            <td>${facset.columns.other_cost}</td>
                        </tr>
                        <tr>
                            <td>合计</td>
                            <td class="orderTd">${facset.columns.other_cost+facset.columns.exigency_costs+facset.columns.mileage_cost+facset.columns.service_costs}</td>
                        </tr>
                        <tr>
                            <td>结算备注</td>
                            <td>${facset.columns.remarks}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
        </div>
        <div class="layui-card-body layui-col-xs1 right-btn pr-10">
            <div class="layui-btn-container">
                <button type="button" class="layui-btn xiugaiOrder" >编辑</button>
                <button type="button" class="layui-btn layui-hide uodateorder" >保存</button>
                <button type="button" class="layui-btn layui-hide cancelorder" >取消</button>
                <button type="button" class="layui-btn anewCallback" >重新回访</button>
                <button type="button" class="layui-btn siteSettle" >服务商结算</button>
            </div>
        </div>
    </div>
</div>
<div id="lookImg" class="hide pos-r">
    <div style="position:relative;width:100%;height:100%;">
        <div class="w-500 h-500 lookImg">
            <img src="" width="80%" id="image">
        </div>
        <i class="layui-icon xuanZhuan" style="position:absolute;bottom:9px;left:50%;">&#xe9aa;</i>
    </div>
</div>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script src="${ctxPlugin}/static/js/orderCommon.js"></script>
<script>
    layui.config({
        base: '${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'layedit', 'laydate'], function () {
        $ = layui.$
            , admin = layui.admin
            , element = layui.element
            , form = layui.form
            ,laydate = layui.laydate;
        //日期
        laydate.render({
            elem: '#applianceBuyTime'
        });
        form.render(null, 'component-form-element');
        //自定义验证规则
        form.verify({
            title: function(value){
                if(value.length < 5){
                    return '标题至少得5个字符啊';
                }
            }
            ,pass: [
                /^[\S]{6,12}$/
                ,'密码必须6到12位，且不能出现空格'
            ]
            ,content: function(value){
                layedit.sync(editIndex);
            }
        });
        element.render('breadcrumb', 'breadcrumb');

        form.on('select(applianceBrand)', function(data){
            var brand = data.value
            CategoryOrder(brand)
        });
        form.on('select(applianceCategory)', function(data){
            var model=$(data.elem).find("option:selected").attr("title");
            $("#applianceModel").empty()
            if(isBlank(model)){
                $("#applianceCategory").append("<option value=''>请选择</option>");
                return "";
            }
            orderModel(model);
        });

        form.on('select(province)', function(data){
            var province = $(data.elem).find("option:selected").attr("title");
            provinceOrder(province);
        });
        form.on('select(city)', function(data){
            var city = $(data.elem).find("option:selected").attr("title");
            cityOrder(city);

        });

        form.on('submit(component-form-demo1)', function (data) {

            //验证不必填项的值格式
            var shuzi = /[0-9]*[1-9][0-9]*$/;
            var applianceNum = data.field.applianceNum;
            var articleFrom = data.field;
            $.ajax({
                type:"POST",
                url:"${ctx}/order/saveOrder",
                data:articleFrom,
                success:function(data){
                    if(data.code=='200'){
                        layer.msg('提交成功！', {icon:1,time:1000},function(){
                            setTimeout('window.location.reload()',1000);
                        });
                    }else{
                        layer.msg(data.msg, {icon: 2});
                    }
                }
            });

            return false;
        });

        function provinceOrder(province){
            $("#city").empty();
            $("#area").empty();
            if(isBlank(province)){
                $("#city").append("<option value=''>请选择</option>");
                return "";
            }
            $.ajax({
                type:"POST",
                url:"${ctx}/main/redirect/getCitysByProId",
                data:{
                    province:province
                },
                success:function(result){
                    if(result =="205"){
                        layer.msg("暂无数据!")
                        return
                    }
                    var html =" <option value=''>请选择</option>";
                    for(var i=0;i<result.length;i++){
                        var city = result[i];
                        html =html+ '<option value="'+city.columns.CityName+'" title="'+city.columns.CityID+'">'+city.columns.CityName+'</option>';
                    }
                    $("#city").append(html);
                    form.render('select');
                }
            });

        }

        function cityOrder(city,arean){
            $("#area").empty()
            if(isBlank(city)){
                $("#area").append("<option value=''>请选择</option>");
                return "";
            }
            $.ajax({
                type:"POST",
                url:"${ctx}/main/redirect/getAreaByCityId",
                data:{
                    city:city
                },
                success:function(result){
                    if(result =="205"){
                        layer.msg("暂无数据!")
                        return
                    }
                    var html ="<option value=''>请选择</option>";
                    for(var i=0;i<result.length;i++){
                        var area = result[i];
                        html =html+ '<option value="'+area.columns.DistrictName+'" >'+area.columns.DistrictName+'</option>';
                    }
                    $("#area").append(html);
                    if(!isBlank(arean)){
                        $("#area").val(arean)
                    }

                    form.render('select');
                }
            });

        }
        function CategoryOrder(brand,cateName){
            $("#applianceCategory").empty();
            $("#applianceModel").empty();
            if(isBlank(brand)){
                $("#applianceCategory").append("<option value=''>请选择</option>");
                return "";
            }
            $.ajax({
                type:"POST",
                url:"${ctx}/order/getCategoryByBrandname",
                data:{
                    brand:brand,
                },
                success:function(result){
                    if(result =="205"){
                        layer.msg("暂无数据!");
                        return
                    }
                    var html ="<option value=''>请选择</option>";
                    for(var i=0;i<result.length;i++){
                        var cate = result[i];
                        html =html+ '<option value="'+cate.columns.category+'" title="'+cate.columns.model+'">'+cate.columns.category+'</option>';
                    }
                    $("#applianceCategory").append(html);
                    $("#applianceCategory").val(cateName)
                    form.render('select');
                }
            });

        }
        function orderModel(model){
            if(isBlank(model)){
                return
            }

            var mode = model.split(",")
            var html ="<option value=''>请选择</option>";
            for(var i=0;i<mode.length;i++){
                var mod = $.trim(mode[i]);
                html =html+ '<option value="'+mod+'" >'+mod+'</option>';
            }
            $("#applianceModel").append(html);
            form.render('select');

        }
        totalChange();

    });
    var siteId = "${order.siteId}";

    layui.use(['jquery','form'], function(args){
        var $= layui.jquery;
        var form = layui.form;
        var aa = $('.siteOrderButten button');
        var orderId = $("#orderId").val();
        var sign = $("#sign").val();
        var fittingFlag = $("#fittingFlag").val();
        aa.click(function () {
            aa.removeClass("layui-btn-primary");
            $(this).addClass("layui-btn-primary");
            var index=aa.index(this);
           if(index == 1){
               //过程信息
               $(".processInformation").removeClass("layui-hide");
               $(".jibenxinxi").addClass("layui-hide");
               $(".logsticInfoNew").addClass("layui-hide");
               var html = $.trim($(".layui-timeline").html()) ;
           //    if(isBlank(html)){
                   guocheng(orderId);
            //   }

           }else if(index == 2){
               //物流信息
              /* if(sign == 2){
                   layer.msg("暂时没有物流信息，请稍后查询!",{icon:2});
               }else*/ if(fittingFlag == 0 &&  "安装" != "${order.serviceType}"){
                   layer.msg("暂时没有物流信息，请稍后查询!",{icon:2});
               }else{
                   //物流信息
                   $(".processInformation").addClass("layui-hide");
                   $(".jibenxinxi").addClass("layui-hide");
                   $(".logsticInfoNew").removeClass("layui-hide");//物流信息
               }
           }else{
               $(".jibenxinxi").removeClass("layui-hide");
               $(".processInformation").addClass("layui-hide");
               $(".logsticInfoNew").addClass("layui-hide");
           }
        })

        $(".xiugaiOrder").click(function(){
            $(this).addClass("layui-hide");
            $(".uodateorder").removeClass("layui-hide");
            $(".cancelorder").removeClass("layui-hide");
            $(".orderfroma").find("input").removeClass("layui-bg-gray");
            $(".orderfroma").find("input").removeClass("layui-disabled");
            $(".orderfroma").find("input").removeAttr("disabled");
            $(".orderfroma").find("select").removeAttr("disabled");
            $("#applianceBarcode").removeAttr("disabled").removeClass("layui-disabled").removeClass("layui-bg-gray");
            $("#applianceBuyTime").removeAttr("disabled").removeClass("layui-disabled").removeClass("layui-bg-gray");
            $("#pleaseReferMall").removeAttr("disabled").removeClass("layui-disabled").removeClass("layui-bg-gray");
            $("#applianceBarcode").removeAttr("disabled").removeClass("layui-disabled").removeClass("layui-bg-gray");
            $("textarea").removeClass("layui-bg-gray");
            $("#remarks").attr("disabled",false);
            form.render('select');
        })
        //保存
        $(".uodateorder").click(function(){
            //验证不必填项的值格式
            var shuzi = /[0-9]*[1-9][0-9]*$/;
            var customerName = $("input[name=customerName]").val();//用户姓名
            if(isBlank(customerName)){
                layer.msg("请输入用户姓名!",{icon:2})
                return false
            }
            var customerMobile = $("input[name=customerMobile]").val();//联系方式1

            var customerSex = $('input[name="customerSex"]:checked').val();//用户性别
            var customerTelephone = $("input[name=customerTelephone]").val();//联系方式2
            var province = $("#province").find("option:selected").text();//省
            var city = $("#city").find("option:selected").text();//市
            var area = $("#area").find("option:selected").text();//区

            var applianceModel = $("select[name=applianceModel]").val();//型号
            var applianceBarcode = $("input[name=applianceBarcode]").val();//机身条码
            var applianceBuyTime = $("input[name=applianceBuyTime]").val();//购买时间
            var pleaseReferMall = $("#pleaseReferMall").find("option:selected").text();//购买渠道  1
            var warrantyType = $("#warrantyType").find("option:selected").val();//保修类型



            var remarks = $("textarea[name=remarks]").val();//故障描述
            var customerAddress = $("input[name=customerAddress]").val();//用户地址
            if (isBlank(customerMobile)) {
                layer.msg("请输入联系方式",{icon:2});
                return
            } else if (!isPhoneNo($.trim(customerMobile))) {
                layer.msg("手机号码格式不正确",{icon:2});
                return
            } else if (isBlank(customerAddress)) {
                layer.msg("请输入详细地址",{icon:2});
                return
            }

            if (isBlank(remarks)) {
                layer.msg("请输入故障描述",{icon:2});
                return
            }

            var applianceNum = $("#applianceNum").val();//产品数量
            if(!shuzi.test(applianceNum)){

                layer.msg("家电数量格式不正确!",{icon:2})
                return false
            }
            var orderId = $("#orderId").val();//工单id
            var orderStatus = ${order.status};
            var serviceType = "${order.serviceType}";
            $.ajax({
                url:"${ctx}/order/saveUpdate",
                type:"post",
                data:{
                    orderId:orderId,
                    customerName:customerName,
                    customerMobile:customerMobile,
                    customerSex:customerSex,
                    customerTelephone:customerTelephone,
                    province:province,
                    city:city,
                    area:area,
                //    applianceModel:applianceModel,
                    applianceBarcode:applianceBarcode,
                    applianceBuyTime:applianceBuyTime,
                    pleaseReferMall:pleaseReferMall,
                    remarks:remarks,
                    customerAddress:customerAddress
                }
                ,success:function (result) {
                    if(result.code=="505"){
                        layer.msg("保存失败",{icon:2});
                    }else{
                        layer.msg("保存成功",{icon:1});
                        window.location.reload();
                    }
                },error:function () {
                    layer.msg("保存失败",{icon:2});
                }
            })


        })
        //取消
        $(".cancelorder").click(function(){
            $(this).addClass("layui-hide");
            $(".uodateorder").addClass("layui-hide");
            $(".xiugaiOrder").removeClass("layui-hide");

            window.location.reload();

        })

        var orderId = $("#orderId").val();
        /**
         * 重新回访
         * anewCallbackOrder
         */
        $(".anewCallback").click(function(){
            layer.open({
                type: 2,
                content: "${ctx}/callback/anewCallbackOrder?orderId="+orderId  //这里content是一个DOM，注意：最好该元素要存放在body最外层，否则可能被其它的相对元素所影响
                ,title: "重新回访"
                ,btn:['保存',"取消"]
                ,area:["900px","430px"]
                ,yes: function(index, layero){
                    var iframeWindow = window['layui-layer-iframe'+ index]
                        ,submitID = 'sureSubmit'
                        ,submit = layero.find('iframe').contents().find('#'+ submitID);

                    //监听提交
                    iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
                        var val = layero.find('iframe').contents();
                        var id = val.find("input[name=\"id\"]").val();
                        var serviceAttitude = val.find("select[name=\"serviceAttitude\"]").val();
                        var safetyEvaluation = val.find("select[name=\"safetyEvaluation\"]").val();
                        var result = val.find("select[name=\"result\"]").val();
                        var serviceStep = val.find("select[name=\"serviceStep\"]").val();

                        var remarks=  val.find("textarea").val();


                        $.ajax({
                            type:"POST",
                            url:"${ctx}/callback/anewCallbackUpdate",
                            data:{
                                id:id,
                                orderId:orderId,
                                result:result,
                                serviceStep:serviceStep,
                                serviceAttitude:serviceAttitude,
                                safetyEvaluation:safetyEvaluation,
                                remarks:remarks
                            },
                            success:function(result){
                                if(result.code ==200){
                                    //先得到当前iframe层的索引
                                    var index = parent.layer.getFrameIndex(window.name);
                                    //再执行关闭
                                    layer.msg('重新回访成功！', {icon:1,time:1000},function(){
                                        parent.layer.close(index);
                                        parent.location.reload(); //刷新父页面
                                    })
                                }else if(result.code == "505"){
                                    layer.msg('重新反馈封单失败,该工单不满足封单条件!', {icon:2,time:1000});
                                }else{
                                    layer.msg('重新回访失败,数据有误', {icon:2,time:1000});
                                }
                            }
                        });

                    });
                    submit.trigger('click');
                }
                ,btn3: function(index, layero){
                    //return false 开启该代码可禁止点击该按钮关闭
                },
                success : function(layero) {
                    layero.find('.layui-layer-btn').css('text-align', 'center');
                    layero.find('.layui-layer-btn').find(".layui-layer-btn0").css("background-color","#009688");
                }
            });
        })


        //服务商结算
        $(".siteSettle").click(function(){
            layer.open({
                type: 2,
                content: "${ctx}/settlement/site/stat/getSettlement?orderId="+orderId  //这里content是一个DOM，注意：最好该元素要存放在body最外层，否则可能被其它的相对元素所影响
                ,title: "服务商结算"
                ,btn:['结算完成',"取消"]
                ,area:["1000px","400px"]
                ,yes: function(index, layero){
                    var iframeWindow = window['layui-layer-iframe'+ index]
                        ,submitID = 'setSubmit'
                        ,submit = layero.find('iframe').contents().find('#'+ submitID);

                    //监听提交
                    iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
                        var val = layero.find('iframe').contents();
                        var  cost = /^(\-)?\d+(.\d{1,2})?$/;
                        var zhengshu=/^([1-9]\d*|[0]{1,1})$/;
                        var serviceMeasures = val.find("select[name=\"serviceMeasures\"]").find("option:selected").attr("title");
                        var serviceStep = val.find("select[name=\"serviceStep\"]").val();
                        var serviceCosts = val.find("input[name=\"serviceCosts\"]").val();
                        var rewardCosts = val.find("input[name=\"rewardCosts\"]").val();
                        var otherCost = val.find("input[name=\"otherCost\"]").val();
                        var mileageCost = val.find("input[name=\"mileageCost\"]").val();
                        var exigencyCosts = val.find("input[name=\"exigencyCosts\"]").val();
                        var remarks=  val.find("textarea[name=\"remarks\"]").val();

                        if(isBlank(serviceMeasures)){
                            layer.msg("请选择结算方案!",{icon:2});
                            return false
                        }
                        if(isBlank(serviceStep)){
                            layer.msg("请选择服务措施!",{icon:2});
                            return false
                        }
                        if(!isBlank(serviceCosts) && !cost.test(serviceCosts)){
                            layer.msg("服务费用为可保留两位小数的正数!",{icon:2});
                            return false
                        }
                        if(!isBlank(rewardCosts) && !cost.test(rewardCosts)){
                            layer.msg("奖惩费用为可保留两位小数的正数!",{icon:2});
                            return false
                        }
                        if(!isBlank(otherCost) && !cost.test(otherCost)){
                            layer.msg("其他费用为可保留两位小数的正数!",{icon:2});
                            return false
                        }
                        if(!isBlank(mileageCost) && !zhengshu.test(mileageCost)){
                            layer.msg("里程费为正整数!",{icon:2});
                            return false
                        }
                        if(!isBlank(exigencyCosts) && !cost.test(exigencyCosts)){
                            layer.msg("加急费用为可保留两位小数的正数!",{icon:2});
                            return false
                        }

                        $.ajax({
                            type:"POST",
                            url:"${ctx}/settlement/site/stat/saveSettlementOrder",
                            data:{
                                orderId:orderId,
                                serviceMeasures:serviceMeasures,
                                serviceStep:serviceStep,
                                serviceCosts:serviceCosts,
                                rewardCosts:rewardCosts,
                                otherCost:otherCost,
                                mileageCost:mileageCost,
                                exigencyCosts:exigencyCosts,
                                remarks:remarks,
                            },
                            success:function(result){
                                if(result.code =="200"){
                                    //先得到当前iframe层的索引
                                    var index = parent.layer.getFrameIndex(window.name);
                                    //再执行关闭
                                    layer.msg('结算成功！', {icon:1,time:1000},function(){
                                        parent.layer.close(index);
                                        parent.location.reload(); //刷新父页面
                                    })
                                }else if(result.code == "408"){
                                    layer.msg('服务措施为空', {icon:2,time:1000});
                                }else if(result.code == "505"){
                                    layer.msg('结算失败失败,该工单不满足封单条件!', {icon:2,time:1000});
                                }else{
                                    layer.msg('结算失败,数据有误', {icon:2,time:1000});
                                }
                            }
                        });

                    });
                    submit.trigger('click');
                }
                ,btn3: function(index, layero){
                    //return false 开启该代码可禁止点击该按钮关闭
                },
                success : function(layero) {
                    layero.find('.layui-layer-btn').css('text-align', 'center');
                    layero.find('.layui-layer-btn').find(".layui-layer-btn0").css("background-color","#009688");
                }
            });
        })

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

        //旋转
        var deg = 0;
        $(".xuanZhuan").click(function(){
            deg += 90;
            document.getElementById("image").style.transform = "rotate(" + deg + "deg)";
        })
        //却换服务反馈按钮
        var fuwu = $('.fuwufankuiorder button');
        fuwu.click(function () {
            fuwu.removeClass("layui-btn-primary");
            $(this).addClass("layui-btn-primary");
            var index=fuwu.index(this);

            $(".orderRelation").addClass("layui-hide");
            $(".orderqitaxinxi").find(".orderRelation").eq(index).removeClass("layui-hide");


            if(index == 2){
               //备件信息
               orderFitting(orderId);
           }
        })

       if("${type}" == 2){
           $(".processInformation").removeClass("layui-hide");
           $(".jibenxinxi").addClass("layui-hide");
           $(".logsticInfoNew").addClass("layui-hide");
           guocheng(orderId)
       }


       if(${order.status == 1}){
           orderFitting(orderId);
       }
        function guocheng(orderId){

            $.ajax({
                type:"POST",
                url:"${ctx}/order/getOrderDetail",
                data:{
                    orderId:orderId
                },
                success:function(data){
                    if(data!=null){
                        var deatil ="";
                        for(var i =0;i<data.length;i++){
                            deatil += '<li class="layui-timeline-item"><i class="layui-icon layui-timeline-axis"></i>';
                            deatil += '<div class="layui-timeline-content layui-text">';
                            deatil +=' <h4 class="layui-timeline-title">'+data[i].d+'</h4> <p>';
                            deatil += data[i].c+ '  </p> </div> </li>';
                        }
                        $(".guoChen").html(deatil);
                    }else{
                        layer.msg("数据有误！", {icon: 2});
                    }
                }
            });
        }

        //查看物流信息
        $(".productInfo").click(function(){
            var logisticName = $("#logisticName").val();
            var logisticNo = $("#logisticNo").val();
            var orderId = $("#orderId").val();
            addLogisticInfo(logisticName,logisticNo,orderId);
        })

        //查看已发备件信息
        $(".fitRefundInfo").click(function(){
            var logisticName = $("#logisticName").val();
            var logisticNo = $("#logisticNo").val();
            var orderId = $("#orderId").val();
            addLogisticInfo(logisticName,logisticNo,orderId);
        })

        //查看添加备件申请获取的物流信息
        $(".fitApplyInfo").click(function(){
            var logisticName = $(this).attr("data-logName");
            var logisticNo = $(this).attr("data-logNumber");
            var orderId = $("#orderId").val();
            addLogisticInfo(logisticName,logisticNo,orderId);
        })

        //查看新建，旧件返厂物流信息
        $(".returnFactoryInfo").click(function(){
            var logisticName = $(this).attr("data-logName");
            var logisticNo = $(this).attr("data-logNum");
            var orderId = $("#orderId").val();
            $.ajax({
                type:"POST",
                url:"${ctx}/main/order/logisticsDetail",
                data:{
                    orderId:orderId,
                    logisticName:logisticName,
                    logisticNo:logisticNo
                },
                success:function(data){
                    if(data!=null){
                        var deatil ="";
                        for(var i =0;i<data.length;i++){
                            deatil += '<li class="layui-timeline-item">';
                            deatil += '<i class="layui-icon layui-timeline-axis"></i>';
                            deatil += '<div class="layui-timeline-content layui-text">';
                            deatil += '<div class="layui-timeline-title">'+data[i].AcceptTime+" "+data[i].AcceptStation+'</div>';
                            deatil += '</div>';
                            deatil += '</li>';
                        }
                        $(".returnFactory").html(deatil);
                    }else{
                        layer.msg("数据有误！", {icon: 2});
                    }

                }
            })
        })

        function addLogisticInfo(logisticName,logisticNo,orderId){
            $(".logisticInfor").empty()
            $.ajax({
                type:"POST",
                url:"${ctx}/main/order/logisticsDetail",
                data:{
                    orderId:orderId,
                    logisticName:logisticName,
                    logisticNo:logisticNo
                },
                success:function(data){
                    if(data!=null){
                        var deatil ="";
                        for(var i =0;i<data.length;i++){
                            deatil += '<li class="layui-timeline-item">';
                            deatil += '<i class="layui-icon layui-timeline-axis"></i>';
                            deatil += '<div class="layui-timeline-content layui-text">';
                            deatil += '<div class="layui-timeline-title">'+data[i].AcceptTime+" "+data[i].AcceptStation+'</div>';
                            deatil += '</div>';
                            deatil += '</li>';
                        }
                        $(".logisticInfor").html(deatil);
                    }else{
                        layer.msg("数据有误！", {icon: 2});
                    }

                }
            })
        }

        function orderFitting(orderId){
            $(".bodyContent").empty();
            $.ajax({
                type:"POST",
                url:"${ctx}/order/getOrderFittingByorderId",
                data:{
                    orderId:orderId,
                    siteId:siteId
                },
                success:function(data){
                    if(data!=null){
                        var deatil ="";
                        for(var i =0;i<data.length;i++){
                            var status = data[i].columns.status;
                            var stname ="";
                            if(status == 1){
                                stname = "待发货";
                            }else if(status == 2){
                                stname = "备件在途";
                            }else if(status == 3){
                                stname = "已完成";
                            }
                            var fitting_code= data[i].columns.fitting_code;
                            if(isBlank(fitting_code)){
                                fitting_code="";
                            }
                            deatil +=' <tr>';
                            deatil += ' <td style="overflow:hidden;" class="text-over" title="'+data[i].columns.fitting_name+'">' + data[i].columns.fitting_name + '</td>';
                            deatil += ' <td style="overflow:hidden;" class="text-over" >' + fitting_code + '</td>';
                            deatil += ' <td style="overflow:hidden;" class="text-over" title="'+data[i].columns.apply_marks+'">' + data[i].columns.apply_marks + '</td>';
                            deatil += ' <td style="overflow:hidden;" class="text-over">' + stname + '</td>';
                            deatil += ' <td style="overflow:hidden;" class="text-over">' + data[i].columns.apply_num + '</td>';
                            deatil += ' <td style="overflow:hidden;" class="text-over">' + returOldFit(data[i].columns.old_fitting_flag) + '</td>';
                            deatil += ' <td style="overflow:hidden;" class="text-over">' + returnedOldFit(data[i].columns.return_fitting) + '</td>';
                            deatil += ' <td style="overflow:hidden;" class="text-over" title="'+data[i].columns.delivery_name+'">' + data[i].columns.delivery_name + '</td>';
                            deatil += ' <td style="overflow:hidden;" class="text-over" title="'+data[i].columns.delivery_mobile+'">' + data[i].columns.delivery_mobile + '</td>';
                            deatil += ' <td style="overflow:hidden;" class="text-over" title="'+data[i].columns.delivery_address+'">' + data[i].columns.delivery_address + '</td>';
                            deatil +=' </tr>';
                        }
                        $(".bodyContent").html(deatil);
                    }else{
                       // layer.msg("数据有误！", {icon: 2});
                    }
                }
            });
        }
        function isPhoneNo(phone) {
            var tel = /(^1\d{10}$)|(^(\d{3,4}\-)?\d{5,9}$)/;
            return tel.test($.trim(phone));
        }

    });


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

    function totalChange(){
        var total=0.00;
        $(".cost").each(function(index, el){
            var Fee = ($(el).val()).trim();
            if (!isNaN(parseFloat(Fee))){
                total+=parseFloat(Fee);
            }
        })
        $("#total").val(total.toFixed(2));
    }

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