Commit 8d176991 authored by 黄奎's avatar 黄奎

页面修改

parent 200fd992
......@@ -21,7 +21,7 @@ namespace Edu.Model.Entity.Course
public int OfferId { get; set; }
/// <summary>
/// 课程编号
/// 课程编号/留学就业产品编号
/// </summary>
public int CourseId { get; set; }
......
......@@ -219,12 +219,12 @@ namespace Edu.Module.Course
}
/// <summary>
/// 获取课程报价单实体
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public RB_Course_Offer_ViewModel GetCourseOfferModule(object Id)
/// <summary>
/// 获取课程报价单实体
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public RB_Course_Offer_ViewModel GetCourseOfferModule(object Id)
{
var model = course_OfferRepository.GetEntity<RB_Course_Offer_ViewModel>(Id);
if (model != null)
......@@ -381,8 +381,18 @@ namespace Edu.Module.Course
Unit_Price = uPrice,
UpdateBy = offerModel.CreateBy,
UpdateTime = DateTime.Now,
OfferId = offerId
OfferId = offerId,
};
if (offerModel.OfferType == OfferTypeEnum.Course)
{
orderModel.OrderType = OrderTypeEnum.CourseOrder;
orderModel.SourceId = 0;
}
else
{
orderModel.OrderType = OrderTypeEnum.StudyabroadOrder;
orderModel.SourceId = item.CourseId;
}
int OrderId = orderRepository.Insert(orderModel);
orderModel.OrderId = OrderId;
flag = OrderId > 0;
......
......@@ -316,6 +316,7 @@ namespace Edu.WebApi.Controllers.Course
public ApiResult OfferTransOrder()
{
var offerId = base.ParmJObj.GetInt("OfferId", 0);
int OfferType = base.ParmJObj.GetInt("OfferType", 0);
if (offerId <= 0)
{
return ApiResult.ParamIsNull("请传递报价单编号!");
......@@ -334,13 +335,18 @@ namespace Edu.WebApi.Controllers.Course
return ApiResult.ParamIsNull("请传递报价单详情!");
}
string message = "";
foreach (var item in detailsList)
//报价单类型为课程
if (OfferType == 1)
{
if (item.ClassId <= 0)
foreach (var item in detailsList)
{
message += string.Format("、请选择【{0}】的班级", item.CourseName);
if (item.ClassId <= 0)
{
message += string.Format("、请选择【{0}】的班级", item.CourseName);
}
}
}
if (!string.IsNullOrEmpty(message))
{
return ApiResult.ParamIsNull(message:message[1..]);
......
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