import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { SalesStatusApplicationVO, SalesStatusApplicationForm, SalesStatusApplicationQuery, ProdSalesStatusAuditBo } from '@/api/product/audit/types';

/**
 * 退回申请
 * @param data
 */
export const rejectApplication = (data: ProdSalesStatusAuditBo) => {
  return request({
    url: '/product/audit/rejectApplication',
    method: 'post',
    data: data
  });
};

/**
 * 审核通过
 * @param data
 */
export const auditPass = (data: ProdSalesStatusAuditBo) => {
  return request({
    url: '/product/audit/auditPass',
    method: 'post',
    data: data
  });
};

/**
 * 根据申请id查询申请详情（状态申请、渠道申请、机构申请）
 * @param applicationId
 */
export const infoByApplicationId = (applicationId: number) => {
  return request({
    url: '/product/audit/infoByApplicationId?applicationId=' + applicationId,
    method: 'get'
  });
};
/**
 * 审核页面----分页查询申请中、审核中申请记录
 * @param query
 */
export const queryApplicationList = (query: PageQuery) => {
  return request({
    url: '/product/audit/queryApplicationList',
    method: 'post',
    data: query
  });
};
