using Edu.Model.Entity.Contract;
using System;
using System.Collections.Generic;
using System.Text;

namespace Edu.Model.ViewModel.Contract
{
    /// <summary>
    /// 学员退课协议视图实体类
    /// </summary>
    public class RB_BackClass_Protocol_ViewModel : RB_BackClass_Protocol
    {
        /// <summary>
        /// 是否查询所有(1-是)
        /// </summary>
        public int IsQueryAll { get; set; }

        /// <summary>
        /// 查询业务员
        /// </summary>
        public int QCreateBy { get; set; }

        /// <summary>
        /// 退课编号
        /// </summary>
        public string QBackIds { get; set; }

        /// <summary>
        /// 订单编号
        /// </summary>
        public int QOrderId { get; set; }

        /// <summary>
        /// 退课申请单号
        /// </summary>
        public int ReceiptId { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateByName { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public string CreateTimeStr { get { return Common.ConvertHelper.FormatTime(this.CreateTime); } }

        /// <summary>
        /// 审核状态字符串
        /// </summary>
        public string AuditStatusStr
        {
            get
            {
                string str = "审核中";
                switch (this.AuditStatus)
                {
                    case 1: str = "审核中"; break;
                    case 2: str = "审核通过"; break;
                    case 3: str = "驳回"; break;
                }
                if (this.AuditStatus == 2)
                {
                    if (string.IsNullOrEmpty(this.PartyASign))
                    {
                        str = "待签字";
                    }
                    if (this.IsSure == 0 && !string.IsNullOrEmpty(this.PartyASign))
                    {
                        str = "待确认";
                    }
                    if (this.IsSure == 1 && !string.IsNullOrEmpty(this.PartyASign))
                    {
                        str = "生效";
                    }
                }
                return str;
            }
        }

        /// <summary>
        /// 人民币大写
        /// </summary>
        public string CNMoneyStr
        {
            get
            {
                string str = Common.Plugin.StringHelper.MoneyToUpper(this.BackMoney.ToString());
                return str;
            }
        }

        /// <summary>
        /// 实收字符串
        /// </summary>
        public string OldIncomeStr
        {
            get
            {
                string str = Common.Plugin.StringHelper.MoneyToUpper(this.OldIncome.ToString());
                return str;
            }
        }

        /// <summary>
        /// 退还账号名
        /// </summary>
        public string BackAccountName { get; set; }

        /// <summary>
        /// 退还账号
        /// </summary>
        public string BackAccount { get; set; }

        /// <summary>
        /// 学员编号
        /// </summary>
        public int GuestId { get; set; }

        /// <summary>
        /// 合同章图片
        /// </summary>
        public string GroupSealImg { get; set; }

        /// <summary>
        /// 甲方签署日期
        /// </summary>
        public string PartyASignDateStr
        {
            get
            {
                return Common.ConvertHelper.FormatDate(this.PartyASignDate);
            }
        }

        /// <summary>
        /// 退款协议签订日期
        /// </summary>
        public string SignDateStr
        {
            get
            {
                string str = Common.ConvertHelper.FormatDate(this.SignDate);
                if (string.IsNullOrEmpty(str))
                {
                    str = Common.ConvertHelper.FormatDate(DateTime.Now);
                }
                return str;
            }
        }

        /// <summary>
        /// 退款协议公司盖章签订日期
        /// </summary>
        public string PartyBSignDateStr
        {
            get
            {
                return Common.ConvertHelper.FormatDate(this.PartyBSignDate);
            }
        }
    }
}
