import { postJ, post, get } from '@/utils/request' import Vue from 'vue' // 获取仓库列表 export async function getWarehouseList() { const res = await postJ(Vue.prototype.apiUrl + `/wms/warehouse/getWarehouseList`, {}) if (res.code == 0) { return res } return Promise.reject(new Error(res.message)) } // 根据type查分类树组 export async function getProduceTreeByPid(data) { const res = await get(Vue.prototype.apiUrl + `/main/categoryLevel/getProduceTreeByPid`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 物品维度台账列表 export async function getProductList(data) { console.log(data) const res = await get(Vue.prototype.apiUrl + `/wms/outindetailtwo/page`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 批次维度台账列表 export async function getBatchList(data) { console.log(data) const res = await get(Vue.prototype.apiUrl + `/wms/outindetailtwo/batchPage`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 包装维度台账列表 export async function getPackingList(data) { console.log(data) const res = await get(Vue.prototype.apiUrl + `/wms/outInDetailRecordTwo/page`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 包装维度流水 export async function outInRecordsPage(data) { const res = await get(Vue.prototype.apiUrl + `/wms/outInDetailRecordTwo/outInRecordsPage`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 获取出入库台账 export async function getOutInList(data) { const res = await get(Vue.prototype.apiUrl + `/wms/outintwo/page`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 根据type查分类树组 export async function getTreeByGroup(data) { const res = await get(Vue.prototype.apiUrl + `/main/categoryLevel/getProduceTreeByPid`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 根据ids查询物品分类 export async function getTreeByIds(data) { const res = await get(Vue.prototype.apiUrl + `/pda/main/categoryLevel/pdaTreeByPid`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 获取物品分类列表 export async function getCategoryList(data) { console.log(data) const res = await get(Vue.prototype.apiUrl + `/main/category/getList`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 生成编码 export async function getCode(code) { const res = await get(Vue.prototype.apiUrl + `/main/codemanage/getCode/${code}`) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 通过物品id获取供货商列表 export async function contactQueryByCategoryIdsAPI(data) { const res = await postJ(Vue.prototype.apiUrl + `/eom/contact/queryByCategoryIds`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 根据物品ID获取包装维度 export async function getCategoryPackageDisposition(data) { const res = await postJ(Vue.prototype.apiUrl + `/main/categoryPackageDisposition/list`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 批量获取包装编码 export async function getAssetNum(data) { const res = await postJ(Vue.prototype.apiUrl + `/wms/outintwo/getAssetNum`, data) if (res.code == 0) { return res } return Promise.reject(new Error(res.message)) } // 入库 export async function storage(data) { const res = await postJ(Vue.prototype.apiUrl + `/wms/outintwo/inStorage`, data) if (res.code == 0) { return res } return Promise.reject(new Error(res.message)) } // 提交质检流程 export async function qualityInspectionTwo(data) { const res = await postJ(Vue.prototype.apiUrl + `/bpm/outinApprove/qualityInspectionTwo`, data) if (res.code == 0) { return res } return Promise.reject(new Error(res.message)) } // 提交流程(入库) export async function submitTwo(data) { const res = await postJ(Vue.prototype.apiUrl + `/bpm/outinApprove/submitTwo`, data) if (res.code == 0) { return res } return Promise.reject(new Error(res.message)) } // 获取入库详情 export async function getInboundDetailsById(id) { const res = await get(Vue.prototype.apiUrl + `/wms/outintwo/getById/${id}`) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 获取入库详情(出库单号) export async function getInboundDetailsByBizNo(id) { const res = await get(Vue.prototype.apiUrl + `/wms/outintwo/getInfoByBizNo/${id}`) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 通过台账id获取出库物品详情 export async function getHierarchyList(params) { const res = await get(Vue.prototype.apiUrl + `/wms/outintwo/getHierarchyList`, params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } export async function getHierarchyFifo(data) { const res = await postJ(Vue.prototype.apiUrl + `/wms/outintwo/getHierarchyFifo`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 出库 export async function outStorage(data) { const res = await postJ(Vue.prototype.apiUrl + `/wms/outintwo/outStorage`, data) if (res.code == 0) { return res } return Promise.reject(new Error(res.message)) } // 提交流程(出库) export async function submitInsideTwo(data) { const res = await postJ(Vue.prototype.apiUrl + `/bpm/outApprove/submitInsideTwo`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 出入库申请列表通过入库申请单查询详情 export async function getApplystoragedetail(params) { const res = await get(Vue.prototype.apiUrl + `/wms/applystoragedetail/list`, params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 出入库申请列表 export async function getinboundRequestsList(params) { const res = await get(Vue.prototype.apiUrl + `/wms/applystorage/page`, params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 库内调拨列表 export async function getAllotApplyPage(params) { const res = await get(Vue.prototype.apiUrl + `/wms/allotApply/page`, params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 仓库树 export async function getWarehouseTrees(params) { const res = await get(Vue.prototype.apiUrl + `/wms/warehouse/getTrees`, params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 调拨保存 export async function allotApplySave(data) { const res = await postJ(Vue.prototype.apiUrl + `/wms/allotApply/save`, data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 库内调拨详情列表 export async function getAllotDetailList(params) { const res = await get(Vue.prototype.apiUrl + `/wms/allotDetail/list`, params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 库内调拨详情 export async function getAllotDetail(id) { const res = await get(Vue.prototype.apiUrl + `/wms/allotApply/getById/${id}`) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 盘点工单列表 export async function getPlanOrderList(params) { const res = await get(Vue.prototype.apiUrl + '/wms/planOrder/page', params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 盘点工单物品详情 export async function getPlanDetailList(params) { const res = await get(Vue.prototype.apiUrl + '/wms/plandetail/page', params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 盘点报工 export async function reportWork(data) { console.log(data) const res = await postJ(Vue.prototype.apiUrl + '/wms/planOrder/reportWork', data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 盘点工单详情 export async function getOrderInfoByPlanId(params) { const res = await get(Vue.prototype.apiUrl + '/wms/plan/getOrderInfoByPlanId', params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 报损报溢列表 export async function getReportList(params) { const res = await get(Vue.prototype.apiUrl + '/wms/plandetail/list', params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 报损报溢列表 export async function getPlanProfitLoss(params) { const res = await get(Vue.prototype.apiUrl + '/wms/planProfitLoss/page', params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 报损报溢保存 export async function saveReportsList(data) { const res = await postJ(Vue.prototype.apiUrl + '/wms/planProfitLoss/save', data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 获取临时盘点计划详情 export async function getReportPlanDetailById(id) { const res = await get(Vue.prototype.apiUrl + '/wms/planProfitLoss/getById/' + id) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 拣货列表 export async function getPickgoodsList(params) { const res = await get(Vue.prototype.apiUrl + '/wms/pickgoods/page', params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 通过包装编码获取包装详情 export async function outInGoodsPackingList(data) { const res = await postJ(Vue.prototype.apiUrl + '/wms/outInDetailRecordTwo/outInGoodsPackingList', data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 库存台账调拨 export async function getAllotDetails(params) { const res = await get(Vue.prototype.apiUrl + `/wms/allotDetail/page`, params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 库存台账盘点 export async function getPlandetails(params) { const res = await get(Vue.prototype.apiUrl + `/wms/plandetail/page`, params) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) } // 保存拣货单 export async function savePickgoods(data) { const res = await postJ(Vue.prototype.apiUrl + '/wms/pickgoods/save', data) if (res.code == 0) { return res.data } return Promise.reject(new Error(res.message)) }