list.php
2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
use yii\helpers\Html;
use backend\widgets\LinkPager;
$this->title = $this->params['main_title'].'-'.$this->params['sub_title'];
?>
<div class="panel">
<div class="panel-body">
<h4>房间号:<?=$room->room_id?> 直播标题:<?=$room->title?></h4>
</div>
</div>
<div class="form-group">
<label>
<a href="/product/add/<?=$room->room_id?>" class="btn btn-primary">+ 添加商品</a>
</label>
</div>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table mb30">
<thead>
<tr style="white-space:nowrap">
<th><input type="checkbox" onclick="checkall(this)">选择</th>
<th>商品ID</th>
<th>排序</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<?php foreach ($list as $model):?>
<tr data-stock="1" data-source="1" data-status="2" data-id="5011880">
<td><input type="checkbox" value="<?=$model->id?>" name="product[]"></td>
<td><?=$model->product_id?></td>
<td><?=$model->sort?></td>
<td>
<a href="/product/edit/<?=$model->id?>" class="btn btn-default btn-white">编辑</a>
<a onclick="return confirm('删除该商品?')" href="/product/operate/<?=$model->id?>?type=del" class="btn btn-danger btn-metro">删除</a>
<a onclick="sendProduct()" href="javascript:;" class="btn btn-danger btn-metro">弹框</a>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<!-- table-responsive -->
<?php echo LinkPager::widget(['pagination' => $pagination]);?>
</div>
<!-- col-md-12 -->
</div>
<script>
function sendProduct(product_id){
if (!confirm('将推送该商品,确定?')){
return;
}
alert('已发送!');
}
</script>