| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448 |
- import { postJ, post, get, putJ } 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) {
- 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 updateSendInformation(data) {
- const res = await putJ(Vue.prototype.apiUrl + `/eom/saleordersendrecord/update`, data);
- if(res.code == 0) {
- return res.data;
- }
- 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, id) {
- console.log(data)
- const res = await postJ(Vue.prototype.apiUrl + '/wms/planOrder/reportWork?planOrderId=' + id, 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))
- }
- // 通过物品编码查询物品详情
- export async function getDetailsByCode(code) {
- const res = await get(Vue.prototype.apiUrl + `/main/category/getByCode/${code}`)
- if (res.code == 0) {
- return res.data
- }
- return Promise.reject(new Error(res.message))
- }
- // 验证是否重复入库
- export async function isVerifyRepeatIsStock(data) {
- const res = await postJ(Vue.prototype.apiUrl + `/wms/outindetailtwo/isVerifyRepeatIsStock`, data)
- if (res.code == 0) {
- return res.data
- }
- return Promise.reject(new Error(res.message))
- }
- // 生产入库申请驳回
- export async function notPass(data) {
- const res = await postJ(Vue.prototype.apiUrl + `/bpm/inwarehouse/notPass`, data)
- if (res.code == 0) {
- return res.data
- }
- return Promise.reject(new Error(res.message))
- }
- // 根据编码批量获取物品信息
- export async function getListByNameOrModeType(data) {
- const res = await postJ(Vue.prototype.apiUrl + `/main/category/getListByNameOrModeType`, data)
- if (res.code == 0) {
- return res.data
- }
- return Promise.reject(new Error(res.message))
- }
- // 仓库定义列表
- export async function warehouseDefinitionList(data) {
- const res = await post(Vue.prototype.apiUrl + `/wms/warehouse/select/warehouseList`, data)
- if (res.code == 0) {
- return res.data
- }
- return Promise.reject(new Error(res.message))
- }
|