<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
    <title>客户信息</title>
    <meta name="decorator" content="default"/>
</head>
<body class="hideScroll">
<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
    <tbody>
        <tr>
            <td class="width-15 active" rowspan="14"><label class="pull-right">基本信息：</label></td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right"><font color="red">*</font>客户名称：</label></td>
            <td class="width-85" colspan="3">
                ${workFullManage.workClientInfo.name}
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">组织机构代码：</label></td>
            <td class="width-35">
                ${workFullManage.workClientInfo.orUnicode}
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right"><font color="red">*</font>客户性质：</label></td>
            <td class="width-35">
                ${fns:getMainDictLabel(workFullManage.workClientInfo.companyType, 'company_type', '')}
            </td>
            <td class="width-15 active"><label class="pull-right"><font color="red">*</font>所在行业：</label></td>
            <td class="width-35">
                ${fns:getMainDictLabel(workFullManage.workClientInfo.companyIndustry, 'company_industry', '')}
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right"><font color="red">*</font>客户类型：</label></td>
            <td class="width-35">
                ${fns:getMainDictLabel(workFullManage.workClientInfo.clientType, 'client_type', '')}
            </td>
            <td class="width-15 active"><label class="pull-right">信用等级：</label></td>
            <td class="width-35">
                ${fns:getDictLabel(workFullManage.workClientInfo.creditRank, 'credit_rank', '')}
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right"><font color="red">*</font>所在地区：</label></td>
            <td class="width-35">
                ${workFullManage.workClientInfo.area.name}
            </td>
            <td class="width-15 active"><label class="pull-right">法人代表：</label></td>
            <td class="width-35">
                ${workFullManage.workClientInfo.lawerPresint}
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">邮政编码：</label></td>
            <td class="width-35">
                ${workFullManage.workClientInfo.zipCode}
            </td>
            <td class="width-15 active"><label class="pull-right">传真：</label></td>
            <td class="width-35">
                ${workFullManage.workClientInfo.fax}
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">电子邮箱：</label></td>
            <td class="width-35">
                ${workFullManage.workClientInfo.email}
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right"><font color="red">*</font>开户银行及开户账号：</label></td>
            <td colspan="3">
                    <%--table table-striped table-bordered table-hover table-condensed dataTables-example dataTable--%>
                    <table id="bankinfo" class="table table-striped table-bordered table-condensed">
                        <thead>
                        <tr>
                                <%--<th> <input type="checkbox" class="i-checks"></th>--%>
                            <th  class="sort-column name">序号</th>
                            <th  class="sort-column companyType">开户银行</th>
                            <th  class="sort-column clientType">开户账户</th>
                        </tr>
                        </thead>
                        <tbody id="workClientBankList">
                            <c:forEach items="${workFullManage.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>
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right"><font color="red">*</font>税务号：</label></td>
            <td class="width-35" colspan="3">
                ${workFullManage.workClientInfo.taxId}
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">注册地址：</label></td>
            <td class="width-35" colspan="3">
                ${workFullManage.workClientInfo.registerAddress}
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">详细地址：</label></td>
            <td class="width-35" colspan="3">
                ${workFullManage.workClientInfo.address}
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">公司网址：</label></td>
            <td class="width-35" colspan="3">
                ${workFullManage.workClientInfo.companyUrl}
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">单位简介：</label></td>
            <td class="width-35" colspan="3">
                ${workFullManage.workClientInfo.remarks}
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">联系人：</label></td>
            <td colspan="4">
                <table id="contentTable" class="table table-striped table-bordered table-condensed">
                    <thead>
                    <tr>
                        <th class="hide"></th>
                        <th>序号</th>
                        <th>联系人姓名</th>
                        <th>职务</th>
                        <th>QQ</th>
                        <th>联系方式1</th>
                        <th>联系方式2</th>
                        <th>E-mail</th>
                        <th>是否默认联系人</th>
                    </tr>
                    </thead>
                    <tbody id="workClientLinkmanList">
                    <c:forEach items="${workFullManage.workClientInfo.workClientLinkmanList}" var="workClientLinkman" varStatus="status">
                        <tr>
                            <td>${status.index + 1}</td>
                            <td>${workClientLinkman.name}</td>
                            <td>${workClientLinkman.position}</td>
                            <td>${workClientLinkman.qq}</td>
                            <td>${workClientLinkman.linkPhone}</td>
                            <td>${workClientLinkman.linkMobile}</td>
                            <td>${workClientLinkman.email}</td>
                            <td>${workClientLinkman.isDefault}</td>
                        </tr>
                    </c:forEach>
                    <c:if test="${linkManSize == 0}">
                        <tr>
                            <td colspan="8">暂无数据</td>
                        </tr>
                    </c:if>
                    </tbody>
                </table>
            </td>
        </tr>
        <tr>
            <td class="width-15 active"><label class="pull-right">客户资料：</label></td>
            <td colspan="4">
                <table id="contentTable1" class="table table-striped table-bordered table-condensed">
                    <thead>
                    <tr>
                        <th class="hide"></th>
                        <%--<th>序号</th>--%>
                        <th>文件名</th>
                        <th>上传人</th>
                        <th>上传时间</th>
                    </tr>
                    </thead>
                    <tbody id="workClientAttachmentList">
                    <c:forEach items="${workFullManage.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" alt="${workClientAttachment.attachmentName}"/></td>
                                </c:when>
                                <c:otherwise>
                                    <c:choose>
                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
                                            <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','80%','80%','1')">${workClientAttachment.attachmentName}</a></td>
                                        </c:when>
                                        <c:otherwise>
                                            <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','80%','80%')">${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>
                        </tr>
                    </c:forEach>
                    <c:if test="${attachmentSize == 0}">
                        <tr>
                            <td colspan="4">暂无数据</td>
                        </tr>
                    </c:if>
                    </tbody>
                </table>
                <script type="text/javascript">
                    $(function () {
                        $("img").not(".upload_ico").each(function () {
                            var num = 1 ;
                            $(this).click(function () {
                                var flag = num%2;
                                if(flag == 1){
                                    $(this).css("width","90%");
                                    $(this).css("height","90%");
                                    num++;
                                }else if(flag ==0){
                                    $(this).css("width","50px");
                                    $(this).css("height","50px");
                                    num++;
                                }
                            })
                        });
                    })
                </script>
            </td>
        </tr>
    </tbody>
</table>
</body>
</html>