docNumRule.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import request from '@/utils/request'
  2. // 创建单据编码规则
  3. export function createDocNumRule(data) {
  4. return request({
  5. url: '/system/doc-num-rule/create',
  6. method: 'post',
  7. data: data
  8. })
  9. }
  10. // 更新单据编码规则
  11. export function updateDocNumRule(data) {
  12. return request({
  13. url: '/system/doc-num-rule/update',
  14. method: 'put',
  15. data: data
  16. })
  17. }
  18. // 删除单据编码规则
  19. export function deleteDocNumRule(id) {
  20. return request({
  21. url: '/system/doc-num-rule/delete?id=' + id,
  22. method: 'delete'
  23. })
  24. }
  25. // 获得单据编码规则
  26. export function getDocNumRule(id) {
  27. return request({
  28. url: '/system/doc-num-rule/get?id=' + id,
  29. method: 'get'
  30. })
  31. }
  32. export function getNewDocCode(code) {
  33. return request({
  34. url: '/system/doc-num-rule/getNewDocCode?code=' + code,
  35. method: 'get'
  36. })
  37. }
  38. // 获得单据编码规则分页
  39. export function getDocNumRulePage(query) {
  40. return request({
  41. url: '/system/doc-num-rule/page',
  42. method: 'get',
  43. params: query
  44. })
  45. }
  46. // 导出单据编码规则 Excel
  47. export function exportDocNumRuleExcel(query) {
  48. return request({
  49. url: '/system/doc-num-rule/export-excel',
  50. method: 'get',
  51. params: query,
  52. responseType: 'blob'
  53. })
  54. }
  55. // 获得所有单据编码规则列表
  56. export function getAllDocNumRule() {
  57. return request({
  58. url: '/system/doc-num-rule/getAll',
  59. method: 'get',
  60. })
  61. }
  62. export function syncDocNumRule() {
  63. return request({
  64. url: '/system/doc-num-rule/syncDocNumRule',
  65. method: 'post',
  66. })
  67. }