This commit is contained in:
1154079537 2024-05-22 17:53:47 +08:00
parent b9567e1099
commit 707e8635b9
1 changed files with 9 additions and 1 deletions

View File

@ -70,16 +70,19 @@
<u-icon name="arrow-right" style="margin-right: 30rpx;"></u-icon>
</view>
</u-form-item>
<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 v-else 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 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>
@ -512,7 +515,12 @@
},
onLoad(option) {
this.mer_id = option.mer_id
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale == 2;
if (this.$store.state.app.userInfo?.mer_info?.wholesale == 2 || this.$store.state.app.userInfo?.mer_info
?.wholesale == 1) {
this.isWholeSale = true;
} else {
this.isWholeSale = false;
}
if (option.formData) {
this.formData = JSON.parse(option.formData)