fix SalesOrderDetail.vue style

This commit is contained in:
Timi
2026-09-05 01:38:03 +08:00
parent 25bbdafcc8
commit ca8599450a
7 changed files with 382 additions and 117 deletions
+18 -1
View File
@@ -94,8 +94,25 @@ async function refresh(): Promise<void> { try { await fetchList(true); } catch (
async function loadMore(): Promise<void> { try { await fetchList(false); } catch (error) { Message.error(getErrorMessage(error, "履约单加载失败")); } }
async function selectType(value: DropdownValue): Promise<void> { if (!Array.isArray(value)) { type.value = String(value); await fetchList(true); } }
async function selectStatus(value: DropdownValue): Promise<void> { if (!Array.isArray(value)) { status.value = String(value); await fetchList(true); } }
async function toDetail(item: OrderFulfillment): Promise<void> { if (item.id) await router.push(`/management/order-fulfillments/${item.id}`); }
async function toDetail(item: OrderFulfillment): Promise<void> {
if (item.id) await router.push({
path: `/management/order-fulfillments/${item.id}`,
query: { transitionDepth: String(getCurrentRouteDepth() + 1) }
});
}
async function toCreate(): Promise<void> { await router.push("/management/order-fulfillments/create"); }
function getCurrentRouteDepth(): number {
const transitionDepth = Array.isArray(route.query.transitionDepth)
? route.query.transitionDepth[0]
: route.query.transitionDepth;
const depth = Number(transitionDepth);
if (transitionDepth && Number.isInteger(depth) && 0 <= depth && depth <= 20) {
return depth;
}
return Number(route.meta.depth ?? 0);
}
onMounted(async () => { navBarStore.clearRight(); navBarStore.setCustomRightVisible(canCreate.value); try { await fetchList(true); } catch (error) { Message.error(getErrorMessage(error, "履约单加载失败")); } });
onUnmounted(() => navBarStore.clearRight());
</script>