批发字段修改
This commit is contained in:
parent
707e8635b9
commit
0810b43ff8
|
@ -135,6 +135,7 @@
|
|||
规格与价格
|
||||
</view>
|
||||
<view class="card" style="min-height: 100rpx;padding: 14rpx 30rpx;">
|
||||
|
||||
<u-form-item label="规格与价格" prop="formData.attrValue" ref="item1" labelPosition="left" required>
|
||||
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
|
||||
@click="navgo(`/pages/product/addGoodDetail/goodsPrice?formData=${JSON.stringify(formData)}&&mer_id=${mer_id}`)">
|
||||
|
@ -147,17 +148,19 @@
|
|||
<view class="" v-if="showSet">
|
||||
<view class="" v-for="(item,index) in formData.attrValue.filter(item=> item.is_use==0)">
|
||||
<view class="" v-if='formData.attrValue.filter(item=> item.is_use==0).length==1'>
|
||||
<u-form-item label="零售价格" label-width="auto" labelPosition="left" border-bottom>
|
||||
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
|
||||
{{item.price}}元/{{item.unit_name}}
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item v-if='isWholeSale' label="批发价格" label-width="auto" labelPosition="left"
|
||||
border-bottom>
|
||||
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
|
||||
{{item.wholesale_price}}元/{{item.wholesale_unit_name}}
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item v-else label="零售价格" label-width="auto" labelPosition="left" border-bottom>
|
||||
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
|
||||
{{item.price}}元/{{item.unit_name}}
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="商品库存" label-width="auto" labelPosition="left" border-bottom>
|
||||
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
|
||||
{{item.stock}}
|
||||
|
@ -188,11 +191,8 @@
|
|||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<view class='tips'>
|
||||
|
||||
|
@ -742,7 +742,12 @@
|
|||
|
||||
|
||||
async initFormData(option) {
|
||||
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale == 2;
|
||||
if (this.$store.state.app.userInfo?.mer_info?.wholesale == 0) {
|
||||
this.isWholeSale = false;
|
||||
} else {
|
||||
this.isWholeSale = true;
|
||||
}
|
||||
|
||||
this.mer_id = option.mer_id
|
||||
if (option.formData) {
|
||||
this.formData = JSON.parse(option.formData)
|
||||
|
|
|
@ -13,19 +13,7 @@
|
|||
<u-line direction="row" style="margin: 30rpx 0;" color="#ECECEC"></u-line>
|
||||
|
||||
<view class="">
|
||||
<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"
|
||||
placeholderStyle="font-size:26rpx;color:rgb(192, 196, 204);" type='number'></u--input>
|
||||
<view class="" style="flex: 1;text-align: center;">
|
||||
/
|
||||
</view>
|
||||
<view class="" @click="unitIptClick(index,false)" style="width: 100rpx;flex: 2.4">
|
||||
<u--input readonly style=" background-color: #F6F6F6;pointer-events: none;"
|
||||
placeholderStyle="font-size:26rpx;color:rgb(192, 196, 204);" placeholder="请输入计量单位"
|
||||
v-model="item.unit_name"></u--input>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="" v-if='isWholeSale'
|
||||
style="display: flex;align-items: center;justify-content: space-between;margin-top: 30rpx;">
|
||||
<u--input style="flex: 2; background-color: #F6F6F6;" placeholder="请输批发价格"
|
||||
|
@ -37,7 +25,19 @@
|
|||
<u--input style="background-color: #F6F6F6;pointer-events: none;" readonly placeholder="请输入计量单位"
|
||||
v-model="item.wholesale_unit_name"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-else class="" style="display: flex;align-items: center;justify-content: space-between;">
|
||||
<u--input style="flex: 2; background-color: #F6F6F6;" placeholder="请输入商品单价" v-model="item.price"
|
||||
placeholderStyle="font-size:26rpx;color:rgb(192, 196, 204);" type='number'></u--input>
|
||||
<view class="" style="flex: 1;text-align: center;">
|
||||
/
|
||||
</view>
|
||||
<view class="" @click="unitIptClick(index,false)" style="width: 100rpx;flex: 2.4">
|
||||
<u--input readonly style=" background-color: #F6F6F6;pointer-events: none;"
|
||||
placeholderStyle="font-size:26rpx;color:rgb(192, 196, 204);" placeholder="请输入计量单位"
|
||||
v-model="item.unit_name"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-line direction="row" style="margin: 25rpx 0;" color="#ECECEC"></u-line>
|
||||
|
@ -313,7 +313,12 @@
|
|||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
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;
|
||||
}
|
||||
this.initFomrData(option)
|
||||
this.attrValue = this.formData.attrValue
|
||||
this.attrValue.forEach(item => {
|
||||
|
|
Loading…
Reference in New Issue