liujiandao
2023-10-13 f65ce9c19568745003b22e82060fb38c2885c701
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
package constvar
 
type UserStatus int
 
const (
    UserBan UserStatus = iota
    UserAlive
    UserExamineIng
)
 
type DeviceStatus int
 
const (
    DeviceAll DeviceStatus = iota + 1
    DeviceAlive
    DeviceOffline
)
 
type ClusterStatus int
 
const (
    ClusterAll ClusterStatus = iota + 1
    ClusterAlive
    ClusterOffline
)
 
type UserType int
 
const (
    UserTypeSuper   UserType = iota + 1 // 超级管理员
    UserTypePrimary                     // 主账户
    UserTypeSub                         // 子账户
)
 
type NotAdmin int
 
const (
    NotAdminAll NotAdmin = iota // 公海
    NotAdminYes                 // 我的客户
)
 
type SalesStatus int
 
const (
    SalesStatusNew                           SalesStatus = iota // 新建
    SalesStatusIng                                              // 进行中
    SalesStatusLevelUptoClient                                  // 升级为客户
    SalesStatusLevelUptoClientAndSalesChance                    // 升级为客户并且有销售机会
    SalesStatusFail                          SalesStatus = -1   // 失败
)
 
type CurrencyType int
 
const (
    CurrencyTypeCNY CurrencyType = iota + 1 // 人民币
    CurrencyTypeUSD                         // 美元
    CurrencyTypeEUR                         // 欧元
    CurrencyTypeGBP                         // 英镑
)
 
type MenuType string
 
const (
    MenuTypeClient MenuType = "client"
)
 
type VettingType int
 
const (
    VettingTypeClient VettingType = iota + 1
    VettingTypeSales
    VettingTypeSalesChance
    VettingTypeSalesChanceFollow
)
 
type ServiceContractQueryClass string
 
const (
    ServiceContractQueryClassExpireAfter30Day   ServiceContractQueryClass = "30天后过期"
    ServiceContractQueryClassExpireAfter60Day   ServiceContractQueryClass = "60天后过期"
    ServiceContractQueryClassExpiredBefore15Day ServiceContractQueryClass = "已过期15天"
    ServiceContractQueryClassExpiredBefore60Day ServiceContractQueryClass = "已过期60天"
)
 
type ServiceContractKeywordType string
 
const (
    ServiceContractKeywordContractNo        ServiceContractKeywordType = "服务合同编号"
    ServiceContractKeywordCustomerName      ServiceContractKeywordType = "客户名称"
    ServiceContractKeywordContractDate      ServiceContractKeywordType = "签约日期"
    ServiceContractKeywordContractType      ServiceContractKeywordType = "合同类型"
    ServiceContractKeywordContractStatus    ServiceContractKeywordType = "合同状态"
    ServiceContractKeywordPrincipal         ServiceContractKeywordType = "负责人"
    ServiceContractKeywordProductName       ServiceContractKeywordType = "产品名称"
    ServiceContractKeywordServiceBeginDate  ServiceContractKeywordType = "服务开始日"
    ServiceContractKeywordServiceEndDate    ServiceContractKeywordType = "服务到期日"
    ServiceContractKeywordServiceTotalPrice ServiceContractKeywordType = "价税合计"
)
 
type ServiceFollowupKeywordType string
 
const (
    ServiceFollowupKeywordFollowupNo         ServiceFollowupKeywordType = "回访单编号"
    ServiceFollowupKeywordCustomerName       ServiceFollowupKeywordType = "客户名称"
    ServiceFollowupKeywordContactName        ServiceFollowupKeywordType = "联系人姓名"
    ServiceFollowupKeywordCustomerServiceNo  ServiceFollowupKeywordType = "客户服务单"
    ServiceFollowupKeywordVisitor            ServiceFollowupKeywordType = "回访人"
    ServiceFollowupKeywordSatisfactionDegree ServiceFollowupKeywordType = "满意度"
)
 
type ServiceFeeQueryClass string
 
const (
    ServiceFeeQueryClassExpireLessThen60Days ServiceFeeQueryClass = "过期未满60天"
    ServiceFeeQueryClassExpireLessThen30Days ServiceFeeQueryClass = "过期未满30天"
    ServiceFeeQueryClassExpireAboutTo60Day   ServiceFeeQueryClass = "即将过期60天"
    ServiceFeeQueryClassExpireAboutTo30Day   ServiceFeeQueryClass = "即将过期30天"
    ServiceFeeQueryClassExpired              ServiceFeeQueryClass = "已过期"
    ServiceFeeQueryClassNoService            ServiceFeeQueryClass = "无服务"
)
 
type ServiceFeeKeywordType string
 
const (
    ServiceFeeKeywordCustomerName   ServiceFeeKeywordType = "客户名称"
    ServiceFeeKeywordCustomerType   ServiceFeeKeywordType = "客户类型"
    ServiceFeeKeywordSalesPrincipal ServiceFeeKeywordType = "销售负责人"
    ServiceFeeKeywordCustomerScale  ServiceFeeKeywordType = "客户规模"
    ServiceFeeKeywordClientLevel    ServiceFeeKeywordType = "重要级别"
    ServiceFeeKeywordCustomerNo     ServiceFeeKeywordType = "客户编号"
    ServiceFeeKeywordCustomerStatus ServiceFeeKeywordType = "客户状态"
    ServiceFeeKeywordProductName    ServiceFeeKeywordType = "产品名称"
    ServiceFeeKeywordServiceEndDate ServiceFeeKeywordType = "服务到期日"
)
 
// CodeStandardType 编码类型
type CodeStandardType string
 
const (
    CodeStandardTypeSaleLead       CodeStandardType = "销售线索编码"
    CodeStandardTypeCustom         CodeStandardType = "客户编码"
    CodeStandardTypeContact        CodeStandardType = "联系人编码"
    CodeStandardTypeFollowRecord   CodeStandardType = "跟进记录编码"
    CodeStandardTypeSaleKey        CodeStandardType = "销售机会编码"
    CodeStandardTypeQuotation      CodeStandardType = "报价编码"
    CodeStandardTypeSaleTotalOrder CodeStandardType = "销售总单编码"
    CodeStandardTypeSaleSuborder   CodeStandardType = "销售子单编码"
    CodeStandardTypeSaleRefund     CodeStandardType = "销售退款编码"
    CodeStandardTypeContract       CodeStandardType = "合同编码"
    CodeStandardTypeServerContract CodeStandardType = "服务合同编码"
    CodeStandardTypeServerFollow   CodeStandardType = "服务回访编码"
)
 
func (t CodeStandardType) Valid() bool {
    if t != CodeStandardTypeSaleLead &&
        t != CodeStandardTypeCustom &&
        t != CodeStandardTypeContact &&
        t != CodeStandardTypeFollowRecord &&
        t != CodeStandardTypeSaleKey &&
        t != CodeStandardTypeQuotation &&
        t != CodeStandardTypeSaleTotalOrder &&
        t != CodeStandardTypeSaleSuborder &&
        t != CodeStandardTypeSaleRefund &&
        t != CodeStandardTypeContract &&
        t != CodeStandardTypeServerContract &&
        t != CodeStandardTypeServerFollow {
        return false
    }
    return true
}
 
// CodeGenerateMethod 编码生成方式
type CodeGenerateMethod int
 
const (
    CodeGenerateMethodManual CodeGenerateMethod = iota // 手动生成
    CodeGenerateMethodAuto                             // 自动生成
)
 
func (t CodeGenerateMethod) Valid() bool {
    if t < CodeGenerateMethodManual ||
        t > CodeGenerateMethodAuto {
        return false
    }
    return true
}
 
// CommonStatus 常用状态
type CommonStatus string
 
const (
    CommonStatusEnable  CommonStatus = "启用"
    CommonStatusDisable CommonStatus = "未启用"
    CommonStatusScraped CommonStatus = "已报废"
    CommonStatusUsing   CommonStatus = "使用中"
)
 
func (s CommonStatus) Valid() bool {
    if s != CommonStatusEnable &&
        s != CommonStatusDisable &&
        s != CommonStatusScraped &&
        s != CommonStatusUsing {
        return false
    }
    return true
}
 
const (
    SystemType = 2
)