<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  <title>业务管理</title>
  <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  <link rel="stylesheet" href="../static/web/css/admin.css">
<style>
.table td,.table th{border-top:0}
</style>
  <script language="javascript">
    //获得选中项
    function getCheckboxItem() {
      var allSel = "";
      if (document.form1.aids.value) return document.form1.aids.value;
      for (i = 0; i < document.form1.aids.length; i++) {
        if (document.form1.aids[i].checked) {
          if (allSel == "")
            allSel = document.form1.aids[i].value;
          else
            allSel = allSel + "`" + document.form1.aids[i].value;
        }
      }
      return allSel;
    }
    function ReSel() {
      for (i = 0; i < document.form1.aids.length; i++) {
        if (document.form1.aids[i].checked) document.form1.aids[i].checked = false;
        else document.form1.aids[i].checked = true;
      }
    }
    function DelSel() {
      var nid = getCheckboxItem();
      if (nid == "") {
        alert("请选择要删除的业务记录");
        return;
      }
      location.href = "member_do.php?dopost=deoperations&nid=" + nid;
    }
    function UpSel() {
      var nid = getCheckboxItem();
      if (nid == "") {
        alert("请选择要修改的业务记录");
        return;
      }
      location.href = "member_do.php?dopost=upoperations&nid=" + nid;
    }
    function OkSel() {
      var nid = getCheckboxItem();
      if (nid == "") {
        alert("请选择要修改的业务记录");
        return;
      }
      location.href = "member_do.php?dopost=okoperations&nid=" + nid;
    }
  </script>
</head>
<body background="../static/web/img/allbg.gif" leftmargin='8' topmargin='8'>
  <form name="form2" method="get" action="member_operations.php">
    <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="table maintable mt-3 mb-3">
      <tr>
        <td height="36" bgcolor="#f8f8f8">
          <table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td>输入订单号：</td>
              <td><input name="buyid" type="text" id="buyid" style="margin-right:10px;width:260px"></td>
              <td width="90" align="center"><button type="submit" class="btn btn-success btn-sm">搜索</button></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </form>
  <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="table maintable table-bordered">
    <tr>
      <td height="26" colspan="8" bgcolor="#EDF9D5" background='../static/web/img/tbg.gif'>
        <table width="98%" border="0" cellspacing="0" cellpadding="0" class="table table-borderless">
          <tr>
            <td width="30%" style="padding-left:10px">会员消费管理：</td>
            <td width="45%" align="right" style="padding-top:10px">
              <button type="button" onClick="location='member_operations.php?sta=0';" class="btn btn-success btn-sm">未付款</button>
              <button type="button" onClick="location='member_operations.php?sta=1';" class="btn btn-success btn-sm">已付款</button>
              <button type="button" onClick="location='member_operations.php?sta=2';" class="btn btn-success btn-sm">已完成</button>
              <button type="button" onClick="location='member_operations.php';" class="btn btn-success btn-sm">全部</button>
            </td>
            <td width="25%" align="right" style="padding-top:10px">
              <button type="button" onClick="location='member_main.php';" class="btn btn-success btn-sm">会员管理</button>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr bgcolor="#FBFCE2">
      <td width="8%" align="center">选择</td>
      <td width="20%" align="center">订单号</td>
      <td align="center">产品名称</td>
      <td width="10%" align="center">产品类型</td>
      <td width="22%" align="center">生成日期</td>
      <td width="8%" align="center">金额</td>
      <td width="8%" align="center">状态</td>
      <td width="10%" align="center">会员</td>
    </tr>
    <form name="form1">
      {dede:datalist empty='<tr><td colspan="8"><center>暂无内容</center></td></tr>'}
      <tr bgcolor="#FFFFFF" height="26" align="center" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
        <td align="center">
          <input type='checkbox' name='aids' value='<?php echo $fields['aid']?>' class='np'></td>
        <td align="center">
          <?php echo $fields['buyid']?>
        </td>
        <td align="center">
          <?php
        echo $fields['pname'].'('.$fields['oldinfo'].')';
        ?>
        </td>
        <td align="center">
          <?php echo GetPType($fields['product'])?>
        </td>
        <td align="center">
          <?php echo GetDateTimeMk($fields['mtime'])?>
          (<span>{dede:field.mtime function="floorTime(time()-@me,@me)"/}</span>)
        </td>
        <td align="center">
          <?php echo $fields['money']?>
        </td>
        <td align="center">
          <?php echo GetSta($fields['sta'])?>
        </td>
        <td align="center">
          <?php echo GetMemberID($fields['mid'])?>
        </td>
      </tr>
      {/dede:datalist}
    </form>
    <tr>
      <td height="26" colspan="8" bgcolor="#FCFDF7" style="padding-top:10px">
        &nbsp;
        <button type="button" onClick="ReSel();" class="btn btn-success btn-sm">反选</button>
        <button type="button" onClick="DelSel();" class="btn btn-success btn-sm">删除</button>
        <button type="button" onClick="UpSel();" class="btn btn-success btn-sm">设为已付款状态</button>
        <button type="button" onClick="OkSel();" class="btn btn-success btn-sm">设为已完成状态</button>
      </td>
    </tr>
    <tr>
      <td height="36" colspan="8" bgcolor="#f8f8f8" align="center">
        {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/}
      </td>
    </tr>
  </table>
</body>
</html>