cmAgencyList.jsp 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/WEB-INF/views/include/taglib.jsp" %>
  3. <html>
  4. <head>
  5. <title>机构列表</title>
  6. <meta name="decorator" content="default"/>
  7. <style type="text/css">
  8. .reg-row .new-tag.active{border:1px solid #de5801}
  9. .reg-row{margin-bottom:20px}
  10. .reg-row .reg-label{display:inline-block;width:120px;text-align:right;font-size:13px}
  11. .the-oradio{display:inline-block;vertical-align:top}
  12. .the-oradio div{width:85px;display:inline-block;font-size:12px;color:#666}
  13. .the-oradio div input[type="radio"]{width:17px;height:17px;margin-right:5px;vertical-align:text-top}
  14. .med-option{display:block;margin:10px 0 0 125px}
  15. .reg-row .business-license{position:relative;display:inline-block;width:166px;height:123px;border-radius:6px;margin:18px 0 0 125px}
  16. #medicalPracticeLicenseImgPreview{display:inline-block}
  17. .qualification{margin-top:20px}
  18. .reg-row .tags-area{display:inline-block;width:420px}
  19. .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}
  20. .reg-row .tags-operate{margin-left:125px}
  21. .reg-row .reg-input{width:336px;height:32px;padding:0 8px;margin-right:20px;border:1px solid #dcdcdc;border-radius:6px}
  22. .reg-row .tags-operate .tag-input{width:159px;margin-right:13px;display:none;vertical-align:top}
  23. .reg-row .tags-operate .tag-add{line-height:20px;vertical-align:middle;margin-bottom:0;vertical-align:top}
  24. .reg-row .tags-area{vertical-align:top}
  25. .tag-add{display:none}
  26. .table th{text-align:center}
  27. .table td{text-align:center}
  28. .modal{width:700px;margin-left:-350px}
  29. #myModal{display:none}
  30. .modal-body{max-height:300px !important}
  31. .modal.fade.in{top:0 !important}
  32. #btnSubmit{margin-left:20px}
  33. .flex-wrap .item{margin-right:20px}
  34. #auditBox{padding:20px;line-height:30px}
  35. #auditBox .bd-row{display:flex;margin-bottom:15px}
  36. #auditBox .bd-row > span{display:inline-block;width:60px}
  37. #auditBox .auditCheckBox{width:250px}
  38. #auditBox .auditCheckBox label{margin:0 5px 5px 0}
  39. #auditBox .auditCheckBox input{display:none}
  40. #auditBox .auditCheckBox input + span{display:inline-block;line-height:24px;padding:0 12px;border:1px solid #666;border-radius:5px}
  41. #auditBox .auditCheckBox input:checked + span{background-color:#E6633A}
  42. #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}
  43. #alertModal .title{height:50px;line-height:50px;font-size:14px;font-weight:bold;text-align:center;position:relative;border-bottom:1px solid #EBEBEB}
  44. #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}
  45. #alertModal .alert-content{width:260px;height:60px;padding:20px}
  46. #alertModal .alertModal-btn{width:260px;height:49px;padding:0 20px;border-top:1px solid #EBEBEB}
  47. #alertModal .alertModal-btn button{float:right;margin:5px}
  48. .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;}
  49. </style>
  50. </head>
  51. <body>
  52. <ul class="nav nav-tabs">
  53. <li class="active"><a href="${ctx}/new/user/agency/">机构列表</a></li>
  54. <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
  55. <li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
  56. </ul>
  57. <form:form id="searchForm" modelAttribute="newCmClub" action="${ctx}/new/user/agency/" method="post"
  58. class="breadcrumb form-search">
  59. <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
  60. <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
  61. <div class="flex-wrap">
  62. <div class="item">
  63. <label>机构名称:</label>
  64. <form:input path="searchName" htmlEscape="false" maxlength="50" class="input-medium"/>
  65. </div>
  66. <div class="item">
  67. <label>联系人:</label>
  68. <form:input path="searchUserName" htmlEscape="false" maxlength="50" class="input-medium"/>
  69. </div>
  70. <div class="item">
  71. <label>手机号:</label>
  72. <form:input path="searchBindMobile" htmlEscape="false" maxlength="50" class="input-medium"/>
  73. </div>
  74. <div class="item">
  75. <label>邮箱:</label>
  76. <form:input path="searchEmail" htmlEscape="false" maxlength="50" class="input-medium"/>
  77. </div>
  78. <div class="item">
  79. <label> 状态:</label>
  80. <form:select path="searchStatus" class="input-medium">
  81. <form:option value="" label="请选择"/>
  82. <form:options items="${fns:getDictList('club_status')}" itemLabel="label" itemValue="value"
  83. htmlEscape="false"/>
  84. </form:select>
  85. </div>
  86. <div class="item">
  87. <label>机构类别:</label>
  88. <form:select path="searchUserIdentity" class="input-medium">
  89. <form:option value="" label="请选择"/>
  90. <form:option value="4" label="个人机构"/>
  91. <form:option value="2" label="资质机构"/>
  92. <form:option value="8" label="超级会员"/>
  93. </form:select>
  94. </div>
  95. <br/>
  96. <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  97. <label class="control-label">活跃状态:</label>
  98. <form:select path="activeState" class="input-medium">
  99. <form:option value="" label="请选择"/>
  100. <form:option value="新增用户" label="新增用户"/>
  101. <form:option value="活跃用户" label="活跃用户"/>
  102. <form:option value="不活跃用户" label="不活跃用户"/>
  103. <form:option value="流失用户" label="流失用户"/>
  104. <form:option value="回流用户" label="回流用户"/>
  105. <form:option value="忠诚用户" label="忠诚用户"/>
  106. <form:option value="沉默用户" label="沉默用户"/>
  107. </form:select>
  108. <label class="control-label">客户价值:</label>
  109. <form:select path="customerValue" class="input-medium">
  110. <form:option value="" label="请选择"/>
  111. <form:option value="一般保持客户" label="一般保持客户"/>
  112. <form:option value="一般发展客户" label="一般发展客户"/>
  113. <form:option value="一般价值客户" label="一般价值客户"/>
  114. <form:option value="一般挽留客户" label="一般挽留客户"/>
  115. <form:option value="重要保持客户" label="重要保持客户"/>
  116. <form:option value="重要发展客户" label="重要发展客户"/>
  117. <form:option value="重要价值客户" label="重要价值客户"/>
  118. <form:option value="重要挽留客户" label="重要挽留客户"/>
  119. </form:select>
  120. <div class="item">
  121. <label>注册时间:</label>
  122. <form:input path="searchStartTime" type="text" maxlength="20" class="input-mini Wdate" value="${startTime}"
  123. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
  124. -
  125. <form:input path="searchEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${endTime}"
  126. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
  127. </div>
  128. <div class="item">
  129. <label>新分配机构:</label>
  130. <form:select path="newDeal" class="input-medium">
  131. <form:option value="" label="请选择"/>
  132. <form:option value="1">是</form:option>
  133. <form:option value="2">否</form:option>
  134. </form:select>
  135. </div>
  136. <div class="item">
  137. <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
  138. </div>
  139. </div>
  140. </form:form>
  141. <sys:message content="${message}"/>
  142. <table id="contentTable" class="table table-striped table-bordered table-condensed">
  143. <thead>
  144. <tr>
  145. <th>机构名称</th>
  146. <th>机构简称</th>
  147. <th>联系人</th>
  148. <th>手机号</th>
  149. <th>邮箱</th>
  150. <th>协销人员</th>
  151. <th>状态</th>
  152. <th>审核人</th>
  153. <th>机构类别</th>
  154. <th>活跃状态<span class="acticer_span" onmousemove="activeStageMessage(1)">?</span></th>
  155. <th>客户价值<span class="acticer_span" onmousemove="activeStageMessage(2)">?</span></th>
  156. <th>注册IP</th>
  157. <th>注册时间</th>
  158. <th>审核时间</th>
  159. <shiro:hasPermission name="user:newCmClub:edit">
  160. <th>操作</th>
  161. </shiro:hasPermission>
  162. </tr>
  163. </thead>
  164. <tbody>
  165. <c:forEach items="${page.list}" var="newCmClubList">
  166. <tr>
  167. <td>
  168. <%-- <c:if test="${newCmClubList.userIdentity eq 2}">--%>
  169. ${newCmClubList.name}
  170. <%-- </c:if>--%>
  171. <%-- <c:if test="${newCmClubList.userIdentity eq 4}">--%>
  172. <%-- <c:if test="${newCmClubList.name ne newCmClubList.userName}">--%>
  173. <%-- ${newCmClubList.name}--%>
  174. <%-- </c:if>--%>
  175. <%-- <c:if test="${newCmClubList.name eq newCmClubList.userName}">--%>
  176. <%-- ----%>
  177. <%-- </c:if>--%>
  178. <%-- </c:if>--%>
  179. </td>
  180. <td>
  181. <c:if test="${newCmClubList.userIdentity eq 2}">
  182. ${newCmClubList.sname}
  183. </c:if>
  184. <c:if test="${newCmClubList.userIdentity eq 4}">
  185. <c:if test="${newCmClubList.sname ne newCmClubList.userName}">
  186. ${newCmClubList.sname}
  187. </c:if>
  188. <c:if test="${newCmClubList.sname eq newCmClubList.userName}">
  189. --
  190. </c:if>
  191. </c:if>
  192. </td>
  193. <td>
  194. ${newCmClubList.userName}
  195. </td>
  196. <td>
  197. ${newCmClubList.bindMobile}
  198. </td>
  199. <td>${newCmClubList.email}</td>
  200. <td>
  201. ${newCmClubList.spName}
  202. </td>
  203. <td>
  204. <c:choose>
  205. <c:when test="${newCmClubList.status eq 90}">
  206. <font color="green">已上线</font>
  207. <%--不存在组织的用户为采美用户,只有采美用户才有上线下线功能--%>
  208. <%-- <c:if test="${newCmClubList.userOrganizeID eq null or newCmClubList.userOrganizeID eq 0}">--%>
  209. &nbsp;&nbsp;<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>
  210. <%-- </c:if>--%>
  211. </c:when>
  212. <c:when test="${newCmClubList.status eq 91}">
  213. <font color="red">已下线</font>
  214. <%-- <c:if test="${newCmClubList.userOrganizeID eq null or newCmClubList.userOrganizeID eq 0}">--%>
  215. &nbsp;&nbsp;<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>
  216. <%-- </c:if>--%>
  217. </c:when>
  218. <c:when test="${newCmClubList.status eq 92}">
  219. <a href="JavaScript:;" onclick="return alertx('不通过原因:${newCmClubList.auditNote}')"
  220. style="text-decoration:underline;"><font color="red">审核未通过</font></a>
  221. </c:when>
  222. <c:when test="${newCmClubList.status eq 93}">
  223. <font color="#BF826C">已确认</font>
  224. </c:when>
  225. <c:when test="${newCmClubList.status eq 94}">
  226. <font color="red">已冻结</font>
  227. </c:when>
  228. <c:otherwise>
  229. ${fns:getDictLabel(newCmClubList.status, 'club_status', newCmClubList.status)}
  230. </c:otherwise>
  231. </c:choose>
  232. </td>
  233. <td>
  234. ${newCmClubList.checkMan}
  235. </td>
  236. <td>
  237. <c:if test="${newCmClubList.userIdentity eq 4}">
  238. 个人机构
  239. </c:if>
  240. <c:if test="${newCmClubList.userIdentity eq 2}">
  241. 资质机构
  242. </c:if>
  243. <c:if test="${newCmClubList.svipUserFlag eq 1}">
  244. <font color="red">(超级会员)</font>
  245. </c:if>
  246. <c:if test="${newCmClubList.userIdentity eq 2 and newCmClubList.svipUserFlag eq 0}">
  247. <font color="red">(普通会员)</font>
  248. </c:if>
  249. </td>
  250. <td>
  251. <c:if test="${newCmClubList.activeState == null || newCmClubList.activeState == ''}">
  252. ---
  253. </c:if>
  254. <c:if test="${newCmClubList.activeState != null || newCmClubList.activeState != ''}">
  255. ${newCmClubList.activeState}
  256. </c:if>
  257. </td>
  258. <td>
  259. <c:if test="${newCmClubList.customerValue == null || newCmClubList.customerValue == ''}">
  260. ---
  261. </c:if>
  262. <c:if test="${newCmClubList.customerValue != null || newCmClubList.customerValue != ''}">
  263. ${newCmClubList.customerValue}
  264. </c:if>
  265. </td>
  266. <td>
  267. <c:if test="${newCmClubList.registerIP eq '192.168.1.10'}">
  268. 协销代注册
  269. </c:if>
  270. <c:if test="${newCmClubList.registerIP ne '192.168.1.10'}">
  271. ${newCmClubList.registerIP}
  272. <c:if test="${newCmClubList.source eq '0'}">
  273. (网站)
  274. </c:if>
  275. <c:if test="${newCmClubList.source eq '1'}">
  276. (小程序)
  277. </c:if>
  278. </c:if>
  279. </td>
  280. <td>
  281. <fmt:formatDate value="${newCmClubList.registerTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
  282. </td>
  283. <td>
  284. ${newCmClubList.auditTime}
  285. </td>
  286. <td>
  287. <shiro:hasPermission name="club:cmAgency:edit">
  288. <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>
  289. </shiro:hasPermission>
  290. <c:if test="${newCmClubList.status eq 90 || newCmClubList.status eq 91 || newCmClubList.status eq 40}">
  291. <shiro:hasPermission name="club:cmAgency:password">
  292. <a href="javascript:void(0);" onclick="updatePwd(${newCmClubList.userID})">重置密码</a>
  293. </shiro:hasPermission>
  294. </c:if>
  295. <c:if test="${newCmClubList.status eq 90 || newCmClubList.status eq 40 || newCmClubList.status eq 1 || newCmClubList.status eq 92}">
  296. <shiro:hasPermission name="club:cmAgency:changSp">
  297. <a href="javascript:void(0);" onclick="showSPSelect(${newCmClubList.clubID})">更换协销</a>
  298. </shiro:hasPermission>
  299. <shiro:hasPermission name="club:cmAgency:showOp">
  300. <a href="${ctx}/new/user/agency/operation?userOrganizeID=${newCmClubList.userOrganizeID}&clubID=${newCmClubList.clubID}&userID=${newCmClubList.userID}&name=${newCmClubList.name}">查看运营人员</a>
  301. </shiro:hasPermission>
  302. </c:if>
  303. <c:if test="${newCmClubList.status eq 1 || newCmClubList.status eq 92}">
  304. <shiro:hasPermission name="club:cmAgency:audit">
  305. <a href="javascript:void(0);" onclick="toAudit(${newCmClubList.clubID},'${newCmClubList.userName}','${newCmClubList.bindMobile}')">审核</a>
  306. </shiro:hasPermission>
  307. </c:if>
  308. <shiro:hasPermission name="club:cmAgency:category">
  309. <a href="javascript:void(0);" onclick="showClubAlert(${newCmClubList.clubID},${newCmClubList.userIdentity})">设置机构类别</a>
  310. </shiro:hasPermission>
  311. <c:if test="${newCmClubList.status eq 92 || newCmClubList.status eq 93}">
  312. <shiro:hasPermission name="club:cmAgency:conform">
  313. <a href="${ctx}/user/clubTemporary/confirmRecord?confirmUserId=${newCmClubList.userID}">确认记录</a>
  314. </shiro:hasPermission>
  315. </c:if>
  316. <shiro:hasPermission name="club:cmAgency:remarks">
  317. <a href="${ctx}/new/user/agency/remarks?clubId=${newCmClubList.clubID}">咨询记录</a>
  318. </shiro:hasPermission>
  319. <a href="${ctx}/new/user/agency/recordLinkage?clubId=${newCmClubList.clubID}">生成行为记录链接</a>
  320. </td>
  321. </tr>
  322. </c:forEach>
  323. </tbody>
  324. </table>
  325. <div class="pagination">${page}</div>
  326. <!-- 模态框(Modal) -->
  327. <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  328. <div class="modal-dialog">
  329. <div class="modal-content">
  330. <div class="modal-header">
  331. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  332. <h4 class="modal-title" id="myModalLabel"></h4>
  333. </div>
  334. <div class="modal-body">
  335. <div class="reg-row">
  336. <label class="reg-label" for=""><span class="require-xin">*</span>会所类型:</label>
  337. <div class="medical-radio the-oradio">
  338. <div class="med-beauty"><input name="firstClubType" value="1" type="radio"/>医美</div>
  339. <div class="raw-beauty"><input name="firstClubType" value="2" type="radio"/>生美</div>
  340. </div>
  341. <span class="err-tip"></span>
  342. <div class="med-option the-oradio" style="display: none">
  343. <div class="med-beauty"><input name="secondClubType" value="1" type="radio"/>诊所</div>
  344. <div class="med-beauty"><input name="secondClubType" value="2" type="radio"/>门诊</div>
  345. <div class="med-beauty"><input name="secondClubType" value="3" type="radio"/>医院</div>
  346. <span class="err-tip"></span>
  347. </div>
  348. <div class="qualification reg-row" style="display: none">
  349. <label class="reg-label" for=""><span class="require-xin">*</span>资质:</label>
  350. <input id="medicalPracticeLicenseImg" name="url" type="hidden" maxlength="255"
  351. class="input-xlarge ">
  352. <sys:ckfinder input="medicalPracticeLicenseImg" type="images"
  353. uploadPath="/medicalPracticeLicenseImg" selectMultiple="false" maxWidth="100"
  354. maxHeight="100"/>
  355. </div>
  356. <div class="epart" style="display: none">
  357. <label class="reg-label">科室:</label>
  358. <input class="reg-input" type="text" name="department" id="Department"
  359. placeholder="请填写您的所经营的科室,用逗号隔开。(至少三个)">
  360. <span class="err-tip"></span>
  361. </div>
  362. </div>
  363. <div class="reg-row Main-content">
  364. <label class="reg-label top-label" for=""><span class="require-xin">*</span>主营内容:</label>
  365. <div class="tags-area" id="clubArea"></div>
  366. <span class="err-tip" style="display: inline-block;margin-left:-55px;"></span>
  367. <input type="hidden" name="mainpro" value="" id="cMainPro">
  368. <div class="tags-operate">
  369. <span class="new-tag tag-other" id="clubOther">其他</span>
  370. <input type="text" class="reg-input tag-input" id="clubInput" placeholder="请输入自定义品项目">
  371. <span class="new-tag tag-add" id="clubAdd">确认添加</span>
  372. </div>
  373. </div>
  374. </div>
  375. <div class="modal-footer">
  376. <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
  377. <button type="button" class="btn btn-primary" id="confirm">确认</button>
  378. </div>
  379. </div><!-- /.modal-content -->
  380. </div><!-- /.modal -->
  381. </div>
  382. <%--设置机构类别弹窗--%>
  383. <div class="alert-modal" id="alertModal">
  384. <div class="title">
  385. <p>机构类别</p>
  386. <i class="close" id="alertModal-close">X</i>
  387. </div>
  388. <div class="alert-content">
  389. <p>请选择类别</p>
  390. <div class="from-radio">
  391. <input type="radio" value="1" name="clubType">资质机构
  392. <input type="radio" value="2" name="clubType">个人机构
  393. </div>
  394. </div>
  395. <div class="alertModal-btn">
  396. <button type="button" class="btn btn-default" id="close-clubleibie">取消</button>
  397. <button type="button" class="btn btn-primary" id="confirm-clubleibie">确认</button>
  398. </div>
  399. </div>
  400. <script type="text/javascript">
  401. $(document).ready(function () {
  402. //会所品项选择
  403. var opts = {
  404. $tag: $('.up-club-tag'),
  405. $tagArea: $('#clubArea'),
  406. $mainPro: $('#cMainPro'),
  407. $other: $('#clubOther'),
  408. $input: $('#clubInput'),
  409. $add: $('#clubAdd'),
  410. $type: 'club'
  411. }
  412. _util.getTags(opts);
  413. });
  414. function page(n, s) {
  415. $("#pageNo").val(n);
  416. $("#pageSize").val(s);
  417. $("#searchForm").submit();
  418. return false;
  419. }
  420. var _util = {
  421. // 隐藏输入错误提示(参数为提示元素)
  422. hideTip: function ($ele) {
  423. setTimeout(function () {
  424. $ele.hide();
  425. }, 5000);
  426. },
  427. setTags: function (opts) {
  428. var tagArr = [];
  429. opts.$tagArea.find('.new-tag.active').each(function (i, v) {
  430. var _typeName = $(v).attr('data-typeName');
  431. tagArr.push(_typeName);
  432. opts.$mainPro.val(tagArr.join('/'));
  433. })
  434. },
  435. getTags: function (opts) {
  436. opts.$tagArea.on('click', '.new-tag', function () {
  437. $('#cMainPro').val('')
  438. var $this = $(this);
  439. $this.toggleClass('active');
  440. _util.setTags(opts);
  441. })
  442. opts.$other.on('click', function () {
  443. opts.$input.css('display', 'inline-block');
  444. opts.$add.css('display', 'inline-block');
  445. })
  446. opts.$add.on('click', function () {
  447. var _tag = $.trim(opts.$input.val());
  448. if (_tag) {
  449. var flag = false;
  450. opts.$tagArea.find('.new-tag').each(function (i, v) {
  451. var _name = $(v).attr('data-typeName');
  452. if (_tag == _name) {
  453. flag = true;
  454. return false;
  455. } else {
  456. if (i == opts.$tagArea.find('.new-tag').length) {
  457. flag = false;
  458. }
  459. }
  460. })
  461. if (flag) {
  462. opts.$tagArea.find('.new-tag').each(function (i, v) {
  463. var _name = $(v).attr('data-typeName');
  464. if (_tag == _name) {
  465. $(v).addClass('active');
  466. layer.tips('该类型已存在', opts.$add);
  467. flag = true;
  468. return false;
  469. }
  470. })
  471. } else {
  472. opts.$tagArea.append('<span class="new-tag up-' + opts.$type + '-tag active" data-typeName="' + _tag + '">' + _tag + '</span> ');
  473. _util.setTags(opts);
  474. opts.$input.val('');
  475. return;
  476. }
  477. }
  478. })
  479. },
  480. }
  481. </script>
  482. <script>
  483. $(document).ready(function () {
  484. var flag = $('.clubType').attr("data-flag");//设置判断值
  485. //新增会所选择验证
  486. $('.medical-radio div input[name="firstClubType"]').on('click', function () {
  487. console.log($(this))
  488. var html = '';
  489. var nameval = $(this).val();
  490. if (nameval == '1') {
  491. $('.med-option,.qualification').show();
  492. html += '<span class="new-tag up-club-tag" data-typeName="整形">整形</span>',
  493. html += '<span class="new-tag up-club-tag" data-typeName="轻医美">轻医美</span>',
  494. html += '<span class="new-tag up-club-tag" data-typeName="皮肤科">皮肤科</span>';
  495. $('#clubArea').html(html);
  496. $('.Main-content').show();
  497. } else if (nameval == '2') {
  498. $('.med-option,.qualification,.epart').hide();
  499. $('input[name="secondClubType"]').attr('checked', false);
  500. html += '<span class="new-tag up-club-tag" data-typeName="美容">美容</span>',
  501. html += '<span class="new-tag up-club-tag" data-typeName="美体">美体</span>',
  502. html += '<span class="new-tag up-club-tag" data-typeName="美发">美发</span>',
  503. html += '<span class="new-tag up-club-tag" data-typeName="皮肤管理">皮肤管理</span>',
  504. html += '<span class="new-tag up-club-tag" data-typeName="光电">光电</span>',
  505. html += '<span class="new-tag up-club-tag" data-typeName="综合类">综合类</span>',
  506. html += '<span class="new-tag up-club-tag" data-typeName="中医养生">中医养生</span>',
  507. html += '<span class="new-tag up-club-tag" data-typeName="spa">spa</span>'
  508. $('#clubArea').html(html);
  509. $('.Main-content').show();
  510. }
  511. });
  512. //医美二级选择
  513. $('.med-option div input[name="secondClubType"]').on('click', function () {
  514. var nameVal = $(this).val();
  515. if (nameVal == '1') {
  516. $('.epart').hide()
  517. } else if (nameVal == '2') {
  518. $('.epart').show()
  519. } else if (nameVal == '3') {
  520. $('.epart').show()
  521. }
  522. });
  523. $('.clubType').on('click', function () {
  524. $('#confirm').attr('data-id', $(this).attr('data-clubID'))
  525. $('#myModal').modal();
  526. var that = $(this);
  527. var flag = that.attr("data-flag");
  528. $('#confirm').attr('data-flag', flag)
  529. var clubID = that.attr("data-clubID");
  530. if ("0" == flag) {
  531. $("#myModalLabel").html("设置分类");
  532. }
  533. if ("1" == flag) {
  534. $("#myModalLabel").html("修改分类");
  535. var json = JSON.parse($(this).attr('data-value'));
  536. var firstClubType = json["firstClubType"];
  537. var secondClubType = json["secondClubType"];
  538. var medicalPracticeLicenseImg = json["medicalPracticeLicenseImg"];
  539. var department = json["department"];
  540. var mainpro = json["mainpro"];
  541. console.log(firstClubType)
  542. if (firstClubType) {
  543. $('input[name="firstClubType"]').parent('div').eq(firstClubType - 1).find('input').attr("checked", "checked")
  544. $('input[name="firstClubType"]').parent('div').eq(firstClubType - 1).find('input').click();
  545. if (secondClubType) {
  546. $('input[name="secondClubType"]').parent('div').eq(secondClubType - 1).find('input').attr("checked", "checked")
  547. $('input[name="secondClubType"]').parent('div').eq(secondClubType - 1).find('input').click();
  548. }
  549. if (medicalPracticeLicenseImg) {
  550. $('#medicalPracticeLicenseImg').val(medicalPracticeLicenseImg);
  551. $('#medicalPracticeLicenseImgPreview').find('li').html('<img style="max-width:100px;max-height:100px;_height:100px;border:0;padding:3px;" src="' + medicalPracticeLicenseImg + '" />')
  552. }
  553. if (department) {
  554. $('#Department').val(department);
  555. }
  556. if (mainpro) {
  557. var span_ = $('#clubArea').find('span'); // 固定值
  558. var mainpro_ = mainpro.split('/'); // 回显值
  559. var defaultVal = [];
  560. var resArr = [];
  561. var html = '';
  562. $('#clubArea').html('');
  563. for (var i = 0; i < span_.length; i++) {
  564. defaultVal.push(span_[i].textContent);
  565. }
  566. var concatArr = defaultVal.concat(mainpro_);
  567. for (var i = 0; i < concatArr.length; i++) {
  568. if (resArr.indexOf(concatArr[i]) == -1) {
  569. resArr.push(concatArr[i]);
  570. html += '<span class="new-tag up-club-tag ' + concatArr[i] + '" data-typeName="' + concatArr[i] + '">' + concatArr[i] + '</span>';
  571. }
  572. }
  573. $('#clubArea').append(html);
  574. for (var i = 0; i < mainpro_.length; i++) {
  575. $('.' + mainpro_[i]).addClass('active');
  576. $('#cMainPro').val(mainpro)
  577. }
  578. }
  579. }
  580. var secondClubType = json["secondClubType"];
  581. var department = json["department"];
  582. var medicalPracticeLicenseImg = json["medicalPracticeLicenseImg"];
  583. }
  584. });
  585. $('#confirm').on('click', function () {
  586. if (flag == 0) {
  587. //会所类型
  588. if (!$('input[name="firstClubType"]').is(':checked')) {
  589. alertx('请选择会所类型')
  590. _util.hideTip($('.err-tip'));
  591. return false
  592. } else if ($('input[name="firstClubType"]:checked').val() == 1) {
  593. if (!$('input[name="secondClubType"]').is(':checked')) {
  594. alertx('请选择会所类型')
  595. _util.hideTip($('.err-tip'));
  596. return false
  597. }
  598. if ($('#medicalPracticeLicenseImg').val() == '') {
  599. alertx('请上传图片')
  600. return false
  601. }
  602. if ($('input[name="secondClubType"]:checked').val() == 2 || $('input[name="secondClubType"]:checked').val() == 3) {
  603. if ($('#Department').val() == '') {
  604. alertx('请输入科室')
  605. }
  606. } else if ($('input[name="firstClubType"]:checked').val() == 2) {
  607. }
  608. }
  609. } else {
  610. if (!$('input[name="firstClubType"]').is(':checked')) {
  611. $('input[name="firstClubType"]').parents('.medical-radio').next().show().html('请选择会所类型');
  612. _util.hideTip($('.err-tip'));
  613. return false
  614. }
  615. }
  616. if ($('#cMainPro').val() == '') {
  617. alertx('请选择主营内容')
  618. return false
  619. }
  620. var params = {
  621. mainpro: $('#cMainPro').val(),
  622. clubID: $(this).attr('data-id'),
  623. flagC: $(this).attr('data-flag')
  624. }
  625. if ($('input[name="firstClubType"]:checked').val() == 1) {
  626. params.firstClubType = 1;//会所分类
  627. params.secondClubType = $('input[name="secondClubType"]:checked').val();//二级分类
  628. params.medicalPracticeLicenseImg = $('#medicalPracticeLicenseImg').val();//资质
  629. if ($('input[name="secondClubType"]:checked').val() == 2 ||
  630. $('input[name="secondClubType"]:checked').val() == 3) {
  631. params.department = $('#Department').val();//科室
  632. }
  633. } else {
  634. params.firstClubType = 2;//会所分类
  635. }
  636. $.ajax({
  637. type: "post",
  638. url: "${ctx}/new/user/agency/editClubType",
  639. data: params,
  640. success: function (res) {
  641. if (res.errcode == '1') {
  642. alertx(res.errmsg);
  643. }
  644. if (res.errcode == '0') {
  645. console.log(res.data);
  646. window.location.href = res.data;
  647. }
  648. },
  649. error: function (res) {
  650. }
  651. });
  652. })
  653. $(document).on("change", "#auditStatus", function () {
  654. if ($("#auditStatus").val() == 2) {
  655. $("#auditNopass").show();
  656. } else {
  657. $("#auditNopass").hide();
  658. }
  659. })
  660. });
  661. var $ClubAlertContent = $('#alertModal');
  662. var $alertModalClose = $('#alertModal-close');
  663. var $alertModalCloseBtn = $('#close-clubleibie ');
  664. var $alertModalConfirm = $('#confirm-clubleibie ');
  665. //选择机构类别
  666. function showClubAlert(clubID, type) {
  667. if (type == 2) {
  668. $ClubAlertContent.find("input[type=radio][value='1']").attr("checked", true);
  669. } else {
  670. $ClubAlertContent.find("input[type=radio][value='2']").attr("checked", true);
  671. }
  672. $ClubAlertContent.show();
  673. $alertModalClose.click(function () {
  674. closeAlertConten($ClubAlertContent)
  675. })
  676. $alertModalCloseBtn.click(function () {
  677. closeAlertConten($ClubAlertContent)
  678. })
  679. $alertModalConfirm.click(function () {
  680. var $Value = $ClubAlertContent.find("input[name='clubType']:checked").val();
  681. $.post("${ctx}/new/user/agency/upgradeClub", {'id': clubID, 'type': $Value}, function (data) {
  682. console.log(data)
  683. if (true == data.success) {
  684. console.log(data.success)
  685. closeAlertConten($ClubAlertContent);
  686. window.location.reload();
  687. } else {
  688. alertx(data.msg);
  689. }
  690. }, "JSON");//这里返回的类型有:json,html,xml,text
  691. });
  692. }
  693. function closeAlertConten(obj) {
  694. obj.hide();
  695. }
  696. //更换协销
  697. function showSPSelect(clubID) {
  698. top.$.jBox("iframe:${ctx}/user/cmSp/showSelectSP", {
  699. iframeScrolling: 'no',
  700. width: 1000,
  701. height: 550,
  702. persistent: true,
  703. showScrolling: false,
  704. title: "选择协销",
  705. bottomText: '请从可供选择的项目中选择一个',
  706. buttons: {"确定": '1', "关闭": '-1'},
  707. submit: function (v, h, f) {
  708. //确定
  709. var $jboxFrame = top.$('#jbox-iframe');
  710. var $mainFrame = top.$('#mainFrame');
  711. if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
  712. var spID = $jboxFrame[0].contentWindow.getCheckedItems();
  713. console.log(spID);
  714. if ("" != spID && null != spID) {
  715. setSPSelect(spID, clubID);
  716. return true;
  717. } else {
  718. top.$.jBox.tip("请选择...");
  719. return false;
  720. }
  721. }
  722. return true;
  723. }
  724. });
  725. }
  726. function setSPSelect(spID, clubID) {
  727. console.log(spID + "=====" + clubID);
  728. $.post("${ctx}/new/user/agency/changeSp", {'spID': spID, 'clubID': clubID}, function (data) {
  729. if (true == data.success) {
  730. closeP();
  731. } else {
  732. alertx(data.msg);
  733. }
  734. }, "JSON");//这里返回的类型有:json,html,xml,text
  735. }
  736. function closeP() {
  737. var msg = '提交成功,请去“协销审核”页面进行审核';
  738. top.$.jBox.confirm(msg, '提示', function (v, h, f) {
  739. if (v == true) {
  740. window.location.href = "${ctx}/new/user/cmSp/clubChangeSp";
  741. return true;
  742. }
  743. window.location.href = "${ctx}/new/user/agency/";
  744. return true;
  745. }, {buttons: {'去审核': true, '取消': false}});
  746. }
  747. // 修改密码
  748. function updatePwd(id) {
  749. var regPwd = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/;
  750. var html = "<div style='padding:20px;'><font color='red'>*</font> 新密码 :" +
  751. "<input type='password' id='newPwd' name='newPwd' rows='1' cols='12'/>" +
  752. "</br><font color='red'>*</font>确认密码:" +
  753. "<input type='password' id='surePwd' name='surePwd' rows='1' cols='12'/></div>";
  754. var submit = function (v, h, f) {
  755. // 密码
  756. if (!regPwd.test(f.newPwd)) {
  757. $.jBox.tip("密码需8-16位字母数字组合", 'error', {focusId: "newPwd"});
  758. return false;
  759. }
  760. if (f.newPwd !== f.surePwd) {
  761. $.jBox.tip("确认密码与登录密码不一致", 'error', {focusId: "surePwd"});
  762. return false;
  763. }
  764. $.post("${ctx}/new/user/agency/updatePwd", {'password': f.newPwd, 'id': id}, function (data) {
  765. if (true == data.success) {
  766. $.jBox.tip(data.msg, 'info');
  767. $("#searchForm").submit();
  768. } else {
  769. $.jBox.tip(data.msg, 'error');
  770. }
  771. }, "JSON");//这里返回的类型有:json,html,xml,text
  772. };
  773. $.jBox(html, {title: "确定修改密码?", submit: submit});
  774. }
  775. function toAudit(id,userName,bindMobile) {
  776. if(null == bindMobile || "" == bindMobile){
  777. alertx("手机号尚未填写,请先编辑手机号再进行审核");
  778. return;
  779. }
  780. if(null == userName || "" == userName){
  781. alertx("联系人尚未尚未填写,请先编辑联系人再进行审核");
  782. return;
  783. }
  784. var html = "<div id='auditBox'>"
  785. + " <div class='bd-row'>"
  786. + " <span><font color='red'>*</font>审核:</span>"
  787. + " <select name='auditStatus' id='auditStatus'>"
  788. + " <option value='1'>审核通过</option>"
  789. + " <option value='2'>审核未通过</option>"
  790. + " <select/>"
  791. + " </div>"
  792. + " <div id='auditNopass' style='display: none;'>"
  793. + " <div class='bd-row'>"
  794. + " <span><font color='red'>*</font>原因:</span>"
  795. + " <div class='auditCheckBox'>"
  796. + " <label><input name='auditCheckBox' type='checkbox' value='图片模糊'><span>图片模糊</span></label>"
  797. + " <label><input name='auditCheckBox' type='checkbox' value='营业执照错误'><span>营业执照错误</span></label>"
  798. + " <label><input name='auditCheckBox' type='checkbox' value='详细信息不全'><span>详细信息不全</span></label>"
  799. + " <label><input name='auditCheckBox' type='checkbox' value='机构名称敏感'><span>机构名称敏感</span></label>"
  800. + " <label><input name='auditCheckBox' type='checkbox' value='不符合平台要求'><span>不符合平台要求</span></label>"
  801. + " </div>"
  802. + " </div>"
  803. + " <div class='bd-row'>"
  804. + " <span></span>"
  805. + " <div>"
  806. + " <textarea name='auditNote'></textarea>"
  807. + " <p class='err-tip' style='display:none;margin-left:-55px;color:red;'>请选择审核未通过的原因</p>"
  808. + " </div>"
  809. + " </div>"
  810. + " </div>"
  811. + "</div>";
  812. var submit = function (v, h, f) {
  813. if (f.auditStatus == '') {
  814. $.jBox.tip("请选择状态", 'error', {focusId: "auditStatus"});
  815. return false;
  816. } else if (f.auditStatus == 2 && f.auditNote == '' && !f.auditCheckBox) {
  817. $.jBox.tip("请选择审核未通过的原因", 'error', {focusId: "auditNote"});
  818. return false;
  819. } else if (f.auditStatus == 2 && f.auditNote.length > 100) {
  820. $.jBox.tip("内容过长", 'error', {focusId: "auditNote"});
  821. return false;
  822. }
  823. var auditText = f.auditCheckBox ? (f.auditCheckBox.toString() + ',' + f.auditNote) : f.auditNote;
  824. $.post("${ctx}/new/user/agency/auditClub", {
  825. 'auditStatus': f.auditStatus,
  826. 'id': id,
  827. 'auditNote': auditText
  828. }, function (data) {
  829. if (true == data.success) {
  830. $.jBox.tip(data.msg, 'info');
  831. // $("#searchForm").submit();
  832. window.location.href = "${ctx}/new/user/agency/";
  833. } else {
  834. $.jBox.tip(data.msg, 'error');
  835. }
  836. }, "JSON");//这里返回的类型有:json,html,xml,text
  837. };
  838. $.jBox(html, {title: "审核", submit: submit});
  839. }
  840. function activeStageMessage(type) {// 客户价值提示语
  841. var content = '1.新增用户:30天内新注册的用户'+'<br/>'+
  842. '2.活跃用户:90天内登录过商城的用户(排除新增用户和回流客户)'+'<br/>'+
  843. '3.不活跃用户:90天内未登录过商城的用户(排除流失用户和沉默用户)'+'<br/>'+
  844. '4.流失用户:两年内未登录且没有订单的机构'+'<br/>'+
  845. '5.回流用户:上一统计阶段的流失用户中后续登录商城的用户或者后续有订单的用户'+'<br/>'+
  846. '6.忠诚用户:90天内登录过商城且有订单记录的用户(排除新增用户,活跃用户)'+'<br/>'+
  847. '7.沉默用户:两年内未登录过商城,但是在两年内存在订单的用户(排除回流用户)';
  848. var content2 = '1. 一般保持客户,指最近一次交易距今时间大于60天,交易频率大于等于一月一次,上个月交易金额小于¥100000的客户'+'<br/>'+
  849. '2. 一般发展客户,指最近一次交易距今时间小于等于60天,交易频率小于一月一次,上个月交易金额小于¥100000的客户'+'<br/>'+
  850. '3. 一般价值客户,指最近一次交易距今时间小于等于60天,交易频率大于等于一月一次,上个月交易金额小于¥100000的客户'+'<br/>'+
  851. '4. 一般挽留客户,指最近一次交易距今时间大于60天,交易频率小于一月一次,上个月交易金额小于¥100000的客户'+'<br/>'+
  852. '5.重要保持客户,指最近一次交易距今时间大于60天,交易频率大于等于一月一次,上个月交易金额大于等于¥100000的客户'+'<br/>'+
  853. '6.重要发展客户,指最近一次交易距今时间小于等于60天,交易频率小于一月一次,上个月交易金额大于等于¥100000的客户'+'<br/>'+
  854. '7.重要价值客户,指最近一次交易距今时间小于等于60天,交易频率大于等于一月一次,上个月交易金额大于等于¥100000的客户'+'<br/>'+
  855. '8.重要挽留客户,指最近一次交易距今时间大于60天,交易频率小于一月一次,上个月交易金额大于等于¥100000的客户';
  856. var typeMap = {
  857. 1:content,
  858. 2:content2
  859. }
  860. $.jBox.alert(typeMap[type],'提示',{ width: 450 })
  861. }
  862. </script>
  863. </body>
  864. </html>