import request from '@/axios'
import { REQUEST_BASE } from '@/constants'
import { searchOrder } from './types'
export const getOrderList = (params: searchOrder): Promise<IResponse> => {
  return request.get({ url: `${REQUEST_BASE}/order`, params })
}
export const getOrderDetail = (id: number): Promise<IResponse> => {
	return request.get({ url: `${REQUEST_BASE}/order/${id}`})
}
export const assignSalesman = (id:number,data: any): Promise<IResponse> => {
  return request.post({ url: `${REQUEST_BASE}/decoration/order/assign/${id}`, data })
}
export const assignDesigner = (id:number,data: any): Promise<IResponse> => {
  return request.post({ url: `${REQUEST_BASE}/decoration/order/designer/${id}`, data })
}
export const assignWorker = (params: searchOrder): Promise<IResponse> => {
  return request.post({ url: `${REQUEST_BASE}/decoration/order/`, params })
}
export const passAddItem = (id: number): Promise<IResponse> => {
  return request.post({ url: `${REQUEST_BASE}/decoration/order/pass/${id}`})
}
//decoration/order/pass/:id

