写完了领料功能

master
laoxiao 2 years ago
parent f02faf8772
commit 6a83bf6e14

@ -0,0 +1,74 @@
# Generated by Django 3.2.16 on 2023-04-06 21:31
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('basic_info', '0002_initial'),
('warehouse_info', '0001_initial'),
('purchase_info', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='PaymentModel',
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='更新时间')),
('pay_date', models.DateTimeField(verbose_name='付款日期')),
('number_code', models.CharField(max_length=28, verbose_name='单据编号,不让用户填写')),
('discount_money', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, verbose_name='优惠金额(付款优惠),最多精确到小数点后两位')),
('pay_money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='合计 付款金额最多精确到小数点后两位')),
('this_money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='实际 付款金额最多精确到小数点后两位')),
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
('currency', models.CharField(choices=[('CNY', '人民币'), ('USD', '美元'), ('EUR', '欧元'), ('JPY', '日元'), ('HKD', '港币')], default='CNY', max_length=20, null=True, verbose_name='货币种类')),
('pay_category', models.CharField(choices=[('1', '采购定金'), ('2', '采购货款'), ('3', '欠款还款'), ('4', '其他付款')], default='1', max_length=2, null=True, verbose_name='付款类型')),
('status', models.CharField(default='0', max_length=1, verbose_name='状态,0:未审核,1:已审核')),
('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, related_name='operator3_pay_list', 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_pay_list', to=settings.AUTH_USER_MODEL, verbose_name='财务操作人员,不能修改')),
('purchase', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='purchase_info.purchasemodel', 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_payment',
'ordering': ['id'],
},
),
migrations.CreateModel(
name='PaymentItemModel',
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='更新时间')),
('storage_code', models.CharField(max_length=28, verbose_name='采购入库单编号,不让用户填写')),
('should_money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='应该 付款金额(就是采购入库单中需要支付的金额),最多精确到小数点后两位')),
('this_money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='本次 付款金额,最多精确到小数点后两位')),
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
('payment', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='item_list', to='financial_info.paymentmodel', verbose_name='付款单,不能改')),
('purchase_storage', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='pay_item_list', to='warehouse_info.purchasestoragemodel', verbose_name='采购入库单')),
],
options={
'verbose_name': '付款单中的 付款项目表',
'verbose_name_plural': '付款单中的 付款项目表',
'db_table': 't_payment_item',
'ordering': ['id'],
},
),
]

@ -0,0 +1,73 @@
# Generated by Django 3.2.16 on 2023-04-13 20:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('warehouse_info', '0002_saledeliveritemmodel_saledelivermodel'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('basic_info', '0002_initial'),
('sale_info', '0001_initial'),
('financial_info', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='ReceiptModel',
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='更新时间')),
('pay_date', models.DateTimeField(verbose_name='收款日期')),
('number_code', models.CharField(max_length=28, verbose_name='单据编号,不让用户填写')),
('discount_money', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, verbose_name='优惠金额(收款优惠),最多精确到小数点后两位')),
('receipt_money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='合计 收款金额最多精确到小数点后两位')),
('this_money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='实际 收款金额最多精确到小数点后两位')),
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
('currency', models.CharField(choices=[('CNY', '人民币'), ('USD', '美元'), ('EUR', '欧元'), ('JPY', '日元'), ('HKD', '港币')], default='CNY', max_length=20, null=True, verbose_name='货币种类')),
('receipt_category', models.CharField(choices=[('1', '销售定金'), ('2', '销售出库货款'), ('3', '客户还款的收款'), ('4', '其他收款')], default='1', max_length=2, null=True, verbose_name='收款类型')),
('status', models.CharField(default='0', max_length=1, verbose_name='状态,0:未审核,1:已审核')),
('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='审核人员的真实姓名')),
('customer_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, related_name='operator4_pay_list', to=settings.AUTH_USER_MODEL, verbose_name='审核人员,不能修改')),
('customer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='basic_info.customermodel', verbose_name='客户,审核之后不能改')),
('operator_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operator2_pay_list', to=settings.AUTH_USER_MODEL, verbose_name='财务操作人员,不能修改')),
('sale', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='sale_info.salemodel', verbose_name='销售订单,审核之后不能改')),
],
options={
'verbose_name': '收款单表',
'verbose_name_plural': '收款单表',
'db_table': 't_receipt',
'ordering': ['id'],
},
),
migrations.CreateModel(
name='ReceiptItemModel',
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='更新时间')),
('storage_code', models.CharField(max_length=28, verbose_name='销售出库单编号,不让用户填写')),
('should_money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='应该 收款金额(就是采购入库单中需要支收的金额),最多精确到小数点后两位')),
('this_money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='本次 收款金额,最多精确到小数点后两位')),
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
('deliver_storage', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='pay_item_list', to='warehouse_info.saledelivermodel', verbose_name='采购入库单')),
('receipt', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='item_list', to='financial_info.receiptmodel', verbose_name='收款单,不能改')),
],
options={
'verbose_name': '收款单中的 收款项目表',
'verbose_name_plural': '收款单中的 收款项目表',
'db_table': 't_receipt_item',
'ordering': ['id'],
},
),
]

@ -0,0 +1,67 @@
# Generated by Django 3.2.16 on 2023-04-13 21:27
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'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='BomProcessModel',
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='更新时间')),
('process_order', models.IntegerField(verbose_name='执行顺序')),
('name', models.CharField(max_length=50, verbose_name='工序名称')),
('leader_name', models.CharField(max_length=20, verbose_name='负责人的名字')),
('money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='工价,最多精确到小数点后两位')),
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
('leader_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='leader1_in_list', to=settings.AUTH_USER_MODEL, verbose_name='负责人员')),
('parent_goods', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='process_list', to='goods_info.goodsmodel', verbose_name='当前的生产工序属于哪个货品')),
],
options={
'verbose_name': '生产工序表',
'verbose_name_plural': '生产工序表',
'db_table': 't_bom_process',
'ordering': ['process_order'],
},
),
migrations.CreateModel(
name='BomMaterialModel',
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='更新时间')),
('goods_code', models.CharField(max_length=28, verbose_name='货品编号,不让用户填写')),
('name', models.CharField(max_length=20, verbose_name='货品名称')),
('specification', models.CharField(blank=True, max_length=50, null=True, verbose_name='货品规格')),
('model_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='型号')),
('units_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='单位名字')),
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
('purchase_price', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, verbose_name='采购价')),
('count', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='数量,最多精确到小数点后两位')),
('money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='费用,最多精确到小数点后两位')),
('goods', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.goodsmodel', verbose_name='货品')),
('parent_goods', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='material_list', to='goods_info.goodsmodel', verbose_name='当前的物料清单属于哪个货品')),
('units', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.unitsmodel')),
],
options={
'verbose_name': '生产物料表',
'verbose_name_plural': '生产物料表',
'db_table': 't_bom_material',
'ordering': ['id'],
},
),
]

@ -0,0 +1,105 @@
# Generated by Django 3.2.16 on 2023-04-22 20:49
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('goods_info', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('sale_info', '0001_initial'),
('production_info', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='ProductTaskModel',
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(blank=True, default=django.utils.timezone.now, null=True, verbose_name='单据日期')),
('number_code', models.CharField(max_length=28, unique=True, verbose_name='编号或者条码')),
('name', models.CharField(max_length=20, verbose_name='货品名称')),
('specification', models.CharField(blank=True, max_length=50, null=True, verbose_name='货品规格')),
('model_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='型号')),
('goods_number_code', models.CharField(max_length=28, verbose_name='生产的货品编号或者批号')),
('units_name', models.CharField(blank=True, max_length=28, null=True, verbose_name='货品的单位')),
('sale_number', models.DecimalField(decimal_places=2, default=1, max_digits=10, verbose_name='订单数量')),
('p_number', models.DecimalField(decimal_places=2, default=1, max_digits=10, verbose_name='生产数量')),
('finish_date', models.DateField(blank=True, null=True, verbose_name='实际完工日期')),
('plan_finish_date', models.DateField(verbose_name='计划完工日期')),
('sale_number_code', models.CharField(blank=True, max_length=28, null=True, verbose_name='销售单的编号或者批号')),
('status', models.CharField(default='0', max_length=1, verbose_name='状态,0:未审核,1:加工中,2:完工')),
('check_number', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='验收合格数量')),
('storage_number', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='已入库数量')),
('cost_money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='合计成本')),
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
('goods', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.goodsmodel', verbose_name='货品')),
('sale', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='sale_info.salemodel', verbose_name='销售单')),
],
options={
'verbose_name': '生产任务表',
'verbose_name_plural': '生产任务表',
'db_table': 't_product_task',
},
),
migrations.CreateModel(
name='ProductProcessModel',
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='更新时间')),
('process_order', models.IntegerField(verbose_name='执行顺序')),
('name', models.CharField(max_length=128, verbose_name='工序名称')),
('leader_name', models.CharField(max_length=20, verbose_name='负责人的名字')),
('price', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='工价,最多精确到小数点后两位')),
('money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='费用,最多精确到小数点后两位')),
('plan_finish_date', models.DateField(blank=True, null=True, verbose_name='计划完工日期')),
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
('leader_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='leader2_in_list', to=settings.AUTH_USER_MODEL, verbose_name='负责人员')),
('product_task', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='process_list', to='production_info.producttaskmodel', verbose_name='生产任务')),
],
options={
'verbose_name': '生产工序表',
'verbose_name_plural': '生产工序表',
'db_table': 't_product_process',
},
),
migrations.CreateModel(
name='ProductMaterialModel',
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='更新时间')),
('goods_code', models.CharField(max_length=28, verbose_name='货品编号,不让用户填写')),
('name', models.CharField(max_length=20, verbose_name='货品名称')),
('specification', models.CharField(blank=True, max_length=50, null=True, verbose_name='货品规格')),
('model_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='型号')),
('units_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='单位名字')),
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
('purchase_price', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, verbose_name='采购价')),
('count', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='总共需要的数量')),
('money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='费用,最多精确到小数点后两位')),
('get_count', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='已经领取的数量')),
('back_count', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='退回的数量')),
('use_count', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='已使用的数量')),
('scrap_count', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='报废的数量')),
('goods', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.goodsmodel', verbose_name='货品')),
('product_task', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='material_list', to='production_info.producttaskmodel', verbose_name='生产任务')),
('units', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.unitsmodel')),
],
options={
'verbose_name': '生产物料表',
'verbose_name_plural': '生产物料表',
'db_table': 't_product_material',
},
),
]

@ -0,0 +1,26 @@
# Generated by Django 3.2.16 on 2023-04-22 21:38
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('production_info', '0002_productmaterialmodel_productprocessmodel_producttaskmodel'),
]
operations = [
migrations.AddField(
model_name='producttaskmodel',
name='check_user',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='checker6_list', to=settings.AUTH_USER_MODEL, verbose_name='审核人员,不能修改'),
),
migrations.AddField(
model_name='producttaskmodel',
name='check_user_name',
field=models.CharField(blank=True, max_length=20, null=True, verbose_name='操作人员的真实姓名'),
),
]

@ -1,4 +1,4 @@
# Generated by Django 3.2.16 on 2023-04-01 21:07
# Generated by Django 3.2.16 on 2023-04-04 22:26
from django.conf import settings
from django.db import migrations, models
@ -10,9 +10,9 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
('goods_info', '0001_initial'),
('basic_info', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('goods_info', '0001_initial'),
('basic_info', '0002_initial'),
]
operations = [
@ -37,7 +37,7 @@ class Migration(migrations.Migration):
('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='审核人员,不能修改')),
('check_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='checker2_purchase_list', 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='供应商,审核之后不能改')),
],

@ -0,0 +1,79 @@
# Generated by Django 3.2.16 on 2023-04-11 20:03
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'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('basic_info', '0002_initial'),
]
operations = [
migrations.CreateModel(
name='SaleModel',
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='审核人员的真实姓名')),
('customer_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='审核人员,不能修改')),
('customer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='basic_info.customermodel', verbose_name='客户,审核之后不能改')),
('operator_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operator_sale_list', to=settings.AUTH_USER_MODEL, verbose_name='销售操作人员,不能修改')),
],
options={
'verbose_name': '销售表',
'verbose_name_plural': '销售表',
'db_table': 't_sales',
'ordering': ['id'],
},
),
migrations.CreateModel(
name='SaleItemModel',
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='货品名称')),
('number_code', models.CharField(blank=True, max_length=28, null=True, verbose_name='货品的编号或者批号')),
('specification', models.CharField(blank=True, max_length=50, null=True, verbose_name='货品规格')),
('model_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='型号')),
('color', models.CharField(blank=True, max_length=50, null=True, verbose_name='颜色')),
('units_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='单位名字')),
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
('sales_count', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='销售数量,最多精确到小数点后两位')),
('sales_price', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='销售单价,最多精确到小数点后两位')),
('sales_money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='销售金额,最多精确到小数点后两位')),
('goods', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.goodsmodel', verbose_name='货品,必须要传')),
('sale', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='item_list', to='sale_info.salemodel', verbose_name='销售单')),
('units', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.unitsmodel')),
],
options={
'verbose_name': '销售订单的项目表',
'verbose_name_plural': '销售订单的项目表',
'db_table': 't_sales_items',
'ordering': ['id'],
},
),
]

@ -1,4 +1,4 @@
# Generated by Django 3.2.16 on 2023-04-04 20:18
# Generated by Django 3.2.16 on 2023-04-04 22:26
from django.conf import settings
from django.db import migrations, models
@ -10,9 +10,9 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
('basic_info', '0002_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('goods_info', '0001_initial'),
('basic_info', '0002_initial'),
('purchase_info', '0001_initial'),
]
@ -41,8 +41,8 @@ class Migration(migrations.Migration):
('attachment_list', models.CharField(blank=True, max_length=20, null=True, verbose_name='附件的id列表字段的值为: 1,2,3,4')),
('is_other', models.CharField(default='0', max_length=1, verbose_name='是否是其他入库,0:采购入库,1:其他入库')),
('account', models.ForeignKey(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(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operator_in_list', to=settings.AUTH_USER_MODEL, verbose_name='入库操作人员,不能修改')),
('check_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='checker3_in_list', to=settings.AUTH_USER_MODEL, verbose_name='审核人员,不能修改')),
('operator_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operator4_in_list', to=settings.AUTH_USER_MODEL, verbose_name='入库操作人员,不能修改')),
('purchase', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='purchase_info.purchasemodel', verbose_name='采购订单,审核之后不能改')),
('supplier', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='basic_info.suppliermodel', verbose_name='供应商,审核之后不能改')),
],

@ -0,0 +1,88 @@
# Generated by Django 3.2.16 on 2023-04-11 21:06
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('goods_info', '0001_initial'),
('basic_info', '0002_initial'),
('sale_info', '0001_initial'),
('warehouse_info', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='SaleDeliverModel',
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='单据编号,不让用户填写')),
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
('discount', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=5, null=True, verbose_name='优惠率,最多精确到小数点后两位')),
('discount_money', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, verbose_name='优惠金额(付款优惠),最多精确到小数点后两位')),
('last_amount', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=13, null=True, verbose_name='优惠后总金额,最多精确到小数点后两位')),
('other_money', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, verbose_name='其他费用,最多精确到小数点后两位')),
('deduction_deposit', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, verbose_name='订金抵扣,最多精确到小数点后两位')),
('this_proceeds', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, verbose_name='本次收款,最多精确到小数点后两位')),
('this_debt', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, 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:已收款完成')),
('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='操作人员的真实姓名')),
('customer_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')),
('is_other', models.CharField(default='0', max_length=1, verbose_name='是否是其他出库,0:销售出库,1:其他出库')),
('account', models.ForeignKey(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, related_name='check7_in_list', to=settings.AUTH_USER_MODEL, verbose_name='审核人员,不能修改')),
('customer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='basic_info.customermodel', verbose_name='客户,审核之后不能改')),
('operator_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operator6_in_list', to=settings.AUTH_USER_MODEL, verbose_name='入库操作人员,不能修改')),
('sale', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='sale_info.salemodel', verbose_name='销售订单,审核之后不能改')),
],
options={
'verbose_name': '出库单表',
'verbose_name_plural': '出库单表',
'db_table': 't_sale_deliver',
'ordering': ['id'],
},
),
migrations.CreateModel(
name='SaleDeliverItemModel',
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='货品名称')),
('number_code', models.CharField(blank=True, max_length=28, null=True, verbose_name='货品的编号或者批号')),
('specification', models.CharField(blank=True, max_length=50, null=True, verbose_name='货品规格')),
('model_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='型号')),
('color', models.CharField(blank=True, max_length=50, null=True, verbose_name='颜色')),
('units_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='单位名字')),
('category_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='货品类别名称')),
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
('sale_count', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='出库数量,最多精确到小数点后两位')),
('sale_price', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='单价,最多精确到小数点后两位')),
('sale_money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='金额,最多精确到小数点后两位')),
('warehouse_name', models.CharField(max_length=50, null=True, verbose_name='仓库名字')),
('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.goodscategorymodel')),
('goods', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.goodsmodel', verbose_name='货品')),
('sale_deliver', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='item_list', to='warehouse_info.saledelivermodel', verbose_name='销售出库单')),
('units', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.unitsmodel')),
('warehouse', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='basic_info.warehousemodel', verbose_name='出库的仓库')),
],
options={
'verbose_name': '出库单的项目表',
'verbose_name_plural': '出库单的项目表',
'db_table': 't_sale_deliver_items',
'ordering': ['id'],
},
),
]

@ -0,0 +1,20 @@
# Generated by Django 3.2.16 on 2023-04-22 22:11
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('production_info', '0003_auto_20230422_2138'),
('warehouse_info', '0002_saledeliveritemmodel_saledelivermodel'),
]
operations = [
migrations.AddField(
model_name='saledelivermodel',
name='product_task',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='production_info.producttaskmodel', verbose_name='所属的生产任务'),
),
]
Loading…
Cancel
Save