column_wms); } } var $addon_cols = 'inner_sku,wms_id,outer_sku,sync_status,inner_type,inner_product_id'; var $column_inner_name = '基础物料名称'; function column_inner_name($row) { $product_id = $row[$this->col_prefix.'inner_product_id']; $inner_type = $row[$this->col_prefix.'inner_type']; return $this->get_material_detail($inner_type,$product_id); } var $column_inner_brand = '商品品牌'; function column_inner_brand($row) { $product_id = $row[$this->col_prefix.'inner_product_id']; return ''; } var $column_eidt = '操作'; var $column_edit_order = COLUMN_IN_HEAD;//排在列头 function column_eidt($row){ $wms_id = intval($_GET['wms_id']); $node_type = kernel::single('channel_func')->getWmsNodeTypeById($_GET['wms_id']); if ($node_type == '360buy') { $channel = app::get('channel')->model('channel')->dump($_GET['wms_id'],'addon'); if($channel['addon']['business_type'] == 'yjdf') { return '-'; } } $product_id = $row[$this->col_prefix.'inner_product_id']; $finder_id = $_GET['_finder']['finder_id']; $inner_type = $row[$this->col_prefix.'inner_type']; $view = intval($_GET['view']); //同步成功的不出现同步按钮 if($row['sync_status'] != '3'){ if ($node_type == 'qimen') { $html = "同步"; } else { $html = "同步"; } return $html; } } var $column_wms = '分派到第三方仓库名称'; var $column_wms_width = '100'; function column_wms($row){ $wms_id = $row[$this->col_prefix.'wms_id']; return kernel::single('channel_func')->getChannelNameById($wms_id); } /** * 获取_material_detail * @param mixed $inner_type inner_type * @param mixed $bm_id ID * @return mixed 返回结果 */ public function get_material_detail($inner_type,$bm_id){ static $material_detail; if ($material_detail[$inner_type][$bm_id]) return $material_detail[$inner_type][$bm_id]; if ($inner_type == '0'){ $basicObj = app::get('material')->model('basic_material'); $basic = $basicObj->dump(array('bm_id'=>$bm_id),'material_name'); $material_detail[$inner_type][$bm_id] = $basic['material_name']; }else{ $salesObj = app::get('material')->model('sales_material'); $sales = $salesObj->dump(array('sm_id'=>$bm_id),'sales_material_name'); $material_detail[$inner_type][$bm_id] = $sales['sales_material_name']; } return $material_detail[$inner_type][$bm_id]; } }