index.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. {// 引入标签库 }
  2. <tagLib name="html" />
  3. <include file="Public:header" />
  4. <script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.php?lang=zh-cn" ></script>
  5. <load href='__TMPL__Common/js/calendar/calendar.css' />
  6. <load href='__TMPL__Common/js/calendar/calendar.js' />
  7. <load href='__TMPL__Common/js/jquery.weebox.js' />
  8. <php>
  9. function get_user_diamonds($user_id)
  10. {
  11. return M("User")->where("id=".intval($user_id))->getField("diamonds");
  12. }
  13. function to_user_list($user_id)
  14. {
  15. return '<a href="'.U('UserGeneral/index',array('id'=>$user_id)).'">'.$user_id.'</a>';
  16. }
  17. function get_promoter_user($child_count,$user_id)
  18. {
  19. if($child_count >0) {
  20. return $child_count.'<a href="'.U('XyPromoterUser/index',array('bm_pid'=>$user_id)).'">明细</a>';
  21. }else{
  22. return $child_count;
  23. }
  24. }
  25. function get_promoter_one_name($pid)
  26. {
  27. $promoter=M("BmPromoter")->where("user_id=".intval($pid))->find();
  28. return $child_count.'<a href="'.U('BmPromoterOne/index',array('id'=>$promoter['id'])).'">'.$promoter['name'].'</a>';
  29. }
  30. function get_account($user_id){
  31. return '<a href="javascript:account('.$user_id.')">充值保证金</a>';
  32. }
  33. function get_prop_list($id)
  34. {
  35. return $child_count.'<a href="'.U('XyPromoterTwo/closed_prop',array('promoter_id'=>$id)).'">收礼物日志</a>';
  36. }
  37. </php>
  38. <script>
  39. function account(user_id)
  40. {
  41. $.ajax({
  42. url: ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=account&id="+user_id,
  43. data: "ajax=1",
  44. dataType: "json",
  45. success: function(msg){
  46. if(msg.status==0){
  47. alert(msg.info);
  48. }
  49. },
  50. error: function(){
  51. $.weeboxs.open(ROOT+'?'+VAR_MODULE+'='+MODULE_NAME+'&'+VAR_ACTION+'=account&id='+user_id, {contentType:'ajax',showButton:false,title:"充值保证金",width:600,height:260});
  52. }
  53. });
  54. }
  55. </script>
  56. <div class="main">
  57. <div class="main_title_list"><div class="list-line-ico"></div>会员单位列表</div>
  58. <div class="search_row">
  59. <form name="search" action="__APP__" method="get">
  60. <div>会员单位ID:<input type="text" style="width:60px;" class="textbox" name="id" value="{:trim($_REQUEST['id'])}" /></div>
  61. <div>会员单位名称:<input type="text" class="textbox" name="name" value="{:trim($_REQUEST['name'])}" /></div>
  62. <div>运营中心名称:<input type="text" class="textbox" name="parent_name" value="{:trim($_REQUEST['parent_name'])}" /></div>
  63. <div>上级ID:<input type="text" style="width:60px;" class="textbox" name="pid" value="{:trim($_REQUEST['pid'])}" /></div>
  64. <div>手机号:<input type="text" style="width:80px;" class="textbox" name="mobile" value="{:trim($_REQUEST['mobile'])}" /></div>
  65. <div>绑定会员ID:<input type="text" style="width:60px;" class="textbox" name="user_id" value="{:trim($_REQUEST['user_id'])}" /></div>
  66. <div>状态:
  67. <select name="is_effect">
  68. <option value="-1">全部</option>
  69. <option value="1">有效</option>
  70. <option value="0">无效</option>
  71. </select>
  72. </div>
  73. <div>创建时间:
  74. <span><input type="text" style="width:100px;" class="textbox" name="create_time_1" id="create_time_1" value="{$_REQUEST['create_time_1']}" onfocus="this.blur(); return showCalendar('create_time_1', '%Y-%m-%d', false, false, 'btn_create_time_1');" /><input type="button" class="button" id="btn_create_time_1" value="{%SELECT_TIME}" onclick="return showCalendar('create_time_1', '%Y-%m-%d', false, false, 'btn_create_time_1');" /></span>
  75. - <span><input type="text" style="width:100px;" class="textbox" name="create_time_2" id="create_time_2" value="{$_REQUEST['create_time_2']}" onfocus="this.blur(); return showCalendar('create_time_2', '%Y-%m-%d', false, false, 'btn_create_time_2');" /><input type="button" class="button" id="btn_create_time_2" value="{%SELECT_TIME}" onclick="return showCalendar('create_time_2', '%Y-%m-%d', false, false, 'btn_create_time_2');" /></span>
  76. <input type="hidden" value="XyPromoterTwo" name="m" />
  77. <input type="hidden" value="index" name="a" />
  78. <input type="submit" class="button" value="{%SEARCH}" />
  79. </div>
  80. </form>
  81. </div>
  82. <html:list
  83. id="dataTable"
  84. style="dataTable"
  85. name="data"
  86. checkbox="true"
  87. action="true"
  88. datasource="list"
  89. show="
  90. ,id:会员单位ID|100px
  91. ,name:会员单位名称
  92. ,pid|get_promoter_one_name:上级运营中心名称
  93. ,pid:上级ID
  94. ,mobile:手机号
  95. ,user_id|to_user_list:绑定会员ID
  96. ,user_id|get_user_diamonds:钻石数
  97. ,child_count|get_promoter_user=$data['user_id']:发展公会/人
  98. ,create_time|to_date:{%CREATE_TIME}
  99. ,is_effect|get_is_effect=$data['id']:{%IS_EFFECT}"
  100. actionlist="edit:{%EDIT},user_id|get_account,id|get_prop_list" />
  101. <div class="page">{$page}</div>
  102. </div>
  103. <include file="Public:footer" />