stock.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. import request, { postBlob, handleImport, getBlob } from '@/utils/request'
  2. export function getListStockToDayV2(params) {
  3. return request({
  4. url: `/stock/manager/listStockToDayV2?moduleId=${params.moduleId}`,
  5. method: 'post',
  6. data: params
  7. })
  8. }
  9. export function exportListStockToDayV2(data, name) {
  10. return postBlob({
  11. url: '/stock/manager/listStockToDayV2/export',
  12. data,
  13. name
  14. })
  15. }
  16. export function getListStockToDayCustomerV2(params) {
  17. return request({
  18. url: `/stock/manager/listStockToDayCustomerV2?moduleId=${params.moduleId}`,
  19. method: 'post',
  20. data: params
  21. })
  22. }
  23. export function exportListStockToDayCustomerV2(data, name) {
  24. return postBlob({
  25. url: '/stock/manager/listStockToDayCustomerV2/export',
  26. data,
  27. name
  28. })
  29. }
  30. export function getStockListV2(params) {
  31. return request({
  32. url: `/stock/manager/listV2?moduleId=${params.moduleId}`,
  33. method: 'post',
  34. data: params
  35. })
  36. }
  37. export function exportStockListV2(data, name) {
  38. return postBlob({
  39. url: '/stock/manager/listV2/export',
  40. data,
  41. name
  42. })
  43. }
  44. export function getStockManagerListV2(params) {
  45. return request({
  46. url: `/stock/manager/listCustomerV2?moduleId=${params.moduleId}`,
  47. method: 'post',
  48. data: params
  49. })
  50. }
  51. export function exportStockManagerListV2(data, name) {
  52. return postBlob({
  53. url: '/stock/manager/listCustomerV2/export',
  54. data,
  55. name
  56. })
  57. }
  58. // 获取库存列表
  59. export function getStockList(params) {
  60. return request({
  61. url: '/stock/manager/list',
  62. method: 'get',
  63. params
  64. })
  65. }
  66. // 获取仓库列表
  67. export function getWarehouseList(params) {
  68. return request({
  69. url: '/stock/listStock',
  70. method: 'get',
  71. params
  72. })
  73. }
  74. // 获取仓储费报表列表
  75. export function getListStorageFee(params) {
  76. return request({
  77. url: '/sale/order/listStorageFee',
  78. method: 'get',
  79. params
  80. })
  81. }
  82. // 获取销售类型列表
  83. export function getSalesTypeList(params) {
  84. return request({
  85. url: '/sale/type/list',
  86. method: 'get',
  87. params
  88. })
  89. }
  90. // 获取经销商仓库现存列表
  91. export function getListStockToDayCustomer(params) {
  92. return request({
  93. url: '/stock/manager/listStockToDayCustomer',
  94. method: 'get',
  95. params
  96. })
  97. }
  98. // 获取预留库存列表
  99. export function getReservedList(params) {
  100. return request({
  101. url: '/stock/manager/listCustomer',
  102. method: 'get',
  103. params
  104. })
  105. }
  106. // 获取仓库现存列表
  107. export function getListStockToDay(params) {
  108. return request({
  109. url: '/stock/manager/listStockToDay',
  110. method: 'get',
  111. params
  112. })
  113. }
  114. // 库存到货访问通知-列表
  115. export function getNoticeList(params) {
  116. return request({
  117. url: '/stock/visit/list',
  118. method: 'get',
  119. params
  120. })
  121. }
  122. // 库存到货访问通知-列表
  123. export function getArrivalNotice(params) {
  124. return request({
  125. url: '/stock/visit/list',
  126. method: 'get',
  127. params
  128. })
  129. }
  130. // 库存到货访问通知-数量
  131. export function getNoticeNum(params) {
  132. return request({
  133. url: '/stock/visit/count',
  134. method: 'get',
  135. params
  136. })
  137. }
  138. // 经销商仓库库存列表(前置)
  139. export function getcustomerFrontList(params) {
  140. return request({
  141. url: `/customer/front/list?moduleId=${params.moduleId}`,
  142. method: 'post',
  143. data: params
  144. })
  145. }
  146. // 经销商仓库库存导出(前置)
  147. export function partsNewInExport(data, name) {
  148. return postBlob({
  149. url: '/customer/front/list/export',
  150. data,
  151. name
  152. })
  153. }
  154. // 经销商仓库库存列表(商家)
  155. export function getFrontListCustomer(params) {
  156. return request({
  157. url: `/customer/front/listCustomer?moduleId=${params.moduleId}`,
  158. method: 'post',
  159. data: params
  160. })
  161. }
  162. // 经销商仓库库存导出(商家)
  163. export function exportCustomer(data, name) {
  164. return postBlob({
  165. url: '/customer/front/list/exportCustomer',
  166. data,
  167. name
  168. })
  169. }
  170. // 库存调整管理
  171. export function getFrontListCustomerAcc(params) {
  172. console.log(params);
  173. return request({
  174. url: `/customer/front/listCustomerAcc?moduleId=${params.moduleId}`,
  175. method: 'post',
  176. data: params
  177. })
  178. }
  179. // 经销商仓库库存导出(商家)
  180. export function exportCustomerStockOrderBean(data, name) {
  181. return postBlob({
  182. url: '/customer/front/list/exportCustomerStockOrderBean',
  183. data,
  184. name
  185. })
  186. }
  187. // 库存调整管理三级帐
  188. export function getFrontListStockAcc(params) {
  189. return request({
  190. url: `/customer/front/listStockAcc?moduleId=${params.moduleId}`,
  191. method: 'post',
  192. data: params
  193. })
  194. }
  195. // 经销商三级帐
  196. export function exportListStockAcc(data, name) {
  197. return postBlob({
  198. url: '/customer/front/listStockAcc/exportListStockAcc',
  199. data,
  200. name
  201. })
  202. }
  203. // 新增库存调整
  204. export function addCustomerStockOrder(params) {
  205. return request({
  206. url: '/customer/front/addCustomerStockOrder',
  207. method: 'post',
  208. data: params
  209. })
  210. }
  211. // 审批库存调整
  212. export function approvalCustomerStockOrder(params) {
  213. return request({
  214. url: '/customer/front/approvalCustomerStockOrder',
  215. method: 'post',
  216. data: params
  217. })
  218. }
  219. // 库存调整详情
  220. export function getFrontDetail(params) {
  221. return request({
  222. url: '/customer/front/detail',
  223. method: 'get',
  224. params
  225. })
  226. }
  227. // 库存调整详情
  228. export function deleteCustomerStockOrder(params) {
  229. return request({
  230. url: '/customer/front/deleteCustomerStockOrder',
  231. method: 'post',
  232. data: params
  233. })
  234. }
  235. // 导入
  236. export function partsNewInImport(data) {
  237. return handleImport("/customer/front/importData", data.formdata, data.id || "");
  238. }
  239. // 下载模板
  240. export function workerTemplateExcel(data, name) {
  241. return getBlob({
  242. url: "/customer/front/download",
  243. data,
  244. name
  245. });
  246. }
  247. // 出库条码管理列表
  248. export function getSalseList(params) {
  249. return request({
  250. url: `/sale/code/list?moduleId=${params.moduleId}`,
  251. method: 'post',
  252. data: params
  253. })
  254. }
  255. // 下载模板
  256. export function salseCodeDownload(data, name) {
  257. return getBlob({
  258. url: "/sale/code/download",
  259. data,
  260. name
  261. });
  262. }
  263. // 导入
  264. export function salseImport(data) {
  265. return handleImport("/sale/code/importData", data.formdata, data.id || "");
  266. }
  267. // 出库条码管理导出
  268. export function salseExport(data, name) {
  269. return postBlob({
  270. url: '/sale/code/list/export',
  271. data,
  272. name
  273. })
  274. }
  275. // 导入库存初始化
  276. export function kunCunImportData(data) {
  277. return handleImport("/customer/front/kunCunImportData", data.formdata, data.id || "");
  278. }
  279. // 导入库存调整
  280. export function kunCunTiaoImportData(data) {
  281. return handleImport("/customer/front/kunCunTiaoImportData", data.formdata, data.id || "");
  282. }
  283. export function downloadkunCunDownload(data, name) {
  284. return getBlob({
  285. url: 'customer/front/kunCunDownload',
  286. data,
  287. name
  288. })
  289. }