allocLinkageOut.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. import { axios } from '@/utils/request'
  2. // 连锁调拨调出 列表 分页
  3. export const allocLinkageOutList = (params) => {
  4. const url = `/allocLinkageOut/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 allocLinkageOutExport = (params) => {
  18. return axios({
  19. url: '/allocLinkageOut/detail/export',
  20. data: params,
  21. method: 'post',
  22. responseType: 'blob',
  23. headers: {
  24. 'module': encodeURIComponent('导出')
  25. }
  26. })
  27. }
  28. // 连锁调拨调出 统计
  29. export const allocLinkageOutQueryCount = (params) => {
  30. return axios({
  31. url: `/allocLinkageOut/queryCount`,
  32. data: params,
  33. method: 'post'
  34. })
  35. }
  36. // 连锁调拨调出 保存
  37. export const allocLinkageOutSave = (params) => {
  38. return axios({
  39. url: '/allocLinkageOut/save',
  40. data: params,
  41. method: 'post',
  42. headers: {
  43. 'module': encodeURIComponent('新增')
  44. }
  45. })
  46. }
  47. // 连锁调拨调出 提交
  48. export const allocLinkageOutSubmit = (params) => {
  49. return axios({
  50. url: `/allocLinkageOut/submit/${params.sn}`,
  51. method: 'get',
  52. headers: {
  53. 'module': encodeURIComponent('提交')
  54. }
  55. })
  56. }
  57. // 连锁调拨调出 详情 列表 分页
  58. export const allocLinkageOutDetailList = (params) => {
  59. const url = `/allocLinkageOut/detail/queryPage/${params.pageNo}/${params.pageSize}`
  60. delete params.pageNo
  61. delete params.pageSize
  62. return axios({
  63. url: url,
  64. data: params,
  65. method: 'post',
  66. headers: {
  67. 'module': encodeURIComponent('明细列表查询')
  68. }
  69. })
  70. }
  71. // 连锁调拨调出 详情 根据sn查
  72. export const allocLinkageOutDetailSn = (params) => {
  73. return axios({
  74. url: `/allocLinkageOut/findBySn/${params.sn}`,
  75. method: 'get',
  76. headers: {
  77. 'module': encodeURIComponent('详情信息')
  78. }
  79. })
  80. }
  81. // 连锁调拨调出 审核
  82. export const allocLinkageAudit = (params) => {
  83. return axios({
  84. url: `/allocLinkageOut/audit/${params.sn}`,
  85. method: 'get',
  86. headers: {
  87. 'module': encodeURIComponent('审核')
  88. }
  89. })
  90. }
  91. // 连锁调拨调出 出库
  92. export const allocLinkageOutStock = (params) => {
  93. return axios({
  94. url: `/allocLinkageOut/outStock/${params.sn}`,
  95. method: 'get',
  96. headers: {
  97. 'module': encodeURIComponent('出库')
  98. }
  99. })
  100. }
  101. // 连锁调拨调出 删除
  102. export const allocLinkageOutDel = (params) => {
  103. return axios({
  104. url: `/allocLinkageOut/delete/${params.sn}`,
  105. method: 'get',
  106. headers: {
  107. 'module': encodeURIComponent('删除')
  108. }
  109. })
  110. }
  111. // 连锁调拨调出 详情 添加
  112. export const allocLinkageOutDetailSave = (params) => {
  113. return axios({
  114. url: '/allocLinkageOut/detail/save',
  115. data: params,
  116. method: 'post',
  117. headers: {
  118. 'module': encodeURIComponent('添加')
  119. }
  120. })
  121. }
  122. // 连锁调拨调出 详情 删除
  123. export const allocLinkageOutDetailDel = (params) => {
  124. return axios({
  125. url: `/allocLinkageOut/detail/delete/${params.id}`,
  126. method: 'get',
  127. headers: {
  128. 'module': encodeURIComponent('删除')
  129. }
  130. })
  131. }
  132. // 连锁调拨调出 详情 清空列表
  133. export const allocLinkageOutDetailDelAll = (params) => {
  134. return axios({
  135. url: `/allocLinkageOut/detail/deleteAll/${params.sn}`,
  136. method: 'get',
  137. headers: {
  138. 'module': encodeURIComponent('清空列表')
  139. }
  140. })
  141. }
  142. // 连锁调拨调出 详情 合计
  143. export const allocLinkageOutDetailCount = (params) => {
  144. return axios({
  145. url: '/allocLinkageOut/detail/queryCount',
  146. data: params,
  147. method: 'post'
  148. })
  149. }
  150. // 连锁调拨调出 调往对象
  151. export const getTenantList = (params) => {
  152. return axios({
  153. url: '/allocLinkageOut/getTenantList',
  154. method: 'get'
  155. })
  156. }
  157. // 导入产品
  158. export const importProduct = params => {
  159. return axios({
  160. url: '/allocLinkageOut/importProduct',
  161. data: params,
  162. method: 'post'
  163. })
  164. }
  165. // 导出错误项
  166. export const importProductExportError = (params) => {
  167. return axios({
  168. url: '/allocLinkageOut/importProduct/exportError',
  169. data: params,
  170. method: 'post',
  171. responseType: 'blob',
  172. headers: {
  173. 'module': encodeURIComponent('导出错误项')
  174. }
  175. })
  176. }
  177. // 批量确认导入产品
  178. export const importProductInsertBatch = (params) => {
  179. return axios({
  180. url: '/allocLinkageOut/importProduct/insertBatch',
  181. data: params,
  182. method: 'post',
  183. headers: {
  184. 'module': encodeURIComponent('导入产品')
  185. }
  186. })
  187. }
  188. // 调往对象
  189. export const getReportOutTenantList = (params) => {
  190. return axios({
  191. url: '/report/reportAllocLinkageOut/reportDealer',
  192. data: params,
  193. method: 'post',
  194. headers: {
  195. 'module': encodeURIComponent('调往对象')
  196. }
  197. })
  198. }
  199. // 连锁调拨调出 详情 打印
  200. export const allocLinkageOutDetailPrint = params => {
  201. const data = {
  202. url: `allocLinkageOut/print/${params.sn}/${params.type}/${params.showFlag}`,
  203. method: 'get',
  204. headers: {
  205. 'module': encodeURIComponent(params.type == 'INK' ? '喷墨打印':'针式打印')
  206. }
  207. }
  208. // 喷墨打印
  209. if (params.type == 'INK') {
  210. data.responseType = 'blob'
  211. }
  212. return axios.request(data)
  213. }