add
This commit is contained in:
parent
0c6e085b65
commit
765f13eea4
1
App.vue
1
App.vue
|
@ -67,7 +67,6 @@
|
|||
auto_arrival: 0,
|
||||
mer_location: 0,
|
||||
statusBarHeight: 0,
|
||||
mer_location: 0,
|
||||
store_street_theme: 1,
|
||||
sys_intention_agree: '',
|
||||
copyright_status: '',
|
||||
|
|
|
@ -146,6 +146,7 @@
|
|||
height: 76rpx;
|
||||
border: 1px solid white;
|
||||
border-radius: 38rpx;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
.next-btn-text {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<view class="card" style="height: 300rpx;"
|
||||
@click="navgo(`/pages/product/addGoodDetail/goodsSearch?mer_id=${mer_id}&&type=simple&&formData=${JSON.stringify(formData)}`)">
|
||||
<u-form-item label="想卖什么" prop="title">
|
||||
<text slot='right' style="font-size:28rpx ; color:#989898 ;">{{value1.length}}/{{maxLength}}</text>
|
||||
<text slot='right' style="font-size:28rpx ; color:#989898 ;">{{cateLength}}/{{maxLength}}</text>
|
||||
</u-form-item>
|
||||
<u-line></u-line>
|
||||
<u--textarea v-model="formData.cate_name" placeholder="请输入内容" :autoHeight='true'
|
||||
|
@ -60,9 +60,9 @@
|
|||
</view>
|
||||
|
||||
<view class="card">
|
||||
<u-form-item label="规格与价格" prop="userInfo.name" ref="item1" border-bottom>
|
||||
<u-form-item label="价格与库存" prop="userInfo.name" ref="item1" border-bottom>
|
||||
</u-form-item>
|
||||
<u-form-item label="计量单位" prop="userInfo.name" ref="item1" border-bottom>
|
||||
<u-form-item label="计量单位" prop="formData.unit_name" ref="item1" border-bottom>
|
||||
<view style="display: flex;" slot='right' @click='showPouple=true'>
|
||||
<view style="margin-right: 10rpx;line-height: 25rpx;color:#777777">
|
||||
{{formData.attrValue[0].unit_name ||'请选择'}}
|
||||
|
@ -70,17 +70,17 @@
|
|||
<u-icon name="arrow-right" style="margin-right: 30rpx;"></u-icon>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item label="零售价格" prop="userInfo.name" ref="item1" border-bottom>
|
||||
<u-form-item label="零售价格" prop="formData.price" ref="item1" border-bottom>
|
||||
<u--input inputAlign='right' placeholderStyle="color:#777777" style="width: 300rpx;"
|
||||
placeholder="请输入零售价" type='number' @blur='fixed2(1)' v-model="formData.attrValue[0].price"
|
||||
slot='right'></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item v-if='isWholeSale' label="批发价格" prop="userInfo.name" ref="item1" border-bottom>
|
||||
<u-form-item v-if='isWholeSale' label="批发价格" prop="formData.wholesale_price" ref="item1" border-bottom>
|
||||
<u--input inputAlign='right' placeholderStyle="color:#777777" style="width: 300rpx;"
|
||||
placeholder="请输入批发价格" @blur='fixed2(2)' type='number'
|
||||
v-model="formData.attrValue[0].wholesale_price" slot='right'></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="商品库存" prop="userInfo.name" ref="item1">
|
||||
<u-form-item label="商品库存" prop="formData.stock" ref="item1">
|
||||
<u--input inputAlign='right' type='number' placeholderStyle="color:#777777" style="width: 300rpx;"
|
||||
placeholder="请输入库存" v-model="formData.attrValue[0].stock" slot='right'></u--input>
|
||||
</u-form-item>
|
||||
|
@ -167,6 +167,12 @@
|
|||
components: {
|
||||
uploadImgVideo,
|
||||
},
|
||||
computed: {
|
||||
cateLength() {
|
||||
return this.formData.cate_name?.length || 0
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
coverUrl: '?spm=a2c4e.11153940.blogcont573781.6.c1032027sQ46VG&x-oss-process=video/snapshot,t_1000,m_fast',
|
||||
|
@ -285,7 +291,35 @@
|
|||
},
|
||||
message: '请至少上传2张图片',
|
||||
trigger: ['change', 'blur'],
|
||||
}]
|
||||
}],
|
||||
"formData.unit_name": [{
|
||||
validator: (rule, value, callback) => {
|
||||
return Boolean(this.formData.attrValue[0].unit_name)
|
||||
},
|
||||
message: '请选择计量单位',
|
||||
trigger: ['change', 'blur'],
|
||||
}],
|
||||
"formData.price": [{
|
||||
validator: (rule, value, callback) => {
|
||||
return Boolean(this.formData.attrValue[0].price)
|
||||
},
|
||||
message: '请输入零售价格',
|
||||
trigger: ['change', 'blur'],
|
||||
}],
|
||||
"formData.wholesale_price": [{
|
||||
validator: (rule, value, callback) => {
|
||||
return Boolean(this.formData.attrValue[0].wholesale_price)
|
||||
},
|
||||
message: '请输入批发价格',
|
||||
trigger: ['change', 'blur'],
|
||||
}],
|
||||
"formData.stock": [{
|
||||
validator: (rule, value, callback) => {
|
||||
return Boolean(this.formData.attrValue[0].stock)
|
||||
},
|
||||
message: '请输入库存',
|
||||
trigger: ['change', 'blur'],
|
||||
}],
|
||||
|
||||
},
|
||||
};
|
||||
|
@ -463,10 +497,12 @@
|
|||
},
|
||||
async submit() {
|
||||
this.$refs.formData.validate().then(res => {
|
||||
// console.log(res)
|
||||
// return
|
||||
this.handAdd()
|
||||
}).catch(errors => {
|
||||
console.log(errors)
|
||||
uni.$u.toast(errors[0].message)
|
||||
console.log('err', errors)
|
||||
// uni.$u.toast(errors[0].message)
|
||||
})
|
||||
|
||||
}
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
<view style="flex: 1;text-align: center;" @click="editGoods(item)">
|
||||
编辑商品
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="card-footer" v-if='where.type==1'>
|
||||
<view class="card-footer-li" style="flex: 1.5;">
|
||||
|
@ -965,7 +964,8 @@
|
|||
|
||||
.card {
|
||||
width: 718rpx;
|
||||
height: 410rpx;
|
||||
padding-bottom: 20rpx;
|
||||
// height: 410rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 16rpx;
|
||||
background-color: #fff;
|
||||
|
@ -1006,13 +1006,11 @@
|
|||
height: 74rpx;
|
||||
border-radius: 0 0 16rpx 16rpx;
|
||||
background-color: #FFF1EC;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
// justify-content: space-around;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
color: #777777;
|
||||
transform: translateY(20rpx);
|
||||
|
||||
.card-footer-li {
|
||||
text-align: center;
|
||||
|
|
|
@ -154,7 +154,7 @@
|
|||
height: 76rpx;
|
||||
border: 1px solid white;
|
||||
border-radius: 38rpx;
|
||||
background-color: #939394;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
.next-btn-text {
|
||||
|
|
Loading…
Reference in New Issue