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