<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                首先列出當前用戶的所有結算記錄。 結算部分是先寫的,用戶登錄部分就先簡化處理,留待后面解決。 編輯index方法: ~~~ public function index($ap=0){ } ~~~ 獲取當前用戶: ~~~ $activeuser = UserModel::where('status',1)->find(); ~~~ 獲取結算列表: ~~~ $listcount = 0; if($ap>0){ $list = AcctModel::where('ap',$srchap) ->where('uid',$activeuser['uid']) ->order('aid', 'desc') ->paginate(20); $listcount = AcctModel::where('ap',$srchap) ->where('uid',$activeuser['uid']) ->count(); }else{ $list = AcctModel::where('uid',$activeuser['uid'])->order('aid', 'desc')->paginate(20); $listcount = AcctModel::where('uid',$activeuser['uid'])->count(); } ~~~ 然后輸出變量到模板: ~~~ $this->assign('activeuser', $activeuser['username']); $this->assign('listcount', $listcount); $this->assign('list', $list); ~~~ 最后調用模板: ~~~ return $this->fetch(); ~~~ 模板文件: /apps/index/view/account/index.html ~~~ {layout name="layout" /} <div class="container"> <div id="accountlist" class="grid"> {load href="__PUBLIC__/js/account_moderate.js" /} <div class="actions"> <ul> <li class="action"> <button type="button" onclick="location.href='http://127.0.0.1/tp5/public/index.php/index/account/account/';return false;" name="topicsubmit" id="fastpostsubmit" value="topicsubmit" tabindex="21" class="pn pnc btn btn-green"><strong>立即結算</strong></button> </li> </ul> </div> <div class="sorting"> <div class="ui8-select"> <span class="active-option">{$aptag}</span> <i aria-hidden="true" class="fa fa-chevron-down icon_g"></i> <ol class="options"> <li class="option" value="0"><a href="http://127.0.0.1/tp5/public/index.php/index/account/index/">全部賬期</a></li> <li class="option" value="1"><a href="http://127.0.0.1/tp5/public/index.php/index/account/index/ap/1">上月<span></span></a></li> <li class="option" value="2"><a href="http://127.0.0.1/tp5/public/index.php/index/account/index/ap/2">前三月</a></li> <li class="option" value="3"><a href="http://127.0.0.1/tp5/public/index.php/index/account/index/ap/3">前四月</a></li> <li class="option" value="4"><a href="http://127.0.0.1/tp5/public/index.php/index/account/index/ap/4">前五月</a></li> </ol> </div> <div class="ui8-select"> <span class="active-option">當前賬戶:<em>{$activeuser}</em> 共<em>{$listcount}</em>條記錄</span> </div> </div> <form method="post" autocomplete="off" name="moderate" id="moderate" action="http://127.0.0.1/tp5/public/index.php/index/account/"> <table class="listbox" cellpadding="1" cellspacing="0"> <tbody> <tr class="ttr"> <td class="chk">選擇</td> <td class="ap">賬期</td> <td class="nick">合作者</td> <td class="sum">分成金額</td> <td class="pay">結算狀態</td> </tr> </tbody> {volist name="list" id="account" } <tbody id=""> <tr class="{if condition="$mod neq 1"}tr1{else /}tr2{/if}"> <td><input onclick="tmodclick(this)" type="checkbox" name="moderate[]" value="{$account.aid}"></td> <td><cite>{$account.ap}</cite></td> <td><cite>{$account.anick}</cite></td> <td><cite>{$account.amount}</cite></td> <td><cite>{$account.pstatus}</cite></td> </tr> </tbody> {/volist} </table> {load href="__PUBLIC__/css/moderator.css" /} <div id="mdly" style="display: none;"> <table cellpadding="0" cellspacing="0"> <tbody> <tr> <td class="t_l"></td> <td class="t_c"></td> <td class="t_r"></td> </tr> <tr> <td class="m_l"></td> <td class="m_c"> <div class="popcon"> <input type="hidden" name="optgroup"> <input type="hidden" name="operation"> <a class="cp" href="javascript:;" title="最小化" onclick="$('mdly').className='cpd'">最小化</a> <label><input type="checkbox" name="chkall" class="pc" onclick="if(!($('mdct').innerHTML = modclickcount = checkall(this.form, 'moderate'))) {$('mdly').style.display = 'none';}">全選</label> <h6><span>選中</span><strong onclick="$('mdly').className='';" onmouseover="this.title='最大化'" id="mdct" title="最大化">2</strong><span>條記錄: </span></h6> <p> <button type="button" onclick="tmodaccounts(3, 'pay');return false;" name="paysubmit" id="paysubmit" value="paysubmit" tabindex="100" class="pn pnc btn btn-small btn-green"><strong>結算狀態</strong></button> <button type="button" onclick="tmodaccounts(3, 'delete');return false;" name="delsubmit" id="delsubmit" value="delsubmit" tabindex="101" class="pn pnc btn btn-small btn-red"><strong>刪除</strong></button> </p> </div> </td> <td class="m_r"></td> </tr> <tr> <td class="b_l"></td> <td class="b_c"></td> <td class="b_r"></td> </tr> </tbody> </table> </div> </form> <div class="pgbox"> {$list->render()} </div> </div> </div> ~~~ 打開瀏覽器 http://127.0.0.1/tp5/public/index.php/index/account/ 頁面輸出類似 ![](https://box.kancloud.cn/2016-07-10_5781a372f1056.png) 補充代碼: ~~~ $time = time(); switch ($ap) { case '1': $srchap = date('Ym',strtotime("-1 month", $time)); $aptag = '上月'; break; case '2': $srchap = date('Ym',strtotime("-2 month", $time)); $aptag = '前三月'; break; case '3': $srchap = date('Ym',strtotime("-3 month", $time)); $aptag = '前四月'; break; case '4': $srchap = date('Ym',strtotime("-4 month", $time)); $aptag = '前五月'; break; default: $srchap = ''; $aptag = '全部賬期'; break; } $this->assign('aptag', $aptag); ~~~ 輸出賬期記錄。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看