From 18c174490b5778a652c10a3b57509ff61e743dd4 Mon Sep 17 00:00:00 2001
From: xiaoyi <908147524@qq.com>
Date: 星期五, 06 十一月 2026 15:32:30 +0800
Subject: [PATCH] 完善设备监测、安全管理及采购业务页面
---
src/views/srm/tender/detail.vue | 36 ++++++++++++++++++------------------
1 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/views/srm/tender/detail.vue b/src/views/srm/tender/detail.vue
index afcabf7..3fb5fbb 100644
--- a/src/views/srm/tender/detail.vue
+++ b/src/views/srm/tender/detail.vue
@@ -88,13 +88,12 @@
message.warning('璇ョ墿鏂欏凡娣诲姞锛岃鍕块噸澶嶆坊鍔�');
return;
}
- if (materialForm.value.id) {
- await updateMaterial(materialForm.value);
- } else {
- await createMaterial(materialForm.value);
- }
- materialFormVisible.value = false;
- loadMaterials();
+ try {
+ if (materialForm.value.id) await updateMaterial(materialForm.value);
+ else await createMaterial(materialForm.value);
+ materialFormVisible.value = false;
+ await loadMaterials();
+ } catch { /* 璇锋眰灞傚凡鎻愮ず閿欒锛屼繚鐣欒〃鍗� */ }
}
function onMaterialSelect(item?: MdmItemApi.Item) {
if (item) {
@@ -129,9 +128,11 @@
try { bidList.value = await getBidListByProject(projectId); } finally { bidLoading.value = false; }
}
async function handleCreateBid() {
- await createBid(bidForm.value);
- bidFormVisible.value = false;
- loadBids();
+ try {
+ await createBid(bidForm.value);
+ bidFormVisible.value = false;
+ await loadBids();
+ } catch { /* 璇锋眰灞傚凡鎻愮ず閿欒锛屼繚鐣欒〃鍗� */ }
}
async function handleWithdrawBid(id: number) {
await withdrawBid(id);
@@ -170,13 +171,12 @@
bidTotalDraft.value = bid?.bidTotalAmount ?? undefined;
}
async function handleSaveQuote() {
- if (quoteForm.value.id) {
- await updateQuote(quoteForm.value);
- } else {
- await createQuote(quoteForm.value);
- }
- quoteFormVisible.value = false;
- loadQuotes(selectedBidId.value);
+ try {
+ if (quoteForm.value.id) await updateQuote(quoteForm.value);
+ else await createQuote(quoteForm.value);
+ quoteFormVisible.value = false;
+ await loadQuotes(selectedBidId.value);
+ } catch { /* 璇锋眰灞傚凡鎻愮ず閿欒锛屼繚鐣欒〃鍗� */ }
}
function handleAddQuote() {
quoteForm.value = { bidId: selectedBidId.value!, tenderMaterialId: undefined! };
@@ -1081,4 +1081,4 @@
</a-modal>
</template>
</Page>
-</template>
\ No newline at end of file
+</template>
--
Gitblit v1.9.3