xyvcard-settle 0.0.44 → 0.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-R-Ml-XTA.mjs +32 -0
- package/dist/{history-BAkRg2pq.mjs → history-DCwgJuDo.mjs} +1 -1
- package/dist/{history-Dn1bbCcI.mjs → history-DwIGzL72.mjs} +1 -1
- package/dist/{history.vue_vue_type_script_setup_true_lang-CgrLgBqg.mjs → history.vue_vue_type_script_setup_true_lang-DO3kL3x0.mjs} +26 -26
- package/dist/{history.vue_vue_type_script_setup_true_lang-Dl65zcTa.mjs → history.vue_vue_type_script_setup_true_lang-DVGITvdY.mjs} +36 -36
- package/dist/{index-CaaOEjHM.mjs → index-B65gCM1w.mjs} +2 -2
- package/dist/{index-oJY5i5R_.mjs → index-B8Y2esGZ.mjs} +2 -2
- package/dist/{index-vF1PDwWz.mjs → index-BJDG5RJu.mjs} +34 -33
- package/dist/index-BSjUBqhl.mjs +725 -0
- package/dist/{index-A0dvO46M.mjs → index-BpX-ZCaL.mjs} +463 -461
- package/dist/{index-CbEHaatk.mjs → index-CWRtxckQ.mjs} +1 -1
- package/dist/{index-BTCLMpHR.mjs → index-ClDxB7Ty.mjs} +39 -39
- package/dist/{index-DsEuGxTJ.mjs → index-DSAnrTJ1.mjs} +36 -35
- package/dist/{index-DzN2x713.mjs → index-DcjjaDUk.mjs} +1 -1
- package/dist/{index-CE4_NZLb.mjs → index-UPAK9M6D.mjs} +1 -1
- package/dist/{index-Dp6vdCsP.mjs → index-d-nHEHMj.mjs} +228 -217
- package/dist/{index-BRU67qDa.mjs → index-yQjjxDcA.mjs} +34 -33
- package/dist/index.mjs +1 -1
- package/dist/merchant-D9rtENQd.mjs +32 -0
- package/dist/pay-CZR9oAkw.mjs +126 -0
- package/dist/pay-fu3fGrJB.mjs +106 -0
- package/dist/style.css +1 -1
- package/dist/{today-C1jwQmNs.mjs → today-CLfowatL.mjs} +1 -1
- package/dist/{today-ZrG0UNrv.mjs → today-eDeS0zsk.mjs} +1 -1
- package/dist/{today.vue_vue_type_script_setup_true_lang-BPQu6Gke.mjs → today.vue_vue_type_script_setup_true_lang-Bq4NCLzD.mjs} +1 -1
- package/dist/{today.vue_vue_type_script_setup_true_lang-CZqnx44q.mjs → today.vue_vue_type_script_setup_true_lang-CBon7bqw.mjs} +1 -1
- package/dts/src/api/settle/agent.d.ts +4 -4
- package/dts/src/api/settle/history-pay-trade/index.d.ts +8 -0
- package/dts/src/api/settle/history-pay-trade/types.d.ts +83 -0
- package/dts/src/api/settle/merchant.d.ts +9 -0
- package/dts/src/lang/settle/zh-cn.d.ts +2 -0
- package/dts/src/views/payment/history-pay-trade/index.vue.d.ts +2 -0
- package/package.json +2 -2
- package/dist/agent-BXhE-jbg.mjs +0 -32
- package/dist/pay-CvwrYB4j.mjs +0 -121
- package/dist/pay-Db-UEae3.mjs +0 -101
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { defineComponent as G, getCurrentInstance as J, ref as R, onActivated as X, resolveComponent as f, createElementBlock as Z, openBlock as S, createElementVNode as T, createVNode as t, withCtx as a, withKeys as v, unref as l, createBlock as c, createCommentVNode as z, withDirectives as x, vShow as q, createTextVNode as n, toDisplayString as u, isRef as B } from "vue";
|
|
2
2
|
import { useI18n as ee } from "vue-i18n";
|
|
3
3
|
import { useRoute as te } from "vue-router";
|
|
4
|
-
import { useUserStore as
|
|
4
|
+
import { useUserStore as A, clearEmpty as ae, request as le, useTableHooks as oe } from "jmash-core";
|
|
5
5
|
import { D as y } from "./index-yz18Lhpm.mjs";
|
|
6
|
-
import { g as re } from "./agent-
|
|
6
|
+
import { g as re } from "./agent-R-Ml-XTA.mjs";
|
|
7
7
|
import { tokenExt as de } from "xyvcard-agent";
|
|
8
8
|
import { DateRange as ne } from "xyvcard-insts";
|
|
9
|
-
|
|
9
|
+
import { g as se } from "./merchant-D9rtENQd.mjs";
|
|
10
|
+
class ue {
|
|
10
11
|
getKey(p) {
|
|
11
12
|
return {
|
|
12
13
|
billId: p.billId
|
|
@@ -14,7 +15,7 @@ class se {
|
|
|
14
15
|
}
|
|
15
16
|
// 查询翻页信息支付订单
|
|
16
17
|
findPage(p) {
|
|
17
|
-
const D =
|
|
18
|
+
const D = A().user.tenant;
|
|
18
19
|
return p && (p.hasOrderStatus = p.orderStatus !== void 0, p.hasBillsStatus = p.billsStatus !== void 0, p.hasTradeType = p.tradeType !== void 0, p.hasPayMode = p.payMode !== void 0, p.hasTradeStatus = p.tradeStatus !== void 0), ae(p), le({
|
|
19
20
|
url: "/v1/payment/trade/my/page/" + D,
|
|
20
21
|
method: "get",
|
|
@@ -22,14 +23,14 @@ class se {
|
|
|
22
23
|
});
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
const
|
|
26
|
+
const pe = new ue(), me = { class: "app-container" }, ie = { class: "search-container" }, ye = { class: "total-num" }, be = { class: "blue_color" }, fe = { class: "blue_color" }, Te = { class: "blue_color" }, ve = { class: "blue_color" }, ge = { class: "blue_color" }, we = { class: "blue_color" }, Ce = { class: "blue_color" }, Ve = { class: "blue_color" }, Re = /* @__PURE__ */ G({
|
|
26
27
|
__name: "index",
|
|
27
|
-
setup(
|
|
28
|
+
setup(U) {
|
|
28
29
|
y.instsBizDict.useValues(), y.merchantBizDict.useValues(), y.agentBizDict.useValues();
|
|
29
30
|
const { t: p } = ee(), { proxy: D } = J(), I = te(), M = I.query.tenant, r = R({
|
|
30
31
|
agentCode: I.query.agentCode,
|
|
31
32
|
merchantId: I.query.merchantId,
|
|
32
|
-
tokenExt: de.getTokenExt(
|
|
33
|
+
tokenExt: de.getTokenExt(A().user.tenant)
|
|
33
34
|
}), {
|
|
34
35
|
tableHooks: m,
|
|
35
36
|
multipleTableRef: P,
|
|
@@ -37,7 +38,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
37
38
|
listLoading: K,
|
|
38
39
|
tableData: Q,
|
|
39
40
|
total: $
|
|
40
|
-
} = oe(p,
|
|
41
|
+
} = oe(p, pe, r);
|
|
41
42
|
let g = m.totalRecord, N = R([
|
|
42
43
|
// 序号
|
|
43
44
|
{
|
|
@@ -194,9 +195,9 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
194
195
|
return X(() => {
|
|
195
196
|
m.getList();
|
|
196
197
|
}), (d, e) => {
|
|
197
|
-
const k = f("el-input"), b = f("el-form-item"), s = f("el-col"),
|
|
198
|
-
return S(), Z("div",
|
|
199
|
-
T("div",
|
|
198
|
+
const k = f("el-input"), b = f("el-form-item"), s = f("el-col"), C = f("jmash-select"), V = f("el-row"), _ = f("el-tree-select"), h = f("el-button"), H = f("el-form"), L = f("jmash-column-select"), O = f("jmash-table"), F = f("jmash-pagination"), W = f("el-card");
|
|
199
|
+
return S(), Z("div", me, [
|
|
200
|
+
T("div", ie, [
|
|
200
201
|
t(H, {
|
|
201
202
|
ref_key: "queryFormRef",
|
|
202
203
|
ref: Y,
|
|
@@ -205,7 +206,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
205
206
|
"label-width": "6em"
|
|
206
207
|
}, {
|
|
207
208
|
default: a(() => [
|
|
208
|
-
t(
|
|
209
|
+
t(V, null, {
|
|
209
210
|
default: a(() => [
|
|
210
211
|
t(s, { span: 6 }, {
|
|
211
212
|
default: a(() => [
|
|
@@ -234,7 +235,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
234
235
|
prop: "merchantId"
|
|
235
236
|
}, {
|
|
236
237
|
default: a(() => [
|
|
237
|
-
t(
|
|
238
|
+
t(C, {
|
|
238
239
|
modelValue: r.value.merchantId,
|
|
239
240
|
"onUpdate:modelValue": e[2] || (e[2] = (o) => r.value.merchantId = o),
|
|
240
241
|
placeholder: d.$t("payTrade.merchantIdRead"),
|
|
@@ -277,7 +278,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
277
278
|
prop: "payMode"
|
|
278
279
|
}, {
|
|
279
280
|
default: a(() => [
|
|
280
|
-
t(
|
|
281
|
+
t(C, {
|
|
281
282
|
modelValue: r.value.payMode,
|
|
282
283
|
"onUpdate:modelValue": e[6] || (e[6] = (o) => r.value.payMode = o),
|
|
283
284
|
placeholder: d.$t("payTrade.payModeRead"),
|
|
@@ -296,7 +297,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
296
297
|
]),
|
|
297
298
|
_: 1
|
|
298
299
|
}),
|
|
299
|
-
t(
|
|
300
|
+
t(V, null, {
|
|
300
301
|
default: a(() => {
|
|
301
302
|
var o;
|
|
302
303
|
return [
|
|
@@ -307,7 +308,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
307
308
|
prop: "tradeType"
|
|
308
309
|
}, {
|
|
309
310
|
default: a(() => [
|
|
310
|
-
t(
|
|
311
|
+
t(C, {
|
|
311
312
|
modelValue: r.value.tradeType,
|
|
312
313
|
"onUpdate:modelValue": e[8] || (e[8] = (i) => r.value.tradeType = i),
|
|
313
314
|
placeholder: d.$t("payTrade.tradeTypeRead"),
|
|
@@ -330,7 +331,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
330
331
|
prop: "instsId"
|
|
331
332
|
}, {
|
|
332
333
|
default: a(() => [
|
|
333
|
-
t(
|
|
334
|
+
t(C, {
|
|
334
335
|
modelValue: r.value.instsId,
|
|
335
336
|
"onUpdate:modelValue": e[10] || (e[10] = (i) => r.value.instsId = i),
|
|
336
337
|
placeholder: d.$t("payTrade.instsIdRead"),
|
|
@@ -376,7 +377,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
376
377
|
prop: "orderStatus"
|
|
377
378
|
}, {
|
|
378
379
|
default: a(() => [
|
|
379
|
-
t(
|
|
380
|
+
t(C, {
|
|
380
381
|
modelValue: r.value.tradeStatus,
|
|
381
382
|
"onUpdate:modelValue": e[15] || (e[15] = (i) => r.value.tradeStatus = i),
|
|
382
383
|
placeholder: d.$t("payTrade.tradeStatusRead"),
|
|
@@ -420,7 +421,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
420
421
|
}),
|
|
421
422
|
_: 1
|
|
422
423
|
}),
|
|
423
|
-
t(
|
|
424
|
+
t(V, null, {
|
|
424
425
|
default: a(() => {
|
|
425
426
|
var o, i;
|
|
426
427
|
return [
|
|
@@ -434,7 +435,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
434
435
|
prop: "tradeStatus"
|
|
435
436
|
}, {
|
|
436
437
|
default: a(() => [
|
|
437
|
-
t(
|
|
438
|
+
t(C, {
|
|
438
439
|
modelValue: r.value.tradeStatus,
|
|
439
440
|
"onUpdate:modelValue": e[17] || (e[17] = (w) => r.value.tradeStatus = w),
|
|
440
441
|
placeholder: d.$t("payTrade.tradeStatusRead"),
|
|
@@ -520,7 +521,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
520
521
|
class: "table-container"
|
|
521
522
|
}, {
|
|
522
523
|
header: a(() => [
|
|
523
|
-
t(
|
|
524
|
+
t(V, null, {
|
|
524
525
|
default: a(() => [
|
|
525
526
|
t(s, {
|
|
526
527
|
span: 24,
|
|
@@ -552,13 +553,13 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
552
553
|
}, null, 8, ["total", "current-page", "page-size"])) : z("", !0)
|
|
553
554
|
]),
|
|
554
555
|
default: a(() => [
|
|
555
|
-
T("div",
|
|
556
|
-
t(
|
|
556
|
+
T("div", ye, [
|
|
557
|
+
t(V, { gutter: 20 }, {
|
|
557
558
|
default: a(() => [
|
|
558
559
|
t(s, { span: 5 }, {
|
|
559
560
|
default: a(() => [
|
|
560
561
|
e[29] || (e[29] = n(" 订单笔数: ")),
|
|
561
|
-
T("span",
|
|
562
|
+
T("span", be, u(l(g).totalSize), 1),
|
|
562
563
|
e[30] || (e[30] = n(" 笔 "))
|
|
563
564
|
]),
|
|
564
565
|
_: 1
|
|
@@ -566,7 +567,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
566
567
|
t(s, { span: 5 }, {
|
|
567
568
|
default: a(() => [
|
|
568
569
|
e[31] || (e[31] = n(" 订单金额: ")),
|
|
569
|
-
T("span",
|
|
570
|
+
T("span", fe, u(l(g).totalAmount), 1),
|
|
570
571
|
e[32] || (e[32] = n(" 元 "))
|
|
571
572
|
]),
|
|
572
573
|
_: 1
|
|
@@ -574,7 +575,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
574
575
|
t(s, { span: 5 }, {
|
|
575
576
|
default: a(() => [
|
|
576
577
|
e[33] || (e[33] = n(" 优惠金额: ")),
|
|
577
|
-
T("span",
|
|
578
|
+
T("span", Te, u(l(g).discountAmount), 1),
|
|
578
579
|
e[34] || (e[34] = n(" 元 "))
|
|
579
580
|
]),
|
|
580
581
|
_: 1
|
|
@@ -582,7 +583,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
582
583
|
t(s, { span: 5 }, {
|
|
583
584
|
default: a(() => [
|
|
584
585
|
e[35] || (e[35] = n(" 交易金额: ")),
|
|
585
|
-
T("span",
|
|
586
|
+
T("span", ve, u(l(g).tradeAmount), 1),
|
|
586
587
|
e[36] || (e[36] = n(" 元 "))
|
|
587
588
|
]),
|
|
588
589
|
_: 1
|
|
@@ -590,7 +591,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
590
591
|
]),
|
|
591
592
|
_: 1
|
|
592
593
|
}),
|
|
593
|
-
t(
|
|
594
|
+
t(V, {
|
|
594
595
|
gutter: 20,
|
|
595
596
|
style: { "margin-top": "10px" }
|
|
596
597
|
}, {
|
|
@@ -598,7 +599,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
598
599
|
t(s, { span: 5 }, {
|
|
599
600
|
default: a(() => [
|
|
600
601
|
e[37] || (e[37] = n(" 收款笔数: ")),
|
|
601
|
-
T("span",
|
|
602
|
+
T("span", ge, u(l(g).paidOrder), 1),
|
|
602
603
|
e[38] || (e[38] = n(" 笔 "))
|
|
603
604
|
]),
|
|
604
605
|
_: 1
|
|
@@ -606,7 +607,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
606
607
|
t(s, { span: 5 }, {
|
|
607
608
|
default: a(() => [
|
|
608
609
|
e[39] || (e[39] = n(" 收款金额: ")),
|
|
609
|
-
T("span",
|
|
610
|
+
T("span", we, u(l(g).paidAmount), 1),
|
|
610
611
|
e[40] || (e[40] = n(" 元 "))
|
|
611
612
|
]),
|
|
612
613
|
_: 1
|
|
@@ -614,7 +615,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
614
615
|
t(s, { span: 5 }, {
|
|
615
616
|
default: a(() => [
|
|
616
617
|
e[41] || (e[41] = n(" 退款笔数: ")),
|
|
617
|
-
T("span",
|
|
618
|
+
T("span", Ce, u(l(g).refundOrder), 1),
|
|
618
619
|
e[42] || (e[42] = n(" 笔 "))
|
|
619
620
|
]),
|
|
620
621
|
_: 1
|
|
@@ -658,7 +659,7 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
658
659
|
n(u(l(y).payModeBizDict.getEnumValue(o.data.row.payMode)), 1)
|
|
659
660
|
]),
|
|
660
661
|
merchantId: a((o) => [
|
|
661
|
-
n(u(l(
|
|
662
|
+
n(u(l(se)(o.data.row.merchantId)), 1)
|
|
662
663
|
]),
|
|
663
664
|
createTime: a((o) => [
|
|
664
665
|
n(u(l(D).$moment.formatDate(
|
|
@@ -679,5 +680,5 @@ const ue = new se(), pe = { class: "app-container" }, me = { class: "search-cont
|
|
|
679
680
|
}
|
|
680
681
|
});
|
|
681
682
|
export {
|
|
682
|
-
|
|
683
|
+
Re as default
|
|
683
684
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var i = (s, e, r) => e in s ? a(s, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[e] = r;
|
|
3
|
+
var n = (s, e, r) => i(s, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { reactive as t } from "vue";
|
|
5
|
+
import { merchantsApi as f } from "xyvcard-merchant";
|
|
6
|
+
class u {
|
|
7
|
+
constructor() {
|
|
8
|
+
// 用户信息缓存
|
|
9
|
+
n(this, "userInfoMap", /* @__PURE__ */ new Map());
|
|
10
|
+
// 默认用户信息
|
|
11
|
+
n(this, "defauleUserInfo", t({}));
|
|
12
|
+
}
|
|
13
|
+
// 获取用户信息
|
|
14
|
+
userInfo(e) {
|
|
15
|
+
if (e == null || e === "")
|
|
16
|
+
return this.defauleUserInfo;
|
|
17
|
+
if (!this.userInfoMap.has(e)) {
|
|
18
|
+
const r = t({});
|
|
19
|
+
this.userInfoMap.set(e, r), f.findBusinessName({ merchantId: e }).then((o) => {
|
|
20
|
+
Object.assign(r, o.data);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return this.userInfoMap.get(e);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const p = new u();
|
|
27
|
+
function m(s) {
|
|
28
|
+
return p.userInfo(s).merchantName;
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
m as g
|
|
32
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { defineComponent as v, ref as m, onMounted as y, onUnmounted as h, createElementBlock as x, openBlock as _ } from "vue";
|
|
2
|
+
import { i as g } from "./index--_Po9Tig.mjs";
|
|
3
|
+
import { s as w } from "./index-eUhFgNKx.mjs";
|
|
4
|
+
import { merchantsApi as b } from "xyvcard-merchant";
|
|
5
|
+
import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
|
+
const z = /* @__PURE__ */ v({
|
|
7
|
+
__name: "pay",
|
|
8
|
+
setup(L) {
|
|
9
|
+
const o = m();
|
|
10
|
+
let e = null, l = null;
|
|
11
|
+
const i = m([]), u = () => {
|
|
12
|
+
const r = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
|
|
13
|
+
n.setDate(r.getDate() - 6);
|
|
14
|
+
const t = (s) => s.toISOString().split("T")[0];
|
|
15
|
+
return {
|
|
16
|
+
analysisTimeStart: t(n),
|
|
17
|
+
analysisTimeEnd: t(r)
|
|
18
|
+
};
|
|
19
|
+
}, d = () => {
|
|
20
|
+
o.value && (e = g(o.value));
|
|
21
|
+
}, p = () => {
|
|
22
|
+
if (!e) return;
|
|
23
|
+
const r = Math.max(...i.value.map((a) => a.value)), n = Math.ceil(r * 1.2), s = {
|
|
24
|
+
tooltip: {
|
|
25
|
+
trigger: "axis",
|
|
26
|
+
formatter: (a) => `${a[0].name}<br/>交易金额: ¥${a[0].value.toLocaleString()}`
|
|
27
|
+
},
|
|
28
|
+
grid: {
|
|
29
|
+
left: "1%",
|
|
30
|
+
right: "5%",
|
|
31
|
+
top: "0",
|
|
32
|
+
containLabel: !0
|
|
33
|
+
},
|
|
34
|
+
yAxis: {
|
|
35
|
+
type: "category",
|
|
36
|
+
inverse: !0,
|
|
37
|
+
data: i.value.map((a) => a.name),
|
|
38
|
+
axisLabel: {
|
|
39
|
+
formatter: (a) => a.replace(/(.{10})/g, `$1
|
|
40
|
+
`)
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
xAxis: {
|
|
44
|
+
type: "value",
|
|
45
|
+
min: 0,
|
|
46
|
+
max: n,
|
|
47
|
+
axisLabel: {
|
|
48
|
+
show: !0,
|
|
49
|
+
// 确保显示X轴标签
|
|
50
|
+
formatter: (a) => `¥${a}`
|
|
51
|
+
},
|
|
52
|
+
splitLine: {
|
|
53
|
+
lineStyle: {
|
|
54
|
+
type: "dashed"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
series: [
|
|
59
|
+
{
|
|
60
|
+
data: i.value.map((a) => a.value),
|
|
61
|
+
// 调整柱子宽度
|
|
62
|
+
barWidth: 40,
|
|
63
|
+
label: {
|
|
64
|
+
show: !1
|
|
65
|
+
// 不展示文字
|
|
66
|
+
},
|
|
67
|
+
itemStyle: {
|
|
68
|
+
color: "#FF8C00"
|
|
69
|
+
// 柱状图的颜色为蓝色
|
|
70
|
+
},
|
|
71
|
+
type: "bar"
|
|
72
|
+
// 图表类型为柱状图
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
};
|
|
76
|
+
e.setOption(s);
|
|
77
|
+
}, f = async () => {
|
|
78
|
+
try {
|
|
79
|
+
const r = u(), n = await w.orderAmount({
|
|
80
|
+
analysisTimeStart: r.analysisTimeStart,
|
|
81
|
+
analysisTimeEnd: r.analysisTimeEnd
|
|
82
|
+
});
|
|
83
|
+
for (let t = 0; t < n.data.results.length; t++)
|
|
84
|
+
if (n.data.results[t].merchantId && n.data.results[t].orderAmount) {
|
|
85
|
+
const { data: s } = await b.findBusinessName({
|
|
86
|
+
merchantId: n.data.results[t].merchantId
|
|
87
|
+
});
|
|
88
|
+
i.value.push({
|
|
89
|
+
name: s.merchantName,
|
|
90
|
+
value: parseFloat(n.data.results[t].orderAmount)
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
i.value = i.value.sort((t, s) => s.value - t.value).slice(0, 4), p(), setTimeout(() => {
|
|
94
|
+
e && e.resize();
|
|
95
|
+
}, 0);
|
|
96
|
+
} catch (r) {
|
|
97
|
+
console.error("获取数据失败:", r), e && e.setOption({
|
|
98
|
+
title: {
|
|
99
|
+
text: "数据加载失败",
|
|
100
|
+
left: "center",
|
|
101
|
+
top: "center",
|
|
102
|
+
textStyle: {
|
|
103
|
+
color: "#999"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}, c = () => {
|
|
109
|
+
e && e.resize();
|
|
110
|
+
};
|
|
111
|
+
return y(() => {
|
|
112
|
+
d(), f(), window.addEventListener("resize", c), o.value && (l = new ResizeObserver(() => {
|
|
113
|
+
e && e.resize();
|
|
114
|
+
}), l.observe(o.value));
|
|
115
|
+
}), h(() => {
|
|
116
|
+
window.removeEventListener("resize", c), l && l.disconnect(), e && e.dispose();
|
|
117
|
+
}), (r, n) => (_(), x("div", {
|
|
118
|
+
ref_key: "container",
|
|
119
|
+
ref: o,
|
|
120
|
+
class: "chart-container"
|
|
121
|
+
}, null, 512));
|
|
122
|
+
}
|
|
123
|
+
}), M = /* @__PURE__ */ S(z, [["__scopeId", "data-v-5f5fee83"]]);
|
|
124
|
+
export {
|
|
125
|
+
M as default
|
|
126
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { defineComponent as d, ref as l, onMounted as p, onUnmounted as f, createElementBlock as v, openBlock as h } from "vue";
|
|
2
|
+
import { s as _ } from "./index-CGc-CaEO.mjs";
|
|
3
|
+
import { i as y } from "./index--_Po9Tig.mjs";
|
|
4
|
+
import { merchantsApi as b } from "xyvcard-merchant";
|
|
5
|
+
import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
|
+
const x = /* @__PURE__ */ d({
|
|
7
|
+
__name: "pay",
|
|
8
|
+
setup(g) {
|
|
9
|
+
const r = l();
|
|
10
|
+
let t = null, s = null;
|
|
11
|
+
const n = l([]), c = () => {
|
|
12
|
+
r.value && (t = y(r.value));
|
|
13
|
+
}, u = () => {
|
|
14
|
+
if (!t) return;
|
|
15
|
+
const a = {
|
|
16
|
+
tooltip: {
|
|
17
|
+
trigger: "axis",
|
|
18
|
+
formatter: (e) => `${e[0].name}<br/>交易金额: ¥${e[0].value.toLocaleString()}`
|
|
19
|
+
},
|
|
20
|
+
grid: {
|
|
21
|
+
left: "0",
|
|
22
|
+
right: "5%",
|
|
23
|
+
top: "0",
|
|
24
|
+
containLabel: !0
|
|
25
|
+
},
|
|
26
|
+
yAxis: {
|
|
27
|
+
type: "category",
|
|
28
|
+
inverse: !0,
|
|
29
|
+
// 名称
|
|
30
|
+
data: n.value.map((e) => e.name),
|
|
31
|
+
axisLabel: {
|
|
32
|
+
formatter: (e) => e.replace(/(.{6})/g, `$1
|
|
33
|
+
`)
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
xAxis: {
|
|
37
|
+
type: "value",
|
|
38
|
+
interval: 2500,
|
|
39
|
+
axisLabel: {
|
|
40
|
+
show: !0,
|
|
41
|
+
// 确保显示X轴标签
|
|
42
|
+
formatter: (e) => `¥${e}`
|
|
43
|
+
},
|
|
44
|
+
splitLine: {
|
|
45
|
+
lineStyle: {
|
|
46
|
+
type: "dashed"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
series: [
|
|
51
|
+
{
|
|
52
|
+
data: n.value.map((e) => e.value),
|
|
53
|
+
// 调整柱子宽度
|
|
54
|
+
barWidth: 30,
|
|
55
|
+
label: {
|
|
56
|
+
show: !1
|
|
57
|
+
// 不展示文字
|
|
58
|
+
},
|
|
59
|
+
itemStyle: {
|
|
60
|
+
color: "#FF8C00"
|
|
61
|
+
// 柱状图的颜色为蓝色
|
|
62
|
+
},
|
|
63
|
+
type: "bar"
|
|
64
|
+
// 图表类型为柱状图
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
};
|
|
68
|
+
t.setOption(a);
|
|
69
|
+
}, m = async () => {
|
|
70
|
+
try {
|
|
71
|
+
const a = await _.orderAmount({});
|
|
72
|
+
for (let e = 0; e < a.data.results.length; e++)
|
|
73
|
+
if (a.data.results[e].merchantId && a.data.results[e].orderAmount) {
|
|
74
|
+
const { data: o } = await b.findBusinessName({
|
|
75
|
+
merchantId: a.data.results[e].merchantId
|
|
76
|
+
});
|
|
77
|
+
n.value.push({
|
|
78
|
+
name: o.merchantName,
|
|
79
|
+
value: parseFloat(a.data.results[e].orderAmount)
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
n.value = n.value.sort((e, o) => o.value - e.value).slice(0, 4), u(), setTimeout(() => {
|
|
83
|
+
t && t.resize();
|
|
84
|
+
}, 0);
|
|
85
|
+
} catch (a) {
|
|
86
|
+
console.error("暂无数据", a);
|
|
87
|
+
}
|
|
88
|
+
}, i = () => {
|
|
89
|
+
t && t.resize();
|
|
90
|
+
};
|
|
91
|
+
return p(() => {
|
|
92
|
+
c(), m(), window.addEventListener("resize", i), r.value && (s = new ResizeObserver(() => {
|
|
93
|
+
t && t.resize();
|
|
94
|
+
}), s.observe(r.value));
|
|
95
|
+
}), f(() => {
|
|
96
|
+
window.removeEventListener("resize", i), s && s.disconnect(), t && t.dispose();
|
|
97
|
+
}), (a, e) => (h(), v("div", {
|
|
98
|
+
ref_key: "container",
|
|
99
|
+
ref: r,
|
|
100
|
+
class: "chart-container"
|
|
101
|
+
}, null, 512));
|
|
102
|
+
}
|
|
103
|
+
}), $ = /* @__PURE__ */ w(x, [["__scopeId", "data-v-8367e071"]]);
|
|
104
|
+
export {
|
|
105
|
+
$ as default
|
|
106
|
+
};
|