@@ -138,7 +138,7 @@ class ModelImageInfoAdmin(admin.ModelAdmin): |
||
138 | 138 |
|
139 | 139 |
|
140 | 140 |
class DistributorInfoAdmin(admin.ModelAdmin): |
141 |
- list_display = ('brand_id', 'brand_name', 'distributor_id', 'distributor_name', 'distributor_short_name', 'distributor_province_name', 'position', 'status', 'created_at', 'updated_at') |
|
141 |
+ list_display = ('brand_id', 'brand_name', 'department_id', 'distributor_id', 'distributor_name', 'distributor_short_name', 'distributor_province_name', 'position', 'status', 'created_at', 'updated_at') |
|
142 | 142 |
list_filter = ('brand_name', 'sr_id', 'distributor_province_name', 'status') |
143 | 143 |
readonly_fields = ('brand_name', 'distributor_province_code') |
144 | 144 |
search_fields = ('brand_id', 'brand_name', 'distributor_id', 'distributor_name', 'distributor_short_name', 'distributor_descr', 'distributor_province_code', 'distributor_province_name') |
@@ -0,0 +1,30 @@ |
||
1 |
+# -*- coding: utf-8 -*- |
|
2 |
+# Generated by Django 1.11.26 on 2020-06-01 08:34 |
|
3 |
+from __future__ import unicode_literals |
|
4 |
+ |
|
5 |
+from django.db import migrations, models |
|
6 |
+ |
|
7 |
+ |
|
8 |
+class Migration(migrations.Migration): |
|
9 |
+ |
|
10 |
+ dependencies = [ |
|
11 |
+ ('mch', '0054_auto_20200411_2143'), |
|
12 |
+ ] |
|
13 |
+ |
|
14 |
+ operations = [ |
|
15 |
+ migrations.AddField( |
|
16 |
+ model_name='distributorinfo', |
|
17 |
+ name='department_id', |
|
18 |
+ field=models.IntegerField(default=-1, help_text='\u4f01\u4e1a\u5fae\u4fe1\u90e8\u95e8ID', verbose_name='department_id'), |
|
19 |
+ ), |
|
20 |
+ migrations.AddField( |
|
21 |
+ model_name='distributorinfo', |
|
22 |
+ name='department_name', |
|
23 |
+ field=models.IntegerField(default=-1, help_text='\u4f01\u4e1a\u5fae\u4fe1\u90e8\u95e8\u540d\u79f0', verbose_name='department_name'), |
|
24 |
+ ), |
|
25 |
+ migrations.AddField( |
|
26 |
+ model_name='saleclerkinfo', |
|
27 |
+ name='wx_userid', |
|
28 |
+ field=models.CharField(blank=True, db_index=True, help_text='\u4f01\u4e1a\u5fae\u4fe1 user_id', max_length=32, null=True, verbose_name='wx_userid'), |
|
29 |
+ ), |
|
30 |
+ ] |
@@ -365,6 +365,8 @@ class DistributorInfo(BaseModelMixin): |
||
365 | 365 |
distributor_province_code = models.CharField(_(u'distributor_province_code'), max_length=6, blank=True, null=True, help_text=u'经销商所在省份编码') |
366 | 366 |
distributor_province_name = models.CharField(_(u'distributor_province_name'), max_length=3, choices=ProvinceShortModelMixin.PROVINCE_NAME_TUPLE, default=ProvinceShortModelMixin.PROVINCE_DEFAULT_NAME, blank=True, null=True, help_text=u'经销商所在省份名称') |
367 | 367 |
|
368 |
+ department_id = models.IntegerField(_(u'department_id'), default=-1, help_text=u'企业微信部门ID') |
|
369 |
+ department_name = models.IntegerField(_(u'department_name'), default=-1, help_text=u'企业微信部门名称') |
|
368 | 370 |
sr_id = models.CharField(_(u'sr_id'), max_length=32, blank=True, null=True, help_text=u'销售担当唯一标识', db_index=True) |
369 | 371 |
|
370 | 372 |
position = models.IntegerField(_(u'position'), default=1, help_text=u'排序') |
@@ -428,6 +430,7 @@ class SaleclerkInfo(BaseModelMixin, SexModelMixin): |
||
428 | 430 |
|
429 | 431 |
unionid = models.CharField(_(u'unionid'), max_length=32, blank=True, null=True, help_text=u'微信 UnionID', db_index=True) |
430 | 432 |
openid = models.CharField(_(u'openid'), max_length=32, blank=True, null=True, help_text=u'微信 OpenID', db_index=True) |
433 |
+ wx_userid = models.CharField(_(u'wx_userid'), max_length=32, blank=True, null=True, help_text=u'企业微信 user_id', db_index=True) |
|
431 | 434 |
|
432 | 435 |
num = models.IntegerField(_(u'num'), default=0, help_text=u'支数') |
433 | 436 |
|