Commit 4f230aa3 by 李伟康

```

feat(equity-tool): 优化商品展示样式与价格输入逻辑

调整 SKU 商品组件中商品名称的样式类名,并增加对 goodsFlag 为 2 时的样式处理。
重构价格显示与输入框结构,统一包裹在 front-number-box 中以提升布局灵活性。
修正样式细节,包括间距、定位及字体大小等,确保 UI 展示一致性。
```
1 parent 7f948434
......@@ -56,7 +56,7 @@
@click="deleteGoods(index)"
></view>
<view :class="['right',{'one-line':item.goodsFlag == 1}]">
<view class="shop-name">{{ goodsName(item) }}</view>
<view :class="['shop-name',{'name-top':item.goodsFlag == 2}]">{{ goodsName(item) }}</view>
<view
class="alias"
v-if="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods.goodsAlias"
......@@ -69,46 +69,48 @@
{{item.multipleSpecificationsGoods.goods.specificationStr}}
</view>
</template>
<template v-if="item.goodsFlag == 1">
<template v-if="item.goods.goodsPriceModify">
¥{{item.goods.sellPrice}}
</template>
<template v-else>
<view class="front-gear-input">
<view class="unit">¥</view>
<input
class="uni-input"
type="digit"
maxlength="9"
placeholder="请输入价格"
placeholder-style="font-size: 14px"
v-model="item.goods.sellPrice"
@blur="validatePrice($event, item, index)"
/>
</view>
</template>
</template>
<template v-else>
<template v-if="item.multipleSpecificationsGoods.goods.goodsPriceModify">
¥{{item.multipleSpecificationsGoods.goods.sellPrice}}
<view class="front-number-box flex">
<template v-if="item.goodsFlag == 1">
<template v-if="item.goods.goodsPriceModify">
¥{{item.goods.sellPrice}}
</template>
<template v-else>
<view class="front-gear-input">
<view class="unit">¥</view>
<input
class="uni-input"
type="digit"
maxlength="9"
placeholder="请输入价格"
placeholder-style="font-size: 14px"
v-model="item.goods.sellPrice"
@blur="validatePrice($event, item, index)"
/>
</view>
</template>
</template>
<template v-else>
<view class="front-gear-input">
<view class="unit">¥</view>
<input
class="uni-input"
type="digit"
maxlength="9"
placeholder="请输入价格"
placeholder-style="font-size: 14px"
v-model="item.multipleSpecificationsGoods.goods.sellPrice"
@blur="validatePrice($event, item, index)"
/>
</view>
<template v-if="item.multipleSpecificationsGoods.goods.goodsPriceModify">
¥{{item.multipleSpecificationsGoods.goods.sellPrice}}
</template>
<template v-else>
<view class="front-gear-input">
<view class="unit">¥</view>
<input
class="uni-input"
type="digit"
maxlength="9"
placeholder="请输入价格"
placeholder-style="font-size: 14px"
v-model="item.multipleSpecificationsGoods.goods.sellPrice"
@blur="validatePrice($event, item, index)"
/>
</view>
</template>
</template>
</template>
<view class="number">
x1
<view class="number">
x1
</view>
</view>
</view>
</view>
......@@ -218,7 +220,7 @@ export default {
if (parseFloat(value) < 0 || parseFloat(value) == 0) {
value = '0'
}
// 检查最小价格
// 检查最小价格
// if (!item.multipleSpecificationsGoods) {
// // 普通商品的最小价格检查
// if (item.goods.validMinSellPrice === 'Y' && item.goods.minSellPrice && parseFloat(value) < parseFloat(item.goods.minSellPrice)) {
......@@ -350,7 +352,7 @@ export default {
<style scoped lang="scss">
.shop-list {
padding: 0 toRpx(32) toRpx(32) 0;
padding: 0 toRpx(32) toRpx(32) 0;
.shop-item {
display: flex;
......@@ -364,10 +366,12 @@ export default {
flex: 1;
font-size: toRpx(28);
margin-left: toRpx(24);
position: relative;
}
.one-line {
display: flex;
align-items: center;
min-height: 72rpx;
.front-gear-box {
margin-left: auto;
}
......@@ -377,7 +381,9 @@ export default {
max-width: 70%;
word-break: break-all;
}
.name-top {
margin-top: 4rpx;
}
.alias {
margin-top: toRpx(12);
font-size: toRpx(24);
......@@ -433,6 +439,13 @@ export default {
.number {
margin-left: 16rpx;
}
.front-number-box{
position: absolute;
top: 50%;
right: 24rpx;
transform: translateY(-50%);
}
}
}
.front-gear-input-box {
......@@ -461,12 +474,13 @@ export default {
.uni-input {
padding: 0 toRpx(32);
height: 100%;
font-size: 28rpx;
}
.unit {
position: absolute;
top: 50%;
left: toRpx(32);
left: toRpx(24);
transform: translateY(-50%);
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!