Commit 26f261dc authored by liudong1993's avatar liudong1993

商品详情

parent 04435eb4
......@@ -75,10 +75,19 @@ namespace Mall.Model.Extend.Product
/// </summary>
public List<string> SpecificationList { get; set; }
/// <summary>
/// 规格名称列表
/// </summary>
public List<string> SpecificationNameList { get; set; }
/// <summary>
/// 是否申请售后
/// </summary>
public int? IsApplyForAfterSale { get; set; }
/// <summary>
/// 会员价格
/// </summary>
public decimal MemberPrice { get; set; }
/// <summary>
/// 积分赠送
......
......@@ -1244,7 +1244,8 @@ namespace Mall.Module.Product
}
//规格赋值
gmodel.SpecificationNameList = new List<string>();
//gmodel.SpecificationNameList = new List<string>();
item.SpecificationNameList = new List<string>();
List<object> attr_list = new List<object>();
if (string.IsNullOrEmpty(item.SpecificationSort))
{
......@@ -1270,7 +1271,7 @@ namespace Mall.Module.Product
{
var sModel = speciList.Where(x => x.GoodsId == item.GoodsId).ToList()[i];
var svModel = speciVList.Where(x => x.GoodsId == item.GoodsId && x.SpecificationId == sModel.Id && x.Sort == Convert.ToInt32(KeyArr[i])).FirstOrDefault();
gmodel.SpecificationNameList.Add(sModel.Name + ":" + svModel.Name);
item.SpecificationNameList.Add(sModel.Name + ":" + svModel.Name);
attr_list.Add(new
{
attr_group_name = sModel.Name,
......@@ -1569,6 +1570,9 @@ namespace Mall.Module.Product
TotalGoodsMoney += item.Final_Price ?? 0;
TotalGoodsOriginalMoney += (gmodel.OriginalPrice ?? 0) * (item.Number ?? 0);
TotalGoodsSellMoney += gmodel.MemberPrice * (item.Number ?? 0);
item.Unit_Price = gmodel.SellingPrice ?? 0;
item.Original_Price = gmodel.OriginalPrice ?? 0;
item.MemberPrice = gmodel.MemberPrice;
item.GoodsWeight = GoodsWeight;
item.Express = Express;
item.IntegralMoney = integral_price;
......@@ -1676,7 +1680,7 @@ namespace Mall.Module.Product
id = gmodel.Id,
name = gmodel.Name,
categoryIdList = item.CategoryIdList,
specificationNameList = gmodel.SpecificationNameList,
specificationNameList = item.SpecificationNameList,
num = item.Number,
forehead_integral = gmodel.PointsDeduction,
forehead_integral_type = gmodel.PointsDeductionType,
......@@ -1686,23 +1690,23 @@ namespace Mall.Module.Product
forehead = gmodel.FullMoneyPinkage,//满额包邮
freight_id = gmodel.FreightId,
express_price = item.Express,
unit_price = gmodel.SellingPrice,
total_original_price = (gmodel.OriginalPrice ?? 0) * (item.Number ?? 0),
total_price = (gmodel.SellingPrice ?? 0) * (item.Number ?? 0),//优惠券(有平摊情况) 积分抵扣 (默认从第一个商品抵扣)
unit_price = item.Unit_Price,
total_original_price = (item.Original_Price ?? 0) * (item.Number ?? 0),
total_price = (item.Unit_Price ?? 0) * (item.Number ?? 0),//优惠券(有平摊情况) 积分抵扣 (默认从第一个商品抵扣)
goods_attr = new
{
id = 0,
goods_id = gmodel.Id,
sign_id = item.SpecificationSort,
stock = gmodel.InventoryNum,
price = gmodel.SellingPrice ?? 0,
original_price = gmodel.OriginalPrice ?? 0,
price = item.Unit_Price??0,
original_price = item.Original_Price ?? 0,
no = gmodel.GoodsNumbers,
weight = item.GoodsWeight,
pic_url = gmodel.CoverImage,
individual_share = umodel?.IsDistributor ?? 2,// 是否分销商
share_type = gmodel.SeparateDistributionMoneyType,//分销佣金类型,
member_price = gmodel.MemberPrice,
member_price = item.MemberPrice,
integral_price = demodel.Use_Integral == 1 ? item.IntegralMoney : 0,//积分抵扣金额
use_integral = demodel.Use_Integral == 1 ? item.IntegralNumber : 0,
couponMoney,
......@@ -1729,7 +1733,7 @@ namespace Mall.Module.Product
},
attr_list = item.Attr_list,
discounts = item.Discounts,
member_discount = ((gmodel.SellingPrice ?? 0) * (item.Number ?? 0)) - (gmodel.MemberPrice * (item.Number ?? 0)),
member_discount = ((item.Unit_Price ?? 0) * (item.Number ?? 0)) - (item.MemberPrice * (item.Number ?? 0)),
cover_pic = gmodel.CoverImage,
is_level_alone = gmodel.SeparateSetMember,//是否单独设置会员价
//custom_currency= [],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment