| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 | <?phpnamespace Scm_role\Lib;use Dever;class Servicer{    public function __construct()    {        Dever::load('manage/auth.init');    }    public function getStore($id)    {        $table = array();        $table['head'] = array('仓库名称', '仓库编码', '操作');        $table['body'] = array();        $data = Dever::db('scm_role/servicer_store')->select(array('servicer_id' => $id));        if ($data) {        	$status = Dever::db('scm_role/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_role').'">商品列表</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 '暂无';        }    }}
 |