planMgr.js 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. /*********************** 【计划管理】API ********************/
  2. import axiosApi from '../AxiosApi.js'
  3. const apiList = {
  4. getList: {
  5. method: 'POST',
  6. url: `/authority/plan/all`
  7. },
  8. getFinishPlanList: {
  9. method: 'POST',
  10. url: `/authority/plan/getFinishPlanList`
  11. },
  12. page: {
  13. method: 'POST',
  14. url: `/authority/plan/page`
  15. },
  16. pageList: {
  17. method: 'POST',
  18. url: `/authority/plan/pageList`
  19. },
  20. update: {
  21. method: 'POST',
  22. url: `/authority/plan/update`
  23. },
  24. save: {
  25. method: 'POST',
  26. url: `/authority/plan/save`
  27. },
  28. // 一键排产
  29. oneTouchSchedule: {
  30. method: 'POST',
  31. url: `/authority/plan/oneTouchSchedule`
  32. },
  33. // 高级排产
  34. advSchedule: {
  35. method: 'POST',
  36. url: `/authority/plan/advSchedule`
  37. },
  38. // 一键生产
  39. confirmSchedule: {
  40. method: 'POST',
  41. url: `/authority/plan/confirmSchedule`
  42. },
  43. // 审核状态
  44. updateStatus: {
  45. method: 'POST',
  46. url: `/authority/plan/updateStatus`
  47. },
  48. remove: {
  49. method: 'DELETE',
  50. url: `/authority/plan`
  51. },
  52. delete: {
  53. method: 'POST',
  54. url: `/authority/plan/delete`
  55. },
  56. // 计划【任务-按照生产资源 】
  57. scheduleTaskByResource: {
  58. method: 'POST',
  59. url: `/authority/task/scheduleTaskByResource`
  60. },
  61. // 计划【更多-启用】
  62. planEnable: {
  63. method: 'POST',
  64. url: `/authority/plan/planEnable`
  65. },
  66. // 计划【更多-暂停】
  67. planSuspend: {
  68. method: 'POST',
  69. url: `/authority/plan/planSuspend`
  70. },
  71. // 计划【更多-优先级】
  72. updateData: {
  73. method: 'POST',
  74. url: `/authority/plan/updateData`
  75. },
  76. // 计划【更多-生产单元】
  77. setProductionUnit: {
  78. method: 'POST',
  79. url: `/authority/planZone/setProductionUnit`
  80. },
  81. // 计划【修改数量】
  82. updateNumber: {
  83. method: 'POST',
  84. url: `/authority/plan/updateNumber`
  85. },
  86. // 计划【更多-删除】
  87. deletePlan: {
  88. method: 'POST',
  89. url: `/authority/plan/deletePlan`
  90. },
  91. // 计划【状态数量统计】
  92. getPlanStatusCount: {
  93. method: 'POST',
  94. url: `/authority/plan/getPlanStatusCount`
  95. },
  96. get: {
  97. method: 'POST',
  98. url: `/authority/plan/get`
  99. },
  100. list: {
  101. method: 'POST',
  102. url: `/authority/plan/query`
  103. },
  104. preview: {
  105. method: 'POST',
  106. url: `/authority/plan/preview`
  107. },
  108. export: {
  109. method: 'POST',
  110. url: `/authority/plan/export`
  111. },
  112. import: {
  113. method: 'POST',
  114. url: `/authority/plan/import`
  115. },
  116. downloadCraftCards: {
  117. method: 'POST',
  118. url: `/authority/plan/downloadCraftCards`
  119. },
  120. checkPlanCuttingTools: {
  121. method: 'POST',
  122. url: `/authority/plan/checkPlanCuttingTools`
  123. },
  124. checkPlanDetailCuttingTools: {
  125. method: 'POST',
  126. url: `/authority/plan/checkPlanDetailCuttingTools`
  127. },
  128. partsTracedBackPage: {
  129. method: 'POST',
  130. url: `/authority/workpiece/page`
  131. },
  132. prodTracedBackPage: {
  133. method: 'POST',
  134. url: `/authority/taskTracedBack/page`
  135. }
  136. }
  137. export default {
  138. getList (data) {
  139. return axiosApi({
  140. ...apiList.getList,
  141. data
  142. })
  143. },
  144. page (data) {
  145. return axiosApi({
  146. ...apiList.page,
  147. data
  148. })
  149. },
  150. pageList (data) {
  151. return axiosApi({
  152. ...apiList.pageList,
  153. data
  154. })
  155. },
  156. save (data) {
  157. return axiosApi({
  158. ...apiList.save,
  159. data
  160. })
  161. },
  162. // 一键排产
  163. oneTouchSchedule (data) {
  164. return axiosApi({
  165. ...apiList.oneTouchSchedule,
  166. data
  167. })
  168. },
  169. // 高级排产
  170. advSchedule (data) {
  171. return axiosApi({
  172. ...apiList.advSchedule,
  173. data
  174. })
  175. },
  176. // 一键生产
  177. confirmSchedule (data) {
  178. return axiosApi({
  179. ...apiList.confirmSchedule,
  180. data
  181. })
  182. },
  183. update (data) {
  184. return axiosApi({
  185. ...apiList.update,
  186. data
  187. })
  188. },
  189. updateStatus (data) {
  190. return axiosApi({
  191. ...apiList.updateStatus,
  192. data
  193. })
  194. },
  195. remove (data) {
  196. return axiosApi({
  197. ...apiList.remove,
  198. data
  199. })
  200. },
  201. delete (data) {
  202. return axiosApi({
  203. ...apiList.delete,
  204. data
  205. })
  206. },
  207. // 计划【任务-按照生产资源 】
  208. scheduleTaskByResource (data) {
  209. return axiosApi({
  210. ...apiList.scheduleTaskByResource,
  211. data
  212. })
  213. },
  214. // 计划【更多-启用】
  215. planEnable (data) {
  216. return axiosApi({
  217. ...apiList.planEnable,
  218. data
  219. })
  220. },
  221. // 计划【更多-暂停】
  222. planSuspend (data) {
  223. return axiosApi({
  224. ...apiList.planSuspend,
  225. data
  226. })
  227. },
  228. // 计划【优先级 】
  229. updateData (data) {
  230. return axiosApi({
  231. ...apiList.updateData,
  232. data
  233. })
  234. },
  235. // 计划【生产单元】
  236. setProductionUnit (data) {
  237. return axiosApi({
  238. ...apiList.setProductionUnit,
  239. data
  240. })
  241. },
  242. // 计划【修改数量】
  243. updateNumber (data) {
  244. return axiosApi({
  245. ...apiList.updateNumber,
  246. data
  247. })
  248. },
  249. // 计划【更多-删除】
  250. deletePlan (data) {
  251. return axiosApi({
  252. ...apiList.deletePlan,
  253. data
  254. })
  255. },
  256. // 【计划状态数量统计】
  257. getPlanStatusCount (data) {
  258. return axiosApi({
  259. ...apiList.getPlanStatusCount,
  260. data
  261. })
  262. },
  263. get (data) {
  264. return axiosApi({
  265. ...apiList.get,
  266. data
  267. })
  268. },
  269. list (data) {
  270. return axiosApi({
  271. ...apiList.list,
  272. data
  273. })
  274. },
  275. check (code) {
  276. return axiosApi({
  277. method: 'GET',
  278. url: `/authority/plan/check/${code}`
  279. })
  280. },
  281. checkField (data) {
  282. return axiosApi({
  283. method: 'POST',
  284. url: `/authority/plan/check`,
  285. data
  286. })
  287. },
  288. preview (data) {
  289. return axiosApi({
  290. ...apiList.preview,
  291. data
  292. })
  293. },
  294. export (data) {
  295. return axiosApi({
  296. ...apiList.export,
  297. responseType: "blob",
  298. data
  299. })
  300. },
  301. import (data) {
  302. return axiosApi({
  303. ...apiList.import,
  304. data
  305. })
  306. },
  307. getFinishPlanList (data) {
  308. return axiosApi({
  309. ...apiList.getFinishPlanList,
  310. data
  311. })
  312. },
  313. downloadCraftCards(data) {
  314. return axiosApi({
  315. ...apiList.downloadCraftCards,
  316. responseType: "blob",
  317. data
  318. })
  319. },
  320. checkPlanCuttingTools(data) {
  321. return axiosApi({
  322. ...apiList.checkPlanCuttingTools,
  323. data
  324. })
  325. },
  326. checkPlanDetailCuttingTools(data) {
  327. return axiosApi({
  328. ...apiList.checkPlanDetailCuttingTools,
  329. data
  330. })
  331. },
  332. partsTracedBackPage(data) {
  333. return axiosApi({
  334. ...apiList.partsTracedBackPage,
  335. data
  336. })
  337. },
  338. prodTracedBackPage(data) {
  339. return axiosApi({
  340. ...apiList.prodTracedBackPage,
  341. data
  342. })
  343. },
  344. }