index.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  1. <include file="public@header"/>
  2. </head>
  3. <body>
  4. <div class="wrap js-check-wrap">
  5. <ul class="nav nav-tabs">
  6. <li class="active"><a> <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">付费会员
  7. <elseif condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  8. 冻结用户
  9. <elseif condition="$Request.action eq 'screen' || $Request.param.u eq 4">
  10. 筛选用户
  11. <elseif condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
  12. 注销用户
  13. <else/>
  14. 用户列表
  15. </if>
  16. </a>
  17. </li>
  18. </ul>
  19. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2 || $Request.param.u eq 4">
  20. <div class="qrcode">
  21. <form class="well form-inline margin-top-20" method="post" onsubmit="return false;">
  22. <span>生成参数</span>
  23. <input class="form-control" id="url" type="text" name="url" style="width: 400px;" placeholder="请填写生成参数:如用户地址">
  24. &nbsp;
  25. <input type="button" class="btn btn-primary" onclick="makeQrcode()" value="生成二维码"/>
  26. <span class="qrcode">
  27. <a title="点击放大" data-href="">
  28. </a>
  29. </span>
  30. </form>
  31. </div>
  32. </if>
  33. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
  34. <form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index',array('u'=>2))}">
  35. <elseif condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  36. <form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index',array('u'=>3))}">
  37. <elseif condition="$Request.action eq 'screen' || $Request.param.u eq 4">
  38. <form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index',array('u'=>4))}">
  39. <elseif condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
  40. <form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index',array('u'=>5))}">
  41. <else/>
  42. <form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index',array('u'=>1))}">
  43. </if>
  44. <!-- 用户ID:
  45. <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
  46. placeholder="请输入用户ID"> -->
  47. 关键字:
  48. <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}" placeholder="昵称/真实姓名/手机">
  49. <input type="submit" class="btn btn-primary" value="搜索"/>
  50. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
  51. <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>2))}">清空</a>
  52. <elseif condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  53. <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>3))}">清空</a>
  54. <elseif condition="$Request.action eq 'screen' || $Request.param.u eq 4">
  55. <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>4))}">清空</a>
  56. <elseif condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
  57. <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>5))}">清空</a>
  58. <else/>
  59. <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>1))}">清空</a>
  60. </if>
  61. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
  62. <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>2))}">导出</a>
  63. <elseif condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  64. <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>3))}">导出</a>
  65. <elseif condition="$Request.action eq 'screen' || $Request.param.u eq 4">
  66. <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>4))}">导出</a>
  67. <elseif condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
  68. <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>5))}">导出</a>
  69. <else/>
  70. <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>1))}">导出</a>
  71. </if>
  72. <a class="btn btn-danger" onclick="doDelete()">批量删除</a>
  73. <!-- <a class="btn btn-danger" href="{:url('user/adminIndex/index')}" style="border-color:#7349B8;background-color:#7349B8">已冻结的用户</a> -->
  74. <a class="btn btn-danger" id="showcho" style="border-color:#7349B8;background-color:#7349B8">条件筛选</a>
  75. <div id="showchoice" style="display: none; margin-top: 10px;">
  76. <php>$educationarray=array(1=>'大专',2=>'本科',3=>'硕士',4=>'博士');</php>
  77. <php>$marriedarray=array(1=>'未婚',2=>'离异',3=>'离异有孩子');</php>
  78. <php>$propertyarray=array(0=>'无',1=>'有房',2=>'有车',3=>'有房有车');</php>
  79. <php>$agearray=array('1980','1981','1982','1983','1984','1985','1986','1987','1988','1989','1990','1991','1992','1993','1994','1995','1996','1997','1998','1999','2000');</php>
  80. <php>$sexarray=array(1=>'男',2=>'女');</php>
  81. <div>
  82. <div style="margin-top: 10px;">
  83. <!-- 年龄: <input class="form-control js-bootstrap-datetime" type="text" name="age1" style="width: 150px;margin-right:10px;" value="" placeholder="请选择年龄">
  84. <font style="color: red">至</font> &nbsp;
  85. <input class="form-control js-bootstrap-datetime" type="text" name="age2" style="width: 150px;margin-right:25px;" value="" placeholder="请选择年龄"> -->
  86. 年龄: <select class="form-control" name="age1" id="age1" style="width: 150px;margin-right:10px;">
  87. <option value="none">--请选择年龄--</option>
  88. <volist name="$agearray" id="vo">
  89. <option value="{$vo}">{$vo}</option>
  90. </volist>
  91. </select>
  92. <font style="color: red">至</font> &nbsp;
  93. <select class="form-control" name="age2" id="age2" style="width: 150px;margin-right:10px;">
  94. <option value="none">--请选择年龄--</option>
  95. <volist name="$agearray" id="vo">
  96. <option value="{$vo}">{$vo}</option>
  97. </volist>
  98. </select>
  99. 身高: <select class="form-control" name="height" id="height" style="width: 150px;margin-right:10px;">
  100. <option value="none">--请选择身高--</option>
  101. </select>
  102. <font style="color: red">至</font> &nbsp;
  103. <select class="form-control" name="heightt" id="heightt" style="width: 150px;margin-right:10px;">
  104. <option value="none">--请选择身高--</option>
  105. </select>
  106. </div>
  107. <div style="margin-top: 10px;">
  108. 学历: <select class="form-control" name="education" id="education" style="width: 150px;margin-right:10px;">
  109. <option value="none">--请选择学历--</option>
  110. <volist name="$educationarray" id="vo">
  111. <option value="{$key}">{$vo}</option>
  112. </volist>
  113. </select>
  114. 职业:
  115. <select class="form-control" name="occupation" style="margin-right: 15px;width: 150px;" id="position1">
  116. <option value="none">--请选择职位--</option>
  117. </select>
  118. 收入: <select class="form-control" name="salary" id="salary" style="width: 150px;margin-right:10px;">
  119. <option value="none">--请选择收入--</option>
  120. <option value="1">5-10w</option>
  121. <option value="2">10-20w</option>
  122. <option value="3">20-35w</option>
  123. <option value="4">35-55w</option>
  124. <option value="5">100w以上</option>
  125. </select>
  126. 资产: <select class="form-control" name="property" id="property" style="width: 150px;margin-right:10px;">
  127. <option value="none">--请选择资产--</option>
  128. <volist name="$propertyarray" id="vo">
  129. <option value="{$key}">{$vo}</option>
  130. </volist>
  131. </select>
  132. </div>
  133. <div style="margin-top: 10px;">
  134. 家乡: <input class="form-control" type="text" name="home_city" style="width: 150px;margin-right:10px;" value="" placeholder="请输入省/市">
  135. 居住地: <input class="form-control" type="text" name="city" style="width: 150px;margin-right:10px;" value="" placeholder="请输入市">
  136. 婚姻状况: <select class="form-control" name="married" id="married" style="width: 150px;margin-right:10px;">
  137. <option value="none">--请选择婚姻--</option>
  138. <volist name="$marriedarray" id="vo">
  139. <option value="{$key}">{$vo}</option>
  140. </volist>
  141. </select>
  142. 性别: <select class="form-control" name="sex" id="sex" style="width: 150px;margin-right:10px;">
  143. <option value="none">--请选择性别--</option>
  144. <volist name="$sexarray" id="vo">
  145. <option value="{$key}">{$vo}</option>
  146. </volist>
  147. </select>
  148. <a class="btn btn-warning" style=" padding: 3px 10px; border-color:#ca1883;background-color:#ca1883;color: #fff" id="nonecho">隐藏</a>
  149. </div>
  150. </div>
  151. </div>
  152. </form>
  153. <form method="post" class="js-ajax-form">
  154. <div class="table-actions">
  155. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
  156. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  157. data-action="{:url('AdminIndex/tovip',array('no'=>0))}" data-subcheck="true">取消VIP
  158. </button>
  159. <elseif condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  160. <elseif condition="$Request.action eq 'screen' || $Request.param.u eq 4">
  161. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  162. data-action="{:url('AdminIndex/toscreen',array('no'=>0))}" data-subcheck="true">取消筛选用户
  163. </button>
  164. <elseif condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
  165. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  166. data-action="{:url('AdminIndex/touserlogout',array('yes'=>1))}" data-subcheck="true">清除身份信息
  167. </button>
  168. <else/>
  169. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  170. data-action="{:url('AdminIndex/tovip',array('yes'=>1))}" data-subcheck="true">成为VIP
  171. </button>
  172. <button class="btn btn-primary btn-sm js-ajax-submit" style="" type="submit" data-action="{:url('AdminIndex/totuijian',array('yes'=>1))}" onclick="return confirm('确定要成为单身推荐吗?')" data-subcheck="true">成为单身推荐
  173. </button>
  174. <button class="btn btn-primary btn-sm js-ajax-submit" style="" type="submit" data-action="{:url('AdminIndex/toscreen',array('yes'=>1))}" onclick="return confirm('确定要成为筛选用户吗?')" data-subcheck="true">成为筛选用户
  175. </button>
  176. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  177. data-action="{:url('AdminIndex/tozhuxiao',array('yes'=>1))}" onclick="return confirm('确定要成为注销吗?')" data-subcheck="true">
  178. 注销
  179. </button>
  180. </if>
  181. </div>
  182. <table class="table table-hover table-bordered">
  183. <thead>
  184. <tr>
  185. <th><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">全选</th>
  186. <th>ID</th>
  187. <th>账号</th>
  188. <th>{:lang('NICENAME')}</th>
  189. <th>真实姓名</th>
  190. <th>爱心</th>
  191. <th style="text-align: center;">是否推荐</th>
  192. <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  193. <th>冻结原因</th>
  194. <else/>
  195. <th>手机</th>
  196. </if>
  197. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2 || $Request.param.u eq 4">
  198. <th>网址</th>
  199. </if>
  200. <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  201. <th>冻结时间</th>
  202. <else/>
  203. <th>{:lang('REGISTRATION_TIME')}</th>
  204. </if>
  205. <th>登录时间</th>
  206. <th>身份证</th>
  207. <th>职位</th>
  208. <th>学历</th>
  209. <th>{:lang('STATUS')}</th>
  210. <th>{:lang('ACTIONS')}</th>
  211. </tr>
  212. </thead>
  213. <tbody>
  214. <php>
  215. $user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
  216. </php>
  217. <foreach name="list" item="vo">
  218. <tr>
  219. <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
  220. value="{$vo.id}" title="ID:{$vo.id}"></td>
  221. <td>{$vo.id}</td>
  222. <td>{$vo['user_login']?$vo['user_login']:($vo['mobile']?$vo['mobile']:lang('THIRD_PARTY_USER'))}
  223. </td>
  224. <td>{$vo['user_nickname']?$vo['user_nickname']:lang('NOT_FILLED')}</td>
  225. <td>{$vo['real_name']?$vo['real_name']:lang('NOT_FILLED')}</td>
  226. <td>{$vo['redheart']}</td>
  227. <td style="text-align: center;">
  228. <switch name="vo.is_tuijian">
  229. <case value="1">
  230. <span style="color: blue">是</span>
  231. </case>
  232. <case value="0">
  233. <span style="color: red">否</span>
  234. </case>
  235. </switch>
  236. </td>
  237. <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  238. <td><span style="color:red">{$vo.freezing}</span></td>
  239. <else/>
  240. <td>{$vo.mobile}</td>
  241. </if>
  242. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2 || $Request.param.u eq 4">
  243. <td>
  244. <span class="label label-primary copy-btn copy" data-url="{:url('/weixin/member/home?id=','','',true)}{$vo.id}">复制</span>
  245. </td>
  246. </if>
  247. <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  248. <td>{$vo.updated_at}</td>
  249. <else/>
  250. <td>{:date('Y-m-d H:i',$vo['create_time'])}</td>
  251. </if>
  252. <td>{:date('Y-m-d H:i',$vo['last_login_time'])}</td>
  253. <td>
  254. <switch name="vo.idcard_check">
  255. <case value="1">
  256. <span style="color:red">未审</span>
  257. </case>
  258. <case value="2">
  259. <span style="color:green">已审</span>
  260. </case>
  261. <case value="3">
  262. <span style="color:#ef9413">驳回</span>
  263. </case>
  264. <case value="">
  265. <span style="color:blue">未填</span>
  266. </case>
  267. </switch>
  268. </td>
  269. <td>
  270. <switch name="vo.position_check">
  271. <case value="0">
  272. <span style="color:blue">未填</span>
  273. </case>
  274. <case value="1">
  275. <span style="color:red">未审</span>
  276. </case>
  277. <case value="2">
  278. <span style="color:green">已审</span>
  279. </case>
  280. <case value="3">
  281. <span style="color:#ef9413">驳回</span>
  282. </case>
  283. <case value="">
  284. <span style="color:blue">未填</span>
  285. </case>
  286. </switch>
  287. </td>
  288. <td>
  289. <switch name="vo.education_check">
  290. <case value="0">
  291. <span style="color:blue">未填</span>
  292. </case>
  293. <case value="1">
  294. <span style="color:red">未审</span>
  295. </case>
  296. <case value="2">
  297. <span style="color:green">已审</span>
  298. </case>
  299. <case value="3">
  300. <span style="color:#ef9413">驳回</span>
  301. </case>
  302. <case value="">
  303. <span style="color:blue">未填</span>
  304. </case>
  305. </switch>
  306. </td>
  307. <td>
  308. <if condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
  309. <if condition="$vo.idcard eq '' || $vo.idcard eq null">
  310. <span style="color:green">身份已清除</span>
  311. <else/>
  312. <span style="color:red">身份未清除</span>
  313. </if>
  314. <else/>
  315. <switch name="vo.user_status">
  316. <case value="0">
  317. <span class="label label-danger">已冻结</span>
  318. </case>
  319. <case value="1">
  320. <span class="label label-success">{$user_statuses[$vo['user_status']]}</span>
  321. </case>
  322. <case value="2">
  323. <span class="label label-warning">{$user_statuses[$vo['user_status']]}</span>
  324. </case>
  325. </switch>
  326. </if>
  327. </td>
  328. <td>
  329. <if condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
  330. <a class="btn btn-xs btn-primary" href="{:url('adminIndex/edit',array('id'=>$vo['id']))}">编辑</a>
  331. <a class="btn btn-xs btn-warning js-ajax-dialog-btn" style="background-color: #d00a81;border-color:#d00a81" href="{:url('adminIndex/touserlogout',array('yes'=>1,'ids'=>$vo['id']))}" data-msg="确认清理该用户身份证信息?">清除身份证信息</a>
  332. <else/>
  333. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
  334. <a class="btn btn-xs btn-primary" href="{:url('adminIndex/edit',array('id'=>$vo['id'],'u'=>2))}">编辑</a>
  335. <else/>
  336. <a class="btn btn-xs btn-primary" href="{:url('adminIndex/edit',array('id'=>$vo['id']))}">编辑</a>
  337. </if>
  338. <neq name="vo.id" value="1">
  339. <empty name="vo.user_status">
  340. <a class="btn btn-xs btn-success js-ajax-dialog-btn"
  341. href="{:url('adminIndex/cancelban',array('id'=>$vo['id']))}"
  342. data-msg="{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:lang('ACTIVATE_USER')}</a>
  343. <else/>
  344. <!-- <a class="btn btn-xs btn-warning js-ajax-dialog-btn"
  345. href="{:url('adminIndex/ban',array('id'=>$vo['id']))}"
  346. data-msg="确认冻结该用户?">冻结</a> -->
  347. <a class="btn btn-xs btn-warning" onclick="getPaike({$vo['id']})"
  348. >冻结</a>
  349. </empty>
  350. <else/>
  351. <a class="btn btn-xs btn-warning disabled">冻结</a>
  352. </neq>
  353. <if condition="$Request.action neq 'userlogout' || $Request.param.u neq 5">
  354. <a class="btn btn-xs btn-warning js-ajax-dialog-btn" style="background-color: #5c0d8e;border-color:#5c0d8e" href="{:url('adminIndex/tozhuxiao',array('yes'=>1,'ids'=>$vo['id']))}" data-msg="确认注销该用户?">注销</a>
  355. </if>
  356. <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  357. <else/>
  358. <a class="btn btn-xs btn-danger" href="{:url('adminIndex/accountadd',array('id'=>$vo['id']))}">爱心充值</a>
  359. </if>
  360. <if condition="$Request.action eq 'screen' || $Request.param.u eq 2">
  361. <a class="btn btn-xs btn-danger" style="background-color: #e807b8;border-color:#e807b8" onclick="getPaike2({$vo['id']})">备注</a>
  362. </if>
  363. </if>
  364. </td>
  365. </tr>
  366. </foreach>
  367. </tbody>
  368. </table>
  369. <div class="pagination">{$page}</div>
  370. </form>
  371. </div>
  372. <script src="__STATIC__/js/admin.js"></script>
  373. <script src="__STATIC__/js/clipboard.min.js"></script>
  374. <script src="__STATIC__/js/layer/layer.js"></script>
  375. <script src="__STATIC__/js/position/position1.js" type="text/javascript"></script>
  376. <script src="__STATIC__/js/height/height.js" type="text/javascript"></script>
  377. <script>
  378. function reloadPage(win) {
  379. win.location.reload();
  380. }
  381. /**
  382. * 生成二维啊
  383. * @returns {boolean}
  384. */
  385. function makeQrcode() {
  386. var url = $("#url").val();
  387. if(url == '' || url == null){
  388. showMsg('请填写生成参数');
  389. return false;
  390. }
  391. // 生成处理
  392. $(".qrcode a").html("二维码生成中...");
  393. $.post('/user/recommend/makeQrcode', {url: url}, function(res){
  394. if(res.code == 'success'){
  395. showMsg(res.message);
  396. $(".qrcode a").attr('data-href', res.data.qrcode);
  397. $(".qrcode a").html('<img src="'+res.data.qrcode+'" width="48" height="48"/>');
  398. }else{
  399. $(".qrcode a").html("");
  400. showMsg(res.message);
  401. }
  402. },'json');
  403. }
  404. $(function () {
  405. var copyText = '';
  406. var copyBox = new ClipboardJS('.copy',{
  407. text: function (e) {
  408. if(copyText=='' || copyText == null){
  409. showMsg('暂无复制内容');
  410. return false;
  411. }
  412. return copyText;
  413. }
  414. });
  415. copyBox.on("success",function(e){
  416. console.log(e);
  417. showMsg('复制成功');
  418. });
  419. copyBox.on("error",function(e){
  420. showMsg('复制失败');
  421. });
  422. $(".copy-btn").click(function(){
  423. copyText = $(this).attr('data-url');
  424. });
  425. $(".qrcode a").click(function(){
  426. var url = $(this).attr('data-href');
  427. if(url){
  428. imagePreviewDialog(url);
  429. }
  430. })
  431. setCookie("refersh_time", 3);
  432. Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
  433. //批量冻结
  434. $('#js-batch-delete').click(function (e) {
  435. var ids = [];
  436. $("input[name='ids[]']").each(function () {
  437. if ($(this).is(':checked')) {
  438. ids.push($(this).val());
  439. }
  440. });
  441. if (ids.length == 0) {
  442. return false;
  443. }
  444. ids = ids.join(',');
  445. /*art.dialog.open("/user/admin_index/del.html?ids="+ids, {
  446. title: "批量冻结",
  447. width: "300px",
  448. close : function () {
  449. art.dialog.open.origin.location.reload();
  450. }
  451. });*/
  452. });
  453. //end
  454. });
  455. });
  456. </script>
  457. <script type="text/javascript" >
  458. //获得大职位下拉框对象
  459. var province = document.getElementById("position1");
  460. //遍历大职位数据,并把里面大职位的数据追加到option选项中
  461. for (var i=0; i<positions.length; i++) {
  462. var option = document.createElement("option");
  463. option.value = positions[i].p_name;
  464. option.innerHTML = positions[i].p_name;
  465. province.appendChild(option);
  466. }
  467. // function abc(){
  468. // alert(document.getElementById('position1').value);
  469. // var proindex= document.getElementById('position1').selectedIndex;
  470. // var cityindex= document.getElementById('position2').selectedIndex;
  471. // alert(document.getElementById('position1').options[proindex].text+document.getElementById('position2').options[cityindex].text);
  472. // }
  473. </script>
  474. <script type="text/javascript" >
  475. //获得身高下拉框对象
  476. var province = document.getElementById("height");
  477. //遍历身高数据,并把里面身高的数据追加到option选项中
  478. for (var i=0; i<heights.length; i++) {
  479. var option = document.createElement("option");
  480. option.value = heights[i].p_id;
  481. option.innerHTML = heights[i].p_name;
  482. province.appendChild(option);
  483. }
  484. </script>
  485. <script type="text/javascript" >
  486. //获得身高下拉框对象
  487. var provincet = document.getElementById("heightt");
  488. //遍历身高数据,并把里面身高的数据追加到option选项中
  489. for (var i=0; i<heights.length; i++) {
  490. var option = document.createElement("option");
  491. option.value = heights[i].p_id;
  492. option.innerHTML = heights[i].p_name;
  493. provincet.appendChild(option);
  494. }
  495. provincet.onchange = function() {
  496. var heightval=this.value;
  497. if($('#height').val()!='none'){
  498. if($('#height').val()>this.value){
  499. alert('开始升高不能大于结束身高!');
  500. }
  501. }
  502. }
  503. </script>
  504. <script>
  505. function reloadPage(win) {
  506. win.location.reload();
  507. }
  508. $(function () {
  509. setCookie("refersh_time", 3);
  510. Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
  511. //批量冻结
  512. $('#js-batch-delete').click(function (e) {
  513. var ids = [];
  514. $("input[name='ids[]']").each(function () {
  515. if ($(this).is(':checked')) {
  516. ids.push($(this).val());
  517. }
  518. });
  519. if (ids.length == 0) {
  520. return false;
  521. }
  522. ids = ids.join(',');
  523. /*art.dialog.open("/user/admin_index/del.html?ids="+ids, {
  524. title: "批量冻结",
  525. width: "300px",
  526. close : function () {
  527. art.dialog.open.origin.location.reload();
  528. }
  529. });*/
  530. });
  531. //end
  532. });
  533. });
  534. </script>
  535. <script>
  536. function doDelete() {
  537. // Wind.use('artDialog', function () {
  538. var ids = [];
  539. $(".js-check:checked").each(function () {
  540. var id = $(this).val();
  541. if (id > 0) {
  542. ids.push(id);
  543. }
  544. });
  545. if (ids.length <= 0) {
  546. showMsg('请先选择操作项');
  547. return false;
  548. }
  549. if(confirm('确定批量删除选择项?不可恢复')){
  550. $.post('/user/admin_index/del',{id:ids},function(res){
  551. if(res.code == 1){
  552. showMsg(res.msg);
  553. setTimeout(function () {
  554. location.reload();
  555. }, 800)
  556. }else{
  557. showMsg(res.msg);
  558. }
  559. },"json")
  560. }
  561. // });
  562. }
  563. function getPaike(id){
  564. var addUrl = "{:url('AdminIndex/ban')}?id="+id;
  565. layer.open({
  566. type: 2, //1:页面层,2:iframe层,3:加载层,4:tips层。
  567. title: '条件筛选',
  568. shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
  569. shade: 0.8, //遮罩
  570. area: ['480px', '360px'],
  571. content: addUrl,
  572. end: function () { //最后执行reload
  573. location.reload();
  574. }
  575. });
  576. }
  577. $("#showcho").click(function(){
  578. $("#showchoice").show();
  579. });
  580. $("#nonecho").click(function(){
  581. $("#showchoice").hide();
  582. });
  583. /* function showMsg(msg, time){
  584. time = time? time : 1000;
  585. art.dialog({
  586. content: msg,
  587. icon: 'warning'
  588. });
  589. setTimeout(function () {
  590. }, time)
  591. }*/
  592. </script>
  593. <script >
  594. function getPaike2(id){
  595. openIframeLayer("{:url('AdminIndex/showbeizhu')}?id=" + id , "", {
  596. area: ['600px', '300px'],
  597. // btn: ['确定', '取消'],
  598. })
  599. }
  600. </script>
  601. </body>
  602. </html>