import request from '@/utils/request'

/**
 * 附件订货清单条件查询
 * @param {*} data
 * @returns
 */
export function getFjList(data) {
  return request({
    url: '/api/gxzz/dhqd/fj/getcon',
    method: 'post',
    data
  })
}

/**
 * 附件订货清单添加
 * @param {*} data
 * @returns
 */
export function addFj(data) {
  return request({
    url: '/api/gxzz/dhqd/fj/add',
    method: 'post',
    data
  })
}

/**
 * 附件订货清单修改
 * @param {*} data
 * @returns
 */
export function updateFj(data) {
  return request({
    url: '/api/gxzz/dhqd/fj/update',
    method: 'post',
    data
  })
}

/**
 * 附件订货清单删除
 * @param {*} data
 * @returns
 */
export function delFj(data) {
  return request({
    url: '/api/gxzz/dhqd/fj/del',
    method: 'post',
    data
  })
}

/**
 * 管材订货清单查询
 * @param {*} data
 * @returns
 */
export function getGcList(data) {
  return request({
    url: '/api/gxzz/dhqd/gc/getcon',
    method: 'post',
    data
  })
}

/**
 * 管材订货清单添加
 * @param {*} data
 * @returns
 */
export function addGc(data) {
  return request({
    url: '/api/gxzz/dhqd/gc/add',
    method: 'post',
    data
  })
}

/**
 * 管材订货清单修改
 * @param {*} data
 * @returns
 */
export function updateGc(data) {
  return request({
    url: '/api/gxzz/dhqd/gc/update',
    method: 'post',
    data
  })
}

/**
 * 管材订货清单删除
 * @param {*} data
 * @returns
 */
export function delGc(data) {
  return request({
    url: '/api/gxzz/dhqd/gc/del',
    method: 'post',
    data
  })
}

export function gcBase(data) {
  return request({
    url: '/api/gxzz/dhqd/gcBase',
    method: 'post',
    data
  })
}
//管材订货到货管理
export function gcdhdhUpdate(data) {
  return request({
    url: '/api/gxzz/dhqd/gcdhdhUpdate',
    method: 'post',
    data
  })
}

/**
 * 物资需求计划条件查询
 * @param {*} data
 * @returns
 */
export function getXqjhList(data){
  return request({
    url: '/api/gxzz/xqjhmx/getcon',
    method: 'post',
    data
  })
}

/**
 * 物资需求计划添加
 * @param {*} data
 * @returns
 */
export function addXqjh(data){
  return request({
    url: '/api/gxzz/xqjhmx/add',
    method: 'post',
    data
  })
}

/**
 * 物资需求计划修改
 * @param {*} data
 * @returns
 */
export function updateXqjh(data){
  return request({
    url: '/api/gxzz/xqjhmx/update',
    method: 'post',
    data
  })
}


/**
 * 物资需求计划状态修改
 * @param {*} data
 * @returns
 */
export function updateXqzt(data){
  return request({
    url: '/api/gxzz/xqjhmx/updatestatus',
    method: 'post',
    data
  })
}

/**
 * 物资需求计划删除
 * @param {*} data
 * @returns
 */
export function delXqjh(data){
  return request({
    url: '/api/gxzz/xqjhmx/del',
    method: 'post',
    data
  })
}

/**
 * 查询领料明细
 * @param {*} data
 * @returns
 */
export function getNcfjppgl(data){
  return request({
    url: '/api/gxzz/ncfjppgl/list',
    method: 'post',
    data
  })
}

/**
 * 查询库存数据
 * @param {*} data
 * @returns
 */
export function getKc(data){
  return request({
    url: '/api/gxzz/ncfjppgl/kcList',
    method: 'post',
    data
  })
}

/**
 * 供货商查询
 * @param {*} data
 * @returns
 */
export function findCgghs(){
  return request({
    url: '/api/gxzz/ncfjppgl/findCgghs',
    method: 'get'
  })
}

/**
 * 直接配盘
 * @param {*} data
 * @returns
 */
export function editPsStatus(d){
  const data=d.data;
  return request({
    url: '/api/gxzz/ncfjppgl/editPsStatus/'+d.status,
    method: 'post',
    data
  })
}

/**
 * 保存
 * @param {*} data
 * @returns
 */
export function conserve(data){
  return request({
    url: '/api/gxzz/ncfjppgl/conserve',
    method: 'post',
    data
  })
}

/**
 * 手动回退
 * @param {*} data
 * @returns
 */
export function back(data){
  return request({
    url: '/api/gxzz/ncfjppgl/back',
    method: 'post',
    data
  })
}

export function getInstitutionList(data={}) {
  return request({
    url: '/api/sy/getInstitutionList',
    method: 'post',
    data
  })
}

/**
 * 安装附件入库管理保存
 * @param data
 * @returns {*}
 */
export function rkSave(data) {
  return request({
    url: '/api/gxzz/xqjhmx/rkSave',
    method: 'post',
    data
  })
}

export function gzjCkSave(data) {
  return request({
    url: '/api/gxzz/xqjhmx/gzjCkSave',
    method: 'post',
    data
  })
}

// 订货计划反馈
export function updateFk(data) {
  return request({
    url: '/api/gxzz/xqjhmx/updateFk',
    method: 'post',
    data
  })
}




export function queryDmFjMateria(data) {
  return request({
    url: '/api/gxzz/jcsj/dmfjmateria/queryDmFjMateria',
    method: 'post',
    data
  })
}

export function insertFjMateria(data) {
  return request({
    url: '/api/gxzz/jcsj/dmfjmateria/insertFjMateria',
    method: 'post',
    data
  })
}


export function deleteDmFjMateria(data) {
  return request({
    url: '/api/gxzz/jcsj/dmfjmateria/deleteDmFjMateria',
    method: 'post',
    data
  })
}

export function updateDmFjMateria(data) {
  return request({
    url: '/api/gxzz/jcsj/dmfjmateria/updateDmFjMateria',
    method: 'post',
    data
  })
}




export function plcf(data) {
  return request({
    url: '/api/gxzz/xqjhmx/plcf',
    method: 'post',
    data
  })
}

export function scdh(data) {
  return request({
    url: '/api/gxzz/xqjhmx/scdh',
    method: 'post',
    data
  })
}


export function queryProductionUnit(data) {
  return request({
    url: '/api/gxzz/xqjhmx/queryProductionUnit',
    method: 'post',
    data
  })
}

export function insertMs_xqjhmxp(data) {
  return request({
    url: '/api/gxzz/xqjhmx/insertMs_xqjhmxp',
    method: 'post',
    data
  })
}


export function queryMsXqjhmxpForfjrk(data) {
  return request({
    url: '/api/gxzz/xqjhmx/queryMsXqjhmxpForfjrk',
    method: 'post',
    data
  })
}

export function queryIm_crklsz(data) {
  return request({
    url: '/api/gxzz/Im_crklsz/queryIm_crklsz',
    method: 'post',
    data
  })
}


export function deleteIm_crklsz(data) {
  return request({
    url: '/api/gxzz/Im_crklsz/deleteIm_crklsz',
    method: 'post',
    data
  })
}

export function insertIm_crklsz(data) {
  return request({
    url: '/api/gxzz/Im_crklsz/insertIm_crklsz',
    method: 'post',
    data
  })
}
export function updateIm_crklsz(data) {
  return request({
    url: '/api/gxzz/Im_crklsz/updateIm_crklsz',
    method: 'post',
    data
  })
}

//xhj 订货计划查询
export function getXqjhmxDictBase(data) {return request({url: '/api/gxzz/xqjhmx/getXqjhmxDictBase', method: 'post', data})}
export function getDhjhcx(data) {return request({url: '/api/gxzz/xqjhmx/getDhjhcx', method: 'post', data})}
export function saveXqjh(data) {return request({url: '/api/gxzz/xqjhmx/saveXqjh', method: 'post', data})}


// 订货计划查询
export function getDhList(data) {return request({url: '/api/gxzz/xqjhmx/getDhList', method: 'post', data})}


export function updateXq(data) {return request({url: '/api/gxzz/xqjhmx/updateXq', method: 'post', data})}
// 取消订货
export function updateXqDh(data) {return request({url: '/api/gxzz/xqjhmx/updateXqDh', method: 'post', data})}



//附件需求计划管理取自
export function getMfgList(data) {return request({url: '/api/gxzz/xqjhmx/getMfgList', method: 'post', data})}
export function addXqjhFromMfg(data) {return request({url: '/api/gxzz/xqjhmx/addXqjhFromMfg', method: 'post', data})}


// 冲账
export function ckcz(data) {return request({url: '/api/gxzz/Im_crklsz/ckcz', method: 'post', data})}
export function rkcz(data) {return request({url: '/api/gxzz/Im_crklsz/rkcz', method: 'post', data})}
export function geteDhjhPrint(data) {return request({url: '/api/gxzz/xqjhmx/geteDhjhPrint', method: 'post', data})}
// 内场附件领用管理
export function ncfjck(data) {return request({url: '/api/gxzz/xqjhmx/ncfjck', method: 'post', data})}
export function ncfjckPrint(data) {return request({url: '/api/gxzz/xqjhmx/ncfjckPrint', method: 'post', data})}
export function ncfjcx(data) {return request({url: '/api/gxzz/xqjhmx/ncfjcx', method: 'post', data})}

// 安装附件 配货人打印
export function azfjBgyPrint(data){return request({url: '/api/gxzz/psmx/azfjBgyPrint', method: 'post', data })}
export function azfjCzPrint(data){return request({url: '/api/gxzz/psmx/azfjCzPrint', method: 'post', data })}
