import { transaction, dict, baseServer } from '@/api'
import request from '@/utils/require'

// 列表页
export function list(data) {
  let { pageNum, pageSize } = data
  delete data.pageNum
  delete data.pageSize
  return request({
    url: `${transaction}/entryandexitorder/select?pageNum=${pageNum}&pageSize=${pageSize}`,
    method: 'post',
    data: data
  })
}
//字典查品种
export function varietys(pdictCode) {
  return request({
    url:`${dict}/dataDictionary/getDataGroup?groupId=PM001&pdictCode=11`,

    method: 'get'
  })
}
// 查库点
export function companies() {
  return request({
    url: `${baseServer}/sinkpointList`,
    method: 'post',
    data: {}
  })
}
// 新增
export function insert(data) {
  return request({
    url: `${transaction}/warehousingarrangement/insert`,
    method: 'post',
    data: data
  })
}
// 更新
export function update(data) {
  return request({
    url: `${transaction}/warehousingarrangement/update?sjlx=1`,
    method: 'post',
    data: data
  })
}
// 详情
export function detail(data) {
  return request({
    url: `${transaction}/warehousingarrangement/selectDetail`,
    method: 'post',
    data: data
  })
}
// 详情
export function del(id) {
  return request({
    url: `${transaction}/warehousingarrangement/del/${id}`,
    method: 'delete'
  })
}
