| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- import {
- postJ,
- post,
- get
- } from "@/utils/request";
- import Vue from "vue";
- // 工单列表
- export async function workorderPage(params) {
- const data = await postJ(
- Vue.prototype.apiUrl + `/pda/mes/workorder/page`, params, true,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 根据工单id获取工序列表
- export async function getTaskInstanceList(id) {
- const data = await get(
- Vue.prototype.apiUrl + `/pda/mes/workorder/getTaskInstanceById/${id}`,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 工单信息
- export async function workorderInfo(id) {
- const data = await get(
- Vue.prototype.apiUrl + `/pda/mes/workorder/getById/${id}`,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 根据工单ids获取工单列表
- export async function workorderList(params) {
- const data = await postJ(
- Vue.prototype.apiUrl + `/pda/mes/workorder/list`, params, true,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 父级ID查询分类树
- export async function treeByPid(params) {
- const data = await get(
- Vue.prototype.apiUrl + `/pda/main/categoryLevel/pdaTreeByPid`, params, true,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 只查第二层的分类
- export async function getTwoTreeByPid(parentId) {
- const data = await get(
- Vue.prototype.apiUrl + `/main/categoryLevel/getTwoTreeByPid/${parentId}`
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 只查最后一层的分类
- export async function getLastTreeByPid(parentId) {
- const data = await get(
- Vue.prototype.apiUrl + `/main/categoryLevel/getLastTreeByPid/${parentId}`
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 查询库存台账首页列表
- export async function pageeLedgerMain(params) {
- const data = await get(
- Vue.prototype.apiUrl + `/wms/outin/getRealTimeInventory`, params, true,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- //
- export async function assetPage(params) {
- const data = await get(
- Vue.prototype.apiUrl + `/main/asset/pdaPage`, params, true,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 生产明细
- export async function produceDetail(id) {
- const data = await get(
- Vue.prototype.apiUrl + `/pda/mes/workorder/produceDetail/${id}`,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 工艺路线
- export async function producerouting(params) {
- const data = await get(
- Vue.prototype.apiUrl + `/main/producerouting/page`, params, true,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // PDA检查投料状态
- export async function checkStatus(id,taskId) {
- const data = await get(
- Vue.prototype.apiUrl + `/pda/mes/feed/checkStatus/${id}/${taskId}`,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 扫码切换工单
- export async function getByCode(code) {
- const data = await get(
- Vue.prototype.apiUrl + `/pda/mes/workorder/getByCode/${code}`
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 扫码 获取台账
- export async function scanLedger(code) {
- const data = await get(
- Vue.prototype.apiUrl + `/main/asset/getByCode/${code}`
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 查询仓库下拉列表
- export async function getWarehouseList() {
- const data = await post(
- Vue.prototype.apiUrl + `/wms/warehouse/getWarehouseList`
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // pda查询周转车
- export async function getVehicle(params) {
- const data = await postJ(
- Vue.prototype.apiUrl + `/pda/mes/workreport/getVehicle`, params, true,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // pda报工后换车
- export async function transferVehicle(params) {
- const data = await postJ(
- Vue.prototype.apiUrl + `/pda/mes/workreport/transferVehicle`, params, true,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 更换后的周转车记录
- export async function getNewVehicle(params) {
- const data = await postJ(
- Vue.prototype.apiUrl + `/pda/mes/workreport/getNewVehicle`, params, true,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // pda根据工单id和工序id查询报工详情
- export async function listWorkReport(params) {
- const data = await postJ(
- Vue.prototype.apiUrl + `/pda/mes/workreport/listWorkReport`, params, true,
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
|