fix style

This commit is contained in:
Timi
2026-09-30 11:51:41 +08:00
parent 813bbbf324
commit c8e0c554b3
8 changed files with 40 additions and 6 deletions
+12 -2
View File
@@ -44,7 +44,7 @@
<span v-text="getProductQuantityText(record.onHandBefore)" />
<t-icon name="arrow-right" />
<span :class="getDeltaClass(record.onHandDelta)" v-text="getProductQuantityText(record.onHandAfter)" />
<span class="unit">基础单位</span>
<span class="unit" v-text="baseUnitName || '基础单位'" />
</span>
</template>
</t-cell>
@@ -54,7 +54,7 @@
<span v-text="getProductQuantityText(record.reservedBefore)" />
<t-icon name="arrow-right" />
<span :class="getDeltaClass(record.reservedDelta)" v-text="getProductQuantityText(record.reservedAfter)" />
<span class="unit">基础单位</span>
<span class="unit" v-text="baseUnitName || '基础单位'" />
</span>
</template>
</t-cell>
@@ -157,6 +157,7 @@ const navBarStore = useNavBarStore();
const router = useRouter();
const userStore = useUserStore();
const record = ref<StockRecord>();
const baseUnitName = ref("");
const isLoading = ref(false);
const isOperating = ref(false);
const revokeVisible = ref(false);
@@ -299,6 +300,15 @@ async function loadData(): Promise<void> {
try {
const result = await ProductAPI.recordDetail(id);
record.value = result;
baseUnitName.value = "";
if (result.skuId) {
try {
const sku = await ProductAPI.skuDetail(result.skuId);
baseUnitName.value = sku.unitList?.find(unit => unit.isBase)?.name || sku.unitList?.[0]?.name || "";
} catch {
baseUnitName.value = "";
}
}
} catch (error) {
Message.error(getErrorMessage(error, "库存流水加载失败"));
} finally {
@@ -82,6 +82,7 @@
v-model:photo-items="sku.photoItemList"
title="SKU 图片(选填)"
:edit-mode="true"
:viewer-z-index="skuEditorZIndex + 1"
:upload="uploadPhotoList"
/>
</div>