import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/receiptcompany/` + url, ...arg)

/**
 * 收货单位Api接口管理器
 *
 * @author 徐超
 * @date  2025/01/02 17:45
 **/
export default {
	// 获取收货单位分页
	bizReceiptCompanyPage(data) {
		return request('page', data, 'get')
	},
	// 提交收货单位表单 edit为true时为编辑，默认为新增
	bizReceiptCompanySubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除收货单位
	bizReceiptCompanyDelete(data) {
		return request('delete', data)
	},
	// 获取收货单位详情
	bizReceiptCompanyDetail(data) {
		return request('detail', data, 'get')
	}
}
