导入时避免公司变动
This commit is contained in:
parent
8fbb764f78
commit
61e7073f56
|
|
@ -70,9 +70,9 @@ App({
|
|||
globalData: {
|
||||
userInfo: {},
|
||||
userinfo: {}, // 服务器传回的消费者信息
|
||||
//host: 'https://apitest.ahctc.cn',
|
||||
host: 'https://apitest.ahctc.cn',
|
||||
mediahost: 'https://apitest.ahctc.cn',
|
||||
host: 'http://127.0.0.1:8000',
|
||||
//host: 'http://127.0.0.1:8000',
|
||||
//mediahost: 'http://127.0.0.1:8000',
|
||||
token : '',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 3.0.4 on 2021-04-13 14:07
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('crm', '0027_consumer_deptname'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='company',
|
||||
name='name',
|
||||
field=models.CharField(max_length=60, verbose_name='名称'),
|
||||
),
|
||||
]
|
||||
|
|
@ -459,6 +459,7 @@ class ConsumerViewSet(ModelViewSet):
|
|||
obj.username = username
|
||||
obj.create_admin = request.user
|
||||
obj.name = name
|
||||
if not obj.company: #导入时避免公司变动
|
||||
obj.company = companyobj
|
||||
if ID_number1:
|
||||
obj.ID_number1 = ID_number1
|
||||
|
|
|
|||
Loading…
Reference in New Issue