|
|
@@ -384,10 +384,9 @@ class UserInfo(BaseModelMixin, LensmanTypeBoolMixin):
|
384
|
384
|
}
|
385
|
385
|
]
|
386
|
386
|
|
387
|
|
- @property
|
388
|
|
- def srinfo(self):
|
|
387
|
+ def srinfo(self, brand_id=None):
|
389
|
388
|
try:
|
390
|
|
- sr = SalesResponsibilityInfo.objects.get(user_id=self.user_id, user_status=SalesResponsibilityInfo.ACTIVATED)
|
|
389
|
+ sr = SalesResponsibilityInfo.objects.get(brand_id=brand_id, unionid=self.unionid, user_status=SalesResponsibilityInfo.ACTIVATED)
|
391
|
390
|
except SalesResponsibilityInfo.DoesNotExist:
|
392
|
391
|
sr = None
|
393
|
392
|
return sr.base_data if sr else {
|
|
|
@@ -419,7 +418,7 @@ class UserInfo(BaseModelMixin, LensmanTypeBoolMixin):
|
419
|
418
|
'cardList': self.cardList,
|
420
|
419
|
'saleclerk': bool(saleclerk_info),
|
421
|
420
|
'saleclerk_info': saleclerk_info,
|
422
|
|
- 'sr_info': self.srinfo,
|
|
421
|
+ 'sr_info': self.srinfo(brand_id),
|
423
|
422
|
}
|
424
|
423
|
|
425
|
424
|
|