import request from '@/utils/request'

/**
 * 船只编号
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function queryProject(data) {
  return request({
    url: '/api/gj/dmProject/getpro',
    method: 'post',
    data
  })
}

/**
 * 生产作业管理-条件查询
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpWorkPlanList(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/getList',
    method: 'post',
    data
  })
}

/**
 * 生产作业管理-保存
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpWorkPlanSave(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/save',
    method: 'post',
    data
  })
}

/**
 * 生产作业管理-提交
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpWorkPlanTj(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/tj',
    method: 'post',
    data
  })
}



/**
 * 生产作业审核-审核
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanSH(data) {
  return request({
    url: 'api/txzz/mpWorkPlan/sh',
    method: 'post',
    data
  })
}

/**
 * 生产作业审核-退回
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanTH(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/ht',
    method: 'post',
    data
  })
}

/**
 * 生产作业计划审批-审批
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanSP(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/sp',
    method: 'post',
    data
  })
}

/**
 * 镀锌计划管理-查询
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanDxList(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/getListForDx',
    method: 'post',
    data
  })
}

/**
 * 镀锌计划管理-保存
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanDxSave(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/saveForDX',
    method: 'post',
    data
  })
}


/**
 * 制作完工转运-保存
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanWXZYSave(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/saveForWGZY',
    method: 'post',
    data
  })
}



/**
 * 镀锌单位
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanDX(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/selectForDxdept',
    method: 'post',
    data
  })
}

/**
 * 镀锌转运单接收-查询
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanZY(data) {
  return request({
    url: 'api/txzz/mpWorkPlan/getListZYDJS',
    method: 'post',
    data
  })
}

/**
 * 镀锌转运单保存
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanZYBC(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/saveForZYDJS',
    method: 'post',
    data
  })
}

/**
 * 镀锌完工转运-保存
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanDXZY(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/saveForDXWGZY',
    method: 'post',
    data
  })
}

/**
 * 涂装转运单接收-查询
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanTZ(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/getListZYDJS',
    method: 'post',
    data
  })
}

/**
 * 涂装转运单保存
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanTZBC(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/saveForZYDJS',
    method: 'post',
    data
  })
}

/**
 * 涂装完工转运-查询
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanTZCX(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/selectForTZWGZY',
    method: 'post',
    data
  })
}

/**
 * 涂装完工转运-保存
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanTZWGBC(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/saveForTZWGZY',
    method: 'post',
    data
  })
}

/**
 * 铁舾完工入库-查询
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanTX(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/getListZYDJS',
    method: 'post',
    data
  })
}

/**
 * 铁舾完工入库-保存
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanTXBC(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/saveForZYDJS',
    method: 'post',
    data
  })
}



/**
 * 铁舾制作完工转运打印转运单查询
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanDYCX(data) {
  return request({
    url: '/api/txzz/mpWorkPlan/selectForPrint',
    method: 'post',
    data
  })
}

/**
 * 铁舾涂装完工转运打印转运单查询
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpPlanCX(data) {
  return request({
    url: 'api/txzz/mpWorkPlan/selectForTZPrint',
    method: 'post',
    data
  })
}

// 单位转码
export function wgzyBase(data) { return request({ url: '/api/txzz/mpWorkPlan/getDept ', method: 'post', data }) }

export  function getBMBM(bm,dict) {
  for (const b in dict) {
    if (dict[b].departCode === bm) {
      return dict[b].departName;
    }
  }
  return ''
}
/**
 * 需求单位查询
 * @param {*} data
 * @returns
 */
export function allWpsj(data) {
  return request({
    url: '/api/gxzz/xqdw/all',
    method: 'post',
    data
  })
}
/**
 * 生产明细-查询
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function mpSCMXCX(data) {
  return request({
    url: '/api/txzz/mpManuProcess/selectForSCMX',
    method: 'post',
    data
  })
}

/**
 * 结构完成情况(件)
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function JGWCJ(data) {
  return request({
    url: '/api/txzz/mpManuProcess/selectForJGWCJ',
    method: 'post',
    data
  })
}

/**
 * 流程卡审核
 * @param {*} data
 * @returns {import('axios').AxiosPromise}
 */
export function LCKSH(data) {
  return request({
    url: 'api/tx/jszb/dzgl/sh',
    method: 'post',
    data
  })
}
