xyvcard-settle 0.0.41 → 0.0.42

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.
Files changed (30) hide show
  1. package/dist/{history-CKm40RN0.mjs → history-Bjxjxy_1.mjs} +1 -1
  2. package/dist/{history-Djpk-wxw.mjs → history-CyGeajMX.mjs} +1 -1
  3. package/dist/history.vue_vue_type_script_setup_true_lang-DzyW9ohx.mjs +378 -0
  4. package/dist/{history.vue_vue_type_script_setup_true_lang-BlBHinps.mjs → history.vue_vue_type_script_setup_true_lang-dd7Qrf3A.mjs} +111 -127
  5. package/dist/{index-GI8dQtIV.mjs → index-BA1OfmNb.mjs} +1 -1
  6. package/dist/{index-Ce1JIAp_.mjs → index-BMj5XmMX.mjs} +266 -282
  7. package/dist/{index-DISA5kjA.mjs → index-BpcmzxBU.mjs} +55 -53
  8. package/dist/{index-QIqV4ldo.mjs → index-C-A0Y3EK.mjs} +143 -159
  9. package/dist/index-C6Tt7EGW.mjs +726 -0
  10. package/dist/index-CGyzqfPx.mjs +541 -0
  11. package/dist/index-Doq8ZiUn.mjs +136 -0
  12. package/dist/{index-BAU8_bL5.mjs → index-DsTHP6ez.mjs} +66 -64
  13. package/dist/{index-TLbN5F_1.mjs → index-I-KFULpq.mjs} +425 -422
  14. package/dist/{index-uB6SZpRm.mjs → index-vIbGxvHd.mjs} +2 -2
  15. package/dist/index-x556wvD_.mjs +588 -0
  16. package/dist/index.mjs +1 -1
  17. package/dist/pay-BK10dbR-.mjs +121 -0
  18. package/dist/payPal-C5Hhq3pQ.mjs +118 -0
  19. package/dist/style.css +1 -1
  20. package/dist/{today-BBWMuUFc.mjs → today-DYd5N03E.mjs} +1 -1
  21. package/dist/{today.vue_vue_type_script_setup_true_lang-CmzDkIbs.mjs → today.vue_vue_type_script_setup_true_lang-D2JX696c.mjs} +8 -8
  22. package/dts/src/utils/timePlugin.d.ts +1 -0
  23. package/package.json +3 -3
  24. package/dist/history.vue_vue_type_script_setup_true_lang-DuKstKV7.mjs +0 -458
  25. package/dist/index-BOYpCJFd.mjs +0 -756
  26. package/dist/index-CAOauGAU.mjs +0 -605
  27. package/dist/index-Che5xN0z.mjs +0 -603
  28. package/dist/index-RBvZYqWi.mjs +0 -134
  29. package/dist/pay-ddopuD-7.mjs +0 -98
  30. package/dist/payPal-Bp_Ivr7P.mjs +0 -110
@@ -0,0 +1,121 @@
1
+ import { defineComponent as y, ref as u, onMounted as h, onUnmounted as x, createElementBlock as _, openBlock as g } from "vue";
2
+ import { i as D } from "./index--_Po9Tig.mjs";
3
+ import { D as l } from "./index-V8g7-RWq.mjs";
4
+ import { s as b } from "./index-eUhFgNKx.mjs";
5
+ import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
6
+ const z = /* @__PURE__ */ y({
7
+ __name: "pay",
8
+ setup(S) {
9
+ l.merchantBizDict.useValues();
10
+ const i = u();
11
+ let e = null, o = null;
12
+ const c = u([]), d = () => {
13
+ const n = /* @__PURE__ */ new Date(), r = /* @__PURE__ */ new Date();
14
+ r.setDate(n.getDate() - 6);
15
+ const a = (s) => s.toISOString().split("T")[0];
16
+ return {
17
+ analysisTimeStart: a(r),
18
+ analysisTimeEnd: a(n)
19
+ };
20
+ }, p = () => {
21
+ i.value && (e = D(i.value));
22
+ }, f = () => {
23
+ if (!e) return;
24
+ const n = Math.max(...c.value.map((t) => t.value)), r = Math.ceil(n * 1.2), s = {
25
+ tooltip: {
26
+ trigger: "axis",
27
+ formatter: (t) => `${t[0].name}<br/>交易金额: ¥${t[0].value.toLocaleString()}`
28
+ },
29
+ grid: {
30
+ left: "1%",
31
+ right: "5%",
32
+ top: "0",
33
+ containLabel: !0
34
+ },
35
+ yAxis: {
36
+ type: "category",
37
+ inverse: !0,
38
+ data: c.value.map((t) => t.name),
39
+ axisLabel: {
40
+ formatter: (t) => t.replace(/(.{10})/g, `$1
41
+ `)
42
+ }
43
+ },
44
+ xAxis: {
45
+ type: "value",
46
+ min: 0,
47
+ max: r,
48
+ axisLabel: {
49
+ show: !0,
50
+ // 确保显示X轴标签
51
+ formatter: (t) => `¥${t}`
52
+ },
53
+ splitLine: {
54
+ lineStyle: {
55
+ type: "dashed"
56
+ }
57
+ }
58
+ },
59
+ series: [
60
+ {
61
+ data: c.value.map((t) => t.value),
62
+ // 调整柱子宽度
63
+ barWidth: 40,
64
+ label: {
65
+ show: !1
66
+ // 不展示文字
67
+ },
68
+ itemStyle: {
69
+ color: "#FF8C00"
70
+ // 柱状图的颜色为蓝色
71
+ },
72
+ type: "bar"
73
+ // 图表类型为柱状图
74
+ }
75
+ ]
76
+ };
77
+ e.setOption(s);
78
+ }, v = async () => {
79
+ try {
80
+ await l.merchantBizDict.useValues();
81
+ const n = d(), r = await b.orderAmount({
82
+ analysisTimeStart: n.analysisTimeStart,
83
+ analysisTimeEnd: n.analysisTimeEnd
84
+ });
85
+ c.value = r.data.results.filter((a) => a.merchantId && a.orderAmount).map((a) => ({
86
+ name: l.merchantBizDict.getValue(a.merchantId),
87
+ value: parseFloat(a.orderAmount)
88
+ })).sort((a, s) => s.value - a.value).slice(0, 4), f(), setTimeout(() => {
89
+ e && e.resize();
90
+ }, 0);
91
+ } catch (n) {
92
+ console.error("获取数据失败:", n), e && e.setOption({
93
+ title: {
94
+ text: "数据加载失败",
95
+ left: "center",
96
+ top: "center",
97
+ textStyle: {
98
+ color: "#999"
99
+ }
100
+ }
101
+ });
102
+ }
103
+ }, m = () => {
104
+ e && e.resize();
105
+ };
106
+ return h(() => {
107
+ p(), v(), window.addEventListener("resize", m), i.value && (o = new ResizeObserver(() => {
108
+ e && e.resize();
109
+ }), o.observe(i.value));
110
+ }), x(() => {
111
+ window.removeEventListener("resize", m), o && o.disconnect(), e && e.dispose();
112
+ }), (n, r) => (g(), _("div", {
113
+ ref_key: "container",
114
+ ref: i,
115
+ class: "chart-container"
116
+ }, null, 512));
117
+ }
118
+ }), B = /* @__PURE__ */ w(z, [["__scopeId", "data-v-ce4b01cd"]]);
119
+ export {
120
+ B as default
121
+ };
@@ -0,0 +1,118 @@
1
+ import { defineComponent as y, ref as u, onMounted as g, onBeforeUnmount as v, createElementBlock as _, openBlock as w } from "vue";
2
+ import { i as h } from "./index--_Po9Tig.mjs";
3
+ import { s as D } from "./index-eUhFgNKx.mjs";
4
+ import { D as S } from "./index-V8g7-RWq.mjs";
5
+ import { C as E } from "./constant-CtDv38CM.mjs";
6
+ import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
7
+ const C = /* @__PURE__ */ y({
8
+ __name: "payPal",
9
+ setup(L) {
10
+ const i = u();
11
+ let t = null;
12
+ const s = u([]), p = () => {
13
+ const e = /* @__PURE__ */ new Date(), o = /* @__PURE__ */ new Date();
14
+ o.setDate(e.getDate() - 6);
15
+ const a = (r) => r.toISOString().split("T")[0];
16
+ return {
17
+ analysisTimeStart: a(o),
18
+ analysisTimeEnd: a(e)
19
+ };
20
+ }, m = () => ({
21
+ tooltip: {
22
+ trigger: "item",
23
+ position: function(e) {
24
+ return [e[0] + 10, e[1] - 30];
25
+ },
26
+ formatter: (e) => `${e.name}: ¥${e.data.amount} (${e.percent}%)<br/>
27
+ 订单数: ${e.data.count}`
28
+ },
29
+ legend: {
30
+ orient: "vertical",
31
+ right: 40,
32
+ top: "middle",
33
+ data: s.value.map((e) => e.name),
34
+ formatter: (e) => {
35
+ const o = s.value.find((a) => a.name === e);
36
+ return `${e} ${o == null ? void 0 : o.value}%`;
37
+ },
38
+ textStyle: {
39
+ fontSize: 12
40
+ }
41
+ },
42
+ series: [
43
+ {
44
+ type: "pie",
45
+ radius: ["40%", "70%"],
46
+ avoidLabelOverlap: !1,
47
+ label: {
48
+ show: !1,
49
+ position: "center"
50
+ },
51
+ emphasis: {
52
+ label: {
53
+ show: !0,
54
+ fontSize: 12,
55
+ fontWeight: "bold",
56
+ formatter: `{b}
57
+ {c}% ({d}%)`
58
+ }
59
+ },
60
+ labelLine: { show: !1 },
61
+ data: s.value
62
+ }
63
+ ]
64
+ }), c = async () => {
65
+ var e, o;
66
+ try {
67
+ const a = p(), r = await D.payModel({
68
+ analysisTimeStart: a.analysisTimeStart,
69
+ analysisTimeEnd: a.analysisTimeEnd
70
+ });
71
+ if (!((o = (e = r.data) == null ? void 0 : e.results) != null && o.length))
72
+ throw new Error("暂无数据");
73
+ const d = r.data.results.reduce(
74
+ (n, l) => n + parseFloat(l.orderAmount || 0),
75
+ 0
76
+ );
77
+ s.value = r.data.results.map((n) => {
78
+ const l = S.payModeBizDict.getEnumValue(n.payMode) || n.payMode, f = d > 0 ? (parseFloat(n.orderAmount) / d * 100).toFixed(2) : 0;
79
+ return {
80
+ value: parseFloat(f),
81
+ name: l,
82
+ amount: n.orderAmount,
83
+ count: n.orderCount,
84
+ itemStyle: {
85
+ color: E.PAYMENT_COLORS[n.payMode]
86
+ }
87
+ };
88
+ }), t == null || t.setOption(m());
89
+ } catch {
90
+ t == null || t.setOption({
91
+ title: {
92
+ text: "暂无数据",
93
+ left: "center",
94
+ top: "center"
95
+ }
96
+ });
97
+ }
98
+ };
99
+ return g(async () => {
100
+ if (!i.value)
101
+ return;
102
+ t = h(i.value), t.showLoading(), await c(), t.hideLoading();
103
+ const e = () => {
104
+ t == null || t.resize();
105
+ };
106
+ window.addEventListener("resize", e), e();
107
+ }), v(() => {
108
+ window.removeEventListener("resize", () => t == null ? void 0 : t.resize()), t == null || t.dispose();
109
+ }), (e, o) => (w(), _("div", {
110
+ ref_key: "chartContainer",
111
+ ref: i,
112
+ class: "chart-container"
113
+ }, null, 512));
114
+ }
115
+ }), $ = /* @__PURE__ */ z(C, [["__scopeId", "data-v-98642cc6"]]);
116
+ export {
117
+ $ as default
118
+ };