Commit d0faa4d9 by zhouzy

sn输入验证

1 parent c019fef7
......@@ -43,7 +43,9 @@ function listRequisitionMemberCard(params) {
function getMemberCardDetail(params) {
return GlAxios.get(`${path}/getMemberCardDetail`,{ params })
}
function exportMemberCardByBatchId(params) {
return GlAxios.post(`${path}/exportMemberCardByBatchId`,params, { headers: { 'Content-Type': 'application/json; charset=utf-8' }, requestType: 'jsonString'})
}
export {
// getdetailsMemberInfo,
......@@ -56,5 +58,6 @@ export {
listMemberBatch,
listMemberCard,
listRequisitionMemberCard,
getMemberCardDetail
getMemberCardDetail,
exportMemberCardByBatchId
}
......@@ -29,15 +29,22 @@ const common = {
if (!response) {
return
};
let url = window.URL.createObjectURL(new Blob([response.data], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
}));
let link = document.createElement('a');
link.style.display = 'none';
link.href = url;
link.setAttribute('download', options.fileName || 'excel.xlsx');
document.body.appendChild(link);
link.click();
console.log(response)
let a = document.createElement('a')
let blob = new Blob([response.data], { type: "application/vnd.ms-excel" })
let objectUrl = URL.createObjectURL(blob)
a.setAttribute("href", objectUrl)
a.setAttribute("download", '订单信息.xls')
a.click()
// let url = window.URL.createObjectURL(new Blob([response.data], {
// type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
// }));
// let link = document.createElement('a');
// link.style.display = 'none';
// link.href = url;
// link.setAttribute('download', options.fileName || 'excel.xlsx');
// document.body.appendChild(link);
// link.click();
if (options.success) {
(options.success)();
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!