✨ feat(ID1000796):2.2面料详情页:色号价格仅需展示标准报价;
This commit is contained in:
parent
8b7e0c45d7
commit
f27605086c
@ -96,11 +96,22 @@
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
@include common_ellipsis();
|
@include common_ellipsis();
|
||||||
}
|
}
|
||||||
.num {
|
.flexBox {
|
||||||
font-size: $font_size;
|
|
||||||
color: $color_main;
|
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.numone {
|
||||||
|
font-size: $font_size;
|
||||||
|
color: #9e9e9e;
|
||||||
|
margin-right: 10px;
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
.num {
|
||||||
|
font-size: $font_size;
|
||||||
|
color: $color_main;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.weight_error {
|
.weight_error {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
|||||||
@ -29,8 +29,8 @@ const OrderCount = ({ show = false, onClose, title = '', productId = 0 }: param)
|
|||||||
const { adminUserInfo } = useSelector(state => state.userInfo)
|
const { adminUserInfo } = useSelector(state => state.userInfo)
|
||||||
|
|
||||||
const [selectList, _] = useState([
|
const [selectList, _] = useState([
|
||||||
{ id: 0, step: 1, digits: 0, maxNum: 100000, defaultNum: 1, title: '大货', unit: '条', eunit: 'kg', priceField: 'bulk_price' },
|
{ id: 0, step: 1, digits: 0, maxNum: 100000, defaultNum: 1, title: '大货', unit: '条', eunit: 'kg', priceField: 'bulk_price', originalPrice: 'last_bulk_price' },
|
||||||
{ id: 1, step: 1, digits: 2, maxNum: 9.99, defaultNum: 1, title: '剪板', unit: '米', eunit: 'm', priceField: 'length_cut_price' },
|
{ id: 1, step: 1, digits: 2, maxNum: 9.99, defaultNum: 1, title: '剪板', unit: '米', eunit: 'm', priceField: 'length_cut_price', originalPrice: 'last_length_cut_price' },
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
step: 1,
|
step: 1,
|
||||||
@ -43,6 +43,7 @@ const OrderCount = ({ show = false, onClose, title = '', productId = 0 }: param)
|
|||||||
unit: '米',
|
unit: '米',
|
||||||
eunit: 'kg',
|
eunit: 'kg',
|
||||||
priceField: 'weight_cut_price',
|
priceField: 'weight_cut_price',
|
||||||
|
originalPrice: 'last_weight_cut_price',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
const [selectIndex, setSelectIndex] = useState(0)
|
const [selectIndex, setSelectIndex] = useState(0)
|
||||||
@ -216,6 +217,21 @@ const OrderCount = ({ show = false, onClose, title = '', productId = 0 }: param)
|
|||||||
[selectIndex],
|
[selectIndex],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const formatOriginalPrice = useCallback(
|
||||||
|
(item) => {
|
||||||
|
if (selectIndex === 1 || selectIndex === 2) { return }
|
||||||
|
const price = Number(formatPriceDiv(item[selectList[selectIndex].originalPrice]))
|
||||||
|
return (
|
||||||
|
<View className={styles.priceText}>
|
||||||
|
<Text>¥</Text>
|
||||||
|
{price}
|
||||||
|
<Text> /{selectList[selectIndex].eunit}</Text>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
},
|
||||||
|
[selectIndex],
|
||||||
|
)
|
||||||
|
|
||||||
// 显示图片弹窗
|
// 显示图片弹窗
|
||||||
const [showLabImage, setShowLabImage] = useState(false)
|
const [showLabImage, setShowLabImage] = useState(false)
|
||||||
const [labImageValue, setLabImageValue] = useState()
|
const [labImageValue, setLabImageValue] = useState()
|
||||||
@ -237,8 +253,12 @@ const OrderCount = ({ show = false, onClose, title = '', productId = 0 }: param)
|
|||||||
</View>
|
</View>
|
||||||
<View className={styles.item_con}>
|
<View className={styles.item_con}>
|
||||||
<View className={styles.title}>{formatHashTag(item.code, item.name)}</View>
|
<View className={styles.title}>{formatHashTag(item.code, item.name)}</View>
|
||||||
{selectIndex == 0 && <View className={styles.weight_error}>空差:{formatWeightDiv(item.weight_error)}kg</View>}
|
{/* {selectIndex == 0 && <View className={styles.weight_error}>空差:{formatWeightDiv(item.weight_error)}kg</View>} */}
|
||||||
<View className={styles.num}>{formatPrice(item)}</View>
|
<View className={styles.flexBox}>
|
||||||
|
{selectIndex === 0 && <View className={styles.numone}>{formatOriginalPrice(item)}</View>}
|
||||||
|
<View className={styles.num}>{formatPrice(item)}</View>
|
||||||
|
</View>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.btn_con}>
|
<View className={styles.btn_con}>
|
||||||
{(!item.show && (
|
{(!item.show && (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user