mirror of
https://github.com/himool/HimoolERP.git
synced 2026-01-08 18:25:27 +08:00
feat: 项目文档
This commit is contained in:
parent
afc0d87aee
commit
fab3d4fc57
31 changed files with 383 additions and 47 deletions
|
|
@ -1,7 +1,32 @@
|
|||
from django_filters.rest_framework import FilterSet
|
||||
from django_filters.filters import *
|
||||
from apps.goods.models import *
|
||||
from apps.purchase.models import *
|
||||
from apps.sales.models import *
|
||||
|
||||
|
||||
# Goods
|
||||
class BatchOptionFilter(FilterSet):
|
||||
warehouse = NumberFilter(field_name='warehouse', required=True, label='仓库')
|
||||
goods = NumberFilter(field_name='goods', required=True, label='商品')
|
||||
|
||||
class Meta:
|
||||
model = Batch
|
||||
fields = ['warehouse', 'goods', 'has_stock']
|
||||
|
||||
|
||||
# Purchase
|
||||
class PurchaseOrderOptionFilter(FilterSet):
|
||||
start_date = DateFilter(field_name='create_time', lookup_expr='gte', label='开始日期')
|
||||
end_date = DateFilter(field_name='create_time', lookup_expr='lt', label='结束日期')
|
||||
|
||||
class Meta:
|
||||
model = PurchaseOrder
|
||||
fields = ['number', 'warehouse', 'supplier', 'handler', 'is_void', 'creator',
|
||||
'start_date', 'end_date']
|
||||
|
||||
|
||||
__all__ = [
|
||||
|
||||
'BatchOptionFilter',
|
||||
'PurchaseOrderOptionFilter',
|
||||
]
|
||||
|
|
|
|||
|
|
@ -23,6 +23,12 @@ GoodsUnitOptionPermission = BasePermission
|
|||
GoodsOptionPermission = BasePermission
|
||||
BatchOptionPermission = BasePermission
|
||||
|
||||
# Purchase
|
||||
PurchaseOrderOptionPermission = BasePermission
|
||||
|
||||
# Sales
|
||||
SalesOrderOptionPermission = BasePermission
|
||||
|
||||
|
||||
__all__ = [
|
||||
'RoleOptionPermission', 'UserOptionPermission',
|
||||
|
|
@ -30,4 +36,6 @@ __all__ = [
|
|||
'ChargeItemOptionPermission', 'ClientCategoryOptionPermission', 'SupplierCategoryOptionPermission',
|
||||
'GoodsCategoryOptionPermission', 'GoodsUnitOptionPermission',
|
||||
'GoodsOptionPermission', 'BatchOptionPermission',
|
||||
'PurchaseOrderOptionPermission',
|
||||
'SalesOrderOptionPermission',
|
||||
]
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ from extensions.exceptions import *
|
|||
from apps.system.models import *
|
||||
from apps.data.models import *
|
||||
from apps.goods.models import *
|
||||
from apps.purchase.models import *
|
||||
from apps.sales.models import *
|
||||
|
||||
|
||||
# System
|
||||
|
|
@ -18,7 +20,7 @@ class UserOptionSerializer(ModelSerializer):
|
|||
|
||||
class Meta:
|
||||
model = User
|
||||
fields = ['id', 'username', 'name']
|
||||
fields = ['id', 'username', 'name', 'is_active']
|
||||
|
||||
|
||||
# Data
|
||||
|
|
@ -26,7 +28,7 @@ class WarehouseOptionSerializer(ModelSerializer):
|
|||
|
||||
class Meta:
|
||||
model = Warehouse
|
||||
fields = ['id', 'number', 'name', 'is_locked']
|
||||
fields = ['id', 'number', 'name', 'is_locked', 'is_active']
|
||||
|
||||
|
||||
class ClientCategoryOptionSerializer(ModelSerializer):
|
||||
|
|
@ -40,7 +42,7 @@ class ClientOptionSerializer(ModelSerializer):
|
|||
|
||||
class Meta:
|
||||
model = Client
|
||||
fields = ['id', 'number', 'name', 'level']
|
||||
fields = ['id', 'number', 'name', 'level', 'is_active']
|
||||
|
||||
|
||||
class SupplierCategoryOptionSerializer(ModelSerializer):
|
||||
|
|
@ -54,14 +56,14 @@ class SupplierOptionSerializer(ModelSerializer):
|
|||
|
||||
class Meta:
|
||||
model = Supplier
|
||||
fields = ['id', 'number', 'name']
|
||||
fields = ['id', 'number', 'name', 'is_active']
|
||||
|
||||
|
||||
class AccountOptionSerializer(ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = Account
|
||||
fields = ['id', 'number', 'name']
|
||||
fields = ['id', 'number', 'name', 'is_active']
|
||||
|
||||
|
||||
class ChargeItemOptionSerializer(ModelSerializer):
|
||||
|
|
@ -87,11 +89,12 @@ class GoodsUnitOptionSerializer(ModelSerializer):
|
|||
|
||||
|
||||
class GoodsOptionSerializer(ModelSerializer):
|
||||
|
||||
|
||||
class Meta:
|
||||
model = Goods
|
||||
fields = ['id', 'number', 'name', 'barcode', 'enable_batch_control', 'shelf_life_days',
|
||||
'purchase_price', 'retail_price', 'level_price1', 'level_price2', 'level_price3']
|
||||
'purchase_price', 'retail_price', 'level_price1', 'level_price2',
|
||||
'level_price3', 'is_active']
|
||||
|
||||
|
||||
class BatchOptionSerializer(ModelSerializer):
|
||||
|
|
@ -102,6 +105,48 @@ class BatchOptionSerializer(ModelSerializer):
|
|||
fields = ['id', 'number', 'remain_quantity', 'unit_name', 'production_date', 'expiration_date']
|
||||
|
||||
|
||||
# Purchase
|
||||
class PurchaseOrderOptionSerializer(ModelSerializer):
|
||||
|
||||
class PurchaseGoodsItemSerializer(ModelSerializer):
|
||||
goods_number = CharField(source='goods.number', read_only=True, label='商品编号')
|
||||
goods_name = CharField(source='goods.name', read_only=True, label='商品名称')
|
||||
goods_barcode = CharField(source='goods.barcode', read_only=True, label='商品条码')
|
||||
unit_name = CharField(source='goods.unit.name', read_only=True, label='单位名称')
|
||||
|
||||
class Meta:
|
||||
model = PurchaseGoods
|
||||
fields = ['id', 'goods', 'goods_number', 'goods_name', 'goods_barcode', 'purchase_quantity',
|
||||
'purchase_price', 'total_amount', 'return_quantity', 'unit_name']
|
||||
|
||||
class PurchaseAccountItemSerializer(ModelSerializer):
|
||||
account_number = CharField(source='account.number', read_only=True, label='账户编号')
|
||||
account_name = CharField(source='account.name', read_only=True, label='账户名称')
|
||||
|
||||
class Meta:
|
||||
model = PurchaseAccount
|
||||
fields = ['id', 'account', 'account_number', 'account_name', 'payment_amount']
|
||||
|
||||
warehouse_number = CharField(source='warehouse.number', read_only=True, label='仓库编号')
|
||||
warehouse_name = CharField(source='warehouse.name', read_only=True, label='仓库名称')
|
||||
supplier_number = CharField(source='supplier.number', read_only=True, label='供应商编号')
|
||||
supplier_name = CharField(source='supplier.name', read_only=True, label='供应商名称')
|
||||
handler_name = CharField(source='handler.name', read_only=True, label='经手人名称')
|
||||
creator_name = CharField(source='creator.name', read_only=True, label='创建人名称')
|
||||
purchase_goods_items = PurchaseGoodsItemSerializer(
|
||||
source='purchase_goods_set', many=True, label='采购商品Item')
|
||||
purchase_account_items = PurchaseAccountItemSerializer(
|
||||
source='purchase_accounts', required=False, many=True, label='采购结算账户Item')
|
||||
|
||||
class Meta:
|
||||
model = PurchaseOrder
|
||||
fields = ['id', 'number', 'warehouse', 'warehouse_number', 'warehouse_name', 'supplier',
|
||||
'supplier_number', 'supplier_name', 'handler', 'handler_name', 'handler',
|
||||
'handle_time', 'remark', 'total_quantity', 'other_amount', 'total_amount',
|
||||
'payment_amount', 'arrears_amount', 'is_void', 'enable_auto_stock_in', 'creator',
|
||||
'creator_name', 'create_time', 'purchase_goods_items', 'purchase_account_items']
|
||||
|
||||
|
||||
__all__ = [
|
||||
'RoleOptionSerializer', 'UserOptionSerializer',
|
||||
'WarehouseOptionSerializer',
|
||||
|
|
@ -110,4 +155,5 @@ __all__ = [
|
|||
'AccountOptionSerializer', 'ChargeItemOptionSerializer',
|
||||
'GoodsCategoryOptionSerializer', 'GoodsUnitOptionSerializer', 'GoodsOptionSerializer',
|
||||
'BatchOptionSerializer',
|
||||
'PurchaseOrderOptionSerializer',
|
||||
]
|
||||
|
|
|
|||
|
|
@ -10,78 +10,82 @@ from apps.option.schemas import *
|
|||
from apps.system.models import *
|
||||
from apps.data.models import *
|
||||
from apps.goods.models import *
|
||||
from apps.purchase.models import *
|
||||
from apps.sales.models import *
|
||||
|
||||
|
||||
# System
|
||||
class RoleOptionViewSet(OptionViewSet):
|
||||
class RoleOptionViewSet(InfiniteOptionViewSet):
|
||||
serializer_class = RoleOptionSerializer
|
||||
permission_classes = [IsAuthenticated, RoleOptionPermission]
|
||||
search_fields = ['name']
|
||||
queryset = Role.objects.all()
|
||||
|
||||
|
||||
class UserOptionViewSet(OptionViewSet):
|
||||
class UserOptionViewSet(InfiniteOptionViewSet):
|
||||
serializer_class = UserOptionSerializer
|
||||
permission_classes = [IsAuthenticated, UserOptionPermission]
|
||||
filterset_fields = ['is_active']
|
||||
search_fields = ['username', 'name']
|
||||
queryset = User.objects.filter(is_active=True)
|
||||
queryset = User.objects.all()
|
||||
|
||||
|
||||
# Data
|
||||
class WarehouseOptionViewSet(OptionViewSet):
|
||||
class WarehouseOptionViewSet(InfiniteOptionViewSet):
|
||||
serializer_class = WarehouseOptionSerializer
|
||||
permission_classes = [IsAuthenticated, WarehouseOptionPermission]
|
||||
filterset_fields = ['manager']
|
||||
filterset_fields = ['manager', 'is_active']
|
||||
search_fields = ['number', 'name']
|
||||
ordering_fields = ['id', 'number', 'order']
|
||||
ordering = ['order', 'number', 'id']
|
||||
queryset = Warehouse.objects.filter(is_active=True)
|
||||
queryset = Warehouse.objects.all()
|
||||
|
||||
|
||||
class ClientCategoryOptionViewSet(OptionViewSet):
|
||||
class ClientCategoryOptionViewSet(InfiniteOptionViewSet):
|
||||
serializer_class = ClientCategoryOptionSerializer
|
||||
permission_classes = [IsAuthenticated, ClientCategoryOptionPermission]
|
||||
search_fields = ['name']
|
||||
queryset = ClientCategory.objects.all()
|
||||
|
||||
|
||||
class ClientOptionViewSet(OptionViewSet):
|
||||
class ClientOptionViewSet(InfiniteOptionViewSet):
|
||||
serializer_class = ClientOptionSerializer
|
||||
permission_classes = [IsAuthenticated, ClientOptionPermission]
|
||||
filterset_fields = ['level', 'category', 'has_arrears']
|
||||
filterset_fields = ['level', 'category', 'has_arrears', 'is_active']
|
||||
search_fields = ['number', 'name']
|
||||
ordering_fields = ['id', 'number', 'order']
|
||||
ordering = ['order', 'number', 'id']
|
||||
queryset = Client.objects.filter(is_active=True)
|
||||
queryset = Client.objects.all()
|
||||
|
||||
|
||||
class SupplierCategoryOptionViewSet(OptionViewSet):
|
||||
class SupplierCategoryOptionViewSet(InfiniteOptionViewSet):
|
||||
serializer_class = SupplierCategoryOptionSerializer
|
||||
permission_classes = [IsAuthenticated, SupplierCategoryOptionPermission]
|
||||
search_fields = ['name']
|
||||
queryset = SupplierCategory.objects.all()
|
||||
|
||||
|
||||
class SupplierOptionViewSet(OptionViewSet):
|
||||
class SupplierOptionViewSet(InfiniteOptionViewSet):
|
||||
serializer_class = SupplierOptionSerializer
|
||||
permission_classes = [IsAuthenticated, SupplierOptionPermission]
|
||||
filterset_fields = ['category', 'has_arrears']
|
||||
filterset_fields = ['category', 'has_arrears', 'is_active']
|
||||
search_fields = ['number', 'name']
|
||||
ordering_fields = ['id', 'number', 'order']
|
||||
ordering = ['order', 'number', 'id']
|
||||
queryset = Supplier.objects.filter(is_active=True)
|
||||
queryset = Supplier.objects.all()
|
||||
|
||||
|
||||
class AccountOptionViewSet(OptionViewSet):
|
||||
class AccountOptionViewSet(InfiniteOptionViewSet):
|
||||
serializer_class = AccountOptionSerializer
|
||||
permission_classes = [IsAuthenticated, AccountOptionPermission]
|
||||
filterset_fields = ['is_active']
|
||||
search_fields = ['number', 'name']
|
||||
ordering_fields = ['id', 'number', 'order']
|
||||
ordering = ['order', 'number', 'id']
|
||||
queryset = Account.objects.filter(is_active=True)
|
||||
queryset = Account.objects.all()
|
||||
|
||||
|
||||
class ChargeItemOptionViewSet(OptionViewSet):
|
||||
class ChargeItemOptionViewSet(InfiniteOptionViewSet):
|
||||
serializer_class = ChargeItemOptionSerializer
|
||||
permission_classes = [IsAuthenticated, ChargeItemOptionPermission]
|
||||
search_fields = ['name']
|
||||
|
|
@ -89,38 +93,52 @@ class ChargeItemOptionViewSet(OptionViewSet):
|
|||
|
||||
|
||||
# Goods
|
||||
class GoodsCategoryOptionViewSet(OptionViewSet):
|
||||
class GoodsCategoryOptionViewSet(InfiniteOptionViewSet):
|
||||
serializer_class = GoodsCategoryOptionSerializer
|
||||
permission_classes = [IsAuthenticated, GoodsCategoryOptionPermission]
|
||||
search_fields = ['name']
|
||||
queryset = GoodsCategory.objects.all()
|
||||
|
||||
|
||||
class GoodsUnitOptionViewSet(OptionViewSet):
|
||||
class GoodsUnitOptionViewSet(InfiniteOptionViewSet):
|
||||
serializer_class = GoodsUnitOptionSerializer
|
||||
permission_classes = [IsAuthenticated, GoodsUnitOptionPermission]
|
||||
search_fields = ['name']
|
||||
queryset = GoodsUnit.objects.all()
|
||||
|
||||
|
||||
class GoodsOptionViewSet(OptionViewSet):
|
||||
class GoodsOptionViewSet(LimitedOptionViewSet):
|
||||
serializer_class = GoodsOptionSerializer
|
||||
permission_classes = [IsAuthenticated, GoodsOptionPermission]
|
||||
filterset_fields = ['category']
|
||||
filterset_fields = ['category', 'is_active']
|
||||
search_fields = ['number', 'name']
|
||||
ordering_fields = ['id', 'number', 'order']
|
||||
ordering = ['order', 'number', 'id']
|
||||
queryset = Goods.objects.filter(is_active=True)
|
||||
queryset = Goods.objects.all()
|
||||
|
||||
|
||||
class BatchOptionViewSet(OptionViewSet):
|
||||
class BatchOptionViewSet(LimitedOptionViewSet):
|
||||
serializer_class = BatchOptionSerializer
|
||||
permission_classes = [IsAuthenticated, BatchOptionPermission]
|
||||
filterset_fields = ['warehouse', 'goods']
|
||||
filterset_class = BatchOptionFilter
|
||||
ordering_fields = ['id', 'number']
|
||||
ordering = ['-number', 'id']
|
||||
select_related_fields = ['goods__unit']
|
||||
queryset = Batch.objects.filter(has_stock=True)
|
||||
queryset = Batch.objects.all()
|
||||
|
||||
|
||||
# Purchase
|
||||
class PurchaseOrderOptionViewSet(LimitedOptionViewSet):
|
||||
serializer_class = PurchaseOrderOptionSerializer
|
||||
permission_classes = [IsAuthenticated, PurchaseOrderOptionPermission]
|
||||
filterset_class = PurchaseOrderOptionFilter
|
||||
ordering_fields = ['id', 'number']
|
||||
ordering = ['-number', 'id']
|
||||
select_related_fields = ['warehouse', 'supplier', 'handler', 'creator']
|
||||
prefetch_related_fields = ['purchase_goods_set', 'purchase_goods_set__goods',
|
||||
'purchase_goods_set__goods__unit',
|
||||
'purchase_accounts', 'purchase_accounts__account']
|
||||
queryset = PurchaseOrder.objects.all()
|
||||
|
||||
|
||||
__all__ = [
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from apps.system.models import *
|
|||
class PurchaseOrderSerializer(BaseSerializer):
|
||||
"""采购单据"""
|
||||
|
||||
class PurchaseGoodsSerializer(BaseSerializer):
|
||||
class PurchaseGoodsItemSerializer(BaseSerializer):
|
||||
"""采购商品"""
|
||||
|
||||
goods_number = CharField(source='goods.number', read_only=True, label='商品编号')
|
||||
|
|
@ -41,7 +41,7 @@ class PurchaseOrderSerializer(BaseSerializer):
|
|||
raise ValidationError('采购单价小于或等于零')
|
||||
return value
|
||||
|
||||
class PurchaseAccountSerializer(BaseSerializer):
|
||||
class PurchaseAccountItemSerializer(BaseSerializer):
|
||||
"""采购结算账户"""
|
||||
|
||||
account_number = CharField(source='account.number', read_only=True, label='账户编号')
|
||||
|
|
@ -69,9 +69,10 @@ class PurchaseOrderSerializer(BaseSerializer):
|
|||
supplier_name = CharField(source='supplier.name', read_only=True, label='供应商名称')
|
||||
handler_name = CharField(source='handler.name', read_only=True, label='经手人名称')
|
||||
creator_name = CharField(source='creator.name', read_only=True, label='创建人名称')
|
||||
purchase_goods_items = PurchaseGoodsSerializer(source='purchase_goods_set', many=True, label='采购商品')
|
||||
purchase_account_items = PurchaseAccountSerializer(
|
||||
source='purchase_accounts', required=False, many=True, label='采购结算账户')
|
||||
purchase_goods_items = PurchaseGoodsItemSerializer(
|
||||
source='purchase_goods_set', many=True, label='采购商品Item')
|
||||
purchase_account_items = PurchaseAccountItemSerializer(
|
||||
source='purchase_accounts', required=False, many=True, label='采购结算账户Item')
|
||||
|
||||
class Meta:
|
||||
model = PurchaseOrder
|
||||
|
|
@ -171,7 +172,7 @@ class PurchaseOrderSerializer(BaseSerializer):
|
|||
class PurchaseReturnOrderSerializer(BaseSerializer):
|
||||
"""采购退货单据"""
|
||||
|
||||
class PurchaseReturnGoodsSerializer(BaseSerializer):
|
||||
class PurchaseReturnGoodsItemSerializer(BaseSerializer):
|
||||
"""采购退货商品"""
|
||||
|
||||
goods_number = CharField(source='goods.number', read_only=True, label='商品编号')
|
||||
|
|
@ -207,7 +208,7 @@ class PurchaseReturnOrderSerializer(BaseSerializer):
|
|||
raise ValidationError('退货单价小于或等于零')
|
||||
return value
|
||||
|
||||
class PurchaseReturnAccountSerializer(BaseSerializer):
|
||||
class PurchaseReturnAccountItemSerializer(BaseSerializer):
|
||||
"""采购退货结算账户"""
|
||||
|
||||
account_number = CharField(source='account.number', read_only=True, label='账户编号')
|
||||
|
|
@ -236,10 +237,10 @@ class PurchaseReturnOrderSerializer(BaseSerializer):
|
|||
supplier_name = CharField(source='supplier.name', read_only=True, label='供应商名称')
|
||||
handler_name = CharField(source='handler.name', read_only=True, label='经手人名称')
|
||||
creator_name = CharField(source='creator.name', read_only=True, label='创建人名称')
|
||||
purchase_return_goods_items = PurchaseReturnGoodsSerializer(
|
||||
source='purchase_return_goods_set', many=True, label='采购退货商品')
|
||||
purchase_return_account_items = PurchaseReturnAccountSerializer(
|
||||
source='purchase_return_accounts', required=False, many=True, label='采购退货结算账户')
|
||||
purchase_return_goods_items = PurchaseReturnGoodsItemSerializer(
|
||||
source='purchase_return_goods_set', many=True, label='采购退货商品Item')
|
||||
purchase_return_account_items = PurchaseReturnAccountItemSerializer(
|
||||
source='purchase_return_accounts', required=False, many=True, label='采购退货结算账户Item')
|
||||
|
||||
class Meta:
|
||||
model = PurchaseReturnOrder
|
||||
|
|
|
|||
7
documents/项目文档/库内管理/入库任务.md
Normal file
7
documents/项目文档/库内管理/入库任务.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 入库任务
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/库内管理/出库任务.md
Normal file
7
documents/项目文档/库内管理/出库任务.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 出库任务
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/库内管理/库存流水.md
Normal file
7
documents/项目文档/库内管理/库存流水.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 库存流水
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/库内管理/盘点.md
Normal file
7
documents/项目文档/库内管理/盘点.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 盘点
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/库内管理/调拨.md
Normal file
7
documents/项目文档/库内管理/调拨.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 调拨
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/报表统计/收支统计.md
Normal file
7
documents/项目文档/报表统计/收支统计.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 收支统计
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/报表统计/采购报表.md
Normal file
7
documents/项目文档/报表统计/采购报表.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 采购报表
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/报表统计/销售报表.md
Normal file
7
documents/项目文档/报表统计/销售报表.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 销售报表
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/财务管理/付款.md
Normal file
7
documents/项目文档/财务管理/付款.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 付款
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/财务管理/应付欠款.md
Normal file
7
documents/项目文档/财务管理/应付欠款.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 应付欠款
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/财务管理/应收欠款.md
Normal file
7
documents/项目文档/财务管理/应收欠款.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 应收欠款
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/财务管理/收款.md
Normal file
7
documents/项目文档/财务管理/收款.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 收款
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/财务管理/日常收支.md
Normal file
7
documents/项目文档/财务管理/日常收支.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 日常收支
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/财务管理/账户转账.md
Normal file
7
documents/项目文档/财务管理/账户转账.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 账户转账
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/财务管理/资金流水.md
Normal file
7
documents/项目文档/财务管理/资金流水.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 资金流水
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
13
documents/项目文档/采购管理/退货记录.md
Normal file
13
documents/项目文档/采购管理/退货记录.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# 退货记录
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
- 查询采购退货单:
|
||||
[/api/purchase_return_orders/]
|
||||
|
||||
- 作废采购退货单:
|
||||
[/api/purchase_return_orders/{id}/void/]
|
||||
|
||||
|
||||
## 其他接口
|
||||
28
documents/项目文档/采购管理/采购开单.md
Normal file
28
documents/项目文档/采购管理/采购开单.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# 采购开单
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
- 创建采购单:
|
||||
[/api/purchase_orders/]
|
||||
|
||||
- 获取采购单号:
|
||||
[/api/purchase_orders/number/]
|
||||
|
||||
|
||||
## 其他接口
|
||||
|
||||
- 仓库选项:
|
||||
[/api/warehouses/options/]{is_active: true}
|
||||
|
||||
- 供应商选项:
|
||||
[/api/suppliers/options/]{is_active: true}
|
||||
|
||||
- 经手人选项:
|
||||
[/api/users/options/]{is_active: true}
|
||||
|
||||
- 商品选项:
|
||||
[/api/goods/options/]{page, is_active: true}
|
||||
|
||||
- 结算账户选项:
|
||||
[/api/accounts/options/]{is_active: true}
|
||||
13
documents/项目文档/采购管理/采购记录.md
Normal file
13
documents/项目文档/采购管理/采购记录.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# 采购记录
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
- 查询采购单:
|
||||
[/api/purchase_orders/]
|
||||
|
||||
- 作废采购单:
|
||||
[/api/purchase_orders/{id}/void/]
|
||||
|
||||
|
||||
## 其他接口
|
||||
32
documents/项目文档/采购管理/采购退货.md
Normal file
32
documents/项目文档/采购管理/采购退货.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# 采购退货
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
- 创建采购退货单:
|
||||
[/api/purchase_orders/]
|
||||
|
||||
- 获取采购退货单号:
|
||||
[/api/purchase_orders/number/]
|
||||
|
||||
|
||||
## 其他接口
|
||||
|
||||
- 采购单选项:
|
||||
[/api/purchase_orders/options/]{page, is_void: false}
|
||||
|
||||
- 仓库选项:
|
||||
[/api/warehouses/options/]{is_active: true}
|
||||
|
||||
- 供应商选项:
|
||||
[/api/suppliers/options/]{is_active: true}
|
||||
|
||||
- 经手人选项:
|
||||
[/api/users/options/]{is_active: true}
|
||||
|
||||
- 商品选项:
|
||||
[/api/goods/options/]{page, is_active: true}
|
||||
|
||||
- 结算账户选项:
|
||||
[/api/accounts/options/]{is_active: true}
|
||||
|
||||
7
documents/项目文档/销售管理/退货记录.md
Normal file
7
documents/项目文档/销售管理/退货记录.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 退货记录
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/销售管理/销售任务.md
Normal file
7
documents/项目文档/销售管理/销售任务.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 销售任务
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/销售管理/销售开单.md
Normal file
7
documents/项目文档/销售管理/销售开单.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 销售开单
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/销售管理/销售记录.md
Normal file
7
documents/项目文档/销售管理/销售记录.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 销售记录
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/销售管理/销售退货.md
Normal file
7
documents/项目文档/销售管理/销售退货.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 销售退货
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
7
documents/项目文档/首页.md
Normal file
7
documents/项目文档/首页.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 首页
|
||||
|
||||
|
||||
## 功能
|
||||
|
||||
|
||||
## 其他接口
|
||||
|
|
@ -65,8 +65,12 @@ class PersonalViewSet(BaseViewSet):
|
|||
return super().get_queryset().filter(creator=self.user)
|
||||
|
||||
|
||||
class OptionViewSet(BaseViewSet, ListModelMixin):
|
||||
"""选项视图"""
|
||||
class LimitedOptionViewSet(BaseViewSet, ListModelMixin):
|
||||
"""有限选项视图"""
|
||||
|
||||
|
||||
class InfiniteOptionViewSet(BaseViewSet, ListModelMixin):
|
||||
"""无限选项视图"""
|
||||
|
||||
pagination_class = InfinitePagination
|
||||
|
||||
|
|
@ -181,7 +185,8 @@ class ImportMixin:
|
|||
|
||||
|
||||
__all__ = [
|
||||
'FunctionViewSet', 'BaseViewSet', 'ModelViewSet', 'PersonalViewSet', 'OptionViewSet',
|
||||
'FunctionViewSet', 'BaseViewSet', 'ModelViewSet', 'PersonalViewSet',
|
||||
'LimitedOptionViewSet', 'InfiniteOptionViewSet',
|
||||
'ReadOnlyMixin', 'DataProtectMixin', 'ExportMixin', 'ImportMixin',
|
||||
'ListModelMixin', 'CreateModelMixin', 'RetrieveModelMixin', 'UpdateModelMixin', 'DestroyModelMixin',
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue