Files
zszq-trs/YLErpWeb/Models/ClientEditViewModel.cs
T
2024-05-09 14:06:26 +08:00

66 lines
2.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using YLErp.Models.Tag;
using YLErp.Modules.SystemModule;
using YLErp.Web.Models.JsModels;
namespace YLErp.Web.Models
{
/// <summary>
/// 客户编辑视图Model
/// </summary>
public class ClientEditViewModel:BasicViewModel
{
public Client client { get; set; }
public ClientEditConfig editConfig { get; set; }
public int clientApprovalProcessCount { get; set; }
/// <summary>
/// 最大请求内容长度(来自web.config
/// </summary>
public long maxRequestLength { get; set; }
/// <summary>
///
/// </summary>
public long maxAnnexLength { get; set; }
/// <summary>
/// PS.Config.Company.ToString
/// </summary>
public string company { get; }
/// <summary>
/// 是否证券环境
/// </summary>
public bool isSecuritiesEnvironment => PS.Config.ErpElement.SecuritiesEnvironment;
/// <summary>
/// 是否有修改列表数据(银行卡、人员、文件)的权限
/// </summary>
public bool canEditList => client != null && client.id > 0 && client.ApprovalStatus != "审批中" && (CurUser.客户管理.客户修改 || (CurUser.客户管理.销户休眠客户修改 && ("已休眠".Equals(client.ProcessStatus) || "已销户".Equals(client.ProcessStatus)))|| (CurUser.客户管理.正常状态客户修改 && !("已休眠".Equals(client.ProcessStatus) || "已销户".Equals(client.ProcessStatus))));
public ClientEditViewModel(UserInfo userInfo) : base(userInfo)
{
company = PS.Config.Company.ToString();
}
/// <summary>
/// 客户标签
/// </summary>
public List<TagDto> Tags { get; set; }
}
/// <summary>
///
/// </summary>
public class EditFieldViewModel
{
public IEnumerable<FormEditField> fields { get; set; }
/// <summary>
/// 客户标签
/// </summary>
public List<TagDto> Tags { get; set; }
}
}