add openReservedRecordList

This commit is contained in:
Timi
2026-09-05 22:40:05 +08:00
parent a12c2c136a
commit df2f668ba0
3 changed files with 23 additions and 1 deletions
+15
View File
@@ -36,6 +36,7 @@
</div>
</template>
</t-cell>
<t-cell v-if="0 < Number(stock.reservedQuantity || 0)" title="查看预占流水" arrow @click="openReservedRecordList" />
<t-cell title="查看该产品流水" arrow @click="openRecordList" />
</t-cell-group>
<card-container
@@ -155,6 +156,20 @@ async function openRecordList(): Promise<void> {
}
}
async function openReservedRecordList(): Promise<void> {
if (product.value?.id) {
await router.push({
name: "ProductStockRecordList",
query: {
productId: product.value.id,
operationType: "ORDER_RESERVE",
activeReservationOnly: "true",
transitionDepth: String(getCurrentRouteDepth() + 1)
}
});
}
}
function getCurrentRouteDepth(): number {
const transitionDepth = Array.isArray(route.query.transitionDepth)
? route.query.transitionDepth[0]