完整了,基本最后一次提交
This commit is contained in:
Binary file not shown.
@@ -102,7 +102,7 @@ class TobaccoService:
|
||||
|
||||
# 读取订单数据
|
||||
order_data = self._read_order_data(input_file)
|
||||
if not order_data:
|
||||
if order_data is None or order_data.empty:
|
||||
logger.error(f"读取订单数据失败: {input_file}")
|
||||
return None
|
||||
|
||||
@@ -240,6 +240,15 @@ class TobaccoService:
|
||||
"处理时间": datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
}
|
||||
|
||||
# 确保 total_amount 是数字类型
|
||||
try:
|
||||
if isinstance(total_amount, str):
|
||||
total_amount = float(total_amount.replace(',', ''))
|
||||
amount_display = f"¥{total_amount:.2f}"
|
||||
except (ValueError, TypeError):
|
||||
# 如果转换失败,直接使用原始值
|
||||
amount_display = f"¥{total_amount}"
|
||||
|
||||
# 显示自定义对话框
|
||||
show_custom_dialog(
|
||||
title="烟草订单处理结果",
|
||||
@@ -247,7 +256,7 @@ class TobaccoService:
|
||||
result_file=output_file,
|
||||
time_info=order_time,
|
||||
count_info=f"{total_count}个商品",
|
||||
amount_info=f"¥{total_amount:.2f}",
|
||||
amount_info=amount_display,
|
||||
additional_info=additional_info
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user