This commit is contained in:
van
2026-03-24 15:36:57 +08:00
parent 2f296b5fb5
commit 0810a2b46a
2 changed files with 111 additions and 5 deletions

View File

@@ -169,11 +169,33 @@ export function delJDOrder(ids) {
})
}
/** 导入跟团返现 Excelmultipart不用统一 request 以免 Content-Type 覆盖) */
// 后返表上传记录列表
export function listGroupRebateExcelUploads(query) {
return request({
url: '/system/jdorder/groupRebateUpload/list',
method: 'get',
params: query
})
}
/** 导入跟团返现 Excelmultipart */
export function importGroupRebateExcel(formData) {
return axios
.post(process.env.VUE_APP_BASE_API + '/system/jdorder/importGroupRebateExcel', formData, {
headers: { Authorization: 'Bearer ' + getToken() }
headers: { Authorization: 'Bearer ' + getToken() },
// 全局 axios.defaults 为 application/json会覆盖 multipart必须去掉由浏览器自动带 boundary
transformRequest: [
(data, headers) => {
if (data instanceof FormData) {
if (headers && typeof headers.delete === 'function') {
headers.delete('Content-Type')
} else if (headers) {
delete headers['Content-Type']
}
}
return data
}
]
})
.then((res) => {
const d = res.data