perf:使用通用权限 PERM_AGENCY_ALL 替换 PERM_RESERVATION_MOST

main
LiaoYijun 6 months ago
parent 5768f5525c
commit 975c781be8

@ -57,14 +57,14 @@ VALUES ('重置密码', '/account/reset-password', 'system')
INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category])
VALUES ('管理角色', '/account/role-new', 'system')
INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category])
VALUES ('搜索所有地接', '/agency/all', 'system')
INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category])
VALUES ('所有海外功能', '/oversea/all', 'oversea')
INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category])
VALUES ('团预订', '/reservation/all', 'oversea')
INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category])
VALUES ('团预订(客服)', '/reservation/most', 'oversea')
INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category])
VALUES ('账单', '/invoice/all', 'oversea')
INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category])

@ -26,12 +26,12 @@ export const PERM_ACCOUNT_NEW = '/account/new'
export const PERM_ACCOUNT_DISABLE = '/account/disable'
export const PERM_ACCOUNT_RESET_PASSWORD = '/account/reset-password'
export const PERM_ROLE_NEW = '/account/role-new'
export const PERM_AGENCY_ALL = '/agency/all' // 可以搜索所有供应商
// 海外供应商
// category: oversea
export const PERM_OVERSEA = '/oversea/all' // @Deprecated 准备作废...
export const PERM_RESERVATION_ALL = '/reservation/all' // 供应商使用,只能搜索自己的数据
export const PERM_RESERVATION_MOST = '/reservation/most' // 客服使用,可是选择其他供应商搜索
export const PERM_RESERVATION_ALL = '/reservation/all'
export const PERM_INVOICE_ALL = '/invoice/all'
export const PERM_FEEDBACK_ALL = '/feedback/all'
export const PERM_REPORT_ALL = '/report/all'

@ -9,7 +9,7 @@ import useReservationStore from '@/stores/Reservation'
import useAuthStore from '@/stores/Auth'
import SearchForm from '@/components/SearchForm'
import { usingStorage } from '@/hooks/usingStorage'
import { PERM_RESERVATION_MOST } from '@/config';
import { PERM_AGENCY_ALL } from '@/config';
const { Title } = Typography
@ -160,7 +160,7 @@ function Newest() {
const getSelectedAgencyId = () => {
if (isPermitted(PERM_RESERVATION_MOST)) {
if (isPermitted(PERM_AGENCY_ALL)) {
return isEmpty(submitValues.agency) ? travelAgencyId : parseInt(submitValues.agency, 10)
} else {
return travelAgencyId
@ -231,7 +231,7 @@ function Newest() {
<SearchForm
initialValue={{unconfirmed: true}}
fieldsConfig={{
shows: isPermitted(PERM_RESERVATION_MOST) ? ['agency', 'referenceNo', 'dates', 'unconfirmed'] : ['referenceNo', 'dates', 'unconfirmed'],
shows: isPermitted(PERM_AGENCY_ALL) ? ['agency', 'referenceNo', 'dates', 'unconfirmed'] : ['referenceNo', 'dates', 'unconfirmed'],
sort: { agency: 0, },
fieldProps: {
dates: { label: t('group:ArrivalDate') },

Loading…
Cancel
Save