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

页面修改

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