inventory.js 7.04 KB
/*
 * @Author: gjn
 * @Date: 2024-07-08 10:39:44
 * @Description:
 */
import {
  post, del, put, downloadPDF
} from '../utils/http.js'

/**
 * 库存台账
 */
// 查询库存台账
export function getInventoryList(params) {
  return post('/Inventory/find/recursion', params)
}

// 查询库存台账
export function getCustomInventoryList(params) {
  return post('/Inventory/list/recursion', params)
}

/**
 * 库存流水
 */
// 查询库存流水台账
export function getInventoryFlowList(params) {
  return post('/InventoryFlow/find/recursion', params)
}

// 查询库存流水台账
export function getCustomInventoryFlowList(params) {
  return post('/InventoryFlow/list/recursion', params)
}

/**
 *不合格/试验报废数查询
 */
// 不合格数查询
export function getUnacceptedTable(params) {
  return post('/DxWorkflowTask/listCustomQueryByNoPass/findTest', params)
}
// 试验报废查询
export function getScrappedTable(params) {
  return post('/DxWorkflowTask/listCustomQueryIsDestroy/findExperment', params)
}

/**
 * 入厂检验
 */

// 查询入厂检验的表单
export function getInStorageRequestList(params) {
  return post('/DxWorkflowTask/inStorageTestTaskList', params)
}
export function getInStorageRequestListAmount(params) {
  return post('/DxWorkflowTask/inStorageTestTaskList/amount', params)
}
// 验收单保存
export function saveCheckNo(params) {
  return post('/JobResponseInTest/recursion', params)
}
// 验收单初始化
export function getCheckNoList(params) {
  return post('/JobResponseInTest/find/recursion', params)
}
// 入厂试验附件保存
export function saveExpe(params) {
  return post('/JobResponseInStorage/recursion', params)
}
// 入厂试验附件初始化
export function getExpeList(params) {
  return post('/JobResponseInStorage/find/recursion', params)
}
// 驳回
export function reject(params, reason) {
  return post(`/DxWorkflowTask/apply/reject?taskIds=${params.join(',')}&assignee=${localStorage.getItem('userId')}&backReason=${reason}`, {})
}
// 检验界面驳回
export function inspectReject(params) {
  return post(`/DxWorkflowTask/apply/reject/all`, params)
}
// 入厂检验界面检验完成
export function inspectPass(params) {
  return post(`/StorageRequestItem/purchaseApply/change/tranGm403BillItemInfoVo`, params)
}
// 检验完成
export function pass(params) {
  return post(`/DxWorkflowTask/apply/pass?taskIds=${params.join(',')}&assignee=${localStorage.getItem('userId')}`, {})
}
// 检验申请
export function check(params, userIds) {
  //
  return post(`/StorageRequestItem/purchaseApply/check?taskIds=${params.join(',')}&assignee=${localStorage.getItem('userId')}&userIds=${userIds.join(',')}`, {})
}
// 试验申请
export function experiment(params, userIds) {
  return post(`/StorageRequestItem/purchaseApply/experiment?taskIds=${params.join(',')}&assignee=${localStorage.getItem('userId')}&userIds=${userIds.join(',')}`, {})
}
// 例外放行
export function except(params) {
  return post(`/StorageRequestItem/purchaseApply/except?taskIds=${params.join(',')}&assignee=${localStorage.getItem('userId')}`, {})
}

// 判断选中的数据是否已经走过例外放行申请
export function getExcept(params) {
  return post(`/StorageRequestItem/getExceptIds?itemIds=${params.join(',')}`, {})
}

// 基准路径
export function downloadPdfHandle() {
  return downloadPDF()
}

/**
 * 供外出库
 */
// 出库
// export function searchOutStorage(params) {
//   return post(`/OutStorageRequest/find/recursion`, params)
// }
// 我的待办,己办任务,办结任务 //领用出库and配套出库and供外出库
export function searchOutStorageTask(params) {
  return post(`/OutStorageRequest/list/task`, params)
}
// 我的请求 ////领用出库and配套出库and供外出库
export function searchSelfRequest(params) {
  return post(`/OutStorageRequest/selfRequest`, params)
}

export function searchOutStorage(params) {
  return post(`/OutStorageRequest/userAndOutList/findRecursion`, params)
}
// 领用出库审核查询
export function searchOutStorageExamine(params) {
  return post(`/DxWorkflowTask/outStorageTaskList`, params)
}

//  供外出库审核
export function externalDeliveryApproval(params) {
  return post(`/OutStorageRequest/getAllByUrlName`, params)
}

// 新增
export function outStorageAdd(params) {
  return post(`/OutStorageRequest/recursion`, params)
}
export function outStorageAddUpdate(id, params) {
  return post(`/StorageRequestItem/saveUse?outId=${id}`, params)
}
// 编辑`
export function outStorageEdit(params) {
  return put(`/OutStorageRequest`, params)
}
// 查询库房
export function DxProductUnitUsageLink(params) {
  return post(`/DxProductUnitUsageLink/find/recursion`, params)
}

// 单个删除
export function outStorageDel(id) {
  return post(`/OutStorageRequest/purchaseApply/delete?ids=${id}`)
}

// 申请明细
// 查询
export function searchStorageRequest(params) {
  return post(`/StorageRequestItem/find/recursion`, params)
}

// 单个删除
export function storageRequestDel(id) {
  return del(`/StorageRequestItem/${id}`)
}

// 机型代码接口
export function getAircraftType(params) {
  return post('/DxProductDef/find/recursion', params)
}

// 物料查询
export function getDxProcessMaterial(params) {
  return post('/DxProcessMaterial/find/recursion', params)
}

// 子表删除
export function removeMaterial(params) {
  return post('/InventoryRequestUsageLink/recursion', params)
}

// 供外出库申请

// 提交申请
export function submitOutPass(params, userIds) {
  return post(`/OutStorageRequest/outApply/submit?applyIds=${params.join(',')}&assignee=${localStorage.getItem('userId')}&userIdList=${userIds}`)
}

// 提交申请
export function submitPass(params) {
  return post(`/OutStorageRequest/outApply/submit?applyIds=${params.join(',')}&assignee=${localStorage.getItem('userId')}`)
}
// 驳回
export function rejectOutStorage(params, reason) {
  return post(`OutStorageRequest/apply/back?applyIds=${params.join(',')}&assignee=${localStorage.getItem('userId')}&backReason=${reason}`)
}

// 领用校验是否存在申请明细
export function OutStorageRequestCheck(params) {
  return post(`/OutStorageRequest/reviewRequestApplicationBefore/check?outStorageRequestIds=${params.join(',')}`)
}

// 三期处理台账查询
export function InStorageExpireInventory(params) {
  return post('/DxWorkflowTask/outStorageTaskList', params)
}
// 三期处理申请
export function InStorageExpireApply(params) {
  return post('/InventoryRequestExpire/threeStageTreatment/dealWith', params)
}
// 通过当前明细的id获取流程任务的id
export function getProcessId(params) {
  return post(`/DxProcessOperation/find/recursion`, params)
}
// 装配执行 编辑器 附件上传 获取
export function assemblyExecutionUpload(params) {
  return post(`/DxProcessOperation/find/recursion`, params)
}
// 装配执行 编辑器 附件上传 保存
export function AttachmentPreservation(params) {
  return post(`/DxProcessOperation/recursion`, params)
}
/**
 * 召回处理数据获取
 * @param {*} params
 * @returns
 */
export function recallProcess(params) {
  return post('/DxWorkflowTask/outStorageTaskLists', params)
}