html代碼增加
```
<a href="javascript:;" class="btn btn-default" style="font-size:14px;color:dodgerblue;">
<i class="fa fa-dollar"></i>
<span class="extend">
合計醫保余額:<span id="money">0</span>
</span>
</a>
```
控制器增加
```
$summoney = $this->model->where($where)->sum('money');
$result = array("total" => $list->total(), "rows" => $list->items(),"extend" => ['money' => $summoney]);
帶關聯表查詢,字段前需要加當前模型前綴
//$summoney = $this->model->with(['user'])->where($where)->where('status',0)->sum('report_settle_detail.amount');
```
js增加
```
//當表格數據加載完成時
table.on('load-success.bs.table', function (e, data) {
//這里可以獲取從服務端獲取的JSON數據
$("#money").text(data.extend.money);
});
```