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

封装应收账款请求接口

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