📄 modconvert.bas
字号:
Attribute VB_Name = "modConvert"
Option Explicit
Public Function GetPaymentModeToStr(iMode As Integer) As String
Select Case iMode:
Case 0:
GetPaymentModeToStr = "现金"
Case 1:
GetPaymentModeToStr = "银行转账"
Case 2:
GetPaymentModeToStr = "支票"
Case 3:
GetPaymentModeToStr = "远期支票"
Case 4:
GetPaymentModeToStr = "电汇"
Case 5:
GetPaymentModeToStr = "承兑汇票"
End Select
End Function
'获得提成方式
Public Function GetDAPFModeToStr(DAPFMode As Integer)
Select Case DAPFMode:
Case 0:
GetDAPFModeToStr = "按客户和品牌"
Case 1:
GetDAPFModeToStr = "按客户"
Case 2:
GetDAPFModeToStr = "按品牌"
Case 3:
GetDAPFModeToStr = "按业务员"
Case 4:
GetDAPFModeToStr = "按默认年限"
End Select
End Function
'获得提成方式
Public Function GetDAPFDeptModeToStr(DAPFMode As Integer)
Select Case DAPFMode:
Case 0:
GetDAPFDeptModeToStr = "部门"
Case 1:
GetDAPFDeptModeToStr = "按品牌"
Case 2:
GetDAPFDeptModeToStr = "按系列"
End Select
End Function
'获得提成类别
Public Function GetDAPFTypeToStr(DAPFType As Integer)
Select Case DAPFType:
Case 0:
GetDAPFTypeToStr = "销售额"
Case 1:
GetDAPFTypeToStr = "净利"
End Select
End Function
'获得提成年限数
Public Function GetDAPFModeYearToInt(DAPFMode As String) As Integer
Select Case DAPFMode:
Case "1年以内":
GetDAPFModeYearToInt = 0
Case "1-2年以内":
GetDAPFModeYearToInt = 1
Case "2-3年以内":
GetDAPFModeYearToInt = 2
Case "3-4年以内":
GetDAPFModeYearToInt = 3
Case "4年以上":
GetDAPFModeYearToInt = 4
End Select
End Function
'获得提成年限数
Public Function GetDAPFModeYearToStr(DAPFMode As Integer) As String
Select Case DAPFMode:
Case 0:
GetDAPFModeYearToStr = "1年以内"
Case 1:
GetDAPFModeYearToStr = "1-2年以内"
Case 2:
GetDAPFModeYearToStr = "2-3年以内"
Case 3:
GetDAPFModeYearToStr = "3-4年以内"
Case 4:
GetDAPFModeYearToStr = "4年以上"
End Select
End Function
'获得应付类别
Public Function GetDealTypeToStr(DAPFType As Integer)
Select Case DAPFType:
Case 0:
GetDealTypeToStr = "采购"
Case 1:
GetDealTypeToStr = "业务费"
Case 2:
GetDealTypeToStr = "业务员提成"
Case 3:
GetDealTypeToStr = "借款"
Case 4:
GetDealTypeToStr = "工资"
Case 5:
GetDealTypeToStr = "部门提成"
Case 6:
GetDealTypeToStr = "其它"
End Select
End Function
'获得应付方式
Public Function GetDealModeToStr(DAPFType As Integer)
Select Case DAPFType:
Case 0:
GetDealModeToStr = "现金"
Case 1:
GetDealModeToStr = "银行转账"
Case 2:
GetDealModeToStr = "支票"
Case 3:
GetDealModeToStr = "远期支票"
End Select
End Function
'获得应付类别
Public Function GetGatheringTypeToStr(DAPFType As Integer)
Select Case DAPFType:
Case 0:
GetGatheringTypeToStr = "销售"
Case 1:
GetGatheringTypeToStr = "借款"
Case 2:
GetGatheringTypeToStr = "提样"
Case 3:
GetGatheringTypeToStr = "其它"
End Select
End Function
'入库方式——数字转字符
Public Function GetGodownEntryModeToStr(iGrade As Integer) As String
Select Case iGrade
Case 0:
GetGodownEntryModeToStr = "采购"
Case 1:
GetGodownEntryModeToStr = "赠品"
Case 2:
GetGodownEntryModeToStr = "借入"
Case 3:
GetGodownEntryModeToStr = "调合"
Case 4:
GetGodownEntryModeToStr = "退货"
Case 5:
GetGodownEntryModeToStr = "其它"
Case 5:
GetGodownEntryModeToStr = "还入"
Case Else
GetGodownEntryModeToStr = "無"
End Select
End Function
'出库方式——数字转字符
Public Function GetSellorderModeToStr(iGrade As Integer) As String
Select Case iGrade
Case 0:
GetSellorderModeToStr = "售销"
Case 1:
GetSellorderModeToStr = "赠送"
Case 2:
GetSellorderModeToStr = "借出"
Case 3:
GetSellorderModeToStr = "调合"
Case 4:
GetSellorderModeToStr = "还出"
Case 5:
GetSellorderModeToStr = "提样"
Case 6:
GetSellorderModeToStr = "退货"
Case 7:
GetSellorderModeToStr = "其它"
Case Else
GetSellorderModeToStr = "無"
End Select
End Function
'发票类型——字符转数字
Public Function GetInvoiceToInt(iGrade As String) As Integer
Select Case iGrade
Case "无":
GetInvoiceToInt = 0
Case "普通国税发票":
GetInvoiceToInt = 1
Case "增值税发票":
GetInvoiceToInt = 2
Case "收据":
GetInvoiceToInt = 3
Case "其它":
GetInvoiceToInt = 4
Case Else
GetInvoiceToInt = -1
End Select
End Function
'发票类型——数字转字符
Public Function GetInvoiceToStr(iGrade As Integer) As String
Select Case iGrade
Case 0:
GetInvoiceToStr = "无"
Case 1:
GetInvoiceToStr = "普通国税发票"
Case 2:
GetInvoiceToStr = "增值税发票"
Case 3:
GetInvoiceToStr = "收据"
Case 4:
GetInvoiceToStr = "其它"
Case Else
GetInvoiceToStr = "无"
End Select
End Function
'返回客户类型数字
Public Function GetOperationModeToInt(customerMode As Variant) As Integer
Select Case customerMode
Case "业务开发客户":
GetOperationModeToInt = 0
Case "公司分配客户":
GetOperationModeToInt = 1
Case "公司开发客户":
GetOperationModeToInt = 2
Case Else
GetOperationModeToInt = -1
End Select
End Function
'返回客户类型字符
Public Function GetOperationModeToStr(customerMode As Variant) As String
Select Case customerMode
Case 0:
GetOperationModeToStr = "业务开发客户"
Case 1:
GetOperationModeToStr = "公司分配客户"
Case 2:
GetOperationModeToStr = "公司开发客户"
Case Else
GetOperationModeToStr = ""
End Select
End Function
'返回交易类型数字
Public Function GetCustomerModeToInt(customerMode As Variant) As Integer
Select Case customerMode
Case "内贸":
GetCustomerModeToInt = 0
Case "外贸":
GetCustomerModeToInt = 1
Case Else
GetCustomerModeToInt = -1
End Select
End Function
'返回交易类型字符
Public Function GetCustomerModeToStr(customerMode As Variant) As String
Select Case customerMode
Case 0:
GetCustomerModeToStr = "内贸"
Case 1:
GetCustomerModeToStr = "外贸"
Case Else
GetCustomerModeToStr = ""
End Select
End Function
'返回价格等级类型数字
Public Function GetPriceModeToInt(customerMode As Variant) As Integer
Select Case customerMode
Case "全国代理":
GetPriceModeToInt = 0
Case "省级代理":
GetPriceModeToInt = 1
Case "工厂出货":
GetPriceModeToInt = 2
Case "三级零批":
GetPriceModeToInt = 3
Case "网络销售":
GetPriceModeToInt = 4
Case "零售":
GetPriceModeToInt = 5
Case Else
GetPriceModeToInt = -1
End Select
End Function
'返回交易类型字符
Public Function GetPriceModeToStr(customerMode As Variant) As String
Select Case customerMode
Case 0:
GetPriceModeToStr = "全国代理"
Case 1:
GetPriceModeToStr = "省级代理"
Case 2:
GetPriceModeToStr = "工厂出货"
Case 3:
GetPriceModeToStr = "三级零批"
Case 4:
GetPriceModeToStr = "网络销售"
Case 5:
GetPriceModeToStr = "零售"
Case Else
GetPriceModeToStr = ""
End Select
End Function
'返回客户状态数字
Public Function GetCustomerStatusToInt(customerStatus As String) As Integer
Select Case customerStatus
Case "疑似客户":
GetCustomerStatusToInt = 0
Case "潜在客户":
GetCustomerStatusToInt = 1
Case "接触客户":
GetCustomerStatusToInt = 2
Case "协商客户":
GetCustomerStatusToInt = 3
Case "交易客户":
GetCustomerStatusToInt = 4
Case "失去客户":
GetCustomerStatusToInt = 5
Case Else:
GetCustomerStatusToInt = -1
End Select
End Function
'返回客户状态字符
Public Function GetCustomerStatusToStr(customerStatus As Variant) As String
Select Case customerStatus
Case 0:
GetCustomerStatusToStr = "疑似客户"
Case 1:
GetCustomerStatusToStr = "潜在客户"
Case 2:
GetCustomerStatusToStr = "接触客户"
Case 3:
GetCustomerStatusToStr = "协商客户"
Case 4:
GetCustomerStatusToStr = "交易客户"
Case 5:
GetCustomerStatusToStr = "失去客户"
Case Else:
GetCustomerStatusToStr = ""
End Select
End Function
'返回付款方式数字
Public Function GetCustomerPromptToInt(customerPrompt As Variant) As Integer
Select Case customerPrompt
Case "现金":
GetCustomerPromptToInt = 0
Case "月结":
GetCustomerPromptToInt = 1
Case "月结30天":
GetCustomerPromptToInt = 2
Case "月结45天":
GetCustomerPromptToInt = 3
Case "月结60天":
GetCustomerPromptToInt = 4
Case "月结90天":
GetCustomerPromptToInt = 5
Case Else:
GetCustomerPromptToInt = -1
End Select
End Function
'返回付款方式
Public Function GetCustomerPromptToStr(customerPrompt As Variant) As String
Select Case customerPrompt
Case 0:
GetCustomerPromptToStr = "现金"
Case 1:
GetCustomerPromptToStr = "月结"
Case 2:
GetCustomerPromptToStr = "月结30天"
Case 3:
GetCustomerPromptToStr = "月结45天"
Case 4:
GetCustomerPromptToStr = "月结60天"
Case 5:
GetCustomerPromptToStr = "月结90天"
Case Else:
GetCustomerPromptToStr = ""
End Select
End Function
'返回科目名称
Public Function GetSubjectGradeToStr(iType As Integer) As String
Select Case iType:
Case 0:
GetSubjectGradeToStr = "一级"
Case 1:
GetSubjectGradeToStr = "二级"
Case 2:
GetSubjectGradeToStr = "三级"
End Select
End Function
'兼职转换
Public Function GetIsParttimeToStr(iType As Integer) As String
Select Case iType:
Case 0:
GetIsParttimeToStr = "正常"
Case 1:
GetIsParttimeToStr = "兼职"
End Select
End Function
'返回订单状态数字
Public Function GetSellStatusToInt(customerPrompt As Variant) As Integer
Select Case customerPrompt
Case "已下定单,等待审批确认":
GetSellStatusToInt = 0
Case "通过审批,等待付定金":
GetSellStatusToInt = 1
Case "已付定金,打样中":
GetSellStatusToInt = 2
Case "打样通过,等待开始生产":
GetSellStatusToInt = 3
Case "生产中":
GetSellStatusToInt = 4
Case "生产完成,等待付款":
GetSellStatusToInt = 5
Case "已付款,等待发货":
GetSellStatusToInt = 6
Case "已发货":
GetSellStatusToInt = 7
Case Else:
GetSellStatusToInt = -1
End Select
End Function
'返回订单状态
Public Function GetSellStatusToStr(customerPrompt As Variant) As String
Select Case customerPrompt
Case 0:
GetSellStatusToStr = "已下定单,等待审批确认"
Case 1:
GetSellStatusToStr = "通过审批,等待付定金"
Case 2:
GetSellStatusToStr = "已付定金,打样中"
Case 3:
GetSellStatusToStr = "打样通过,等待开始生产"
Case 4:
GetSellStatusToStr = "生产中"
Case 5:
GetSellStatusToStr = "生产完成,等待付款"
Case 6:
GetSellStatusToStr = "已付款,等待发货"
Case 7:
GetSellStatusToStr = "已发货"
Case Else:
GetSellStatusToStr = ""
End Select
End Function
'返回付款类型数字
Public Function GetPaymentTypeToInt(customerPrompt As Variant) As Integer
Select Case customerPrompt
Case "全额定金":
GetPaymentTypeToInt = 0
Case "全额货款":
GetPaymentTypeToInt = 1
Case "部分货款":
GetPaymentTypeToInt = 2
Case "全额打样费":
GetPaymentTypeToInt = 3
Case "全额样品费":
GetPaymentTypeToInt = 4
Case Else:
GetPaymentTypeToInt = -1
End Select
End Function
'返回付款方式
Public Function GetPaymentTypeToStr(customerPrompt As Variant) As String
Select Case customerPrompt
Case 0:
GetPaymentTypeToStr = "全额定金"
Case 1:
GetPaymentTypeToStr = "全额货款"
Case 2:
GetPaymentTypeToStr = "部分货款"
Case 3:
GetPaymentTypeToStr = "全额打样费"
Case 4:
GetPaymentTypeToStr = "全额样品费"
Case Else:
GetPaymentTypeToStr = ""
End Select
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -