增加监管协议号以及不展示到岗
This commit is contained in:
parent
35bac2297c
commit
371c3996a4
|
@ -21,7 +21,7 @@ class EmployeeFilterSet(DynamicFieldsFilterMixin, filters.FilterSet):
|
|||
|
||||
class Meta:
|
||||
model = Employee
|
||||
fields = ['job_state']
|
||||
fields = ['job_state', 'show_atwork']
|
||||
|
||||
|
||||
class NotWorkRemarkFilterSet(filters.FilterSet):
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 3.2.9 on 2022-03-17 03:57
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('hrm', '0008_auto_20220222_1112'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='employee',
|
||||
name='show_atwork',
|
||||
field=models.BooleanField(default=True, verbose_name='是否展示在岗状态'),
|
||||
),
|
||||
]
|
|
@ -31,8 +31,10 @@ class Employee(CommonAModel):
|
|||
job_state = models.IntegerField('在职状态', choices=jobstate_choices, default=1)
|
||||
face_data = models.JSONField('人脸识别数据', null=True, blank=True)
|
||||
is_atwork = models.BooleanField('当前在岗', default=False)
|
||||
show_atwork = models.BooleanField('是否展示在岗状态', default=True)
|
||||
last_check_time = models.DateTimeField('打卡时间', null=True, blank=True)
|
||||
not_work_remark = models.CharField('当前未打卡说明', null=True, blank=True, max_length=200)
|
||||
|
||||
class Meta:
|
||||
verbose_name = '员工补充信息'
|
||||
verbose_name_plural = verbose_name
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 3.2.9 on 2022-03-17 03:57
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('sam', '0016_sale_iproducts'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='contract',
|
||||
name='watch_num',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='监管协议号'),
|
||||
),
|
||||
]
|
|
@ -39,7 +39,7 @@ class Contract(CommonAModel):
|
|||
customer = models.ForeignKey(Customer, verbose_name='关联客户', on_delete=models.CASCADE, related_name='contact_customer')
|
||||
sign_date = models.DateField('签订日期')
|
||||
description = models.CharField('描述', max_length=200, blank=True, null=True)
|
||||
|
||||
watch_num = models.CharField('监管协议号', max_length=100, null=True, blank=True)
|
||||
class Meta:
|
||||
verbose_name = '合同信息'
|
||||
verbose_name_plural = verbose_name
|
||||
|
|
|
@ -32,12 +32,12 @@ class ContractSerializer(serializers.ModelSerializer):
|
|||
class ContractSimpleSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = Contract
|
||||
fields = ['id', 'name', 'number']
|
||||
fields = ['id', 'name', 'number', 'watch_num']
|
||||
|
||||
class ContractCreateUpdateSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = Contract
|
||||
fields = ['name', 'number', 'amount', 'customer', 'sign_date', 'description', 'invoice']
|
||||
fields = ['name', 'number', 'amount', 'customer', 'sign_date', 'description', 'invoice', 'watch_num']
|
||||
|
||||
|
||||
class OrderCreateUpdateSerializer(serializers.ModelSerializer):
|
||||
|
|
Loading…
Reference in New Issue