/* 
    通用实体初始化工厂 
*/
define('ModelFactory', function () {
    var modelStore
    CBCRM = avalon.vmodels.CBCRM
    if (!CBCRM) {
        CBCRM = {
            memberShip: {
                Name: '',
                Id: '',
                FullName: ''
            }
        }
    }
    modelStore = {
        Options: {
            checked: false,
            Key: '',
            Value: ''
        },
        /*扩展字段*/
        ExpandoFields: {
            Name: '',
            Display: '',
            Type: 'single-text',
            TypeDisplay: '',
            IsRequire: 'false',
            IsInner: false,
            Validate: '',
            OkMsg: '',
            FailMsg: '',
            Order: '',
            DefaultVal: '',
            Length: '',
            IsSignalLine: 'false',
            IsSearch: 'false',
            Options: [],
            ValidateModa: '0',
            Module: '',
            IsAvailable: true,
            Tab: '扩展信息'
        },
        //单位信息
        CompanyInfo: {
            Id: 0,
            CompanyName: '',
            ShortName: '',
            EnglishName: '',
            Quality: '',
            Business: '',
            Industry: '',
            Money: '',
            NumberOfPeople: '',
            Slogan: '',
            Intro: '',
            CountryId: '',
            CountryDisplay: '',
            ProvinceId: '',
            ProvinceDisplay: '',
            CityId: '',
            CityDisplay: '',
            AreaId: '',
            AreaDisplay: '',
            Address: '',
            PostCode: '',
            Tel400: '',
            OfficeTel1: '',
            OfficeTel2: '',
            Fax: '',
            HomePage: '',
            EShop: '',
            Email: '',
            QQ: '',
            WangWang: '',
            OtherContact: '',
            MapLabel: '',
            Logo: '',
            Lng: '',
            Lat: ''
        },
        /*客户共享*/
        CustomerShare: {
            Id: '',
            Name: '',
            ShareTo: [],
            ShareToNames: ''
        },
        //客户记事详情
        RecordList: {
            Id: 0,
            RecordTag: "",
            RecordContent: "",
            CoustomId: 0,
            CreateId: 0,
            CreateDate: "",
            CreateName: "",
            UpdateName: "",
            UpdateId: 0,
            UpdateDate: "",
            RecordName: "",
        },
        /*联系人*/
        Contacts: {
            Id: '',
            Intro: '',
            MobileNumber1: '',
            OfficeTel: '',
            HomeTel: '',
            Fax: '',
            HomePostCode: '',
            HomeAddress: '',
            HomeAddressMapLabel: '',
            QQ: '',
            Email: '',
            Version: '',
            Skype: '',
            Wangwang: '',
            CompanyName: '',
            IndustryId: '',
            Department: '',
            Post: '',
            CompanyPostCode: '',
            CompanyAddress: '',
            CompanyAddressMapLabel: '',
            ContactRoleId: '10045',
            CustomerId: '',
            AppellationId: '',
            BossId: '',
            MobileNumber2: '',
            IdCardType: '',
            IdCardNumber: '',
            Thumbnail: '',
            Picture: '',
            AddBy: '',
            AddTime: '',
            InRecycleBin: '',
            IsFirst: false,
            Relation: '',
            Name: '',
            FirstName: '',
            FirstNameLetter: '',
            Sex: '0',
            Birthday: '',
            AddByDisplay: CBCRM.memberShip.FullName,
            CustomerName: '',
            CustomerId: '',
            hasPicture: true
        },
        /*客户*/
        Customer: {
            /*操作 start*/
            EditUrl: '',
            DetailUrl: '',
            EDIT: true,
            DELETE: true,
            FullName: '',
            FullNameChangeDate: '',
            /*操作 end*/
            /*竞争对手 start*/
            Strengths: '',
            Weakness: '',
            Opportunities: '',
            Threats: '',
            Threaten: '',
            KeyWord: '',
            CompetitorDynamic: '',
            Particulars: '',
            ReplyStrategy: '',
            CEO: '',
            MarketPosition: '',
            /*竞争对手 end*/
            /*媒体资源 start*/
            MediaType: '',
            Ratings: '',
            CoverageArea: '',
            MediaTarget: '',
            PositionAndRecognition: '',
            Advantage: '',
            Disadvantages: '',
            OverallRating: '',
            /*媒体资源 end*/
            /*渠道代理商 start*/
            AuthorizedRegionals: [],
            AuthorizedRegionalsDisplay: '',
            ManagementArea: '',
            AnnualRevenue: '',
            PresenceAndRecognition: '',
            Advantage: '',
            Disadvantages: '',
            OverallRating: '',
            ProductDetails: '',
            /*渠道代理商 end*/
            /*供应商 start*/
            Qualification: [],
            QualificationOrder: '',
            SupplierLevel: '',
            Quality: '',
            Txtquality: '',
            Ability: '',
            Txtability: '',
            Price: '',
            Txtprice: '',
            Technology: '',
            Txttechnology: '',
            Service: '',
            Txtservice: '',
            Reputation: '',
            Txtreputation: '',
            Cooperation: '',
            Txtcooperation: '',
            /*供应商 end*/
            Id: '',
            IsOpen: false,
            FirstName: '',
            FirstNameLetter: '',
            Contacts: [],
            FirstContacts: {},
            Value: '',
            Credit: '',
            CategoryId: '',
            IndustryId: '',
            ScaleId: '',
            SourceId: '',
            ModeId: '',
            StageId: '',
            RelationId: '',
            HigherCustomerId: '',
            ParentName: '',
            Version: '',
            Intro: '',
            Remark: '',
            CompanyCountryId: '',
            CompanyProvinceId: '',
            CompanyCityId: '',
            CompanyAreaId: '',
            CompanyCountryDisplay: '',
            CompanyProvinceDisplay: '',
            CompanyCityDisplay: '',
            CompanyAreaDisplay: '',
            CompanyPostCode: '',
            CompanyAddress: '',
            CompanyAddressMapLabel: '',
            CompanyTel1: '',
            Name: '',
            Fax: '',
            Homepage: 'http://',
            Email: '',
            MobileNumber1: '',
            MobileNumber2: '',
            Sex: '0',
            Birthday: '',
            Hobby: '',
            HomeCoountryId: '',
            HomeProvinceId: '',
            IsHot: 'false',
            HomeCityId: '',
            HomeAreaId: '',
            HomePostCode: '',
            HomeAddress: '',
            HomeAddressMapLabel: '',
            HomeTel: '',
            QQ: '',
            Skype: '',
            Wangwang: '',
            Company: '',
            Temperature: '',
            Department: '',
            Profession: '',
            Post: '',
            Appellation: '',
            IdCardTypeId: '',
            IdCardNO: '',
            Type: '0',
            OwnerType: '',
            Owner: '',
            OwnerName: '',
            Tel400: '',
            HotCategoryId: '',
            CompanyTel2: '',
            OtherContactMethod: '',
            Bank: '',
            BankDisplay: '',
            OpenAccountBank: '',
            BankAccount: '',
            DepartmentId: '',
            ShareNames: '',
            ShareTo: [],
            ShareToNames: [],
            ServerLabel: [],
            ServerLabelDisplay: '',
            AddByDisplay: '',
            Status: '',
            AddBy: { Id: '', FullName: '' },
            AddTime: '',
            RecycleTime:'',
            LastEditer: '',
            HotDescription: '',
            LastEditTime: '',
            InRecycleBin: '',
            SaleProduct: '',
            RegFund: '',
            ShopPage: 'http://',
            SuperiorCategoryId: '',
            FirstDocumentary: '',
            LastDocumentary: '',
            FirstSign: '',
            LastVisit: '',
            ShortName: '',
            IsBlackList: 'false',
            BlackListReason: '',
            AddBlackListTime: '',
            OwnerTime: '',
            CustomerNO: '',
            CenterExpertTime: '',
            SupplyStage: '',
            NextVisit: '',
            Lng: '',
            Lat: '',
            NO: '',
            SignAllNun: '',
            LastComplaint: '',
            ComplaintAllNum: '',
            ContractAmount: '',
            BusinessType: '',
            BusinessTypes: '',
            BusinessTypesArr: [],
            State: 0,
            StateGrade: '',
            MemberGrade: '',
            TaxNum: '',
            BusinessLicense: '',
            OrganizationCode: '',
            LegalPersion:'',
            LegalPersionIdCard:''
        },
        /*职位*/
        Post: {
            Id: '',
            Name: '',
            Group: '',
            GroupName: '',
            bossId: '',
            bossName: '',
            NumOfCustomer: '',
            PostLevel: '',
            SalaryLevel: '',
            WorkTarget: '',
            Education: '',
            Profession: '',
            Quality: '',
            Device: '',
            Environment: '',
            WorkTime: '',
            Documents: '',
            Remark: '',
            NumberOfPeoples: '',
            Responsibility: '',
            Powers: '',
            Coordinate: '',
            Experience: '',
            CheckIndicator: '',
            AddBy: { Id: '', FullName: '' },
            AddTime: ''

        },
        /*角色*/
        Role: {
            Id: '',
            Name: '',
            checked: 'false',
            Description: '',
            Users: [],
            IsAvailable: 'true',
            IsInnerRole: 'false'
        },
        /*角色权限*/
        RoleAuths: {
            Name: '',
            Description: '',
            Users: '',
            IsAvailable: 'true',
            IsInnerRole: 'true',
            AddBy: '',
            AddTime: '',
            InRecycleBin: false,
            RoleAuths: [],
            Version: '',
            Id: ''
        },
        /*部门*/
        Group: {
            Name: '',
            SalaryLevel: '',
            NumberOfPeoples: '',
            WorkTarget: '',
            Responsibility: '',
            Skill: '',
            UpdateDay: '',
            ParentId: '',
            ParentGroupName: '',
            WorkTarget: '',
            Train: '',
            Id: '',
            IsAvailable: '',
            IsInnerGroup: '',
            ManagerId: '',
            ManagerDisplay: '',
            DeputyManagerId: '',
            DeputyManagerDisplay: ''
        },
        //字典
        Dictionary: {
            Id: 0,
            DictionaryId: 0,
            Data: '',
            IsDefault: false,
            Enable: true,
            ParentId: null,
            Sort: 0,
            Type: 3,
            InRecycleBin: false,
            Version: 1
        },
        //地区
        Area: {
            Id: 0,
            Version: 0,
            Data: '',
            ParentId: 0,
            IsDefault: false,
            Enable: true,
            Idx: '',
            Total: 0,
            Sort: 0,
            Type: 3,
            Letter: '',
            FirstLetter: ''
        },

        //地区
        RegionArea: {
            Id: 0,
            Data: '',
            ParentId: 0,
            Letter: '',
            FirstLetter: '',
            Sort: 0
        },
        //短信接口
        MessageInterface: {
            Account: '',
            Password: '',
            CompanyNumber: '',
            IsDefault: false
        },
        //邮件接口
        EmailInterface: {
            Id: 0,
            Version: 1,
            Email: '',
            SMTP: '',
            IMAP: '',
            IMAPPort: 143,
            IMAPSsl: false,
            POP3: '',
            POP3Port: 143,
            POP3Ssl: false,
            MailAccount: '',
            MailPassword: '',
            EmployeeId: 0
        },
        //超博网接口
        VCBInterface: {
            VCBAccount: '',
            VCBPassword: ''
        },
        //公司网站接口
        CompanySiteInterface: {
            CompanySiteAccount: '',
            CompanySitePassword: '',
            CompanySiteAdminURL: ''
        },
        //来电弹屏
        TelPopupWindow: {
            EnableTelPopupWindow: false,
            TelPopupWindowServer: ''
        },
        //用户明信片
        UserCard: {
            UserName: '',
            FullName: '',
            Email: '',
            Phone: '',
            Sex: 0,
            RoleName: '',
            Picture: '/Content/Themes/Base/Images/lady_default.png',
            GroupName: '',
            TelPhone: '',
            Address: '',
            Site: '',
            QQ: '',
            Id: ''
        },
        //用户
        User: {
            Id: 0,
            UserName: '',
            Password: '',
            FullName: '',
            MasterRole: 0,
            DepartmentId: 0,
            DepartmentIdx: '',
            PositionId: 0,
            PositionIdx: '',
            Email: '',
            Phone: '',
            Tel: '',
            QQ: '',
            Sex: 0,
            IsAvailable: true,
            IsInnerUser: false,
            IsJoin: true,
            CreationDate: 'GetDateTime',
            LastLoginDate: '',
            LastActivityDate: '',
            LastPasswordChangedDate: '',
            LastLockoutDate: '',
            LastUnlockDate: '',
            Roles: [],
            Role: { Id: 0, Name: '' },
            Group: { Id: '', Name: '' }
        },
        //来电
        Calls: {
            Id: 0,
            CallsTime: 'GetDateTime',
            EmployeeId: '',
            ClassDicId: 793423579000001, //售前咨询
            ContactsId: 0,
            CustomerName: '',
            CallsName: '',
            CallsRole: '',
            CallsSex: "0",
            QQ: "",
            CallsMobile: '',
            CallsContent: '',
            Status: 1,       //默认无需处理
            CallsRemark: '',
            IsNewsCustomer: false,
            IsUpdateContacts: false,
            Address: '',
            Transform: 0,
            TransformId: '',
            InRecycleBin: '',
            Cid: 0
        },
        //回访关怀
        FollowUp: {
            Id: 0,
            CustomerId: 0,
            CustomerName: '',
            ContactId: 0,
            ContactName: '',
            ReturnMode: 793636894500001, //回访方式：默认电话
            ReturnExecutor: '',
            ReturnExecutorName: '',
            ReturnTime: 'GetDateTime',
            State: '1',
            Theme: '',
            Description: '',
            Feedback: '',
            FeedbackConfirmation: '',
            NextReturnTime: 'GetDateTime',
            ChangeVal: '0',
            ChangeId: '',
            DiplexSales: '',
            InRecycleBin: '',
            PostBy: '',
            PostByTime: '',
            Number: '',
            ParentId: '',
            IsNext: false,
            ContactTitle: ''
        },
        //产品
        Product: {
            Id: 0
          , No: ''
          , Standard: ''
          , Name: ''
          , Abbreviation: ''
          , PhoneticizeCode: ''
          , Brand: { Id: '', Name: '' }
          , Origin: ''
          , Units: ''
          , UnitsDisplay: ''
          , Weight: ''
          , UnitOfWeight: ''
          , UnitOfWeightDisplay: ''
          , OriginImg: ''
          , SmallImg: ''
          , DefaultImg: ''
          , AfterService: ''
          , Info: ''
          , BarCode: ''
          , State: "1"
          , StockPrice: ''
          , WholesalePrice: ''
          , LowestPrice: ''
          , GeneralAgencyPrice: ''
          , DiamondPrice: ''
          , GoleMedalPrice: ''
          , SilverMedalPrice: ''
          , BronzeMedalPrice: ''
          , VIPCoreCustomerPrice: ''
          , GovernmentCustomerPrice: ''
          , GroupsCustomerPrice: ''
          , FocusCustomerPrice: ''
          , GeneralCustomerPrice: ''
          , IsSpecial: false
          , TeJia: ''
          , StartDate: ''
          , EndDate: ''
          , InitStockNum: ''
          , HighestStockNum: ''
          , LowestStockNum: ''
          , CurrentStockNum: 0
          , AssessRegion: ''
          , CommissionType: ''
          , Buy: ''
          , ContributeRevenueMoney: ''
          , ComplainNum: ''
          , SuplierIds: ''
          , SuplierNames: ''
          , CategoryId: ''
          , CategoryName: ''
          , RoyaltyPrice: 0
          ,RoyaltyType:0
          , RoyaltyCompute: 0
          , RoyaltyValue: 0
        },
        //分类
        Category: {
            Id: 0
          , Name: ''
          , Parent: { Id: '', Name: '' }
          , Parents: ''
          , Sort: ''
          , BrandIds: ''
          , BrandNames: ''
        },
        //品牌
        Brand: {
            Id: 0
          , CategoryIds: ''
          , CategoryNames: ''
          , Name: ''
          , ProviderIds: ''
          , ProviderNames: ''
          , Img: ''
          , Info: ''
          , Sort: ''
        },
        //会员级别
        MemberGrade: {
            Id: 0,
            AddTime: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            Name: '',
            Discount: 0,
            Grade: 0,
            Integral: 0,
            Sort: 0
        },
        //客户服务
        CServices: {
            Id: 0,
            CustomerId: 0,
            CustomerName: '',
            ContactsId: 0,
            ContactsName: '',
            Direction: '我们去',          //服务方向默认选项
            ModeDicId: '819213088500004',//服务方式默认选项
            TypeDicId: '819217084600011',//默认类型默认选项
            FirstEmpId: 0,
            FirstEmpName: '',
            ByTime: 'GetDateTime',
            Title: '',
            ServicesCont: '',
            Feedback: '',
            Urgency: 1,
            AddTime: '',
            AddBy: 0,
            InRecycleBin: false,
            Static: 1,//无需处理
            ReAffirm: '',
            EndTime: 'GetDateTime',
            DisposeDetail: {}
        },
        DisposeDetail: {
            Id: 0,
            ServeId: '',
            TypeId: 2,
            EmployeeId: 0,
            EmployeeName: '',
            DisposeTime: 'GetDateTime',
            ElapsedTime: '2',
            Process: '',
            Result: '1',
            InformOrFeedback: '',
            Remarks: '',
            CreateTime: 'GetDateTime',
            CreateEmpId: '',
            CreateEmpName: ''
        },
        //客户投诉
        Complaints: {
            Id: 0,
            CustomerId: 0,
            CustomerName: '',
            ContactsId: 0,
            ContactsName: '',
            ComplaintsWay: 797477205400002, //投诉方式 默认电话
            ComplaintsType: 797445683600002,//投诉分类 默认产品质量投诉
            BeginTime: 'GetDateTime',
            Ttirle: '',
            ComplainByEmployeeId: 0,
            ComplainByEmployeeName: '',
            ComplainByproduceId: '',
            ComplainByproduceName: '',
            Content: '',
            UrgencyLevel: 1,
            FirstReceiverId: 0,
            FirstReceiverName: '',
            Static: 1,//默认无需处理
            ReAffirm: '',
            Feedback: '',
            EndTime: 'GetDateTime',
            AddBy: 0,
            AddTime: 'GetDateTime',
            EmployeeId: 0,
            EmployeeName: '',
            DisposeDetail: {}
        },
        //市场-营销战役
        Campaign: {
            Id: 0
          , CampaignTheme: ''
          , CampaignType: ''
          , CampaignTarget: ''
          , AudienceTargetGroup: ''
          , PromotionalProducts: ''
          , MarketExpressDemands: ''
          , CoverageArea: ''
          , EstimatedCost: ''
          , ExpectedProjectedSales: ''
          , ExpectedBusinessOpportunities: ''
          , ActualCost: ''
          , ActualSales: ''
          , ActualBusinessOpportunities: ''
          , CampaignDescriptionAndSpecificPrograms: ''
          , Files: ''
          , StartDate: ''
          , EndDate: ''
          , CampaignTheoriginatingdepartment: ''
          , CampaignSponsor: ''
          , CampaignSponsorDisplay: ''
          , AddBy: { Id: CBCRM.memberShip.Id, UserName: CBCRM.memberShip.FullName }
          , AddTime: 'GetDateTime'
          , resEquList: []
          , matGearList: []
          , matTraList: []
          , comMmisList: []
        },
        //市场-调查反馈
        ProbeFeedback: {
            Id: 0
          , MarketActivity: ''
          , MarketActivityDisplay: ''
          , MarketingCampaign: ''
          , MarketingCampaignDisplay: ''
          , ProbeFeedbackDepartment: ''
          , ProbeFeedbackDepartmentDisplay: ''
          , ProbeFeedbackPerson: ''
          , ProbeFeedbackPersonDisplay: ''
          , Title: ''
          , ProbeType: ''
          , ProbeTypeDisplay: ''
          , ProbeDescribe: ''
          , ProbeResult: ''
          , Conclusion: ''
          , Files: ''
          , ShareTo: ''
          , ShareToDisplay: ''
          , AddBy: { Id: CBCRM.memberShip.Id, UserName: CBCRM.memberShip.FullName }
          , AddTime: 'GetDateTime'
        },
        //市场-市场活动
        MarketActivity: {
            Id: 0
          , MinMoney: ''
          , MarketingCampaign: ''
          , MarketingCampaignDisplay: ''
          , ProbeFeedback: ''
          , ProbeFeedbackDisplay: ''
          , ActivityTheme: ''
          , ActivityType: ''
          , ActivityTypeDisplay: ''
          , ConscientiousDepartment: ''
          , ConscientiousDepartmentDisplay: ''
          , ConscientiousPerson: ''
          , ConscientiousPersonDisplay: ''
          , StartDate: ''
          , EndDate: ''
          , CostBudget: ''
          , ActivityAddress: ''
          , IsSalesPromotion: false
          , DiscountType: ''
          , PreferentialAmount: ''
          , DiscountRate: ''
          , ExpectedTarget: ''
          , ActivityContent: ''
          , ExecutionSituation: ''
          , ActivitySummary: ''
          , ResultAssess: ''
          , ShareTo: ''
          , ShareToDisplay: ''
          , CustomerTarget: ''
          , CustomerTargetDisplay: ''
          , CustomerTypeTarget: []
          , CustomerTypeTargetDisplay: ''
          , Remark: ''
          , SalesOpportunitiesCount: 0
          , ContractCount: 0
          , ContractMoney: 0
          , AddBy: { Id: CBCRM.memberShip.Id, UserName: CBCRM.memberShip.FullName }
          , AddTime: 'GetDateTime'
        },
        //市场-销售机会
        SalesOpportunities: {
            Id: ''
          , Customer: ''
          , CustomerDisplay: ''
          , MarketingCampaign: ''
          , MarketingCampaignDisplay: ''
          , MarketActivity: ''
          , MarketActivityDisplay: ''
          , Title: ''
          , CustomerContact: ''
          , CustomerContactDisplay: ''
          , DiscoverDate: ''
          , CustomerSource: ''
          , FromId: ''
          , CustomerSourceDisplay: ''
          , OpportunitiesFollow: ''
          , OpportunitiesFollowDisplay: ''
          , InfoProvider: ''
          , CustomerDemand: ''
          , ExpectSigningDate: ''
          , ExpectAmount: ''
          , OtherResult: ''
          , OpportunitiesPossibility: ''
          , FollowStage: '10306'
          , FollowStageDisplay: ''
          , State: ''
          , StateDisplay: ''
          , Remark: ''
          , AddBy: { Id: CBCRM.memberShip.Id, UserName: CBCRM.memberShip.FullName }
          , AddTime: 'GetDateTime'
          , LastUpdateBy: ''
          , LastUpdateDate: ''
          , StageChangeDate: ''
          , FollowServerTag: []
          , FollowServerTagDisplay: ''
            , AttachmentPath: ''
            ,AttachmentName:''
        },
        //市场-跟单报价
        DocumentaryOffer: {
            Id: 0
          , Title: ''
          , CustomerDemand: ''
          , Solution: ''
          , OfferType: ''
          , OfferTypeDisplay: ''
          , OfferTotal: 0
          , DeliveryDate: ''
          , ConsignmentType: ''
          , ConsignmentTypeDisplay: ''
          , FreightBear: ''
          , ConsigneeAddress: ''
          , ConsigneePhone: ''
          , Consignee: ''
          , ConsigneeDisplay: ''
          , NoteType: ''
          , NoteTypeDisplay: ''
          , PayRemark: ''
          , ReportSummry: ''
          , CustomerProbeFeedback: ''
          , Files: ''
          , ValidityDate: ''
          , DocumentaryEmployee: ''
          , DocumentaryEmployeeDisplay: ''
          , OfferDate: ''
          , MarketActivity: ''
          , MarketActivityDisplay: ''
          , MarketingCampaign: ''
          , MarketingCampaignDisplay: ''
          , BelongTo: ''
          , BelongToDisplay: ''
          , Customer: ''
          , CustomerDisplay: ''
          , CustomerContact: ''
          , CustomerContactDisplay: ''
          , SalesOpportunities: ''
          , SalesOpportunitiesDisplay: ''
          , PayType: ''
          , PayTypeDisplay: ''
          , BalanceType: ''
          , BalanceTypeDisplay: ''
          , AddBy: { Id: CBCRM.memberShip.Id, UserName: CBCRM.memberShip.FullName }
          , AddTime: 'GetDateTime'
          , PayToRemark: ''
          , HasOffer: false
          , HasPaySendType: false
          , TaxRate: 0
          , TaxAmt: 0
          , TotalAmt: 0
          , AddEmpId: 0
          , AddByName: ''
        },
        //市场-合同订单
        Contract: {
            Id: ''
          , MarketActivity: ''
          , MarketActivityDisplay: ''
          , MarketingCampaign: ''
          , MarketingCampaignDisplay: ''
          , SalesOpportunities: ''
          , SalesOpportunitiesDisplay: ''
          , BelongTo: ''
          , BelongToDisplay: ''
          , CustomerMobile: ''
          , DocumentaryOffer: ''
          , DocumentaryOfferDisplay: ''
          , ContractNum: ''
          , ContractType: ''
          , ContractTypeDisplay: ''
          , ContractName: ''
          , StartDate: ''
          , EndDate: ''
          , SignAContractDate: ''
          , MySignPersion: ''
          , MySignPersionDisplay: ''
          , Customer: ''
          , CustomerDisplay: ''
          , CustomerSign: ''
          , CustomerSignDisplay: ''
          , CustomerMemberGrade: ''
          , CustomerMemberGradeDisplay: ''
          , CustomerBank: ''
          , CustomerBankName: ''
          , CustomerAccount: ''
          , NoteType: ''
          , NoteTypeDisplay: ''
          , ContainsTax: false
          , TaxRate: 0
          , FillUpTax: 0
          , Amount: ''
          , Currency: ''
          , CurrencyRemark: ''
          , PayType: ''
          , PayTypeDisplay: ''
          , PayRemark: ''
          , PlanOfPayNum: ''
          , PayRemark1: ''
          , AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName }
          , AddTime: ''
          , DeliveryDate: ''
          , ConsignmentType: ''
          , ConsignmentTypeDisplay: ''
          , FreightBear: true
          , FreightBearRemark: ''
          , ConsigneeAddress: ''
          , ConsigneePhone: ''
          , Consignee: ''
          , ConsigneeDisplay: ''
          , Files: ''
          , FileList: []
          , MainTerms: ''
          , Remark: ''
          , ReturnedMoney: ''
          , GrossProfit: ''
          , State: ''
          , StateDisplay: ''
          , CurrentStage: ''
          , CurrentStageDisplay: ''
          , FillUpTaxCurrency: ''
          , FillUpTaxCurrencyDisplay: ''
          , IsSample: true
          , IsSampleDisplay: ''
          , ContractCategory: ''
          , CustomerId: ''
          , SupplyCustomerSign: ''
          , CustomerBankId: ''
          , CustomerBankIdDisplay: ''
          , BalanceType: ''
          , BalanceTypeDisplay: ''
          , ConsigneeRemark: ''
          , CountAmount: 0
          , FavourableAmount: 0
          , ProductRemark: ''
        },

        //产品相关合同订单
        ContractProduct: {
            Id: 0,
            ContractName: '',
            CustomerDisplay: '',
            ContractTypeDisplay: '',
            StateDisplay: '',
            Money: '',
            MySignPersionDisplay: '',
            SignAContractDate: 'GetDateTime',
            ContractId: 0,
        },
        //产品相关跟单报价
        DocumentaryOfferProduct: {
            Id: 0,
            Title: '',
            DocumentaryOfferId: 0,
            CustomerDisplay: '',
            DocumentaryEmployeeDisplay: '',
            OfferDate: 'GetDateTime',
        },
        //跟单报价点评
        Comment: {
            Id: 0,
            DocumentaryOfferId: 0,
            Comments: '',
            AddEmpId: 0,
            CommentDate: 'GetDateTime',
            AddByName: ''
        },
        //新闻
        Articles: {
            Id: 0,
            Title: '',
            Brief: '',
            TypeId: 0,
            Source: '',
            GroupId: '',
            Author: '',
            AddBy: 0,
            AddTime: 'GetDateTime',
            ArtContent: '',
            Attachment: '',
            OriginImg: '',
            SmallImg: '',
            DefaultImg: '',
            IsRead: '',
            FakeTitle: '',
            Url: '',
            UpDateTime: 'GetDateTime',
            Hits: 0,
            Sort: 0,
            CommentCount: 0,
            SeoKeyWord: '',
            SeoDescription: '',
            IsChaoBo: false,
            InternetMass: '',
            IsCompanyWeb: false,
            InRecycleBin: false,
            Category: [],
            PushToApp:false
        },
        //新闻分类
        ArticlesType: {
            Id: 0,
            Name: '',
            ParentId: 0,
            Sort: 0
        },
        //日程
        Calendar: {
            Id: 0,
            Subject: '',
            Description: '',
            CalendarType: '',
            StartTime: '',
            EndTime: '',
            IsAllDayEvent: false,
            HasAttachment: '',
            Category: '',
            CategoryId: '',
            Color: '',
            InstanceType: '',
            Attendees: '',
            AttendeeNames: '',
            OtherAttendee: '',
            OtherAttendeeNames: '',
            InRecycleBin: '',
            Staticc: '',
            CustomId: '',
            CustomName: '',
            CustomMan: '',
            PriorityType: '无',
            Completion: 10,
            SalesId: 0,
            SalesTitle: '',
            SalesTitl: '',
            DailyReport: '',
            AddBy: {},
            AddTime:''
        },
        //日程分类
        CalCategory: {
            Id: 0,
            CategoryName: '',
            CategoryColor: '-1'
        },
        //工作报告
        DailyReport: {
            Id: 0,
            Version: 0,
            ReportTitle: '',
            ReportTypeId: 1,
            ReportType: '',
            TodaySummary: '',
            TommowPlan: '',
            ReportStartDate: '',
            ReportEndDate: '',
            LastUpdate: '',
            LastUpdateBy: '',
            InRecycleBin: false,
            IsApproved: '',
            ReadedTotal: 0,
            CommentTotal: 0,
            CommentNeedTotal: 0,
            LatelyCommentBy: '',
            LatelyCommentDate: '',
            LatelyReadDate: '',
            SendTo: '',
            SendToDisplay: '',
            SendToList: [],
            CalendarsList: [],
            AddBy: { Id: "", FullName: "" },
            AddTime: 'GetDateTime',
            YesterdayPlan: '',
            Affix: ''
        },
        DailReportDetail: {
            Id: 0,
            DailyReportId: 0,
            Comments: '',
            FlowersEgg: "1",
            FlowersEggNum: 1,
            CommentDate: 'GetDateTime',
            AddEmpId: 0,
            AddByName: ''
        },
        //书籍管理
        Books: {
            Id: 0
            , BookNo: ''
            , TypeId: 0
            , TypeIdData: ''
            , Name: ''
            , Author: ''
            , BookConcern: ''
            , ISBN: ''
            , PublicationData: ''
            , FixPrice: 0
            , PicturePath: ''
            , Summary: ''
            , BuyTime: ''
            , DepatrID: 0
            , DepatrIDData: ''
            , BuyPrice: 0
            , StorageId: 0
            , StorageIdData: ''
            , BuyCount: 0
            , InventoryQuantity: 0
            , TotalMoney: 0
            , BorrowCount: 0
            , Remark: ''
            , AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName }
            , AddTime: 'GetDateTime'
            , InRecycleBin: false
        },
        //书籍分类
        BookType: {
            Id: 0,
            Name: '',
            TypeNo: '',
            ParentId: { Id: 0, Name: '' },
            Parent: '',
            Sort: 0
        },
        //借阅管理
        BooksBorrow: {
            Id: 0
            , BillNo: ''
            , BorrowBy: { Id: 0, FullName: '' }
            , BorrowTime: ''
            , PlanReturnTime: ''
            , BorrowTotalCount: 0
            , BorrowTotalMoney: 0
            , NotReturnCount: 0
            , NotReturnMoney: 0
            , Remark: ''
            , State: 0
            , AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName }
            , AddTime: 'GetDateTime'
            , InRecycleBin: false
        },
        //归还管理
        BooksReturn: {
            Id: 0
            , BillNo: '自动生成'
            , BorrowBillNo: ''
            , ReturnTime: ''
            , ReturnCount: 0
            , ReturnMoney: 0
            , OutOfDay: 0
            , Remark: ''
            , ReturnBy: { Id: 0, FullName: '' }
            , AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName }
            , AddTime: 'GetDateTime'
            , InRecycleBin: false
        },
        //图书清单
        BooksList: {
            Id: 0
            , Direction: 0
            , BooksId: ''
            , BookNo: ''
            , BooksName: ''
            , Price: 0
            , TotalMoney: 0
            , BelongId: ''
            , Number: 1
            , ReturnNumber: 0
            , NotReturnNumber: 0
        },
        //规划制定
        Planning: {
            Id: 0,
            Title: '',
            Target: '',
            CategoryId: 0,
            StartDate: 'GetDateTime|yyyy-MM-dd hh:mm',
            EndDate: 'GetDateTime|yyyy-MM-dd hh:mm',
            WholePlanningContent: '',
            BusinessPlanningContent: '',
            Attachment: '',
            Producer: '',
            ProductionDay: '',
            InRecycleBin: ''
        },
        //物品维护
        Goods: {
            Id: 0,
            GoodsNo: '',
            TypeId: 0,
            Name: '',
            Specification: '',
            Unit: '',
            ReferencePrice: 0,
            InventoryQuantity: 0,
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //盘点日记
        GoodsInventory: {
            Id: 0,
            GoodsNo: '',
            Type: '',
            Name: '',
            Specification: '',
            Unit: '',
            FirstNumber: 0,
            LastNumber: 0,
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //采购历史
        GoodsPurchase: {
            Id: 0,
            BillNo: '',
            GoodsNo: '',
            Type: '',
            Name: '',
            Specification: '',
            Unit: '',
            Number: 1,
            OverNumber: 0,
            Price: 0,
            TotalMoney: 0,
            ReMark: '',
            State: 0,
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime',
            PurchaseDate: '',
        },
        //采购入库
        GoodsStorage: {
            Id: 0,
            BillNo: '',
            GoodsNo: '',
            PurchaseId: 0,
            Type: '',
            Name: '',
            Specification: '',
            Unit: '',
            Number: 0,
            ReMark: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //领用历史
        GoodsUses: {
            Id: 0,
            BillNo: '',
            GoodsNo: '',
            Type: '',
            Name: '',
            Specification: '',
            Unit: '',
            Number: 0,
            State: 0,
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime',
            UseTime: '',
        },
        //资产登记
        FixedAssets: {
            Id: 0,
            AssetsNo: '',
            Name: '',
            Type: { Id: "", Name: "", Parent: { Id: "", Name: "" } },
            Voucher: '',
            Specification: '',
            BillMoney: 0,
            BillDate: '',
            DepreciationPeriod: 0,
            DepreciationStart: '',
            ResidualValueRate: 0,
            ResidualValue: 0,
            NetWorth: 0,
            IsStopDepreciation: '',
            State: 0,
            StateData: '在库',
            ReMark: '',
            Address: '',
            UseBy: { Id: "", FullName: "" },
            UsesTime: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //资产配置
        FixedAssetsConfig: {
            Id: 0,
            AssetsId: 0,
            Name: '',
            Specification: '',
            Number: 0,
            ReMark: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //折旧方案
        FixedAssetsDepConfig: {
            Id: 0,
            Type: 0,
            Hour: 0,
            Minute: 0,
            ActionDay: 28,
            ActionDayType: 0,
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //资产折旧
        FixedAssetsDepreciation: {
            Id: 0,
            Assets: { Id: 0 },
            StartMonth: '',
            CurYear: 0,
            CurMonth: 0,
            DepreciationValue: 0,
            CurNetWorth: 0,
            TotalMonth: 0,
            TotalValue: 0,
            ReMark: '',
            Type: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //资产流向
        FixedAssetsFlow: {
            Id: 0,
            Assets: { Id: 0 },
            BusinessType: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //资产报修
        FixedAssetsRepairs: {
            Id: 0,
            BillNo: '',
            Assets: { Id: 0 },
            EndTime: '',
            RepairsState: '',
            Description: '',
            Units: '',
            InCharge: '',
            Tel: '',
            TotalMoney: 0,
            State: 0,
            ReMark: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName, Group: CBCRM.memberShip.Group },
            AddTime: 'GetDateTime'
        },
        //资产领用
        FixedAssetsUses: {
            Id: 0,
            BillNo: '',
            Assets: { Id: 0 },
            UsesTime: 'GetDateTime',
            AssignBy: { Id: '', FullName: '' },
            State: 0,
            Address: '',
            Description: '',
            ReMark: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName, Group: CBCRM.memberShip.Group }
        },
        //资产归还
        FixedAssetsReturn: {
            Id: 0,
            BillNo: '',
            Assets: { Id: 0 },
            ReturnTime: '',
            State: 0,
            Address: '',
            Description: '',
            ReMark: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //资产报废
        FixedAssetsScrap: {
            Id: 0,
            BillNo: '',
            Assets: { Id: 0 },
            IsStopDepreciation: '',
            Description: '',
            ReMark: '',
            State: 0,
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //资产类别
        FixedAssetsType: {
            Id: 0,
            Name: '',
            Parent: { Id: "", Name: "", ResidualValueRate: 0 },
            ResidualValueRate: 10.0,
            DepYear: 8,
            ReMark: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //车辆档案
        Car: {
            Id: 0,
            CarNo: '',
            FrameNo: '',
            EngineNo: '',
            Brand: '',
            CarType: '',
            BuyPrice: 0,
            Model: '',
            Color: '',
            BuyDate: '',
            Insure: [],
            InsureData: '',
            InsureBy: '',
            InsureCompany: '',
            InsureTel: '',
            InsureMoney: 0,
            InsureStartDate: '',
            InsureEndDate: '',
            InsureWarn: '',
            InsureWarnDay: 0,
            InsureWarnWay: [],
            Driver: '',
            DriverMobile: '',
            ReMark: '',
            Auth: 0,
            AuthMember: '',
            AuthMemberData: '',
            State: 0,
            CarState: 0,
            UseBy: { Id: '', FullName: '' },
            BeginTime: '',
            EndTime: '',
            AppointBy: { Id: '', FullName: '' },
            AppointByTime: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //车辆保险
        CarInsure: {
            Id: 0,
            Car: { Id: '', CarNo: '' },
            Insure: [],
            InsureBy: '',
            InsureCompany: '',
            InsureTel: '',
            InsureMoney: 0,
            InsureStartDate: '',
            InsureEndDate: '',
            InsureWarn: '',
            InsureWarnDay: 0,
            InsureWarnWay: [],
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //车辆申请
        CarApply: {
            Id: 0,
            Car: { Id: '', CarNo: '' },
            Reason: '',
            UseType: '公用',
            Driver: '',
            DriverMobile: '',
            IsNoticeDriver: '',
            Route: '',
            Mileage: 0,
            State: 0,
            UseBy: { Id: '', FullName: '' },
            BeginTime: '',
            EndTime: '',
            AppointBy: { Id: '', FullName: '' },
            AppointByTime: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //车辆维修保养
        CarService: {
            Id: 0,
            Car: { Id: '', CarNo: '' },
            ServerType: '维修',
            CanUse: true,
            CanUseType: '1',
            ActionBy: '',
            Server: '',
            Money: 0,
            ServerTel: '',
            ServerTime: '',
            ServerContent: '',
            ReMark: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //电子邮件
        Mails: {
            Id: 0,
            ParentId: 0,
            OutBoxId: 0,
            MailTo: '',
            MailToUid: 0,
            MailToDisplay: '',
            MailFrom: '',
            MailFromDisplay: '',
            MailTitle: '',
            MailContent: '',
            AttachFile: '',
            MailCreate: '',
            MailState: '',
            MailSendTime: '',
            IsLocal: 'false',
            IsRead: false,
            IsReply: 0,
            NeedReply: false
        },
        //信息模板
        MessageTmpl: {
            Id: 0,
            InRecycleBin: '',
            AddTime: 'GetDateTime',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            Name: '',
            Data: '',
            Type: '',
            Category: { Id: '', Name: '' }
        },
        MessageTmplCategory: {
            Id: 0,
            AddTime: 'GetDateTime',
            Name: '',
            Sort: 0,
            Icon: "/Content/Themes/Base/Images/tools/sms/c-default.png",
            Parent: { Id: 0, Name: '', Sort: 0 }
        },
        //信息模板字段
        MessageTmplField: {
            Id: 0,
            TableName: '',
            FieldName: ''
        },
        //客户模块设置
        SettingsCustomer: {
            Id: 0,
            CustomerVisitInterval: '',
            CustomerProtectDays: '',
            NoSignContractRecoveryDays: '',
            NoVisitRecoveryDays: '',
            AllowPickCustomerMaxNumber: '',
            IsStart: 'false',
            TemporaryStorage: '',
            RecycleMinute: '',
            RecycleTime: '',
            PickProtectDays: '',
            DisableChangeName: '',
            IfTimeSpan: false,
            TimeSpan1H1: '8',
            TimeSpan1M1: '00',
            TimeSpan1H2: '12',
            TimeSpan1M2: '00',
            TimeSpan2H1: '14',
            TimeSpan2M1: '00',
            TimeSpan2H2: '18',
            TimeSpan2M2: '00'
        },
        //资产账户
        Assets: {
            Id: 0,
            AccountName: '',
            Balance: 0,
            BeginData: '',
            CurrencyId: 0,
            AccountTypeId: 0,
            Bank: '',
            BankAccountName: '',
            BankAccount: '',
            BankLoginUrl:'',
            UserName: '',
            Remark: '',
            Sort: 0,
            Hide:false
        },
        //知识-分类管理
        KnowledgeCategory: {
            Id: '',
            Name: '',
            Parent: { Id: '', Name: '', Sort: '' },
            Parents: '',
            Sort: 1,
            AddBy: CBCRM.memberShip,
            AddTime: 'GetDateTime|yyyy-MM-dd hh:mm'
        },
        //知识-知识管理
        Knowledge: {
            Id: '',
            Title: '',
            CategoryId: '',
            CategoryDisplay: '',
            KContent: '',
            AttachFile: '',
            PermitBrowse: '',
            Publisher: '',
            PublisherDisplay: '',
            PublishSector: '',
            PublishSectorDisplay: '',
            PublisherDisplay: '',
            PublishDate: 'GetDateTime',
            LastChangeDate: '',
            ShareType: '0',
            ShareTypeDisplay: '',
            ShareIds: '',
            ShareDisplay: '',
            ApplyToDeptIds: '',
            ApplyToDeptDisplay: '',
            ApplyToPostIds: '',
            ApplyToPostDisplay: '',
            ApplyToBusinessIds: '',
            ApplyToBusinessDisplay: '',
            SHARE: true,
            IsPublic: false
        },
        //文档-分类管理
        DocCategory: {
            Id: '',
            Name: '',
            Parent: { Id: '', Name: '', Sort: '' },
            Parents: '',
            Sort: 1,
            AddBy: CBCRM.memberShip,
            AddTime: 'GetDateTime|yyyy-MM-dd hh:mm',
            IsSystem: 0
        },
        //货币汇率
        Currency: {
            Id: 0,
            Data: '',
            Sort: 0,
            Rate: 1
        },
        //招聘计划
        Recruitment: {
            Id: 0,
            Title: '',
            DepartmentId: 0,
            DepartmentIdDisplay: '',
            Reason: '',
            ApplyBy: '',
            ApplyByDisplay: '',
            ApplyTime: '',
            Remark: '',
            StartDay: '',
            EndDay: '',
            Cost: 0,
            Status: 0,
            AuditBy: 0,
            AuditTime: '',
            AuditComment: [],
            AuditCommentDisplay: '',
            AddBy: { 'Id': '', 'FullName': '' },
            AddTime: 'GetDateTime'
        },
        //简历
        Resume: {
            Id: '',
            Name: '',
            Sex: 0,
            Birthday: '',
            Degree: '',
            DegreeDisplay: '',
            Mobile: '',
            PostId: '',
            PostDisplay: '',
            DegreeDisplay: '',
            Attachment: '',
            IDCardNumber: '',
            Height: '',
            IsMarry: '',
            IsMarryDisplay: '',
            DrivingLicenseId: '',
            DrivingLicenseDisplay: '',
            VehicleId: '',
            VehicleDisplay: '',
            Graduate: '',
            GraduateSchool: '',
            Tel: '',
            Email: '',
            QQ: '',
            PostCode: '',
            Address: '',
            SourceId: '',
            SourceDisplay: '',
            IsEmploy: '',
            ReportDay: '',
            AddBy: { Id: '', FullName: '' },
            AddTime: '',
            InRecycleBin: '',
            RecruitmentApplyId: '',
            RecruitmentApplyDisplay: '',
            NO: '',
            IsEmployee: false,
            EmployeeId: '',
            EmployeeNo: '',
            JobAddr: '',
            JobState: '',
            JobStateDisplay: '',
            CurrentCompany: '',
            CurrentPost: '',
            CurrentJobAge: '',
            CurrentSalary: '',
            Salary: '',
            Profession: '',
            Register: '',
            Computer: '',
            ComputerDisplay: '',
            Language: [],
            LanguageDisplay: '',
            SkillLevel: '',
            SkillLevelDisplay: '',
            HeadPortrait: '',
            Score: '',
            FirstScore: '',
            BreakNumber: '',
            IsBack: false,
            BackCause: '',
            Appraise: '',
            State: 0,
            StateDisplay: '',
            Skill: '',
            Introduce: '',
            Age: 0,
            JobAge: 0,
            Works: '',
            Educations: '',
            Sort: ''
        },
        //奖惩记录
        Reward: {
            Id: 0,//编号
            Name: '',//员工姓名
            EmployeeId: 0,//员工编号
            GroupId: 0,//部门编号
            GroupName: '',//部门名称
            RewardType: 0,//奖惩类别
            Remark: '',//描述
            RewardNumber: '',//积分
            RewardMoney: '',//金额
            AddBy: { Id: '', FullName: '' },//录入人
            AddTime: '',//录入时间
            InReward: true,//奖惩标识
            InRewardName: '+',//加减
            InRewardMoney: '+'//奖励/惩处
        },
        //积分记录
        Integral: {
            Id: 0,//编号
            Name: '',//员工姓名
            EmployeeId: 0,//员工编号
            GroupId: 0,//部门编号
            GroupName: '',//部门名称
            IntegralNumber: 0,//积分
            Remark: '',//事由
            IntegralSource: '',//来源
            IntegralType: '+',
            SourceId: 0,//来源编号
            AddBy: { Id: '', FullName: '' },//录入人
            AddTime: '',//录入时间
        },
        //收支记账
        AccountBook: {
            Id: 0,
            IsTransfer: '',
            Category: '',
            ProjectId: '',
            ProjectName: '',
            AccountId: '',
            AccountName: '',
            OutAccountId: '',
            OutAccountName: '',
            Amount: 0,
            CustomId: '',
            CustomName: '',
            CustomMan: '',
            Telphone: '',
            Address: '',
            Ids: '',
            Remark: '',
            InRecycleBin: '',
            BookDate: 'GetDateTime',
            IsEdit: false,
            Contract: '',
            ContractNum: '',
            Product: '',
            ProductDisplay: '',
            ProductAlias: '',
            ProductBrand: '',
            ProductStandard: '',
            ProductPrice: '',
            DealPrice:'',
            ProductNum: '',
            Unit: '',
            UnitsDisplay: '',
            ProductAmount: '',
            Salesman: '',
            SalesmanId: '',
            Receiptman: '',
            ReceiptmanId: '',
            ReceiptDate: 'GetDateTime',
            ReceiptBill: '',
            ReceiptBillDisplay: '',
            AddBy: { Id: '', FullName: '' },
            BillType: '',
            BillTypeDisplay: '',
            Bill: '',
            BillDisplay: '',
            BillDate: '',
            Accounting: '',
            Checker: '',
            Teller: '',
            Broker: '',
            Examiner: '',
            BefoceAmount: '',
            BeforeProductId: '',
            BeforeAccountId: '',
            BeforeContractId: '',
            Deletable:''
        },
        //财务-应收应付
        ARAP: {
            Id: '',
            Version: '',
            Batch: '',
            SN:'',
            Type: '',
            Contract: {Id:'', ContractNum:'', ContractName:''},
            CustomerId: '',
            CustomerName: '',
            ProjectId: '',
            Project: '',
            SalesmanId: '',
            SalesmanName: '',
            DutyPersonId: '',
            DutyPersonName: '',
            Money: '',
            SettleMoney: '',
            NotSettleMoney: '',
            SettleWay: '',
            SettleStatus: '',
            CostDate: 'GetDateTimeYMD()',
            PlanDate: 'GetDateTimeYMD()',
            AddBy: { Id: CBCRM.memberShip.Id, UserName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime',
            Remark: ''
        },
        //财务-应收应付销账
        ARAPWriteOff: {
            Id: '',
            AccountingNo: '',
            ARAPId: '',
            Type: '',
            WriteOffAmount: '',
            AddBy: { Id: CBCRM.memberShip.Id, UserName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime',
            Remark: ''
        },
        //收支项目
        Project: {
            Id: 0,
            Name: '',
            Type: '',
            Parent: 0,
            Parents: '',
            Remark: '',
            Sort: 0
        },

        //通知面试
        Notify: {
            Id: 0,
            ResumeId: 0,
            NotifyData: GetDateTime(null, "yyyy-MM-dd hh:mm"),
            Notifyer: '',
            NotifyerDisplay: '',
            NotifyInterviewDate: GetDateTime(DateAdd(null, 'd', 1), "yyyy-MM-dd hh:mm"),
            State: 0,
            StateDisplay: '',
            remarks: '',
            Type: 0,
            NotifyWay: 0,
            NotifyWays: [],
            context: ''
        },
        //面试点评
        Interview: {
            Id: 0,
            ResumeId: 0,
            Time: '',
            Interviewer: '',
            InterviewerDisplay: '',
            Extrinsic: '',
            Skill: '',
            Matching: '',
            Practice: '',
            Score: '',
            Evaluate: '',
            ResultId: '',
            ResultIdDisplay: ''
        },
        //票据凭证
        Bill: {
            Id: 0,
            BillType: '',
            BillTypeDisplay: '',
            BillCode: '',
            Project: '',
            Amount1: '',
            Amount2: '',
            CustomId: '',
            CustomName: '',
            CustomMan: '',
            Telphone: '',
            Address: '',
            Creator: '',
            CreatorDisplay: '',
            CreateDate: '',
            AddBy: '',
            AddTime: '',
            Contract: '',
            ContractNum: '',
            IsReceipts: '',
            ReceiptsBill: '',
            ReceiptsBillDisplay: '',
            IsPay: false,
            IsBillProject: false
        },
        //培训计划
        TrainPlan: {
            Id: '',
            Time: '',
            Place: '',
            Teach: '',
            ClassHour: '',
            Object: '',
            ClassId: '',
            ClassDisplay: '',
            LayId: '',
            LayDisplay: '',
            MethodId: '',
            MethodDisplay: '',
            CategoryId: '',
            CategoryDisplay: '',
            Subject: '',
            Target: '',
            Content: '',
            Attachment: '',
            CheckMethodId: '',
            CheckMethodDisplay: '',
            EmployeeEvaluateDayAfter: '',
            HREvaluateDayAfter: '',
            Cost: '',
            PlanningBy: '',
            PlanningByDisplay: '',
            PlanEmployeeIds: [],
            PlanEmployeeDisplay: '',
            TrainedRecord: [],
            TrainedRecordDisplay: '',
            PlanningTime: '',
            AuditBy: '',
            Status: '',
            AuditTime: ''
        },
        //培训记录
        TrainedRecord:
        {
            Id: '',
            TrainingProgramId: '',
            EmployeeId: '',
            EmployeeEvaluate: '',
            EmployessSuggest: '',
            EmployeeEvaluateTime: 'GetDateTime',
            Learned: '',
            Score: '',
            ExpressionEvaluate: '',
            ExpressionEvaluateBy: '',
            ExpressionEvaluateTime: '',
            BehaviourEvaluate: '',
            BehaviourEvaluateBy: '',
            BehaviourEvaluateTime: '',
            EffectEvaluate: '',
            EffectEvaluateBy: '',
            EffectEvaluateTime: '',
            IsEstimate: ''
        },
        //员工档案
        Archive: {
            Id: 0,
            FileNumber: '',
            EmpNumber: '',
            Integral: 0,
            Shebao: '',
            Gongzi: '',
            Gongzuo: '',
            Country: '中国',
            Jiaoyu: '',
            TiZhong: '',
            PrivName: '',
            ResumeId: '',
            ResumeName: '',
            Myinfo: '',
            EmpType: 4,
            Rencai: 0,
            TitleOf: '',
            TitleOfs: '',
            TitleOfarr: [],
            TitleOfSign: '',
            GroupId: '',
            GroupName: '',
            PostId: '',
            PostName: '',
            PassportId: '',
            Name: '',
            FirstName: '',
            FirstNameLetter: '',
            Sex: 0,
            IDCardNumber: '',
            IDCardAddress: '',
            NativePlace: '',
            PoliticalId: '',
            Domicile: '',
            Birthday: '',
            EthnicGroupId: '',
            Height: '',
            Picture: '',
            IsMarry: 0,
            PostId: '',
            TitleOfPostId: '',
            ReportDay: 'GetDateTime',
            Salary: '',
            ForeignLanguageLevel: '',
            ComputerLevel: '',
            DrivingLicenseId: '',
            VehicleId: '',
            OtherSkill: '',
            MobileNumber: '',
            PostionId: '',
            HomeTel: '',
            QQ: '',
            Email: '',
            EmergencyContact: '',
            EmergencyTel: '',
            PostCode: '',
            Address: '',
            Homepage: '',
            OtherCertificate: '',
            StartWorkingAt: '',
            RewardPunish: '',
            DepartmentId: '',
            DepartmentName: '',
            BossId: '',
            BossName: '',
            ContractStartDay: '',
            ContractEndDay: '',
            GuaranteeSignDay: '',
            PrivacySignDay: '',
            OfficialDay: '',
            Status: 0,
            LeaveOfficeDay: '',
            ResumeId: '',
            GraduatedFrom: '',
            GraduatedDay: '',
            Profession: '',
            Degree: '',
            AddTime: 'GetDateTime',
            LastEditer: '',
            LastEditTime: '',
            IsHaveTry: true,
            TryToDate: '',
            BossIds: '',
            Motto: '',
            OfficeTel: '',
            OfficeAddress: '',
            EmployeeCertificate: [],
            Language: [],
            Lng: '',
            Lat: ''
        },
        //家庭关系
        EmployeeFamily: {
            Id: '',
            Contract: '',
            Name: '',
            Age: '',
            Face: '',
            Tel: '',
            Work: '',
            Post: '',
            ArchiveId: 0,
            Check: false
        },
        //培训经历
        EmployeeEducationHistory: {
            Id: '',
            EmployeeId: '',
            StartDay: 'GetDateTime|yyyy-MM-dd hh:mm',
            EndDay: 'GetDateTime|yyyy-MM-dd hh:mm',
            School: '',
            Profession: '',
            Degree: '',
            Check: false
        },
        //工作经历
        EmployeeWorkHistory: {
            Id: '',
            EmployeeId: '',
            StartDay: 'GetDateTime|yyyy-MM-dd hh:mm',
            EndDay: 'GetDateTime|yyyy-MM-dd hh:mm',
            Company: '',
            Department: '',
            Post: '',
            Check: false
        },
        //亲属关系
        EmployeeKinsfolk: {
            Id: '',
            KinsfolkId: '',
            KinsfolkName: '',
            DepartmentId: '',
            DepartmentName: '',
            PostId: '',
            PostName: '',
            Relation: '',
            Check: false
        },
        //劳动合同
        LabourContract: {
            Id: '',
            AddTime: 'GetDateTime',
            AddBy: { Id: '', FullName: '' },
            CategoryId: '',
            CategoryDisplay: '',
            Title: '',
            EmployeeId: '',
            EmployeeDisplay: '',
            ReportDay: '',
            ResponsibleId: '',
            ResponsibleDisplay: '',
            SigningTime: '',
            StartDay: '',
            EndDay: '',
            Remark: '',
            Attachment: '',
            No: '',
            State: 0,
            StateDisplay: 0,
            IDNumber: '',
            GroupId: '',
            GroupDisplay: '',
            DayType: 0
        },
        //人事调动
        PostChange: {
            Id: '',
            EmployeeId: '',
            EmployeeDisplay: '',
            Category: '0',
            CategoryDisplay: '',
            OldPostId: '',
            OldPostDisplay: '',
            NewPostId: '',
            NewPostDisplay: '',
            OldDepartmentId: '',
            OldDepartmentDisplay: '',
            NewDepartmentId: '',
            NewDepartmentDisplay: '',
            ChangeDay: '',
            Reason: '',
            Remark: '',
            AddBy: { Id: '', FullName: '' },
            AddTime: 'GetDateTime',
            NewSalary: '',
            OldSalary: ''
        },
        // 员工沟通
        Communication: {
            Id: '',
            Subject: '',
            CategoryId: '',
            CategoryDisplay: '',
            MethodId: '',
            MethodDisplay: '',
            Place: '',
            Target: '',
            Content: '',
            EmployeeId: '',
            EmployeeDisplay: '',
            Comment: '',
            PersonInCharge: '',
            PersonInChargeDisplay: '',
            Time: '',
            Result: '',
            AddBy: { Id: '', FullName: '' },
            AddTime: 'GetDateTime'
        },
        //礼品、赠品
        MaterialsGift: {
            Id: '',
            Name: '',
            SupliersId: '',
            SupliersDisplay: '',
            ContactId: '',
            ContactDisplay: '',
            GiftType: '',
            GiftTypeDisplay: '',
            Price: '',
            Amount: '',
            TotalPrice: '',
            Stock: '',
            UseConditions: '',
            Sales: '',
            Integral: '',
            Description: '',
            BuyerId: '',
            BuyerDisplay: '',
            BuyTime: ''
        },
        //礼品、赠品领用
        MaterialsGiftUse: {
            Id: '',
            User_Id: '',
            UserDisplay: '',
            UseTime: '',
            GiftId: '',
            GiftDisplay: '',
            Num: '',
            CustomerId: '',
            CustomerDisplay: '',
            ContactId: '',
            ContactDisplay: '',
            ContractFormId: '',
            UseOfConditions: '',
            PostBy: '',
            PostByDisplay: ''
        },
        //物料、印刷品
        MaterialsOrPrint: {
            Id: '',
            Name: '',
            SupliersId: '',
            SupliersDisplay: '',
            ContactId: '',
            ContactDisplay: '',
            MaterialType: '',
            MaterialTypeDisplay: '',
            Amount: '',
            CountUnit: '',
            CountUnitDisplay: '',
            Stock: '',
            Price: '',
            TotalPrice: '',
            Description: '',
            BuyerId: '',
            BuyerDisplay: '',
            BuyTime: ''
        },
        //广告素材
        AdvertisingMaterials: {
            Id: '',
            Version: '',
            Name: '',
            ContentFormat: '',
            ContentFormatData: '',
            MaterialType: '',
            MaterialTypeData: '',
            StartDate: '',
            EndDate: '',
            Holidays: '',
            HolidaysData: '',
            Specifications: '',
            Description: '',
            UploadType: '',
            Path: '',
            FileFormat: '',
            Size: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime',
            InRecycleBin: '',
            MediaType: [],
            MediaTypeData: ''
        },
        //广告投放表
        Advertising: {
            Id: '',
            Theme: '',
            MediaType: '',
            MediaTypeData: '',
            MediaId: '',
            MediaIdData: '',
            ContactId: '',
            ContactIdData: '',
            TargetSite: '',
            TargetAudience: '',
            StartDate: '',
            EndDate: '',
            LayoutPosition: '',
            Specfifcations: '',
            Amount: '',
            CommitmentOf: '',
            CountUnit: '',
            Description: '',
            AdvertisingContent: '',
            AdAnnex: '',
            ObjectiveEffect: '',
            Applicant: '',
            AppTime: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //物料、印刷品领用
        MaterialsOrPrintUse: {
            Id: '',
            User_Id: '',
            UserDisplay: '',
            UseTime: '',
            MaterialsId: '',
            MaterialsDisplay: '',
            Num: '',
            CustomerId: '',
            CustomerDisplay: '',
            ContactId: '',
            ContactDisplay: '',
            ContractFormId: '',
            UseOfConditions: '',
            PostBy: '',
            PostByDisplay: '',
            OperationVal: '',
            OperationValDisplay: ''
        },
        //优惠券
        MaterialsCoupon: {
            Id: '',
            CampaignId: '',
            CampaignDisplay: '',
            ActivityId: '',
            ActivityDisplay: '',
            CouponNumber: '',
            CouponName: '',
            UseDescription: '',
            LimitedVal: '',
            MeetsVal: '',
            CouponType: '1',
            CouponDisplay: '',
            CouponVal: '',
            CouponRatio: '',
            StartDate: '',
            EndDate: '',
            Integral: '',
            Stock: '',
            PublishDate: '',
            ResidualVal: '0',
            Publisher: '',
            PublisherDisplay: ''
        },

        //优惠券领用
        MaterialsCouponUse: {
            Id: '',
            User_Id: '',
            UserDisplay: '',
            UseTime: '',
            CouponId: '',
            CouponDisplay: '',
            Num: '',
            CustomerId: '',
            CustomerDisplay: '',
            ContactId: '',
            ContactDisplay: '',
            ContractFormId: '',
            UseOfConditions: ''
        },

        //渠道政策
        ChannelPolicy: {
            Id: '',
            Title: '',
            StartDate: '',
            EndDate: '',
            PolicyType: '1',
            PolicyObject: '0',
            PolicyObjectDisplay: '',
            Content: '',
            PublishSector: '',
            PublishSectorDisplay: '',
            AddBy: { Id: '', FullName: '' },
            AddTime: '',
            Affix: ''
        },
        //代理商区域
        ChannelArea: {
            Name: '',
            ParentId: '',
            Parent: { Id: '', Name: '' },
            Parents: '',
            Sort: '',
            Content: ''
        },

        //渠道开发维护
        ChannelDevelop: {
            Id: '',
            Title: '',
            ChannelAgentId: '',
            ChannelAgentDisplay: '',
            ContactId: '',
            ContactDisplay: '',
            Behavior: '',
            BehaviorDisplay: '',
            Content: '',
            PublishSector: '',
            PublishSectorDisplay: '',
            AddBy: { Id: '', FullName: '' },
            AddTime: '',
            Executor: '',
            ExecutorDisplay: '',
            ExecutorTime: '',
            Publisher: '',
            PublisherDisplay: '',
            PublishDate: ''
        },

        //业务明细
        ContractDetails: {
            Id: 0,
            Num: 1,
            OutNum: 0,
            Price: 0,
            StandardPrice: 0,
            StockPrice: 0,
            LowestPrice: 0,
            RoyaltyPrice: 0,
            RoyaltyType: 0,
            RoyaltyCompute: 0,
            RoyaltyValue:0,
            RoyaltyMoney:0,
            PriceTitle: '',
            Money: 0,
            Remark: '',
            Product: '',
            ProductName: '',
            ProductAlias: '',
            Contract: '',
            ContractNum: '',
            ContractName: '',
            Customer: '',
            CustomerName: '',
            PlanOfPayDate: '',
            PlanOfPayNum: '',
            Require: '',
            HasServiceTimeLimit: false,
            StartDate: '',
            EndDate: '',
            HasSerialNumber: false,
            SerialNumber: '',
            HasAccountPwd: false,
            UserName: '',
            PassWord: '',
            IsUseLimit: false,
            UseLimitOfNum: 0,
            InRecycleBin: '',
            Customer: '',
            StandardPrice: 0,
            LowestPrice: '',
            Standard: '',
            PayState: 0,
            ReturnAmount: 0,
            BranId:'',
            BrandName: '',
            AddBy: '',
            AddByName: '',
            AddTime: 'GetDateTime',
            Unit: '',
            UnitsDisplay:'',
            No: 0,
            BelongTo: "",
            BelongToDisplay: "",
            NoteType: "",
            NoteTypeDisplay:""
        },
        //收款单
        ReceiptsBill: {
            Id: 0,
            No: '',
            Contract: '',
            ContractNum: '',
            Customer: '',
            CustomerDisplay: '',
            Contacts: '',
            ContactsDisplay: '',
            CustomerTel: '',
            CustomerAddr: '',
            Amount: 0,
            IsPayOfPlan: false,
            Remark: '',
            SalesmanId:'',
            Salesman: '',
            ReceiptmanId:'',
            Receiptman: '',
            Receiptdate: 'GetDateTime',
            AddBy: CBCRM.memberShip.Id,
            AddByName: CBCRM.memberShip.FullName,
            AddTime: 'GetDateTime',
            BillType: '',
            BillTypeDisplay: '',
            Bill: '',
            BillDisplay: '',
            BillDate: '',
            Accounting: '',
            Checker: '',
            Teller: '',
            Broker: '',
            Examiner: '',
            Category: 0,
            IsOrder: false,
            OrderId: 0
        },
        //新闻评论
        ArticlesComment:
        {
            Id: 0,
            EmpId: 0,
            EmpIdDisplay: '',
            AddTime: 'GetDateTime',
            ComContent: '',
            Point: false,
            ArticlesId: 0
        },
        //职位分类
        RecruitCategory: {
            Id: '',
            Name: '',
            RecruitmentId: '',
            RecruitmentDisplay: '',
            AddTime: 'GetDateTime',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName }
        },
        //招聘职位 
        RecruitPost: {
            Id: '',
            Name: '',
            CategoryId: '',
            CategoryDisplay: '',
            GroupId: '',
            GroupDisplay: '',
            RecruitProperties: '',
            RecruitPropertiesDisplay: '',
            PostType: '',
            PostTypeDisplay: '',
            Number: 1,
            JobAddr: '',
            Education: '',
            EducationDisplay: '',
            Experience: '',
            Profession: '',
            Salary: '',
            PostProperties: '',
            PostPropertiesDisplay: '',
            State: 0,
            StateDisplay: '',
            Remark: '',
            AddTime: 'GetDateTime',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName }
        },
        //文档资料
        Documents: {
            Id: ''
            , Title: ''
            , Vercode: 1
            , Explain: ''
            , Tab: ''
            , ProductIds: ''
            , ProductDisplay: ''
            , CategoryId: ''
            , CategoryDisplay: ''
            , ShareId: ''
            , ShareDisplay: ''
            , FileName: ''
            , FileBak: ''
            , FilePath: ''
            , FileSize: ''
            , FileType: ''
            , LastUpDate: ''
            , LastUpName: ''
            , AddBy: { Id: '', Name: '', FullName: '' }
            , AddTime: 'GetDateTime|yyyy-MM-dd hh:mm'
        },
        //仓库
        Storage: {
            Id: 0,
            No: '',
            TypeId: '',
            TypeName: '',
            Form: 0,
            Name: '',
            NameLetter: '',
            Address: '',
            Tel: '',
            Lng: '',
            Lat: '',
            Remark: '',
            State: 1,
            Inventory: 0,
            MaxInventory: '',
            MinInventory: '',
            MultipleSpace: false,
            AddBy: { Id: '', Name: '', FullName: '' },
            AddTime: 'GetDateTime'
        },
        //仓位
        StorageSpace: {
            Id: 0,
            StorageId: 0,
            No: '',
            Name: '',
            Inventory: 0,
            MaxInventory: 0,
            AddTime: 'GetDateTime'
        },
        //库存
        StorageTotal: {
            Id: 0,
            StorageId: 0,
            SpaceId: 0,
            CategoryName: '',
            ProductId: 0,
            ProductNo: '',
            ProductName: '',
            Standard: '',
            Units: '',
            Inventory: 0,
            CostPrice: 0,
            CostMony: 0,
            AddTime: 'GetDateTime'
        },
        //出入库单
        StorageOutAndInBill: {
            Id: 0,
            Direction: 0,
            Type: '',
            FromId: '',
            FromNo: '',
            BillNo: '',
            SupplyId: '',
            SupplyName: '',
            StorageId: '',
            ActionTime: 'GetDateTime',
            ActionBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName, Group: '' },
            ActionByGroup: '',
            Total: 0,
            TotalMoney: 0,
            PreferentialMoney: 0,
            PayMoney: 0,
            CurPayMoney: 0,
            PayAccount: '',
            Summary: '',
            LogisticsCmy: '',
            LogisticsMony: 0,
            LogisticsPayed: '',
            LogisticsAgentPay: 0,
            AddTime: 'GetDateTime',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName, Group: '' },
        },
        //出入库明细
        StorageOutAndIn: {
            Id: 0,
            Direction: 0,
            Type: '',
            InId: '',
            FromId: '',
            FromNo: '',
            BillId: '',
            BillNo: '',
            SupplyId: '',
            SupplyName: '',
            StorageId: '',
            SpaceId: '',
            ProductCategory: '',
            ProductId: '',
            ProductNo: '',
            ProductName: '',
            Standard: '',
            Units: '',
            Number: 0,
            InventoryNumber: 0,
            Price: 0,
            DiscountRate: 0,
            DiscountMoney: 0,
            Money: 0,
            TaxRate: 0,
            TaxMoney: 0,
            TotalMony: 0,
            SN: '',
            BatchNumber: '',
            ProductionTime: '',
            ValidDay: 0,
            ValidDate: '',
            Remark: '',
            State: 0,
            AddTime: 'GetDateTime',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            HasServiceTimeLimit: false,
            StartDate: '',
            EndDate: '',
            HasSN: false,
            SN: '',
            HasAccountPwd: false,
            UserName: '',
            PassWord: '',
            IsUseLimit: false,
            UseLimitOfNum: ''
        },

        //模块编号
        ModelTypeID: {
            Id: 0,
            TypeNo: 0,
            ModelName: '',
            AddTime: 'GetDateTime'
        },

        //采购询价
        PurchaseEnquirys: {
            Id: 0,
            EnquiryTag: '',
            EnquiryNo: '',
            EnquiryBatch: '',
            EmployeeName: '',
            EmployeeId: 0,
            EnquiryTime: 'GetDateTime',
            SupplyId: 0,
            SupplyName: '',
            ContactsId: 0,
            ContactsName: '',
            ContactsTel: '',
            QuoteTime: 'GetDateTime',
            Remarks: '',
            Total: 0,
            TaxRate: 0,
            TaxPosition: 0,
            Preferential: 0,
            TotalMoney: 0,
            State: 0,
            IsMoney: false,
            AddTime: 'GetDateTime',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName }
        },
        //产品列表
        PurchaseDetail: {
            Id: 0,
            enquiryId: 0,
            productName: '',
            productId: 0,
            productNo: '',
            standard: '',
            number: 0,
            units: '',
            marketPrice: 0,
            price: 0,
            money: 0,
            remarks: '',
        },
        //采购入库
        PurchasePutStorage: {
            Id: 0,
            Direction: 0,
            Type: '',
            FromId: '',
            FromNo: '',
            BillNo: '',
            SupplyId: '',
            SupplyName: '',
            StorageId: '',
            ActionBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName, Group: CBCRM.memberShip.Group },
            ActionByGroup: '',
            ActionTime: 'GetDateTime',
            TotalMoney: 0,
            PreferentialMoney: 0,
            PayMoney: 0,
            CurPayMoney: 0,
            PayAccount: '',
            Summary: '',
            LogisticsCmy: '',
            LogisticsMony: 0,
            LogisticsPayed: '',
            LogisticsAgentPay: 0,
            AddTime: 'GetDateTime',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName, Group: '' }
        },

        //采购询价产品
        PurchaseEnquiryProducts: {
            Id: 0,
            EnquiryId: 0,
            ProductCategory: '',
            ProductId: 0,
            ProductNo: '',
            ProductName: '',
            Standard: '',
            Units: '',
            Number: 0,
            Price: 0,
            DiscountRate: 0,
            DiscountMoney: 0,
            Money: 0,
            TaxRate: 0,
            TaxMoney: 0,
            TotalMony: 0,
            Remark: '',
            State: 0
        },
        //采购订单
        PurchaseOrder: {
            Id: 0,
            PurchaseOrderTag: '',
            BillNo: '',
            SupplyId: 0,
            SupplyName: '',
            StorageId: 0,
            StorageName: '',
            ContactsId: '',
            ContactsName: '',
            DeliveryTime: 'GetDateTime',
            ActionTime: 'GetDateTime',
            ActionBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            PayMoney: 0,
            CurPayMoney: 0,
            State: 0,
            Remarks: '',
            ProductList: [],
            AddTime: 'GetDateTime',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName }
        },
        //采购订单产品
        PurchaseOrderProducts: {
            Id: 0,
            OrderId: 0,
            StorageId: 0,
            ProductCategory: '',
            ProductId: 0,
            ProductNo: '',
            ProductName: '',
            Standard: '',
            Units: '',
            Number: 0,
            PutStorageNumber: 0,
            Price: 0,
            DiscountRate: 0,
            DiscountMoney: 0,
            Money: 0,
            TaxRate: 0,
            TaxMoney: 0,
            TotalMony: 0,
            Remark: ''
        },
        PurchasePay: {
            Id: 0,
            No: '',
            Contract: 0,
            ContractNum: '',
            Customer: 0,
            CustomerDisplay: '',
            Contacts: 0,
            ContactsDisplay: '',
            CustomerTel: '',
            CustomerAddr: '',
            Amount: 0,
            IsPayOfPlan: true,
            BillType: 0,
            Bill: 0,
            BillDate: 'GetDateTime',
            Remark: '',
            Salesman: '',
            Receiptman: '',
            Receiptdate: 'GetDateTime',
            AddTime: 'GetDateTime',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            InRecycleBin: false,
            Accounting: '',
            Checker: '',
            Teller: '',
            Broker: '',
            Examiner: '',
            Category: 0,
            IsOrder: true,
            OrderId: 0
        },
        //仓库调拨
        StorageTrans: {
            Id: 0,
            StorageTransId: '',
            OutStorageId: 0,
            InStorageId: 0,
            BillOutId: 0,
            BillInId: 0,
            Number: 0,
            TotalMoney: 0,
            TransType: 0,
            TransCompanyId: 0,
            TransCompany: '',
            TransNo: '',
            Remark: '',
            State: 0,
            ActionTime: '',
            ActionUser: '',
            ActionUserName: '',
            ActionGroupId: 0,
            ActionGroupName: '',
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            ArrivalTime: '',
            EditTime: ''
        },

        //仓库盘点明细
        StorageInventory: {
            Id: 0,
            InventoryId: 0,
            InventoryNo: '',
            StorageId: 0,
            StorageName: 0,
            SpaceId: 0,
            SpaceName: 0,
            ProductCategory: '',
            ProductId: 0,
            ProductNo: '',
            ProductName: '',
            Standard: '',
            Units: '',
            AccountNumber: 0,
            RealNumber: 0,
            Differences: 0,
            ActionTime: 'GetDateTime',
            ActionBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            ActionByGroup: CBCRM.memberShip.Group,
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime',
            InRecycleBin: '',
            ischecked: 0
        },
        //仓库盘点单
        StorageCheck: {
            Id: 0,
            InventoryNo: '',
            InventoryName: '',
            ProductNumber: 0,
            AccountNumber: '',
            RealNumber: '',
            Differences: '',
            Profit: '',
            Loss: '',
            Flat: '',
            Remark: '',
            ActionTime: 'GetDateTime',
            ActionBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            ActionByGroup: CBCRM.memberShip.Group,
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            InRecycleBin: ''
        },
        //签到
        CheckIn: {
            Id: 0,
            VerifyState: false,
            CheckInState: '',
            CheckInType: '',
            Lng: '',
            Lat: '',
            Location: '',
            Picture:'',
            IP:'',
            InRecycleBin: false,
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime:'GetDateTime'
        },
        //签到时间设置
        CheckInConfig: {
            Id: 0,
            ValidStartH: 0,
            ValidStartM: 0,
            ValidEndH: 0,
            ValidEndM: 0,
            WorkStartH: 0,
            WorkStartM: 0,
            WorkEndH: 0,
            WorkEndM: 0,
            Name: '',
            WeekDays: '',
            WeekDayList: [],
            Enable: true,
            InRecycleBin: false,
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        },
        //签到地区设置
        CheckInArea: {
            Id: 0,
            Lng: '',
            Lat: '',
            Location: '',
            Scope:500,
            Enable: true,
            AdapterConfig: false,
            ConfigIds: '',
            ConfigIdList:[],
            InRecycleBin: false,
            AddBy: { Id: CBCRM.memberShip.Id, FullName: CBCRM.memberShip.FullName },
            AddTime: 'GetDateTime'
        }
    }
    var messageTmplMap = {
        Customer: {
            '名称': 'Name',
            '会员级别': 'StateGradeDisplay',
            '分类': 'CategoryDisplay',
            '公司电话': 'CompanyTel1',
            '公司地址': 'CompanyAddress',
            'Email': 'Email',
            'QQ': 'QQ'
        },
        Contact: {
            '姓名': 'Name',
            '称谓': 'AppellationName',
            '部门': 'Department',
            '职位': 'Post',
            '对应客户': 'CustomerName',
            '生日': 'Birthday',
            '性别': 'Sex'
        },
        User: {
            '姓名': 'Name',
            'CRM账号': 'DepartmentName',
            '姓名': 'Name',
            '部门': 'GroupName',
            '职位': 'PostName',
            '档案编号': 'FileNumber',
            '入职时间': 'ReportDay',
            '离职时间': 'LeaveOfficeDay'
        },
        Product: {
            '编号': 'No',
            '条码': 'BarCode',
            '名称': 'Name',
            '分类': 'CategoryName',
            '品牌': 'Brand.Name',
            '供应商': 'SuplierNames',
            '库存': 'CurrentStockNum',
            '规格型号': 'Standard',
            '重量': 'Weight'
        },
        "Resume": {
            '姓名': 'Name',
            '面试时间': 'NotifyInterviewDate',
            "投递时间": 'AddTime',
            '面试类型': 'Type'
        }
    }
    var modelFactory={
        create: function (id) {
            CBCRM = avalon.vmodels.CBCRM;
            var m = modelStore[id];
            var entity = m ? avalon.mix(true, {}, m) : {};
            for (var key in entity) {
                var v = entity[key];
                if (typeof (v) == "string" && v.indexOf("GetDateTime") != -1) {
                    v = v.split("|");
                    if (v.length == 1) entity[key] = GetDateTime();
                    else entity[key] = GetDateTime(null, v[1]);
                }
                if (v == "GetDateTime()") entity[key] = GetDateTime();
                else if (v == "GetDateTimeYMD()") entity[key] = GetDateTimeYMD();
                else if (v == "GetDateTimeYMDHM()") entity[key] = GetDateTime(null, "yyyy-MM-dd hh:mm");
            }
            if (typeof (entity.AddBy) == "object") {
                var user = CBCRM.memberShip;
                avalon.mix(true, entity.AddBy, { Id: user.Id, FullName: user.FullName, UserName: user.Name });
            }
            if (entity.AddTime == '') {
                entity.AddTime = GetDateTime()
            }
            return entity;
        },
        createMsgTmpl: function (name, model) {
            var o = {}, m = messageTmplMap[name];
            if (!m) return model;
            var a;
            for (var key in m) {
                a = m[key].split(".");
                var val = m[a[0]];
                for (var i = 1, l = a.length; i < l; i++) {
                    val = val[a[i]];
                    if (!val) break;
                }
                o[key] = val;
            }
            return o;
        },
        getDateTime: GetDateTime
    }
    return modelFactory;
})

//返回格式化的日期和时间
function GetDateTime(d, format) {
    var date = d || new Date();
    format = format || "yyyy-MM-dd hh:mm:ss"
    var tobj = { yyyy: date.getFullYear(), M: date.getMonth() + 1, d: date.getDate(), h: date.getHours(), m: date.getMinutes(), s: date.getSeconds() }
    tobj.yy = tobj.yyyy.toString().substring(2, 4);
    tobj.MM = tobj.M < 10 ? '0' + tobj.M : tobj.M
    tobj.dd = tobj.d < 10 ? '0' + tobj.d : tobj.d
    tobj.hh = tobj.h < 10 ? '0' + tobj.h : tobj.h
    tobj.mm = tobj.m < 10 ? '0' + tobj.m : tobj.m
    tobj.ss = tobj.s < 10 ? '0' + tobj.s : tobj.s
    var keys = "yyyy,MM,dd,hh,mm,ss,yy,M,d,h,m,s".split(",");
    for (var i = 0, l = keys.length; i < l; i++) {
        var key = keys[i];
        format = format.replace(key, tobj[key]);
    }
    return format;
}
function DateAdd(d, type, n) {
    d = d || new Date();
    switch (type) {
        case "d":
            d.setDate(d.getDate() + n);
            break;
        case "M":
            d.setMonth(d.getMonth() + n);
            break;
    }
    return d;
}
function GetDateAdd(d, type, n) {
    var d = new Date(d);
    DateAdd(d, type, n);
    return d;
}
function GetDateTimeYMD(d) {
    var date = d || new Date();
    var yy = date.getFullYear();
    var MM = date.getMonth() + 1;
    var dd = date.getDate();
    var hh = date.getHours();
    var mm = date.getMinutes();
    var ss = date.getSeconds();
    return yy + '-'
        + (MM < 10 ? ('0' + MM) : MM) + '-'
        + (dd < 10 ? ('0' + dd) : dd);
}

function GetDateNumber(d) {
    var date = d || new Date();
    var yy = date.getFullYear();
    var MM = date.getMonth() + 1;
    var dd = date.getDate();
    return yy + ''
        + (MM < 10 ? ('0' + MM) : MM) + ''
        + (dd < 10 ? ('0' + dd) : dd);
}

function ShowWork(d) {
    var date = d ? d : new Date();
    return new Array("星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六")[date.getDay()];
}
//获取本周的第一天日期
function Getweekstart(d) {
    var day = '星期一,星期二,星期三,星期四,星期五,星期六,星期天'.split(',')
    var date = d ? d : new Date();
    var yy = date.getFullYear();
    var MM = date.getMonth();
    var dd = date.getDate();
    var dy = date.getDay();
    date.setDate(dd - dy + 1)
    return date;
}
//获取本周的最后一天日期
function Getweekend(d) {
    var day = '星期一,星期二,星期三,星期四,星期五,星期六,星期天'.split(',')
    var date = d ? d : new Date();
    var yy = date.getFullYear();
    var MM = date.getMonth();
    var dd = date.getDate();
    var dy = date.getDay();
    date.setDate(dd - dy + 7)
    return date;
}

function getQuarterStartMonth(d) {
    var date = d ? d : new Date();
    var yy = date.getFullYear();
    var MM = date.getMonth();
    var dd = date.getDate();
    var dy = date.getDay();
    var quarter = 1;
    if (MM < 3)
        quarter = 1;
    else if (MM > 2 && MM < 6)
        quarter = 4;
    else if (MM > 5 && MM < 9)
        quarter = 7;
    else if (MM > 8)
        quarter = 10;
    return quarter
}

//获取本季度的第一天日期
function GetQuarterStartDate(d) {
    var date = d ? d : new Date();
    var yy = date.getFullYear();
    var MM = date.getMonth();
    var dd = date.getDate();
    var dy = date.getDay();
    var Mon = getQuarterStartMonth(date);
    var quarterStartDate = new Date(yy, Mon - 1, 1)
    return quarterStartDate
}
//获取本季度的最后一天日期
function GetQuarterEndDate(d) {
    var date = d ? d : new Date();
    var yy = date.getFullYear();
    var MM = date.getMonth();
    var dd = date.getDate();
    var dy = date.getDay();
    var Mon = getQuarterStartMonth(date);
    var gMonth = Mon + 3;
    var qday = GetMonth(Mon, date)
    var quarterStartDate = new Date(yy, gMonth - 1, 0)
    return quarterStartDate
}

function GetMonth(myMonth, d) {
    var date = d ? d : new Date();
    var sdate = new Date(date.getFullYear(), myMonth, 1);
    var edate = new Date(date.getFullYear(), myMonth + 1, 1);
    var day = (sdate - edate) / (1000 * 60 * 60 * 24);
    return day
}

function exDateRange(date1, date2) {
    var dateRange;
    if (date1 != "" && date2 != "") {
        var strDate = date1.replace(/-/g, "/");
        var endDate = date2.replace(/-/g, "/");
        var s_date = new Date(Date.parse(strDate));
        var e_date = new Date(Date.parse(endDate));
        dateRange = parseInt(s_date - e_date) / (1000 * 60 * 60 * 24);
        return dateRange;
    }
}