Commit 4cae58b1 authored by 张恒's avatar 张恒

封装应收账款请求接口

parent fbcf17e2
......@@ -20,3 +20,16 @@ export const userLogin = (username, pass, captchaSign, verificationcode, captcha
}
}, 'POST');
// 应收账款汇总
export const arSummaryBar = () => fetch("/api/query/dash_board/action/get_ar_summary_bar", {}, "POST")
// 应收账款列表
export const arCompanyList = () => fetch("/api/query/dash_board/action/get_ar_company_list", {}, "POST")
// 应收账款(结算单位)
export const arCompanyBar = () => fetch("/api/query/dash_board/action/get_ar_company_bar", {}, "POST")
// 应收账款(开票月份)
export const arMonthlyBar = () => fetch("/api/query/dash_board/action/get_ar_monthly_bar", {}, "POST")
// 结算单位 应收账款(开票月份)
export const arCompanyMonthlyBar = (company) => fetch("/api/query/dash_board/action/get_ar_company_monthly_bar", {aux: {company: company}}, "POST")
// 开票月份 应收账款(结算单位)
export const arMonthlyCompanyBar = (month) => fetch("/api/query/dash_board/action/get_ar_monthly_company_bar", {aux: {month: month}}, "POST")
......@@ -4,6 +4,7 @@
<script>
import * as echarts from "echarts";
import {arCompanyBar} from "../../../api/apiList";
export default {
name: "ArCompanyBar",
......@@ -112,11 +113,8 @@ export default {
},
mounted() {
// 获取图表数据
window.axios.post("/api/query/dash_board/action/get_ar_company_bar", {
headers: {'content-type': 'application/json'}
}).then(res => {
arCompanyBar().then(res => {
let data = res.data.data
console.log("arCompanyBar", data)
let xAxisData = []
let seriesData = []
for (let item of data) {
......
......@@ -4,6 +4,7 @@
<script>
import * as echarts from "echarts";
import {arCompanyMonthlyBar} from "../../../api/apiList";
export default {
name: "ArCompanyMonthlyBar",
......@@ -118,12 +119,9 @@ export default {
}
this.barChart.title.text = company + " 已开票未收款(开票月份)"
// 获取图表数据
window.axios.post("/api/query/dash_board/action/get_ar_company_monthly_bar", {
headers: {'content-type': 'application/json'},
aux: {company: company},
}).then(res => {
arCompanyMonthlyBar(company).then(res => {
let data = res.data.data
console.log("arCompanyMonthlyBar", data)
let xAxisData = []
let seriesData0 = []
let seriesData1 = []
......
......@@ -4,6 +4,7 @@
<script>
import * as echarts from "echarts";
import {arMonthlyBar} from "../../../api/apiList";
export default {
name: "ArMonthlyBar",
......@@ -107,11 +108,8 @@ export default {
},
mounted() {
// 获取图表数据
window.axios.post("/api/query/dash_board/action/get_ar_monthly_bar", {
headers: {'content-type': 'application/json'}
}).then(res => {
arMonthlyBar().then(res => {
let data = res.data.data
console.log("arMonthlyBar", data)
let xAxisData = []
let seriesData = []
for (let item of data) {
......
......@@ -4,6 +4,7 @@
<script>
import * as echarts from "echarts";
import {arMonthlyCompanyBar} from "../../../api/apiList";
export default {
name: "ArMonthlyCompanyBar",
......@@ -104,12 +105,8 @@ export default {
}
this.barChart.title.text = month + " 已开票未收款(结算单位)"
// 获取图表数据
window.axios.post("/api/query/dash_board/action/get_ar_monthly_company_bar", {
headers: {'content-type': 'application/json'},
aux: {month: month},
}).then(res => {
arMonthlyCompanyBar(month).then(res => {
let data = res.data.data
console.log("arMonthlyCompanyBar", data)
let xAxisData = []
let seriesData = []
for (let item of data) {
......
......@@ -53,6 +53,7 @@ import ContrastCard from "./components/card/contrast-card.vue";
import SimpleCard from "./components/card/simple-card.vue";
import ArSummaryBar from "./components/chart/ar-summary-bar.vue";
import WinnersList from "./components/card/winners-list.vue";
import {arSummaryBar, arCompanyList} from "../api/apiList"
export default {
components: {
......@@ -81,9 +82,7 @@ export default {
},
// 获取应收账款数据
getArSummaryBar() {
window.axios.post("/api/query/dash_board/action/get_ar_summary_bar", {
headers: {'content-type': 'application/json'}
}).then(res => {
arSummaryBar().then(res => {
let data = res.data.data
let seriesData = []
seriesData.push(data.unsettled_amount)
......@@ -98,9 +97,7 @@ export default {
},
// 获取已开票未收款排行
getArCompanyList() {
window.axios.post("/api/query/dash_board/action/get_ar_company_list", {
headers: {'content-type': 'application/json'},
}).then(res => {
arCompanyList().then(res => {
if (res.data.data.length) {
this.arCompanyList = res.data.data
}
......
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