Browse Source

客户对账单接口方法

syhx
songguoqiang 1 month ago
parent
commit
63864c347e
  1. 25
      src/api/wms/customerStatementDetail/index.ts
  2. 49
      src/api/wms/customerStatementMain/index.ts

25
src/api/wms/customerStatementDetail/index.ts

@ -35,7 +35,7 @@ export interface CustomerStatementDetailVO {
concurrencyStamp: string concurrencyStamp: string
} }
// 查询客户对账单子信息表(WMS)列表 // 查询客户对账单子信息明细表(WMS)列表或者查询客户对账单对账差异列表 二者共用一个
export const getCustomerStatementDetailPage = async (params) => { export const getCustomerStatementDetailPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
@ -66,12 +66,27 @@ export const deleteCustomerStatementDetail = async (id: number) => {
return await request.delete({ url: `/wms/customer-statement-detail/delete?id=` + id }) return await request.delete({ url: `/wms/customer-statement-detail/delete?id=` + id })
} }
// 导出客户对账单子信息表(WMS) Excel // 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/customer-statement-detail/get-import-template' })
}
//导出明细数据需要传masterId
export const exportCustomerStatementDetail = async (params) => { export const exportCustomerStatementDetail = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/customer-statement-detail/export-excel-senior`, data })
}else{
return await request.download({ url: `/wms/customer-statement-detail/export-excel`, params }) return await request.download({ url: `/wms/customer-statement-detail/export-excel`, params })
} }
}
// 下载用户导入模板 //导出详情对账差异列表数据 需要传masterId
export const importTemplate = () => { export const exportCustomerStatementCompareDetail = async (params) => {
return request.download({ url: '/wms/customer-statement-detail/get-import-template' }) if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/customer-statement-detail/export-excel-compare-senior`, data })
}else{
return await request.download({ url: `/wms/customer-statement-detail/export-excel-compare`, params })
}
} }

49
src/api/wms/customerStatementMain/index.ts

@ -52,11 +52,6 @@ export const deleteCustomerStatementMain = async (id: number) => {
return await request.delete({ url: `/wms/customer-statement-main/delete?id=` + id }) return await request.delete({ url: `/wms/customer-statement-main/delete?id=` + id })
} }
// 导出客户对账单主信息表(WMS) Excel
export const exportCustomerStatementMain = async (params) => {
return await request.download({ url: `/wms/customer-statement-main/export-excel`, params })
}
// 下载客户对账单导入模板 // 下载客户对账单导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/customer-statement-main/get-import-template' }) return request.download({ url: '/wms/customer-statement-main/get-import-template' })
@ -88,7 +83,7 @@ export const sendBack = async (id: number) => {
} }
// 导入客户模具分摊对账单前校验该客户对账单下是否存在已分摊的模具分摊对账单如果有提示 // 导入客户模具分摊对账单前校验该客户对账单下是否存在已分摊的模具分摊对账单如果有提示
export const verifyDataExistShare = async (customerId:number) => { export const verifyDataExistShare = async (customerId:number) => {//customerId为客户对账单id
return await request.get({ url: `/wms/customer-tool-apport-statement-detail/verifyDataExist?customerId=` + customerId }) return await request.get({ url: `/wms/customer-tool-apport-statement-detail/verifyDataExist?customerId=` + customerId })
} }
@ -96,3 +91,45 @@ export const verifyDataExistShare = async (customerId:number) => {
export const importShareTemplate = () => { export const importShareTemplate = () => {
return request.download({ url: '/wms/customer-tool-apport-statement-detail/get-import-template' }) return request.download({ url: '/wms/customer-tool-apport-statement-detail/get-import-template' })
} }
// 客户对账单点击发布接口
export const publish = async (id: number) => {
return await request.get({ url: `/wms/customer-statement-main/publish?id=` + id})
}
// 根据对账单主id点击确认分摊
export const confirmationShare = async (id: number) => {
return await request.get({ url: `/wms/customer-statement-main/confirmationShare?id=` + id})
}
// 客户对账单查询客户代码
export const getCustomerList = async () => {
return await request.get({ url: `/wms/customer-statement-main/confirmationShare`})
}
// 客户模具分摊对账单修改调整金额
export const updateAdjustmentAmount = async (id:number,masterId:number,amount:number) => {
return await request.get({ url: `/wms/customer-statement-main/updateAdjustmentAmount?id=` + id+'&masterId='+masterId+'&amount='+amount})
}
// 导出客户对账单Excel
export const exportCustomerStatementMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/eam/basic-eam-workshop/export-excel-senior`, data })
}else{
return await request.download({ url: `/wms/customer-statement-main/export-excel`, params })
}
}
// 导出客户模具分摊对账单Excel 需要传masterId
export const exportCustomerStatementShareMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/customer-tool-apport-statement-detail/export-excel-senior`, data })
}else{
return await request.download({ url: `/wms/customer-tool-apport-statement-detail/export-excel`, params })
}
}

Loading…
Cancel
Save