allocateBill.js 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. import { axios } from '@/utils/request'
  2. // 调拨管理 列表 分页
  3. export const allocateBillList = (params) => {
  4. const url = `/allocateBill/queryPage/${params.pageNo}/${params.pageSize}`
  5. delete params.pageNo
  6. delete params.pageSize
  7. return axios({
  8. url: url,
  9. data: params,
  10. method: 'post',
  11. headers: {
  12. 'module': encodeURIComponent('列表查询')
  13. }
  14. })
  15. }
  16. // 调拨退货抓单-选产品列表
  17. export const allocDetailQueryPageForReturn = (params) => {
  18. const url = `/allocateBill/detail/queryPageForReturn/${params.pageNo}/${params.pageSize}`
  19. delete params.pageNo
  20. delete params.pageSize
  21. return axios({
  22. url: url,
  23. data: params,
  24. method: 'post',
  25. headers: {
  26. 'module': encodeURIComponent('可选产品列表查询')
  27. }
  28. })
  29. }
  30. // 批量修改部门信息
  31. export const updateBatchDepartment = params => {
  32. return axios({
  33. url: '/allocateBill/detail/updateBatchDepartment',
  34. data: params,
  35. method: 'post',
  36. headers: {
  37. 'module': encodeURIComponent('批量设置费用归属部门')
  38. }
  39. })
  40. }
  41. // 调拨管理 新增
  42. export const allocateBillSave = params => {
  43. return axios({
  44. url: '/allocateBill/save',
  45. data: params,
  46. method: 'post',
  47. headers: {
  48. 'module': encodeURIComponent('新增')
  49. }
  50. })
  51. }
  52. // 调拨管理 删除
  53. export const allocateBillDel = params => {
  54. return axios({
  55. url: `/allocateBill/delete/${params.sn}`,
  56. data: {},
  57. method: 'get',
  58. headers: {
  59. 'module': encodeURIComponent('删除')
  60. }
  61. })
  62. }
  63. // 调拨管理 详情
  64. export const allocateBillDetail = params => {
  65. return axios({
  66. url: `/allocateBill/findBySn/${params.sn}`,
  67. data: {},
  68. method: 'get',
  69. headers: {
  70. 'module': encodeURIComponent('查看详情')
  71. }
  72. })
  73. }
  74. // 调拨管理 审核
  75. export const allocateBillAudit = params => {
  76. return axios({
  77. url: `/allocateBill/audit/${params.sn}/${params.state}`,
  78. data: {},
  79. method: 'get',
  80. headers: {
  81. 'module': encodeURIComponent('审核')
  82. }
  83. })
  84. }
  85. // 允许打印
  86. export const allocateBillAblePrint = params => {
  87. return axios({
  88. url: `/allocateBill/ablePrint/${params.sn}`,
  89. data: params,
  90. method: 'post',
  91. headers: {
  92. 'module': encodeURIComponent('允许打印')
  93. }
  94. })
  95. }
  96. // 对单通过
  97. export const allocateBillCheck = params => {
  98. return axios({
  99. url: `/allocateBill/check/${params.sn}`,
  100. data: params,
  101. method: 'post',
  102. headers: {
  103. 'module': encodeURIComponent('对单通过')
  104. }
  105. })
  106. }
  107. // 调拨管理 提交
  108. export const allocateBillSubmit = params => {
  109. return axios({
  110. url: `/allocateBill/submit`,
  111. data: params,
  112. method: 'post',
  113. headers: {
  114. 'module': encodeURIComponent('提交')
  115. }
  116. })
  117. }
  118. // 调拨管理 导出
  119. export const allocateBillExport = (params) => {
  120. return axios({
  121. url: '/allocateBill/exportExcel',
  122. data: params,
  123. method: 'post',
  124. responseType: 'blob',
  125. headers: {
  126. 'module': encodeURIComponent('导出')
  127. }
  128. })
  129. }
  130. // 调拨管理 明细 列表 分页
  131. export const allocateBillDetailList = (params) => {
  132. const url = `/allocateBill/detail/queryPage/${params.pageNo}/${params.pageSize}`
  133. delete params.pageNo
  134. delete params.pageSize
  135. return axios({
  136. url: url,
  137. data: params,
  138. method: 'post',
  139. headers: {
  140. 'module': encodeURIComponent('明细列表查询')
  141. }
  142. })
  143. }
  144. // 调拨管理 明细 列表 合计
  145. export const allocateBillDetailCount = (params) => {
  146. return axios({
  147. url: '/allocateBill/detail/queryCount',
  148. data: params,
  149. method: 'post'
  150. })
  151. }
  152. // 调拨管理 详情 删除
  153. export const allocateBillDetailDel = params => {
  154. return axios({
  155. url: `/allocateBill/detail/delete/${params.id}`,
  156. data: {},
  157. method: 'get',
  158. headers: {
  159. 'module': encodeURIComponent('删除')
  160. }
  161. })
  162. }
  163. // 调拨管理 详情 整单删除
  164. export const allocateBillDetailDelAll = params => {
  165. return axios({
  166. url: `/allocateBill/detail/deleteAll/${params.sn}`,
  167. data: {},
  168. method: 'get',
  169. headers: {
  170. 'module': encodeURIComponent('整单删除')
  171. }
  172. })
  173. }
  174. // 调拨管理 详情 保存
  175. export const allocateBillDetailSave = params => {
  176. return axios({
  177. url: '/allocateBill/detail/save',
  178. data: params,
  179. method: 'post',
  180. headers: {
  181. 'module': encodeURIComponent('修改数量或费用归属部门')
  182. }
  183. })
  184. }
  185. // 调拨管理 详情 打印
  186. export const allocateBillDetailPrint = params => {
  187. const url = `/allocateBill/print/${params.printType}`
  188. const mid = params.printType.indexOf('_TYPE') >= 0 ? '调拨分类打印' : '调拨打印'
  189. delete params.printType
  190. delete params.isPreview
  191. return axios.request({
  192. url: url,
  193. data: params,
  194. method: 'post',
  195. headers: {
  196. 'module': encodeURIComponent(mid)
  197. }
  198. })
  199. }
  200. // 调拨管理 详情 打印 产品列表
  201. export const allocateBillProductTypeList = params => {
  202. const url = `/allocateBill/queryProductTypeList/${params.sn}`
  203. delete params.sn
  204. return axios({
  205. url: url,
  206. data: params,
  207. method: 'post'
  208. })
  209. }
  210. // 调拨管理 下载模板
  211. export const allocateBillDownload = params => {
  212. return axios.request({
  213. url: `/allocateBill/detail/downloadExcel`,
  214. method: 'post',
  215. responseType: 'blob'
  216. })
  217. }
  218. // 调拨管理 解析导入的文件
  219. export const allocateBillParseProducts = params => {
  220. return axios({
  221. url: '/allocateBill/detail/parseProducts',
  222. data: params,
  223. method: 'post'
  224. })
  225. }
  226. // 调拨管理 批量插入
  227. export const allocateBillBatchInsert = params => {
  228. return axios({
  229. url: '/allocateBill/detail/batchInsert',
  230. data: params,
  231. method: 'post',
  232. headers: {
  233. 'module': encodeURIComponent('导入产品')
  234. }
  235. })
  236. }
  237. // 调拨管理 导入产品 导出错误项
  238. export const allocateBillFailExcel = (params) => {
  239. return axios({
  240. url: '/allocateBill/detail/downloadFailExcel',
  241. data: params,
  242. method: 'post',
  243. responseType: 'blob',
  244. headers: {
  245. 'module': encodeURIComponent('导出错误项')
  246. }
  247. })
  248. }
  249. // 调拨 详情 导出
  250. export const allocateBillDetailExcel = (params) => {
  251. return axios({
  252. url: `/allocateBill/detail/exportExcel/${params.printType}`,
  253. data: params,
  254. method: 'post',
  255. responseType: 'blob',
  256. headers: {
  257. 'module': encodeURIComponent(params.printType.indexOf('_TYPE') >= 0 ? '调拨分类导出' : '导出Excel')
  258. }
  259. })
  260. }
  261. // 调拨 列表 更改(暂不打印、取消打印)打印状态
  262. export const updatePrintState = params => {
  263. return axios({
  264. url: '/allocateBill/updatePrintState',
  265. data: params,
  266. method: 'post',
  267. headers: {
  268. 'module': encodeURIComponent('更改打印状态')
  269. }
  270. })
  271. }
  272. // 调拨一览表 列表分页
  273. export const queryOverviewPage = (params) => {
  274. const url = `/allocateBill/queryOverviewPage/${params.pageNo}/${params.pageSize}`
  275. delete params.pageNo
  276. delete params.pageSize
  277. return axios({
  278. url: url,
  279. data: params,
  280. method: 'post',
  281. headers: {
  282. 'module': encodeURIComponent('列表查询')
  283. }
  284. })
  285. }
  286. // 调拨 分页查询产品列表
  287. export const queryStockProductPage = (params) => {
  288. const url = `/allocateBill/queryStockProductPage/${params.pageNo}/${params.pageSize}`
  289. delete params.pageNo
  290. delete params.pageSize
  291. return axios({
  292. url: url,
  293. data: params,
  294. method: 'post',
  295. headers: {
  296. 'module': encodeURIComponent('列表查询')
  297. }
  298. })
  299. }