xyvcard-settle 0.0.43 → 0.0.45
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-Bjxjxy_1.mjs → history-B3jtcAZ7.mjs} +1 -1
- package/dist/{history-CyGeajMX.mjs → history-DCwgJuDo.mjs} +1 -1
- package/dist/{history.vue_vue_type_script_setup_true_lang-DzyW9ohx.mjs → history.vue_vue_type_script_setup_true_lang-BoqPcTMS.mjs} +134 -147
- package/dist/{history.vue_vue_type_script_setup_true_lang-dd7Qrf3A.mjs → history.vue_vue_type_script_setup_true_lang-DO3kL3x0.mjs} +74 -73
- package/dist/{index-vIbGxvHd.mjs → index-B8Y2esGZ.mjs} +2 -2
- package/dist/{index-x556wvD_.mjs → index-BJDG5RJu.mjs} +214 -228
- package/dist/{index-Csk-TNBj.mjs → index-BOrI7JtW.mjs} +2 -2
- package/dist/{index-BA1OfmNb.mjs → index-BVMo8bBb.mjs} +2 -2
- package/dist/index-CGc-CaEO.mjs +91 -0
- package/dist/{index-BpcmzxBU.mjs → index-CWRtxckQ.mjs} +3 -3
- package/dist/{index-C-A0Y3EK.mjs → index-ClDxB7Ty.mjs} +47 -51
- package/dist/{index-CGyzqfPx.mjs → index-DSAnrTJ1.mjs} +210 -222
- package/dist/{index-DsTHP6ez.mjs → index-DcjjaDUk.mjs} +46 -46
- package/dist/{index-I-KFULpq.mjs → index-NpIRi2wB.mjs} +414 -413
- package/dist/index-VaOtKTy8.mjs +713 -0
- package/dist/index-pv0_vmcX.mjs +129 -0
- package/dist/{index-BMj5XmMX.mjs → index-yQjjxDcA.mjs} +232 -244
- package/dist/index-yz18Lhpm.mjs +113 -0
- package/dist/index.mjs +1 -1
- package/dist/merchant-D9rtENQd.mjs +32 -0
- package/dist/{merchant-BENZD2R4.mjs → merchant-u4dNCa0T.mjs} +1 -1
- package/dist/{merchant.vue_vue_type_script_setup_true_lang-BH_Fe-pn.mjs → merchant.vue_vue_type_script_setup_true_lang-CvB7L7G7.mjs} +2 -2
- package/dist/pay-CZR9oAkw.mjs +126 -0
- package/dist/pay-fu3fGrJB.mjs +106 -0
- package/dist/{payPal-C5Hhq3pQ.mjs → payPal-3RoPmLkF.mjs} +20 -21
- package/dist/{payPal-Bfu4en0b.mjs → payPal-Cm1ZmJdL.mjs} +7 -8
- package/dist/{sale-Cki0rZ6-.mjs → sale-CuEqsPD7.mjs} +1 -1
- package/dist/{sale.vue_vue_type_script_setup_true_lang-C1gJAEgg.mjs → sale.vue_vue_type_script_setup_true_lang-DXUIMGjh.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{today-DFnsrdAZ.mjs → today-CLfowatL.mjs} +1 -1
- package/dist/{today-DYd5N03E.mjs → today-eDeS0zsk.mjs} +1 -1
- package/dist/{today.vue_vue_type_script_setup_true_lang-Cf3MjsXi.mjs → today.vue_vue_type_script_setup_true_lang-Bq4NCLzD.mjs} +74 -73
- package/dist/{today.vue_vue_type_script_setup_true_lang-D2JX696c.mjs → today.vue_vue_type_script_setup_true_lang-CBon7bqw.mjs} +116 -129
- package/dist/{trend-3ibJo3lK.mjs → trend-XEzpdsLj.mjs} +1 -1
- package/dts/src/api/settle/agent.d.ts +15 -0
- package/dts/src/api/settle/merchant.d.ts +9 -0
- package/package.json +3 -3
- package/dist/constant-CtDv38CM.mjs +0 -24
- package/dist/index-C6Tt7EGW.mjs +0 -726
- package/dist/index-D9OMutL6.mjs +0 -64
- package/dist/index-Doq8ZiUn.mjs +0 -136
- package/dist/index-V8g7-RWq.mjs +0 -95
- package/dist/pay-BK10dbR-.mjs +0 -121
- package/dist/pay-D04R69xf.mjs +0 -101
- package/dist/tokenExt-SHK5rrb5.mjs +0 -31
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var l = (a, s, i) => s in a ? p(a, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[s] = i;
|
|
3
|
+
var e = (a, s, i) => l(a, typeof s != "symbol" ? s + "" : s, i);
|
|
4
|
+
import { BizLayDict as y, BizDict as E, EnumDict as u } from "jmash-core";
|
|
5
|
+
import { infoApi as D } from "xyvcard-agent";
|
|
6
|
+
import { institutionApi as d } from "xyvcard-insts";
|
|
7
|
+
import { merchantsApi as _ } from "xyvcard-merchant";
|
|
8
|
+
class t {
|
|
9
|
+
}
|
|
10
|
+
//模块
|
|
11
|
+
e(t, "PAYMENT_DICT", "payment"), // 时间格式 RFC-年月日时分
|
|
12
|
+
e(t, "RPC_FORMAT_TIME", "YYYY-MM-DDTHH:mm:ssZ"), // 时间格式 RFC-年月日时分
|
|
13
|
+
e(t, "RPC_FORMAT_DATA", "YYYY-MM-DD"), // 支付方式
|
|
14
|
+
e(t, "PAY_MODE", "xyvcard.payment.protobuf.PayMode"), // 交易类型
|
|
15
|
+
e(t, "TRADE_TYPE", "xyvcard.payment.protobuf.PayTradeType"), // 支付状态
|
|
16
|
+
e(t, "ORDER_STATUS", "xyvcard.payment.protobuf.PayOrderStatus"), // 支付状态
|
|
17
|
+
e(t, "TRADE_STATUS", "xyvcard.payment.protobuf.PayTradeStatus"), // 支付状态
|
|
18
|
+
e(t, "AGENT_AGREE", "AGENT_AGREE"), // 支付方式颜色
|
|
19
|
+
e(t, "PAYMENT_COLORS", {
|
|
20
|
+
WECHAT: "#3DDEC1",
|
|
21
|
+
ALIPAY: "#F79AE3",
|
|
22
|
+
UQRCODEPAY: "#F8A3A3",
|
|
23
|
+
BALANCE: "#FBD564",
|
|
24
|
+
NUCSPAY: "#C36433"
|
|
25
|
+
}), e(t, "MCHT_CHAIN_HEAD", "MCHT_CHAIN_HEAD"), e(t, "MCHT_CHAIN_BRANCH", "MCHT_CHAIN_BRANCH");
|
|
26
|
+
function h(a, s, i) {
|
|
27
|
+
return !Array.isArray(a) || a.length === 0 ? [] : a.map((r) => {
|
|
28
|
+
let A = [];
|
|
29
|
+
return Array.isArray(r.children) && r.children.length > 0 && (A = h(r.children, s, i)), {
|
|
30
|
+
value: r[i],
|
|
31
|
+
label: r[s],
|
|
32
|
+
parentId: r.parentId,
|
|
33
|
+
children: A
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
class T extends y {
|
|
38
|
+
// 实现 useValues 方法
|
|
39
|
+
useValues() {
|
|
40
|
+
return new Promise((s, i) => {
|
|
41
|
+
this.query.approved = t.AGENT_AGREE, this.query.hasApproved = !0, D.findList(this.query).then(({ data: n }) => {
|
|
42
|
+
this.values.length = 0, this.values.push(
|
|
43
|
+
...h(n.results, "agentAlias", "agentCode")
|
|
44
|
+
), s(this.values);
|
|
45
|
+
}).catch(i);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
class m extends E {
|
|
50
|
+
// 实现 useValues 方法
|
|
51
|
+
useValues() {
|
|
52
|
+
return new Promise((s, i) => {
|
|
53
|
+
d.findList(this.query).then(({ data: n }) => {
|
|
54
|
+
const r = n.results;
|
|
55
|
+
this.values.length = 0, this.values.push(
|
|
56
|
+
...r.map(
|
|
57
|
+
(A) => ({
|
|
58
|
+
key: A.instsId,
|
|
59
|
+
value: A.instsName
|
|
60
|
+
})
|
|
61
|
+
)
|
|
62
|
+
), s(this.values);
|
|
63
|
+
}).catch(i);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
class o extends E {
|
|
68
|
+
// 实现 useValues 方法
|
|
69
|
+
useValues() {
|
|
70
|
+
return new Promise((s, i) => {
|
|
71
|
+
_.findList(this.query).then(({ data: n }) => {
|
|
72
|
+
const r = n.results;
|
|
73
|
+
this.values.length = 0, this.values.push(
|
|
74
|
+
...r.map(
|
|
75
|
+
(A) => ({
|
|
76
|
+
key: A.merchantId,
|
|
77
|
+
value: A.merchantName
|
|
78
|
+
})
|
|
79
|
+
)
|
|
80
|
+
), s(this.values);
|
|
81
|
+
}).catch(i);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
class c {
|
|
86
|
+
}
|
|
87
|
+
// 代理商
|
|
88
|
+
e(c, "agentBizDict", new T({})), // 审核通过的代理商
|
|
89
|
+
e(c, "agentAgreeBizDict", new T({
|
|
90
|
+
approved: t.AGENT_AGREE
|
|
91
|
+
})), // 落地机构
|
|
92
|
+
e(c, "instsBizDict", new m({})), // 商户名称
|
|
93
|
+
e(c, "merchantBizDict", new o({})), // 支付方式
|
|
94
|
+
e(c, "payModeBizDict", new u(
|
|
95
|
+
t.PAYMENT_DICT,
|
|
96
|
+
t.PAY_MODE
|
|
97
|
+
)), // 交易类型
|
|
98
|
+
e(c, "tradeTypeBizDict", new u(
|
|
99
|
+
t.PAYMENT_DICT,
|
|
100
|
+
t.TRADE_TYPE
|
|
101
|
+
)), // 订单状态
|
|
102
|
+
e(c, "orderStatusBizDict", new u(
|
|
103
|
+
t.PAYMENT_DICT,
|
|
104
|
+
t.ORDER_STATUS
|
|
105
|
+
)), // 交易状态
|
|
106
|
+
e(c, "tradeStatusBizDict", new u(
|
|
107
|
+
t.PAYMENT_DICT,
|
|
108
|
+
t.TRADE_STATUS
|
|
109
|
+
));
|
|
110
|
+
export {
|
|
111
|
+
t as C,
|
|
112
|
+
c as D
|
|
113
|
+
};
|
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
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as d, ref as u, resolveComponent as i, createBlock as f, openBlock as a, withCtx as t, createVNode as n, createElementBlock as r, toDisplayString as l, createElementVNode as m, createCommentVNode as h, unref as k, createTextVNode as y } from "vue";
|
|
2
2
|
import { _ as g, a as b, b as N } from "./three-BE8B3lbG.mjs";
|
|
3
3
|
import { tokenExt as x } from "xyvcard-agent";
|
|
4
|
-
import { s as B } from "./index-
|
|
4
|
+
import { s as B } from "./index-CGc-CaEO.mjs";
|
|
5
5
|
import { useUserStore as E } from "jmash-core";
|
|
6
6
|
import { getUserDisplayName as w } from "xyvcard-merchant";
|
|
7
7
|
const C = {
|
|
@@ -61,7 +61,7 @@ const C = {
|
|
|
61
61
|
align: "right"
|
|
62
62
|
}, {
|
|
63
63
|
header: t(() => o[2] || (o[2] = [
|
|
64
|
-
m("span", { style: { color: "#f5782d" } }, "
|
|
64
|
+
m("span", { style: { color: "#f5782d" } }, "商户", -1)
|
|
65
65
|
])),
|
|
66
66
|
default: t(({ row: e }) => [
|
|
67
67
|
y(l(e.merchantNum) + "家", 1)
|
|
@@ -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
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { defineComponent as y, ref as u, onMounted as g, onBeforeUnmount as v, createElementBlock as _, openBlock as w } from "vue";
|
|
2
2
|
import { i as h } from "./index--_Po9Tig.mjs";
|
|
3
3
|
import { s as D } from "./index-eUhFgNKx.mjs";
|
|
4
|
-
import { D as S } from "./index-
|
|
5
|
-
import { C as E } from "./constant-CtDv38CM.mjs";
|
|
4
|
+
import { D as S, C as E } from "./index-yz18Lhpm.mjs";
|
|
6
5
|
import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
7
6
|
const C = /* @__PURE__ */ y({
|
|
8
7
|
__name: "payPal",
|
|
@@ -10,14 +9,14 @@ const C = /* @__PURE__ */ y({
|
|
|
10
9
|
const i = u();
|
|
11
10
|
let t = null;
|
|
12
11
|
const s = u([]), p = () => {
|
|
13
|
-
const e = /* @__PURE__ */ new Date(),
|
|
14
|
-
|
|
15
|
-
const
|
|
12
|
+
const e = /* @__PURE__ */ new Date(), a = /* @__PURE__ */ new Date();
|
|
13
|
+
a.setDate(e.getDate() - 6);
|
|
14
|
+
const o = (r) => r.toISOString().split("T")[0];
|
|
16
15
|
return {
|
|
17
|
-
analysisTimeStart: a
|
|
18
|
-
analysisTimeEnd:
|
|
16
|
+
analysisTimeStart: o(a),
|
|
17
|
+
analysisTimeEnd: o(e)
|
|
19
18
|
};
|
|
20
|
-
},
|
|
19
|
+
}, c = () => ({
|
|
21
20
|
tooltip: {
|
|
22
21
|
trigger: "item",
|
|
23
22
|
position: function(e) {
|
|
@@ -32,8 +31,8 @@ const C = /* @__PURE__ */ y({
|
|
|
32
31
|
top: "middle",
|
|
33
32
|
data: s.value.map((e) => e.name),
|
|
34
33
|
formatter: (e) => {
|
|
35
|
-
const
|
|
36
|
-
return `${e} ${
|
|
34
|
+
const a = s.value.find((o) => o.name === e);
|
|
35
|
+
return `${e} ${a == null ? void 0 : a.value}%`;
|
|
37
36
|
},
|
|
38
37
|
textStyle: {
|
|
39
38
|
fontSize: 12
|
|
@@ -61,14 +60,14 @@ const C = /* @__PURE__ */ y({
|
|
|
61
60
|
data: s.value
|
|
62
61
|
}
|
|
63
62
|
]
|
|
64
|
-
}),
|
|
65
|
-
var e,
|
|
63
|
+
}), m = async () => {
|
|
64
|
+
var e, a;
|
|
66
65
|
try {
|
|
67
|
-
const
|
|
68
|
-
analysisTimeStart:
|
|
69
|
-
analysisTimeEnd:
|
|
66
|
+
const o = p(), r = await D.payModel({
|
|
67
|
+
analysisTimeStart: o.analysisTimeStart,
|
|
68
|
+
analysisTimeEnd: o.analysisTimeEnd
|
|
70
69
|
});
|
|
71
|
-
if (!((
|
|
70
|
+
if (!((a = (e = r.data) == null ? void 0 : e.results) != null && a.length))
|
|
72
71
|
throw new Error("暂无数据");
|
|
73
72
|
const d = r.data.results.reduce(
|
|
74
73
|
(n, l) => n + parseFloat(l.orderAmount || 0),
|
|
@@ -85,7 +84,7 @@ const C = /* @__PURE__ */ y({
|
|
|
85
84
|
color: E.PAYMENT_COLORS[n.payMode]
|
|
86
85
|
}
|
|
87
86
|
};
|
|
88
|
-
}), t == null || t.setOption(
|
|
87
|
+
}), t == null || t.setOption(c());
|
|
89
88
|
} catch {
|
|
90
89
|
t == null || t.setOption({
|
|
91
90
|
title: {
|
|
@@ -99,20 +98,20 @@ const C = /* @__PURE__ */ y({
|
|
|
99
98
|
return g(async () => {
|
|
100
99
|
if (!i.value)
|
|
101
100
|
return;
|
|
102
|
-
t = h(i.value), t.showLoading(), await
|
|
101
|
+
t = h(i.value), t.showLoading(), await m(), t.hideLoading();
|
|
103
102
|
const e = () => {
|
|
104
103
|
t == null || t.resize();
|
|
105
104
|
};
|
|
106
105
|
window.addEventListener("resize", e), e();
|
|
107
106
|
}), v(() => {
|
|
108
107
|
window.removeEventListener("resize", () => t == null ? void 0 : t.resize()), t == null || t.dispose();
|
|
109
|
-
}), (e,
|
|
108
|
+
}), (e, a) => (w(), _("div", {
|
|
110
109
|
ref_key: "chartContainer",
|
|
111
110
|
ref: i,
|
|
112
111
|
class: "chart-container"
|
|
113
112
|
}, null, 512));
|
|
114
113
|
}
|
|
115
|
-
}),
|
|
114
|
+
}), A = /* @__PURE__ */ z(C, [["__scopeId", "data-v-98642cc6"]]);
|
|
116
115
|
export {
|
|
117
|
-
|
|
116
|
+
A as default
|
|
118
117
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, ref as d, onMounted as m, onBeforeUnmount as v, createElementBlock as y, openBlock as _ } from "vue";
|
|
2
2
|
import { i as b } from "./index--_Po9Tig.mjs";
|
|
3
|
-
import { s as g } from "./index-
|
|
4
|
-
import { D as h } from "./index-
|
|
5
|
-
import { C as w } from "./constant-CtDv38CM.mjs";
|
|
3
|
+
import { s as g } from "./index-CGc-CaEO.mjs";
|
|
4
|
+
import { D as h, C as w } from "./index-yz18Lhpm.mjs";
|
|
6
5
|
import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
7
|
-
const C = /* @__PURE__ */
|
|
6
|
+
const C = /* @__PURE__ */ c({
|
|
8
7
|
__name: "payPal",
|
|
9
8
|
setup(S) {
|
|
10
9
|
const i = d();
|
|
@@ -94,7 +93,7 @@ const C = /* @__PURE__ */ m({
|
|
|
94
93
|
});
|
|
95
94
|
}
|
|
96
95
|
};
|
|
97
|
-
return
|
|
96
|
+
return m(async () => {
|
|
98
97
|
if (!i.value) return;
|
|
99
98
|
e = b(i.value), e.showLoading(), await p(), e.hideLoading();
|
|
100
99
|
const t = () => e == null ? void 0 : e.resize();
|
|
@@ -107,7 +106,7 @@ const C = /* @__PURE__ */ m({
|
|
|
107
106
|
class: "chart-container"
|
|
108
107
|
}, null, 512));
|
|
109
108
|
}
|
|
110
|
-
}),
|
|
109
|
+
}), O = /* @__PURE__ */ z(C, [["__scopeId", "data-v-15ebef5f"]]);
|
|
111
110
|
export {
|
|
112
|
-
|
|
111
|
+
O as default
|
|
113
112
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as c, ref as u, resolveComponent as d, createBlock as f, openBlock as a, withCtx as t, createVNode as r, createElementBlock as s, toDisplayString as n, createElementVNode as m, createCommentVNode as y, unref as h, createTextVNode as k } from "vue";
|
|
2
2
|
import { _ as b, a as g, b as N } from "./three-BE8B3lbG.mjs";
|
|
3
3
|
import { getUserDisplayName as B } from "xyvcard-merchant";
|
|
4
|
-
import { s as C } from "./index-
|
|
4
|
+
import { s as C } from "./index-CGc-CaEO.mjs";
|
|
5
5
|
const V = {
|
|
6
6
|
key: 0,
|
|
7
7
|
src: b,
|