cmAgencyList.jsp 40 KB

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