|
|
# Generated by Django 3.2.16 on 2023-04-01 21:07
|
|
|
|
|
|
from django.conf import settings
|
|
|
from django.db import migrations, models
|
|
|
import django.db.models.deletion
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
dependencies = [
|
|
|
('goods_info', '0001_initial'),
|
|
|
('basic_info', '0001_initial'),
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
]
|
|
|
|
|
|
operations = [
|
|
|
migrations.CreateModel(
|
|
|
name='PurchaseModel',
|
|
|
fields=[
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
('delete_flag', models.CharField(default='0', help_text='是否启用', max_length=1, verbose_name='是否启用')),
|
|
|
('create_time', models.DateTimeField(auto_now_add=True, help_text='创建时间', verbose_name='创建时间')),
|
|
|
('update_time', models.DateTimeField(auto_now=True, help_text='更新时间', verbose_name='更新时间')),
|
|
|
('invoices_date', models.DateTimeField(verbose_name='单据日期')),
|
|
|
('number_code', models.CharField(max_length=28, verbose_name='单据编号,不让用户填写')),
|
|
|
('discount', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=5, verbose_name='优惠率,最多精确到小数点后两位')),
|
|
|
('discount_money', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, verbose_name='优惠金额(付款优惠),最多精确到小数点后两位')),
|
|
|
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
|
|
|
('last_amount', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=13, verbose_name='优惠后总金额,最多精确到小数点后两位')),
|
|
|
('deposit', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, verbose_name='支付定金,最多精确到小数点后两位')),
|
|
|
('number_count', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, verbose_name='采购数量,最多精确到小数点后两位')),
|
|
|
('status', models.CharField(default='0', max_length=1, verbose_name='状态,0:未审核,1:已审核,2:部分入库,3:全部入库,4:完成采购,5:已付定金')),
|
|
|
('operator_user_name', models.CharField(blank=True, max_length=20, null=True, verbose_name='操作人员的真实姓名')),
|
|
|
('check_user_name', models.CharField(blank=True, max_length=20, null=True, verbose_name='操作人员的真实姓名')),
|
|
|
('supplier_name', models.CharField(blank=True, max_length=30, null=True, verbose_name='供应商名称')),
|
|
|
('attachment_list', models.CharField(blank=True, max_length=20, null=True, verbose_name='附件的id列表,字段的值为: 1,2,3,4')),
|
|
|
('account', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='basic_info.settlementaccountmodel', verbose_name='结算账户,审核之后不能改')),
|
|
|
('check_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='审核人员,不能修改')),
|
|
|
('operator_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operator_purchase_list', to=settings.AUTH_USER_MODEL, verbose_name='采购操作人员,不能修改')),
|
|
|
('supplier', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='basic_info.suppliermodel', verbose_name='供应商,审核之后不能改')),
|
|
|
],
|
|
|
options={
|
|
|
'verbose_name': '采购表',
|
|
|
'verbose_name_plural': '采购表',
|
|
|
'db_table': 't_purchase',
|
|
|
'ordering': ['id'],
|
|
|
},
|
|
|
),
|
|
|
migrations.CreateModel(
|
|
|
name='PurchaseItemModel',
|
|
|
fields=[
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
('delete_flag', models.CharField(default='0', help_text='是否启用', max_length=1, verbose_name='是否启用')),
|
|
|
('create_time', models.DateTimeField(auto_now_add=True, help_text='创建时间', verbose_name='创建时间')),
|
|
|
('update_time', models.DateTimeField(auto_now=True, help_text='更新时间', verbose_name='更新时间')),
|
|
|
('name', models.CharField(max_length=20, verbose_name='货品名称')),
|
|
|
('specification', models.CharField(blank=True, max_length=50, null=True, verbose_name='货品规格')),
|
|
|
('number_code', models.CharField(blank=True, max_length=28, null=True, verbose_name='货品的编号或者批号')),
|
|
|
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
|
|
|
('purchase_count', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, verbose_name='采购数量,最多精确到小数点后两位')),
|
|
|
('purchase_price', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, verbose_name='采购单价,最多精确到小数点后两位')),
|
|
|
('purchase_money', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, verbose_name='采购金额,最多精确到小数点后两位')),
|
|
|
('goods', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.goodsmodel', verbose_name='货品')),
|
|
|
('purchase', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='item_list', to='purchase_info.purchasemodel', verbose_name='采购单')),
|
|
|
],
|
|
|
options={
|
|
|
'verbose_name': '采购项表',
|
|
|
'verbose_name_plural': '采购项表',
|
|
|
'db_table': 't_purchase_items',
|
|
|
'ordering': ['id'],
|
|
|
},
|
|
|
),
|
|
|
]
|