Commit 700413a1 authored by 黄奎's avatar 黄奎

页面修改

parent cfbfd086
......@@ -242,7 +242,7 @@ namespace Edu.Module.Course
/// <param name="userInfo"></param>
/// <returns></returns>
[TransactionCallHandler]
public bool SetClassOrder(RB_Order_ViewModel demodel, UserInfo userInfo, out string message)
public bool SetClassOrder(RB_Order_ViewModel demodel, UserInfo userInfo,bool isEditOrder, out string message)
{
bool flag = false;
message = "";
......@@ -368,18 +368,23 @@ namespace Edu.Module.Course
MinPrice = spList.Where(x => demodel.GuestNum >= x.PersionNum).OrderByDescending(x => x.PersionNum).FirstOrDefault().PersionPrice;
}
}
if (demodel.Unit_Price < MinPrice)
//没有总经理修改订单权限
if (!isEditOrder)
{
flag = false;
message = "成交单价不能小于最低价格";
return flag;
}
if (demodel.PreferPrice != (demodel.Unit_Price * demodel.GuestNum - demodel.LessPrice))
{
flag = false;
message = "应收总额不正确";
return flag;
if (demodel.Unit_Price < MinPrice)
{
flag = false;
message = "成交单价不能小于最低价格";
return flag;
}
if (demodel.PreferPrice != (demodel.Unit_Price * demodel.GuestNum - demodel.LessPrice))
{
flag = false;
message = "应收总额不正确";
return flag;
}
}
Dictionary<string, object> keyValues = new Dictionary<string, object>()
{
{ nameof(RB_Order_ViewModel.GuestNum),demodel.GuestNum},
......@@ -494,18 +499,22 @@ namespace Edu.Module.Course
MinPrice = spList.Where(x => demodel.GuestNum >= x.PersionNum).OrderByDescending(x => x.PersionNum).FirstOrDefault().PersionPrice;
}
}
if (demodel.Unit_Price < MinPrice)
if (!isEditOrder)
{
flag = false;
message = "成交单价不能小于最低价格";
return flag;
}
if (demodel.PreferPrice != (demodel.Unit_Price * demodel.GuestNum - demodel.LessPrice))
{
flag = false;
message = "应收总额不正确";
return flag;
if (demodel.Unit_Price < MinPrice)
{
flag = false;
message = "成交单价不能小于最低价格";
return flag;
}
if (demodel.PreferPrice != (demodel.Unit_Price * demodel.GuestNum - demodel.LessPrice))
{
flag = false;
message = "应收总额不正确";
return flag;
}
}
int OrderId = orderRepository.Insert(demodel);
flag = OrderId > 0;
if (flag)
......
......@@ -384,9 +384,10 @@ namespace Edu.WebApi.Controllers.Course
var flag = false;
string message = "";
if (demodel.OrderType == OrderTypeEnum.CourseOrder)
{
flag = orderModule.SetClassOrder(demodel, userInfo, out message);
flag = orderModule.SetClassOrder(demodel, userInfo,base.CheckUserActionAuth("Edit_Order"), out message);
}
else
{
......
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