Commit 38ef703b authored by 黄奎's avatar 黄奎

页面修改

parent 264e1f6b
...@@ -18,15 +18,11 @@ namespace Edu.Common.Enum.Customer ...@@ -18,15 +18,11 @@ namespace Edu.Common.Enum.Customer
/// </summary> /// </summary>
[EnumField("禁用")] [EnumField("禁用")]
Disable = 2, Disable = 2,
/// <summary>
/// 删除
/// </summary>
[EnumField("删除")]
Delete = 3,
/// <summary> /// <summary>
/// 未激活 /// 未激活
/// </summary> /// </summary>
[EnumField("未激活")] [EnumField("未激活")]
NotActivation = 4 NotActivation = 3
} }
} }
using Edu.Common.Enum; using Edu.Common.Enum;
using System; using System;
using System.Collections.Generic;
using System.Text;
using VT.FW.DB; using VT.FW.DB;
namespace Edu.Model.Entity.Customer namespace Edu.Model.Entity.Customer
...@@ -24,15 +22,30 @@ namespace Edu.Model.Entity.Customer ...@@ -24,15 +22,30 @@ namespace Edu.Model.Entity.Customer
public string TaskName { get; set; } public string TaskName { get; set; }
/// <summary> /// <summary>
/// 任务数量 /// 任务子标题
/// </summary> /// </summary>
public int TaskNum { get; set; } public string TaskSubTitle { get; set; }
/// <summary>
/// 任务图片
/// </summary>
public string TaskImage { get; set; }
/// <summary> /// <summary>
/// 任务奖品 /// 任务奖品
/// </summary> /// </summary>
public string TaskKudo { get; set; } public string TaskKudo { get; set; }
/// <summary>
/// 奖品图片
/// </summary>
public string TaskKudoImg { get; set; }
/// <summary>
/// 任务描述
/// </summary>
public string TaskDesc { get; set; }
/// <summary> /// <summary>
/// 任务开始时间 /// 任务开始时间
/// </summary> /// </summary>
......
using System; using Edu.Common.Enum.Customer;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using VT.FW.DB; using VT.FW.DB;
...@@ -25,11 +26,21 @@ namespace Edu.Model.Entity.Customer ...@@ -25,11 +26,21 @@ namespace Edu.Model.Entity.Customer
/// <summary> /// <summary>
/// 任务类型(1-课程) /// 任务类型(1-课程)
/// </summary> /// </summary>
public int TaskType { get; set; } public TaskTypeEnum TaskType { get; set; }
/// <summary> /// <summary>
/// 目标编号 /// 目标编号
/// </summary> /// </summary>
public int TargetId { get; set; } public string TargetId { get; set; }
/// <summary>
/// 任务值类型(1-人数,2-成交金额)
/// </summary>
public int TaskFinishType { get; set; }
/// <summary>
/// 任务完成值
/// </summary>
public decimal TaskFinishValue { get; set; }
} }
} }
...@@ -68,5 +68,10 @@ namespace Edu.Model.ViewModel.Customer ...@@ -68,5 +68,10 @@ namespace Edu.Model.ViewModel.Customer
/// 审核时间 /// 审核时间
/// </summary> /// </summary>
public string ApproveTimeStr { get { return Common.ConvertHelper.FormatTime(this.ApproveTime); } } public string ApproveTimeStr { get { return Common.ConvertHelper.FormatTime(this.ApproveTime); } }
/// <summary>
/// 状态(1-正式客户,2-非正式客户,3-未通过客户,4-黑名单客户)
/// </summary>
public int QCustomerState { get; set; }
} }
} }
...@@ -68,10 +68,13 @@ namespace Edu.Module.Customer ...@@ -68,10 +68,13 @@ namespace Edu.Module.Customer
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Customer_Task_Extend.TaskName),model.TaskName }, {nameof(RB_Customer_Task_Extend.TaskName),model.TaskName },
{nameof(RB_Customer_Task_Extend.TaskNum),model.TaskNum }, {nameof(RB_Customer_Task_Extend.TaskSubTitle),model.TaskSubTitle },
{nameof(RB_Customer_Task_Extend.TaskImage),model.TaskImage },
{nameof(RB_Customer_Task_Extend.TaskKudo),model.TaskKudo }, {nameof(RB_Customer_Task_Extend.TaskKudo),model.TaskKudo },
{nameof(RB_Customer_Task_Extend.TaskImage),model.TaskImage },
{nameof(RB_Customer_Task_Extend.TaskStartTime),model.TaskStartTime }, {nameof(RB_Customer_Task_Extend.TaskStartTime),model.TaskStartTime },
{nameof(RB_Customer_Task_Extend.TaskEndTime),model.TaskEndTime }, {nameof(RB_Customer_Task_Extend.TaskEndTime),model.TaskEndTime },
{nameof(RB_Customer_Task_Extend.TaskDesc),model.TaskDesc },
{nameof(RB_Customer_Task_Extend.UpdateBy),model.UpdateBy }, {nameof(RB_Customer_Task_Extend.UpdateBy),model.UpdateBy },
{nameof(RB_Customer_Task_Extend.UpdateTime),model.UpdateTime }, {nameof(RB_Customer_Task_Extend.UpdateTime),model.UpdateTime },
}; };
......
using Edu.Common.Enum; using Edu.Common.Enum;
using Edu.Common.Enum.Customer;
using Edu.Model.Entity.Customer; using Edu.Model.Entity.Customer;
using Edu.Model.ViewModel.Customer; using Edu.Model.ViewModel.Customer;
using System; using System;
...@@ -52,6 +53,20 @@ WHERE 1=1 ...@@ -52,6 +53,20 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Customer_Extend.ApproveState), query.ApproveState); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Customer_Extend.ApproveState), query.ApproveState);
} }
if (query.QCustomerState > 0)
{
switch (query.QCustomerState)
{
//正式客户
case 1: builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Customer_Extend.CustomerState),(int)CustomerStateEnum.Normal); break;
//正式客户
case 2: builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Customer_Extend.CustomerState), (int)CustomerStateEnum.NotActivation); break;
//未通过客户
case 3: builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Customer_Extend.ApproveState), 2); break;
//黑名单
case 4: builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Customer_Extend.CustomerState), (int)CustomerStateEnum.Disable);break;
}
}
} }
return GetPage<RB_Customer_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList(); return GetPage<RB_Customer_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
} }
......
using Edu.Cache.User; using Edu.Cache.User;
using Edu.Common.API; using Edu.Common.API;
using Edu.Common.Enum.Customer;
using Edu.Common.Plugin; using Edu.Common.Plugin;
using Edu.Model.ViewModel.Customer; using Edu.Model.ViewModel.Customer;
using Edu.Module.Customer; using Edu.Module.Customer;
...@@ -46,6 +47,7 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -46,6 +47,7 @@ namespace Edu.WebApi.Controllers.Customer
Group_Id = base.UserInfo.Group_Id, Group_Id = base.UserInfo.Group_Id,
CustomerName = base.ParmJObj.GetStringValue("CustomerName"), CustomerName = base.ParmJObj.GetStringValue("CustomerName"),
ApproveState=base.ParmJObj.GetInt("ApproveState"), ApproveState=base.ParmJObj.GetInt("ApproveState"),
QCustomerState=base.ParmJObj.GetInt("QCustomerState"),
}; };
var list = customerModule.GetCustomerPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query); var list = customerModule.GetCustomerPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
foreach (var item in list) foreach (var item in list)
...@@ -146,6 +148,16 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -146,6 +148,16 @@ namespace Edu.WebApi.Controllers.Customer
#region 任务管理 #region 任务管理
/// <summary>
/// 获取任务类型
/// </summary>
/// <returns></returns>
public ApiResult GetTaskTypeList()
{
var list = Common.Plugin.EnumHelper.EnumToList(typeof(TaskTypeEnum));
return ApiResult.Success(data: list);
}
/// <summary> /// <summary>
/// 获取同行任务分页列表 /// 获取同行任务分页列表
/// </summary> /// </summary>
...@@ -183,10 +195,13 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -183,10 +195,13 @@ namespace Edu.WebApi.Controllers.Customer
{ {
Id = base.ParmJObj.GetInt("Id"), Id = base.ParmJObj.GetInt("Id"),
TaskName=base.ParmJObj.GetStringValue("TaskName"), TaskName=base.ParmJObj.GetStringValue("TaskName"),
TaskNum=base.ParmJObj.GetInt("TaskNum"), TaskSubTitle=base.ParmJObj.GetStringValue("TaskSubTitle"),
TaskKudo=base.ParmJObj.GetStringValue("TaskKudo"), TaskImage=base.ParmJObj.GetStringValue("TaskImage"),
TaskStartTime=base.ParmJObj.GetDateTime("TaskStartTime"), TaskKudo =base.ParmJObj.GetStringValue("TaskKudo"),
TaskKudoImg=base.ParmJObj.GetStringValue("TaskKudoImg"),
TaskStartTime =base.ParmJObj.GetDateTime("TaskStartTime"),
TaskEndTime=base.ParmJObj.GetDateTime("TaskEndTime"), TaskEndTime=base.ParmJObj.GetDateTime("TaskEndTime"),
TaskDesc=base.ParmJObj.GetStringValue("TaskDesc"),
}; };
model.Status = Common.Enum.DateStateEnum.Normal; model.Status = Common.Enum.DateStateEnum.Normal;
model.CreateBy = base.UserInfo.Id; model.CreateBy = base.UserInfo.Id;
...@@ -208,8 +223,10 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -208,8 +223,10 @@ namespace Edu.WebApi.Controllers.Customer
{ {
DetailId = jobj.GetInt("DetailId"), DetailId = jobj.GetInt("DetailId"),
TaskId = jobj.GetInt("TaskId"), TaskId = jobj.GetInt("TaskId"),
TaskType = jobj.GetInt("TaskType"), TaskType = (TaskTypeEnum)jobj.GetInt("TaskType"),
TargetId = jobj.GetInt("TargetId"), TargetId = jobj.GetStringValue("TargetId"),
TaskFinishType=jobj.GetInt("TaskTypeEnum"),
TaskFinishValue=jobj.GetDecimal("TaskFinishValue"),
}); });
} }
} }
......
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