cmAgencyList.jsp 46 KB

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