|
@@ -2,6 +2,8 @@
|
|
|
<script>
|
|
|
import { TableColumns, SearchColumns, TabColumns, SelectColumns } from "./column";
|
|
|
import orderApi from "@/api/business/purchase/purchase-order";
|
|
|
+import {saveAs} from "file-saver";
|
|
|
+import { blobValidate } from "@/utils/ruoyi";
|
|
|
import {
|
|
|
initPage,
|
|
|
initParams,
|
|
@@ -99,7 +101,26 @@ export default {
|
|
|
|
|
|
async handleDownload(){
|
|
|
console.log(this.params,'条件');
|
|
|
- this.download('/pu/order/export', this.params, `采购订单维护${new Date().getTime()}.xlsx`);
|
|
|
+ this.download('/pu/order/export', {...this.params}, `采购订单维护${new Date().getTime()}.xlsx`);
|
|
|
+ // try {
|
|
|
+ // this.loading = true;
|
|
|
+
|
|
|
+ // orderApi.orderExport({...this.params}).then(res=>{
|
|
|
+
|
|
|
+ // const isBlob = blobValidate(res);
|
|
|
+ // if (isBlob) {
|
|
|
+ // const blob = new Blob([res]);
|
|
|
+ // saveAs(blob, `采购订单维护${new Date().getTime()}.xlsx`);
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+ // })
|
|
|
+
|
|
|
+ // } catch (error) {
|
|
|
+
|
|
|
+ // }finally{
|
|
|
+ // this.loading = false;
|
|
|
+ // }
|
|
|
},
|
|
|
async jumpFlow(row){
|
|
|
const {name} = this.$store.state.user;
|