Fixiaobai
2023-11-17 1f5009ddcc87f7a7db792d40206bdcf5462089ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
/*
 *    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
  })
}