diff --git a/src/api/system/jdorder.js b/src/api/system/jdorder.js index abb7ec6..6adf66f 100644 --- a/src/api/system/jdorder.js +++ b/src/api/system/jdorder.js @@ -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 diff --git a/src/views/system/jdorder/orderList.vue b/src/views/system/jdorder/orderList.vue index e1dc63a..d28dd55 100644 --- a/src/views/system/jdorder/orderList.vue +++ b/src/views/system/jdorder/orderList.vue @@ -131,6 +131,7 @@ 反向同步第三方单号 批量复制录单格式 导入后返表 + 后返上传记录 批量复制后返录表 四川商贸录表 @@ -914,11 +915,57 @@ + + + + + + + + + + + + + + + + + + + + + + + +