This commit is contained in:
2025-09-18 21:17:44 +08:00
parent e560e90970
commit bff3d0414d
49 changed files with 1063 additions and 90 deletions

View File

@@ -8,6 +8,9 @@ const _sfc_main = {
onLoad() {
this.search();
},
onShow() {
this.search();
},
methods: {
toggleDebtOnly() {
this.debtOnly = !this.debtOnly;
@@ -25,12 +28,17 @@ const _sfc_main = {
common_vendor.index.navigateTo({ url: "/pages/customer/form" });
},
select(c) {
const opener = getCurrentPages()[getCurrentPages().length - 2];
if (opener && opener.$vm) {
opener.$vm.order.customerId = c.id;
opener.$vm.customerName = c.name;
const pages = getCurrentPages();
const prev = pages.length >= 2 ? pages[pages.length - 2] : null;
const vm = prev && prev.$vm ? prev.$vm : null;
if (vm && vm.order) {
vm.order.customerId = c.id;
vm.customerName = c.name;
}
common_vendor.index.navigateBack();
},
openDetail(c) {
common_vendor.index.navigateTo({ url: "/pages/customer/detail?id=" + c.id });
}
}
};
@@ -51,7 +59,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
d: common_vendor.t(Number(c.receivable).toFixed(2))
} : {}, {
e: c.id,
f: common_vendor.o(($event) => $options.select(c), c.id)
f: common_vendor.o(($event) => $options.openDetail(c), c.id)
});
}),
h: common_vendor.o((...args) => $options.createCustomer && $options.createCustomer(...args))