93 lines
1.9 KiB
TypeScript
93 lines
1.9 KiB
TypeScript
import request from '@/utils/http'
|
|
|
|
type PageList<T> = {
|
|
list: T[]
|
|
total: number
|
|
page: number
|
|
pageSize: number
|
|
totalPages: number
|
|
}
|
|
|
|
export type QcThirdPartyCompany = {
|
|
id: string
|
|
companyCode: string
|
|
companyName: string
|
|
contactName?: string
|
|
contactPhone?: string
|
|
address?: string
|
|
invoiceTitle?: string
|
|
taxId?: string
|
|
bankName?: string
|
|
bankAccount?: string
|
|
status: string
|
|
orderNum: number
|
|
remark?: string
|
|
createTime?: string
|
|
updateTime?: string
|
|
}
|
|
|
|
export function fetchQcThirdPartyCompanyList(params?: {
|
|
page?: number
|
|
pageSize?: number
|
|
keyword?: string
|
|
status?: string
|
|
}) {
|
|
return request.get<PageList<QcThirdPartyCompany>>({
|
|
url: '/web/admin/qc-third-party-companies',
|
|
params
|
|
})
|
|
}
|
|
|
|
export function fetchQcThirdPartyCompanyOptions() {
|
|
return request.get<Array<{ id: string; companyCode: string; companyName: string }>>({
|
|
url: '/web/admin/qc-third-party-companies/options'
|
|
})
|
|
}
|
|
|
|
export function fetchCreateQcThirdPartyCompany(data: {
|
|
companyCode: string
|
|
companyName: string
|
|
contactName?: string
|
|
contactPhone?: string
|
|
address?: string
|
|
invoiceTitle?: string
|
|
taxId?: string
|
|
bankName?: string
|
|
bankAccount?: string
|
|
status?: string
|
|
orderNum?: number
|
|
remark?: string
|
|
}) {
|
|
return request.post<QcThirdPartyCompany>({
|
|
url: '/web/admin/qc-third-party-companies',
|
|
data
|
|
})
|
|
}
|
|
|
|
export function fetchUpdateQcThirdPartyCompany(
|
|
id: string,
|
|
data: Partial<{
|
|
companyCode: string
|
|
companyName: string
|
|
contactName: string
|
|
contactPhone: string
|
|
address: string
|
|
invoiceTitle: string
|
|
taxId: string
|
|
bankName: string
|
|
bankAccount: string
|
|
status: string
|
|
orderNum: number
|
|
remark: string
|
|
}>
|
|
) {
|
|
return request.put<QcThirdPartyCompany>({
|
|
url: `/web/admin/qc-third-party-companies/${id}`,
|
|
data
|
|
})
|
|
}
|
|
|
|
export function fetchDeleteQcThirdPartyCompany(id: string) {
|
|
return request.del({ url: `/web/admin/qc-third-party-companies/${id}` })
|
|
}
|