Commit a4fbb48d by qinjianhui

feat: 海外供应

parent f7da650f
...@@ -401,7 +401,7 @@ watch( ...@@ -401,7 +401,7 @@ watch(
(val) => { (val) => {
if (val && val.productList?.length) if (val && val.productList?.length)
val.productList.forEach((el) => { val.productList.forEach((el) => {
if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry) if (!el.previewImgs) el.previewImgs = el.imageAry ? JSON.parse(el.imageAry) : [{url: el.variantImage}]
}) })
}, },
{ deep: true }, { deep: true },
...@@ -690,7 +690,7 @@ const initOrderDetailBox = async () => { ...@@ -690,7 +690,7 @@ const initOrderDetailBox = async () => {
boxIndex.value = boxList.find((item) => item.data)?.box || null boxIndex.value = boxList.find((item) => item.data)?.box || null
podOrderDetailsData.value?.productList?.forEach((el) => { podOrderDetailsData.value?.productList?.forEach((el) => {
if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry) if (!el.previewImgs) el.previewImgs = el.imageAry ? JSON.parse(el.imageAry) : [{url: el.variantImage}]
}) })
coverImage.value = coverImage.value =
podOrderDetailsData.value?.productList?.[0]?.previewImgs?.[0].url || '' podOrderDetailsData.value?.productList?.[0]?.previewImgs?.[0].url || ''
......
...@@ -135,6 +135,7 @@ ...@@ -135,6 +135,7 @@
> >
<el-radio-button label="single">单面</el-radio-button> <el-radio-button label="single">单面</el-radio-button>
<el-radio-button label="multiple">多面</el-radio-button> <el-radio-button label="multiple">多面</el-radio-button>
<el-radio-button label="normal">普品</el-radio-button>
</el-radio-group> </el-radio-group>
</ElFormItem> </ElFormItem>
<ElFormItem label="数量"> <ElFormItem label="数量">
...@@ -1093,29 +1094,50 @@ ...@@ -1093,29 +1094,50 @@
class="goods-item-img" class="goods-item-img"
style="display: flex; flex-direction: column" style="display: flex; flex-direction: column"
> >
<div <template v-if="item.previewImgs?.length">
v-for="img in item.previewImgs" <div
:key="img" v-for="img in item.previewImgs"
style="text-align: center" :key="img"
> style="text-align: center"
>
<img
:src="img.url"
alt="商品图片"
style="cursor: pointer"
@click="handlePictureCardPreview(img.url)"
/>
<div
v-if="item.customizedQuantity"
class="triangle-box"
:title="`类型:${getQuantityText(
item.customizedQuantity,
)}面`"
>
<div class="multi-text">
{{ getQuantityText(item.customizedQuantity) }}
</div>
</div>
</div>
</template>
<template v-else>
<img <img
:src="img.url" :src="item.variantImage"
alt="商品图片" alt="商品图片"
style="cursor: pointer" style="cursor: pointer"
@click="handlePictureCardPreview(img.url)" @click="handlePictureCardPreview(item.variantImage)"
/> />
<div <div class="triangle-container-wrap">
v-if="item.customizedQuantity" <div class="triangle-container">
class="triangle-box" <div class="triangle-marker"></div>
:title="`类型:${getQuantityText( <div
item.customizedQuantity, class="content"
)}面`" :title="handleMark(item.productMark).label"
> >
<div class="multi-text"> {{ handleMark(item.productMark).name }}
{{ getQuantityText(item.customizedQuantity) }} </div>
</div> </div>
</div> </div>
</div> </template>
</div> </div>
<div class="goods-item-info"> <div class="goods-item-info">
<div class="goods-item-info-item"> <div class="goods-item-info-item">
...@@ -5158,7 +5180,58 @@ const resultConfirm = () => { ...@@ -5158,7 +5180,58 @@ const resultConfirm = () => {
search() search()
loadTabData() loadTabData()
} }
const handleMark = (mark: string) => {
switch (mark) {
case 'virtual':
return {
name: 'VIR',
color: '#ff9900',
label: '虚拟商品',
}
case 'normal':
return {
name: 'G',
color: '#67C23A',
label: '普通商品',
}
case 'pod':
return {
name: 'P',
color: '#F56C6C',
label: 'pod商品',
}
case 'custom':
return {
name: 'C',
color: '#6d9eeb',
label: '一件定制商品',
}
case 'custom_part':
return {
name: 'CP',
color: '#6d9eeb',
label: '一件定制局部印商品',
}
case 'custom_full':
return {
name: 'CF',
color: '#6d9eeb',
label: '一件定制满印商品',
}
case 'custom_normal':
return {
name: 'OS',
color: '#67C23A',
label: '海外供应',
}
default:
return {
name: '',
color: '#FFFFFF',
width: '0',
}
}
}
/** /**
* @description: 更改物流方式 * @description: 更改物流方式
*/ */
...@@ -6250,10 +6323,6 @@ useRouter().beforeEach((to, from, next) => { ...@@ -6250,10 +6323,6 @@ useRouter().beforeEach((to, from, next) => {
// width: 100px; // width: 100px;
// height: 65px; // height: 65px;
position: relative; position: relative;
img {
width: 65%;
}
} }
&:not(:last-child) { &:not(:last-child) {
...@@ -6534,12 +6603,29 @@ useRouter().beforeEach((to, from, next) => { ...@@ -6534,12 +6603,29 @@ useRouter().beforeEach((to, from, next) => {
color: white; color: white;
font-weight: bold; font-weight: bold;
} }
.search-form { .triangle-container-wrap {
::v-deep .el-radio-button { position: absolute;
width: 75px; top: 0;
.el-radio-button__inner { right: 0;
width: 100%; }
} .triangle-container {
position: relative;
.triangle-marker {
width: 0;
height: 0;
border: 18px solid transparent;
border-right: 18px solid #e74c3c;
border-top: 18px solid #e74c3c;
}
.content {
position: absolute;
top: 0;
left: 18px;
transform: rotate(45deg);
color: white;
text-align: center;
font-weight: bold;
font-size: 12px;
} }
} }
</style> </style>
......
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