import request from '@/utils/request'
import state from '@/store'
import router from '@/router'

// 初始化合同
export function initPayState() {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间采购管理_采购合同_查询'
    }
  })
}
// 查询表1
export function searchParts(pageCurrent, pageSize, check1, num, check2, name) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间管理_质检情况_查询数据',
      param: `采购合同流水号_check=${check1}&采购合同流水号=${num}&供应商名称_check=${check2}&供应商名称=${name}`,
      Pagination: pageCurrent + '&' + pageSize
    }
  })
}
