| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- import { postJ, post, get } from "@/utils/request";
- import Vue from "vue";
- // 报工 工单信息
- export async function getByIdReport(id, taskId) {
- const data = await get(
- Vue.prototype.apiUrl + `/pda/mes/workorder/getByIdReport/${id}/${taskId}`
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 报工-pad扫码切换工单
- export async function getByCodeReport(code, taskId) {
- const data = await get(
- Vue.prototype.apiUrl +
- `/pda/mes/workorder/getByCodeReport/${code}/${taskId}`
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- export async function jobSave(params) {
- const data = await postJ(
- Vue.prototype.apiUrl + `/pda/mes/workreport/save`,
- params,
- true
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- export async function createInProduct(params) {
- const data = await postJ(
- Vue.prototype.apiUrl + `/pda/mes/workreport/createInProduct`,
- params,
- true
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- //碳谷
- export async function createInProductBatchTG(params) {
- const data = await postJ(
- Vue.prototype.apiUrl + "/pda/mes/workreport/createInProductBatchTG",
- params,
- true
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- // 委外报工 工单信息
- export async function outSourceGetByIdReport(id, taskId) {
- const data = await get(
- Vue.prototype.apiUrl +
- `/pda/mes/workorder/outSourceGetByIdReport/${id}/${taskId}`
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- //批量创建在制品
- export async function createInProductBatch(params) {
- const data = await postJ(
- Vue.prototype.apiUrl + `/pda/mes/workreport/createInProductBatch`,
- params
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
- //查询已报工的数量
- export async function checkReportNumber(params) {
- const data = await postJ(
- Vue.prototype.apiUrl + `/pda/mes/workreport/reportCheck`,
- params
- );
- if (data.code == 0) {
- return data.data;
- }
- return Promise.reject(data.message);
- }
|