Forráskód Böngészése

显示分组里信息数量

shenzhipeng 3 éve
szülő
commit
aa57c42087

+ 6 - 0
application/module/ctrl/User_smsgroup_adminAction.class.php

@@ -27,6 +27,12 @@ class User_smsgroup_adminAction extends Action{
 		$error			= $_REQUEST['error'];
 
 		$list  = $admin->select_sms_user_group($where);
+		foreach($list as $item) {
+			$where .= " and group_name='{$item['name']}'";
+			$count = $admin->selectSmsCustomerCount($where);
+			$count = empty($count) ? 0  : $count;
+			$item['count'] = $count;
+		}
 		
 		$this->assign('info',$info);
 		$this->assign('error',$error);

+ 2 - 2
application/module/view/user_smsgroup_admin/index.html

@@ -38,7 +38,7 @@
 					<th style="width:80px;"><input type="checkbox"  id="check-all" />&nbsp;&nbsp;全选</th>
 					<th>ID</th>
 					<th >客户分组名称</th>
-					<th >创建人</th>
+					<th >数量</th>
 					<th >添加时间</th>
 					<th>操作</th>
 
@@ -51,7 +51,7 @@
 					</td>
 					<td><{$item.id}></td>
 					<td><{$item.name}></td>
-					<td><{$uname}></td>
+					<td><{$item.count}></td>
 					<td><{$item.created_at}></td>
 					<td>
 						<a  onclick="to_delete('<{$item.name}>','<{$item.id}>');" style="margin-left:50px;text-align:right;cursor:pointer;" >删除</a>