Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -83,7 +83,7 @@ def approve_order(order_id, approver_role):
|
|
83 |
headers = list(order_records[0].keys())
|
84 |
orders.update_cell(order_index + 2, headers.index('审批状态') + 1, next_status) # Update approval status
|
85 |
orders.update_cell(order_index + 2, headers.index('timestamp') + 1,
|
86 |
-
datetime.now().
|
87 |
|
88 |
return '订单已批准'
|
89 |
except Exception as e:
|
@@ -128,7 +128,7 @@ def submit_order(
|
|
128 |
费用名称, 费用金额, 采购款收款抬头, 采购款收款账号信息,
|
129 |
业务员, 客户名称, 客户国家, 在途状态, 开票类型,
|
130 |
收款状态, '待单证审批', 退款说明, 备注,
|
131 |
-
datetime.now().
|
132 |
]
|
133 |
orders.append_row(new_order)
|
134 |
session_state.clear()
|
@@ -160,7 +160,7 @@ def format_order(order):
|
|
160 |
<tr><th>收款状态</th><td>{order['收款状态']}</td></tr>
|
161 |
<tr><th>退款说明</th><td>{order['退款说明']}</td></tr>
|
162 |
<tr><th>备注</th><td>{order['备注']}</td></tr>
|
163 |
-
<tr><th>时间</th><td>{order['timestamp']}</td></tr>
|
164 |
<tr><th>毛利</th><td>{order['毛利']}</td></tr>
|
165 |
<tr><th>当前身份</th><td>{session_state['username']}</td></tr>
|
166 |
</table>
|
|
|
83 |
headers = list(order_records[0].keys())
|
84 |
orders.update_cell(order_index + 2, headers.index('审批状态') + 1, next_status) # Update approval status
|
85 |
orders.update_cell(order_index + 2, headers.index('timestamp') + 1,
|
86 |
+
datetime.now().strftime('%Y%m%d')) # Update timestamp
|
87 |
|
88 |
return '订单已批准'
|
89 |
except Exception as e:
|
|
|
128 |
费用名称, 费用金额, 采购款收款抬头, 采购款收款账号信息,
|
129 |
业务员, 客户名称, 客户国家, 在途状态, 开票类型,
|
130 |
收款状态, '待单证审批', 退款说明, 备注,
|
131 |
+
datetime.now().strftime('%Y%m%d'), profit
|
132 |
]
|
133 |
orders.append_row(new_order)
|
134 |
session_state.clear()
|
|
|
160 |
<tr><th>收款状态</th><td>{order['收款状态']}</td></tr>
|
161 |
<tr><th>退款说明</th><td>{order['退款说明']}</td></tr>
|
162 |
<tr><th>备注</th><td>{order['备注']}</td></tr>
|
163 |
+
<tr><th>时间</th><td>{int(order['timestamp'])}</td></tr>
|
164 |
<tr><th>毛利</th><td>{order['毛利']}</td></tr>
|
165 |
<tr><th>当前身份</th><td>{session_state['username']}</td></tr>
|
166 |
</table>
|