接单工单支持编辑与删除,修复编辑押金不生效问题
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { apiDelete, apiGet, apiPost } from '@/lib/http'
|
||||
import { apiDelete, apiGet, apiPost, apiPut } from '@/lib/http'
|
||||
import type {
|
||||
UploadedFile,
|
||||
WorkCategory,
|
||||
@@ -219,6 +219,29 @@ export function publishAdminWorkOrder(workOrderId: number) {
|
||||
)
|
||||
}
|
||||
|
||||
export function updateAdminWorkOrder(
|
||||
workOrderId: number,
|
||||
payload: {
|
||||
productName?: string
|
||||
platformOrderId?: string
|
||||
categoryId?: number | null
|
||||
rewardAmount?: number
|
||||
requiredDepositAmount?: number
|
||||
fieldsText?: string
|
||||
},
|
||||
) {
|
||||
return apiPut<{ order: WorkOrder }>(
|
||||
`/api/v1/admin/worker-platform/orders/${workOrderId}`,
|
||||
payload,
|
||||
)
|
||||
}
|
||||
|
||||
export function deleteAdminWorkOrder(workOrderId: number) {
|
||||
return apiDelete<{ deleted: boolean }>(
|
||||
`/api/v1/admin/worker-platform/orders/${workOrderId}`,
|
||||
)
|
||||
}
|
||||
|
||||
export function unpublishAdminWorkOrder(workOrderId: number) {
|
||||
return apiPost<{ order: WorkOrder }>(
|
||||
`/api/v1/admin/worker-platform/orders/${workOrderId}/unpublish`,
|
||||
|
||||
Reference in New Issue
Block a user