Răsfoiți Sursa

添加客户跟踪报告

wushaodong 4 ani în urmă
părinte
comite
5298d44803
2 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 1 1
      apps/customer/serializers.py
  2. 1 1
      apps/customer/views.py

+ 1 - 1
apps/customer/serializers.py

@@ -63,7 +63,7 @@ class NewCustomerSerializer(serializers.ModelSerializer):
     stage_progress_sort = serializers.CharField(source='stage_progress.sort', read_only=True)
     status_text = serializers.CharField(source='get_status_display', read_only=True)
     create_time_f = TimeCharField(source='create_time', read_only=True)
-    end_time_f = DateCharField(source='end_time', read_only=True)
+    end_time_f = TimeCharField(source='end_time', read_only=True)
     next_time_f = DateCharField(source='next_time', read_only=True)
 
     name = serializers.CharField(source='report_customer.name', read_only=True)

+ 1 - 1
apps/customer/views.py

@@ -184,7 +184,7 @@ class StageCountView(APIView):
                                                        stage_progress=stage)
             stage_count = {
                 'stage': stage.name,    # 阶段名称
-                'total': new_customers.count(),   # 总人数
+                'total_count': new_customers.count(),   # 总人数
                 'today_count': new_customers.filter(next_time=time_now).count(),  # 今日人数
                 'overdue_count': new_customers.filter(next_time__lt=time_now).count()  # 逾期人数
             }