You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1233 lines
29 KiB

1 year ago
import request from '@/common/request.js'
import promise from '@/common/promise.js'
// let printUrl = getApp().globalData.print_url; //打印
let printUrl = "" //打印
let devUrl = getApp().globalData.dev_url; //数据请求
export function getlogin(params) { //
return request(devUrl + "/api/pda/account/login", { //
data: params,
method: "post"
})
}
export function getMenus() { //
return promise(devUrl + "/api/pda/account/menus", { //
data: {},
method: "get"
})
}
export function getUserInfo() {
return request(devUrl + "/api/pda/account/workgroups", { //
data: {},
method: "get"
})
}
export function getUserInfoAsync() {
return promise(devUrl + "/api/pda/account/workgroups", { //
data: {},
method: "get"
})
}
export function getWorkgroups() {
return promise(devUrl + "/api/pda/account/workgroups", { //
data: {},
method: "get"
})
}
//登出
export function logout() {
return request(devUrl + "/api/pda/account/logout", {
method: "post"
});
}
// export function logout() {//
// return request("/prod/api/pda/account/logout", {
// data: {},
// method: "post"
// })
// }
//按用户查询菜单列表
export function menus() {
return request(
devUrl + "/api/pda/account/menus", {
method: 'get',
data: {}
})
}
//获取任务数量
export function getJobCount() {
return request(
devUrl + "/api/pda/job/count", {
method: 'get',
data: {}
})
}
//获取任务数量
export function getJobCountAsync(isToday) {
return promise(
devUrl + "/api/pda/job/count?isToday=" + isToday, {
method: 'get',
data: {}
})
}
//按用户查询用户信息
export function profile(params) { //
return request(devUrl + "/api/pda/account/profile", { //
data: params,
method: "get"
})
}
//修改用户密码
export function changePassword(params) { //
return request(devUrl + "/api/pda/account/change-password", { //
data: params,
method: "post"
})
}
//通用
//查询库存明细
export const balances = (params) => request(
devUrl + "/api/pda/inventory/balances", {
method: 'get',
data: params
});
//通用
//查询库存明细
export const issueBalances = (params) => request(
devUrl + "/api/pda/inventory/balances/by-issue", {
method: 'post',
data: params
});
//异步的库存查询方法
export const issueBalancesAsync = (params) => promise(
devUrl + "/api/pda/inventory/balances/by-issue", {
method: 'post',
data: params
});
//通用
//查询库存明细
export const getBalances = (params) => request(
devUrl + "/api/pda/inventory/balances/get-list-by-balance-list-input", {
method: 'post',
data: params
});
//异步的库存查询方法
export const getBalancesAsync = (params) => promise(
devUrl + "/api/pda/inventory/balances/get-list-by-balance-list-input", {
method: 'post',
data: params
});
//根据物料、箱码、托码、批次、库位类型、库存状态查询库存
1 year ago
export const getBalancesByFilter = (params) => request(
devUrl + "/api/pda/inventory/balances/by-balances-request-many-parameter", {
method: 'post',
data: params
});
//根据物料、箱码、托码、批次、库位类型、库存状态查询库存
1 year ago
export const getBalancesByFilterAsync = (params) => promise(
devUrl + "/api/pda/inventory/balances/by-balances-request-many-parameter", {
method: 'post',
data: params
});
//查询是否有预计入和预计出的占用
export const getBalancesExpectByFilter = (params) => request(
devUrl + "/api/pda/inventory/balances/by-balances-request-many-parameter-not-in-expect-out", {
method: 'post',
data: params
});
//
//根据库位查询库存
export const getBalancesByStatus = (params) => request(
devUrl + "/api/pda/inventory/balances/get-by-location-type-and-inventory-status", {
method: 'post',
data: params
});
//根据库位和物料号查询库存
1 year ago
export const getBalancesByLocationAndItem = (params) => request(
devUrl + "/api/pda/inventory/balances/get-by-location-and-item?locationCode=" + params.locationCode +
"&itemCode=" + params.itemCode, {
method: 'get',
data: params
});
//根据库位和物料号查询库存
1 year ago
export const getBalancesByLocationAndItemAsync = (params) => promise(
devUrl + "/api/pda/inventory/balances/get-by-location-and-item?locationCode=" + params.locationCode +
"&itemCode=" + params.itemCode, {
method: 'get',
data: params
});
//查询线边库存
export const getWipListAsync = (params) => promise(
devUrl + "/api/pda/inventory/balances/get-wip-list?itemCode=" + params.itemCode + "&locationCode=" + params
.locationCode, {
method: 'get',
data: params
});
//查询库存汇总
export const summary = (params) => request(
devUrl + "/api/pda/inventory/balances/summary", {
method: 'get',
data: params
});
//物料
//查询物料信息
1 year ago
export const getitems = (code) => request(
devUrl + "/api/pda/item/" + code, {
method: 'get',
data: code
});
//根据库位查询物料
1 year ago
export const getItemsByLocation = (params) => promise(
devUrl + "/api/pda/inventory/balances/get-item-by-location", {
method: 'get',
data: params
});
//查询已占用库存
export const expectIn = (params) => request(
devUrl + "/api/pda/inventory/expect-in", {
method: 'get',
data: params
});
//根据code获取生产线
export const getprodlineitem = (code) => request(
devUrl + "/api/pda/production-line/by-code?code=" + code, {
method: 'get',
data: {}
});
//异步查询生产线
export const getprodlineitemAsync = (code) => promise(
devUrl + "/api/pda/production-line/by-code?code=" + code, {
method: 'get',
data: {}
});
//查询收货任务列表
export const getReceiptJobList = (params) => request(
devUrl + `/api/pda/job/purchase-receipt/list`, {
method: 'get',
data: params
});
//根据number 获取收货任务列表
export const getReceiptJobByNumber = (params) => request(
devUrl + "/api/pda/job/purchase-receipt/by-number/" + params.number + "?isToday=" + params.isToday, {
data: {},
method: "get"
});
//根据Asn number 获取收货任务列表
export const getReceiptJobByAsnNumber = (params) => request(
devUrl + "/api/pda/job/purchase-receipt/list/by-asn/asnNumber=" + params.number + "&isToday=" + params
.isToday, {
data: {},
method: "get"
});
//查询收货任务明细
export const purchaseReceipts = (id) => request(
devUrl + `/api/pda/job/purchase-receipt/${id}`, {
method: 'get',
data: {}
});
//开始收货任务
export function takeReceiptJob(id) {
return request(devUrl + `/api/pda/job/purchase-receipt/take/${id}`, { //
data: {},
method: "post"
})
}
//取消承接任务
export function cancelTakeReceiptJob(id) {
return request(devUrl + `/api/pda/job/purchase-receipt/cancel-take/${id}`, { //
data: {},
method: "post"
})
}
//完成收货任务
export function finishReceiptJob(id, param) { //
return request(devUrl + `/api/pda/job/purchase-receipt/finish/${id}`, { //
data: param,
method: "post"
})
}
//保存目检结果
export function saveReceiptResult(id, param) {
///api/pda/job/purchase-receipt/save-detail-inspect/{id}
return request(devUrl + `/api/pda/job/purchase-receipt/save-detail-inspect/${id}`, { //
data: param,
method: "post"
})
}
//重置多个目检结果
export function resetReceiptResult(id, param) {
///api/pda/job/purchase-receipt/save-detail-inspect/{id}
return request(devUrl + `/api/pda/job/purchase-receipt/reset-many-detail-inspect/${id}`, { //
data: param,
method: "post"
})
}
//重置一个目检结果
export function resetReceiptDetailResult(id, detailId) {
///api/pda/job/purchase-receipt/save-detail-inspect/{id}
return request(devUrl + `/api/pda/job/purchase-receipt/reset-detail-inspect/${id}?detailId=${detailId}`, { //
data: {},
method: "post"
})
}
//待检转合格
export function unInspectToQualified(id) { //
return request(devUrl + `/api/pda/job/purchase-receipt/set-inspect-status-ok-by-inspect/${id}`, { //
data: {},
method: "post"
})
}
//库存
//提交库存转移
export function inventoryTransfer(params) { //
return request(devUrl + "/api/pda/store/transfer-note", { //
data: params,
method: "post"
})
}
//提交计划外入库
export function unplannedReceipt(params) { //
return request(devUrl + "/api/pda/store/unplanned-receipt", { //
data: params,
method: "post"
})
}
//提交计划外出库
export function unplannedIssue(params) { //
return request(devUrl + "/api/pda/store/unplanned-Issue", { //
data: params,
method: "post"
})
}
//原料
//原料收货
export function purchaseReceipt(params) { //
return request(devUrl + "/api/pda/store/purchase-receipt", { //
data: params,
method: "post"
})
}
//提交FIFO指导发料
export function issue(params) { //
return request(devUrl + "/api/pda/store/issue", { //
data: params,
method: "post"
})
}
//生产
//提交叫料
export function materialRequest(params) { //
return request(devUrl + "/api/pda/store/material-request", { //
data: params,
method: "post"
})
}
//提交完工收货(无任务)
export function productreceipt(params) { //
return request(devUrl + "/api/pda/store/product-receipt", { //
data: params,
method: "post"
})
}
//完工收货(冲回)
export function productrecycle(params) { //
return request(devUrl + "/api/pda/store/product-recycle", { //
data: params,
method: "post"
})
}
//提交完工收货(天津)
export function tjproductreceipt(params) { //
return request(devUrl + "/api/pda/store/l7/create-product-receipt-note-with-l7", { //
data: params,
method: "post"
})
}
//完工收货(天津)
export function tjproductrecycle(params) { //
return request(devUrl + "/api/pda/store/l7/create-product-recycle-note-with-l7", { //
data: params,
method: "post"
})
}
//库位
//查询库位信息 根据code
export const locations = (code) => request(
devUrl + "/api/pda/location/" + code, {
method: 'get',
data: code
});
//库位
//查询库位信息 根据code
export const locationsAsync = (code) => promise(
devUrl + "/api/pda/location/" + code, {
method: 'get',
data: code
});
//库位
//查询库位信息 根据type
export const locationByType = (type) => request(
devUrl + "/api/pda/location/by-type/" + type, {
method: 'get',
data: type
});
//根据库位查询物料
1 year ago
export const getLocationByItem = (params) => promise(
devUrl + "/api/pda/inventory/balances/get-location-by-item", {
method: 'get',
data: params
});
//消息
//查询未读消息列表
export const messageList = (userId) => request(
devUrl + "/api/pda/store/message/list/" + userId, {
method: 'get',
data: {}
});
//消息
//查询未读消息列表
export const unreadList = () => request(
devUrl + "/api/pda/store/message/unread-list", {
method: 'get',
data: {}
});
//查询未读消息数量
export const unreadCount = (userId) => request(
devUrl + "/api/pda/store/message/not-read-count/" + userId, {
method: 'get',
data: {}
});
//变更消息状态
export function readMessage(id) { //
return request(devUrl + "/api/pda/store/message/read/" + id, { //
data: id,
method: "post"
})
};
//查询消息明细
export const messages = (id) => request(
devUrl + "/api/pda/store/message/" + id, {
method: 'get',
data: id
});
//器具
export function palletbind(id) { //
return request(devUrl + "/api/pda/stock/pallet/bind", { //
data: id,
method: "post"
})
}
//检验任务列表
export const getInspectList = (params) => request(
devUrl + "/api/pda/job/inspect/list", {
method: 'get',
data: params
});
//检验任务详情
export const getInspectDetail = (params) => request(
//api/pda/job/inspect/{id}
devUrl + "/api/pda/job/inspect/" + params.id, { //
data: {},
method: "get"
});
//检验任务数量
export const getInspectCount = (params) => request(
devUrl + "/api/pda/job/inspect/count", {
data: params,
method: "get"
});
//承接检验任务
export const takeInspectJob = (params) => request(
devUrl + "/api/pda/job/inspect/take/" + params.id, { //
data: {},
method: "post"
});
//取消承接检验任务
export const cancelTakeInspectJob = (id) => request(
devUrl + "/api/pda/job/inspect/cancel-take/" + id, { //
data: {},
method: "post"
});
//开始检验任务
export const finshInspectJob = (id, params) => request(
devUrl + "/api/pda/job/inspect/finish/" + id, { //
data: params,
method: "post"
})
//上架任务列表
export const getPutawayJobList = (params) => request(
devUrl + "/api/pda/job/put-away/list", {
method: 'get',
data: params
});
//上架任务详情
export const getPutawayJobDetail = (params) => request(
devUrl + "/api/pda/job/put-away/" + params.id, { //
data: {},
method: "get"
});
//上架任务数量
export const getPutawayJobCount = (params) => request(
devUrl + "/api/pda/job/put-away/count", {
data: params,
method: "get"
});
//承接上架任务
export const takePutawayJob = (params) => request(
devUrl + "/api/pda/job/put-away/take/" + params.id, { //
data: {},
method: "post"
});
//承接上架任务
export const cancelTakePutawayJob = (id) => request(
devUrl + "/api/pda/job/put-away/cancel-take/" + id, { //
data: {},
method: "post"
});
//开始上架任务
export const finshPutawayJob = (id, params) => request(
devUrl + "/api/pda/job/put-away/finish/" + id, { //
data: params,
method: "post"
})
//根据托标签生成上架任务
export const byContainercode = (params) => request(
devUrl + "/api/pda/job/put-away/by-containercode/", { //
data: params,
method: "post"
})
//根据箱标签生成上架任务
export const byPackingcode = (params) => request(
devUrl + "/api/pda/job/put-away/by-packingcode", { //
data: params,
method: "post"
})
//检查此箱是否存在任务
export const checkjobbypacking = (params) => request(
devUrl + "/api/pda/job/put-away/check-job-exist-by-packing", { //
data: params,
method: "get"
})
//创建叫料申请
export const materialrequest = (params) => request(
devUrl + "/api/pda/store/material-request", { //
data: params,
method: "post"
})
//根据托标签检查是否存在任务
export const checkjobbycontainer = (params) => request(
devUrl + "/api/pda/job/put-away/check-job-exist-by-container", { //
data: params,
method: "get"
})
//发料任务列表
export const getIssueList = (params) => request(
"http://127.0.0.1:4523/m1/1773588-0-default" + "/api/pda/job/issue/list", {
method: 'get',
data: params
});
//检查是否存在发料任务"​/prod/api/pda/job/issue/check-job-exist",
export const checkIssueJobExist = (params) => request(
devUrl + "/api/pda/job/issue/check-job-exist", {
method: 'get',
data: params
});
//检查是否存在发料任务"​/prod/api/pda/job/issue/check-job-exist",
export const checkIssueJobExistAsync = (params) => promise(
devUrl + "/api/pda/job/issue/check-job-exist", {
method: 'get',
data: params
});
//根据number 获取发料任务列表
export const getIssueJobByNumber = (jobNumber) => request(
devUrl + "/api/pda/job/issue/by-number/" + jobNumber, {
data: {},
method: "get"
});
// 根据MaterialRequest number获取收货任务列表
export const getIssueListByRequest = (requestNumber) => request(
devUrl + "/api/pda/job/issue/list/by-request/" + requestNumber, { //
data: {},
method: "get"
});
//发料任务数量
export const getIssueCount = (params) => request(
devUrl + "/api/pda/job/issue/count", {
data: params,
method: "get"
});
//发料任务详情
export const getIssueDetail = (params) => request(
devUrl + "/api/pda/job/issue/" + params.id, { //
data: {},
method: "get"
});
//承接发料任务
export const takeIssueJob = (params) => request(
devUrl + "/api/pda/job/issue/take/" + params.id, { //
data: {},
method: "post"
});
//取消承接发料任务
export const cancelTakeIssueJob = (id) => request(
devUrl + "/api/pda/job/issue/cancel-take/" + id, { //
data: {},
method: "post"
});
//完成发料任务
export const finshIssueJob = (id, params) => request(
devUrl + "/api/pda/job/issue/finish/" + id, { //
data: params,
method: "post"
})
//发货任务列表
export const getDeliverList = (params) => request(
devUrl + "/api/pda/job/deliver/list", {
method: 'get',
data: params
});
//根据number 获取发货任务列表
export const getDeliverJobByNumber = (number) => request(
devUrl + "/api/pda/job/deliver/by-number/" + number, {
data: {},
method: "get"
});
//发货任务数量
export const getDeliverCount = (params) => request(
devUrl + "/api/pda/job/deliver/count", {
data: params,
method: "get"
});
//发货任务详情
export const getDeliverDetail = (params) => request(
'http://127.0.0.1:4523/m1/1863666-0-default' + "/api/pda/job/deliver/" + params.id, { //
data: {},
method: "get"
});
//承接发货任务
export const takeDeliverJob = (params) => request(
'http://127.0.0.1:4523/m1/1863666-0-default' + "/api/pda/job/deliver/take/" + params.id, { //
data: {},
method: "post"
});
//取消承接发货任务
export const cancelTakeDeliverJob = (id) => request(
'http://127.0.0.1:4523/m1/1863666-0-default' + "/api/pda/job/deliver/cancel-take/" + id, { //
data: {},
method: "post"
});
//开始发货任务
export const finshDeliverJob = (id, params) => request(
devUrl + "/api/pda/job/deliver/finish/" + id, { //
data: params,
method: "post"
})
//盘点任务列表
export const getCountJobList = (params) => request(
devUrl + "/api/pda/job/count/list", {
method: 'get',
data: params
});
//根据number获取盘点任务
export const getCountJobByNumber = (number) => request(
devUrl + "/api/pda/job/count/by-number/" + number, {
data: {},
method: "get"
});
//根据库位获取盘点任务
export const getCountJobByLocation = (locationCode) => request(
devUrl + "/api/pda/job/count/list/by-location/" + locationCode, {
data: {},
method: "get"
});
//根据库位获取盘点任务
export const getCountJobByLocationAsync = (locationCode) => promise(
devUrl + "/api/pda/job/count/list/by-location/" + locationCode, {
data: {},
method: "get"
});
//盘点任务数量
export const getCountJobCount = (params) => request(
devUrl + "/api/pda/job/count/count", {
data: params,
method: "get"
});
//盘点任务详情
export const getCountJobDetail = (params) => request(
devUrl + "/api/pda/job/count/" + params.id, { //
data: {
params
},
method: "get"
});
//承接上架任务
export const takeCountJob = (params) => request(
devUrl + "/api/pda/job/count/take/" + params.id, { //
data: {},
method: "post"
});
//取消承接发货任务
export const cancelTakeCountJob = (id) => request(
devUrl + "/api/pda/job/count/cancel-take/" + id, { //
data: {},
method: "post"
}); //取消承接发货任务
//提交盘点任务
export const finishCountJob = (id, params) => request(
devUrl + "/api/pda/job/count/finish/" + id, { //
data: params,
method: "post"
});
//根据条件新增盘点任务
export const createCountJob = (params) => request(
devUrl + "/api/pda/job/count/create-with-condition/", { //
data: params,
method: "post"
});
//退货任务列表
export const getReturnJobList = (params) => request(
devUrl + "/api/pda/job/purchase-return/list", {
method: 'get',
data: params
});
//根据number 获取盘点任务列表
export const getReturnJobByNumber = (number) => request(
devUrl + "/api/pda/job/purchase-return/by-number/" + number, {
data: {},
method: "get"
});
//退货任务数量
export const getReturnJobCount = (params) => request(
devUrl + "/api/pda/job/purchase-return/count", {
data: params,
method: "get"
});
//退货任务详情
export const getReturnJobDetail = (id) => request(
devUrl + "/api/pda/job/purchase-return/" + id, { //
data: {},
method: "get"
});
//承接退货任务
export const takePurchaseReturnJob = (id) => request(
devUrl + "/api/pda/job/purchase-return/take/" + id, { //
data: {},
method: "post"
});
//取消承接退货任务
export const cancelTakePutchaseReturnJob = (id) => request(
devUrl + "/api/pda/job/purchase-return/cancel-take/" + id, { //
data: {},
method: "post"
});
//完成退货任务
export const finishReturnJob = (id, returnReason) => request(
devUrl + "/api/pda/job/purchase-return/finish/" + id + "?returnReason=" + returnReason, { //
data: {},
method: "post"
});
//完工收货任务
export const getProductReceiptList = (params) => request(
devUrl + "/api/pda/job/product-receipt/list", {
method: 'get',
data: params
});
//完工收货任务详情
export const getProductReceiptDetail = (params) => request(
//api/pda/job/inspect/{id}
devUrl + "/api/pda/job/product-receipt/" + params.id, { //
data: {},
method: "get"
});
//承接完工收货任务
export const takeProductReceiptJob = (params) => request(
devUrl + "/api/pda/job/product-receipt/take/" + params.id, { //
data: {},
method: "post"
});
//取消承接完工收货任务
export const cancelTakeProductReceiptJob = (id) => request(
devUrl + "/api/pda/job/product-receipt/cancel-take/" + id, { //
data: {},
method: "post"
});
//开始完工收货任务
export const finshProductReceiptJob = (id, params) => request(
devUrl + "/api/pda/job/product-receipt/finish/" + id, { //
data: params,
method: "post"
});
//无任务的完工收货
export const finshProductReceiptNoJob = (id, params) => request(
devUrl + "/api/pda/store/product-receipt", { //
data: params,
method: "post"
});
//获取箱标签
export const getContainerCode = (qty) => request(
devUrl + "/api/pda/stock/pack/add-pallet-code-number?qty=" + qty, { //
data: {},
method: "post"
});
//获取生产线
export const getProductionLine = (params) => request(
devUrl + "/api/pda/production-line/list", { //
data: params,
method: "get"
});
//获取班次
export const getShift = (params) => request(
devUrl + "/api/pda/shift/list", { //
data: params,
method: "get"
});
//获取客户地址
export const getCustomerAddressByCode = (code) => request(
devUrl + "/api/pda/customer-address/" + code, { //
data: {},
method: "get"
});
//获取客户地址
export const getCustomerAddressByCodeAsync = (code) => promise(
devUrl + "/api/pda/customer-address/" + code, { //
data: {},
method: "get"
});
//按客户代码获取客户地址
export const getCustomerAddressBycustomerCode = (customerCode) => request(
devUrl + "/api/pda/customer-address/by-customer?customerCode=" + customerCode, { //
data: {},
method: "get"
});
//按客户代码获取客户地址
export const getCustomerAddressBycustomerCodeAsync = (customerCode) => promise(
devUrl + "/api/pda/customer-address/by-customer?customerCode=" + customerCode, { //
data: {},
method: "get"
});
export const getItemAsync = (code) => promise(
devUrl + '/api/pda/item/' + code, { //
data: {},
method: "get"
});
//直接发货
export const finshDeliver = (params) => request(
devUrl + "/api/pda/store/deliver", { //
data: params,
method: "post"
});
//原料直发
export const rawDeliver = (params) => request(
devUrl + "/api/pda/store/deliver", { //
data: params,
method: "post"
});
//调拨发货
export const warehouseTransfer = (params) => request(
devUrl + "/api/pda/store/warehouse-transfer", { //
data: params,
method: "post"
});
//发货任务列表
export const getJisDeliverList = (params) => request(
devUrl + "/api/pda/job/jis-deliver/list", {
method: 'get',
data: params
});
//发货任务数量
export const getJisDeliverCount = (params) => request(
devUrl + "/api/pda/job/jis-deliver/count", {
data: params,
method: "get"
});
// //发货任务详情
// export const getJisDeliverDetail = (params) => request(
// "/prod/api/pda/job/jis-deliver" , { //
// data: params,
// method: "get"
// });
//发货任务详情
export const getJisDeliverDetail = (params) => request(
devUrl + "/api/pda/job/jis-deliver", { //
data: {},
method: "get"
});
//承接发货任务
export const takeJisDeliverJob = (params) => request(
devUrl + "/api/pda/job/jis-deliver/take/" + params.id, { //
data: {},
method: "post"
});
//取消承接发货任务
export const cancelTakeJisDeliverJob = (id) => request(
devUrl + "/api/pda/job/jis-deliver/cancel-take/" + id, { //
data: {},
method: "post"
});
//开始发货任务
///api/pda/job/jis-deliver/finish/{id}
export const finshJisDeliverJob = (id, params) => request(
devUrl + "/api/pda/job/jis-deliver/finish/" + id, { //
data: params,
method: "post"
})
//查询器具是否存在
export const getContainer = (code) => request(
devUrl + "/api/pda/inventory/container/" + code, { //
data: {},
method: "get"
});
//查询器具是否存在
export const getContainerAsync = (code) => promise(
devUrl + "/api/pda/inventory/container/" + code, { //
data: {},
method: "get"
});
//查询器具是否按序
export const checkContainerOrder = (code) => request(
devUrl + "/api/pda/inventory/container/check-by-code/" + code, { //
data: {},
method: "get"
});
//查询器具是否按序
export const checkContainerOrderAsync = (code) => promise(
devUrl + "/api/pda/inventory/container/check-by-code/" + code, { //
data: {},
method: "get"
});
export const PrintServices = (data) => {
return uni.request({
url: printUrl + '/api/print/PrintServices',
method: 'post',
header: {
'content-type': 'application/x-www-form-urlencoded'
},
data
}).then(res => {
if (res != null && res[1] != null) {
if (res[1].statusCode != null) {
//状态码类型 2开头的全是成功
let code = res[1].statusCode.toString().substring(0, 1);
if (code === '2') {
return res[1].data;
} else {
let message = res[1].data.error.message;
if (message != null) {
throw res[1].data.error.message;
} else {
throw res[1].statusCode + "错误";
}
}
} else {
throw url + "返回的状态码类型为空"
}
} else {
throw url + "返回的res为空"
}
})
}
// 获取版本号
export const isNewVersion = () => {
return uni.request({
url: devUrl + `/static/version.json?t=${new Date().getTime()}`,
method: 'post'
}).then(res => {
console.log(res)
})
}
// 东阳新接口
//报废
export const scrap = (params) => request(
devUrl + "/api/pda/store/scrap", { //
data: params,
method: "post"
});
//上架前退货
export const returnBeforePutaway = (params) => request(
devUrl + "/api/pda/store/purchase-return-note/before-puton", { //
data: params,
method: "post"
});
//获取采购标签信息
// export const getPurchaseLabel = (code) => request(
// devUrl + "/api/pda/label/purchaselabel/by-code?code=" + code, { //
// data: {},
// method: "get"
// });
// //获取采购标签信息
// export const getPurchaseLabelAsync = (code) => promise(
// devUrl + "/api/pda/label/purchaselabel/by-code?code=" + code, { //
// data: {},
// method: "get"
// });
// //获取产品标签信息
// export const getProductionLabel = (code) => request(
// devUrl + "/api/pda/label/productionlabel/by-code?code=" + code, { //
// data: {},
// method: "get"
// });
// //获取产品标签信息
// export const getProductionLabelAsync = (code) => promise(
// devUrl + "/api/pda/label/productionlabel/by-code?code=" + code, { //
// data: {},
// method: "get"
// });
//获取产品标签信息inventorylabel
export const getInventoryLabel = (code) => request(
devUrl + "/api/pda/label/inventorylabel/by-code?code=" + code, { //
data: {},
method: "get"
});
//获取产品标签信息
export const getInventoryLabelAsync = (code) => promise(
devUrl + "/api/pda/label/inventorylabel/by-code?code=" + code, { //
data: {},
method: "get"
});
//回收料收货
export const recycledMaterialReceipt = (param) => request(
devUrl + "/api/pda/store/recycled-material-receipt-note", { //
data: param,
method: "post"
});
//生产退库列表
export const getProductionReturnJobList = (params) => request(
devUrl + "/api/pda/job/production-return/list", {
method: 'get',
data: params
});
//生产退库数量
export const getProductionReturnJobCount = (params) => request(
devUrl + "/api/pda/job/production-return/count", {
data: params,
method: "get"
});
//生产退库详情
export const getProductionReturnJobDetail = (id) => request(
devUrl + "/api/pda/job/production-return/" + id, { //
data: {},
method: "get"
});
//承接生产退库
export const takeProductionReturnJob = (id) => request(
devUrl + "/api/pda/job/production-return/take/" + id, { //
data: {},
method: "post"
});
//取消承接生产退库
export const cancelTakeProductionReturnJob = (id) => request(
devUrl + "/api/pda/job/production-return/cancel-take/" + id, { //
data: {},
method: "post"
});
//完成生产退库
export const finishProductionReturnJob = (id, params) => request(
devUrl + "/api/pda/job/production-return/finish/" + id, { //
data: params,
method: "post"
});
//直接退库
export const returnToWarehouse = (params) => request(
devUrl + "/api/pda/store/return-to-warehouse", { //
data: params,
method: "post"
});
//采购上架
export const purchasePutaway = (params) => request(
devUrl + "/api/pda/note/put-away/by-purchase", { //
data: params,
method: "post"
});
//半成品上架
export const semiPutaway = (params) => request(
devUrl + "/api/pda/note/put-away/by-semi", { //
data: params,
method: "post"
});
//
export const getPurchaseDetailAsync = (itemCode, packingCode) => promise(
devUrl + "/api/pda/store/purchase-receipt/detail-by-item-and-packing?itemCode=" + itemCode + '&packingCode=' +
packingCode, { //
data: {},
method: "get"
});
export const getFileByCode = (fileCode) => request(
devUrl + "/api/pda/file/filestore/by-code/" + fileCode, { //
data: {},
method: "post"
});
// 根据 code 获取配置字典
export const getDictByCode = (code) => request(
devUrl + "/api/pda/dict/by-code?code=" + code, { //
data: {},
method: "get"
});
//直接发料
export const issueDirect = (params) => request(
devUrl + "/api/pda/store/issue", { //
data: params,
method: "post"
});
11 months ago