urls.py 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # urls.py
  2. from django.urls import path,re_path
  3. from . import views
  4. from . import sse_views
  5. urlpatterns = [
  6. path('createInboundApply', views.InboundApplyCreate.as_view()),
  7. path('createOutboundApply', views.OutboundApplyCreate.as_view()),
  8. path('updateBatchInfo', views.BatchUpdate.as_view()),
  9. path('productInfo', views.ProductInfo.as_view()),
  10. path('generateinbound', views.GenerateInbound.as_view()),
  11. path('inboundcheck', views.FindExistingBatch.as_view()),
  12. path('generateoutbound', views.GenerateOutbound.as_view()),
  13. path('inboundBills/log/', views.InboundBillsLog.as_view({"get": "list"}),name="inboundBillslog"),
  14. path('outboundBills/log/', views.OutboundBillsLog.as_view({"get": "list"}),name="outboundBillslog"),
  15. path('inboundBills/number/', views.InboundBills.as_view({"post": "get_bound_number"}),name="inboundBillsnumber"),
  16. path('outboundBills/number/', views.OutboundBills.as_view({"post": "get_bound_number"}),name="outboundBillsnumber"),
  17. # path('inboundBills/audit/', views.bound_apply.as_view(), name="inboundBills-audit"),
  18. # path('inboundBills/save/', views.bound_apply.as_view(), name="inboundBills-save"),
  19. path('boundBills/<str:action_type>/', views.bound_apply.as_view(), name="inboundBills-action"),
  20. path('inboundBills/', views.InboundBills.as_view({"get": "list"}),name="inboundBills"),
  21. re_path(r'^inboundBills/(?P<pk>\d+)/$', views.InboundBills.as_view({
  22. 'get': 'retrieve',
  23. 'put': 'update_inbound',
  24. 'delete': 'destroy',
  25. }), name="inboundBills_1"),
  26. path('outboundBills/', views.OutboundBills.as_view({"get": "list"}),name="outboutBills"),
  27. re_path(r'^outboundBills/(?P<pk>\d+)/$', views.OutboundBills.as_view({
  28. 'get': 'retrieve',
  29. 'put': 'update_outbound',
  30. 'delete': 'destroy',
  31. }), name="outboundBills_1"),
  32. path('materials/', views.Materials.as_view({"get": "list"}),name="Materials"),
  33. re_path(r'^materials/(?P<pk>\d+)/$', views.Materials.as_view({
  34. 'get': 'retrieve',
  35. 'put': 'update_material',
  36. }), name="Materials_1"),
  37. path('materials/check/', views.Materials.as_view({
  38. 'put': 'check_status',
  39. }), name="check_status_1"),
  40. path('outmaterials/', views.OutMaterials.as_view({"get": "list"}),name="OutMaterials"),
  41. re_path(r'^outmaterials/(?P<pk>\d+)/$', views.OutMaterials.as_view({
  42. 'get': 'retrieve',
  43. }), name="OutMaterials_1"),
  44. # SSE 实时推送 ERP 任务数
  45. path('tasks/stream/', sse_views.erp_task_stream, name="erp_task_stream"),
  46. ]