处理个人中心 以及数据看板

This commit is contained in:
2026-01-16 16:39:07 +08:00
parent 7bff4f6191
commit ccacfdb4e9
15 changed files with 103 additions and 38 deletions

View File

@@ -16,10 +16,15 @@ if (!Math) {
const _sfc_main = {
__name: "list",
setup(__props) {
const dayTotalPrice = common_vendor.ref(0);
const monthTotalPrice = common_vendor.ref(0);
const day = common_vendor.ref("");
common_vendor.onLoad((options) => {
day.value = options.date;
common_vendor.index.__f__("log", "at pages/data/list.vue:153", day.value);
common_vendor.index.__f__("log", "at pages/data/list.vue:159", day.value);
if (day.value) {
getDashboard();
}
});
const formatDate = (date) => {
const d = new Date(date);
@@ -29,21 +34,33 @@ const _sfc_main = {
};
const dataList = common_vendor.ref([]);
const paging = common_vendor.ref(null);
const getDashboard = () => {
api_index.fetchDashboard({
date: day.value
}).then((res) => {
common_vendor.index.__f__("log", "at pages/data/list.vue:182", res);
dayTotalPrice.value = res.dayTotalPrice;
monthTotalPrice.value = res.monthTotalPrice;
});
};
const queryList = (pageNo = 1, pageSize = 10) => {
common_vendor.index.__f__("log", "at pages/data/list.vue:172", day.value);
common_vendor.index.__f__("log", "at pages/data/list.vue:192", day.value);
const params = {
page: pageNo,
pageSize: 10,
date: day.value
};
api_index.fetchDayOrderList(params).then((res) => {
common_vendor.index.__f__("log", "at pages/data/list.vue:179", res);
common_vendor.index.__f__("log", "at pages/data/list.vue:199", res);
paging.value.complete(res.list);
}).catch((res) => {
paging.value.complete(false);
});
};
common_vendor.onShow(() => {
if (day.value) {
getDashboard();
}
if (paging.value) {
paging.value.refresh();
}
@@ -51,8 +68,10 @@ const _sfc_main = {
return (_ctx, _cache) => {
return {
a: common_vendor.t(day.value),
b: common_vendor.t(formatDate(day.value)),
c: common_vendor.f(dataList.value, (order, index, i0) => {
b: common_vendor.t(dayTotalPrice.value),
c: common_vendor.t(formatDate(day.value)),
d: common_vendor.t(monthTotalPrice.value),
e: common_vendor.f(dataList.value, (order, index, i0) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C;
return common_vendor.e({
a: order.order_type == 1
@@ -139,7 +158,7 @@ const _sfc_main = {
};
}),
M: common_vendor.t(order == null ? void 0 : order.discount_amount),
N: common_vendor.t(order == null ? void 0 : order.discount_amount),
N: common_vendor.t(order == null ? void 0 : order.totalPrice),
O: order.remarks
}, order.remarks ? {} : {}, {
P: order.remarks
@@ -151,16 +170,16 @@ const _sfc_main = {
T: index
});
}),
d: common_vendor.p({
f: common_vendor.p({
plain: true,
["custom-color"]: "#fa2400"
}),
e: common_vendor.sr(paging, "2c2d73a5-1", {
g: common_vendor.sr(paging, "2c2d73a5-1", {
"k": "paging"
}),
f: common_vendor.o(queryList),
g: common_vendor.o(($event) => dataList.value = $event),
h: common_vendor.p({
h: common_vendor.o(queryList),
i: common_vendor.o(($event) => dataList.value = $event),
j: common_vendor.p({
fixed: false,
modelValue: dataList.value
})