Commit d0b0184a by qinjianhui

feat:库存SKU展示共享库存SKU

parent 850bd021
...@@ -151,6 +151,7 @@ export interface operateOrderListData { ...@@ -151,6 +151,7 @@ export interface operateOrderListData {
variantImage?: string variantImage?: string
thirdSpuCode?: string thirdSpuCode?: string
thirdSkuCode?: string thirdSkuCode?: string
originThirdSkuCode?: string
supplierProductNo?: string supplierProductNo?: string
productName?: string productName?: string
productMark?: string productMark?: string
......
...@@ -162,6 +162,7 @@ export interface operateOrderListData { ...@@ -162,6 +162,7 @@ export interface operateOrderListData {
variantImage?: string variantImage?: string
thirdSpuCode?: string thirdSpuCode?: string
thirdSkuCode?: string thirdSkuCode?: string
originThirdSkuCode?: string
supplierProductNo?: string supplierProductNo?: string
productName?: string productName?: string
productMark?: string productMark?: string
......
...@@ -62,7 +62,10 @@ ...@@ -62,7 +62,10 @@
<template #images> <template #images>
<div class="flex-between"> <div class="flex-between">
<div class="images-position"> <div class="images-position">
<div v-if="parseImageAry(item.imageAry).length" class="images-container"> <div
v-if="parseImageAry(item.imageAry).length"
class="images-container"
>
<div <div
v-for="(img, index) in parseImageAry(item.imageAry)" v-for="(img, index) in parseImageAry(item.imageAry)"
:key="index" :key="index"
...@@ -72,7 +75,9 @@ ...@@ -72,7 +75,9 @@
<el-image <el-image
:src="img.url" :src="img.url"
height="50" height="50"
:preview-src-list="parseImageAry(item.imageAry).map((i) => i.url)" :preview-src-list="
parseImageAry(item.imageAry).map((i) => i.url)
"
:initial-index="index" :initial-index="index"
/> />
</div> </div>
...@@ -175,14 +180,34 @@ ...@@ -175,14 +180,34 @@
<span class="info-value">{{ item.craftName }}</span> <span class="info-value">{{ item.craftName }}</span>
</div> </div>
<div class="card-info-row"> <div class="card-info-row">
<div class="third-sku-cell">
<el-tooltip effect="dark" placement="top">
<template #content>
<div>
下单库存SKU:
{{
(item.originThirdSkuCode as string) ||
(item.thirdSkuCode as string) ||
''
}}
</div>
<div>(共享库存替代)</div>
</template>
<el-icon style="color: #409eff; cursor: pointer"
><WarningFilled
/></el-icon>
</el-tooltip>
<span <span
class="info-value clickable ellipsis" class="info-value clickable ellipsis"
:title="`库存SKU:${(item.thirdSkuCode as string) || ''}`" :title="`库存SKU: ${item.thirdSkuCode}`"
@click.stop="copyText((item.thirdSkuCode as string) || '')" @click.stop="
copyText((item.thirdSkuCode as string) || '')
"
> >
{{ item.thirdSkuCode }} {{ item.thirdSkuCode }}
</span> </span>
</div> </div>
</div>
<div class="card-info-row"> <div class="card-info-row">
<span class="info-label">店铺单号:</span> <span class="info-label">店铺单号:</span>
<span <span
...@@ -306,6 +331,7 @@ import type { LogListData } from '@/types/api/order' ...@@ -306,6 +331,7 @@ import type { LogListData } from '@/types/api/order'
import LogList from '@/components/LogList.vue' import LogList from '@/components/LogList.vue'
import RightClickMenu from '@/components/RightClickMenu.vue' import RightClickMenu from '@/components/RightClickMenu.vue'
import platformJson from '../../../../json/platform.json' import platformJson from '../../../../json/platform.json'
import { WarningFilled } from '@element-plus/icons-vue'
const props = defineProps<{ const props = defineProps<{
status?: string status?: string
...@@ -715,6 +741,13 @@ defineExpose({ clearSelection, getSelectedIds, refresh }) ...@@ -715,6 +741,13 @@ defineExpose({ clearSelection, getSelectedIds, refresh })
.flex-row-gap6 { .flex-row-gap6 {
gap: 6px; gap: 6px;
} }
.third-sku-cell {
display: flex;
align-items: center;
justify-content: center;
gap: 2px;
overflow: hidden;
}
@media (max-width: 1920px) { @media (max-width: 1920px) {
.card-grid { .card-grid {
grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-columns: repeat(5, minmax(0, 1fr));
......
...@@ -1270,6 +1270,7 @@ import { ...@@ -1270,6 +1270,7 @@ import {
CaretBottom, CaretBottom,
Edit, Edit,
DocumentCopy, DocumentCopy,
WarningFilled,
} from '@element-plus/icons-vue' } from '@element-plus/icons-vue'
import { computed, nextTick, onMounted, ref } from 'vue' import { computed, nextTick, onMounted, ref } from 'vue'
import splitDiv from '@/components/splitDiv/splitDiv.vue' import splitDiv from '@/components/splitDiv/splitDiv.vue'
...@@ -2210,9 +2211,40 @@ const operationOrderColumns = computed(() => [ ...@@ -2210,9 +2211,40 @@ const operationOrderColumns = computed(() => [
key: 'thirdSkuCode', key: 'thirdSkuCode',
prop: 'thirdSkuCode', prop: 'thirdSkuCode',
label: '库存SKU', label: '库存SKU',
minWidth: 140, minWidth: 160,
align: 'center', align: 'center',
showOverflowTooltip: true, showOverflowTooltip: false,
render: (row: operateOrderListData) => {
const displaySku = row.thirdSkuCode || '-'
const originSku = row.originThirdSkuCode as string | undefined
const tipSku = originSku || row.thirdSkuCode || ''
return (
<div class="third-sku-cell">
<el-tooltip
effect="dark"
placement="top-start"
teleported
v-slots={{
content: () => (
<div>
<div>{`库存SKU: ${row.thirdSkuCode}`}</div>
<div>{`下单库存SKU: ${tipSku}`}</div>
<div>(共享库存替代)</div>
</div>
),
}}
>
<el-icon style="color:#409EFF;cursor:pointer;">
<WarningFilled />
</el-icon>
</el-tooltip>
<span class="ellipsis">
{displaySku}
</span>
</div>
)
},
}, },
{ {
key: 'productMark', key: 'productMark',
...@@ -3795,6 +3827,18 @@ onMounted(() => { ...@@ -3795,6 +3827,18 @@ onMounted(() => {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
:deep(.third-sku-cell) {
display: flex;
align-items: center;
justify-content: center;
gap: 2px;
vertical-align: middle;
}
:deep(.ellipsis) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
} }
.table-pagination-bar { .table-pagination-bar {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment