add product sku info
This commit is contained in:
@@ -55,8 +55,8 @@
|
||||
</div>
|
||||
</template>
|
||||
</t-cell>
|
||||
<t-cell v-if="0 < Number(stock.reservedQuantity || 0)" title="查看预占流水" arrow @click="openReservedRecordList" />
|
||||
<t-cell title="查看该产品 SKU 流水" arrow @click="openRecordList" />
|
||||
<t-cell title="查看库存流水" arrow @click="openRecordList" />
|
||||
<t-cell v-if="0 < Number(stock.reservedQuantity || 0)" title="查看库存预占流水" arrow @click="openReservedRecordList" />
|
||||
</t-cell-group>
|
||||
<card-container
|
||||
v-if="canOperate && sku?.status === 'ACTIVE' && sku.stockEnabled"
|
||||
@@ -199,11 +199,12 @@ async function loadAll(): Promise<void> {
|
||||
}
|
||||
|
||||
async function openRecordList(): Promise<void> {
|
||||
if (product.value?.id) {
|
||||
if (product.value?.id && sku.value?.id) {
|
||||
await router.push({
|
||||
name: "ProductStockRecordList",
|
||||
query: {
|
||||
productId: product.value.id,
|
||||
skuId: sku.value.id,
|
||||
transitionDepth: String(getCurrentRouteDepth() + 1)
|
||||
}
|
||||
});
|
||||
@@ -211,11 +212,12 @@ async function openRecordList(): Promise<void> {
|
||||
}
|
||||
|
||||
async function openReservedRecordList(): Promise<void> {
|
||||
if (product.value?.id) {
|
||||
if (product.value?.id && sku.value?.id) {
|
||||
await router.push({
|
||||
name: "ProductStockRecordList",
|
||||
query: {
|
||||
productId: product.value.id,
|
||||
skuId: sku.value.id,
|
||||
operationType: "ORDER_RESERVE",
|
||||
activeReservationOnly: "true",
|
||||
transitionDepth: String(getCurrentRouteDepth() + 1)
|
||||
|
||||
Reference in New Issue
Block a user