diff --git a/apps/data/models.py b/apps/data/models.py index 067a33c..e8cf7d2 100644 --- a/apps/data/models.py +++ b/apps/data/models.py @@ -124,6 +124,7 @@ class Account(Model): name = CharField(max_length=64, verbose_name='名称') type = CharField(max_length=32, choices=Type.choices, default=Type.CASH, verbose_name='账户类型') holder = CharField(max_length=64, null=True, blank=True, verbose_name='开户人') + card_number = CharField(max_length=64, null=True, blank=True, verbose_name='开户账号') remark = CharField(max_length=256, null=True, blank=True, verbose_name='备注') is_active = BooleanField(default=True, verbose_name='激活状态') initial_balance_amount = AmountField(default=0, verbose_name='初期余额') diff --git a/apps/data/serializers.py b/apps/data/serializers.py index f64922c..b70d1a7 100644 --- a/apps/data/serializers.py +++ b/apps/data/serializers.py @@ -144,7 +144,7 @@ class AccountSerializer(BaseSerializer): class Meta: model = Account read_only_fields = ['id', 'type_display', 'balance_amount', 'has_balance'] - fields = ['number', 'name', 'type', 'holder', 'remark', 'is_active', + fields = ['number', 'name', 'type', 'holder', 'card_number', 'remark', 'is_active', 'initial_balance_amount', *read_only_fields] def validate_number(self, value): @@ -173,12 +173,13 @@ class AccountImportExportSerializer(BaseSerializer): name = CharField(label='账户名称(必填唯一)') type = CharField(required=False, label='账户类型[cash/alipay/wechat/bank_account/other](默认: cash)') holder = CharField(required=False, label='开户人') + card_number = CharField(required=False, label='开户账号') remark = CharField(required=False, label='备注') is_active = BooleanField(required=False, label='激活状态[TRUE/FALSE](默认: TRUE)') class Meta: model = Account - fields = ['number', 'name', 'type', 'holder', 'remark', 'is_active'] + fields = ['number', 'name', 'type', 'holder', 'card_number', 'remark', 'is_active'] class ChargeItemSerializer(BaseSerializer): diff --git a/apps/data/views.py b/apps/data/views.py index 1f37b43..0ca330f 100644 --- a/apps/data/views.py +++ b/apps/data/views.py @@ -296,7 +296,7 @@ class AccountViewSet(ModelViewSet, DataProtectMixin, ExportMixin, ImportMixin): serializer_class = AccountSerializer permission_classes = [IsAuthenticated, AccountPermission] filterset_fields = ['type', 'is_active'] - search_fields = ['number', 'name', 'contact', 'remark'] + search_fields = ['number', 'name', 'remark'] ordering_fields = ['id', 'number', 'name'] ordering = ['id'] queryset = Account.objects.all() diff --git a/frontend/src/views/basicData/settlementAccount/FormModal.vue b/frontend/src/views/basicData/settlementAccount/FormModal.vue index eedad9b..a60e435 100644 --- a/frontend/src/views/basicData/settlementAccount/FormModal.vue +++ b/frontend/src/views/basicData/settlementAccount/FormModal.vue @@ -1,7 +1,7 @@ - \ No newline at end of file + diff --git a/frontend/src/views/basicData/warehouse/index.vue b/frontend/src/views/basicData/warehouse/index.vue index aedbb20..f81aac3 100644 --- a/frontend/src/views/basicData/warehouse/index.vue +++ b/frontend/src/views/basicData/warehouse/index.vue @@ -88,10 +88,6 @@ dataIndex: 'name', sorter: true, }, - { - title: '手机号', - dataIndex: 'phone', - }, { title: '状态', dataIndex: 'is_active', diff --git a/frontend/src/views/goods/information/index.vue b/frontend/src/views/goods/information/index.vue index 316489e..98c6d56 100644 --- a/frontend/src/views/goods/information/index.vue +++ b/frontend/src/views/goods/information/index.vue @@ -88,12 +88,16 @@ sorter: true, }, { - title: '零售价', - dataIndex: 'retail_price', + title: '分类', + dataIndex: 'category_name', }, { - title: '保质期天数', - dataIndex: 'shelf_life_days', + title: '采购价', + dataIndex: 'purchase_price', + }, + { + title: '零售价', + dataIndex: 'retail_price', }, { title: '状态',