import request from '@/utils/http' export type QcMaterialAmountAuthUser = { id: string userId: string userNo: string nickName: string phoneNo: string deptName: string status: string grantTime: string } export function fetchQcMaterialAmountAuthUsers(params?: { page?: number pageSize?: number keyword?: string }) { return request.get>({ url: '/web/admin/qc-material-amount-auth/users', params }) } export function fetchGrantQcMaterialAmountAuth(userId: string) { return request.post<{ created: boolean }>({ url: '/web/admin/qc-material-amount-auth/users', data: { userId } }) } export function fetchRevokeQcMaterialAmountAuth(userId: string) { return request.delete({ url: `/web/admin/qc-material-amount-auth/users/${userId}` }) } export function fetchBatchRevokeQcMaterialAmountAuth(userIds: string[]) { return request.post<{ count: number }>({ url: '/web/admin/qc-material-amount-auth/users/batch-revoke', data: { userIds } }) }