feat(M08-C): 补保洁与设备运营

This commit is contained in:
Codex
2026-08-10 10:52:06 +08:00
parent a95e8bf8c8
commit 65932a8000
17 changed files with 815 additions and 104 deletions
+11
View File
@@ -38,6 +38,7 @@ Page({
errorMessage: '',
canWrite: false,
canReadUsers: false,
canReadOperations: false,
stores: [],
selectedStoreId: '',
selectedStoreName: '',
@@ -98,6 +99,9 @@ Page({
canReadUsers: access.capabilities.includes('user.read')
|| access.capabilities.includes('tenant.manage')
|| access.roles.includes('PLATFORM_ADMIN'),
canReadOperations: access.capabilities.some((code) => [
'cleaning.task.read', 'device.read', 'device.write', 'tenant.manage',
].includes(code)) || access.roles.includes('PLATFORM_ADMIN'),
stores,
selectedStoreId,
selectedStoreName: stores.find((store) => store.id === selectedStoreId)?.name || '',
@@ -225,6 +229,13 @@ Page({
wx.navigateTo({ url: '/pages/manager/people' })
},
openOperations() {
if (!this.data.canReadOperations || !this.data.selectedStoreId) return
wx.navigateTo({
url: `/pages/manager/operations?storeId=${encodeURIComponent(this.data.selectedStoreId)}&storeName=${encodeURIComponent(this.data.selectedStoreName)}`,
})
},
manageOrder(event) {
if (!this.data.canWrite) return
const orderId = event.currentTarget.dataset.orderId