feat: 优化gen_number_with_rule的m_model的校验
This commit is contained in:
parent
9f301af038
commit
dd0d01c6b4
|
|
@ -949,10 +949,11 @@ class MlogbInViewSet(BulkCreateModelMixin, BulkUpdateModelMixin, BulkDestroyMode
|
||||||
c_year2 = str(c_year)[-2:]
|
c_year2 = str(c_year)[-2:]
|
||||||
c_month = handle_date.month
|
c_month = handle_date.month
|
||||||
m_model = material_out.model
|
m_model = material_out.model
|
||||||
if m_model is None:
|
if 'm_model' in rule:
|
||||||
raise ParseError("生成编号出错:产品型号不能为空")
|
if m_model is None:
|
||||||
elif m_model and m_model.islower():
|
raise ParseError("生成编号出错:产品型号不能为空")
|
||||||
raise ParseError("生成编号出错:产品型号不能为小写")
|
elif m_model and m_model.islower():
|
||||||
|
raise ParseError("生成编号出错:产品型号不能为小写")
|
||||||
# 按生产日志查询
|
# 按生产日志查询
|
||||||
wpr = (
|
wpr = (
|
||||||
Wpr.objects.filter(
|
Wpr.objects.filter(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue