import request from '@/utils/request'
// 采购合同查询
export function searchContract() {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '库存管理_库存管理_采购合同查询'
    }
  })
}
export function searchShopContract() {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '库存管理_库存管理_车间采购合同查询'
    }
  })
}

// 仓库查询
export function searchInventory() {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '库存管理_货位主文件_仓库查询'
    }
  })
}
// 入库记录查询
export function searchInbound(...data) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '库存管理_入库记录_采购部查询',
      param: `采购合同流水号_check=${data[0]}&采购合同流水号=${data[1]}&到货时间_check=${data[2]}&到货开始时间=${data[3]}&到货结束时间=${data[4]}&仓库流水号_check=${data[5]}&仓库流水号=${data[6]}`
    }
  })
}
// 车间采购查询
export function searchShopInbound(data1, data2, data3) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '库存管理_入库记录_车间采购查询',
      param: '采购合同流水号=' + data1 + '&到货时间=' + data2 + '&仓库流水号=' + data3
    }
  })
}
// 入库单查询
export function searchInboundCard(data1, data2) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '库存管理_采购入库单_入库单查询',
      param: '入库单号_check=' + data1 + '&入库单号=' + data2
    }
  })
}
// 入库单增加
export function addInboundCard(data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '2',
      name: '库存管理_采购入库单_入库单增加',
      param: '入库日期=' + data1 + '&仓库流水号=' + data2 + '&合同流水号=' + data3 + '&到货单号=' + data4 + '&业务员=' + data5 + '&业务号=' + data6 + '&到货日期=' + data7 + '&业务类型=' + data8 + '&采购类型=' + data9 + '&入库类别=' + data10 + '&备注=' + data11
    }
  })
}
// 入库单删除
export function deleteInboundCard(data1) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '2',
      name: '库存管理_采购入库单_入库单删除',
      param: '采购入库单流水号=' + data1
    }
  })
}
// 入库单修改
export function editInboundCard(data0, data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '2',
      name: '库存管理_采购入库单_入库单修改',
      param: '采购入库单流水号=' + data0 + '&入库日期=' + data1 + '&仓库流水号=' + data2 + '&合同流水号=' + data3 + '&到货单号=' + data4 + '&业务员=' + data5 + '&业务号=' + data6 + '&到货日期=' + data7 + '&业务类型=' + data8 + '&采购类型=' + data9 + '&入库类别=' + data10 + '&备注=' + data11
    }
  })
}
// 库存角色查询
export function searchAffairPeople(data1) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '库存管理_人员查询_库存部门',
      param: '角色编号=' + data1
    }
  })
}

// 入库单明细查询
export function searchInboundCardDetail(data1) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '库存管理_采购入库单_入库单明细_查询数据',
      param: '采购入库单流水号=' + data1
    }
  })
}
// 入库单明细增加
export function addInboundCardDetail(data1, data2, data3, data4, data5, data6, data7) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '2',
      name: '库存管理_采购入库单_批量增加入库单明细',
      param: '采购入库单流水号=' + data1 + '&名称组=' + data2 + '&型号组=' + data3 + '&规格组=' + data4 + '&图号组=' + data5 + '&数量组=' + data6 + '&本币单价组=' + data7
    }
  })
}

// 入库单明细删除
export function deleteInboundCardDetail(data1) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '2',
      name: '库存管理_采购入库单_采购入库单明细删除',
      param: '采购入库单明细流水号=' + data1
    }
  })
}
