Commit b2b82715 authored by huhaiqing's avatar huhaiqing

提交批量下载

parent cdd9eca0
......@@ -190,6 +190,7 @@ export function getBillService(params) {
export function zipDownload(params) {
return request({
url: "/shipment/make-bill-of-lading/zipDownload",
responseType: "arraybuffer",
method: "get",
params,
});
......
......@@ -91,9 +91,10 @@ import {
deleteBillService,
zipDownload,
} from "@/api/ecw/box";
import { getTotlContent, getCapacity, serviceMsg } from "../shippingSea/utils";
import { getTotlContent, getCapacity } from "../shippingSea/utils";
import makeLadingBill from "./makeLadingBill.vue";
import previewBill from "./previewBill.vue";
import FileSaver from "file-saver";
export default {
name: "ladingBill",
......@@ -196,7 +197,8 @@ export default {
},
clickZipDownload() {
zipDownload({ shipmentId: this.shipmentObj.id }).then((res) => {
serviceMsg(res);
let blob = new Blob([res], { type: "application/zip" });
FileSaver.saveAs(blob, "打包文件.zip");
});
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment