From ec2d6ff7cd2eae96a8e1a0a52e5c2a1c737936a5 Mon Sep 17 00:00:00 2001 From: admin-lmm <2497833386@QQ.com> Date: Fri, 7 Jul 2023 14:39:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jsowell-ui/src/router/index.js | 2 +- .../financial/components/cleanFinancial.vue | 138 +++++++++------ .../financial/components/virtualFinance.vue | 159 ++++++++++++------ jsowell-ui/src/views/financial/merchant.vue | 41 +---- 4 files changed, 200 insertions(+), 140 deletions(-) diff --git a/jsowell-ui/src/router/index.js b/jsowell-ui/src/router/index.js index b57c4617a..481c601c0 100644 --- a/jsowell-ui/src/router/index.js +++ b/jsowell-ui/src/router/index.js @@ -172,7 +172,7 @@ export const constantRoutes = [ hidden: true, children: [ { - path: "merchantVirtual/:id", + path: "merchantVirtual", component: () => import("@/views/financial/components/virtualFinance"), name: "merchantVirtual", meta: { title: "虚拟财务",activeMenu: "/financial/merchant"}, diff --git a/jsowell-ui/src/views/financial/components/cleanFinancial.vue b/jsowell-ui/src/views/financial/components/cleanFinancial.vue index ba698956c..6d7767280 100644 --- a/jsowell-ui/src/views/financial/components/cleanFinancial.vue +++ b/jsowell-ui/src/views/financial/components/cleanFinancial.vue @@ -1,27 +1,48 @@ @@ -110,7 +109,7 @@ import {getMerchantOrderReport} from "@/api/adapayMember/adapayMember"; import Template from "@/views/billing/template"; import {getMerchantOrderList} from "@/api/order/order"; - +import { getDay } from "@/utils/common"; export default { dicts: ["order_status"], components: {Template}, @@ -125,7 +124,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, - merchantId: '', + merchantId: this.$route.query.merchantId, startTime: '', endTime: '', orderCode: null, @@ -137,11 +136,9 @@ export default { }; }, async created() { - console.log("this.$route", this.$route); - this.merchantId = this.$route.query.merchantId; - console.log("merchantId", this.merchantId) + await this.defaultDate() this.getList(); - this.getMerchantOrderList(); + this.getOrderList(); }, methods: { getList() { @@ -162,22 +159,51 @@ export default { ); }, - getMerchantOrderList() { + getOrderList() { const param = { merchantId: this.merchantId, - startTime: "2023-01-01" + startTime: "2023-01-01", + pageNum: this.queryParams.pageNum, + pageSize: this.queryParams.pageSize, } console.log("param", param) - getMerchantOrderList(param).then((response) => { + getMerchantOrderList(this.queryParams).then((response) => { console.log("getMerchantOrderList", response) this.merchantOrderList = response.rows; this.total = response.total; }) - } + }, + handleQuery() { + let arr = this.createTimeRange[0] + let str = this.createTimeRange[1] + this.queryParams.startTime = arr + this.queryParams.endTime = str + this.queryParams.pageNum = 1; + this.getList(); + this.getOrderList(); + }, + defaultDate() { + //字符串拼接,开始时间,结束时间 + let beg = getDay(-7); //当月第一天 + let end = getDay(0); //当天 + this.createTimeRange = [beg, end]; //将值设置给插件绑定的数据 + // return this.createTimeRange; + this.queryParams.startTime = beg + this.queryParams.endTime = end + }, + } } - diff --git a/jsowell-ui/src/views/financial/components/virtualFinance.vue b/jsowell-ui/src/views/financial/components/virtualFinance.vue index 23122a991..f3afc9fbb 100644 --- a/jsowell-ui/src/views/financial/components/virtualFinance.vue +++ b/jsowell-ui/src/views/financial/components/virtualFinance.vue @@ -1,7 +1,7 @@ @@ -182,4 +247,4 @@ export default { // margin-left: 40%; // margin-top: 0px; // margin-bottom: 15px; - \ No newline at end of file + diff --git a/jsowell-ui/src/views/financial/merchant.vue b/jsowell-ui/src/views/financial/merchant.vue index ed621fe4a..41e24318c 100644 --- a/jsowell-ui/src/views/financial/merchant.vue +++ b/jsowell-ui/src/views/financial/merchant.vue @@ -150,10 +150,10 @@ prop="address" label="操作" align="center"> -