feat(M08-C): 补保洁与设备运营
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user