This commit is contained in:
2025-09-20 13:00:53 +08:00
parent 9b107d665a
commit d857eca39f
12 changed files with 89 additions and 64 deletions

View File

@@ -63,6 +63,10 @@ const _sfc_main = {
common_vendor.index.navigateTo({ url: "/pages/product/list" });
return;
}
if (item.key === "sale") {
common_vendor.index.navigateTo({ url: "/pages/order/create?biz=sale&type=out" });
return;
}
if (item.key === "customer") {
common_vendor.index.navigateTo({ url: "/pages/customer/select" });
return;
@@ -75,6 +79,18 @@ const _sfc_main = {
common_vendor.index.navigateTo({ url: "/pages/supplier/select" });
return;
}
if (item.key === "purchase") {
common_vendor.index.navigateTo({ url: "/pages/order/create?biz=purchase&type=in" });
return;
}
if (item.key === "report") {
common_vendor.index.navigateTo({ url: "/pages/report/index" });
return;
}
if (item.key === "otherPay") {
common_vendor.index.navigateTo({ url: "/pages/order/create?biz=expense" });
return;
}
common_vendor.index.showToast({ title: item.title + "(开发中)", icon: "none" });
},
goProduct() {
@@ -87,14 +103,14 @@ const _sfc_main = {
goDetail() {
this.activeTab = "detail";
try {
common_vendor.index.__f__("log", "at pages/index/index.vue:179", "[index] goDetail → /pages/detail/index");
common_vendor.index.__f__("log", "at pages/index/index.vue:199", "[index] goDetail → /pages/detail/index");
} catch (e) {
}
common_vendor.index.navigateTo({ url: "/pages/detail/index" });
},
goReport() {
this.activeTab = "report";
common_vendor.index.navigateTo({ url: "/pages/report/entry" });
common_vendor.index.navigateTo({ url: "/pages/report/index" });
},
goMe() {
this.activeTab = "me";

View File

@@ -68,7 +68,21 @@ const _sfc_main = {
return Number(p.cash || 0) + Number(p.bank || 0) + Number(p.wechat || 0);
}
},
onLoad() {
onLoad(query) {
try {
const biz = query && query.biz;
const type = query && query.type;
if (biz === "sale" || biz === "purchase" || biz === "income" || biz === "expense") {
this.biz = biz;
}
if (this.biz === "sale" && (type === "out" || type === "return" || type === "collect")) {
this.saleType = type;
}
if (this.biz === "purchase" && (type === "in" || type === "return" || type === "pay")) {
this.purchaseType = type;
}
} catch (e) {
}
this.fetchCategories();
},
onShow() {