shelf.js 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. import { axios } from '@/utils/request'
  2. // 货架 列表 分页
  3. export const shelfList = (params) => {
  4. const url = `/shelf/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 shelfDetail = (params) => {
  18. return axios({
  19. url: `/shelf/queryBySn/${params.sn}`,
  20. data: params,
  21. method: 'post',
  22. headers:{
  23. 'module': encodeURIComponent('货架详情')
  24. }
  25. })
  26. }
  27. // 货架产品导出
  28. export const shelfProductExport = params => {
  29. return axios({
  30. url: '/shelfProduct/export',
  31. data: params,
  32. method: 'post',
  33. responseType: 'blob',
  34. headers:{
  35. 'module': encodeURIComponent('导出')
  36. }
  37. })
  38. }
  39. // 货架启用停用
  40. export const shelfModifState = (params) => {
  41. return axios({
  42. url: `/shelf/modifState`,
  43. data: params,
  44. method: 'post',
  45. headers:{
  46. 'module': encodeURIComponent(params.state=="WRITE_OFF"?'注销':'启用停用')
  47. }
  48. })
  49. }
  50. // 查询客户关联的货架
  51. export const queryByCustomerSn = (params) => {
  52. return axios({
  53. url: `/shelf/queryByCustomerSn/${params.sn}`,
  54. data: params,
  55. method: 'post',
  56. headers:{
  57. 'module': encodeURIComponent('客户关联的货架')
  58. }
  59. })
  60. }
  61. //待补货产品列表
  62. export const queryListForReplenish = (params) => {
  63. return axios({
  64. url: `/shelf/queryListForReplenish`,
  65. data: params,
  66. method: 'post',
  67. headers:{
  68. 'module': encodeURIComponent('待补货产品列表')
  69. }
  70. })
  71. }
  72. // 补货产品明细
  73. export const queryProductListForReplenish = (params) => {
  74. return axios({
  75. url: `/shelf/queryProductListForReplenish `,
  76. data: params,
  77. method: 'post',
  78. headers:{
  79. 'module': encodeURIComponent('补货产品明细')
  80. }
  81. })
  82. }
  83. // 货架 保存
  84. export const shelfSave = (params) => {
  85. return axios({
  86. url: `/shelf/save`,
  87. data: params,
  88. method: 'post',
  89. headers:{
  90. 'module': encodeURIComponent('编辑货架基础信息')
  91. }
  92. })
  93. }
  94. // 货架 货位产品 列表 不分页
  95. export const shelfProductList = (params) => {
  96. return axios({
  97. url: `/shelf/placeProduct/queryList`,
  98. data: params,
  99. method: 'post',
  100. headers:{
  101. 'module': encodeURIComponent('货位产品列表')
  102. }
  103. })
  104. }
  105. // 货架 货位产品 详情
  106. export const shelfProductDetail = (params) => {
  107. return axios({
  108. url: `/shelf/placeProduct/queryByPlaceSn/${params.shelfPlaceSn}`,
  109. data: params,
  110. method: 'get',
  111. headers:{
  112. 'module': encodeURIComponent('货位产品详情')
  113. }
  114. })
  115. }
  116. // 货架 货位产品 保存
  117. export const shelfProductSave = (params) => {
  118. return axios({
  119. url: `/shelf/placeProduct/save`,
  120. data: params,
  121. method: 'post',
  122. headers:{
  123. 'module': encodeURIComponent(params.updateProductFlag ? '更换产品' : '绑定产品')
  124. }
  125. })
  126. }
  127. // 禁用货架产品
  128. export const shelfProductEnable = (params) => {
  129. return axios({
  130. url: `/shelfProduct/updateEnableFlag`,
  131. data: params,
  132. method: 'post',
  133. headers:{
  134. 'module': encodeURIComponent(params.enableFlag==1?'启用':'禁用')
  135. }
  136. })
  137. }
  138. // 获取价格显示
  139. export const getShelfPriceShow = (params) => {
  140. return axios({
  141. url: `/shelf/queryShelfPriceShowParam/${params.shelfSn}`,
  142. method: 'get',
  143. headers:{
  144. 'module': encodeURIComponent('获取价格显示设置')
  145. }
  146. })
  147. }
  148. // 更新价格显示
  149. export const updateShelfPriceShow = (params) => {
  150. return axios({
  151. url: `/shelf/updateShelfPriceShowParam/${params.shelfSn}`,
  152. data: params.paramValue,
  153. method: 'post',
  154. headers:{
  155. 'module': encodeURIComponent('更新价格显示设置')
  156. }
  157. })
  158. }
  159. // 货架 货位产品 下载模板
  160. export const shelfProductDownload = params => {
  161. return axios.request({
  162. url: `/shelf/placeProduct/downloadExcel/${params.shelfSn}`,
  163. method: 'post',
  164. responseType: 'blob'
  165. })
  166. }
  167. // 货架 货位产品 解析导入的文件
  168. export const shelfProductParseProducts = params => {
  169. return axios({
  170. url: '/shelf/placeProduct/readExcel',
  171. data: params,
  172. method: 'post'
  173. })
  174. }
  175. // POST 解析货位的导入模板
  176. export const shelfPlaceReadExcel = params => {
  177. return axios({
  178. url: '/shelf/place/readExcel',
  179. data: params,
  180. method: 'post',
  181. })
  182. }
  183. // POST 导出错误项
  184. export const shelfPlaceFailExcel = params => {
  185. return axios({
  186. url: '/shelf/place/downloadFailExcel',
  187. data: params,
  188. method: 'post',
  189. responseType: 'blob',
  190. headers:{
  191. 'module': encodeURIComponent('导出错误项')
  192. }
  193. })
  194. }
  195. // 货架 货位产品 批量插入
  196. export const shelfProductBatchInsert = params => {
  197. return axios({
  198. url: '/shelf/placeProduct/saveBatchExcel',
  199. data: params,
  200. method: 'post',
  201. headers:{
  202. 'module': encodeURIComponent('导入货位产品')
  203. }
  204. })
  205. }
  206. // 批量保存货位
  207. export const shelfSaveBatchExcel = params => {
  208. return axios({
  209. url: '/shelf/place/saveBatchExcel',
  210. data: params,
  211. method: 'post',
  212. headers:{
  213. 'module': encodeURIComponent('批量导入货位')
  214. }
  215. })
  216. }
  217. // 货架 箭冠产品 分页
  218. export const shelfDealerProductList = (params) => {
  219. const url = `/product/queryPageForXPRH/${params.pageNo}/${params.pageSize}`
  220. delete params.pageNo
  221. delete params.pageSize
  222. return axios({
  223. url: url,
  224. data: params,
  225. method: 'post',
  226. headers:{
  227. 'module': encodeURIComponent('货架产品(箭冠产品)列表查询')
  228. }
  229. })
  230. }
  231. // 货架监控 列表 不分页
  232. export const shelfControlList = (params) => {
  233. return axios({
  234. url: `/shelf/control/queryList`,
  235. data: params,
  236. method: 'post',
  237. headers:{
  238. 'module': encodeURIComponent('可调回产品列表')
  239. }
  240. })
  241. }
  242. // 货架监控 出入库明细 分页
  243. export const shelfPutOutDetailList = (params) => {
  244. const url = `/shelf/placeProduct/queryStockPutOutDetailPage/${params.pageNo}/${params.pageSize}`
  245. delete params.pageNo
  246. delete params.pageSize
  247. return axios({
  248. url: url,
  249. data: params,
  250. method: 'post',
  251. headers:{
  252. 'module': encodeURIComponent('出入库明细列表')
  253. }
  254. })
  255. }
  256. // 货架监控 导出
  257. export const exportShelfControlReport = (params) => {
  258. return axios({
  259. url: `/shelf/control/export`,
  260. data: params,
  261. method: 'post',
  262. responseType: 'blob',
  263. headers:{
  264. 'module': encodeURIComponent('导出')
  265. }
  266. })
  267. }
  268. // 修改完成标识
  269. export const modifFinishFlag = (params) => {
  270. return axios({
  271. url: `/shelf/modifFinishFlag`,
  272. data: params,
  273. method: 'post',
  274. headers:{
  275. 'module': encodeURIComponent('是否设置完成')
  276. }
  277. })
  278. }
  279. // 新增货位
  280. export const addPlaceAndProduct = (params) => {
  281. return axios({
  282. url: `/shelf/placeAndProduct/save`,
  283. data: params,
  284. method: 'post',
  285. headers:{
  286. 'module': encodeURIComponent(params.id?'编辑货位':'新增货位')
  287. }
  288. })
  289. }
  290. // 删除货位
  291. export const delShelfPlaceSn = (params) => {
  292. return axios({
  293. url: `/shelf/place/deleteBySn/${params.shelfPlaceSn}`,
  294. data: params,
  295. method: 'post',
  296. headers:{
  297. 'module': encodeURIComponent('删除货位')
  298. }
  299. })
  300. }
  301. // 货架订单-分页列表
  302. export const orderBillQueryPage = (params) => {
  303. const url = `/orderBill/queryPage/${params.pageNo}/${params.pageSize}`
  304. delete params.pageNo
  305. delete params.pageSize
  306. return axios({
  307. url: url,
  308. data: params,
  309. method: 'post',
  310. headers:{
  311. 'module': encodeURIComponent('列表查询')
  312. }
  313. })
  314. }
  315. // 货架订单明细-合计
  316. export const orderBillDetailCount = (params) => {
  317. return axios({
  318. url: `/orderBill/queryDetailCount`,
  319. data: params,
  320. method: 'post'
  321. })
  322. }
  323. // 货架订单-合计
  324. export const orderBillQueryCount = (params) => {
  325. return axios({
  326. url: `/orderBill/queryCount`,
  327. data: params,
  328. method: 'post'
  329. })
  330. }
  331. // 客户分析-分页列表
  332. export const queryShelfOrderReportPage = (params) => {
  333. const url = `/shelfOrderReport/queryShelfOrderReportPage/${params.pageNo}/${params.pageSize}`
  334. delete params.pageNo
  335. delete params.pageSize
  336. return axios({
  337. url: url,
  338. data: params,
  339. method: 'post',
  340. headers:{
  341. 'module': encodeURIComponent('列表查询')
  342. }
  343. })
  344. }
  345. // 客户分析-统计
  346. export const queryShelfOrderTotalReport = (params) => {
  347. return axios({
  348. url: `/shelfOrderReport/queryShelfOrderTotalReport`,
  349. data: params,
  350. method: 'post'
  351. })
  352. }
  353. // 客户分析-导出
  354. export const exportShelfOrderReport = (params) => {
  355. return axios({
  356. url: `/shelfOrderReport/exportShelfOrderReport`,
  357. data: params,
  358. method: 'post',
  359. responseType: 'blob',
  360. headers:{
  361. 'module': encodeURIComponent('导出')
  362. }
  363. })
  364. }