daywork.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  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 listForOutsource(query) {
  17. return request({
  18. url: baseUrl + '/business/productionDaywork/listForOutsource',
  19. method: 'get',
  20. params: query
  21. })
  22. }
  23. export function processesForOutsource(query) {
  24. return request({
  25. url: baseUrl + '/business/productionDaywork/processesForOutsource',
  26. method: 'get',
  27. params: query
  28. })
  29. }
  30. export function processesForOutsourceByFirst(query) {
  31. return request({
  32. url: baseUrl + '/business/productionDaywork/processesForOutsourceByFirst',
  33. method: 'get',
  34. params: query
  35. })
  36. }
  37. /**
  38. * 查询当前报工工序
  39. * 此方法在非本序废品页面使用
  40. * @param {*} query
  41. * @returns
  42. */
  43. export function listDayworkLot(query) {
  44. return request({
  45. url: baseUrl + '/business/productionDaywork/listDayworkLot',
  46. method: 'get',
  47. params: query
  48. })
  49. }
  50. export function carrierForOutsource(query) {
  51. return request({
  52. url: baseUrl + '/business/productionDaywork/carrierForOutsource',
  53. method: 'get',
  54. params: query
  55. })
  56. }
  57. // 查询工序管理
  58. export function getDayworkProcessList(query) {
  59. return request({
  60. url: baseUrl + '/business/productionDaywork/getDayworkProcessList',
  61. method: 'get',
  62. params: query
  63. })
  64. }
  65. /**
  66. * 获取 计划查询的工段列表
  67. * @param {*} data
  68. * @returns
  69. */
  70. /**
  71. * 获取 计划查询 列表
  72. * @param {*} data
  73. * @returns
  74. */
  75. export function getDayworkInfo(query) {
  76. return request({
  77. url: baseUrl + '/business/productionDaywork/getDayworkInfo',
  78. method: 'get',
  79. params: query
  80. })
  81. }
  82. /**
  83. * 获取 计划查询的工段列表
  84. * @param {*} data
  85. * @returns
  86. */
  87. export function getDeptInfo(query) {
  88. return request({
  89. url: baseUrl + '/business/productionDaywork/getDeptInfo',
  90. method: 'get',
  91. params: query
  92. })
  93. }
  94. /**
  95. * 获取 已生产批次 列表
  96. * @param {*} data
  97. * @returns
  98. */
  99. export function getProducedLot(query) {
  100. return request({
  101. url: baseUrl + '/business/productionDaywork/getProducedLot',
  102. method: 'get',
  103. params: query
  104. })
  105. }
  106. export function getLotPosition(query) {
  107. return request({
  108. url: baseUrl + '/business/productionDaywork/getLotPosition',
  109. method: 'get',
  110. params: query
  111. })
  112. }
  113. export function getItemProcess(query) {
  114. return request({
  115. url: baseUrl + '/business/productionDaywork/getItemProcess',
  116. method: 'get',
  117. params: query
  118. })
  119. }
  120. /**
  121. * 获取 报工记录的工段
  122. * @param {*} data
  123. * @returns
  124. */
  125. export function getDeptList(query) {
  126. return request({
  127. url: baseUrl + '/business/productionDaywork/getDeptList',
  128. method: 'get',
  129. params: query
  130. })
  131. }
  132. /** 查询批次信息 */
  133. export function getDayworkItemProcess(id) {
  134. return request({
  135. url: baseUrl + '/business/productionDaywork/getDayworkItemProcess/' + id,
  136. method: 'get'
  137. })
  138. }
  139. /**
  140. * 获取 生产批次报工 列表
  141. * @param {*} data
  142. * @returns
  143. */
  144. export function listDayworkItem(query) {
  145. return request({
  146. url: baseUrl + '/business/productionDaywork/listItem',
  147. method: 'get',
  148. params: query
  149. })
  150. }
  151. /**
  152. * 批次日报
  153. * @param {*} query
  154. * @returns
  155. */
  156. export function listReportItem(query) {
  157. return request({
  158. url: baseUrl + '/business/productionDaywork/listReportItem',
  159. method: 'get',
  160. params: query
  161. })
  162. }
  163. /**
  164. * 获取 生产批次报工 列表
  165. * @param {*} data
  166. * @returns
  167. */
  168. export function checkUseEquipment(data) {
  169. return request({
  170. url: baseUrl + '/business/productionDaywork/checkUseEquipment',
  171. method: 'post',
  172. data: data
  173. })
  174. }
  175. /**
  176. * 修改 生产批次报工 列表
  177. * @param {*} data
  178. * @returns
  179. */
  180. export function updateItem(data) {
  181. return request({
  182. url: baseUrl + '/business/productionDaywork/updateItem',
  183. method: 'post',
  184. data: data
  185. })
  186. }
  187. /**
  188. * 查询是否为首序
  189. */
  190. export function getIsFirstOrder(dayworkId) {
  191. return request({
  192. url: baseUrl + '/business/productionDaywork/getIsFirstOrder/' + dayworkId,
  193. method: 'get'
  194. })
  195. }
  196. /**
  197. * 获取报工批次工序列表
  198. * @param {*} data
  199. * @returns
  200. */
  201. export function getProcessList(query) {
  202. return request({
  203. url: baseUrl + '/business/productionDaywork/getProcessList',
  204. method: 'get',
  205. params: query
  206. })
  207. }
  208. // 查询工段资源组能够选择的设备
  209. export function getEquipmentInfo(query) {
  210. return request({
  211. url: baseUrl + '/business/detail/equipmentInfo',
  212. method: 'get',
  213. params: query
  214. })
  215. }
  216. //查询工艺路线计划单
  217. export function getProcessDetail(data) {
  218. return request({
  219. url: baseUrl + '/business/productionDaywork/getProcessDetail',
  220. method: 'post',
  221. data: data
  222. })
  223. }
  224. export function getEquipmentList(data) {
  225. return request({
  226. url: baseUrl + '/business/detail/getEquipmentList',
  227. method: 'post',
  228. data: data
  229. })
  230. }
  231. /**
  232. * 获取报工批次废弃信息
  233. * @param {*} data
  234. * @returns
  235. */
  236. export function getDayworkItemRejectList(query) {
  237. return request({
  238. url: baseUrl + '/business/productionDaywork/getDayworkItemRejectList',
  239. method: 'get',
  240. params: query
  241. })
  242. }
  243. /**
  244. * 修改 生产批次报工 列表
  245. * @param {*} data
  246. * @returns
  247. */
  248. export function updateDayworkItemInfo(data) {
  249. return request({
  250. url: baseUrl + '/business/productionDaywork/updateDayworkItemInfo',
  251. method: 'post',
  252. data: data
  253. })
  254. }
  255. /**
  256. * 修改 生产批次报工列表中的数量
  257. * @param {*} data
  258. * @returns
  259. */
  260. export function updateDayworkItemInfoForNum(data) {
  261. return request({
  262. url: baseUrl + '/business/productionDaywork/updateDayworkItemInfoForNum',
  263. method: 'post',
  264. data: data
  265. })
  266. }
  267. export function updateDayworkItemInfoMax(data) {
  268. return request({
  269. url: baseUrl + '/business/productionDaywork/updateDayworkItemInfoMax',
  270. method: 'post',
  271. data: data
  272. })
  273. }
  274. export function addDaywork(data) {
  275. return request({
  276. url: baseUrl + '/business/daywork',
  277. method: 'post',
  278. data: data
  279. })
  280. }
  281. export function getDaywork(id) {
  282. return request({
  283. url: baseUrl + '/business/daywork/' + id,
  284. method: 'get'
  285. })
  286. }
  287. export function getDayworkItemDetail(data) {
  288. return request({
  289. url: baseUrl + '/business/productionDaywork/getDayworkItemDetail',
  290. method: 'post',
  291. data: data
  292. })
  293. }
  294. export function updateDaywork(data) {
  295. return request({
  296. url: baseUrl + '/business/daywork',
  297. method: 'put',
  298. data: data
  299. })
  300. }
  301. export function delDaywork(id) {
  302. return request({
  303. url: baseUrl + '/business/daywork/' + id,
  304. method: 'delete'
  305. })
  306. }
  307. export function delDayworkItem(ids) {
  308. return request({
  309. url: baseUrl + '/business/productionDaywork/' + ids,
  310. method: 'delete'
  311. })
  312. }
  313. export function lotList(query) {
  314. return request({
  315. url: baseUrl + '/business/productionDaywork/lotList',
  316. method: 'get',
  317. params: query
  318. })
  319. }