1
This commit is contained in:
@@ -169,11 +169,33 @@ export function delJDOrder(ids) {
|
||||
})
|
||||
}
|
||||
|
||||
/** 导入跟团返现 Excel(multipart,不用统一 request 以免 Content-Type 覆盖) */
|
||||
// 后返表上传记录列表
|
||||
export function listGroupRebateExcelUploads(query) {
|
||||
return request({
|
||||
url: '/system/jdorder/groupRebateUpload/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/** 导入跟团返现 Excel(multipart) */
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user