Commit cdda6138 authored by 黄奎's avatar 黄奎

页面修改

parent 2481f587
using Edu.Common.Plugin;
namespace Edu.Common.Enum.Sale
{
/// <summary>
/// 报价单类型
/// </summary>
public enum OfferTypeEnum
{
/// <summary>
/// 课程
/// </summary>
[EnumField("课程")]
Course = 1,
/// <summary>
/// 留学
/// </summary>
[EnumField("留学")]
Studyabroad =2,
/// <summary>
/// 就业
/// </summary>
[EnumField("就业")]
Employment =3,
}
}
......@@ -131,5 +131,10 @@ namespace Edu.Model.Entity.Course
/// 申请改价原因
/// </summary>
public string ApplyReason { get; set; }
/// <summary>
/// 报价单类型
/// </summary>
public OfferTypeEnum OfferType { get; set; }
}
}
......@@ -56,6 +56,11 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public string CustomerStatusName { get { return Common.Plugin.EnumHelper.ToName(this.CustomerStatus); } }
/// <summary>
/// 报价单类型名称
/// </summary>
public string OfferTypeName { get { return Common.Plugin.EnumHelper.ToName(this.OfferType); } }
/// <summary>
/// 创建时间--开始
/// </summary>
......
......@@ -79,5 +79,10 @@ namespace Edu.Model.ViewModel.User
/// 直接主管 (OKR专用)
/// </summary>
public int DirectSupervisor { get; set; }
/// <summary>
/// 密码
/// </summary>
public string Password { get; set; }
}
}
\ No newline at end of file
......@@ -109,5 +109,10 @@ namespace Edu.Model.ViewModel.User
/// 直接主管 (OKR专用)
/// </summary>
public int DirectSupervisor { get; set; }
/// <summary>
/// 密码
/// </summary>
public string Password { get; set; }
}
}
\ No newline at end of file
......@@ -166,6 +166,7 @@ namespace Edu.Module.User
Email=extModel.Email,
DirectSupervisor = extModel.DirectSupervisor,
ManagerAccount=extModel.Account,
Password=extModel.Password,
});
break;
case Common.Enum.User.AccountTypeEnum.Teacher:
......@@ -195,6 +196,7 @@ namespace Edu.Module.User
Email=extModel.Email,
DirectSupervisor = extModel.DirectSupervisor,
TeacherAccount=extModel.Account,
Password=extModel.Password,
});
break;
case Common.Enum.User.AccountTypeEnum.Assist:
......@@ -223,6 +225,7 @@ namespace Edu.Module.User
Email=extModel.Email,
DirectSupervisor=extModel.DirectSupervisor,
AssistAccount=extModel.Account,
Password=extModel.Password,
});
break;
}
......
......@@ -100,6 +100,10 @@ WHERE 1=1
builder.AppendFormat(" AND A.{0} LIKE @CustomerTel ", nameof(RB_Course_Offer_ViewModel.CustomerTel));
parameters.Add("CustomerTel", "%" + query.CustomerTel.Trim() + "%");
}
if (query.OfferType > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_Offer_ViewModel.OfferType), (int)query.OfferType);
}
}
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Course_Offer_ViewModel.Id));
return GetPage<RB_Course_Offer_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
......@@ -160,6 +164,10 @@ WHERE 1=1
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_Offer_ViewModel.CustomerStatus), query.CustomerStatus);
}
if (query.OfferType > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_Offer_ViewModel.OfferType), (int)query.OfferType);
}
}
return Get<RB_Course_Offer_ViewModel>(builder.ToString(), parameters).ToList();
}
......
......@@ -28,6 +28,18 @@ namespace Edu.WebApi.Controllers.Course
private readonly CourseOfferModule courseOfferModule = AOP.AOPHelper.CreateAOPObject<CourseOfferModule>();
#region 课程报价单管理
/// <summary>
/// 获取报价单类型列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetOfferTypeList()
{
var list = Common.Plugin.EnumHelper.EnumToList(typeof(OfferTypeEnum));
return ApiResult.Success(data: list);
}
/// <summary>
/// 获取课程报价单分页列表
/// </summary>
......@@ -49,7 +61,8 @@ namespace Edu.WebApi.Controllers.Course
SerialNum = base.ParmJObj.GetStringValue("SerialNum"),
IsGetDetails = base.ParmJObj.GetInt("IsGetDetails"),
CustomerName = base.ParmJObj.GetStringValue("CustomerName"),
CustomerTel = base.ParmJObj.GetStringValue("CustomerTel")
CustomerTel = base.ParmJObj.GetStringValue("CustomerTel"),
OfferType = (OfferTypeEnum)base.ParmJObj.GetInt("OfferType"),
};
query.Group_Id = base.UserInfo.Group_Id;
query.School_Id = base.UserInfo.School_Id;
......@@ -94,6 +107,8 @@ namespace Edu.WebApi.Controllers.Course
qitem.CustomerTel,
qitem.JoinNum,
qitem.OrderIdList,
qitem.OfferType,
qitem.OfferTypeName,
});
return ApiResult.Success(data: pageModel);
}
......@@ -107,7 +122,8 @@ namespace Edu.WebApi.Controllers.Course
{
var query = new RB_Course_Offer_ViewModel()
{
Name = base.ParmJObj.GetStringValue("Name")
Name = base.ParmJObj.GetStringValue("Name"),
OfferType = (OfferTypeEnum)base.ParmJObj.GetInt("OfferType"),
};
query.Group_Id = base.UserInfo.Group_Id;
query.School_Id = base.UserInfo.School_Id;
......@@ -136,7 +152,8 @@ namespace Edu.WebApi.Controllers.Course
CustomerInfo = base.ParmJObj.GetStringValue("CustomerInfo"),
CustomerName = base.ParmJObj.GetStringValue("CustomerName"),
CustomerTel = base.ParmJObj.GetStringValue("CustomerTel"),
JoinNum = base.ParmJObj.GetInt("JoinNum")
JoinNum = base.ParmJObj.GetInt("JoinNum"),
OfferType=(OfferTypeEnum)base.ParmJObj.GetInt("OfferType"),
};
try
{
......@@ -227,7 +244,9 @@ namespace Edu.WebApi.Controllers.Course
CreateTime = Common.ConvertHelper.FormatDate2(extModel?.CreateTime),
CreateByName,
CreateTel,
CreateWeChatNo
CreateWeChatNo,
extModel?.OfferType,
extModel?.OfferTypeName,
};
return ApiResult.Success(data: obj);
}
......
......@@ -758,8 +758,17 @@ namespace Edu.WebApi.Controllers.User
School_Id = base.ParmJObj.GetInt("School_Id"),
Email = base.ParmJObj.GetStringValue("Email"),
DirectSupervisor=base.ParmJObj.GetInt("DirectSupervisor"),
Account=base.ParmJObj.GetStringValue("Account")
Account=base.ParmJObj.GetStringValue("Account"),
Password=base.ParmJObj.GetStringValue("Password"),
};
if (!string.IsNullOrEmpty(extModel.Password.Trim()))
{
extModel.Password = Common.DES.Encrypt(extModel.Password.Trim());
}
else
{
extModel.Password = Common.DES.Encrypt(Common.Config.DefaultPwd);
}
extModel.CreateBy = base.UserInfo.Id;
extModel.CreateTime = DateTime.Now;
extModel.UpdateBy = base.UserInfo.Id;
......
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