>/)
assert.match(storeSource, /function mapFirstLegOrderRow/)
- for (const field of ['inboundId', 'inboundCode', 'channelName', 'destinationWarehouseName', 'packageCount', 'expressCompany', 'trackingNo', 'totalGrossWeightKg', 'totalNetWeightKg', 'totalVolumeCbm', 'totalQuantity', 'remark', 'shipmentId', 'referenceId', 'createdAt']) {
+ for (const field of ['inboundId', 'inboundCode', 'channelName', 'destinationWarehouseName', 'pickupMethod', 'packageCount', 'expressCompany', 'trackingNo', 'totalGrossWeightKg', 'totalNetWeightKg', 'totalVolumeCbm', 'totalQuantity', 'remark', 'shipmentId', 'referenceId', 'createdAt']) {
assert.match(storeSource, new RegExp(`row\\.${field}`))
}
assert.match(storeSource, /row\.skuNos/)
assert.match(storeSource, /row\.cargoes/)
assert.match(storeSource, /chargeableWeightKg: null/)
assert.match(storeSource, /chargeableVolumeCbm: null/)
+ assert.match(apiSource, /pickupMethod: ApiPickupMethod \\| null/)
assert.match(storeSource, /orderResult\.value\.records\.map\(mapFirstLegOrderRow\)/)
assert.match(storeSource, /orderResult\.value\.records\.map\(\(item\) => mapUnifiedOrderRow\(item, warehouses\.value\)\)/)
})
diff --git a/src/modules/first-leg/store/firstLegOrders.ts b/src/modules/first-leg/store/firstLegOrders.ts
index e6e56de..8fd10d9 100644
--- a/src/modules/first-leg/store/firstLegOrders.ts
+++ b/src/modules/first-leg/store/firstLegOrders.ts
@@ -398,7 +398,7 @@ function mapFirstLegOrderRow(row: MerchantFirstLegOrderRow): FirstLegOrder {
inboundId: row.inboundId == null ? '' : String(row.inboundId), inboundCode: row.inboundCode ?? '',
},
createdAt: row.createdAt, updatedAt: row.createdAt, tradeTerm: '', destinationCountryCode: '', destinationWarehouseId: '',
- destinationWarehouseName: row.destinationWarehouseName ?? '', pickupMethod: 'SELF_EXPRESS', channelCode: '',
+ destinationWarehouseName: row.destinationWarehouseName ?? '', pickupMethod: row.pickupMethod ?? 'SELF_EXPRESS', channelCode: '',
channelName: row.channelName ?? '', pricingTaxMode: 'TAX_INCLUDED', carrierId: '', carrierName: '', taxMode: 'BUY_DECLARATION',
customsInspection: false, destinationType: row.destinationType ?? 'PRIVATE', amazonWarehouseCode: '',
shipmentId: row.shipmentId ?? row.internationalOrderNo ?? '', requestedPickupAt: '', receivingTime: '', submittedAt: '', completedAt: '',
diff --git a/src/modules/notifications/views/NotificationsView.vue b/src/modules/notifications/views/NotificationsView.vue
index 55eada1..bf73626 100644
--- a/src/modules/notifications/views/NotificationsView.vue
+++ b/src/modules/notifications/views/NotificationsView.vue
@@ -44,4 +44,15 @@ onMounted(() => { void Promise.all([load(), notifications.refreshUnreadCount()])
diff --git a/src/modules/tenant-management/api/merchantIam.test.mjs b/src/modules/tenant-management/api/merchantIam.test.mjs
index ab11e9c..c23acc3 100644
--- a/src/modules/tenant-management/api/merchantIam.test.mjs
+++ b/src/modules/tenant-management/api/merchantIam.test.mjs
@@ -107,3 +107,12 @@ test('keeps client baseline permissions selected when server resources do not de
assert.match(permissionsViewSource, /:disabled="isRequiredPermission\(item\.code\)"/)
assert.doesNotMatch(permissionsViewSource, /selectedCodes\.value\.unshift\('account:profile:view'\)/)
})
+
+test('exposes all message-center permissions in the enterprise role editor', () => {
+ for (const permission of ['merchant:notification:view', 'merchant:notification:read', 'merchant:notification:read-all']) {
+ assert.match(contractsSource, new RegExp(`code: '${permission}'`))
+ assert.match(contractsSource, new RegExp(`'${permission}': \\['${permission}'\\]`))
+ }
+ assert.match(contractsSource, /key: 'notifications'/)
+ assert.match(storeSource, /const mappedMerchantPermissionCodes = new Set\(Object\.values\(FRONTEND_TO_MERCHANT_PERMISSION_CODES\)\.flat\(\)\)/)
+})
diff --git a/src/modules/tenant-management/contracts.ts b/src/modules/tenant-management/contracts.ts
index 52a0831..b146221 100644
--- a/src/modules/tenant-management/contracts.ts
+++ b/src/modules/tenant-management/contracts.ts
@@ -25,6 +25,15 @@ export const TENANT_PERMISSION_GROUPS: readonly TenantPermissionGroup[] = [
label: '业务总览',
items: [{ code: 'dashboard:view', label: '查看总览', description: '所有企业成员默认可用,可查看企业统计和最近订单' }],
},
+ {
+ key: 'notifications',
+ label: '消息中心',
+ items: [
+ { code: 'merchant:notification:view', label: '查看我的消息', description: '查看本企业和当前成员可见的站内消息' },
+ { code: 'merchant:notification:read', label: '标记消息已读', description: '将已查看的站内消息标记为已读' },
+ { code: 'merchant:notification:read-all', label: '全部标记已读', description: '将当前成员的全部站内消息标记为已读' },
+ ],
+ },
{
key: 'finance',
label: '财务账单',
diff --git a/src/modules/tenant-management/views/MembersView.vue b/src/modules/tenant-management/views/MembersView.vue
index b49c681..4dc0154 100644
--- a/src/modules/tenant-management/views/MembersView.vue
+++ b/src/modules/tenant-management/views/MembersView.vue
@@ -200,7 +200,7 @@ async function resetPassword(member: TenantMember) {
-
+
请通过安全渠道将初始密码交给成员;前端不会保存或再次展示该密码。
取消保存