规格修改

This commit is contained in:
1154079537 2024-05-17 11:54:30 +08:00
parent 939406afba
commit 47a2387fb6
3 changed files with 18 additions and 11 deletions

View File

@ -229,7 +229,8 @@
<u-line direction="col" style="margin: 0 20rpx;" length="60rpx" <u-line direction="col" style="margin: 0 20rpx;" length="60rpx"
color="#A1A1A1"></u-line> color="#A1A1A1"></u-line>
</view> </view>
<view class="attribute-li" v-for="item in product_attribute.attr"> <view class="attribute-li" v-for="item in product_attribute.attr"
v-if="item.label || item.value">
<view class="" style="display: flex;flex-direction: column;align-items: center;"> <view class="" style="display: flex;flex-direction: column;align-items: center;">
<view class="" style="margin-bottom: 10rpx;"> <view class="" style="margin-bottom: 10rpx;">
{{item.label}} {{item.label}}
@ -238,8 +239,8 @@
{{item.value}} {{item.value}}
</view> </view>
</view> </view>
<u-line direction="col" style="margin: 0 20rpx;" length="60rpx" <u-line direction="col" style="margin: 0 20rpx;" length="60rpx" color="#A1A1A1"
color="#A1A1A1"></u-line> v-if="item.label || item.value"></u-line>
</view> </view>
<view class="attribute-fixed-right" v-if="storeInfo.product_attribute.attr.length>5"> <view class="attribute-fixed-right" v-if="storeInfo.product_attribute.attr.length>5">
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
@ -755,7 +756,9 @@
getPreviewProDetail(params).then(res => { getPreviewProDetail(params).then(res => {
uni.hideLoading(); uni.hideLoading();
let storeInfo = res.data; let storeInfo = res.data;
// this.product_attribute = res.data.product_attribute
if (res.data.product_attribute)
this.product_attribute = res.data.product_attribute
this.image = res.data.image; this.image = res.data.image;

View File

@ -1,8 +1,6 @@
<template> <template>
<view class="content"> <view class="content">
<view class="">
<u-button icon="plus" text="新增规格" @click="pushFn" class="custom-style" iconColor='#38BE41'></u-button>
</view>
<view class="card" v-for="(item,index) in attrValue"> <view class="card" v-for="(item,index) in attrValue">
<view class="card-head card-li"> <view class="card-head card-li">
<text style="font-size: 32rpx;">规格{{index+1}}</text> <text style="font-size: 32rpx;">规格{{index+1}}</text>
@ -17,13 +15,14 @@
<view class=""> <view class="">
<view class="" style="display: flex;align-items: center;justify-content: space-between;"> <view class="" style="display: flex;align-items: center;justify-content: space-between;">
<u--input style="flex: 2; background-color: #F6F6F6;" placeholder="请输入商品单价" v-model="item.price" <u--input style="flex: 2; background-color: #F6F6F6;" placeholder="请输入商品单价" v-model="item.price"
type='number'></u--input> placeholderStyle="font-size:26rpx;color:rgb(192, 196, 204);" type='number'></u--input>
<view class="" style="flex: 1;text-align: center;"> <view class="" style="flex: 1;text-align: center;">
/ /
</view> </view>
<view class="" @click="unitIptClick(index,false)" style="width: 100rpx;flex: 2.4"> <view class="" @click="unitIptClick(index,false)" style="width: 100rpx;flex: 2.4">
<u--input readonly style=" background-color: #F6F6F6;pointer-events: none;" <u--input readonly style=" background-color: #F6F6F6;pointer-events: none;"
placeholder="请输入计量单位" v-model="item.unit_name"></u--input> placeholderStyle="font-size:26rpx;color:rgb(192, 196, 204);" placeholder="请输入计量单位"
v-model="item.unit_name"></u--input>
</view> </view>
</view> </view>
@ -67,6 +66,11 @@
</view> </view>
</view> </view>
</view> </view>
<view class="">
<u-button icon="plus" text="新增规格" @click="pushFn" class="custom-style" iconColor='#38BE41'></u-button>
</view>
<view class="submit-btn"> <view class="submit-btn">
<u-button type="primary" shape="circle" text="保存" @click="submit"></u-button> <u-button type="primary" shape="circle" text="保存" @click="submit"></u-button>
</view> </view>
@ -326,7 +330,7 @@
.card { .card {
margin-top: 30rpx; margin-bottom: 30rpx;
padding: 30rpx 46rpx; padding: 30rpx 46rpx;
background-color: white; background-color: white;
border-radius: 16rpx 16rpx 16rpx 16rpx; border-radius: 16rpx 16rpx 16rpx 16rpx;

View File

@ -133,7 +133,7 @@
.left { .left {
margin-right: 30rpx; margin-right: 30rpx;
width: 140rpx; width: 160rpx;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;