/*
* Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
*
* https://www.mall4j.com/
*
* 未经允许，不可做商业用途！
*
* 版权所有，侵权必究！
*/
import request from '@/utils/request'

export function page (pageParam) {
  return request({
    url: '/mall4cloud_order/s/order_invoice/page',
    method: 'get',
    params: pageParam
  })
}

export function get (orderInvoiceId) {
  return request({
    url: '/mall4cloud_order/s/order_invoice',
    method: 'get',
    params: {
      orderInvoiceId
    }
  })
}

export function save (data) {
  return request({
    url: '/mall4cloud_order/s/order_invoice',
    method: 'post',
    data
  })
}

export function update (data) {
  return request({
    url: '/mall4cloud_order/s/order_invoice',
    method: 'put',
    data
  })
}

export function fileInfo (fileId) {
  return request({
    url: '/mall4cloud_biz/m/attach_file/get_file_by_id',
    method: 'get',
    params: {
      fileId
    }
  })
}

export function getIsUploadInvoice (orderId) {
  return request({
    url: '/mall4cloud_order/s/order_invoice/is_upload',
    method: 'get',
    params: {
      orderId
    }
  })
}
