Skip to content

Commit

Permalink
[#17] 采购模块 (#268)
Browse files Browse the repository at this point in the history
* 增加了材料执行中的物料字段
为状态回溯写了对应的标单查询
增加了几行代码注释

* 状态修改(创建状态转移表)时修改对应标单状态
用filters去筛选标单状态列表

* bug

* [#17] 采购物料
[#17] 采购物料
为材料代用和材料执行添加了字段查询功能

* [#17] 采购模块
为合同增添了几个字段

* bug

* [#17]
修改供应商一个bug

* bug
  • Loading branch information
eyeeco authored and Time1ess committed Jan 12, 2018
1 parent bf1ae46 commit 91f8de3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 1 addition & 3 deletions Procurement/serializers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
SupplierListSerializer, SupplierDetailSerializer,
BaseSupplyRelationshipSerializer, BaseSupplierCheckSerializer)

from .contact_detail import (
ContractDetailSerializer,)

from .bidding import (
BaseBiddingSheetSerializer, BiddingSheetListSerializer,
BaseBiddingApplicationSerializer, BiddingApplicationListSerializer,
Expand All @@ -36,6 +33,7 @@

from .comment import (BaseBiddingCommentSerializer,)

from .contact_detail import (ContractDetailSerializer,)

__all__ = [
'MaterialSubApplySerializer', 'MaterialSubApplyListSerializer',
Expand Down
6 changes: 6 additions & 0 deletions Procurement/serializers/contact_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@


class ContractDetailSerializer(serializers.ModelSerializer):
contract_number = serializers.CharField(
source='bidding_sheet.contract_number', read_only=True)
contract_amount = serializers.FloatField(
source='bidding_sheet.contract_amount', read_only=True)
billing_amount = serializers.FloatField(
source='bidding_sheet.billing_amount', read_only=True)

class Meta:
model = ContractDetail
Expand Down
10 changes: 5 additions & 5 deletions Procurement/serializers/supplier.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ class Meta:


class SupplierListSerializer(SupplierSerializer):
doc = SupplierDocumentSerializer(read_only=True, many=True)
docs = SupplierDocumentSerializer(read_only=True, many=True)

class Meta(SupplierSerializer.Meta):
fields = '__all__'
fields = ('id', 'uid', 'name', 'docs')


class SupplierDetailSerializer(SupplierSerializer):
doc = SupplierDocumentSerializer(read_only=True, many=True)
quotation = QuotationSerializer(read_only=True, many=True)
docs = SupplierDocumentSerializer(read_only=True, many=True)
quotations = QuotationSerializer(read_only=True, many=True)

class Meta(SupplierSerializer.Meta):
fields = '__all__'
fields = ('id', 'uid', 'name', 'docs', 'quotations')


# 供应商关系
Expand Down

0 comments on commit 91f8de3

Please sign in to comment.