feat: inm支持小数点后3位
This commit is contained in:
parent
bec6644138
commit
c8bcbc62c3
|
@ -0,0 +1,30 @@
|
||||||
|
# Generated by Django 3.2.12 on 2024-04-02 04:26
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('system', '0003_alter_permission_parent'),
|
||||||
|
('inm', '0015_auto_20240402_1139'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='materialbatch',
|
||||||
|
name='production_dept',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='system.dept', verbose_name='生产车间'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='materialbatch',
|
||||||
|
name='count',
|
||||||
|
field=models.DecimalField(decimal_places=3, default=0, max_digits=12, verbose_name='存量'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='mioitem',
|
||||||
|
name='count',
|
||||||
|
field=models.DecimalField(decimal_places=3, max_digits=12, verbose_name='出入数量'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -25,7 +25,8 @@ class MaterialBatch(BaseModel):
|
||||||
Material, on_delete=models.CASCADE, verbose_name='物料')
|
Material, on_delete=models.CASCADE, verbose_name='物料')
|
||||||
warehouse = models.ForeignKey(
|
warehouse = models.ForeignKey(
|
||||||
WareHouse, on_delete=models.CASCADE, verbose_name='所在仓库')
|
WareHouse, on_delete=models.CASCADE, verbose_name='所在仓库')
|
||||||
count = models.PositiveIntegerField('存量', default=0)
|
count = models.DecimalField('存量', max_digits=12, decimal_places=3, default=0)
|
||||||
|
production_dept = models.ForeignKey('system.dept', verbose_name='生产车间', on_delete=models.CASCADE, null=True, blank=True)
|
||||||
expiration_date = models.DateField('有效期', null=True, blank=True)
|
expiration_date = models.DateField('有效期', null=True, blank=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -107,7 +108,7 @@ class MIOItem(BaseModel):
|
||||||
material = models.ForeignKey(
|
material = models.ForeignKey(
|
||||||
Material, verbose_name='物料', on_delete=models.CASCADE)
|
Material, verbose_name='物料', on_delete=models.CASCADE)
|
||||||
batch = models.CharField('批次号', max_length=50)
|
batch = models.CharField('批次号', max_length=50)
|
||||||
count = models.PositiveIntegerField('出入数量', default=0)
|
count = models.DecimalField('出入数量', max_digits=12, decimal_places=3)
|
||||||
|
|
||||||
test_date = models.DateField('检验日期', null=True, blank=True)
|
test_date = models.DateField('检验日期', null=True, blank=True)
|
||||||
test_user = models.ForeignKey(
|
test_user = models.ForeignKey(
|
||||||
|
|
Loading…
Reference in New Issue