44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
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<Api.Common.PageList<QcMaterialAmountAuthUser>>({
|
|
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 }
|
|
})
|
|
}
|