/* * Copyright (c) 2018-2025, ztt All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the pig4cloud.com developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: ztt */ import request from '@/router/axios' export function fetchList(query) { return request({ url: '/mes/masterProductionSchedule/page', method: 'get', params: query }) } export function addObj(obj) { return request({ url: '/mes/masterProductionSchedule', method: 'post', data: obj }) } export function addPlanPurchasing(obj) { return request({ url: '/mes/masterProductionSchedule/addPlanPurchasing', method: 'post', data: obj }) } export function getObj(id) { return request({ url: '/mes/masterProductionSchedule/' + id, method: 'get' }) } export function delObj(id) { return request({ url: '/mes/masterProductionSchedule/' + id, method: 'delete' }) } export function putObj(obj) { return request({ url: '/mes/masterProductionSchedule', method: 'put', data: obj }) } export function loadMasterPlanSourceHandle(id) { return request({ url: '/mes/masterProductionSchedule/loadMasterPlanSource/' + id, method: 'get' }) } export function loadMasterPlanSourceByCustomer(id) { return request({ url: '/mes/masterProductionSchedule/loadMasterPlanSourceByCustomer/' + id, method: 'get' }) } export function loadOrderHandle(id) { return request({ url: '/mes/masterProductionSchedule/loadOrder/' + id, method: 'get' }) } export function updateQtyPlaned(obj) { return request({ url: '/mes/masterProductionSchedule/updateQtyPlaned', method: 'post', data: obj }) } export function getMpsStructureComponent(id, partId) { return request({ url: '/mes/masterProductionSchedule/getMpsStructureComponent/' + id + '/' + partId, method: 'get' }) } // 保存bom结构 export function saveMpsStructureComponent(obj, id) { return request({ url: '/mes/masterProductionSchedule/saveMpsStructureComponent/' + id, method: 'post', data: obj }) } // 根据id删除bom结构 export function deleteMpsStructureComponentById(id) { return request({ url: '/mes/masterProductionSchedule/deleteMpsStructureComponent/' + id, method: 'delete' }) } // 新增bom结构 export function insertMpsStructureComponent(obj, id) { return request({ url: '/mes/masterProductionSchedule/insertMpsStructureComponent/' + id, method: 'post', data: obj }) } // 修改bom结构 export function updateMpsStructureComponent(obj) { return request({ url: '/mes/masterProductionSchedule/updateMpsStructureComponent', method: 'post', data: obj }) } export function changeMpsState(ids, event) { return request({ url: '/mes/masterProductionSchedule/changeState/' + event, method: 'post', data: ids }) } // 关联生产计划 export function handleDocument(ids, docId) { return request({ url: '/mes/masterProductionSchedule/handleDocument/' + docId, method: 'post', data: ids }) } // 解除生产计划 export function rejectHandleDocument(ids) { return request({ url: '/mes/masterProductionSchedule/rejectHandleDocument', method: 'post', data: ids }) } // 审核生产计划 export function auditMasterProductionSchedule(id) { return request({ url: '/mes/masterProductionSchedule/oa/' + id, method: 'get' }) } // 修改审核状态 export function changeAudit(id, status) { return request({ url: '/mes/masterProductionSchedule/changeAudit/' + id + '/' + status, method: 'get' }) } export function getTheoryQuantity(id, dataArray) { return request({ url: '/mes/masterProductionSchedule/getTheoryQuantity/' + id, method: 'post', data: dataArray }) } export function queryInventUseablePlanStd(query) { return request({ url: '/mes/masterProductionSchedule/queryInventUseablePlanStd', method: 'get', params: query }) } // 通过销售订单号查询 export function getByMpsNo(obj) { return request({ url: '/mes/masterProductionSchedule/getByMpsNo', method: 'get', params: obj }) }