import request from '@/utils/request';

/**
 * 查询供应商列表
 * @param query
 * @returns {*}
 */

export const listProductor = (query) => {
    return request({
        url: '/jdyw/productor/list',
        method: 'get',
        params: query
    });
};
/**
 * 查询供应商信息详细
 * @param id
 */
export const getProductor = (id) => {
    return request({
        url: '/jdyw/productor/' + id,
        method: 'get'
    });
};

/**
 * 新增供应商信息
 * @param data
 */
export const addProductor = (data) => {
    return request({
        url: '/jdyw/productor',
        method: 'post',
        data: data
    });
};

/**
 * 修改供应商信息
 * @param data
 */
export const updateProductor = (data) => {
    return request({
        url: '/jdyw/productor',
        method: 'put',
        data: data
    });
};

/**
 * 删除供应商信息
 * @param id
 */
export const delProductor = (id: string | number | Array<string | number>) => {
    return request({
        url: '/jdyw/productor/' + id,
        method: 'delete'
    });
};

/**
 * 查询售后人员列表
 * @param query
 * @returns {*}
 */

export const listProductorEngineers = (query) => {
  return request({
      url: '/jdyw/productorEngineers/list',
      method: 'get',
      params: query
  });
};
/**
* 查询售后人员信息详细
* @param id
*/
export const getProductorEngineers = (id) => {
  return request({
      url: '/jdyw/productorEngineers/' + id,
      method: 'get'
  });
};

/**
* 新增售后人员信息
* @param data
*/
export const addProductorEngineers = (data) => {
  return request({
      url: '/jdyw/productorEngineers',
      method: 'post',
      data: data
  });
};

/**
* 修改售后人员信息
* @param data
*/
export const updateProductorEngineers = (data) => {
  return request({
      url: '/jdyw/productorEngineers',
      method: 'put',
      data: data
  });
};
/**
* 删除售后人员信息
* @param id
*/
export const delProductorEngineers = (id: string | number | Array<string | number>) => {
  return request({
      url: '/jdyw/productorEngineers/' + id,
      method: 'delete'
  });
};
