/// <summary> /// 上传商品 /// </summary> /// <param name="categoryId"></param> /// <returns></returns> public ActionResult ProductUpload(int categoryId, string spu, int status = -2) { var categoryModel = CategoryBLL.GetCategoriesInfoByID(LanguageEnum.SimplifiedChinese, categoryId); var categoryAttr = bll.GetCategoryAttrs(categoryId); SupplierBrandBLL brand = new SupplierBrandBLL(); ViewBag.SupplierBrand = brand.GetBrandBySupplierId(CurrentUser.SupplierID, LanguageEnum.SimplifiedChinese); ViewBag.CategoryId = categoryId; ViewBag.CategoryModel = categoryModel; ViewBag.Action = "upload"; ProductUpdateBindingModel pmodel = new ProductUpdateBindingModel(); // 根据spuID 获取相关信息 if (!string.IsNullOrEmpty(spu)) { pmodel = bll.ReadProductInfo(spu, CurrentUser.SupplierID, status, false); if (pmodel == null || pmodel.ProductInfo_T == null) { return(new TransferResult("/Error/PageNotFound")); } else { ViewBag.ProductModel = pmodel; } } else { ViewBag.ProductModel = pmodel; } return(View(categoryAttr)); }