find($id);
$string = '';
$string = $info['order_num'];
$seller = Dever::db('scm_seller/info')->one($info['seller_id']);
$string .= '
' . $seller['name'];
$shop = Dever::db('scm_seller/shop')->one($info['seller_shop_id']);
$string .= '.' . $shop['name'];
if (isset($info['supplier_id'])) {
$supplier = Dever::db('scm_supplier/info')->one($info['supplier_id']);
$string .= '
' . $supplier['name'];
}
if (isset($info['servicer_id'])) {
$servicer = Dever::db('scm_servicer/info')->one($info['servicer_id']);
$string .= '
' . $servicer['name'];
if (isset($info['servicer_store_id'])) {
$store = Dever::db('scm_servicer/store')->one($info['servicer_store_id']);
$string .= '.' . $store['name'];
}
}
if ($type == 'in' || $type == 'out') {
$type = Dever::db('scm_seller/'.$type.'_order_type')->one($info['type']);
$string .= '
' . $type['name'];
}
$string .= '
' . $info['info'];
return $string;
}
# 查看详情
public function show()
{
$type = Dever::input('type');
return Dever::load('scm/lib/order')->show('scm_seller/'.$type.'_order', 'scm_seller/info', 'seller_id', '经销商');
}
public function getShop($id)
{
$table = array();
$table['head'] = array('门店名称', '门店编码', '操作');
$table['body'] = array();
$data = Dever::db('scm_seller/shop')->select(array('seller_id' => $id));
if ($data) {
$status = Dever::db('scm_seller/shop')->config['status'];
foreach ($data as $k => $v) {
$status_name = '';
if ($v['status'] == 2) {
$status_name = '(已禁用)';
}
$url = Dever::url('project/database/update?project=scm_seller&table=shop&oper_save_table=info&set=1&where_id='.$v['id'], 'manage');
$oper = '编辑';
$url = Dever::url('project/database/list?project=scm_seller&table=shop_goods&oper_table=info&search_option_seller_shop_id='.$v['id'], 'manage');
$oper .= '商品清单';
$url = Dever::url('lib/set_store.home?role=seller&table=shop', 'scm_servicer');
$oper .= '分配仓库';
$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 '暂无';
}
}
}