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

@@ -201,9 +201,22 @@
return Number(p.cash||0) + Number(p.bank||0) + Number(p.wechat||0)
}
},
onLoad() {
this.fetchCategories()
},
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() {
if (this.biz === 'sale') {
if (this.order.customerId && this.order.customerId !== this._lastCustomerId) {