提交 2912240b authored 作者: 贺阳's avatar 贺阳

如果是理货扫码,传的理货状态是已理货才修改理货状态,如果是交货扫码,传的理货状态是已交接才修改理货状态

上级 322c45ab
......@@ -168,18 +168,21 @@ class OrderController(http.Controller):
big_package_exception_arr[excep_item] += package_obj.ids
package_obj.update_exception_info(exception_cause_ids) # 修改异常信息
tally_time = package_item.get('tally_time')
if (action_type == 'tally' and package_item.get('tally_state') == 'checked_goods') or (
action_type == 'handover' and package_item.get(
'tally_state') == 'handover_completed'):
if package_type == 'ship':
ship_packages.append({
'id': package_obj.id,
'tally_time': tally_time})
else:
# if package.tally_state == 'unprocessed_goods'
for package in package_obj:
ship_packages += [{
'id': ship_package.id,
'tally_time': tally_time} for ship_package in
package.ship_package_ids if
(action_type == 'tally' and package.tally_state == 'unprocessed_goods') or (
(
action_type == 'tally' and package.tally_state == 'unprocessed_goods') or (
action_type == 'handover' and package.tally_state in (
'unprocessed_goods', 'checked_goods'))] # 小包
package_obj.update_big_package_info(action_type=action_type,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论