// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/**
 * 生产进度看板配置分页查询
 * @param params
 * @param options?
 */
export async function pageProductionProgressKanbanSetting(
  body: Report.Settings.ProductionProgressKanbanSettingCriteria,
  options?: { [key: string]: any },
) {
  return request<
    Api.ServiceResult<Api.PageResult<Report.Settings.ProductionProgressKanbanSettingDto>>
  >('/productionProgressKanbanSetting/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/**
 * 生产进度看板配置创建
 * @param body
 * @param options
 */
export async function create(
  body: Report.Settings.ProductionProgressKanbanSettingCreate,
  options?: { [key: string]: any },
) {
  return request<Common.ServiceResult<string>>('/productionProgressKanbanSetting/create', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/**
 * 生产进度看板配置更新
 * @param body
 * @param options
 */
export async function update(
  body: Report.Settings.ProductionProgressKanbanSettingUpdate,
  options?: { [key: string]: any },
) {
  return request<Common.ServiceResult<string>>('/productionProgressKanbanSetting/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/**
 * 生产进度看板配置删除
 * @param body
 * @param options
 */
export async function remove(body: Common.RemoveDto, options?: { [key: string]: any }) {
  return request<Common.ServiceResult<string>>(`/api/productionProgressKanbanSetting/remove`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
