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)) }