import request from '@/config/axios' export interface CustomerStatementMainVO { id: number number: string customerCode: string customerName: string yearsMonth: Date status: string comparisonTime: Date publishTime: Date shareTime: Date beInvoicedTime: Date invoicedTime: Date issuedInvoicedTime: Date abrogateTime: Date versionNumber: string remark: string available: string siteId: string concurrencyStamp: string } // 查询客户对账单主信息表(WMS)列表 export const getCustomerStatementMainPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} return await request.post({ url: '/wms/customer-statement-main/senior', data }) } else { return await request.get({ url: `/wms/customer-statement-main/page`, params }) } } // 查询客户对账单主信息表(WMS)详情 export const getCustomerStatementMain = async (id: number) => { return await request.get({ url: `/wms/customer-statement-main/get?id=` + id }) } // 新增客户对账单主信息表(WMS) export const createCustomerStatementMain = async (data: CustomerStatementMainVO) => { return await request.post({ url: `/wms/customer-statement-main/create`, data }) } // 修改客户对账单主信息表(WMS) export const updateCustomerStatementMain = async (data: CustomerStatementMainVO) => { return await request.put({ url: `/wms/customer-statement-main/update`, data }) } // 删除客户对账单主信息表(WMS) export const deleteCustomerStatementMain = async (id: number) => { return await request.delete({ url: `/wms/customer-statement-main/delete?id=` + id }) } // 下载客户对账单导入模板 export const importTemplate = () => { return request.download({ url: '/wms/customer-statement-main/get-import-template' }) } // 导入客户对账单前校验是否有相同客户代码和年月的数据存在 export const verifyDataExist = async (yearsMonthStr: String,customerCode:String) => { return await request.get({ url: `/wms/customer-statement-main/verifyDataExist?yearsMonthStr=` + yearsMonthStr+'&customerCode='+customerCode }) } // 客户对账单重新比对 export const recontrast = async (id: number) => { return await request.get({ url: `/wms/customer-statement-main/recontrast?id=` + id}) } // 客户对账单确认比对结果 export const confirmationContrast = async (id: number) => { return await request.get({ url: `/wms/customer-statement-main/confirmationContrast?id=` + id}) } // 客户对账单废除数据 export const nodeAbrogate = async (id: number) => { return await request.get({ url: `/wms/customer-statement-main/nodeAbrogate?id=` + id}) } // 客户对账单退回操作 export const sendBack = async (id: number) => { return await request.get({ url: `/wms/customer-statement-main/sendBack?id=` + id}) } // 导入客户模具分摊对账单前校验该客户对账单下是否存在已分摊的模具分摊对账单如果有提示 export const verifyDataExistShare = async (customerId:number) => {//customerId为客户对账单id return await request.get({ url: `/wms/customer-tool-apport-statement-detail/verifyDataExist?customerId=` + customerId }) } // 下载客户模具分摊对账单导入模板 export const importShareTemplate = () => { 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 }) } }