feat:【antd】【erp 系统】sale/order 部分代码优化(form 基本完善)

This commit is contained in:
YunaiV
2025-10-03 20:38:44 +08:00
parent 95295d5b93
commit 83cffeafc3
4 changed files with 44 additions and 25 deletions

View File

@@ -66,20 +66,21 @@ async function handleDelete(ids: number[]) {
}
/** 审批/反审批操作 */
function handleUpdateStatus(row: ErpSaleOrderApi.SaleOrder, status: number) {
async function handleUpdateStatus(
row: ErpSaleOrderApi.SaleOrder,
status: number,
) {
const hideLoading = message.loading({
content: `确定${status === 20 ? '审批' : '反审批'}该订单吗?`,
duration: 0,
});
// TODO @AI改成 await 写法
updateSaleOrderStatus(row.id!, status)
.then(() => {
message.success(`${status === 20 ? '审批' : '反审批'}成功`);
handleRefresh();
})
.finally(() => {
hideLoading();
});
try {
await updateSaleOrderStatus(row.id!, status);
message.success(`${status === 20 ? '审批' : '反审批'}成功`);
handleRefresh();
} finally {
hideLoading();
}
}
const checkedIds = ref<number[]>([]);