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

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

/**
 * 销售订单Api接口管理器
 *
 * @author fanzherong
 * @date  2025/04/10 09:31
 **/
export default {
	// 获取销售订单分页
	bizSaleOrderPage(data) {
		return request('page', data, 'get')
	},
	// 提交销售订单表单 edit为true时为编辑，默认为新增
	bizSaleOrderSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除销售订单
	bizSaleOrderDelete(data) {
		return request('delete', data)
	},
	// 获取销售订单详情
	bizSaleOrderDetail(data) {
		return request('detail', data, 'get')
	},
	//根据客户id查询销售订单信息
	queryByCustomerId(data){
		return request('queryByCustomerId',data,'get')
	},
	//详情
	detailById(data){
		return request('detailById',data,'get')
	}
}
