Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory
This commit is contained in:
commit
6e579f509e
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 3.2.12 on 2025-11-05 09:15
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('ofm', '0029_auto_20251103_0939'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='vehicle',
|
||||||
|
name='end_time',
|
||||||
|
field=models.DateTimeField(blank=True, null=True, verbose_name='还车时间'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='vehicle',
|
||||||
|
name='start_time',
|
||||||
|
field=models.DateTimeField(blank=True, null=True, verbose_name='出车时间'),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -72,8 +72,8 @@ class LendingSeal(CommonBDModel):
|
||||||
|
|
||||||
class Vehicle(CommonBDModel):
|
class Vehicle(CommonBDModel):
|
||||||
"""TN: 用车申请"""
|
"""TN: 用车申请"""
|
||||||
start_time = models.DateField('出车时间', blank=True, null=True)
|
start_time = models.DateTimeField('出车时间', blank=True, null=True)
|
||||||
end_time = models.DateField('还车时间', blank=True, null=True)
|
end_time = models.DateTimeField('还车时间', blank=True, null=True)
|
||||||
location = models.CharField('出发地点', null=True, blank=True, max_length=100)
|
location = models.CharField('出发地点', null=True, blank=True, max_length=100)
|
||||||
via = models.CharField('途经地点', null=True, blank=True, max_length=100)
|
via = models.CharField('途经地点', null=True, blank=True, max_length=100)
|
||||||
destination = models.CharField('到达地点', null=True, blank=True, max_length=100)
|
destination = models.CharField('到达地点', null=True, blank=True, max_length=100)
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ def bind_lendingseal(ticket: Ticket, transition, new_ticket_data: dict):
|
||||||
ticket_data.update({
|
ticket_data.update({
|
||||||
't_model': 'LendingSeal',
|
't_model': 'LendingSeal',
|
||||||
't_id': ins.id,
|
't_id': ins.id,
|
||||||
|
"is_lending": ins.is_lending
|
||||||
})
|
})
|
||||||
ticket.ticket_data = ticket_data
|
ticket.ticket_data = ticket_data
|
||||||
ticket.create_by = ins.create_by
|
ticket.create_by = ins.create_by
|
||||||
|
|
@ -63,6 +64,7 @@ def bind_vehicle(ticket: Ticket, transition, new_ticket_data: dict):
|
||||||
ticket_data.update({
|
ticket_data.update({
|
||||||
't_model': 'Vehicle',
|
't_model': 'Vehicle',
|
||||||
't_id': ins.id,
|
't_id': ins.id,
|
||||||
|
'is_city': ins.is_city
|
||||||
})
|
})
|
||||||
ins.actual_km = None
|
ins.actual_km = None
|
||||||
ins.end_time = None
|
ins.end_time = None
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue