| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 | 
							- <?php
 
- namespace Scm_servicer\Lib;
 
- use Dever;
 
- class Manage
 
- {
 
-     public function __construct()
 
-     {
 
-         Dever::load('manage/auth.init');
 
-     }
 
-     public function getStore($id)
 
-     {
 
-         $table = array();
 
-         $table['head'] = array('仓库名称', '仓库编码', '操作');
 
-         $table['body'] = array();
 
-         $data = Dever::db('scm_servicer/store')->select(array('servicer_id' => $id));
 
-         if ($data) {
 
-         	$status = Dever::db('scm_servicer/store')->config['status'];
 
-             foreach ($data as $k => $v) {
 
-             	$status_name = '';
 
-             	if ($v['status'] == 2) {
 
-             		$status_name = '(已禁用)';
 
-             	}
 
-             	$oper = '<a class="layui-btn" href="'.Dever::url('lib/set.home?role=servicer/store&id=' . $v['id'], 'scm_product').'">仓库明细</a>';
 
-                 $table['body'][$k][] = $v['name'] . $status_name;
 
-                 $table['body'][$k][] = $v['code'];
 
-                 $table['body'][$k][] = $oper;
 
-             }
 
-         }
 
-         $body[''] = array
 
-         (
 
-             'type' => 'table',
 
-             'content' => $table,
 
-         );
 
-         if ($table['body']) {
 
-             return Dever::show('', $body);
 
-         } else {
 
-             return '暂无';
 
-         }
 
-     }
 
- }
 
 
  |