1 Star 0 Fork 1.1K

云生/GreaterWMS

forked from GreaterWMS/GreaterWMS 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
filter.py 2.70 KB
一键复制 编辑 原始数据 按行查看 历史
Elvis.Shi 提交于 2022-07-30 10:12 . V 2.1.20
from django_filters import FilterSet
from .models import AsnListModel, AsnDetailModel
class AsnListFilter(FilterSet):
class Meta:
model = AsnListModel
fields = {
"id": ['exact', 'iexact', 'gt', 'gte', 'lt', 'lte', 'isnull', 'in', 'range'],
"asn_code": ['exact', 'iexact', 'contains', 'icontains'],
"asn_status": ['exact', 'iexact', 'gt', 'gte', 'lt', 'lte', 'isnull', 'in', 'range'],
"total_weight": ['exact', 'iexact', 'gt', 'gte', 'lt', 'lte', 'isnull', 'in', 'range'],
"total_volume": ['exact', 'iexact', 'gt', 'gte', 'lt', 'lte', 'isnull', 'in', 'range'],
"total_cost": ['exact', 'iexact', 'gt', 'gte', 'lt', 'lte', 'isnull', 'in', 'range'],
"supplier": ['exact', 'iexact', 'contains', 'icontains'],
"creater": ['exact', 'iexact', 'contains', 'icontains'],
"is_delete": ['exact', 'iexact'],
"create_time": ['exact', 'iexact', 'year', 'month', 'day', 'week_day', 'gt', 'gte', 'lt', 'lte', 'range'],
"update_time": ['exact', 'iexact', 'year', 'month', 'day', 'week_day', 'gt', 'gte', 'lt', 'lte', 'range']
}
class AsnDetailFilter(FilterSet):
class Meta:
model = AsnDetailModel
fields = {
"id": ['exact', 'gt', 'gte', 'lt', 'lte', 'isnull', 'in', 'range'],
"asn_code": ['exact', 'iexact', 'contains', 'icontains'],
"asn_status": ['exact', 'iexact'],
"supplier": ['exact', 'iexact', 'contains', 'icontains'],
"goods_code": ['exact', 'iexact', 'contains', 'icontains'],
"goods_desc": ['exact', 'iexact', 'contains', 'icontains'],
"goods_qty": ['exact', 'iexact', 'gt', 'lt', 'gte', 'lte'],
"goods_actual_qty": ['exact', 'iexact', 'gt', 'lt', 'gte', 'lte'],
"sorted_qty": ['exact', 'iexact', 'gt', 'lt', 'gte', 'lte'],
"goods_shortage_qty": ['exact', 'iexact', 'gt', 'lt', 'gte', 'lte'],
"goods_more_qty": ['exact', 'iexact', 'gt', 'lt', 'gte', 'lte'],
"goods_damage_qty": ['exact', 'iexact', 'gt', 'lt', 'gte', 'lte'],
"goods_weight": ['exact', 'iexact', 'gt', 'gte', 'lt', 'lte', 'isnull', 'in', 'range'],
"goods_volume": ['exact', 'iexact', 'gt', 'gte', 'lt', 'lte', 'isnull', 'in', 'range'],
"goods_cost": ['exact', 'iexact', 'gt', 'gte', 'lt', 'lte', 'isnull', 'in', 'range'],
"creater": ['exact', 'iexact', 'contains', 'icontains'],
"is_delete": ['exact', 'iexact'],
"create_time": ['year', 'month', 'day', 'week_day', 'gt', 'gte', 'lt', 'lte', 'range'],
"update_time": ['year', 'month', 'day', 'week_day', 'gt', 'gte', 'lt', 'lte', 'range']
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/yunsheng/GreaterWMS.git
git@gitee.com:yunsheng/GreaterWMS.git
yunsheng
GreaterWMS
GreaterWMS
master

搜索帮助