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