fix: 次批作为输入不会影响输出批次号
This commit is contained in:
parent
ed2804c098
commit
9bf44c4211
|
@ -747,20 +747,34 @@ class MlogbInViewSet(BulkCreateModelMixin, BulkUpdateModelMixin, BulkDestroyMode
|
|||
# if qct is None:
|
||||
# mlog.qct = Qct.get(material_out, "process")
|
||||
# mlog.save(update_fields = ["qct"])
|
||||
|
||||
m_dict = {
|
||||
"mtask": mlogbin.mtask,
|
||||
"route": route,
|
||||
"mlog": mlog,
|
||||
"material_out": material_out,
|
||||
"batch": mlogbin.batch,
|
||||
"batch_ofrom": wm_in.batch_ofrom, "material_ofrom": wm_in.material_ofrom,
|
||||
"qct": Qct.get(material_out, "process", "out")
|
||||
}
|
||||
if mtype == Process.PRO_DIV and material_in.tracking == Material.MA_TRACKING_SINGLE:
|
||||
pass
|
||||
if mlogbin_parent is None:
|
||||
m_dict = {
|
||||
"mtask": mlogbin.mtask,
|
||||
"route": route,
|
||||
"mlog": mlog,
|
||||
"material_out": material_out,
|
||||
"batch": mlogbin.batch,
|
||||
"batch_ofrom": wm_in.batch_ofrom, "material_ofrom": wm_in.material_ofrom,
|
||||
"qct": Qct.get(material_out, "process", "out")
|
||||
}
|
||||
if mtype == Process.PRO_DIV and material_in.tracking == Material.MA_TRACKING_SINGLE:
|
||||
pass
|
||||
else:
|
||||
m_dict['batch'] = generate_new_batch(mlogbin.batch, mlog)
|
||||
else:
|
||||
m_dict['batch'] = generate_new_batch(mlogbin.batch, mlog)
|
||||
m_dict = {
|
||||
"mtask": mlogbin_parent.mtask,
|
||||
"route": route,
|
||||
"mlog": mlog,
|
||||
"material_out": material_out,
|
||||
"batch": mlogbin_parent.batch,
|
||||
"batch_ofrom": mlogbin_parent.wm_in.batch_ofrom, "material_ofrom": mlogbin_parent.wm_in.material_ofrom,
|
||||
"qct": Qct.get(material_out, "process", "out")
|
||||
}
|
||||
if mtype == Process.PRO_DIV and material_in.tracking == Material.MA_TRACKING_SINGLE:
|
||||
pass
|
||||
else:
|
||||
m_dict['batch'] = generate_new_batch(mlogbin_parent.batch, mlog)
|
||||
|
||||
if is_fix:# 支持批到批,个到个
|
||||
d_count_real = mlogbin.count_use-mlogbin.count_pn_jgqbl
|
||||
|
|
Loading…
Reference in New Issue