add openReservedRecordList
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user