daywork.js 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  1. import request from '@/utils/request'
  2. import { method } from 'lodash-es'
  3. const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API
  4. /**
  5. * 获取 生产批次 列表
  6. * @param {*} data
  7. * @returns
  8. */
  9. export function listDaywork(query) {
  10. return request({
  11. url: baseUrl + '/business/productionDaywork/list',
  12. method: 'get',
  13. params: query
  14. })
  15. }
  16. export function listDayworkAuxiliaryItem(query) {
  17. return request({
  18. url: baseUrl + '/business/productionDaywork/listDayworkAuxiliaryItem',
  19. method: 'get',
  20. params: query
  21. })
  22. }
  23. export function listForOutsource(query) {
  24. return request({
  25. url: baseUrl + '/business/productionDaywork/listForOutsource',
  26. method: 'get',
  27. params: query
  28. })
  29. }
  30. export function processesForOutsource(query) {
  31. return request({
  32. url: baseUrl + '/business/productionDaywork/processesForOutsource',
  33. method: 'get',
  34. params: query
  35. })
  36. }
  37. export function processesForOutsourceByFirst(query) {
  38. return request({
  39. url: baseUrl + '/business/productionDaywork/processesForOutsourceByFirst',
  40. method: 'get',
  41. params: query
  42. })
  43. }
  44. /**
  45. * 查询当前报工工序
  46. * 此方法在非本序废品页面使用
  47. * @param {*} query
  48. * @returns
  49. */
  50. export function listDayworkLot(query) {
  51. return request({
  52. url: baseUrl + '/business/productionDaywork/listDayworkLot',
  53. method: 'get',
  54. params: query
  55. })
  56. }
  57. export function carrierForOutsource(query) {
  58. return request({
  59. url: baseUrl + '/business/productionDaywork/carrierForOutsource',
  60. method: 'get',
  61. params: query
  62. })
  63. }
  64. // 查询工序管理
  65. export function getDayworkProcessList(query) {
  66. return request({
  67. url: baseUrl + '/business/productionDaywork/getDayworkProcessList',
  68. method: 'get',
  69. params: query
  70. })
  71. }
  72. /**
  73. * 获取 计划查询的工段列表
  74. * @param {*} data
  75. * @returns
  76. */
  77. /**
  78. * 获取 计划查询 列表
  79. * @param {*} data
  80. * @returns
  81. */
  82. export function getDayworkInfo(query) {
  83. return request({
  84. url: baseUrl + '/business/productionDaywork/getDayworkInfo',
  85. method: 'get',
  86. params: query
  87. })
  88. }
  89. /**
  90. * 获取 计划查询的工段列表
  91. * @param {*} data
  92. * @returns
  93. */
  94. export function getDeptInfo(query) {
  95. return request({
  96. url: baseUrl + '/business/productionDaywork/getDeptInfo',
  97. method: 'get',
  98. params: query
  99. })
  100. }
  101. /**
  102. * 获取 已生产批次 列表
  103. * @param {*} data
  104. * @returns
  105. */
  106. export function getProducedLot(query) {
  107. return request({
  108. url: baseUrl + '/business/productionDaywork/getProducedLot',
  109. method: 'get',
  110. params: query
  111. })
  112. }
  113. export function getLotPosition(query) {
  114. return request({
  115. url: baseUrl + '/business/productionDaywork/getLotPosition',
  116. method: 'get',
  117. params: query
  118. })
  119. }
  120. export function getItemProcess(query) {
  121. return request({
  122. url: baseUrl + '/business/productionDaywork/getItemProcess',
  123. method: 'get',
  124. params: query
  125. })
  126. }
  127. export function getDayworkList(query) {
  128. return request({
  129. url: baseUrl + '/business/productionDaywork/getDayworkList',
  130. method: 'get',
  131. params: query
  132. })
  133. }
  134. /**
  135. * 获取 报工记录的工段
  136. * @param {*} data
  137. * @returns
  138. */
  139. export function getDeptList(query) {
  140. return request({
  141. url: baseUrl + '/business/productionDaywork/getDeptList',
  142. method: 'get',
  143. params: query
  144. })
  145. }
  146. /**
  147. * 获取用户工段
  148. */
  149. export function getDeptListForUser() {
  150. return request({
  151. url: baseUrl + '/business/productionDaywork/getDeptListForUser',
  152. method: 'get'
  153. })
  154. }
  155. /** 查询批次信息 */
  156. export function getDayworkItemProcess(id) {
  157. return request({
  158. url: baseUrl + '/business/productionDaywork/getDayworkItemProcess/' + id,
  159. method: 'get'
  160. })
  161. }
  162. /**
  163. * 获取 生产批次报工 列表
  164. * @param {*} data
  165. * @returns
  166. */
  167. export function listDayworkItem(query) {
  168. return request({
  169. url: baseUrl + '/business/productionDaywork/listItem',
  170. method: 'get',
  171. params: query
  172. })
  173. }
  174. export function listOriginalDayworkItem(query) {
  175. return request({
  176. url: baseUrl + '/business/productionDaywork/listOriginalItem',
  177. method: 'get',
  178. params: query
  179. })
  180. }
  181. //修改批次炉号信息
  182. export function updateDayworkFurnace(data) {
  183. return request({
  184. url: baseUrl + '/business/productionDaywork/updateDayworkFurnace',
  185. method: 'post',
  186. data: data
  187. })
  188. }
  189. /**
  190. * 批次日报
  191. * @param {*} query
  192. * @returns
  193. */
  194. export function listReportItem(query) {
  195. return request({
  196. url: baseUrl + '/business/productionDaywork/listReportItem',
  197. method: 'get',
  198. params: query
  199. })
  200. }
  201. /**
  202. * 获取 生产批次报工 列表
  203. * @param {*} data
  204. * @returns
  205. */
  206. export function checkUseEquipment(data) {
  207. return request({
  208. url: baseUrl + '/business/productionDaywork/checkUseEquipment',
  209. method: 'post',
  210. data: data
  211. })
  212. }
  213. /**
  214. * 修改 生产批次报工 列表
  215. * @param {*} data
  216. * @returns
  217. */
  218. export function updateItem(data) {
  219. return request({
  220. url: baseUrl + '/business/productionDaywork/updateItem',
  221. method: 'post',
  222. data: data
  223. })
  224. }
  225. /**
  226. * 查询是否为首序
  227. */
  228. export function getIsFirstOrder(dayworkId) {
  229. return request({
  230. url: baseUrl + '/business/productionDaywork/getIsFirstOrder/' + dayworkId,
  231. method: 'get'
  232. })
  233. }
  234. /**
  235. * 获取报工批次工序列表
  236. * @param {*} data
  237. * @returns
  238. */
  239. export function getProcessList(query) {
  240. return request({
  241. url: baseUrl + '/business/productionDaywork/getProcessList',
  242. method: 'get',
  243. params: query
  244. })
  245. }
  246. // 查询工段资源组能够选择的设备
  247. export function getEquipmentInfo(query) {
  248. return request({
  249. url: baseUrl + '/business/detail/equipmentInfo',
  250. method: 'get',
  251. params: query
  252. })
  253. }
  254. export function equipmentInfoInDaywork(query) {
  255. return request({
  256. url: baseUrl + '/business/detail/equipmentInfoInDaywork',
  257. method: 'get',
  258. params: query
  259. })
  260. }
  261. //查询工艺路线计划单
  262. export function getProcessDetail(data) {
  263. return request({
  264. url: baseUrl + '/business/productionDaywork/getProcessDetail',
  265. method: 'post',
  266. data: data
  267. })
  268. }
  269. export function getEquipmentList(data) {
  270. return request({
  271. url: baseUrl + '/business/detail/getEquipmentList',
  272. method: 'post',
  273. data: data
  274. })
  275. }
  276. /**
  277. * 获取报工批次废弃信息
  278. * @param {*} data
  279. * @returns
  280. */
  281. export function getDayworkItemRejectList(query) {
  282. return request({
  283. url: baseUrl + '/business/productionDaywork/getDayworkItemRejectList',
  284. method: 'get',
  285. params: query
  286. })
  287. }
  288. //普通报工
  289. export function getDayworkItemOriginalRejectList(query) {
  290. return request({
  291. url: baseUrl + '/business/productionDaywork/getOriginalDayworkItemRejectList',
  292. method: 'get',
  293. params: query
  294. })
  295. }
  296. //特殊报工
  297. export function getDayworkItemAuxiliaryRejectList(query) {
  298. return request({
  299. url: baseUrl + '/business/productionDaywork/getAuxiliaryDayworkItemRejectList',
  300. method: 'get',
  301. params: query
  302. })
  303. }
  304. /**
  305. * 修改 生产批次报工 列表
  306. * @param {*} data
  307. * @returns
  308. */
  309. export function updateDayworkItemInfo(data) {
  310. return request({
  311. url: baseUrl + '/business/productionDaywork/updateDayworkItemInfo',
  312. method: 'post',
  313. data: data
  314. })
  315. }
  316. /**
  317. * 修改 生产批次报工列表中的数量
  318. * @param {*} data
  319. * @returns
  320. */
  321. export function updateDayworkItemInfoForNum(data) {
  322. return request({
  323. url: baseUrl + '/business/productionDaywork/updateDayworkItemInfoForNum',
  324. method: 'post',
  325. data: data
  326. })
  327. }
  328. /**
  329. * 修改生产批次报工列表中周转报工的信息
  330. * @param {*} data
  331. */
  332. export function updateDayworkItemInfoForTurnover(data) {
  333. return request({
  334. url: baseUrl + '/business/productionDaywork/updateDayworkItemInfoForTurnover',
  335. method: 'post',
  336. data: data
  337. })
  338. }
  339. export function updateDayworkItemInfoMax(data) {
  340. return request({
  341. url: baseUrl + '/business/productionDaywork/updateDayworkItemInfoMax',
  342. method: 'post',
  343. data: data
  344. })
  345. }
  346. export function addDaywork(data) {
  347. return request({
  348. url: baseUrl + '/business/daywork',
  349. method: 'post',
  350. data: data
  351. })
  352. }
  353. export function getDaywork(id) {
  354. return request({
  355. url: baseUrl + '/business/daywork/' + id,
  356. method: 'get'
  357. })
  358. }
  359. export function getDayworkItemDetail(data) {
  360. return request({
  361. url: baseUrl + '/business/productionDaywork/getDayworkItemDetail',
  362. method: 'post',
  363. data: data
  364. })
  365. }
  366. export function updateDaywork(data) {
  367. return request({
  368. url: baseUrl + '/business/daywork',
  369. method: 'put',
  370. data: data
  371. })
  372. }
  373. export function delDaywork(id) {
  374. return request({
  375. url: baseUrl + '/business/daywork/' + id,
  376. method: 'delete'
  377. })
  378. }
  379. export function delDayworkItem(ids) {
  380. return request({
  381. url: baseUrl + '/business/productionDaywork/' + ids,
  382. method: 'delete'
  383. })
  384. }
  385. export function lotList(query) {
  386. return request({
  387. url: baseUrl + '/business/productionDaywork/lotList',
  388. method: 'get',
  389. params: query
  390. })
  391. }
  392. export function getAllWorkShop() {
  393. return request({
  394. url: baseUrl + '/business/productionDaywork/getAllWorkShop',
  395. method: 'get'
  396. })
  397. }