This commit is contained in:
2025-09-24 20:35:15 +08:00
parent 39679f7330
commit 8a458ff0a4
12033 changed files with 1537546 additions and 13292 deletions

View File

@@ -42,8 +42,21 @@ const _sfc_main = {
}
},
onLoad() {
const hasToken = (() => {
try {
return !!common_vendor.index.getStorageSync("TOKEN");
} catch (e) {
return false;
}
})();
if (!hasToken) {
this.items = [];
this.total = 0;
common_vendor.index.showToast({ title: "请登录使用该功能", icon: "none" });
return;
}
try {
common_vendor.index.__f__("log", "at pages/detail/index.vue:92", "[detail] onLoad route = pages/detail/index");
common_vendor.index.__f__("log", "at pages/detail/index.vue:102", "[detail] onLoad route = pages/detail/index");
} catch (e) {
}
this.computeRange();
@@ -91,6 +104,20 @@ const _sfc_main = {
this.finished = false;
this.loadMore();
},
onStartChange(e) {
var _a;
this.startDate = ((_a = e == null ? void 0 : e.detail) == null ? void 0 : _a.value) || this.startDate;
if (this.endDate && this.startDate > this.endDate)
this.endDate = this.startDate;
this.reload();
},
onEndChange(e) {
var _a;
this.endDate = ((_a = e == null ? void 0 : e.detail) == null ? void 0 : _a.value) || this.endDate;
if (this.startDate && this.endDate < this.startDate)
this.startDate = this.endDate;
this.reload();
},
async loadMore() {
if (this.loading || this.finished)
return;
@@ -137,17 +164,7 @@ const _sfc_main = {
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.n($data.range === "custom" && "active"),
b: common_vendor.o(($event) => $options.switchRange("custom")),
c: common_vendor.n($data.range === "week" && "active"),
d: common_vendor.o(($event) => $options.switchRange("week")),
e: common_vendor.n($data.range === "today" && "active"),
f: common_vendor.o(($event) => $options.switchRange("today")),
g: common_vendor.n($data.range === "month" && "active"),
h: common_vendor.o(($event) => $options.switchRange("month")),
i: common_vendor.n($data.range === "year" && "active"),
j: common_vendor.o(($event) => $options.switchRange("year")),
k: common_vendor.f($data.bizList, (b, k0, i0) => {
a: common_vendor.f($data.bizList, (b, k0, i0) => {
return {
a: common_vendor.t(b.name),
b: b.key,
@@ -155,18 +172,23 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
d: common_vendor.o(($event) => $options.switchBiz(b.key), b.key)
};
}),
l: $options.placeholder,
m: common_vendor.o((...args) => $options.reload && $options.reload(...args)),
n: $data.query.kw,
o: common_vendor.o(common_vendor.m(($event) => $data.query.kw = $event.detail.value, {
b: common_vendor.t($data.startDate),
c: $data.startDate,
d: common_vendor.o((...args) => $options.onStartChange && $options.onStartChange(...args)),
e: common_vendor.t($data.endDate),
f: $data.endDate,
g: common_vendor.o((...args) => $options.onEndChange && $options.onEndChange(...args)),
h: $options.placeholder,
i: common_vendor.o((...args) => $options.reload && $options.reload(...args)),
j: $data.query.kw,
k: common_vendor.o(common_vendor.m(($event) => $data.query.kw = $event.detail.value, {
trim: true
})),
p: common_vendor.t($options.periodLabel),
q: common_vendor.o((...args) => $options.reload && $options.reload(...args)),
r: common_vendor.t($options.totalAmount.toFixed(2)),
s: $data.items.length
l: common_vendor.o((...args) => $options.reload && $options.reload(...args)),
m: common_vendor.t($options.totalAmount.toFixed(2)),
n: $data.items.length
}, $data.items.length ? {
t: common_vendor.f($data.items, (it, k0, i0) => {
o: common_vendor.f($data.items, (it, k0, i0) => {
return {
a: common_vendor.t($options.formatDate(it.orderTime || it.txTime || it.createdAt)),
b: common_vendor.t(it.customerName || it.supplierName || it.accountName || it.remark || "-"),
@@ -179,8 +201,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
};
})
} : {}, {
v: common_vendor.o((...args) => $options.loadMore && $options.loadMore(...args)),
w: common_vendor.o((...args) => $options.onCreate && $options.onCreate(...args))
p: common_vendor.o((...args) => $options.loadMore && $options.loadMore(...args)),
q: common_vendor.o((...args) => $options.onCreate && $options.onCreate(...args))
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);