feat:新增物料安全库存上限字段并支持仓库数量汇总报表
- mtm_material 新增 count_safe_upper(安全库存上限), count_safe 语义明确为下限 - 迁移 0065 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d68ca98f2c
commit
3c0088d18f
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 4.2.27 on 2026-07-14 06:11
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('mtm', '0064_process_clear_defect'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='material',
|
||||||
|
name='count_safe_upper',
|
||||||
|
field=models.DecimalField(blank=True, decimal_places=3, max_digits=14, null=True, verbose_name='安全库存上限'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='material',
|
||||||
|
name='count_safe',
|
||||||
|
field=models.DecimalField(blank=True, decimal_places=3, max_digits=14, null=True, verbose_name='安全库存数(下限)'),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -98,7 +98,8 @@ class Material(CommonAModel):
|
||||||
# count = models.DecimalField('总库存', max_digits=14, decimal_places=3, default=0)
|
# count = models.DecimalField('总库存', max_digits=14, decimal_places=3, default=0)
|
||||||
# count_mb = models.DecimalField('仓库库存', max_digits=14, decimal_places=3, default=0)
|
# count_mb = models.DecimalField('仓库库存', max_digits=14, decimal_places=3, default=0)
|
||||||
# count_wm = models.DecimalField('车间库存', max_digits=14, decimal_places=3, default=0)
|
# count_wm = models.DecimalField('车间库存', max_digits=14, decimal_places=3, default=0)
|
||||||
count_safe = models.DecimalField('安全库存数', max_digits=14, decimal_places=3, null=True, blank=True)
|
count_safe = models.DecimalField('安全库存数(下限)', max_digits=14, decimal_places=3, null=True, blank=True)
|
||||||
|
count_safe_upper = models.DecimalField('安全库存上限', max_digits=14, decimal_places=3, null=True, blank=True)
|
||||||
week_esitimate_consume = models.DecimalField('周消耗预估', max_digits=14, decimal_places=3, null=True, blank=True)
|
week_esitimate_consume = models.DecimalField('周消耗预估', max_digits=14, decimal_places=3, null=True, blank=True)
|
||||||
process = models.ForeignKey(
|
process = models.ForeignKey(
|
||||||
Process, verbose_name='所用工序', on_delete=models.CASCADE, null=True, blank=True)
|
Process, verbose_name='所用工序', on_delete=models.CASCADE, null=True, blank=True)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue