Newer
Older
xc-business-system / src / api / business / manager / interchangeReceipt.ts
dutingting on 29 Nov 2 KB 解决冲突
/**
 * 智能模型交接单
 */
import request from '../../index'
import type { IListQuery } from '@/views/business/manager/interchangeReceipt/interchangeReceipt-interface'
const prefix = '/business/interchange'

// 列表查询
export function getReceiptList(data: IListQuery) {
  return request({
    url: `${prefix}/listPage?offset=${data.offset}&limit=${data.limit}`,
    method: 'post',
    data
  })
}

// 导出列表
export function exportReceiptList(data: Omit<IListQuery, 'limit' | 'offset'>) {
  return request({
    url: `${prefix}/export`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 删除
export function deleteReceiptList(data: { id: string }) {
  return request({
    url: `${prefix}/delete`,
    method: 'post',
    data
  })
}

// 新增
export function addInterchangeReceipt(data: any) {
  return request({
    url: `${prefix}/add`,
    method: 'post',
    data
  })
}

// 编辑
export function updateInterchangeReceipt(data: any) {
  return request({
    url: `${prefix}/update`,
    method: 'post',
    data
  })
}

// 详情
export function getInterchangeReceiptDetail(data: { id: string }) {
  return request({
    url: `${prefix}/detail`,
    method: 'post',
    data
  })
}

// 查询样品列表
export function getSampleList(data: {
  customerId: string
  customerName: string
  sampleName: string
  sampleNo: string
  offset: number
  limit: number
}) {
  return request({
    url: `${prefix}/listPageByInterchange?offset=${data.offset}&limit=${data.limit}`,
    method: 'post',
    data
  })
}

// 批量创建智能模型交接单
export function batchAddInterchangeReceipt(data: any) {
  return request({
    url: `${prefix}/batchAdd`,
    method: 'post',
    data
  })
}

// 导出word/pdf/打印
export function getStream(data: any) {
  return request({
    url: '/business/interchange/exportFile',
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 批量打印
export function batchPrint(data: any) {
  return request({
    url: '/business/interchange/batchPrint',
    method: 'post',
    responseType: 'blob',
    data
  })
}