<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
    <title>客户信息</title>
    <meta name="decorator" content="default"/>
</head>
<body >
<div class="single-form view-form">
    <div class="container">
        <div class="form-group layui-row first">
            <div class="form-group-label"><h2>基本信息</h2></div>
            <div class="layui-item layui-col-sm6 lw7">
                <label class="layui-form-label"><span class="require-item">*</span>客户名称：</label>
                <div class="layui-input-block">
                    <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.name}"/>
                </div>
            </div>
            <div class="layui-item layui-col-sm6 lw7">
                <label class="layui-form-label double-line"><span class="require-item">*</span>拥有统一社会信用代码：</label>
                <div class="layui-input-block">
                    <span class="radio-box">&nbsp;&nbsp;
                        <input type="radio" class="usccClass" name="hasUscc" label="是" disabled="true" <c:if test="${workClientInfo.hasUscc eq 1}">checked="true"</c:if> />是
                        &nbsp;&nbsp;
                        <input type="radio" class="usccClass" name="hasUscc" label="否" disabled="true" <c:if test="${workClientInfo.hasUscc eq 2}">checked="true"</c:if> />否
                    </span>
                </div>
            </div>
            <div class="layui-item layui-col-sm6 lw7">
                <label class="layui-form-label"><span class="require-item">*</span>客户性质：</label>
                <div class="layui-input-block">
                    <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${fns:getMainDictLabel(workClientInfo.companyType, 'company_type', '')}"/>
                </div>
            </div>
            <div class="layui-item layui-col-sm6 lw7">
                <label class="layui-form-label double-line"><span class="require-item">*</span>统一社会信用代码：</label>
                <div class="layui-input-block">
                    <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.uscCode}"/>
                </div>
            </div>
            <div class="layui-item layui-col-sm6 lw7">
                <label class="layui-form-label"><span class="require-item">*</span>所在行业：</label>
                <div class="layui-input-block">
                    <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${fns:getMainDictLabel(workClientInfo.companyIndustry, 'company_industry', '')}"/>
                </div>
            </div>
            <div class="layui-item layui-col-sm6 lw7">
                <label class="layui-form-label"><span class="require-item">*</span>所在地区：</label>
                <div class="layui-input-block with-icon">
                    <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.area.name}"/>
                </div>
            </div>
            <div class="layui-item layui-col-sm6 lw7">
                <label class="layui-form-label">法人代表：</label>
                <div class="layui-input-block">
                    <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.lawerPresint}"/>
                </div>
            </div>
            <div class="layui-item layui-col-sm6 lw7">
                <label class="layui-form-label">邮政编码：</label>
                <div class="layui-input-block">
                    <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.zipCode}"/>
                </div>
            </div>
            <div class="layui-item layui-col-sm6 lw7">
                <label class="layui-form-label">传真：</label>
                <div class="layui-input-block">
                    <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.fax}"/>
                </div>
            </div>
            <div class="layui-item layui-col-sm6 lw7">
                <label class="layui-form-label">客户类型：</label>
                <div class="layui-input-block">
                    <input htmlEscape="false" readonly="true" class="form-control layui-input" value="<c:set value="${fn:split(workClientInfo.clientType, ',') }" var="clientTypes" /><c:forEach items="${clientTypes}" var="cType" varStatus="status">${fns:getMainDictLabel(cType, 'client_type', '')}<c:if test="${!status.last}">, </c:if></c:forEach>"/>
                </div>
            </div>
            <div class="layui-item layui-col-sm6 lw7">
                <label class="layui-form-label">公司电话：</label>
                <div class="layui-input-block">
                    <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.telephone}"/>
                </div>
            </div>
            <div class="layui-item layui-col-sm6 lw7">
                <label class="layui-form-label">公司网址：</label>
                <div class="layui-input-block">
                    <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.companyUrl}"/>
                </div>
            </div>
            <div class="layui-item layui-col-sm12 lw7">
                <label class="layui-form-label"><span class="require-item">*</span>注册地址：</label>
                <div class="layui-input-block">
                    <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.registerAddress}"/>
                </div>
            </div>
            <div class="layui-item layui-col-sm12 lw7">
                <label class="layui-form-label">详细地址：</label>
                <div class="layui-input-block">
                    <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.address}"/>
                </div>
            </div>
            <div class="layui-item layui-col-sm12 lw7">
                <label class="layui-form-label"><span class="require-item">*</span>开户行信息：</label>
                <div class="layui-input-block">

                    <table id="bankinfo" class="table table-bordered table-condensed details">
                        <thead>
                        <tr>
                            <th width="80px">序号</th>
                            <th ><font color="red">*</font>开户银行</th>
                            <th width="400px;"><font color="red">*</font>开户账号</th>

                        </tr>
                        </thead>
                        <tbody id="workClientBankList">
                        <c:forEach items="${workClientInfo.workClientBankList}" var="workClientBank" varStatus="status">
                            <tr>
                                <td>${status.index + 1}</td>
                                <td>${workClientBank.ourBank}</td>
                                <td>${workClientBank.bankNumber}</td>
                            </tr>
                        </c:forEach>
                        <c:if test="${bankSize == 0}">
                            <tr>
                                <td colspan="3">暂无数据</td>
                            </tr>
                        </c:if>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="layui-item layui-col-sm12 with-textarea lw7">
                <label class="layui-form-label">单位简介：</label>
                <div class="layui-input-block">
                    <textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000" class="form-control" >${workClientInfo.unitIntroduction}</textarea>
                </div>
            </div>
        </div>

        <div class="form-group layui-row">
            <div class="form-group-label"><h2>联系人信息</h2></div>
            <div class="layui-item layui-col-xs12 form-table-container" >
                <table id="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
                    <thead>
                    <tr>
                        <th class="hide"></th>
                        <th width="150px"><font color="red">*</font>联系人姓名</th>
                        <th >部门</th>
                        <th width="150px">职务</th>
                        <th width="150px">QQ</th>
                        <th width="150px">联系方式1</th>
                        <th width="150px">联系方式2</th>
                        <th width="150px">E-mail</th>
                    </tr>
                    </thead>
                    <tbody id="workClientLinkmanList">
                    <c:forEach items="${workClientInfo.workClientLinkmanList}" var="workClientLinkman" varStatus="status">
                        <tr>
                            <td class="hide">${status.index + 1}</td>
                            <td >${workClientLinkman.name}</td>
                            <td >${workClientLinkman.office}</td>
                            <td >${workClientLinkman.position}</td>
                            <td >${workClientLinkman.qq}</td>
                            <td >${workClientLinkman.linkPhone}</td>
                            <td >${workClientLinkman.linkMobile}</td>
                            <td >${workClientLinkman.email}</td>
                        </tr>
                    </c:forEach>
                    <c:if test="${linkManSize == 0}">
                        <tr>
                            <td colspan="8">暂无数据</td>
                        </tr>
                    </c:if>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="form-group layui-row">
            <div class="form-group-label"><h2>附件信息</h2></div>
            <div class="layui-item layui-col-xs12 form-table-container" >
                <table id="contentTable1" class="table table-bordered table-condensed details">
                    <thead>
                    <tr>
                        <%-- <th>序号</th>--%>
                        <th>文件预览</th>
                        <th>上传人</th>
                        <th>上传时间</th>
                        <th width="150px">操作</th>
                    </tr>
                    </thead>
                    <tbody id="workClientAttachmentList">
                    <c:choose>
                        <c:when test="${not empty workClientInfo.workAttachments}">
                            <c:forEach items="${workClientInfo.workAttachments}" var="workClientAttachment"
                                       varStatus="status">
                                <tr>
                                        <%-- <td>${status.index + 1}</td>--%>
                                    <c:choose>
                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
                                            <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
                                        </c:when>
                                        <c:otherwise>
                                            <c:choose>
                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
                                                    <td><a href="javascript:void(0)"
                                                           onclick="preview('预览','${workClientAttachment.url}','95%','95%','1')">${workClientAttachment.attachmentName}</a>
                                                    </td>
                                                </c:when>
                                                <c:otherwise>
                                                    <td><a href="javascript:void(0)"
                                                           onclick="preview('预览','${workClientAttachment.url}','95%','95%')">${workClientAttachment.attachmentName}</a>
                                                    </td>
                                                </c:otherwise>
                                            </c:choose>
                                        </c:otherwise>
                                    </c:choose>
                                    <td>${workClientAttachment.createBy.name}</td>
                                    <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
                                    <td class="op-td">
                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));"
                                           class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
                                    </td>
                                </tr>
                            </c:forEach>
                        </c:when>
                        <c:otherwise>
                            <tr>
                                <td colspan="4" align="center">暂无数据</td>
                            </tr>
                        </c:otherwise>
                    </c:choose>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="form-group layui-row page-end"></div>

    </div>
</div>

</body>
</html>
