12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- from django.db import models
- from utils.models import BaseModel
- # Create your models here.
- class Django_mf_bg(BaseModel):
- bg_no = models.CharField(max_length=30, primary_key=True,blank=False,verbose_name="单据号码")
- no_dd = models.DateTimeField(verbose_name="单据日期")
- bg_id = models.CharField(max_length=10,default='', blank=False,null=False,verbose_name="单据类别")
- zc_no = models.CharField(max_length=30,default='', blank=False,null=False,verbose_name="制程代号")
- mo_no = models.CharField(max_length=100,default='', blank=False,null=False,verbose_name="制令单号")
- sal_no = models.CharField(max_length=150,default='', blank=True,null=True,verbose_name="作业人员")
- zd_zc = models.CharField(max_length=150,default='', blank=True,null=True,verbose_name="指定制程")
- isbad = models.BooleanField(default=False, verbose_name='是否异常单')
- create_user = models.CharField(max_length=50, null=True, blank=True,verbose_name='创建人')
- update_user = models.CharField(max_length=50, null=True, blank=True,verbose_name='修改人')
- class Meta:
- db_table = 'django_mf_bg'
- verbose_name = '报工表头'
- verbose_name_plural = verbose_name
- def __str__(self):
- return self.bg_no
- class Django_tf_bg(BaseModel):
- YEAR_IN_SCHOOL_CHOICES = (
- (1, '接收'),
- (2, '派工'),
- (3, '收货'),
- (4, '转移'),
- )
- bg_no = models.ForeignKey(Django_mf_bg,on_delete=models.CASCADE, max_length='30',blank=False,verbose_name="单据号码")
- no_dd = models.DateTimeField(verbose_name="单据日期")
- itm = models.IntegerField(verbose_name="行号",blank=False,null=False,default='')
- bg_id = models.CharField(max_length=10,default='',blank=False,null=False,verbose_name="单据类别")
- mo_no = models.CharField(max_length=40,blank=False,null=False,default='',verbose_name="制令单号")
- zt_no = models.CharField(max_length=40,blank=False,null=False,default='',verbose_name="通知单号")
- prd_no = models.CharField(max_length=40,blank=False,null=False,default='',verbose_name="品号")
- prd_name = models.CharField(max_length=200,default='',verbose_name="品名")
- sal_no = models.CharField(max_length=200,default='',verbose_name="作业员")
- zc_no_up = models.CharField(max_length=200, default='', verbose_name="上制程")
- zc_no_end = models.CharField(max_length=200, default='', verbose_name="下制程")
- zd_zc = models.CharField(max_length=150, default='', blank=True, null=True, verbose_name="指定制程")
- cc = models.CharField(max_length=40,default='',verbose_name="尺寸")
- zy = models.CharField(max_length=40,default='',verbose_name="字印")
- qty = models.DecimalField(max_digits=19,decimal_places=2,default=0,verbose_name="数量")
- zl = models.CharField(max_length=40, default='', verbose_name="重量")
- ms = models.TextField( default='', verbose_name="描述")
- rem = models.TextField( default='', verbose_name="备注")
- dd = models.CharField(max_length=40, default='', verbose_name="电镀")
- prd_rem = models.TextField(default='', verbose_name="货品备注")
- class Meta:
- db_table = 'django_tf_bg'
- verbose_name = '报工表身'
- verbose_name_plural = verbose_name
- def __str__(self):
- return self.bg_no
|