fix ProductStockOperationPopup.vue style
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
<div v-can="permissionCodes.productStock.read" class="product-stock-detail">
|
||||
<t-loading v-if="isLoading" class="loading" size="32px" />
|
||||
<template v-else-if="product && stock">
|
||||
<product-profile :product="product">
|
||||
<product-profile :product="product" v-entrance-transition>
|
||||
<template #tags>
|
||||
<t-tag :content="getStockStatusText(stock)" variant="light-outline" :theme="getStockTheme(stock)" />
|
||||
</template>
|
||||
</product-profile>
|
||||
<t-cell-group theme="card" title="库存">
|
||||
<t-cell-group theme="card" title="库存" v-entrance-transition="70">
|
||||
<t-cell class="empty-cell-title-margin">
|
||||
<template #title>
|
||||
<span></span>
|
||||
@@ -42,7 +42,8 @@
|
||||
v-if="canOperate && product.stockEnabled"
|
||||
class="actions-wrap"
|
||||
title="库存操作"
|
||||
description="所有操作必须选择业务单位、上传照片并填写原因或备注"
|
||||
description="所有操作必须选择业务单位、上传照片并填写备注"
|
||||
v-entrance-transition="140"
|
||||
>
|
||||
<div class="actions">
|
||||
<t-button
|
||||
@@ -144,10 +145,27 @@ async function loadAll(): Promise<void> {
|
||||
|
||||
async function openRecordList(): Promise<void> {
|
||||
if (product.value?.id) {
|
||||
await router.push({ path: "/management/product-stock-records", query: { productId: product.value.id } });
|
||||
await router.push({
|
||||
name: "ProductStockRecordList",
|
||||
query: {
|
||||
productId: product.value.id,
|
||||
transitionDepth: String(getCurrentRouteDepth() + 1)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
function openOperation(type: ManualStockOperation): void {
|
||||
operationType.value = type;
|
||||
operationVisible.value = true;
|
||||
|
||||
Reference in New Issue
Block a user