material.js 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. import request, { postBlob, handleImport, getBlob } from '@/utils/request'
  2. export function getMaterialListV2(params) {
  3. return request({
  4. url: `/k3/material/list/v2?moduleId=${params.moduleId}`,
  5. method: 'post',
  6. data: params
  7. })
  8. }
  9. export function getMachineLlistV2(params) {
  10. return request({
  11. url: `/v2/machine-record/list?moduleId=${params.moduleId}`,
  12. method: 'post',
  13. data: params
  14. })
  15. }
  16. export function exportMachineLlistV2(data, name) {
  17. return postBlob({
  18. url: '/v2/machine-record/list/export',
  19. data,
  20. name
  21. })
  22. }
  23. export function getCategoryListV2(params) {
  24. return request({
  25. url: `/v2/k3/category/list?moduleId=${params.moduleId}`,
  26. method: 'post',
  27. data: params
  28. })
  29. }
  30. export function exportCategoryListV2(data, name) {
  31. return postBlob({
  32. url: '/v2/k3/category/list/export',
  33. data,
  34. name
  35. })
  36. }
  37. export function getProductListV2(params) {
  38. return request({
  39. url: `/v2/product-compose/list?moduleId=${params.moduleId}`,
  40. method: 'post',
  41. data: params
  42. })
  43. }
  44. export function exportProductListV2(data, name) {
  45. return postBlob({
  46. url: '/v2/product-compose/list/export',
  47. data,
  48. name
  49. })
  50. }
  51. export function getList(params) {
  52. return request({
  53. url: '/admin/user/mch/list',
  54. method: 'get',
  55. params
  56. })
  57. }
  58. export function getCategoryList(params) {
  59. return request({
  60. url: '/k3/category/list',
  61. method: 'get',
  62. params
  63. })
  64. }
  65. export function editCategory(params) {
  66. return request({
  67. url: '/k3/material/edit',
  68. method: 'post',
  69. data: params
  70. })
  71. }
  72. export function getMaterialList(params) {
  73. return request({
  74. url: '/k3/material/list',
  75. method: 'get',
  76. params
  77. })
  78. }
  79. export function getMaterialDetail(params) {
  80. console.log(params, 999)
  81. return request({
  82. url: '/k3/material/detail',
  83. method: 'get',
  84. params
  85. })
  86. }
  87. export function getProductDelete(params) {
  88. return request({
  89. url: '/product-price/delete',
  90. method: 'post',
  91. params: { ids: params.join(',') }
  92. })
  93. }
  94. export function getMachineLlist(params) {
  95. return request({
  96. url: '/machine-record/list',
  97. method: 'get',
  98. params
  99. })
  100. }
  101. export function getMachineEdit(params) {
  102. return request({
  103. url: '/machine-record/edit',
  104. method: 'post',
  105. data: params
  106. })
  107. }
  108. export function getMachineDel(params) {
  109. return request({
  110. url: '/machine-record/del',
  111. method: 'post',
  112. data: params
  113. })
  114. }
  115. export function getMachineAdd(params) {
  116. return request({
  117. url: '/machine-record/add',
  118. method: 'post',
  119. data: params
  120. })
  121. }
  122. // 产品对应关系
  123. export function getProductAdd(params) {
  124. return request({
  125. url: '/product-compose/add',
  126. method: 'post',
  127. data: params
  128. })
  129. }
  130. export function getProductDel(params) {
  131. return request({
  132. url: '/product-compose/del',
  133. method: 'post',
  134. params
  135. })
  136. }
  137. export function getProductDetail(params) {
  138. return request({
  139. url: '/product-compose/detail',
  140. method: 'get',
  141. params
  142. })
  143. }
  144. export function getProductEdit(params) {
  145. return request({
  146. url: '/product-compose/edit',
  147. method: 'post',
  148. data: params
  149. })
  150. }
  151. // /product-compose/export
  152. export function getProductList(params) {
  153. return request({
  154. url: '/product-compose/list',
  155. method: 'get',
  156. params
  157. })
  158. }
  159. // 产品调价单管理
  160. export function getProductRriceAdd(params) {
  161. return request({
  162. url: '/product-upd-price/add',
  163. method: 'post',
  164. data: params
  165. })
  166. }
  167. export function getDistList(params) {
  168. return request({
  169. url: '/common/dict/list',
  170. method: 'get',
  171. params
  172. })
  173. }
  174. export function getProductRricedel(params) {
  175. return request({
  176. url: '/product-upd-price/del',
  177. method: 'post',
  178. params: { ids: params.join(',') }
  179. })
  180. }
  181. export function getProductRriceDetail(params) {
  182. return request({
  183. url: '/product-upd-price/detail',
  184. method: 'get',
  185. params
  186. })
  187. }
  188. export function getProductRriceEdit(params) {
  189. return request({
  190. url: '/product-upd-price/edit',
  191. method: 'post',
  192. data: params
  193. })
  194. }
  195. // 产品调价单-列表
  196. export function v2ProductUpdPriceList(data) {
  197. return request({
  198. url: `/v2/product-upd-price/list?moduleId=${data.moduleId}`,
  199. method: 'post',
  200. data
  201. })
  202. }
  203. //产品调价单-导出
  204. export function v2ProductUpdPriceListExport(data, name) {
  205. return postBlob({
  206. url: '/v2/product-upd-price/list/export',
  207. method: 'post',
  208. data,
  209. name
  210. })
  211. }
  212. //工程师组别配置API-模板下载
  213. export function productUpdPriceDownload(data, name) {
  214. return getBlob({
  215. url: 'product-upd-price/download',
  216. data,
  217. name
  218. })
  219. }
  220. //导入调价单-导入
  221. export function productUpdPriceMaterialImport(data) {
  222. return handleImport('/product-upd-price/material/import', data.formdata, data.id || '')
  223. }
  224. export function getProductRriceList(params) {
  225. return request({
  226. url: '/product-upd-price/list',
  227. method: 'get',
  228. params
  229. })
  230. }
  231. export function getProductRriceRevoke(params) {
  232. return request({
  233. url: '/product-upd-price/revoke',
  234. method: 'get',
  235. params
  236. })
  237. }
  238. export function getProductRriceSubmit(params) {
  239. return request({
  240. url: '/product-upd-price/submit',
  241. method: 'get',
  242. params
  243. })
  244. }
  245. // 产品调价单-列表
  246. export function v2ProductPriceList(data) {
  247. return request({
  248. url: `/v2/product-price/list?moduleId=${data.moduleId}`,
  249. method: 'post',
  250. data
  251. })
  252. }
  253. //产品调价单-导出
  254. export function v2ProductPriceListExport(data, name) {
  255. return postBlob({
  256. url: '/v2/product-price/list/export',
  257. method: 'post',
  258. data,
  259. name
  260. })
  261. }
  262. // 产品价格列表
  263. export function getProductPriceList(params) {
  264. return request({
  265. url: '/product-price/list',
  266. method: 'get',
  267. params
  268. })
  269. }
  270. export function getTypeList(params) {
  271. return request({
  272. url: '/sale/type/list',
  273. method: 'get',
  274. params
  275. })
  276. }
  277. export function getTree(params) {
  278. return request({
  279. url: '/admin/websit/tree',
  280. method: 'get',
  281. params
  282. })
  283. }
  284. export function getRebate(params) {
  285. return request({
  286. url: '/wallet/rebate/list',
  287. method: 'get',
  288. params
  289. })
  290. }
  291. export function getWalletList(params) {
  292. return request({
  293. url: '/wallet/list',
  294. method: 'get',
  295. params
  296. })
  297. }
  298. //产品类别
  299. //产品类别列表
  300. export function getProductCategoryList(params) {
  301. return request({
  302. url: '/product-category/list',
  303. method: 'get',
  304. params
  305. })
  306. }
  307. //产品类别小类列表
  308. export function getProductCategorySubList(params) {
  309. return request({
  310. url: '/product-category/sub-list',
  311. method: 'get',
  312. params
  313. })
  314. }
  315. //新增产品类别
  316. export function getProductCategoryAdd(data) {
  317. return request({
  318. url: '/product-category/add',
  319. method: 'post',
  320. data
  321. })
  322. }
  323. //编辑产品类别
  324. export function getProductCategoryEdit(data) {
  325. return request({
  326. url: '/product-category/edit',
  327. method: 'post',
  328. data
  329. })
  330. }
  331. //金蝶存货类别列表
  332. export function getProductCategoryKingDeeCategoryList() {
  333. return request({
  334. url: '/product-category/king-dee-category-list',
  335. method: 'get'
  336. })
  337. }
  338. //new金蝶存货类别列表
  339. export function getKingDeeCategory() {
  340. return request({
  341. url: '/product-category/king-dee-category',
  342. method: 'get'
  343. })
  344. }
  345. //新增产品类别小类
  346. export function getProductCategoryAddSub(data) {
  347. return request({
  348. url: '/product-category/add-sub',
  349. method: 'post',
  350. data
  351. })
  352. }
  353. //删除产品类别小类
  354. export function getProductCategoryDelSub(params) {
  355. return request({
  356. url: '/product-category/del-sub',
  357. method: 'post',
  358. params
  359. })
  360. }
  361. //删除产品类别
  362. export function getProductCategoryDel(params) {
  363. return request({
  364. url: '/product-category/del',
  365. method: 'post',
  366. params
  367. })
  368. }
  369. // 业务员
  370. export function getUserList(params) {
  371. return request({
  372. url: '/admin/user/list',
  373. method: 'get',
  374. params
  375. })
  376. }
  377. export function getPriceSubmit(params) {
  378. return request({
  379. url: '/product-upd-price/submit',
  380. method: 'POST',
  381. params
  382. })
  383. }
  384. export function handlePriceRevoke(params) {
  385. return request({
  386. url: '/product-price/revoke',
  387. method: 'POST',
  388. params
  389. })
  390. }
  391. export function handleEdit(params) {
  392. return request({
  393. url: '/product-upd-price/edit',
  394. method: 'POST',
  395. data: params
  396. })
  397. }
  398. export function examineData(params) {
  399. return request({
  400. url: '/product-upd-price/confirm',
  401. method: 'POST',
  402. params
  403. })
  404. }
  405. export function getProductRriceConfirm(params) {
  406. return request({
  407. url: '/product-upd-price/confirm',
  408. method: 'POST',
  409. params
  410. })
  411. }