xyvcard-settle 0.0.24 → 0.0.26
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/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/{history-C3l8NaI6.mjs → history-B-gHLBwh.mjs} +1 -1
- package/dist/{history-DQ0J8NCy.mjs → history-BLctAU0P.mjs} +1 -1
- package/dist/{history.vue_vue_type_script_setup_true_lang-DB8PERVD.mjs → history.vue_vue_type_script_setup_true_lang-Bov9wTh0.mjs} +2 -2
- package/dist/{history.vue_vue_type_script_setup_true_lang-B8FBizdu.mjs → history.vue_vue_type_script_setup_true_lang-CAnnJEfn.mjs} +5 -5
- package/dist/index--_Po9Tig.mjs +43858 -0
- package/dist/{index-C9xiSbGi.mjs → index-AgzuDVOr.mjs} +1 -1
- package/dist/index-BocAk8pD.mjs +176 -0
- package/dist/{index-Gj815brY.mjs → index-C2vMy8ik.mjs} +24 -24
- package/dist/index-CE3y-0QV.mjs +131 -0
- package/dist/{index-B1h4IWy4.mjs → index-CNAVEXHD.mjs} +2 -2
- package/dist/index-CU32So4f.mjs +2782 -0
- package/dist/{index-D0mKdcOp.mjs → index-Cg3fVoEi.mjs} +2 -2
- package/dist/index-CpuvJ4Tw.mjs +110 -0
- package/dist/index-DJtiZFc1.mjs +142 -0
- package/dist/index-DsIwC6AS.mjs +238 -0
- package/dist/{index--l5ns2E2.mjs → index-P-8jwHYX.mjs} +18 -18
- package/dist/{index-BwZZ71lS.mjs → index-YgHkUquv.mjs} +2 -2
- package/dist/{index-DsYV-De4.mjs → index-dcnBl8Xl.mjs} +1 -1
- package/dist/index-eUhFgNKx.mjs +45 -0
- package/dist/index-zsIaZMNT.mjs +63 -0
- package/dist/index.mjs +7 -2697
- package/dist/merchant-DLx9AYoM.mjs +4 -0
- package/dist/merchant.vue_vue_type_script_setup_true_lang-Bxb9bzqv.mjs +77 -0
- package/dist/pay-C08cbM_l.mjs +101 -0
- package/dist/pay-DW3Una4C.mjs +98 -0
- package/dist/payPal-D2I3WIqV.mjs +113 -0
- package/dist/payPal-nXPX-3pm.mjs +109 -0
- package/dist/sale-BR1khQTm.mjs +4 -0
- package/dist/sale.vue_vue_type_script_setup_true_lang-W8968hkL.mjs +77 -0
- package/dist/style.css +1 -1
- package/dist/three-BE8B3lbG.mjs +6 -0
- package/dist/{today-DK4xzzKV.mjs → today-r_ikFBLS.mjs} +1 -1
- package/dist/{today-DX1djaLC.mjs → today-t0-6m3Qr.mjs} +1 -1
- package/dist/{today.vue_vue_type_script_setup_true_lang-BBSo18Bt.mjs → today.vue_vue_type_script_setup_true_lang-BzhCmlc2.mjs} +7 -7
- package/dist/{today.vue_vue_type_script_setup_true_lang-C7uvcmd6.mjs → today.vue_vue_type_script_setup_true_lang-DsmG2Z4w.mjs} +10 -10
- package/dist/tokenExt-SHK5rrb5.mjs +31 -0
- package/dist/trend-BOA_Pwtn.mjs +200 -0
- package/dist/trend-D8pStiQ5.mjs +171 -0
- package/dist/trend-pbYAF-aS.mjs +172 -0
- package/dts/src/api/settle/agent-settle/index.d.ts +13 -0
- package/dts/src/api/settle/agent-settle/types.d.ts +48 -0
- package/dts/src/api/settle/insts-settle/index.d.ts +11 -0
- package/dts/src/api/settle/insts-settle/types.d.ts +32 -0
- package/dts/src/api/settle/mcht-homePage/index.d.ts +9 -0
- package/dts/src/api/settle/mcht-homePage/types.d.ts +34 -0
- package/dts/src/api/settle/settle-trade-merchant/types.d.ts +1 -1
- package/dts/src/constant.d.ts +8 -0
- package/dts/src/index.d.ts +1 -0
- package/dts/src/lang/settle/zh-cn.d.ts +2 -0
- package/dts/src/router/index.d.ts +4 -0
- package/dts/src/utils/tokenExt.d.ts +21 -0
- package/dts/src/views/payment/agentHomePage/index.vue.d.ts +2 -0
- package/dts/src/views/payment/agentHomePage/merchant.vue.d.ts +2 -0
- package/dts/src/views/payment/agentHomePage/pay.vue.d.ts +2 -0
- package/dts/src/views/payment/agentHomePage/payPal.vue.d.ts +2 -0
- package/dts/src/views/payment/agentHomePage/sale.vue.d.ts +2 -0
- package/dts/src/views/payment/agentHomePage/trend.vue.d.ts +2 -0
- package/dts/src/views/payment/instHomePage/index.vue.d.ts +2 -0
- package/dts/src/views/payment/instHomePage/pay.vue.d.ts +2 -0
- package/dts/src/views/payment/instHomePage/payPal.vue.d.ts +2 -0
- package/dts/src/views/payment/instHomePage/trend.vue.d.ts +2 -0
- package/dts/src/views/payment/instsLogin/index.vue.d.ts +2 -0
- package/dts/src/views/payment/merchantHomePage/index.vue.d.ts +2 -0
- package/dts/src/views/payment/merchantHomePage/trend.vue.d.ts +2 -0
- package/package.json +3 -2
- package/dist/index-DXSCg5PP.mjs +0 -102
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineComponent as i, ref as u, resolveComponent as c, createBlock as f, openBlock as a, withCtx as t, createVNode as l, createElementBlock as r, toDisplayString as n, createElementVNode as m, createCommentVNode as h, unref as y, createTextVNode as k } from "vue";
|
|
2
|
+
import { _ as b, a as N, b as g } from "./three-BE8B3lbG.mjs";
|
|
3
|
+
import { rbacApi as B } from "jmash-rbac";
|
|
4
|
+
import { s as w } from "./index-zsIaZMNT.mjs";
|
|
5
|
+
const C = {
|
|
6
|
+
key: 0,
|
|
7
|
+
src: b,
|
|
8
|
+
alt: "第一名"
|
|
9
|
+
}, V = {
|
|
10
|
+
key: 1,
|
|
11
|
+
src: N,
|
|
12
|
+
alt: "第二名"
|
|
13
|
+
}, v = {
|
|
14
|
+
key: 2,
|
|
15
|
+
src: g,
|
|
16
|
+
alt: "第三名"
|
|
17
|
+
}, M = { key: 3 }, x = { key: 0 }, T = /* @__PURE__ */ i({
|
|
18
|
+
__name: "merchant",
|
|
19
|
+
setup(A) {
|
|
20
|
+
const _ = u([]);
|
|
21
|
+
return w.newMerchant({}).then((p) => {
|
|
22
|
+
_.value = p.data.agentMerchantNumModel;
|
|
23
|
+
}), (p, o) => {
|
|
24
|
+
const s = c("el-table-column"), d = c("el-table");
|
|
25
|
+
return a(), f(d, {
|
|
26
|
+
style: { width: "100%" },
|
|
27
|
+
"show-header": !0,
|
|
28
|
+
"empty-text": "暂无数据",
|
|
29
|
+
data: _.value
|
|
30
|
+
}, {
|
|
31
|
+
default: t(() => [
|
|
32
|
+
l(s, {
|
|
33
|
+
label: "排名",
|
|
34
|
+
width: "100"
|
|
35
|
+
}, {
|
|
36
|
+
header: t(() => o[0] || (o[0] = [
|
|
37
|
+
m("span", { style: { color: "#f5782d" } }, "排名", -1)
|
|
38
|
+
])),
|
|
39
|
+
default: t(({ $index: e }) => [
|
|
40
|
+
e === 0 ? (a(), r("img", C)) : e === 1 ? (a(), r("img", V)) : e === 2 ? (a(), r("img", v)) : (a(), r("span", M, n(e + 1), 1))
|
|
41
|
+
]),
|
|
42
|
+
_: 1
|
|
43
|
+
}),
|
|
44
|
+
l(s, {
|
|
45
|
+
prop: "salesName",
|
|
46
|
+
label: "销售人员"
|
|
47
|
+
}, {
|
|
48
|
+
header: t(() => o[1] || (o[1] = [
|
|
49
|
+
m("span", { style: { color: "#f5782d" } }, "销售人员", -1)
|
|
50
|
+
])),
|
|
51
|
+
default: t(({ row: e }) => [
|
|
52
|
+
e.marketBy ? (a(), r("span", x, n(y(B).userInfo(e.marketBy).realName), 1)) : h("", !0)
|
|
53
|
+
]),
|
|
54
|
+
_: 1
|
|
55
|
+
}),
|
|
56
|
+
l(s, {
|
|
57
|
+
prop: "amount",
|
|
58
|
+
label: "交易金额",
|
|
59
|
+
align: "right"
|
|
60
|
+
}, {
|
|
61
|
+
header: t(() => o[2] || (o[2] = [
|
|
62
|
+
m("span", { style: { color: "#f5782d" } }, "新增商户", -1)
|
|
63
|
+
])),
|
|
64
|
+
default: t(({ row: e }) => [
|
|
65
|
+
k(n(e.merchantNum) + "家", 1)
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
})
|
|
69
|
+
]),
|
|
70
|
+
_: 1
|
|
71
|
+
}, 8, ["data"]);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export {
|
|
76
|
+
T as _
|
|
77
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { defineComponent as f, ref as l, onMounted as d, onUnmounted as v, createElementBlock as h, openBlock as _ } from "vue";
|
|
2
|
+
import { s as y } from "./index-zsIaZMNT.mjs";
|
|
3
|
+
import { i as b } from "./index--_Po9Tig.mjs";
|
|
4
|
+
import { D as i } from "./index-CpuvJ4Tw.mjs";
|
|
5
|
+
import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
|
+
const w = /* @__PURE__ */ f({
|
|
7
|
+
__name: "pay",
|
|
8
|
+
setup(x) {
|
|
9
|
+
i.merchantBizDict.useValues();
|
|
10
|
+
const a = l();
|
|
11
|
+
let t = null, n = null;
|
|
12
|
+
const o = l([]), c = () => {
|
|
13
|
+
a.value && (t = b(a.value));
|
|
14
|
+
}, u = () => {
|
|
15
|
+
if (!t) return;
|
|
16
|
+
const r = {
|
|
17
|
+
tooltip: {
|
|
18
|
+
trigger: "axis",
|
|
19
|
+
formatter: (e) => `${e[0].name}<br/>交易金额: ¥${e[0].value.toLocaleString()}`
|
|
20
|
+
},
|
|
21
|
+
grid: {
|
|
22
|
+
left: "0",
|
|
23
|
+
right: "5%",
|
|
24
|
+
top: "0",
|
|
25
|
+
containLabel: !0
|
|
26
|
+
},
|
|
27
|
+
yAxis: {
|
|
28
|
+
type: "category",
|
|
29
|
+
inverse: !0,
|
|
30
|
+
// 名称
|
|
31
|
+
data: o.value.map((e) => e.name),
|
|
32
|
+
axisLabel: {
|
|
33
|
+
formatter: (e) => e.replace(/(.{6})/g, `$1
|
|
34
|
+
`)
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
xAxis: {
|
|
38
|
+
type: "value",
|
|
39
|
+
interval: 2500,
|
|
40
|
+
axisLabel: {
|
|
41
|
+
show: !0,
|
|
42
|
+
// 确保显示X轴标签
|
|
43
|
+
formatter: (e) => `¥${e}`
|
|
44
|
+
},
|
|
45
|
+
splitLine: {
|
|
46
|
+
lineStyle: {
|
|
47
|
+
type: "dashed"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
series: [
|
|
52
|
+
{
|
|
53
|
+
data: o.value.map((e) => e.value),
|
|
54
|
+
// 调整柱子宽度
|
|
55
|
+
barWidth: 30,
|
|
56
|
+
label: {
|
|
57
|
+
show: !1
|
|
58
|
+
// 不展示文字
|
|
59
|
+
},
|
|
60
|
+
itemStyle: {
|
|
61
|
+
color: "#FF8C00"
|
|
62
|
+
// 柱状图的颜色为蓝色
|
|
63
|
+
},
|
|
64
|
+
type: "bar"
|
|
65
|
+
// 图表类型为柱状图
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
};
|
|
69
|
+
t.setOption(r);
|
|
70
|
+
}, m = async () => {
|
|
71
|
+
try {
|
|
72
|
+
await i.merchantBizDict.useValues();
|
|
73
|
+
const r = await y.orderAmount({});
|
|
74
|
+
o.value = r.data.results.filter((e) => e.merchantId && e.orderAmount).map((e) => ({
|
|
75
|
+
name: i.merchantBizDict.getValue(e.merchantId),
|
|
76
|
+
value: parseFloat(e.orderAmount)
|
|
77
|
+
})).sort((e, p) => p.value - e.value).slice(0, 4), u(), setTimeout(() => {
|
|
78
|
+
t && t.resize();
|
|
79
|
+
}, 0);
|
|
80
|
+
} catch (r) {
|
|
81
|
+
console.error("获取数据失败:", r);
|
|
82
|
+
}
|
|
83
|
+
}, s = () => {
|
|
84
|
+
t && t.resize();
|
|
85
|
+
};
|
|
86
|
+
return d(() => {
|
|
87
|
+
c(), m(), window.addEventListener("resize", s), a.value && (n = new ResizeObserver(() => {
|
|
88
|
+
t && t.resize();
|
|
89
|
+
}), n.observe(a.value));
|
|
90
|
+
}), v(() => {
|
|
91
|
+
window.removeEventListener("resize", s), n && n.disconnect(), t && t.dispose();
|
|
92
|
+
}), (r, e) => (_(), h("div", {
|
|
93
|
+
ref_key: "container",
|
|
94
|
+
ref: a,
|
|
95
|
+
class: "chart-container"
|
|
96
|
+
}, null, 512));
|
|
97
|
+
}
|
|
98
|
+
}), C = /* @__PURE__ */ z(w, [["__scopeId", "data-v-be916f57"]]);
|
|
99
|
+
export {
|
|
100
|
+
C as default
|
|
101
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { defineComponent as d, ref as l, onMounted as f, onUnmounted as v, createElementBlock as h, openBlock as _ } from "vue";
|
|
2
|
+
import { i as y } from "./index--_Po9Tig.mjs";
|
|
3
|
+
import { D as o } from "./index-CpuvJ4Tw.mjs";
|
|
4
|
+
import { s as z } from "./index-eUhFgNKx.mjs";
|
|
5
|
+
import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
|
+
const x = /* @__PURE__ */ d({
|
|
7
|
+
__name: "pay",
|
|
8
|
+
setup(w) {
|
|
9
|
+
o.merchantBizDict.useValues();
|
|
10
|
+
const a = l();
|
|
11
|
+
let t = null, r = null;
|
|
12
|
+
const i = l([]), c = () => {
|
|
13
|
+
a.value && (t = y(a.value));
|
|
14
|
+
}, u = () => {
|
|
15
|
+
if (!t) return;
|
|
16
|
+
const n = {
|
|
17
|
+
tooltip: {
|
|
18
|
+
trigger: "axis",
|
|
19
|
+
formatter: (e) => `${e[0].name}<br/>交易金额: ¥${e[0].value.toLocaleString()}`
|
|
20
|
+
},
|
|
21
|
+
grid: {
|
|
22
|
+
left: "1%",
|
|
23
|
+
right: "5%",
|
|
24
|
+
top: "0",
|
|
25
|
+
containLabel: !0
|
|
26
|
+
},
|
|
27
|
+
yAxis: {
|
|
28
|
+
type: "category",
|
|
29
|
+
inverse: !0,
|
|
30
|
+
data: i.value.map((e) => e.name),
|
|
31
|
+
axisLabel: {
|
|
32
|
+
formatter: (e) => e.replace(/(.{10})/g, `$1
|
|
33
|
+
`)
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
xAxis: {
|
|
37
|
+
type: "value",
|
|
38
|
+
min: 0,
|
|
39
|
+
max: 2e4,
|
|
40
|
+
interval: 2500,
|
|
41
|
+
axisLabel: {
|
|
42
|
+
show: !0,
|
|
43
|
+
// 确保显示X轴标签
|
|
44
|
+
formatter: (e) => `¥${e}`
|
|
45
|
+
},
|
|
46
|
+
splitLine: {
|
|
47
|
+
lineStyle: {
|
|
48
|
+
type: "dashed"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
series: [
|
|
53
|
+
{
|
|
54
|
+
data: i.value.map((e) => e.value),
|
|
55
|
+
// 调整柱子宽度
|
|
56
|
+
barWidth: 40,
|
|
57
|
+
label: {
|
|
58
|
+
show: !1
|
|
59
|
+
// 不展示文字
|
|
60
|
+
},
|
|
61
|
+
itemStyle: {
|
|
62
|
+
color: "#FF8C00"
|
|
63
|
+
// 柱状图的颜色为蓝色
|
|
64
|
+
},
|
|
65
|
+
type: "bar"
|
|
66
|
+
// 图表类型为柱状图
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
};
|
|
70
|
+
t.setOption(n);
|
|
71
|
+
}, m = async () => {
|
|
72
|
+
await o.merchantBizDict.useValues();
|
|
73
|
+
const n = await z.orderAmount();
|
|
74
|
+
i.value = n.data.results.filter((e) => e.merchantId && e.orderAmount).map((e) => ({
|
|
75
|
+
name: o.merchantBizDict.getValue(e.merchantId),
|
|
76
|
+
value: parseFloat(e.orderAmount)
|
|
77
|
+
})).sort((e, p) => p.value - e.value).slice(0, 4), u(), setTimeout(() => {
|
|
78
|
+
t && t.resize();
|
|
79
|
+
}, 0);
|
|
80
|
+
}, s = () => {
|
|
81
|
+
t && t.resize();
|
|
82
|
+
};
|
|
83
|
+
return f(() => {
|
|
84
|
+
c(), m(), window.addEventListener("resize", s), a.value && (r = new ResizeObserver(() => {
|
|
85
|
+
t && t.resize();
|
|
86
|
+
}), r.observe(a.value));
|
|
87
|
+
}), v(() => {
|
|
88
|
+
window.removeEventListener("resize", s), r && r.disconnect(), t && t.dispose();
|
|
89
|
+
}), (n, e) => (_(), h("div", {
|
|
90
|
+
ref_key: "container",
|
|
91
|
+
ref: a,
|
|
92
|
+
class: "chart-container"
|
|
93
|
+
}, null, 512));
|
|
94
|
+
}
|
|
95
|
+
}), C = /* @__PURE__ */ b(x, [["__scopeId", "data-v-2ead2fa1"]]);
|
|
96
|
+
export {
|
|
97
|
+
C as default
|
|
98
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { defineComponent as c, ref as d, onMounted as m, onBeforeUnmount as v, createElementBlock as y, openBlock as _ } from "vue";
|
|
2
|
+
import { i as b } from "./index--_Po9Tig.mjs";
|
|
3
|
+
import { s as g } from "./index-zsIaZMNT.mjs";
|
|
4
|
+
import { D as h, C as w } from "./index-CpuvJ4Tw.mjs";
|
|
5
|
+
import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
|
+
const C = /* @__PURE__ */ c({
|
|
7
|
+
__name: "payPal",
|
|
8
|
+
setup(x) {
|
|
9
|
+
const i = d();
|
|
10
|
+
let e = null;
|
|
11
|
+
const r = d([]), u = () => ({
|
|
12
|
+
tooltip: {
|
|
13
|
+
trigger: "item",
|
|
14
|
+
formatter: (t) => `${t.name}<br/>占比: ${t.value}%<br/>金额: ¥${t.data.amount}<br/>订单数: ${t.data.count}`
|
|
15
|
+
},
|
|
16
|
+
legend: {
|
|
17
|
+
orient: "vertical",
|
|
18
|
+
right: 80,
|
|
19
|
+
top: "center",
|
|
20
|
+
data: r.value.map((t) => t.name),
|
|
21
|
+
formatter: (t) => {
|
|
22
|
+
const a = r.value.find((n) => n.name === t);
|
|
23
|
+
return `${t}: ${a == null ? void 0 : a.value}%`;
|
|
24
|
+
},
|
|
25
|
+
textStyle: {
|
|
26
|
+
fontSize: 14,
|
|
27
|
+
color: "#666"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
series: [
|
|
31
|
+
{
|
|
32
|
+
name: "支付渠道分析",
|
|
33
|
+
type: "pie",
|
|
34
|
+
radius: ["50%", "70%"],
|
|
35
|
+
avoidLabelOverlap: !1,
|
|
36
|
+
itemStyle: {
|
|
37
|
+
borderRadius: 0,
|
|
38
|
+
borderColor: "#fff",
|
|
39
|
+
borderWidth: 2
|
|
40
|
+
},
|
|
41
|
+
label: {
|
|
42
|
+
show: !0,
|
|
43
|
+
position: "inside",
|
|
44
|
+
formatter: "{d}%",
|
|
45
|
+
fontSize: 12,
|
|
46
|
+
color: "#fff"
|
|
47
|
+
},
|
|
48
|
+
emphasis: {
|
|
49
|
+
label: {
|
|
50
|
+
show: !0,
|
|
51
|
+
fontSize: 14,
|
|
52
|
+
fontWeight: "bold"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
labelLine: {
|
|
56
|
+
show: !1
|
|
57
|
+
},
|
|
58
|
+
data: r.value
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}), p = async () => {
|
|
62
|
+
var t, a;
|
|
63
|
+
try {
|
|
64
|
+
const n = await g.payModel({});
|
|
65
|
+
if (!((a = (t = n.data) == null ? void 0 : t.results) != null && a.length))
|
|
66
|
+
throw new Error("无有效数据");
|
|
67
|
+
const s = n.data.results.reduce(
|
|
68
|
+
(o, l) => o + parseFloat(l.orderAmount || 0),
|
|
69
|
+
0
|
|
70
|
+
);
|
|
71
|
+
r.value = n.data.results.map((o) => {
|
|
72
|
+
const l = h.payModeBizDict.getEnumValue(o.payMode) || o.payMode, f = s > 0 ? (parseFloat(o.orderAmount) / s * 100).toFixed(0) : 0;
|
|
73
|
+
return {
|
|
74
|
+
value: parseFloat(f),
|
|
75
|
+
name: l,
|
|
76
|
+
amount: parseFloat(o.orderAmount),
|
|
77
|
+
count: o.orderCount,
|
|
78
|
+
itemStyle: {
|
|
79
|
+
color: w.PAYMENT_COLORS[o.payMode]
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}), r.value.length > 3 && (r.value = r.value.sort((o, l) => l.value - o.value).slice(0, 3)), e == null || e.setOption(u());
|
|
83
|
+
} catch (n) {
|
|
84
|
+
console.error("支付方式数据加载失败:", n), e == null || e.setOption({
|
|
85
|
+
title: {
|
|
86
|
+
text: "数据加载失败",
|
|
87
|
+
subtext: "请稍后重试",
|
|
88
|
+
left: "center",
|
|
89
|
+
top: "center",
|
|
90
|
+
textStyle: {
|
|
91
|
+
color: "#999"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
return m(async () => {
|
|
98
|
+
if (!i.value) return;
|
|
99
|
+
e = b(i.value), e.showLoading(), await p(), e.hideLoading();
|
|
100
|
+
const t = () => e == null ? void 0 : e.resize();
|
|
101
|
+
window.addEventListener("resize", t);
|
|
102
|
+
}), v(() => {
|
|
103
|
+
window.removeEventListener("resize", () => e == null ? void 0 : e.resize()), e == null || e.dispose();
|
|
104
|
+
}), (t, a) => (_(), y("div", {
|
|
105
|
+
ref_key: "chartContainer",
|
|
106
|
+
ref: i,
|
|
107
|
+
class: "chart-container"
|
|
108
|
+
}, null, 512));
|
|
109
|
+
}
|
|
110
|
+
}), O = /* @__PURE__ */ z(C, [["__scopeId", "data-v-aff64fa1"]]);
|
|
111
|
+
export {
|
|
112
|
+
O as default
|
|
113
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { defineComponent as c, ref as d, onMounted as m, onBeforeUnmount as v, createElementBlock as y, openBlock as _ } from "vue";
|
|
2
|
+
import { i as w } from "./index--_Po9Tig.mjs";
|
|
3
|
+
import { s as g } from "./index-eUhFgNKx.mjs";
|
|
4
|
+
import { D as h, C as b } from "./index-CpuvJ4Tw.mjs";
|
|
5
|
+
import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
|
+
const C = /* @__PURE__ */ c({
|
|
7
|
+
__name: "payPal",
|
|
8
|
+
setup(L) {
|
|
9
|
+
const i = d();
|
|
10
|
+
let t = null;
|
|
11
|
+
const n = d([]), u = () => ({
|
|
12
|
+
tooltip: {
|
|
13
|
+
trigger: "item",
|
|
14
|
+
position: function(e) {
|
|
15
|
+
return [e[0] + 10, e[1] - 30];
|
|
16
|
+
},
|
|
17
|
+
formatter: (e) => `${e.name}: ¥${e.data.amount} (${e.percent}%)<br/>
|
|
18
|
+
订单数: ${e.data.count}`
|
|
19
|
+
},
|
|
20
|
+
legend: {
|
|
21
|
+
orient: "vertical",
|
|
22
|
+
right: 40,
|
|
23
|
+
// 增大这个值使图标更靠右
|
|
24
|
+
top: "middle",
|
|
25
|
+
data: n.value.map((e) => e.name),
|
|
26
|
+
formatter: (e) => {
|
|
27
|
+
const r = n.value.find((a) => a.name === e);
|
|
28
|
+
return `${e} ${r == null ? void 0 : r.value}%`;
|
|
29
|
+
},
|
|
30
|
+
textStyle: {
|
|
31
|
+
fontSize: 12
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
series: [
|
|
35
|
+
{
|
|
36
|
+
type: "pie",
|
|
37
|
+
radius: ["40%", "70%"],
|
|
38
|
+
avoidLabelOverlap: !1,
|
|
39
|
+
label: {
|
|
40
|
+
show: !1,
|
|
41
|
+
position: "center"
|
|
42
|
+
},
|
|
43
|
+
emphasis: {
|
|
44
|
+
label: {
|
|
45
|
+
show: !0,
|
|
46
|
+
fontSize: 12,
|
|
47
|
+
fontWeight: "bold",
|
|
48
|
+
formatter: `{b}
|
|
49
|
+
{c}% ({d}%)`
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
labelLine: { show: !1 },
|
|
53
|
+
data: n.value
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}), p = async () => {
|
|
57
|
+
var e, r;
|
|
58
|
+
try {
|
|
59
|
+
const a = await g.payModel();
|
|
60
|
+
if (!((r = (e = a.data) == null ? void 0 : e.results) != null && r.length))
|
|
61
|
+
throw new Error("无有效数据");
|
|
62
|
+
const s = a.data.results.reduce(
|
|
63
|
+
(o, l) => o + parseFloat(l.orderAmount || 0),
|
|
64
|
+
0
|
|
65
|
+
);
|
|
66
|
+
n.value = a.data.results.map((o) => {
|
|
67
|
+
const l = h.payModeBizDict.getEnumValue(o.payMode) || o.payMode, f = s > 0 ? (parseFloat(o.orderAmount) / s * 100).toFixed(2) : 0;
|
|
68
|
+
return {
|
|
69
|
+
value: parseFloat(f),
|
|
70
|
+
name: l,
|
|
71
|
+
amount: o.orderAmount,
|
|
72
|
+
// 保留原始金额用于tooltip显示
|
|
73
|
+
count: o.orderCount,
|
|
74
|
+
// 保留订单数用于tooltip显示
|
|
75
|
+
itemStyle: {
|
|
76
|
+
color: b.PAYMENT_COLORS[o.payMode]
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}), t == null || t.setOption(u());
|
|
80
|
+
} catch {
|
|
81
|
+
t == null || t.setOption({
|
|
82
|
+
title: {
|
|
83
|
+
text: "数据加载失败",
|
|
84
|
+
left: "center",
|
|
85
|
+
top: "center"
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
return m(async () => {
|
|
91
|
+
if (!i.value)
|
|
92
|
+
return;
|
|
93
|
+
t = w(i.value), t.showLoading(), await p(), t.hideLoading();
|
|
94
|
+
const e = () => {
|
|
95
|
+
t == null || t.resize();
|
|
96
|
+
};
|
|
97
|
+
window.addEventListener("resize", e), e();
|
|
98
|
+
}), v(() => {
|
|
99
|
+
window.removeEventListener("resize", () => t == null ? void 0 : t.resize()), t == null || t.dispose();
|
|
100
|
+
}), (e, r) => (_(), y("div", {
|
|
101
|
+
ref_key: "chartContainer",
|
|
102
|
+
ref: i,
|
|
103
|
+
class: "chart-container"
|
|
104
|
+
}, null, 512));
|
|
105
|
+
}
|
|
106
|
+
}), $ = /* @__PURE__ */ z(C, [["__scopeId", "data-v-0006bf5a"]]);
|
|
107
|
+
export {
|
|
108
|
+
$ as default
|
|
109
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineComponent as c, ref as u, resolveComponent as d, createBlock as f, openBlock as a, withCtx as t, createVNode as l, createElementBlock as s, toDisplayString as n, createElementVNode as m, createCommentVNode as y, unref as h, createTextVNode as k } from "vue";
|
|
2
|
+
import { _ as b, a as g, b as N } from "./three-BE8B3lbG.mjs";
|
|
3
|
+
import { rbacApi as B } from "jmash-rbac";
|
|
4
|
+
import { s as A } from "./index-zsIaZMNT.mjs";
|
|
5
|
+
const C = {
|
|
6
|
+
key: 0,
|
|
7
|
+
src: b,
|
|
8
|
+
alt: "第一名"
|
|
9
|
+
}, V = {
|
|
10
|
+
key: 1,
|
|
11
|
+
src: g,
|
|
12
|
+
alt: "第二名"
|
|
13
|
+
}, v = {
|
|
14
|
+
key: 2,
|
|
15
|
+
src: N,
|
|
16
|
+
alt: "第三名"
|
|
17
|
+
}, w = { key: 3 }, x = { key: 0 }, j = /* @__PURE__ */ c({
|
|
18
|
+
__name: "sale",
|
|
19
|
+
setup(D) {
|
|
20
|
+
const _ = u([]);
|
|
21
|
+
return A.salesAmount({}).then((p) => {
|
|
22
|
+
_.value = p.data.results;
|
|
23
|
+
}), (p, o) => {
|
|
24
|
+
const r = d("el-table-column"), i = d("el-table");
|
|
25
|
+
return a(), f(i, {
|
|
26
|
+
style: { width: "100%" },
|
|
27
|
+
"show-header": !0,
|
|
28
|
+
"empty-text": "暂无数据",
|
|
29
|
+
data: _.value
|
|
30
|
+
}, {
|
|
31
|
+
default: t(() => [
|
|
32
|
+
l(r, {
|
|
33
|
+
label: "排名",
|
|
34
|
+
width: "100"
|
|
35
|
+
}, {
|
|
36
|
+
header: t(() => o[0] || (o[0] = [
|
|
37
|
+
m("span", { style: { color: "#f5782d" } }, "排名", -1)
|
|
38
|
+
])),
|
|
39
|
+
default: t(({ $index: e }) => [
|
|
40
|
+
e === 0 ? (a(), s("img", C)) : e === 1 ? (a(), s("img", V)) : e === 2 ? (a(), s("img", v)) : (a(), s("span", w, n(e + 1), 1))
|
|
41
|
+
]),
|
|
42
|
+
_: 1
|
|
43
|
+
}),
|
|
44
|
+
l(r, {
|
|
45
|
+
prop: "salesName",
|
|
46
|
+
label: "销售人员"
|
|
47
|
+
}, {
|
|
48
|
+
header: t(() => o[1] || (o[1] = [
|
|
49
|
+
m("span", { style: { color: "#f5782d" } }, "销售人员", -1)
|
|
50
|
+
])),
|
|
51
|
+
default: t(({ row: e }) => [
|
|
52
|
+
e.marketBy ? (a(), s("span", x, n(h(B).userInfo(e.marketBy).realName), 1)) : y("", !0)
|
|
53
|
+
]),
|
|
54
|
+
_: 1
|
|
55
|
+
}),
|
|
56
|
+
l(r, {
|
|
57
|
+
prop: "amount",
|
|
58
|
+
label: "交易金额",
|
|
59
|
+
align: "right"
|
|
60
|
+
}, {
|
|
61
|
+
header: t(() => o[2] || (o[2] = [
|
|
62
|
+
m("span", { style: { color: "#f5782d" } }, "交易金额", -1)
|
|
63
|
+
])),
|
|
64
|
+
default: t(({ row: e }) => [
|
|
65
|
+
k(n(e.orderAmount) + "元 ", 1)
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
})
|
|
69
|
+
]),
|
|
70
|
+
_: 1
|
|
71
|
+
}, 8, ["data"]);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export {
|
|
76
|
+
j as _
|
|
77
|
+
};
|