|
@@ -121,7 +121,7 @@
|
|
:size="searchSize"
|
|
:size="searchSize"
|
|
type="primary"
|
|
type="primary"
|
|
style="float: right; margin-left: 5px"
|
|
style="float: right; margin-left: 5px"
|
|
- @click="downloadInvoice"
|
|
|
|
|
|
+ @click="download"
|
|
>
|
|
>
|
|
下载发票数据
|
|
下载发票数据
|
|
</el-button>
|
|
</el-button>
|
|
@@ -172,7 +172,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<template #demandOrder="{ scope }">{{
|
|
<template #demandOrder="{ scope }">{{
|
|
- scope.row.platformsettle.reqCode
|
|
|
|
|
|
+ scope.row.platformsettle ? scope.row.platformsettle.reqCode : ""
|
|
}}</template>
|
|
}}</template>
|
|
|
|
|
|
<template #status="{ scope }">
|
|
<template #status="{ scope }">
|
|
@@ -212,6 +212,7 @@ import { listCol, statusList } from "./columns";
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
import { invoiceTypeList } from '@/assets/js/statusList';
|
|
import { invoiceTypeList } from '@/assets/js/statusList';
|
|
import InvoiceModal from "./components/invoice-modal.vue"
|
|
import InvoiceModal from "./components/invoice-modal.vue"
|
|
|
|
+import urlConfig from "@/apis/url-config";
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -250,6 +251,8 @@ export default {
|
|
selected:[],
|
|
selected:[],
|
|
select: "1",
|
|
select: "1",
|
|
s_input: "",
|
|
s_input: "",
|
|
|
|
+ //全局url
|
|
|
|
+ fileUrl: urlConfig.baseURL,
|
|
invoiceTypeList,
|
|
invoiceTypeList,
|
|
customerCode: [], //客户公司code
|
|
customerCode: [], //客户公司code
|
|
statusList,
|
|
statusList,
|
|
@@ -325,6 +328,55 @@ export default {
|
|
if(code !== 1) return
|
|
if(code !== 1) return
|
|
this.visible = false
|
|
this.visible = false
|
|
this.searchList()
|
|
this.searchList()
|
|
|
|
+ },
|
|
|
|
+ async download() {
|
|
|
|
+ let model = JSON.parse(JSON.stringify(this.parmValue));
|
|
|
|
+ if (!this.loading) {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ let httpType = `aplication/zip`;
|
|
|
|
+ axios({
|
|
|
|
+ method: "post",
|
|
|
|
+ url: this.fileUrl + "admin/invoiceInfo/invoiceDown",
|
|
|
|
+ responseType: "blob",
|
|
|
|
+ data: model,
|
|
|
|
+ headers: {
|
|
|
|
+ // 'Content-Type': 'multipart/form-data',
|
|
|
|
+ // Accept: "application/vnd.ms-excel"
|
|
|
|
+ Accept: httpType,
|
|
|
|
+ },
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ if (res && res.status == 200 && res.data) {
|
|
|
|
+ let url = window.URL.createObjectURL(
|
|
|
|
+ new Blob([res.data], {
|
|
|
|
+ type: httpType,
|
|
|
|
+ })
|
|
|
|
+ );
|
|
|
|
+ let link = document.createElement("a");
|
|
|
|
+ link.style.display = "none";
|
|
|
|
+ link.href = url;
|
|
|
|
+ let excelName = "发票数据.xlsx";
|
|
|
|
+ link.setAttribute("download", excelName);
|
|
|
|
+ document.body.appendChild(link);
|
|
|
|
+ link.click();
|
|
|
|
+ link.remove();
|
|
|
|
+ window.URL.revokeObjectURL(url); //释放掉blob对象
|
|
|
|
+ this.$message.success(`导出成功!`);
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ }, 500);
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(res.data.message);
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ }, 500);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch((error) => {
|
|
|
|
+ console.log(error);
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
},
|
|
},
|
|
onBatchApprovalInvoice(){
|
|
onBatchApprovalInvoice(){
|
|
if(this.selected.length === 0){
|
|
if(this.selected.length === 0){
|