import request from '@/utils/request'
|
import { ResouceUrl } from '@/utils/baseconfig'
|
/**
|
*
|
* @param {*} data
|
*/
|
export function UploadFileAsync (data) {
|
var param = new FormData()
|
param.append('file', data.file)
|
return request({
|
url: ResouceUrl + '/api/File/UploadFileAsync',
|
method: 'post',
|
data: param,
|
headers: {
|
'Content-Type': 'multipart/form-data'
|
}
|
})
|
}
|
export function UploadImageAsync (data) {
|
var param = new FormData()
|
param.append('file', data.file)
|
return request({
|
url: ResouceUrl + '/api/File/UploadImageAsync',
|
method: 'post',
|
data: param,
|
headers: {
|
'Content-Type': 'multipart/form-data'
|
}
|
})
|
}
|
export function GetBusinessFollowRecordList (data) {
|
return request({
|
url: '/FollowRecord/GetBusinessFollowRecordList?SourceId=' + data.SourceId + '&PageIndex=' + data.PageIndex + '&PageSize=' + data.PageSize + '&BusinessOperationType=' + data.BusinessOperationType,
|
method: 'get'
|
})
|
}
|
export function DeleteFollowRecord (data) {
|
return request({
|
url: '/FollowRecord/DeleteFollowRecord',
|
method: 'post',
|
data: data
|
})
|
}
|
// 获取省
|
export function GetProvincesList (data) {
|
return request({
|
url: '/ProvinceCity/GetProvincesList',
|
method: 'get'
|
})
|
}
|
// 获取市
|
export function GetCityList (data) {
|
return request({
|
url: '/ProvinceCity/GetCityList?provinceId=' + data.provinceId,
|
method: 'get'
|
})
|
}
|
// 获取区
|
export function GetAreaList (data) {
|
return request({
|
url: '/ProvinceCity/GetAreaList?cityId=' + data.cityId,
|
method: 'get'
|
})
|
}
|
|
export function GetCusomterNumber (data) {
|
return request({
|
url: '/Number/GetCusomterNumber',
|
method: 'get'
|
})
|
}
|
export function GetSalesChanceNumber (data) {
|
return request({
|
url: '/Number/GetSalesChanceNumber',
|
method: 'get'
|
})
|
}
|
export function GetContacterNumber (data) {
|
return request({
|
url: '/Number/GetContacterNumber',
|
method: 'get'
|
})
|
}
|
export function GetAgreementNumber (data) {
|
return request({
|
url: '/Number/GetAgreementNumber',
|
method: 'get'
|
})
|
}
|
export function GetQuotationName (data) {
|
return request({
|
url: '/Number/GetQuotationName?salesChanceId=' + data.salesChanceId,
|
method: 'get'
|
})
|
}
|
export function GetAgreenmentName (data) {
|
return request({
|
url: '/Number/GetAgreenmentName?salesChanceId=' + data.salesChanceId,
|
method: 'get'
|
})
|
}
|
export function GetQuotationNumber (data) {
|
return request({
|
url: '/Number/GetQuotationNumber',
|
method: 'get'
|
})
|
}
|
export function GetSalesChanceName (data) {
|
return request({
|
url: '/Number/GetSalesChanceName?customerId=' + data.customerId,
|
method: 'get'
|
})
|
}
|
|
export function CustomerRepeatCheck (data) {
|
return request({
|
url: '/Customer/CustomerRepeatCheck?Name=' + data.Name,
|
method: 'get'
|
})
|
}
|
export function GetIndustryListChildrenData (data) {
|
return request({
|
url: '/Data/GetIndustryListChildrenData',
|
method: 'get'
|
})
|
}
|
export function ImportCustomerExcel (data) {
|
var param = new FormData()
|
// Object.keys(data).forEach(key => {
|
param.append('file', data.file)
|
// })
|
return request({
|
url: '/Excel/ImportCustomerExcel?excelImportType=' + data.excelImportType,
|
method: 'post',
|
data: param,
|
headers: {
|
'Content-Type': 'multipart/form-data'
|
}
|
})
|
}
|
export function ImportContacterExcel (data) {
|
var param = new FormData()
|
// Object.keys(data).forEach(key => {
|
param.append('file', data.file)
|
// })
|
return request({
|
url: '/Excel/ImportContacterExcel?excelImportType=' + data.excelImportType,
|
method: 'post',
|
data: param,
|
headers: {
|
'Content-Type': 'multipart/form-data'
|
}
|
})
|
}
|
export function ImportSalesChanceExcel (data) {
|
var param = new FormData()
|
// Object.keys(data).forEach(key => {
|
param.append('file', data.file)
|
// })
|
return request({
|
url: '/Excel/ImportSalesChanceExcel?excelImportType=' + data.excelImportType,
|
method: 'post',
|
data: param,
|
headers: {
|
'Content-Type': 'multipart/form-data'
|
}
|
})
|
}
|
export function DownloadCustomerExcelModel (data) {
|
return request({
|
url: '/Excel/DownloadCustomerExcelModel',
|
method: 'get',
|
responseType: 'blob'
|
})
|
}
|
export function DownloadContacgerExcelModel (data) {
|
return request({
|
url: '/Excel/DownloadContacgerExcelModel',
|
method: 'get',
|
responseType: 'blob'
|
})
|
}
|
export function DownloadSalesChanceExcelModel (data) {
|
return request({
|
url: '/Excel/DownloadSalesChanceExcelModel',
|
method: 'get',
|
responseType: 'blob'
|
})
|
}
|
export function OutputCustomerToExcel (data) {
|
return request({
|
url: '/Excel/OutputCustomerToExcel?PageIndex=' + data.PageIndex + '&PageSize=' + data.PageSize +
|
'&SelectOwnedType=' + data.SelectOwnedType +
|
'&Name=' + data.Name +
|
'&CreateStartTime=' + data.CreateStartTime +
|
'&CreateEndTime=' + data.CreateEndTime +
|
'&StartFollowTime=' + data.StartFollowTime +
|
'&EndFolowTime=' + data.EndFolowTime,
|
method: 'get',
|
responseType: 'blob'
|
})
|
}
|
export function OutputContacterToExcel (data) {
|
return request({
|
url: '/Excel/OutputContacterToExcel?PageIndex=' + data.PageIndex + '&PageSize=' + data.PageSize +
|
'&SelectOwnedType=' + data.SelectOwnedType +
|
(data.BrachUserId
|
? '&BrachUserId=' + data.BrachUserId : '') +
|
'&Name=' + data.Name,
|
method: 'get',
|
responseType: 'blob'
|
})
|
}
|
|
export function OutputSalesChanceToExcel (data) {
|
return request({
|
url: '/Excel/OutputSalesChanceToExcel?PageIndex=' + data.PageIndex + '&PageSize=' + data.PageSize +
|
'&SelectOwnedType=' + data.SelectOwnedType +
|
'&Name=' + data.Name +
|
(data.BrachUserId
|
? '&BrachUserId=' + data.BrachUserId : '') +
|
(data.SalesChanceStage
|
? '&SalesChanceStage=' + data.SalesChanceStage : '') +
|
(data.ProvinceCode
|
? '&ProvinceCode=' + data.ProvinceCode : '') +
|
(data.SalesChanceType
|
? '&SalesChanceType=' + data.SalesChanceType : '') +
|
(data.ChanceUploadStatus
|
? '&ChanceUploadStatus=' + data.ChanceUploadStatus : '') +
|
(data.ChanceReportStatus
|
? '&ChanceReportStatus=' + data.ChanceReportStatus : '') +
|
(data.SalesChanceSubmissionMethod
|
? '&SalesChanceSubmissionMethod=' + data.SalesChanceSubmissionMethod : '') +
|
(data.ProjectProperty
|
? '&ProjectProperty=' + data.ProjectProperty : '') +
|
(data.UploadStatusName
|
? '&UploadStatusName=' + data.UploadStatusName : '') +
|
(data.ReportStatusName
|
? '&ReportStatusName=' + data.ReportStatusName : '') +
|
(data.CreateStartTime
|
? '&CreateStartTime=' + data.CreateStartTime : '') +
|
(data.CreateEndTime
|
? '&CreateEndTime=' + data.CreateEndTime : '') +
|
(data.DepartmentUserType
|
? '&DepartmentUserType=' + data.DepartmentUserType : '') +
|
(data.Id
|
? '&Id=' + data.Id : ''),
|
method: 'get',
|
responseType: 'blob'
|
})
|
}
|
export function OutputOtherSalesChanceToExcel (data) {
|
return request({
|
url: '/Excel/OutputOtherSalesChanceToExcel?PageIndex=' + data.PageIndex +
|
'&PageSize=' + data.PageSize +
|
'&SelectOwnedType=' + data.SelectOwnedType +
|
'&Name=' + data.Name +
|
(data.BrachUserId
|
? '&BrachUserId=' + data.BrachUserId : '') +
|
(data.SalesChanceStage
|
? '&SalesChanceStage=' + data.SalesChanceStage : '') +
|
(data.ProvinceCode
|
? '&ProvinceCode=' + data.ProvinceCode : '') +
|
(data.SalesChanceType
|
? '&SalesChanceType=' + data.SalesChanceType : '') +
|
(data.ChanceUploadStatus
|
? '&ChanceUploadStatus=' + data.ChanceUploadStatus : '') +
|
(data.ChanceReportStatus
|
? '&ChanceReportStatus=' + data.ChanceReportStatus : '') +
|
(data.SalesChanceSubmissionMethod
|
? '&SalesChanceSubmissionMethod=' + data.SalesChanceSubmissionMethod : '') +
|
(data.ProjectProperty
|
? '&ProjectProperty=' + data.ProjectProperty : '') +
|
(data.UploadStatusName
|
? '&UploadStatusName=' + data.UploadStatusName : '') +
|
(data.ReportStatusName
|
? '&ReportStatusName=' + data.ReportStatusName : '') +
|
(data.CreateStartTime
|
? '&CreateStartTime=' + data.CreateStartTime : '') +
|
(data.CreateEndTime
|
? '&CreateEndTime=' + data.CreateEndTime : '') +
|
(data.DepartmentUserType
|
? '&DepartmentUserType=' + data.DepartmentUserType : '') +
|
(data.Id
|
? '&Id=' + data.Id : ''),
|
method: 'get',
|
responseType: 'blob'
|
})
|
}
|
export function ExportSubscriptionsExcel (data) {
|
// let params = ''
|
// for (const key in data) {
|
// console.log(key + ':' + data[key])
|
// params = params + (data[key] ? `&${key}=${data[key]}` : '')
|
// }
|
// console.log(params)
|
return request({
|
url: '/AutoDesk/subscriptions/ExportExcel?AutoRenewingSubscriptionText=' + (data.AutoRenewingSubscriptionText === 'AutoRenewing Subscription' ? data.AutoRenewingSubscriptionText : '') +
|
(data.ContractNumber
|
? '&ContractNumber=' + encodeURIComponent(data.ContractNumber) : '') +
|
(data.EndCustomerAccountName
|
? '&EndCustomerAccountName=' + encodeURIComponent(data.EndCustomerAccountName) : '') +
|
(data.EndCustomerStateProvince
|
? '&EndCustomerStateProvince=' + encodeURIComponent(data.EndCustomerStateProvince) : '') +
|
(data.ProductLine
|
? '&ProductLine=' + encodeURIComponent(data.ProductLine) : '') +
|
(data.Term
|
? '&Term=' + data.Term : '') +
|
(data.StartLastPurchaseDate
|
? '&StartLastPurchaseDate=' + data.StartLastPurchaseDate : '') +
|
(data.EndLastPurchaseDate
|
? '&EndLastPurchaseDate=' + data.EndLastPurchaseDate : ''),
|
method: 'get',
|
responseType: 'blob'
|
})
|
}
|
export function GetProjectPropertyData (data) {
|
return request({
|
url: '/Data/GetProjectPropertyData',
|
method: 'get'
|
})
|
}
|
export function GetExtendProjectPropertyData (data) {
|
return request({
|
url: '/Data/GetExtendProjectPropertyData',
|
method: 'get'
|
})
|
}
|
export function GetWxSpUserList (data) {
|
return request({
|
url: '/Data/GetWxSpUserList',
|
method: 'get'
|
})
|
}
|