|
@@ -217,7 +217,7 @@ class StageCountView(APIView):
|
|
return response_ok(data)
|
|
return response_ok(data)
|
|
|
|
|
|
class ReviewViewSet(CustomModelViewSet):
|
|
class ReviewViewSet(CustomModelViewSet):
|
|
- permission_classes = []
|
|
|
|
|
|
+ permission_classes = [isLogin]
|
|
queryset = Review.objects.filter()
|
|
queryset = Review.objects.filter()
|
|
serializer_class = ReviewSerializer
|
|
serializer_class = ReviewSerializer
|
|
|
|
|
|
@@ -228,6 +228,7 @@ class ReviewViewSet(CustomModelViewSet):
|
|
|
|
|
|
@action(methods=['post'], detail=True)
|
|
@action(methods=['post'], detail=True)
|
|
def track_review(self, request, pk):
|
|
def track_review(self, request, pk):
|
|
|
|
+ check_permission(request, 'customer.check_review')
|
|
# 跟踪审核
|
|
# 跟踪审核
|
|
check_status = request.POST.get('check_status')
|
|
check_status = request.POST.get('check_status')
|
|
check_comment = request.POST.get('check_comment')
|
|
check_comment = request.POST.get('check_comment')
|
|
@@ -238,7 +239,6 @@ class ReviewViewSet(CustomModelViewSet):
|
|
instance.check_user = request.user
|
|
instance.check_user = request.user
|
|
instance.check_status = check_status
|
|
instance.check_status = check_status
|
|
instance.check_comment = check_comment
|
|
instance.check_comment = check_comment
|
|
- instance.next_time = next_time
|
|
|
|
instance.check_time = timezone.now()
|
|
instance.check_time = timezone.now()
|
|
instance.save()
|
|
instance.save()
|
|
if int(check_status) == Review.ABANDON:
|
|
if int(check_status) == Review.ABANDON:
|
|
@@ -246,8 +246,10 @@ class ReviewViewSet(CustomModelViewSet):
|
|
instance.check_status = check_status
|
|
instance.check_status = check_status
|
|
instance.check_comment = check_comment
|
|
instance.check_comment = check_comment
|
|
instance.check_time = timezone.now()
|
|
instance.check_time = timezone.now()
|
|
- instance.is_giveup = True
|
|
|
|
instance.save()
|
|
instance.save()
|
|
|
|
+ instance.customer.status = NewCustomer.ABANDONED
|
|
|
|
+ instance.customer.next_time = next_time
|
|
|
|
+ instance.customer.save()
|
|
except CustomError as e:
|
|
except CustomError as e:
|
|
return response_error(e.get_error_msg())
|
|
return response_error(e.get_error_msg())
|
|
except Exception as e:
|
|
except Exception as e:
|