123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899 |
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/WEB-INF/views/include/taglib.jsp" %>
- <html>
- <head>
- <title>机构基本资料列表</title>
- <meta name="decorator" content="default"/>
- <style type="text/css">
- .reg-row .new-tag.active{border:1px solid #de5801}
- .reg-row{margin-bottom:20px}
- .reg-row .reg-label{display:inline-block;width:120px;text-align:right;font-size:13px}
- .the-oradio{display:inline-block;vertical-align:top}
- .the-oradio div{width:85px;display:inline-block;font-size:12px;color:#666}
- .the-oradio div input[type="radio"]{width:17px;height:17px;margin-right:5px;vertical-align:text-top}
- .med-option{display:block;margin:10px 0 0 125px}
- .reg-row .business-license{position:relative;display:inline-block;width:166px;height:123px;border-radius:6px;margin:18px 0 0 125px}
- #medicalPracticeLicenseImgPreview{display:inline-block}
- .qualification{margin-top:20px}
- .reg-row .tags-area{display:inline-block;width:420px}
- .reg-row .new-tag{display:inline-block;width:70px;border:1px solid #e5e5e5;border-radius:6px;padding:5px;margin-right:14px;margin-bottom:14px;text-align:center;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
- .reg-row .tags-operate{margin-left:125px}
- .reg-row .reg-input{width:336px;height:32px;padding:0 8px;margin-right:20px;border:1px solid #dcdcdc;border-radius:6px}
- .reg-row .tags-operate .tag-input{width:159px;margin-right:13px;display:none;vertical-align:top}
- .reg-row .tags-operate .tag-add{line-height:20px;vertical-align:middle;margin-bottom:0;vertical-align:top}
- .reg-row .tags-area{vertical-align:top}
- .tag-add{display:none}
- .table th{text-align:center}
- .table td{text-align:center}
- .modal{width:700px;margin-left:-350px}
- #myModal{display:none}
- .modal-body{max-height:300px !important}
- .modal.fade.in{top:0 !important}
- #btnSubmit{margin-left:20px}
- .flex-wrap .item{margin-right:20px}
- #auditBox{padding:20px;line-height:30px}
- #auditBox .bd-row{display:flex;margin-bottom:15px}
- #auditBox .bd-row > span{display:inline-block;width:60px}
- #auditBox .auditCheckBox{width:250px}
- #auditBox .auditCheckBox label{margin:0 5px 5px 0}
- #auditBox .auditCheckBox input{display:none}
- #auditBox .auditCheckBox input + span{display:inline-block;line-height:24px;padding:0 12px;border:1px solid #666;border-radius:5px}
- #auditBox .auditCheckBox input:checked + span{background-color:#E6633A}
- #alertModal{width:300px;height:200px;border:1px solid #ebebeb;border-radius:10px;position:fixed;top:0;bottom:0;left:0;right:0;margin:auto;background:#FFFFFF;display:none}
- #alertModal .title{height:50px;line-height:50px;font-size:14px;font-weight:bold;text-align:center;position:relative;border-bottom:1px solid #EBEBEB}
- #alertModal .close{width:50px;height:50px;display:block;position:absolute;right:0;top:0;line-height:50px;color:#000;font-weight:bold;text-align:center;font-style:normal;font-size:18px}
- #alertModal .alert-content{width:260px;height:60px;padding:20px}
- #alertModal .alertModal-btn{width:260px;height:49px;padding:0 20px;border-top:1px solid #EBEBEB}
- #alertModal .alertModal-btn button{float:right;margin:5px}
- .acticer_span{display: inline-block;width: 14px;height: 14px;border-radius: 50%;box-sizing: border-box;border: 1px solid #999999;text-align: center;color: #333333;font-size: 12px;line-height: 14px;float: none;margin-left: 3px;}
- </style>
- </head>
- <body>
- <ul class="nav nav-tabs">
- <li class="active"><a href="${ctx}/new/user/agency/">机构基本资料列表</a></li>
- <li><a href="${ctx}/new/user/agency/statisticsList">机构分析统计列表</a></li>
- <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
- <li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
- </ul>
- <form:form id="searchForm" modelAttribute="newCmClub" action="${ctx}/new/user/agency/" method="post"
- class="breadcrumb form-search">
- <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
- <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
- <div class="flex-wrap">
- <div class="item">
- <label>机构ID:</label>
- <form:input path="clubID" htmlEscape="false" maxlength="50" class="input-medium"/>
- </div>
- <div class="item">
- <label>机构名称:</label>
- <form:input path="searchName" htmlEscape="false" maxlength="50" class="input-medium"/>
- </div>
- <div class="item">
- <label>联系人:</label>
- <form:input path="searchUserName" htmlEscape="false" maxlength="50" class="input-medium"/>
- </div>
- <div class="item">
- <label>手机号:</label>
- <form:input path="searchBindMobile" htmlEscape="false" maxlength="50" class="input-medium"/>
- </div>
- <div class="item">
- <label>邮箱:</label>
- <form:input path="searchEmail" htmlEscape="false" maxlength="50" class="input-medium"/>
- </div>
- <div class="item">
- <label> 状态:</label>
- <form:select path="searchStatus" class="input-medium">
- <form:option value="" label="请选择"/>
- <form:options items="${fns:getDictList('club_status')}" itemLabel="label" itemValue="value"
- htmlEscape="false"/>
- </form:select>
- </div>
- <div class="item">
- <label>机构级别:</label>
- <form:select path="searchUserIdentity" class="input-medium">
- <form:option value="" label="请选择"/>
- <form:option value="4" label="个人机构"/>
- <form:option value="2" label="资质机构"/>
- <form:option value="8" label="超级会员"/>
- </form:select>
- </div>
- <br/>
- <br/>
- <label class="control-label">活跃状态:</label>
- <form:select path="activeState" class="input-medium">
- <form:option value="" label="请选择"/>
- <form:option value="新增用户" label="新增用户"/>
- <form:option value="活跃用户" label="活跃用户"/>
- <form:option value="不活跃用户" label="不活跃用户"/>
- <form:option value="流失用户" label="流失用户"/>
- <form:option value="回流用户" label="回流用户"/>
- <form:option value="忠诚用户" label="忠诚用户"/>
- <form:option value="沉默用户" label="沉默用户"/>
- </form:select>
- <label class="control-label">客户价值:</label>
- <form:select path="customerValue" class="input-medium">
- <form:option value="" label="请选择"/>
- <form:option value="一般保持客户" label="一般保持客户"/>
- <form:option value="一般发展客户" label="一般发展客户"/>
- <form:option value="一般价值客户" label="一般价值客户"/>
- <form:option value="一般挽留客户" label="一般挽留客户"/>
- <form:option value="重要保持客户" label="重要保持客户"/>
- <form:option value="重要发展客户" label="重要发展客户"/>
- <form:option value="重要价值客户" label="重要价值客户"/>
- <form:option value="重要挽留客户" label="重要挽留客户"/>
- </form:select>
- <div class="item">
- <label>注册时间:</label>
- <form:input path="searchStartTime" type="text" maxlength="20" class="input-mini Wdate" value="${startTime}"
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
- -
- <form:input path="searchEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${endTime}"
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
- </div>
- <div class="item">
- <label>新分配机构:</label>
- <form:select path="newDeal" class="input-medium">
- <form:option value="" label="请选择"/>
- <form:option value="1">是</form:option>
- <form:option value="2">否</form:option>
- </form:select>
- </div>
- <div class="item">
- <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
- </div>
- </div>
- </form:form>
- <sys:message content="${message}"/>
- <table id="contentTable" class="table table-striped table-bordered table-condensed">
- <thead>
- <tr>
- <th>机构ID</th>
- <th>机构名称</th>
- <th>机构简称</th>
- <th>联系人</th>
- <th>手机号</th>
- <th>邮箱</th>
- <th>协销人员</th>
- <th>状态</th>
- <th>审核人</th>
- <th>机构级别</th>
- <th>活跃状态<span class="acticer_span" onmousemove="activeStageMessage(1)">?</span></th>
- <th>客户价值<span class="acticer_span" onmousemove="activeStageMessage(2)">?</span></th>
- <th>注册IP</th>
- <th>注册时间</th>
- <th>审核时间</th>
- <shiro:hasPermission name="user:newCmClub:edit">
- <th>操作</th>
- </shiro:hasPermission>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="${page.list}" var="newCmClubList">
- <tr>
- <td>${newCmClubList.clubID}</td>
- <td>
- <%-- <c:if test="${newCmClubList.userIdentity eq 2}">--%>
- ${newCmClubList.name}
- <%-- </c:if>--%>
- <%-- <c:if test="${newCmClubList.userIdentity eq 4}">--%>
- <%-- <c:if test="${newCmClubList.name ne newCmClubList.userName}">--%>
- <%-- ${newCmClubList.name}--%>
- <%-- </c:if>--%>
- <%-- <c:if test="${newCmClubList.name eq newCmClubList.userName}">--%>
- <%-- ----%>
- <%-- </c:if>--%>
- <%-- </c:if>--%>
- </td>
- <td>
- <c:if test="${newCmClubList.userIdentity eq 2}">
- ${newCmClubList.sname}
- </c:if>
- <c:if test="${newCmClubList.userIdentity eq 4}">
- <c:if test="${newCmClubList.sname ne newCmClubList.userName}">
- ${newCmClubList.sname}
- </c:if>
- <c:if test="${newCmClubList.sname eq newCmClubList.userName}">
- --
- </c:if>
- </c:if>
- </td>
- <td>
- ${newCmClubList.userName}
- </td>
- <td>
- ${newCmClubList.bindMobile}
- </td>
- <td>${newCmClubList.email}</td>
- <td>
- ${newCmClubList.spName}
- </td>
- <td>
- <c:choose>
- <c:when test="${newCmClubList.status eq 90}">
- <font color="green">已上线</font>
- <%--不存在组织的用户为采美用户,只有采美用户才有上线下线功能--%>
- <%-- <c:if test="${newCmClubList.userOrganizeID eq null or newCmClubList.userOrganizeID eq 0}">--%>
- <a href="${ctx}/new/user/agency/offline?id=${newCmClubList.clubID}&searchName=${newCmClub.searchName}&searchUserName=${newCmClub.searchUserName}&searchBindMobile=${newCmClub.searchBindMobile}&searchEmail=${newCmClub.searchEmail}&searchUserOrganizeID=${newCmClub.searchUserOrganizeID}&searchStatus=${newCmClub.searchStatus}&searchUserIdentity=${newCmClub.searchUserIdentity}&searchStartTime=${newCmClub.searchStartTime}&searchEndTime=${newCmClub.searchEndTime}" onclick="return confirmx('确定下线该会所吗?', this.href)" style="text-decoration:underline;">下线</a>
- <%-- </c:if>--%>
- </c:when>
- <c:when test="${newCmClubList.status eq 91}">
- <font color="red">已下线</font>
- <%-- <c:if test="${newCmClubList.userOrganizeID eq null or newCmClubList.userOrganizeID eq 0}">--%>
- <a href="${ctx}/new/user/agency/online?id=${newCmClubList.clubID}&searchName=${newCmClub.searchName}&searchUserName=${newCmClub.searchUserName}&searchBindMobile=${newCmClub.searchBindMobile}&searchEmail=${newCmClub.searchEmail}&searchUserOrganizeID=${newCmClub.searchUserOrganizeID}&searchStatus=${newCmClub.searchStatus}&searchUserIdentity=${newCmClub.searchUserIdentity}&searchStartTime=${newCmClub.searchStartTime}&searchEndTime=${newCmClub.searchEndTime}" onclick="return confirmx('确定上线该会所吗?', this.href)" style="text-decoration:underline;">上线</a>
- <%-- </c:if>--%>
- </c:when>
- <c:when test="${newCmClubList.status eq 92}">
- <a href="JavaScript:;" onclick="return alertx('不通过原因:${newCmClubList.auditNote}')"
- style="text-decoration:underline;"><font color="red">审核未通过</font></a>
- </c:when>
- <c:when test="${newCmClubList.status eq 93}">
- <font color="#BF826C">已确认</font>
- </c:when>
- <c:when test="${newCmClubList.status eq 94}">
- <font color="red">已冻结</font>
- </c:when>
- <c:otherwise>
- ${fns:getDictLabel(newCmClubList.status, 'club_status', newCmClubList.status)}
- </c:otherwise>
- </c:choose>
- </td>
- <td>
- ${newCmClubList.checkMan}
- </td>
- <td>
- <c:if test="${newCmClubList.userIdentity eq 4}">
- 个人机构
- </c:if>
- <c:if test="${newCmClubList.userIdentity eq 2}">
- 资质机构
- </c:if>
- <c:if test="${newCmClubList.svipUserFlag eq 1}">
- <font color="red">(超级会员)</font>
- </c:if>
- <c:if test="${newCmClubList.userIdentity eq 2 and newCmClubList.svipUserFlag eq 0}">
- <font color="red">(普通会员)</font>
- </c:if>
- </td>
- <td>
- <c:if test="${newCmClubList.activeState == null || newCmClubList.activeState == ''}">
- ---
- </c:if>
- <c:if test="${newCmClubList.activeState != null || newCmClubList.activeState != ''}">
- ${newCmClubList.activeState}
- </c:if>
- </td>
- <td>
- <c:if test="${newCmClubList.customerValue == null || newCmClubList.customerValue == ''}">
- ---
- </c:if>
- <c:if test="${newCmClubList.customerValue != null || newCmClubList.customerValue != ''}">
- ${newCmClubList.customerValue}
- </c:if>
- </td>
- <td>
- <c:if test="${newCmClubList.registerIP eq '192.168.1.10'}">
- 协销代注册
- </c:if>
- <c:if test="${newCmClubList.registerIP ne '192.168.1.10'}">
- ${newCmClubList.registerIP}
- <c:if test="${newCmClubList.source eq '0'}">
- (网站)
- </c:if>
- <c:if test="${newCmClubList.source eq '1'}">
- (小程序)
- </c:if>
- </c:if>
- </td>
- <td>
- <fmt:formatDate value="${newCmClubList.registerTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
- </td>
- <td>
- ${newCmClubList.auditTime}
- </td>
- <td>
- <a href="${ctx}/new/user/agency/clubPortrait?clubID=${newCmClubList.clubID}&clubName=${newCmClubList.name}&dateType=0&type=4">机构画像</a>
- <shiro:hasPermission name="club:cmAgency:edit">
- <a href="${ctx}/new/user/agency/form?id=${newCmClubList.clubID}&source=1&searchName=${newCmClub.searchName}&searchUserName=${newCmClub.searchUserName}&searchBindMobile=${newCmClub.searchBindMobile}&searchEmail=${newCmClub.searchEmail}&searchUserOrganizeID=${newCmClub.searchUserOrganizeID}&searchStatus=${newCmClub.searchStatus}&searchUserIdentity=${newCmClub.searchUserIdentity}&searchStartTime=${newCmClub.searchStartTime}&searchEndTime=${newCmClub.searchEndTime}">编辑</a>
- </shiro:hasPermission>
- <c:if test="${newCmClubList.status eq 90 || newCmClubList.status eq 91 || newCmClubList.status eq 40}">
- <shiro:hasPermission name="club:cmAgency:password">
- <a href="javascript:void(0);" onclick="updatePwd(${newCmClubList.userID})">重置密码</a>
- </shiro:hasPermission>
- </c:if>
- <c:if test="${newCmClubList.status eq 90 || newCmClubList.status eq 40 || newCmClubList.status eq 1 || newCmClubList.status eq 92}">
- <shiro:hasPermission name="club:cmAgency:changSp">
- <a href="javascript:void(0);" onclick="showSPSelect(${newCmClubList.clubID})">更换协销</a>
- </shiro:hasPermission>
- <shiro:hasPermission name="club:cmAgency:showOp">
- <a href="${ctx}/new/user/agency/operation?userOrganizeID=${newCmClubList.userOrganizeID}&clubID=${newCmClubList.clubID}&userID=${newCmClubList.userID}&name=${newCmClubList.name}">查看运营人员</a>
- </shiro:hasPermission>
- </c:if>
- <c:if test="${newCmClubList.status eq 1 || newCmClubList.status eq 92}">
- <shiro:hasPermission name="club:cmAgency:audit">
- <a href="javascript:void(0);" onclick="toAudit(${newCmClubList.clubID},'${newCmClubList.userName}','${newCmClubList.bindMobile}')">审核</a>
- </shiro:hasPermission>
- </c:if>
- <shiro:hasPermission name="club:cmAgency:category">
- <a href="javascript:void(0);" onclick="showClubAlert(${newCmClubList.clubID},${newCmClubList.userIdentity})">设置机构级别</a>
- </shiro:hasPermission>
- <c:if test="${newCmClubList.status eq 92 || newCmClubList.status eq 93}">
- <shiro:hasPermission name="club:cmAgency:conform">
- <a href="${ctx}/user/clubTemporary/confirmRecord?confirmUserId=${newCmClubList.userID}">确认记录</a>
- </shiro:hasPermission>
- </c:if>
- <%--<shiro:hasPermission name="club:cmAgency:remarks">
- <a style="visibility: hidden" href="${ctx}/new/user/agency/remarks?clubId=${newCmClubList.clubID}">咨询记录</a>
- </shiro:hasPermission>--%>
- <a href="${ctx}/new/user/agency/recordLinkage?clubId=${newCmClubList.clubID}">生成行为记录链接</a>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- <div class="pagination">${page}</div>
- <!-- 模态框(Modal) -->
- <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h4 class="modal-title" id="myModalLabel"></h4>
- </div>
- <div class="modal-body">
- <div class="reg-row">
- <label class="reg-label" for=""><span class="require-xin">*</span>会所类型:</label>
- <div class="medical-radio the-oradio">
- <div class="med-beauty"><input name="firstClubType" value="1" type="radio"/>医美</div>
- <div class="raw-beauty"><input name="firstClubType" value="2" type="radio"/>生美</div>
- </div>
- <span class="err-tip"></span>
- <div class="med-option the-oradio" style="display: none">
- <div class="med-beauty"><input name="secondClubType" value="1" type="radio"/>诊所</div>
- <div class="med-beauty"><input name="secondClubType" value="2" type="radio"/>门诊</div>
- <div class="med-beauty"><input name="secondClubType" value="3" type="radio"/>医院</div>
- <span class="err-tip"></span>
- </div>
- <div class="qualification reg-row" style="display: none">
- <label class="reg-label" for=""><span class="require-xin">*</span>资质:</label>
- <input id="medicalPracticeLicenseImg" name="url" type="hidden" maxlength="255"
- class="input-xlarge ">
- <sys:ckfinder input="medicalPracticeLicenseImg" type="images"
- uploadPath="/medicalPracticeLicenseImg" selectMultiple="false" maxWidth="100"
- maxHeight="100"/>
- </div>
- <div class="epart" style="display: none">
- <label class="reg-label">科室:</label>
- <input class="reg-input" type="text" name="department" id="Department"
- placeholder="请填写您的所经营的科室,用逗号隔开。(至少三个)">
- <span class="err-tip"></span>
- </div>
- </div>
- <div class="reg-row Main-content">
- <label class="reg-label top-label" for=""><span class="require-xin">*</span>主营内容:</label>
- <div class="tags-area" id="clubArea"></div>
- <span class="err-tip" style="display: inline-block;margin-left:-55px;"></span>
- <input type="hidden" name="mainpro" value="" id="cMainPro">
- <div class="tags-operate">
- <span class="new-tag tag-other" id="clubOther">其他</span>
- <input type="text" class="reg-input tag-input" id="clubInput" placeholder="请输入自定义品项目">
- <span class="new-tag tag-add" id="clubAdd">确认添加</span>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
- <button type="button" class="btn btn-primary" id="confirm">确认</button>
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal -->
- </div>
- <%--设置机构级别弹窗--%>
- <div class="alert-modal" id="alertModal">
- <div class="title">
- <p>机构级别</p>
- <i class="close" id="alertModal-close">X</i>
- </div>
- <div class="alert-content">
- <p>请选择级别</p>
- <div class="from-radio">
- <input type="radio" value="1" name="clubType">资质机构
- <input type="radio" value="2" name="clubType">个人机构
- </div>
- </div>
- <div class="alertModal-btn">
- <button type="button" class="btn btn-default" id="close-clubleibie">取消</button>
- <button type="button" class="btn btn-primary" id="confirm-clubleibie">确认</button>
- </div>
- </div>
- <script type="text/javascript">
- $(document).ready(function () {
- //会所品项选择
- var opts = {
- $tag: $('.up-club-tag'),
- $tagArea: $('#clubArea'),
- $mainPro: $('#cMainPro'),
- $other: $('#clubOther'),
- $input: $('#clubInput'),
- $add: $('#clubAdd'),
- $type: 'club'
- }
- _util.getTags(opts);
- });
- function page(n, s) {
- $("#pageNo").val(n);
- $("#pageSize").val(s);
- $("#searchForm").submit();
- return false;
- }
- var _util = {
- // 隐藏输入错误提示(参数为提示元素)
- hideTip: function ($ele) {
- setTimeout(function () {
- $ele.hide();
- }, 5000);
- },
- setTags: function (opts) {
- var tagArr = [];
- opts.$tagArea.find('.new-tag.active').each(function (i, v) {
- var _typeName = $(v).attr('data-typeName');
- tagArr.push(_typeName);
- opts.$mainPro.val(tagArr.join('/'));
- })
- },
- getTags: function (opts) {
- opts.$tagArea.on('click', '.new-tag', function () {
- $('#cMainPro').val('')
- var $this = $(this);
- $this.toggleClass('active');
- _util.setTags(opts);
- })
- opts.$other.on('click', function () {
- opts.$input.css('display', 'inline-block');
- opts.$add.css('display', 'inline-block');
- })
- opts.$add.on('click', function () {
- var _tag = $.trim(opts.$input.val());
- if (_tag) {
- var flag = false;
- opts.$tagArea.find('.new-tag').each(function (i, v) {
- var _name = $(v).attr('data-typeName');
- if (_tag == _name) {
- flag = true;
- return false;
- } else {
- if (i == opts.$tagArea.find('.new-tag').length) {
- flag = false;
- }
- }
- })
- if (flag) {
- opts.$tagArea.find('.new-tag').each(function (i, v) {
- var _name = $(v).attr('data-typeName');
- if (_tag == _name) {
- $(v).addClass('active');
- layer.tips('该类型已存在', opts.$add);
- flag = true;
- return false;
- }
- })
- } else {
- opts.$tagArea.append('<span class="new-tag up-' + opts.$type + '-tag active" data-typeName="' + _tag + '">' + _tag + '</span> ');
- _util.setTags(opts);
- opts.$input.val('');
- return;
- }
- }
- })
- },
- }
- </script>
- <script>
- $(document).ready(function () {
- var flag = $('.clubType').attr("data-flag");//设置判断值
- //新增会所选择验证
- $('.medical-radio div input[name="firstClubType"]').on('click', function () {
- console.log($(this))
- var html = '';
- var nameval = $(this).val();
- if (nameval == '1') {
- $('.med-option,.qualification').show();
- html += '<span class="new-tag up-club-tag" data-typeName="整形">整形</span>',
- html += '<span class="new-tag up-club-tag" data-typeName="轻医美">轻医美</span>',
- html += '<span class="new-tag up-club-tag" data-typeName="皮肤科">皮肤科</span>';
- $('#clubArea').html(html);
- $('.Main-content').show();
- } else if (nameval == '2') {
- $('.med-option,.qualification,.epart').hide();
- $('input[name="secondClubType"]').attr('checked', false);
- html += '<span class="new-tag up-club-tag" data-typeName="美容">美容</span>',
- html += '<span class="new-tag up-club-tag" data-typeName="美体">美体</span>',
- html += '<span class="new-tag up-club-tag" data-typeName="美发">美发</span>',
- html += '<span class="new-tag up-club-tag" data-typeName="皮肤管理">皮肤管理</span>',
- html += '<span class="new-tag up-club-tag" data-typeName="光电">光电</span>',
- html += '<span class="new-tag up-club-tag" data-typeName="综合类">综合类</span>',
- html += '<span class="new-tag up-club-tag" data-typeName="中医养生">中医养生</span>',
- html += '<span class="new-tag up-club-tag" data-typeName="spa">spa</span>'
- $('#clubArea').html(html);
- $('.Main-content').show();
- }
- });
- //医美二级选择
- $('.med-option div input[name="secondClubType"]').on('click', function () {
- var nameVal = $(this).val();
- if (nameVal == '1') {
- $('.epart').hide()
- } else if (nameVal == '2') {
- $('.epart').show()
- } else if (nameVal == '3') {
- $('.epart').show()
- }
- });
- $('.clubType').on('click', function () {
- $('#confirm').attr('data-id', $(this).attr('data-clubID'))
- $('#myModal').modal();
- var that = $(this);
- var flag = that.attr("data-flag");
- $('#confirm').attr('data-flag', flag)
- var clubID = that.attr("data-clubID");
- if ("0" == flag) {
- $("#myModalLabel").html("设置分类");
- }
- if ("1" == flag) {
- $("#myModalLabel").html("修改分类");
- var json = JSON.parse($(this).attr('data-value'));
- var firstClubType = json["firstClubType"];
- var secondClubType = json["secondClubType"];
- var medicalPracticeLicenseImg = json["medicalPracticeLicenseImg"];
- var department = json["department"];
- var mainpro = json["mainpro"];
- console.log(firstClubType)
- if (firstClubType) {
- $('input[name="firstClubType"]').parent('div').eq(firstClubType - 1).find('input').attr("checked", "checked")
- $('input[name="firstClubType"]').parent('div').eq(firstClubType - 1).find('input').click();
- if (secondClubType) {
- $('input[name="secondClubType"]').parent('div').eq(secondClubType - 1).find('input').attr("checked", "checked")
- $('input[name="secondClubType"]').parent('div').eq(secondClubType - 1).find('input').click();
- }
- if (medicalPracticeLicenseImg) {
- $('#medicalPracticeLicenseImg').val(medicalPracticeLicenseImg);
- $('#medicalPracticeLicenseImgPreview').find('li').html('<img style="max-width:100px;max-height:100px;_height:100px;border:0;padding:3px;" src="' + medicalPracticeLicenseImg + '" />')
- }
- if (department) {
- $('#Department').val(department);
- }
- if (mainpro) {
- var span_ = $('#clubArea').find('span'); // 固定值
- var mainpro_ = mainpro.split('/'); // 回显值
- var defaultVal = [];
- var resArr = [];
- var html = '';
- $('#clubArea').html('');
- for (var i = 0; i < span_.length; i++) {
- defaultVal.push(span_[i].textContent);
- }
- var concatArr = defaultVal.concat(mainpro_);
- for (var i = 0; i < concatArr.length; i++) {
- if (resArr.indexOf(concatArr[i]) == -1) {
- resArr.push(concatArr[i]);
- html += '<span class="new-tag up-club-tag ' + concatArr[i] + '" data-typeName="' + concatArr[i] + '">' + concatArr[i] + '</span>';
- }
- }
- $('#clubArea').append(html);
- for (var i = 0; i < mainpro_.length; i++) {
- $('.' + mainpro_[i]).addClass('active');
- $('#cMainPro').val(mainpro)
- }
- }
- }
- var secondClubType = json["secondClubType"];
- var department = json["department"];
- var medicalPracticeLicenseImg = json["medicalPracticeLicenseImg"];
- }
- });
- $('#confirm').on('click', function () {
- if (flag == 0) {
- //会所类型
- if (!$('input[name="firstClubType"]').is(':checked')) {
- alertx('请选择会所类型')
- _util.hideTip($('.err-tip'));
- return false
- } else if ($('input[name="firstClubType"]:checked').val() == 1) {
- if (!$('input[name="secondClubType"]').is(':checked')) {
- alertx('请选择会所类型')
- _util.hideTip($('.err-tip'));
- return false
- }
- if ($('#medicalPracticeLicenseImg').val() == '') {
- alertx('请上传图片')
- return false
- }
- if ($('input[name="secondClubType"]:checked').val() == 2 || $('input[name="secondClubType"]:checked').val() == 3) {
- if ($('#Department').val() == '') {
- alertx('请输入科室')
- }
- } else if ($('input[name="firstClubType"]:checked').val() == 2) {
- }
- }
- } else {
- if (!$('input[name="firstClubType"]').is(':checked')) {
- $('input[name="firstClubType"]').parents('.medical-radio').next().show().html('请选择会所类型');
- _util.hideTip($('.err-tip'));
- return false
- }
- }
- if ($('#cMainPro').val() == '') {
- alertx('请选择主营内容')
- return false
- }
- var params = {
- mainpro: $('#cMainPro').val(),
- clubID: $(this).attr('data-id'),
- flagC: $(this).attr('data-flag')
- }
- if ($('input[name="firstClubType"]:checked').val() == 1) {
- params.firstClubType = 1;//会所分类
- params.secondClubType = $('input[name="secondClubType"]:checked').val();//二级分类
- params.medicalPracticeLicenseImg = $('#medicalPracticeLicenseImg').val();//资质
- if ($('input[name="secondClubType"]:checked').val() == 2 ||
- $('input[name="secondClubType"]:checked').val() == 3) {
- params.department = $('#Department').val();//科室
- }
- } else {
- params.firstClubType = 2;//会所分类
- }
- $.ajax({
- type: "post",
- url: "${ctx}/new/user/agency/editClubType",
- data: params,
- success: function (res) {
- if (res.errcode == '1') {
- alertx(res.errmsg);
- }
- if (res.errcode == '0') {
- console.log(res.data);
- window.location.href = res.data;
- }
- },
- error: function (res) {
- }
- });
- })
- $(document).on("change", "#auditStatus", function () {
- if ($("#auditStatus").val() == 2) {
- $("#auditNopass").show();
- } else {
- $("#auditNopass").hide();
- }
- })
- });
- var $ClubAlertContent = $('#alertModal');
- var $alertModalClose = $('#alertModal-close');
- var $alertModalCloseBtn = $('#close-clubleibie ');
- var $alertModalConfirm = $('#confirm-clubleibie ');
- //选择机构级别
- function showClubAlert(clubID, type) {
- if (type == 2) {
- $ClubAlertContent.find("input[type=radio][value='1']").attr("checked", true);
- } else {
- $ClubAlertContent.find("input[type=radio][value='2']").attr("checked", true);
- }
- $ClubAlertContent.show();
- $alertModalClose.click(function () {
- closeAlertConten($ClubAlertContent)
- })
- $alertModalCloseBtn.click(function () {
- closeAlertConten($ClubAlertContent)
- })
- $alertModalConfirm.click(function () {
- var $Value = $ClubAlertContent.find("input[name='clubType']:checked").val();
- $.post("${ctx}/new/user/agency/upgradeClub", {'id': clubID, 'type': $Value}, function (data) {
- console.log(data)
- if (true == data.success) {
- console.log(data.success)
- closeAlertConten($ClubAlertContent);
- window.location.reload();
- } else {
- alertx(data.msg);
- }
- }, "JSON");//这里返回的类型有:json,html,xml,text
- });
- }
- function closeAlertConten(obj) {
- obj.hide();
- }
- //更换协销
- function showSPSelect(clubID) {
- top.$.jBox("iframe:${ctx}/user/cmSp/showSelectSP", {
- iframeScrolling: 'no',
- width: 1000,
- height: 550,
- persistent: true,
- showScrolling: false,
- title: "选择协销",
- bottomText: '请从可供选择的项目中选择一个',
- buttons: {"确定": '1', "关闭": '-1'},
- submit: function (v, h, f) {
- //确定
- var $jboxFrame = top.$('#jbox-iframe');
- var $mainFrame = top.$('#mainFrame');
- if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
- var spID = $jboxFrame[0].contentWindow.getCheckedItems();
- console.log(spID);
- if ("" != spID && null != spID) {
- setSPSelect(spID, clubID);
- return true;
- } else {
- top.$.jBox.tip("请选择...");
- return false;
- }
- }
- return true;
- }
- });
- }
- function setSPSelect(spID, clubID) {
- console.log(spID + "=====" + clubID);
- $.post("${ctx}/new/user/agency/changeSp", {'spID': spID, 'clubID': clubID}, function (data) {
- if (true == data.success) {
- closeP();
- } else {
- alertx(data.msg);
- }
- }, "JSON");//这里返回的类型有:json,html,xml,text
- }
- function closeP() {
- var msg = '提交成功,请去“协销审核”页面进行审核';
- top.$.jBox.confirm(msg, '提示', function (v, h, f) {
- if (v == true) {
- window.location.href = "${ctx}/new/user/cmSp/clubChangeSp";
- return true;
- }
- window.location.href = "${ctx}/new/user/agency/";
- return true;
- }, {buttons: {'去审核': true, '取消': false}});
- }
- // 修改密码
- function updatePwd(id) {
- var regPwd = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/;
- var html = "<div style='padding:20px;'><font color='red'>*</font> 新密码 :" +
- "<input type='password' id='newPwd' name='newPwd' rows='1' cols='12'/>" +
- "</br><font color='red'>*</font>确认密码:" +
- "<input type='password' id='surePwd' name='surePwd' rows='1' cols='12'/></div>";
- var submit = function (v, h, f) {
- // 密码
- if (!regPwd.test(f.newPwd)) {
- $.jBox.tip("密码需8-16位字母数字组合", 'error', {focusId: "newPwd"});
- return false;
- }
- if (f.newPwd !== f.surePwd) {
- $.jBox.tip("确认密码与登录密码不一致", 'error', {focusId: "surePwd"});
- return false;
- }
- $.post("${ctx}/new/user/agency/updatePwd", {'password': f.newPwd, 'id': id}, function (data) {
- if (true == data.success) {
- $.jBox.tip(data.msg, 'info');
- $("#searchForm").submit();
- } else {
- $.jBox.tip(data.msg, 'error');
- }
- }, "JSON");//这里返回的类型有:json,html,xml,text
- };
- $.jBox(html, {title: "确定修改密码?", submit: submit});
- }
- function toAudit(id,userName,bindMobile) {
- if(null == bindMobile || "" == bindMobile){
- alertx("手机号尚未填写,请先编辑手机号再进行审核");
- return;
- }
- if(null == userName || "" == userName){
- alertx("联系人尚未尚未填写,请先编辑联系人再进行审核");
- return;
- }
- var html = "<div id='auditBox'>"
- + " <div class='bd-row'>"
- + " <span><font color='red'>*</font>审核:</span>"
- + " <select name='auditStatus' id='auditStatus'>"
- + " <option value='1'>审核通过</option>"
- + " <option value='2'>审核未通过</option>"
- + " <select/>"
- + " </div>"
- + " <div id='auditNopass' style='display: none;'>"
- + " <div class='bd-row'>"
- + " <span><font color='red'>*</font>原因:</span>"
- + " <div class='auditCheckBox'>"
- + " <label><input name='auditCheckBox' type='checkbox' value='图片模糊'><span>图片模糊</span></label>"
- + " <label><input name='auditCheckBox' type='checkbox' value='营业执照错误'><span>营业执照错误</span></label>"
- + " <label><input name='auditCheckBox' type='checkbox' value='详细信息不全'><span>详细信息不全</span></label>"
- + " <label><input name='auditCheckBox' type='checkbox' value='机构名称敏感'><span>机构名称敏感</span></label>"
- + " <label><input name='auditCheckBox' type='checkbox' value='不符合平台要求'><span>不符合平台要求</span></label>"
- + " </div>"
- + " </div>"
- + " <div class='bd-row'>"
- + " <span></span>"
- + " <div>"
- + " <textarea name='auditNote'></textarea>"
- + " <p class='err-tip' style='display:none;margin-left:-55px;color:red;'>请选择审核未通过的原因</p>"
- + " </div>"
- + " </div>"
- + " </div>"
- + "</div>";
- var submit = function (v, h, f) {
- if (f.auditStatus == '') {
- $.jBox.tip("请选择状态", 'error', {focusId: "auditStatus"});
- return false;
- } else if (f.auditStatus == 2 && f.auditNote == '' && !f.auditCheckBox) {
- $.jBox.tip("请选择审核未通过的原因", 'error', {focusId: "auditNote"});
- return false;
- } else if (f.auditStatus == 2 && f.auditNote.length > 100) {
- $.jBox.tip("内容过长", 'error', {focusId: "auditNote"});
- return false;
- }
- var auditText = f.auditCheckBox ? (f.auditCheckBox.toString() + ',' + f.auditNote) : f.auditNote;
- $.post("${ctx}/new/user/agency/auditClub", {
- 'auditStatus': f.auditStatus,
- 'id': id,
- 'auditNote': auditText
- }, function (data) {
- if (true == data.success) {
- $.jBox.tip(data.msg, 'info');
- // $("#searchForm").submit();
- window.location.href = "${ctx}/new/user/agency/";
- } else {
- $.jBox.tip(data.msg, 'error');
- }
- }, "JSON");//这里返回的类型有:json,html,xml,text
- };
- $.jBox(html, {title: "审核", submit: submit});
- }
- function activeStageMessage(type) {// 客户价值提示语
- var content = '1.新增用户:30天内新注册的用户'+'<br/>'+
- '2.活跃用户:90天内登录过商城的用户(排除新增用户和回流客户)'+'<br/>'+
- '3.不活跃用户:90天内未登录过商城的用户(排除流失用户和沉默用户)'+'<br/>'+
- '4.流失用户:两年内未登录且没有订单的机构'+'<br/>'+
- '5.回流用户:上一统计阶段的流失用户中后续登录商城的用户或者后续有订单的用户'+'<br/>'+
- '6.忠诚用户:90天内登录过商城且有订单记录的用户(排除新增用户,活跃用户)'+'<br/>'+
- '7.沉默用户:两年内未登录过商城,但是在两年内存在订单的用户(排除回流用户)';
- var content2 = '1. 一般保持客户,指最近一次交易距今时间大于60天,交易频率大于等于一月一次,上个月交易金额小于¥100000的客户'+'<br/>'+
- '2. 一般发展客户,指最近一次交易距今时间小于等于60天,交易频率小于一月一次,上个月交易金额小于¥100000的客户'+'<br/>'+
- '3. 一般价值客户,指最近一次交易距今时间小于等于60天,交易频率大于等于一月一次,上个月交易金额小于¥100000的客户'+'<br/>'+
- '4. 一般挽留客户,指最近一次交易距今时间大于60天,交易频率小于一月一次,上个月交易金额小于¥100000的客户'+'<br/>'+
- '5.重要保持客户,指最近一次交易距今时间大于60天,交易频率大于等于一月一次,上个月交易金额大于等于¥100000的客户'+'<br/>'+
- '6.重要发展客户,指最近一次交易距今时间小于等于60天,交易频率小于一月一次,上个月交易金额大于等于¥100000的客户'+'<br/>'+
- '7.重要价值客户,指最近一次交易距今时间小于等于60天,交易频率大于等于一月一次,上个月交易金额大于等于¥100000的客户'+'<br/>'+
- '8.重要挽留客户,指最近一次交易距今时间大于60天,交易频率小于一月一次,上个月交易金额大于等于¥100000的客户';
- var typeMap = {
- 1:content,
- 2:content2
- }
- $.jBox.alert(typeMap[type],'提示',{ width: 450 })
- }
- </script>
- </body>
- </html>
|