|
|
@@ -36,7 +36,10 @@
|
|
|
>应收金额导出明细</a-button
|
|
|
>
|
|
|
<a-button type="primary" style="margin-left: 10px;" @click="payAmountExcel"
|
|
|
- >利润分析实付金额</a-button
|
|
|
+ >实付金额明细导出</a-button
|
|
|
+ >
|
|
|
+ <a-button type="primary" style="margin-left: 10px;" @click="payableAmountExcel"
|
|
|
+ >应付金额明细导出</a-button
|
|
|
>
|
|
|
</div>
|
|
|
<standard-table
|
|
|
@@ -119,6 +122,7 @@
|
|
|
|
|
|
<script>
|
|
|
import StandardTable from "@/components/table/StandardTable";
|
|
|
+import {payableAmountExcel} from "../../services/profit";
|
|
|
// import mixin from "../../minins/mixin";
|
|
|
const columns = [
|
|
|
{
|
|
|
@@ -138,21 +142,34 @@ const columns = [
|
|
|
},
|
|
|
{
|
|
|
title: "应付",
|
|
|
-
|
|
|
- // scopedSlots: { customRender: "qutationCount" },
|
|
|
- children: [
|
|
|
- {
|
|
|
- title: "实付",
|
|
|
- dataIndex: "paid",
|
|
|
- // scopedSlots: { customRender: "count" },
|
|
|
- },
|
|
|
- {
|
|
|
- title: "未付",
|
|
|
- dataIndex: "unpaid",
|
|
|
- // scopedSlots: { customRender: "count" },
|
|
|
- },
|
|
|
- ],
|
|
|
+ dataIndex: "meet",
|
|
|
},
|
|
|
+ {
|
|
|
+ title: "实付",
|
|
|
+ dataIndex: "paid",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "未付",
|
|
|
+ dataIndex: "unpaid",
|
|
|
+ },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // title: "应付",
|
|
|
+ //
|
|
|
+ // // scopedSlots: { customRender: "qutationCount" },
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // title: "实付",
|
|
|
+ // dataIndex: "paid",
|
|
|
+ // // scopedSlots: { customRender: "count" },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: "未付",
|
|
|
+ // dataIndex: "unpaid",
|
|
|
+ // // scopedSlots: { customRender: "count" },
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
{
|
|
|
title: "毛利润",
|
|
|
dataIndex: "grossProfit",
|
|
|
@@ -315,7 +332,31 @@ export default {
|
|
|
: new Date().getFullYear(),
|
|
|
}).then(res=>{
|
|
|
if (res.data.code == 200) {
|
|
|
+ console.log(url)
|
|
|
+ let url = this.process + res.data.data; // 3.创建一个临时的url指向blob对象
|
|
|
+ let a = document.createElement("a");
|
|
|
+ a.href = url;
|
|
|
+ a.download = "导出文件.xlsx";
|
|
|
+ a.click();
|
|
|
+ window.URL.revokeObjectURL(url);
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ payableAmountExcel(){
|
|
|
+ this.$API.profit.payableAmountExcel({
|
|
|
+ dateType: this.formState.dateType,
|
|
|
+ year:
|
|
|
+ this.time != ""
|
|
|
+ ? this.time._d.getFullYear()
|
|
|
+ : new Date().getFullYear(),
|
|
|
+ }).then(res=>{
|
|
|
+ if (res.data.code == 200) {
|
|
|
+
|
|
|
let url = this.process + res.data.data; // 3.创建一个临时的url指向blob对象
|
|
|
+ console.log(url)
|
|
|
let a = document.createElement("a");
|
|
|
a.href = url;
|
|
|
a.download = "导出文件.xlsx";
|